diff --git a/lib/client/menu.js b/lib/client/menu.js index a9aecb72..0b4e6e19 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -19,8 +19,17 @@ CloudCommander.Menu.getConfig = (function(){ selector: 'li', // define the elements of the menu items: { - foo: {name: "View", callback: function(key, opt){ CloudCommander.Viewer();}}, - bar: {name: "Edit", callback: function(key, opt){ CloudCommander.Editor();}} + foo: {name: "View", callback: function(key, opt){ + if(typeof CloudCommander.Viewer === 'function') + CloudCommander.Viewer(); + else CloudCommander.Viewer.show(); + }}, + bar: {name: "Edit", callback: function(key, opt){ + if(typeof CloudCommander.Editor === 'function') + CloudCommander.Editor(); + else CloudCommander.Editor.show(); + + }} } // there's more, have a look at the demos and docs... };