Commit c18fa2aa authored by Fabian-Andree Heidemann's avatar Fabian-Andree Heidemann
Browse files

[file] fix #2274, make folder operations visible in any context menu

parent 36dba9c0
.file-rightclickmenu-itemhide{display:none;visibility:hidden}
.file-rightclickmenu-itemshow{display:block;visibility:visible}
.file-content{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;position:absolute;height:100%;bottom:0;right:0;top:0;left:0;overflow:hidden}
.file-content{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;position:absolute;height:100%;bottom:0;right:0;top:0;left:0;overflow:hidden}
.file-content>.alert{position:absolute;top:40px;width:100%}
.upload-progress-container{width:100%;position:absolute;bottom:0;padding:6px 12px;max-height:25%;overflow-x:hidden;overflow-y:auto;background-color:#fff;border-top:#ddd 1px solid}
.upload-progress-container>.progress-row{margin-bottom:-15px}
......@@ -13,14 +13,14 @@
.fileselector .file-path-bar{position:absolute;top:3px}
.file-rightclickmenu{position:absolute}
.file-rightclickmenu .fa,.file-rightclickmenu .glyphicon{margin:0 10px 0 0!important}
.file-rightclickmenu.filemenu .compress,.file-rightclickmenu.filemenu .copy,.file-rightclickmenu.filemenu .cut,.file-rightclickmenu.filemenu .divider,.file-rightclickmenu.filemenu .download,.file-rightclickmenu.filemenu .info,.file-rightclickmenu.filemenu .openFile,.file-rightclickmenu.filemenu .remove,.file-rightclickmenu.filemenu .rename{display:block;visibility:visible}
.file-rightclickmenu.filemenu .createFile,.file-rightclickmenu.filemenu .createFolder,.file-rightclickmenu.filemenu .openFolder,.file-rightclickmenu.filemenu .openFolderInNewTab,.file-rightclickmenu.filemenu .paste,.file-rightclickmenu.filemenu .upload{display:none;visibility:hidden}
.file-rightclickmenu.foldermenu .compress,.file-rightclickmenu.foldermenu .copy,.file-rightclickmenu.foldermenu .cut,.file-rightclickmenu.foldermenu .divider,.file-rightclickmenu.foldermenu .info,.file-rightclickmenu.foldermenu .openFolder,.file-rightclickmenu.foldermenu .openFolderInNewTab,.file-rightclickmenu.foldermenu .remove,.file-rightclickmenu.foldermenu .rename{display:block;visibility:visible}
.file-rightclickmenu.foldermenu .createFile,.file-rightclickmenu.foldermenu .createFolder,.file-rightclickmenu.foldermenu .download,.file-rightclickmenu.foldermenu .openFile,.file-rightclickmenu.foldermenu .paste,.file-rightclickmenu.foldermenu .upload{display:none;visibility:hidden}
.file-rightclickmenu.filemenu .compress,.file-rightclickmenu.filemenu .copy,.file-rightclickmenu.filemenu .createFile,.file-rightclickmenu.filemenu .createFolder,.file-rightclickmenu.filemenu .cut,.file-rightclickmenu.filemenu .divider1,.file-rightclickmenu.filemenu .divider2,.file-rightclickmenu.filemenu .download,.file-rightclickmenu.filemenu .info,.file-rightclickmenu.filemenu .openFile,.file-rightclickmenu.filemenu .remove,.file-rightclickmenu.filemenu .rename,.file-rightclickmenu.filemenu .upload{display:block;visibility:visible}
.file-rightclickmenu.filemenu .openFolder,.file-rightclickmenu.filemenu .openFolderInNewTab{display:none;visibility:hidden}
.file-rightclickmenu.foldermenu .compress,.file-rightclickmenu.foldermenu .copy,.file-rightclickmenu.foldermenu .createFile,.file-rightclickmenu.foldermenu .createFolder,.file-rightclickmenu.foldermenu .cut,.file-rightclickmenu.foldermenu .divider1,.file-rightclickmenu.foldermenu .divider2,.file-rightclickmenu.foldermenu .info,.file-rightclickmenu.foldermenu .openFolder,.file-rightclickmenu.foldermenu .openFolderInNewTab,.file-rightclickmenu.foldermenu .remove,.file-rightclickmenu.foldermenu .rename,.file-rightclickmenu.foldermenu .upload{display:block;visibility:visible}
.file-rightclickmenu.foldermenu .openFile .download{display:none;visibility:hidden}
.file-rightclickmenu.bkgmenu .createFile,.file-rightclickmenu.bkgmenu .createFolder,.file-rightclickmenu.bkgmenu .upload{display:block;visibility:visible}
.file-rightclickmenu.bkgmenu .compress,.file-rightclickmenu.bkgmenu .copy,.file-rightclickmenu.bkgmenu .cut,.file-rightclickmenu.bkgmenu .download,.file-rightclickmenu.bkgmenu .info,.file-rightclickmenu.bkgmenu .openFile,.file-rightclickmenu.bkgmenu .openFolder,.file-rightclickmenu.bkgmenu .openFolderInNewTab,.file-rightclickmenu.bkgmenu .remove,.file-rightclickmenu.bkgmenu .rename{display:none;visibility:hidden}
.file-rightclickmenu.selectionmenu .compress,.file-rightclickmenu.selectionmenu .copy,.file-rightclickmenu.selectionmenu .cut,.file-rightclickmenu.selectionmenu .divider,.file-rightclickmenu.selectionmenu .info,.file-rightclickmenu.selectionmenu .remove{display:block;visibility:visible}
.file-rightclickmenu.selectionmenu .createFile,.file-rightclickmenu.selectionmenu .createFolder,.file-rightclickmenu.selectionmenu .download,.file-rightclickmenu.selectionmenu .openFile,.file-rightclickmenu.selectionmenu .openFolder,.file-rightclickmenu.selectionmenu .openFolderInNewTab,.file-rightclickmenu.selectionmenu .paste,.file-rightclickmenu.selectionmenu .rename,.file-rightclickmenu.selectionmenu .upload{display:none;visibility:hidden}
.file-rightclickmenu.bkgmenu .compress,.file-rightclickmenu.bkgmenu .copy,.file-rightclickmenu.bkgmenu .cut,.file-rightclickmenu.bkgmenu .divider1,.file-rightclickmenu.bkgmenu .download,.file-rightclickmenu.bkgmenu .info,.file-rightclickmenu.bkgmenu .openFile,.file-rightclickmenu.bkgmenu .openFolder,.file-rightclickmenu.bkgmenu .openFolderInNewTab,.file-rightclickmenu.bkgmenu .remove,.file-rightclickmenu.bkgmenu .rename{display:none;visibility:hidden}
.file-rightclickmenu.selectionmenu .compress,.file-rightclickmenu.selectionmenu .copy,.file-rightclickmenu.selectionmenu .createFile,.file-rightclickmenu.selectionmenu .createFolder,.file-rightclickmenu.selectionmenu .cut,.file-rightclickmenu.selectionmenu .divider1,.file-rightclickmenu.selectionmenu .divider2,.file-rightclickmenu.selectionmenu .info,.file-rightclickmenu.selectionmenu .remove,.file-rightclickmenu.selectionmenu .upload{display:block;visibility:visible}
.file-rightclickmenu.selectionmenu .download,.file-rightclickmenu.selectionmenu .openFile,.file-rightclickmenu.selectionmenu .openFolder,.file-rightclickmenu.selectionmenu .openFolderInNewTab,.file-rightclickmenu.selectionmenu .rename{display:none;visibility:hidden}
.table-info-dialog>tbody>tr>td{border:none;border:0}
.table-info-dialog-width{width:114px}
.table-info-dialog{overflow:hidden;table-layout:fixed;word-wrap:break-word}
......
......@@ -94,18 +94,18 @@
margin: 0 10px 0 0 !important;
}
&.filemenu {
.openFile, .rename, .copy, .cut, .remove, .download, .compress, .divider, .info {
.openFile, .rename, .copy, .cut, .remove, .download, .compress, .divider1, .createFile, .createFolder, .upload, .divider2, .info {
.file-rightclickmenu-itemshow;
}
.openFolder, .openFolderInNewTab, .createFile, .createFolder, .upload, .paste {
.openFolder, .openFolderInNewTab {
.file-rightclickmenu-itemhide;
}
}
&.foldermenu {
.openFolder, .openFolderInNewTab, .rename, .copy, .cut, .remove, .compress, .divider, .info {
.openFolder, .openFolderInNewTab, .rename, .copy, .cut, .remove, .compress, .divider1, .createFile, .createFolder, .upload, .divider2, .info {
.file-rightclickmenu-itemshow;
}
.openFile, .createFile, .createFolder, .download, .upload, .paste {
.openFile .download {
.file-rightclickmenu-itemhide;
}
}
......@@ -113,15 +113,15 @@
.createFile, .createFolder, .upload {
.file-rightclickmenu-itemshow;
}
.openFile, .openFolder, .openFolderInNewTab, .rename, .copy, .cut, .remove, .compress, .info, .download {
.openFile, .openFolder, .openFolderInNewTab, .rename, .copy, .cut, .remove, .download, .compress, .divider1, .info {
.file-rightclickmenu-itemhide;
}
}
&.selectionmenu {
.copy, .cut, .remove, .compress, .divider, .info {
.copy, .cut, .remove, .compress, .divider1, .createFile, .createFolder, .upload, .divider2, .info {
.file-rightclickmenu-itemshow;
}
.download, .openFile, .openFolder, .openFolderInNewTab, .rename, .createFile, .createFolder, .upload, .paste {
.download, .openFile, .openFolder, .openFolderInNewTab, .rename {
.file-rightclickmenu-itemhide;
}
}
......
......@@ -10,10 +10,11 @@
<li class="remove"><a href="#" tabindex="7"><i class="glyphicon glyphicon-remove"></i>Remove</a></li>
<li class="download"><a href="#" tabindex="8"><i class="glyphicon glyphicon-download"></i>Download</a></li>
<li class="compress"><a href="#" tabindex="9"><i class="fa fa-compress"></i>Compress</a></li>
<li class="divider divider1"></li>
<li class="createFolder"><a href="#" tabindex="10"><i class="glyphicon glyphicon-folder-close"></i>New Folder</a></li>
<li class="createFile"><a href="#" tabindex="11"><i class="glyphicon glyphicon-file"></i>New File</a></li>
<li class="upload"><a href="#" tabindex="12"><i class="glyphicon glyphicon-upload"></i>Upload</a></li>
<li class="divider"></li>
<li class="divider divider2"></li>
<li class="paste"><a href="#" tabindex="13"><i class="glyphicon glyphicon-share-alt"></i>Paste</a></li>
<li class="info"><a href="#" tabindex="14"><i class="glyphicon glyphicon-info-sign"></i>Info</a></li>
</ul>
......
......@@ -37,6 +37,7 @@
a(href="#", tabindex=9)
i.fa.fa-compress
| Compress
li.divider.divider1
li.createFolder
a(href="#", tabindex=10)
i.glyphicon.glyphicon-folder-close
......@@ -49,7 +50,7 @@
a(href="#", tabindex=12)
i.glyphicon.glyphicon-upload
| Upload
li.divider
li.divider.divider2
li.paste
a(href="#", tabindex=13)
i.glyphicon.glyphicon-share-alt
......
......@@ -119,6 +119,7 @@ define(["jquery", "jclass"], function($, JClass) {
this.menu.toggleClass("foldermenu", false);
this.menu.toggleClass("bkgmenu", false);
this.menu.toggleClass("selectionmenu", false);
this.togglePasteItem();
},
makeFolderMenu: function() {
......@@ -126,6 +127,7 @@ define(["jquery", "jclass"], function($, JClass) {
this.menu.toggleClass("foldermenu", true);
this.menu.toggleClass("bkgmenu", false);
this.menu.toggleClass("selectionmenu", false);
this.togglePasteItem();
},
makeBkgMenu: function() {
......@@ -133,17 +135,13 @@ define(["jquery", "jclass"], function($, JClass) {
this.menu.toggleClass("foldermenu", false);
this.menu.toggleClass("bkgmenu", true);
this.menu.toggleClass("selectionmenu", false);
var cookie = $.cookie("vispaFile");
if (cookie) {
$(".divider", this.menu).toggleClass("file-rightclickmenu-itemshow", true);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemshow", true);
$(".divider", this.menu).toggleClass("file-rightclickmenu-itemhide", false);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemhide", false);
this.togglePasteItem();
if ($.cookie("vispaFile")) {
$(".divider2", this.menu).toggleClass("file-rightclickmenu-itemshow", true);
$(".divider2", this.menu).toggleClass("file-rightclickmenu-itemhide", false);
} else {
$(".divider", this.menu).toggleClass("file-rightclickmenu-itemshow", false);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemshow", false);
$(".divider", this.menu).toggleClass("file-rightclickmenu-itemhide", true);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemhide", true);
$(".divider2", this.menu).toggleClass("file-rightclickmenu-itemshow", false);
$(".divider2", this.menu).toggleClass("file-rightclickmenu-itemhide", true);
}
},
......@@ -152,6 +150,17 @@ define(["jquery", "jclass"], function($, JClass) {
this.menu.toggleClass("foldermenu", false);
this.menu.toggleClass("bkgmenu", false);
this.menu.toggleClass("selectionmenu", true);
this.togglePasteItem();
},
togglePasteItem: function() {
if ($.cookie("vispaFile")) {
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemshow", true);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemhide", false);
} else {
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemshow", false);
$(".paste", this.menu).toggleClass("file-rightclickmenu-itemhide", true);
}
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment