Commit 64bec005 authored by Sergei Datsenko's avatar Sergei Datsenko Committed by Commit Bot

Move context menu item lower.

I have no idea what I'm doing but it seems to work as asked in
crbug.com/875409: move "create shortcut" item under "rename".

BUG=chromium:875409

Change-Id: Ibcb09378c932f1eceeab679b5144ef3cd5c7504b
Reviewed-on: https://chromium-review.googlesource.com/c/1341292
Commit-Queue: Sergei Datsenko <dats@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609575}
parent c51be489
...@@ -79,19 +79,6 @@ ActionsSubmenu.prototype.setActionsModel = function(actionsModel) { ...@@ -79,19 +79,6 @@ ActionsSubmenu.prototype.setActionsModel = function(actionsModel) {
util.queryDecoratedElement('#manage-in-drive', cr.ui.Command) util.queryDecoratedElement('#manage-in-drive', cr.ui.Command)
.canExecuteChange(); .canExecuteChange();
// Managing shortcuts is shown just before custom actions.
var createFolderShortcutAction = remainingActions[
ActionsModel.InternalActionId.CREATE_FOLDER_SHORTCUT];
if (createFolderShortcutAction) {
var menuItem = this.addMenuItem_({});
menuItem.command = '#create-folder-shortcut';
delete remainingActions[
ActionsModel.InternalActionId.CREATE_FOLDER_SHORTCUT
];
}
util.queryDecoratedElement(
'#create-folder-shortcut', cr.ui.Command).canExecuteChange();
// Removing shortcuts is not rendered in the submenu to keep the previous // Removing shortcuts is not rendered in the submenu to keep the previous
// behavior. Shortcuts can be removed in the left nav using the roots menu. // behavior. Shortcuts can be removed in the left nav using the roots menu.
// TODO(mtomasz): Consider rendering the menu item here for consistency. // TODO(mtomasz): Consider rendering the menu item here for consistency.
......
...@@ -11,8 +11,6 @@ document.write(` ...@@ -11,8 +11,6 @@ document.write(`
<command id="share" label="Share"></command> <command id="share" label="Share"></command>
<command id="manage-in-drive" i18n-values="Manage in Drive"></command> <command id="manage-in-drive" i18n-values="Manage in Drive"></command>
<command id="toggle-pinned" label="Toggle pinned"></command> <command id="toggle-pinned" label="Toggle pinned"></command>
<command id="create-folder-shortcut" label="Create folder shortcut">
</command>
<command id="remove-folder-shortcut" label="Remove folder shortcut"> <command id="remove-folder-shortcut" label="Remove folder shortcut">
</command> </command>
......
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
<hr visibleif="full-page"> <hr visibleif="full-page">
<cr-menu-item command="#get-info"></cr-menu-item> <cr-menu-item command="#get-info"></cr-menu-item>
<cr-menu-item command="#rename"></cr-menu-item> <cr-menu-item command="#rename"></cr-menu-item>
<cr-menu-item command="#create-folder-shortcut"></cr-menu-item>
<cr-menu-item command="#delete" i18n-content="DELETE_BUTTON_LABEL" <cr-menu-item command="#delete" i18n-content="DELETE_BUTTON_LABEL"
class="hide-on-toolbar"></cr-menu-item> class="hide-on-toolbar"></cr-menu-item>
<cr-menu-item command="#zip-selection"></cr-menu-item> <cr-menu-item command="#zip-selection"></cr-menu-item>
...@@ -234,13 +235,13 @@ ...@@ -234,13 +235,13 @@
<cr-menu id="directory-tree-context-menu" class="chrome-menu files-menu" <cr-menu id="directory-tree-context-menu" class="chrome-menu files-menu"
menu-item-selector="cr-menu-item,hr"> menu-item-selector="cr-menu-item,hr">
<cr-menu-item command="#create-folder-shortcut"></cr-menu-item>
<cr-menu-item command="#cut" visibleif="full-page"></cr-menu-item> <cr-menu-item command="#cut" visibleif="full-page"></cr-menu-item>
<cr-menu-item command="#copy" visibleif="full-page"></cr-menu-item> <cr-menu-item command="#copy" visibleif="full-page"></cr-menu-item>
<cr-menu-item command="#paste-into-folder" visibleif="full-page"></cr-menu-item> <cr-menu-item command="#paste-into-folder" visibleif="full-page"></cr-menu-item>
<cr-menu-item command="#share-with-linux"></cr-menu-item> <cr-menu-item command="#share-with-linux"></cr-menu-item>
<hr visibleif="full-page"> <hr visibleif="full-page">
<cr-menu-item command="#rename"></cr-menu-item> <cr-menu-item command="#rename"></cr-menu-item>
<cr-menu-item command="#create-folder-shortcut"></cr-menu-item>
<cr-menu-item command="#delete" i18n-content="DELETE_BUTTON_LABEL"></cr-menu-item> <cr-menu-item command="#delete" i18n-content="DELETE_BUTTON_LABEL"></cr-menu-item>
<hr visibleif="saveas-file full-page"> <hr visibleif="saveas-file full-page">
<cr-menu-item command="#new-folder" visibleif="saveas-file full-page"></cr-menu-item> <cr-menu-item command="#new-folder" visibleif="saveas-file full-page"></cr-menu-item>
......
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