diff --git a/src/main/java/cn/devezhao/rebuild/web/commons/FileUploader.java b/src/main/java/cn/devezhao/rebuild/web/commons/FileUploader.java index 952f5ac9a..82dbb3d46 100644 --- a/src/main/java/cn/devezhao/rebuild/web/commons/FileUploader.java +++ b/src/main/java/cn/devezhao/rebuild/web/commons/FileUploader.java @@ -66,7 +66,7 @@ public class FileUploader extends HttpServlet { item.write(temp); String cloud = req.getParameter("cloud"); - if ("true".equals(cloud)) { + if ("true".equals(cloud) || "auto".equals(cloud)) { uploadName = QiniuCloud.upload(temp); if (temp.exists()) { temp.delete(); diff --git a/src/main/webapp/_include/Head.jsp b/src/main/webapp/_include/Head.jsp index c4c1d00fb..3de9a88ff 100644 --- a/src/main/webapp/_include/Head.jsp +++ b/src/main/webapp/_include/Head.jsp @@ -5,7 +5,12 @@ - + \ No newline at end of file diff --git a/src/main/webapp/assets/css/rb-page.css b/src/main/webapp/assets/css/rb-page.css index c10c3d407..e26d8268d 100644 --- a/src/main/webapp/assets/css/rb-page.css +++ b/src/main/webapp/assets/css/rb-page.css @@ -2,6 +2,7 @@ height: 2.8rem; min-width: 88px; } + .btn-xl { height: 3.4rem; } @@ -37,6 +38,7 @@ .modal-body.iframe { padding: 0 !important; } + .modal-body.iframe iframe { width: 100%; height: 100%; @@ -51,13 +53,14 @@ body.dialog .main-content { } body.dialog .main-content .footer { - padding-bottom:0 !important; + padding-bottom: 0 !important; } textarea.row2x { height: 52px !important; resize: none; } + textarea.row3x { height: 72px !important; resize: none; @@ -80,28 +83,97 @@ a { min-height: 200px; } -.img-field>span{ - display: inline-block; - margin-right: 9px; - margin-bottom: 9px; +.rb-form .type-IMAGE { + padding-bottom: 1px !important; } -a.img-upload { + +.rb-form .type-FILE { + padding-bottom: 4px !important; +} + +.img-field>span { + margin-bottom: 6px; + margin-right: 8px; + display: inline-block; +} + +.img-field .img-upload { width: 72px; height: 72px; text-align: center; display: table-cell; - vertical-align: middle; - padding: 2px; + vertical-align: middle; + padding: 1px; + position: relative; } -a.img-upload:hover{ + +.img-field .img-upload>img { + max-width: 100%; + max-height: 100%; +} + +.img-field label.img-upload{ + padding-top: 5px; +} +.img-field label.img-upload:hover { border: 1px solid #5f99f5; } -.img-upload > span.zmdi { +.img-field label.img-upload .zmdi { font-size: 2rem; color: #aaa; } -.img-upload > img { - max-width: 100%; - max-height: 100%; + +.img-field a.img-upload { + cursor: default; +} + +.img-field a.img-upload b, .file-field .img-thumbnail b { + display: none; + position: absolute; + bottom: 0; + width: 100%; + left: 0; + right: 0; + font-size: 14px; + cursor: pointer; + background-color: rgba(0, 0, 0, 0.4); + color: #fff; + text-align: center; +} + +.img-field a.img-upload:hover b, .file-field .img-thumbnail:hover b { + display: block; +} + +.img-field a.img-upload:hover b:hover, .file-field .img-thumbnail:hover b:hover { + background-color: rgba(0, 0, 0, 0.6); +} + +.file-field .file-select { + margin-top: 3px; +} + +.file-field .img-thumbnail { + display: inline-block; + padding: 4px; + max-width: 240px; + min-height: 38px; + margin-bottom: 4px; + margin-right: 8px; + overflow: hidden; + position: relative; +} + +.file-field .img-thumbnail>i.zmdi { + font-size: 36px; + float: left; + width: 42px; + text-align: center; +} + +.file-field .img-thumbnail>span { + margin-left: 42px; + display: block; + word-break: break-all; } \ No newline at end of file diff --git a/src/main/webapp/assets/js/rb-components.jsx b/src/main/webapp/assets/js/rb-components.jsx index 68a8d565f..d7158d044 100644 --- a/src/main/webapp/assets/js/rb-components.jsx +++ b/src/main/webapp/assets/js/rb-components.jsx @@ -49,7 +49,7 @@ class RbModal extends React.Component { if (height == 0 || height == that.__lastHeight) return; $(that.refs['rbmodal.body']).height(height); that.__lastHeight = height; - }, 400, 'RbModal-resize'); + }, 100, 'RbModal-resize'); } } diff --git a/src/main/webapp/assets/js/rb-forms.jsx b/src/main/webapp/assets/js/rb-forms.jsx index 7d3777168..a0c9c5fdb 100644 --- a/src/main/webapp/assets/js/rb-forms.jsx +++ b/src/main/webapp/assets/js/rb-forms.jsx @@ -11,7 +11,8 @@ class RbForm extends React.Component { {this.props.children}