PDA

View Full Version : Ext 4.0.7 Desktop problem



tramp
24 Apr 2012, 5:01 AM
Hello

I am a novice programmer and I want to adapt to my needs Desktop.

desktop.html my file looks like this:

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>desktop</title>


<link rel="stylesheet" type="text/css" href="../lib/ext4/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="css/desktop.css" />

<script type="text/javascript" src="../lib/ext4/ext-all-debug.js"></script>
<script type="text/javascript" src="App.js"></script>

<script type="text/javascript">
Ext.Loader.setConfig({enabled:true});
Ext.Loader.setPath({
'Ext.ux.desktop': 'js',
MyDesktop: ''
});


Ext.require('MyDesktop.App');


var myDesktopApp;
Ext.onReady(function () {
myDesktopApp = new MyDesktop.App();
});
</script>
</head>


<body>
</body>
</html>

and App.js



Ext.Loader.setConfig({enabled: true});
Ext.define('MyDesktop.App', {
extend: 'Ext.ux.desktop.App',
requires: [
'Ext.window.MessageBox',
'Ext.ux.desktop.ShortcutModel',
'MyDesktop.GridWindow'
],
init: function() {
this.callParent();
},
getModules : function(){
return [
new MyDesktop.GridWindow(),
];
},
getDesktopConfig: function () {
var me = this, ret = me.callParent();
return Ext.apply(ret, {
contextMenuItems: [
{ text: 'aaaaa', handler: me.onSettings, scope: me }
],
shortcuts: Ext.create('Ext.data.Store', {
model: 'Ext.ux.desktop.ShortcutModel',
data: [
{ name: 'test',
iconCls: 'grid-shortcut',
module: 'grid-win'
}
// ADD NEW SHORTCUTS
]
}),
wallpaper: 'wallpapers/Blue-Sencha.jpg',
wallpaperStretch: false
});
},
// config for the start menu
getStartConfig : function() {
var me = this, ret = me.callParent();


return Ext.apply(ret, {
title: 'TEST',
iconCls: 'user',
height: 300,
toolConfig: {
width: 100,
items: [
{
text:'Settings',
iconCls:'settings',
handler: me.onSettings,
scope: me
},
'-',
{
text:'Logout',
iconCls:'logout',
handler: me.onLogout,
scope: me
}
]
}
});
},
getTaskbarConfig: function () {
var ret = this.callParent();


return Ext.apply(ret, {
quickStart: [
// { name: 'Accordion Window', iconCls: 'accordion', module: 'acc-win' },
// { name: 'Grid Window', iconCls: 'icon-grid', module: 'grid-win' }
],
trayItems: [
{ xtype: 'trayclock', flex: 1 }
]
});
},
onLogout: function () {
Ext.Msg.confirm('logout', 'aaaaaaa?');
},
onSettings: function () {
var dlg = new MyDesktop.Settings({
desktop: this.desktop
});
dlg.show();
}
});


and now I do not know what I should do so I can add new icons.
How add empty icon with url : http://www.google.pl or index.html
From whatI read you have to create a new file, for example notepad.js and put what is to perform the file, however, as the exercise of such solutions are not working to measI want.
Pleasea simple example of how the files should look to put new icons, etc.

I greet
tramp

scottmartin
27 Apr 2012, 9:32 AM
Have you tried upgrading to 4.1 to see if this problem has been corrected?
http://www.sencha.com/blog/ext-js-4-1-final-released/

Regards,
Scott.