Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix #227 (duplicate menus)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Aug 23, 2013
1 parent 79ba3c2 commit 3b38383
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.fs/fsActions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<action name="create">
<gui text="154" title="155" src="folder_new.png" iconClass="icon-plus" accessKey="folder_access_key" hasAccessKey="true">
<context selection="false" dir="true" recycle="hidden" actionBar="true"
contextMenu="true" infoPanel="false" actionBarGroup="put" inZip="false"/>
contextMenu="false" infoPanel="false" actionBarGroup="put" inZip="false"/>
</gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
<subMenu>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Class.create("ActionsToolbar", {
dir:true,
actionBar:true,
actionBarGroup:'put',
contextMenu:true,
contextMenu:false,
infoPanel:false

}, {}, {}, {dynamicItems: submenuItems});
Expand Down
11 changes: 9 additions & 2 deletions core/src/plugins/gui.ajax/res/js/lib/prototype/proto.menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,17 @@ Proto.Menu = Class.create({
}).update(text)
);
}
var registeredKeys = $A();
this.options.menuItems.each(function(item) {


if(!item.separator){
var key = item.name;
if(registeredKeys.indexOf(key) !== -1) return;
registeredKeys.push(key);
}

var newItem = new Element('li', {className: item.separator ? 'separator' : ''});

if(item.moreActions){
var actionsContainer = new Element('div', {
className:'menuActions moreActions',
Expand Down

0 comments on commit 3b38383

Please sign in to comment.