added editor and viewer commands

This commit is contained in:
coderaiser 2012-08-14 16:19:39 +03:00
parent 483a6dc61c
commit 5714189b0a

View file

@ -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...
};