Added css for upload button and attachments
authorMarcel Werk <burntime@woltlab.com>
Sun, 1 Apr 2012 23:16:03 +0000 (01:16 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 1 Apr 2012 23:16:03 +0000 (01:16 +0200)
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/attachment.less [new file with mode: 0644]
wcfsetup/install/files/style/bootstrap.less
wcfsetup/install/files/style/inputs.less

index 697a9e18c9cb585d0c1d7671f263b69732c69b8a..d6d318c7fec6861d574c8a9074162b11b2fc7dae 100644 (file)
@@ -4582,13 +4582,13 @@ WCF.Upload = Class.extend({
         */
        _createButton: function() {
                if (this._supportsAJAXUpload) {
-                       this._fileUpload = $('<input type="file" name="'+this._name+'" style="opacity: 0" '+(this._options.multiple ? 'multiple="true" ' : '')+'/>');
+                       this._fileUpload = $('<input type="file" name="'+this._name+'" '+(this._options.multiple ? 'multiple="true" ' : '')+'/>');
                        this._fileUpload.change($.proxy(this._upload, this));
-                       var $button = $('<p class="wcf-button" style="display: inline-block; position: relative; overflow: hidden; width: 100px"><span style="position: absolute; top: 0; left: 0">Upload</span></p>');
+                       var $button = $('<p class="button uploadButton"><span>Upload</span></p>');
                        $button.append(this._fileUpload);
                }
                else {
-                       var $button = $('<p class="wcf-button" style="display: inline-block;"><span>Upload</span></p>');
+                       var $button = $('<p class="button"><span>Upload</span></p>');
                        $button.click($.proxy(this._showOverlay, this));
                }
                
diff --git a/wcfsetup/install/files/style/attachment.less b/wcfsetup/install/files/style/attachment.less
new file mode 100644 (file)
index 0000000..4901365
--- /dev/null
@@ -0,0 +1,39 @@
+/* #### Attachments #### */
+
+/* attachment form */
+.formAttachmentList {
+       border-bottom: 1px solid @wcfContainerBorderColor;
+       padding-bottom: @wcfGapSmall;
+       
+       > li {
+               width: 33%;
+               float: left;
+               //background-color: red;
+               //position: relative;
+
+               > .thumbnail {
+                       width: 48px;
+                       height: 48px;
+                       border-radius: 5px;
+               }
+               
+               hgroup {
+                       float: left;
+                       margin-right: @wcfGapSmall;
+               }
+               
+               > div {
+                       padding-top: @wcfGapSmall;
+               }
+               
+               ul {
+                       
+               }
+       }
+}
+
+.formAttachmentContent {
+       dl {
+               margin-top: 0;
+       }
+}
\ No newline at end of file
index 978d6242c67830810f3bfebfc979550385f31833..f162f3d18c42a4a01616f2f08b9dea496bed0896 100644 (file)
@@ -28,6 +28,7 @@
 @import "user.less";
 @import "like.less";
 @import "sidebar.less";
+@import "attachment.less";
 
 @import "message.less";
 @import "dialog.less";
index 06cceb61e0a607ee93f168b705a7f13707375a30..ce9655abe75e5e27354baba1f7c09187bccddcb0 100644 (file)
@@ -161,4 +161,17 @@ textarea {
        border-color: @errorBorderColor;
        background-color: @errorBackgroundColor;
        color: @errorColor;
+}
+
+/* Upload Button */
+.uploadButton {
+       overflow: hidden;
+       position: relative;
+       
+       input {
+               left: 0;
+               opacity: 0;
+               position: absolute;
+               top: 0;
+       }
 }
\ No newline at end of file