PDA

View Full Version : Web Desktop: How to have the shortcut without add it to start menu?



philance
27 Mar 2012, 7:14 PM
Bros,

Need your help. I am using the Web Desktop. I want to add a module as shortcut on the desktop of the Web Desktop, but I do not want it to appear in the start menu


requires: [
...
'TheDesktop.UserlistModule',
...
],
...
getModules : function(){
return [
new TheDesktop.UserlistModule()
];
},
...

shortcuts: Ext.create('Ext.data.Store', {
model: 'Ext.ux.TheApp.ShortcutModel',
data: [
{ name: 'User List', iconCls: 'userlist', module: 'userlist' }
]
}),

Please help.

vietits
27 Mar 2012, 7:56 PM
It seems that you have to modify the original source code of desktop/js/App.js to do that.


getStartConfig: function () {
var me = this, cfg = {
app: me,
menu: []
};


Ext.apply(cfg, me.startConfig);


Ext.each(me.modules, function (module) {
if (module.launcher) { // <- add your condition here
cfg.menu.push(module.launcher);
}
});

return cfg;
},