Commit 8446b8ae authored by asseldonk's avatar asseldonk
Browse files

filebrowser: insert paste item to option wheel in path bar

parent aa1af6cc
.parh-bar-icon{width:44px;text-align:center;border-right:2px solid #ddd}.parh-bar-icon>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.parh-bar-icon .dropdown-menu{margin-top:4px}.parh-bar-icon .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-flex-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;width:100%;height:36px}.file-path-bar>.bookmarks{width:44px;text-align:center;border-right:2px solid #ddd}.file-path-bar>.bookmarks>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.file-path-bar>.bookmarks .dropdown-menu{margin-top:4px}.file-path-bar>.bookmarks .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar>.options{width:44px;text-align:center;border-right:2px solid #ddd}.file-path-bar>.options>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.file-path-bar>.options .dropdown-menu{margin-top:4px}.file-path-bar>.options .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar>.path-list{position:relative;margin-left:15px;width:80%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left}.file-path-bar>.path-list>.path-bar-item+.path-bar-item:before{content:"/";padding:0 7px;text-align:left}.file-path-bar>.path-list>.path-bar-item{text-decoration:none}.file-path-bar>.path-list .glyphicon{display:inline}.file-path-bar>.path-list>.active{pointer-events:none;color:#333}
\ No newline at end of file
.path-bar-icon{width:44px;text-align:center;border-right:2px solid #ddd}.path-bar-icon>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.path-bar-icon .dropdown-menu{margin-top:4px}.path-bar-icon .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-flex-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;width:100%;height:36px}.file-path-bar>.bookmarks{width:44px;text-align:center;border-right:2px solid #ddd}.file-path-bar>.bookmarks>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.file-path-bar>.bookmarks .dropdown-menu{margin-top:4px}.file-path-bar>.bookmarks .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar>.options{width:44px;text-align:center;border-right:2px solid #ddd}.file-path-bar>.options:not(.show-item) .dropdown-menu .divider{display:none !important;visibility:hidden !important}.file-path-bar>.options:not(.show-item) .dropdown-menu .paste{display:none !important;visibility:hidden !important}.file-path-bar>.options>.dropdown-toggle{width:100%;cursor:pointer;padding:8px 14px 4px 14px}.file-path-bar>.options .dropdown-menu{margin-top:4px}.file-path-bar>.options .dropdown-menu .glyphicon{margin-right:10px}.file-path-bar>.path-list{position:relative;margin-left:15px;width:80%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left}.file-path-bar>.path-list>.path-bar-item+.path-bar-item:before{content:"/";padding:0 7px;text-align:left}.file-path-bar>.path-list>.path-bar-item{text-decoration:none}.file-path-bar>.path-list .glyphicon{display:inline}.file-path-bar>.path-list>.active{pointer-events:none;color:#333}
\ No newline at end of file
@gray-dark: lighten(#000, 20%);
@table-border-color: #ddd;
.parh-bar-icon {
.path-bar-icon {
width: 44px;
text-align: center;
border-right: 2px solid @table-border-color;
......@@ -32,10 +32,22 @@
width: 100%;
height: 36px;
> .bookmarks {
.parh-bar-icon;
.path-bar-icon;
}
> .options {
.parh-bar-icon;
&:not(.show-item) {
.dropdown-menu {
.divider {
display: none !important;
visibility: hidden !important;
}
.paste {
display: none !important;
visibility: hidden !important;
}
}
}
.path-bar-icon;
}
> .path-list {
position: relative;
......
......@@ -4,6 +4,8 @@
<ul role="menu" class="dropdown-menu">
<li class="new-folder"><a href="#"><i class="glyphicon glyphicon-folder-close"></i>New Folder</a></li>
<li class="new-file"><a href="#"><i class="glyphicon glyphicon-file"></i>New File</a></li>
<li class="divider"></li>
<li class="paste"><a href="#"><i class="glyphicon glyphicon-share-alt"></i>Paste</a></li>
</ul>
</div>
<div class="btn-group bookmarks hidden-sm hidden-xs"><span data-toggle="dropdown" class="dropdown-toggle"><i class="glyphicon glyphicon-bookmark"></i></span></div>
......
......@@ -11,6 +11,11 @@
a(href="#")
i.glyphicon.glyphicon-file
| New File
li.divider
li.paste
a(href="#")
i.glyphicon.glyphicon-share-alt
| Paste
.btn-group.bookmarks.hidden-sm.hidden-xs
span.dropdown-toggle(data-toggle="dropdown")
i.glyphicon.glyphicon-bookmark
......
......@@ -89,6 +89,14 @@ var PathBar = Class.extend({
$(".new-file", options).on(clicktype, function(event) {
self.createFile(event);
});
// show paste entry, if file/folder was copied or cut
options.on(clicktype, function() {
var cookie = $.cookie("vispaFile");
cookie ? options.toggleClass("show-item", true) : options.toggleClass("show-item", false);
});
$(".paste", options).on(clicktype, function() {
self.actions.paste();
});
},
createFolder: function() {
......
Markdown is supported
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