add tags from drive
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
@import (once) '../../customize/src/less2/include/leftside-menu.less';
|
||||
@import (once) "../../customize/src/less2/include/tools.less";
|
||||
@import (once) "../../customize/src/less2/include/limit-bar.less";
|
||||
@import (once) "../../customize/src/less2/include/tokenfield.less";
|
||||
|
||||
.toolbar_main();
|
||||
.fileupload_main();
|
||||
.alertify_main();
|
||||
.limit-bar_main();
|
||||
.tokenfield_main();
|
||||
|
||||
@drive_hover: #eee;
|
||||
@drive_hover-light: lighten(@drive_hover, 20%);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<li><a tabindex="-1" data-icon="fa-trash" class="cp-app-drive-context-delete cp-app-drive-context-editable dropdown-item" data-localization="fc_delete">Delete</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-folder" class="cp-app-drive-context-newfolder cp-app-drive-context-editable dropdown-item" data-localization="fc_newfolder">New folder</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-database" class="cp-app-drive-context-properties dropdown-item" data-localization="fc_prop">Properties</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-hashtag" class="cp-app-drive-context-hashtag dropdown-item" data-localization="fc_hashtag">Tags</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="cp-app-drive-context-content" class="cp-app-drive-context dropdown cp-unselectable">
|
||||
@@ -43,6 +44,7 @@
|
||||
<li><a tabindex="-1" data-icon="fa-eye" class="cp-app-drive-context-openro dropdown-item" data-localization="fc_open_ro">Open (read-only)</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-trash" class="cp-app-drive-context-delete dropdown-item" data-localization="fc_delete">Delete</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-database" class="cp-app-drive-context-properties dropdown-item" data-localization="fc_prop">Properties</a></li>
|
||||
<li><a tabindex="-1" data-icon="fa-hashtag" class="cp-app-drive-context-hashtag dropdown-item" data-localization="fc_hashtag">Tags</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="cp-app-drive-context-trashtree" class="cp-app-drive-context dropdown cp-unselectable">
|
||||
|
||||
@@ -663,6 +663,7 @@ define([
|
||||
hasFolder = true;
|
||||
hide.push($menu.find('a.cp-app-drive-context-openro'));
|
||||
hide.push($menu.find('a.cp-app-drive-context-properties'));
|
||||
hide.push($menu.find('a.cp-app-drive-context-hashtag'));
|
||||
}
|
||||
// If we're in the trash, hide restore and properties for non-root elements
|
||||
if ($menu.find('a.cp-app-drive-context-restore').length && path && path.length > 4) {
|
||||
@@ -2567,6 +2568,14 @@ define([
|
||||
Cryptpad.alert($prop[0], undefined, true);
|
||||
});
|
||||
}
|
||||
else if ($(this).hasClass("cp-app-drive-context-hashtag")) {
|
||||
if (paths.length !== 1) { return; }
|
||||
var el = filesOp.find(paths[0].path);
|
||||
var data = filesOp.getFileData(el);
|
||||
if (!data) { return void console.error("Expected to find a file"); }
|
||||
var href = data.href;
|
||||
common.updateTags(href);
|
||||
}
|
||||
APP.hideMenu();
|
||||
});
|
||||
|
||||
@@ -2618,6 +2627,14 @@ define([
|
||||
Cryptpad.alert($prop[0], undefined, true);
|
||||
});
|
||||
}
|
||||
else if ($(this).hasClass("cp-app-drive-context-hashtag")) {
|
||||
if (paths.length !== 1) { return; }
|
||||
var el = filesOp.find(paths[0].path);
|
||||
var data = filesOp.getFileData(el);
|
||||
if (!data) { return void console.error("Expected to find a file"); }
|
||||
var href = data.href;
|
||||
common.updateTags(href);
|
||||
}
|
||||
APP.hideMenu();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user