Commit b9fac4d2 authored by Fabian Heidemann's avatar Fabian Heidemann
Browse files

Bookmarks: fix#2022

parent 775f8886
.path-bar-icon{width:44px;border-right:2px solid #ddd}.path-bar-icon .dropdown-toggle{webkit-box-shadow:none !important;box-shadow:none !important;width:44px;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>.options{width:44px;border-right:2px solid #ddd}.file-path-bar>.options .dropdown-menu .createFolder,.file-path-bar>.options .dropdown-menu .createFile,.file-path-bar>.options .dropdown-menu .upload,.file-path-bar>.options .dropdown-menu .paste,.file-path-bar>.options .dropdown-menu .openFolder,.file-path-bar>.options .dropdown-menu .openFile,.file-path-bar>.options .dropdown-menu .rename,.file-path-bar>.options .dropdown-menu .copy,.file-path-bar>.options .dropdown-menu .cut,.file-path-bar>.options .dropdown-menu .remove,.file-path-bar>.options .dropdown-menu .download,.file-path-bar>.options .dropdown-menu .compress,.file-path-bar>.options .dropdown-menu .divider,.file-path-bar>.options .dropdown-menu .info{display:none;visibility:hidden}.file-path-bar>.options.menu-no-selection .dropdown-menu .createFolder,.file-path-bar>.options.menu-no-selection .dropdown-menu .createFile,.file-path-bar>.options.menu-no-selection .dropdown-menu .upload{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-no-selection.menu-paste .dropdown-menu .paste{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection .dropdown-menu .rename,.file-path-bar>.options.menu-single-selection .dropdown-menu .copy,.file-path-bar>.options.menu-single-selection .dropdown-menu .cut,.file-path-bar>.options.menu-single-selection .dropdown-menu .remove,.file-path-bar>.options.menu-single-selection .dropdown-menu .download,.file-path-bar>.options.menu-single-selection .dropdown-menu .compress,.file-path-bar>.options.menu-single-selection .dropdown-menu .info{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection .dropdown-menu .divider{display:block !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection.menu-open-folder .dropdown-menu .openFolder{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection.menu-open-file .dropdown-menu .openFile{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-multiple-selection .dropdown-menu .copy,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .cut,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .remove,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .download,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .compress,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .info{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-multiple-selection .dropdown-menu .divider{display:block !important;visibility:visible !important}.file-path-bar>.options .dropdown-toggle{webkit-box-shadow:none !important;box-shadow:none !important;width:44px;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>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark:hover>i{color:#333}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-symbol{color:#333}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-symbol:hover{color:#000 !important}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-name{margin-right:10px;display:inline-block;max-width:80%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname{margin-right:10px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset;color:#555;transition:border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname::-webkit-input-placeholder{color:#999}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:-moz-placeholder{color:#999;opacity:1}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname::-moz-placeholder{color:#999;opacity:1}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:-ms-input-placeholder{color:#999}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-edit{color:#fff}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-edit:hover{color:#000 !important}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-remove{color:#fff}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-remove:hover{color:#000 !important}.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;border-right:2px solid #ddd}.path-bar-icon .dropdown-toggle{webkit-box-shadow:none !important;box-shadow:none !important;width:44px;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>.options{width:44px;border-right:2px solid #ddd}.file-path-bar>.options .dropdown-menu .createFolder,.file-path-bar>.options .dropdown-menu .createFile,.file-path-bar>.options .dropdown-menu .upload,.file-path-bar>.options .dropdown-menu .paste,.file-path-bar>.options .dropdown-menu .openFolder,.file-path-bar>.options .dropdown-menu .openFile,.file-path-bar>.options .dropdown-menu .rename,.file-path-bar>.options .dropdown-menu .copy,.file-path-bar>.options .dropdown-menu .cut,.file-path-bar>.options .dropdown-menu .remove,.file-path-bar>.options .dropdown-menu .download,.file-path-bar>.options .dropdown-menu .compress,.file-path-bar>.options .dropdown-menu .divider,.file-path-bar>.options .dropdown-menu .info{display:none;visibility:hidden}.file-path-bar>.options.menu-no-selection .dropdown-menu .createFolder,.file-path-bar>.options.menu-no-selection .dropdown-menu .createFile,.file-path-bar>.options.menu-no-selection .dropdown-menu .upload{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-no-selection.menu-paste .dropdown-menu .paste{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection .dropdown-menu .rename,.file-path-bar>.options.menu-single-selection .dropdown-menu .copy,.file-path-bar>.options.menu-single-selection .dropdown-menu .cut,.file-path-bar>.options.menu-single-selection .dropdown-menu .remove,.file-path-bar>.options.menu-single-selection .dropdown-menu .download,.file-path-bar>.options.menu-single-selection .dropdown-menu .compress,.file-path-bar>.options.menu-single-selection .dropdown-menu .info{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection .dropdown-menu .divider{display:block !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection.menu-open-folder .dropdown-menu .openFolder{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-single-selection.menu-open-file .dropdown-menu .openFile{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-multiple-selection .dropdown-menu .copy,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .cut,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .remove,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .download,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .compress,.file-path-bar>.options.menu-multiple-selection .dropdown-menu .info{display:inline !important;visibility:visible !important}.file-path-bar>.options.menu-multiple-selection .dropdown-menu .divider{display:block !important;visibility:visible !important}.file-path-bar>.options .dropdown-toggle{webkit-box-shadow:none !important;box-shadow:none !important;width:44px;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>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark{padding:3px 20px;display:block;white-space:nowrap}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark:hover{background-color:#f5f5f5;cursor:pointer}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark:hover>i{color:#333}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-symbol{color:#333}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-symbol:hover{color:#000 !important}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-name{margin-right:10px;display:inline-block;max-width:80%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname{margin-right:10px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset;color:#555;transition:border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname::-webkit-input-placeholder{color:#999}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:-moz-placeholder{color:#999;opacity:1}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname::-moz-placeholder{color:#999;opacity:1}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.input-bookmarkname:-ms-input-placeholder{color:#999}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-edit{color:#fff}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-edit:hover{color:#000 !important}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-remove{color:#fff}.file-path-bar>.bookmark-dropdown>.bookmark-container>.bookmarks>.bookmark>.bookmark-glyphicon-remove:hover{color:#000 !important}.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}/*# sourceMappingURL=pathbar.css.map */
\ No newline at end of file
......@@ -2,6 +2,7 @@
@gray: lighten(#000, 33.5%); // #555
@table-border-color: #ddd;
@body-bg: #fff;
@dropdown-link-hover-bg: #f5f5f5;
@gray-base: #000;
@border-radius-base: 4px;
......@@ -125,7 +126,12 @@
> .bookmark-container {
> .bookmarks {
> .bookmark {
padding: 3px 20px;
display: block;
white-space: nowrap;
&:hover{
background-color: @dropdown-link-hover-bg;
cursor: pointer;
> i {
color: @gray-dark;
}
......
......@@ -22,7 +22,9 @@
<ul role="menu" class="dropdown-menu bookmark-container">
<li class="bookmark-button"><a href="#"><i class="glyphicon glyphicon-plus"></i>Add bookmark</a></li>
<li class="divider"></li>
<li class="bookmarks sortable"><a href="#" data-bind="bookmark" class="bookmark"><i title="Edit symbol" class="bookmark-glyphicon-symbol"><i data-bind="bookmark-glyphicon"></i></i><span data-bind="bookmark-name" class="bookmark-name"></span><i title="Edit bookmark" class="bookmark-glyphicon-edit"><i class="glyphicon glyphicon-pencil"></i></i><i title="Edit bookmark" class="bookmark-glyphicon-remove"><i class="glyphicon glyphicon-remove"></i></i></a></li>
<li class="bookmarks sortable">
<div href="#" data-bind="bookmark" class="bookmark"><i title="Edit symbol" class="bookmark-glyphicon-symbol"><i data-bind="bookmark-glyphicon"></i></i><span data-bind="bookmark-name" class="bookmark-name"></span><i title="Edit bookmark" class="bookmark-glyphicon-edit"><i class="glyphicon glyphicon-pencil"></i></i><i title="Edit bookmark" class="bookmark-glyphicon-remove"><i class="glyphicon glyphicon-remove"></i></i></div>
</li>
</ul>
</div>
<div class="path-list"><a href="#" data-bind="pathPart" class="path-bar-item"></a></div>
......
......@@ -66,7 +66,7 @@
| Add bookmark
li.divider
li.bookmarks.sortable
a.bookmark(href="#", data-bind="bookmark")
.bookmark(href="#", data-bind="bookmark")
i.bookmark-glyphicon-symbol(title="Edit symbol")
i(data-bind="bookmark-glyphicon")
span.bookmark-name(data-bind="bookmark-name")
......
......@@ -152,6 +152,7 @@ var Bookmark = Class.extend({
// click on bookmark self
$(node).off();
$(node).on(clicktype, function() {
$("input", self.container).blur();
self.FileBase.workflow.path = self.paths[index];
self.FileBase.updateView();
});
......@@ -306,6 +307,16 @@ var Bookmark = Class.extend({
replaceWith.on(clicktype, function(event) {
event.stopPropagation();
});
// disable link and edit glyph
$($(".bookmark", self.container)[index]).off();
$($(".bookmark", self.container)[index]).on(clicktype, function(event){
event.stopPropagation();
replaceWith.blur();
});
$($(".bookmark-glyphicon-edit", self.container)[index]).off();
$($(".bookmark-glyphicon-edit", self.container)[index]).on( clicktype, function(event){
event.stopPropagation();
});
// rename on blur
replaceWith.blur(function(event) {
......@@ -334,7 +345,7 @@ var Bookmark = Class.extend({
}
replaceWith.remove();
bookmark.show();
self.setup();
self.setContent();
});
// rename when pressing enter
replaceWith.keypress(function(event) {
......
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