NSData *fileData1;
NSData *fileData2;
NSData *fileData3;
+ NSString *attachmentName;
}
@end
@implementation UIxMailEditorAttach
- (void)dealloc {
+ [self->attachmentName release];
[self->filePath1 release];
[self->filePath2 release];
[self->filePath3 release];
/* accessors */
+- (void)setAttachmentName:(NSString *)_value {
+ ASSIGNCOPY(self->attachmentName, _value);
+}
+- (NSString *)attachmentName {
+ return self->attachmentName;
+}
+
- (void)setFilePath1:(NSString *)_value {
ASSIGNCOPY(self->filePath1, _value);
}
return self;
}
+- (id)deleteAttachmentAction {
+ [self logWithFormat:@"delete attachment: %@", [self attachmentName]];
+ return self;
+}
+
@end /* UIxMailEditorAttach */
<link href="mailto:info@skyrix.com" rev="made"/>
</head>
- <body style="background-color: #D4D0C8;">
+ <body id="attachment_body" style="background-color: #D4D0C8;">
<form name="pageform" href="attach" sidInUrl="NO"
method="POST"
- enctype="multipart/form-data">
- <h4>Attach</h4>
- <table border="0" width="98%">
- <tr>
- <td><input type="file" name="file1"
- var:filePath="filePath1"
- var:data="fileData1" /></td>
- </tr>
- <tr>
- <td><input type="file" name="file2"
- var:filePath="filePath2"
- var:data="fileData2" /></td>
- </tr>
- <tr>
- <td><input type="file" name="file3"
- var:filePath="filePath3"
- var:data="fileData3" /></td>
- </tr>
- </table>
-
- <input type="submit" name="submit" value="attach" />
- <br />
-
- <h4>Attachments</h4>
-
- <div style="border-top-color: white; border-top-width: 1; border-top-style: solid;"> </div>
- <table border="0" width="98%">
- <var:foreach list="clientObject.fetchAttachmentNames" item="item">
+ enctype="multipart/form-data"
+ id="attachment_form"
+ >
+ <div id="attachment_upload">
+ <table border="0" width="98%">
+ <tr>
+ <td class="attachment_uplabel">File:</td>
+ <td><input type="file" name="file1"
+ var:filePath="filePath1"
+ var:data="fileData1" /></td>
+ </tr>
<tr>
- <td><var:string value="item" /></td>
+ <td class="attachment_uplabel">File:</td>
+ <td><input type="file" name="file2"
+ var:filePath="filePath2"
+ var:data="fileData2" /></td>
</tr>
- </var:foreach>
- </table>
+ <tr>
+ <td class="attachment_uplabel">File:</td>
+ <td><input type="file" name="file3"
+ var:filePath="filePath3"
+ var:data="fileData3" /></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="submit" name="submit" value="attach" />
+ <input type="reset" value="close"
+ onclick="window.close()" />
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="attachment_list">
+ <div style="padding: 4px;">
+
+ <div class="embedwhite_out">
+ <div class="embedwhite_in">
+ <table border="0" width="100%" cellspacing="0" cellpadding="1">
+ <tr class="tableview">
+ <td class="tbtv_headercell">
+ Attachments
+ </td>
+ <td class="tbtv_headercell" width="10%">
+ <entity name="nbsp" />
+ </td>
+ </tr>
+
+ <var:foreach list="clientObject.fetchAttachmentNames"
+ item="attachmentName">
+ <tr class="tableview">
+ <td><var:string value="attachmentName" /></td>
+ <td>
+ <a href="deleteAttachment"
+ var:_attachmentName="attachmentName"
+ >delete</a>
+ </td>
+ </tr>
+ </var:foreach>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
</form>
</body>
</html>