[attachments] Improved alignment of attachment components and styling
authorAntonio Moreno <antonio.moreno@openbravo.com>
Wed, 11 May 2011 17:24:52 +0200
changeset 12120 9069258ded36
parent 12119 ff48f6570c57
child 12121 999211f9625a
[attachments] Improved alignment of attachment components and styling
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-attachments.js
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-attachments.js	Wed May 11 18:07:12 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-attachments.js	Wed May 11 17:24:52 2011 +0200
@@ -219,9 +219,14 @@
                   if(clickedOK){
                     var hTempLayout = isc.HLayout.create();
                     form.theCanvas.addMember(hTempLayout,form.theCanvas.getMembers().size());
+                    var uploadingFile = isc.Label.create({
+                      contents: fileName
+                    });
                     var uploading = isc.Label.create({
-                      contents: fileName + '    '+OB.I18N.getLabel('OBUIAPP_AttachmentUploading')
+                        className: 'OBSectionItemControlLinkUploading',
+                        contents: '    '+OB.I18N.getLabel('OBUIAPP_AttachmentUploading')
                     });
+                    hTempLayout.addMember(uploadingFile);
                     hTempLayout.addMember(uploading);
                     var button =  form.theCanvas.getForm().view.toolBar.getLeftMember(isc.OBToolbar.TYPE_ATTACHMENTS);
                     if(!button) {
@@ -357,15 +362,17 @@
       var buttonLayout = isc.HLayout.create();
       var attachmentLabel = isc.Label.create({
         contents: attachment.name,
+        className: 'OBNoteListGrid',
         width: '200px',
+        height: 20,
         wrap: false
       });
+      var creationDate = OB.Utilities.getTimePassed(new Date(attachment.creationDate));
       var attachmentBy = isc.Label.create({
-        contents: " <i>"+OB.I18N.getLabel('OBUIAPP_AttachmentBy')+" "+attachment.createdby+"</i>"
-      });
-      var creationDate = OB.Utilities.getTimePassed(new Date(attachment.creationDate));
-      var attachmentCreationDate = isc.Label.create({
-        contents: creationDate
+        height:  1,
+        className: 'OBNoteListGridAuthor',
+        width: '200px',
+        contents: creationDate+" "+OB.I18N.getLabel('OBUIAPP_AttachmentBy')+" "+attachment.createdby
       });
       var downloadAttachment = isc.OBSectionItemControlLink.create({
         contents: '[ '+OB.I18N.getLabel('OBUIAPP_AttachmentDownload')+' ]',
@@ -374,6 +381,7 @@
         attachId: attachment.id,
         action: downloadActions
       });
+      downloadAttachment.height=0;
       var removeAttachment = isc.OBSectionItemControlLink.create({
         contents: '[ '+OB.I18N.getLabel('OBUIAPP_AttachmentRemove')+' ]',
         width: '30px',
@@ -383,7 +391,6 @@
         action: removeActions
       });
       buttonLayout.addMember(attachmentLabel);
-      buttonLayout.addMember(attachmentCreationDate);
       buttonLayout.addMember(attachmentBy);
       buttonLayout.addMember(downloadAttachment);
       buttonLayout.addMember(removeAttachment);
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css	Wed May 11 18:07:12 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css	Wed May 11 17:24:52 2011 +0200
@@ -730,7 +730,8 @@
 .OBSectionItemControlLinkDown,
 .OBSectionItemControlLinkFocused,
 .OBSectionItemControlLinkFocusedOver,
-.OBSectionItemControlLinkFocusedDown {
+.OBSectionItemControlLinkFocusedDown ,
+.OBSectionItemControlLinkUploading {
   font-family: 'lucida sans', sans-serif;
   font-size: 12px;
   vertical-align: middle;
@@ -738,6 +739,7 @@
   text-align: right;
   cursor: pointer;
   padding-right: 5px;
+  padding:5px; 
 }
 
 .OBSectionItemControlLink,
@@ -756,6 +758,9 @@
   color: #004E27;
   text-decoration: underline;
 }
+.OBSectionItemControlLinkUploading {
+  color: #FA962F;
+}
 
 /*=======================================================================
  * Used in the label of a foreign key field, for link image