Преглед изворни кода

HUE-4378 [core] File chooser with multiple options overflow the modals

Enrico Berti пре 9 година
родитељ
комит
a2d887b

+ 62 - 0
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -2651,3 +2651,65 @@ body {
   overflow-x: hidden;
   text-overflow: ellipsis;
 }
+
+.fileChooserActionUploader {
+  float: left;
+  margin-top: 10px;
+  margin-right: 4px;
+}
+
+.qq-upload-button {
+  display: inline-block;
+  height: 29px;
+  min-height: 29px;
+  padding: 0 8px;
+  margin: 0;
+  font-size: 13px;
+  font-weight: bold;
+  line-height: 29px;
+  color: #444;
+  text-align: center;
+  text-shadow: none;
+  vertical-align: middle;
+  cursor: pointer;
+  background-color: #f9f9f9;
+  background-image: -moz-linear-gradient(top, #fff, #f1f1f1);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#f1f1f1));
+  background-image: -webkit-linear-gradient(top, #fff, #f1f1f1);
+  background-image: -o-linear-gradient(top, #fff, #f1f1f1);
+  background-image: linear-gradient(to bottom, #fff, #f1f1f1);
+  background-repeat: repeat-x;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-color: #f1f1f1 #f1f1f1 #cbcbcb;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border-color: rgba(0, 0, 0, 0.1);
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+  border-radius: 2px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff1f1f1', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+
+.qq-upload-button-focus {
+  outline: none;
+}
+
+.qq-upload-button:hover,.qq-upload-button:focus {
+  color: #444;
+  text-decoration: none;
+  background-position: 0 -15px;
+  -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
+  -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
+  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
+  -webkit-transition: background-position .1s linear;
+  -moz-transition: background-position .1s linear;
+  -o-transition: background-position .1s linear;
+  transition: background-position .1s linear
+  background-color: #f1f1f1;
+  *background-color: #e4e4e4;
+}
+
+

+ 2 - 2
desktop/core/src/desktop/static/desktop/js/jquery.filechooser.js

@@ -266,7 +266,7 @@
         var _createFolderBtn;
         var _selectFolderBtn;
         if (_parent.options.uploadFile) {
-          _uploadFileBtn = $("<div>").attr("id", "file-uploader");
+          _uploadFileBtn = $("<div>").attr("id", "file-uploader").addClass('fileChooserActionUploader');
           _uploadFileBtn.appendTo(_actions);
           _showActions = true;
           initUploader(path, _parent, _uploadFileBtn, _parent.options.labels);
@@ -383,7 +383,7 @@
       template: '<div class="qq-uploader">' +
       '<div class="qq-upload-drop-area"><span></span></div>' +
       '<div class="qq-upload-button">' + labels.UPLOAD_FILE + '</div>' +
-      '<ul class="qq-upload-list"></ul>' +
+      '<ul class="qq-upload-list" style="position: fixed"></ul>' +
       '</div>',
       fileTemplate: '<li>' +
       '<span class="qq-upload-file"></span>' +

+ 1 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -59,7 +59,7 @@ if USE_NEW_EDITOR.get():
   <link href="${ static('desktop/ext/css/bootplus.css') }" rel="stylesheet">
   <link href="${ static('desktop/ext/css/font-awesome.min.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/hue3.css') }" rel="stylesheet">
-  <link href="${ static('desktop/ext/css/fileuploader.css') }" rel="stylesheet">
+##   <link href="${ static('desktop/ext/css/fileuploader.css') }" rel="stylesheet">
 
   <style type="text/css">
     % if conf.CUSTOM.BANNER_TOP_HTML.get():