diff --git a/media/css/seahub.css b/media/css/seahub.css
index 8fd55362da..665a368486 100644
--- a/media/css/seahub.css
+++ b/media/css/seahub.css
@@ -337,8 +337,7 @@ input.btn-disabled:hover {/*for input*/
.side-tabnav-tabs .tab a,
.checkbox,
.checkbox-checked,
-.modalCloseImg,
-#discuss {
+.modalCloseImg {
background:transparent url('../img/bg.png') no-repeat scroll 0 0;
}
.op-list li {
@@ -1187,7 +1186,7 @@ textarea:-moz-placeholder {/* for FF */
}
#right-panel .hd button,
.tabnav button,
-.repo-file-list-topbar button,
+.repo-file-list-topbar .op-btn,
.wiki-top .op-btn {
height:29px;
background:#fff;
@@ -1716,6 +1715,9 @@ textarea:-moz-placeholder {/* for FF */
.repo-op .op-btn [class^="sf-icon-"] {
margin-right:3px;
}
+.repo-op .op-btn {
+ vertical-align:middle;
+}
#featured-filetype {
margin:5px 0;
}
@@ -1929,10 +1931,46 @@ textarea:-moz-placeholder {/* for FF */
margin-top:8px;
}
/* file upload */
-.fileupload-buttonbar .start,
+.repo-op .upload-file-btn {
+ display: inline-block;
+ height: auto;
+ padding: 5px 6px;
+ border: 1px solid #c5c5c5;
+ border-radius: 2px;
+ position:relative;
+ overflow:hidden;
+}
+.fixed-upload-file-dialog {
+ width: 540px;
+ position: fixed;
+ bottom: 0;
+ right: 10px;
+ background: #fff;
+ border: 1px solid #ddd;
+ border-radius: 3px;
+ box-shadow: 0 0 6px #ddd;
+}
+.fixed-upload-file-dialog .hd {
+ padding: 6px 10px;
+ background: #f0f0f0;
+ margin:0;
+}
+.fixed-upload-file-dialog .con {
+ height:114px;
+ overflow-y:auto;
+}
+.fixed-upload-file-dialog .ops {
+ position:absolute;
+ top:10px;
+ right:10px;
+}
+.fixed-upload-file-dialog .close,
.fileupload-buttonbar .cancel {
*margin-left:5px;
}
+.fileupload-progress {
+ margin-top:5px;
+}
.fileinput-button {
display:inline-block;
line-height:19px;
@@ -1943,7 +1981,8 @@ textarea:-moz-placeholder {/* for FF */
font-size:13px;
color:#333;
}
-.fileinput-button input {
+.fileinput-button input,
+#upload-file input {
position: absolute;
top: 0;
right: 0;
@@ -1958,6 +1997,7 @@ textarea:-moz-placeholder {/* for FF */
}
.table .name {
width:60%;
+ padding-left:10px;
}
.table .size {
width:14%;
@@ -1965,16 +2005,19 @@ textarea:-moz-placeholder {/* for FF */
.template-upload .start {
text-align:right;
}
-.template-upload .start {
- text-align:right;
+.fixed-upload-file-dialog .fileupload-buttonbar .cancel,
+.template-upload .btn {
+ background: transparent;
+ border: none;
+ color: #e83;
+}
+.fixed-upload-file-dialog .fileupload-buttonbar .cancel {
+ color:#909090;
}
.template-upload .start,
.template-upload .cancel {
width:13%;
}
-.fileupload-progress {
- margin-top:10px;
-}
.ui-progressbar,
.progress {
background-color: #F7F7F7;
@@ -2009,6 +2052,7 @@ textarea:-moz-placeholder {/* for FF */
*padding-left:1.9em;
margin-top:5px;
}
+
/* repo-history */
#back {
margin-top:3px;
@@ -2431,9 +2475,6 @@ textarea:-moz-placeholder {/* for FF */
margin-left:64px;
}
/*file upload*/
-#upload-file-form {
- margin-top:10px;
-}
.files-add {
position: relative;
overflow: hidden;
@@ -2680,11 +2721,12 @@ textarea:-moz-placeholder {/* for FF */
#md-edit-help {
width:550px;
}
-#fileview-toolbar {
+/* for repo, file_view page. */
+#side-toolbar {
position:fixed;
right:0;
}
-.fileview-toolbar .item {
+.side-toolbar .item {
width:59px;
height:40px;
padding-top:18px;
@@ -2695,11 +2737,11 @@ textarea:-moz-placeholder {/* for FF */
border-right:0;
border-top:0;
}
-.fileview-toolbar .item:first-child {
+.side-toolbar .item:first-child {
border-top:1px solid #c0c0c0;
border-top-left-radius:3px;
}
-.fileview-toolbar .item:last-child {
+.side-toolbar .item:last-child {
border-bottom-left-radius:3px;
}
/* shareadmin & useradmin */
@@ -2715,43 +2757,13 @@ textarea:-moz-placeholder {/* for FF */
border:1px solid #ddd;
border-radius:2px;
}
-/*bottom bar*/
-#bottom-bar {
- position:fixed;
- bottom:0;
- right:10px;
- background:#fff;
- border-style:solid;
- border-width:1px;
- border-color:#f2f2f2 #cacaca #919191;
- border-top-left-radius:4px;
- border-top-right-radius:4px;
-}
-#discuss, #click-into-group {
- color:#424242;
- font-size:15px;
- line-height:21px;
- padding:3px 16px;
- border:none;
-}
-#discuss {
- padding-left: 42px;
- background-color:#fff;
- background-position: 16px -162px;
-}
-#click-into-group {
- background:#fff;
- border-left:1px solid #ebebeb;
-}
-#bottom-bar button:focus {
- outline:none;
-}
#to-group,
#discuss-to-group {
width:400px;
padding:0 15px;
position:fixed;
- right:10px;
+ right:0;
+ border-radius:5px 0 0 5px;
background:#fff;
border:1px solid #cbcbcb;
box-shadow: 0 2px 4px rgba(0,0,0,.2);
@@ -2775,22 +2787,38 @@ textarea:-moz-placeholder {/* for FF */
#discussions-to-grp .reply-input {
width:270px;
}
-#to-group-caret,
-#discuss-to-group-caret {
- width:28px;
- position:fixed;
-}
#to-group,
-#discuss-to-group,
-#to-group-caret,
-#discuss-to-group-caret {
+#discuss-to-group {
z-index:12; /* to be on top of 'fixed-hd' in repo.html*/
}
/*to-group*/
#to-group {
- min-width:100px;
width:auto;
- padding:6px 0;
+ min-width:250px;
+ padding:0 12px 10px;
+ right:78px;
+}
+#to-group .outer-caret {
+ position:absolute;
+ top: 15px;
+ right: -15px;
+}
+#to-group .outer-caret,
+#to-group .inner-caret {
+ border-color:transparent #cbcbcb;
+ border-right-width:0;
+}
+#to-group .inner-caret {
+ border-left-color:#fff;
+ top:-15px;
+ left:-16px;
+}
+#to-group ul {
+ padding-left: 20px;
+ list-style-type: disc;
+}
+#to-group a {
+ padding:1px 3px;
}
/*discuss to group*/
#discuss-to-group-form .checkbox-label {
diff --git a/media/img/close.png b/media/img/close.png
new file mode 100644
index 0000000000..5ac5f89882
Binary files /dev/null and b/media/img/close.png differ
diff --git a/media/img/minus.png b/media/img/minus.png
new file mode 100644
index 0000000000..923ee279f6
Binary files /dev/null and b/media/img/minus.png differ
diff --git a/media/js/jquery.fileupload.min.js b/media/js/jquery.fileupload.min.js
index 43ac78f8ca..913d9102c0 100644
--- a/media/js/jquery.fileupload.min.js
+++ b/media/js/jquery.fileupload.min.js
@@ -43,4 +43,30 @@
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","tmpl","load-image","./jquery.fileupload-fp"],factory);}else{factory(window.jQuery,window.tmpl,window.loadImage);}}(function($,tmpl,loadImage){var parentWidget=($.blueimpFP||$.blueimp).fileupload;$.widget("blueimpUI.fileupload",parentWidget,{options:{autoUpload:false,maxNumberOfFiles:undefined,maxFileSize:undefined,minFileSize:undefined,acceptFileTypes:/.+$/i,previewSourceFileTypes:/^image\/(gif|jpeg|png)$/,previewSourceMaxFileSize:5000000,previewMaxWidth:80,previewMaxHeight:80,previewAsCanvas:true,uploadTemplateId:"template-upload",downloadTemplateId:"template-download",filesContainer:undefined,prependFiles:false,dataType:"json",add:function(e,data){var that=$(this).data("fileupload"),options=that.options,files=data.files;$(this).fileupload("process",data).done(function(){that._adjustMaxNumberOfFiles(-files.length);data.isAdjusted=true;data.files.valid=data.isValidated=that._validate(files);data.context=that._renderUpload(files).data("data",data);options.filesContainer[options.prependFiles?"prepend":"append"](data.context);that._renderPreviews(files,data.context);that._forceReflow(data.context);that._transition(data.context).done(function(){if((that._trigger("added",e,data)!==false)&&(options.autoUpload||data.autoUpload)&&data.autoUpload!==false&&data.isValidated){data.submit();}});});},send:function(e,data){var that=$(this).data("fileupload");if(!data.isValidated){if(!data.isAdjusted){that._adjustMaxNumberOfFiles(-data.files.length);}if(!that._validate(data.files)){return false;}}if(data.context&&data.dataType&&data.dataType.substr(0,6)==="iframe"){data.context.find(".progress").addClass(!$.support.transition&&"progress-animated").find(".bar").css("width",parseInt(100,10)+"%");}return that._trigger("sent",e,data);},done:function(e,data){$(".saving-tip",$(this)).addClass("hide");var that=$(this).data("fileupload"),template;if(data.context){data.context.each(function(index){var file=($.isArray(data.result)&&data.result[index])||{error:"emptyResult"};file.size=data.files[index].size;if(file.error){file.error=data.result.error||"emptyResult";file.name=data.files[index].name;that._adjustMaxNumberOfFiles(1);}that._transition($(this)).done(function(){var node=$(this);template=that._renderDownload([file]).css("height",node.height()).replaceAll(node);that._forceReflow(template);that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data);});});});}else{template=that._renderDownload(data.result).appendTo(that.options.filesContainer);that._forceReflow(template);that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data);});}},fail:function(e,data){$(".saving-tip",$(this)).addClass("hide");var that=$(this).data("fileupload"),template;that._adjustMaxNumberOfFiles(data.files.length);if(data.context){data.context.each(function(index){if(data.errorThrown!=="abort"){var file=data.files[index];var r_error;if(data.jqXHR.responseText){try{r_error=$.parseJSON(data.jqXHR.responseText).error;}catch(e){r_error="";}}if(data.dataType=="iframe json"){data.errorThrown="";}file.error=r_error||file.error||data.errorThrown||"can not connect the file server";that._transition($(this)).done(function(){var node=$(this);template=that._renderDownload([file]).replaceAll(node);that._forceReflow(template);that._transition(template).done(function(){data.context=$(this);that._trigger("failed",e,data);});});}else{that._transition($(this)).done(function(){$(this).remove();that._trigger("failed",e,data);});}});}else{if(data.errorThrown!=="abort"){that._adjustMaxNumberOfFiles(-data.files.length);data.context=that._renderUpload(data.files).appendTo(that.options.filesContainer).data("data",data);that._forceReflow(data.context);that._transition(data.context).done(function(){data.context=$(this);that._trigger("failed",e,data);});}else{that._trigger("failed",e,data);}}},progress:function(e,data){if(data.context){data.context.find(".bar").css("width",parseInt(data.loaded/data.total*100,10)+"%");}},progressall:function(e,data){var $this=$(this);$this.find(".fileupload-progress").find(".bar").css("width",parseInt(data.loaded/data.total*100,10)+"%").end().find(".progress-extended").each(function(){$(this).html($this.data("fileupload")._renderExtendedProgress(data));});if(data.loaded>0&&data.loaded==data.total){$this.find(".saving-tip").removeClass("hide");}},start:function(e){var that=$(this).data("fileupload");that._transition($(this).find(".fileupload-progress")).done(function(){that._trigger("started",e);});},stop:function(e){var that=$(this).data("fileupload");that._transition($(this).find(".fileupload-progress")).done(function(){$(this).find(".bar").css("width","0%");$(this).find(".progress-extended").html(" ");that._trigger("stopped",e);});},destroy:function(e,data){var that=$(this).data("fileupload");if(data.url){$.ajax(data);}that._adjustMaxNumberOfFiles(1);that._transition(data.context).done(function(){$(this).remove();that._trigger("destroyed",e,data);});}},_enableDragToDesktop:function(){var link=$(this),url=link.prop("href"),name=link.prop("download"),type="application/octet-stream";link.bind("dragstart",function(e){try{e.originalEvent.dataTransfer.setData("DownloadURL",[type,name,url].join(":"));}catch(err){}});},_adjustMaxNumberOfFiles:function(operand){if(typeof this.options.maxNumberOfFiles==="number"){this.options.maxNumberOfFiles+=operand;if(this.options.maxNumberOfFiles<1){this._disableFileInputButton();}else{this._enableFileInputButton();}}},_formatFileSize:function(bytes){if(typeof bytes!=="number"){return"";}if(bytes>=1000000000){return(bytes/1000000000).toFixed(2)+" GB";}if(bytes>=1000000){return(bytes/1000000).toFixed(2)+" MB";}return(bytes/1000).toFixed(2)+" KB";},_formatBitrate:function(bits){if(typeof bits!=="number"){return"";}else{var Bs=bits/8;}if(Bs>=1000000000){return(Bs/1000000000).toFixed(2)+" GB/s";}if(Bs>=1000000){return(Bs/1000000).toFixed(2)+" MB/s";}if(Bs>=1000){return(Bs/1000).toFixed(2)+" KB/s";}return Bs+" B/s";},_formatTime:function(seconds){var date=new Date(seconds*1000),days=parseInt(seconds/86400,10);days=days?days+"d ":"";return days+("0"+date.getUTCHours()).slice(-2)+":"+("0"+date.getUTCMinutes()).slice(-2)+":"+("0"+date.getUTCSeconds()).slice(-2);},_formatPercentage:function(floatValue){return(floatValue*100).toFixed(2)+" %";},_renderExtendedProgress:function(data){return this._formatBitrate(data.bitrate)+" | "+this._formatTime((data.total-data.loaded)*8/data.bitrate)+" | "+this._formatPercentage(data.loaded/data.total)+" | "+this._formatFileSize(data.loaded)+" / "+this._formatFileSize(data.total);},_hasError:function(file){if(file.error){return file.error;}if(this.options.maxNumberOfFiles<0){return"maxNumberOfFiles";}if(!(this.options.acceptFileTypes.test(file.type)||this.options.acceptFileTypes.test(file.name))){return"acceptFileTypes";}if(this.options.maxFileSize&&file.size>this.options.maxFileSize){return"maxFileSize";}if(typeof file.size==="number"&&file.size{%=file.name%}
+ {%=file.name%}
{%=o.formatFileSize(file.size)%}
{%=locale.fileupload.error%} {%=locale.fileupload.errors[file.error] || file.error%}
{% } else if (o.files.valid && !i) { %}
-
+
{%=file.name%}
{%=o.formatFileSize(file.size)%}
{% if (!o.options.autoUpload) { %}
{% } %}
{% } else { %}
- {%=file.name%}
+ {%=file.name%}
{%=o.formatFileSize(file.size)%}
{% } %}
{% if (!i) { %}
{% } %}
@@ -43,14 +41,14 @@ def upload_js():
{% else %}
{% upload_js %}
{% endif %}
+{% endif %}
{% endblock %}
diff --git a/seahub/templates/snippets/bottom_bar.html b/seahub/templates/snippets/bottom_bar.html
index 84801ecd53..127a7100ab 100644
--- a/seahub/templates/snippets/bottom_bar.html
+++ b/seahub/templates/snippets/bottom_bar.html
@@ -1,17 +1,41 @@
{% load i18n %}
{% load url from future %}
-var Bottom_bar = '
+
-