1 |
d2a8c3fd
|
Marc NICOLAS
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
Ext.namespace('sitools.admin.quickstart');
|
21 |
|
|
|
22 |
|
|
Ext.define('sitools.admin.quickstart.QsProject', {
|
23 |
|
|
extend: 'Ext.panel.Panel',
|
24 |
|
|
widget: 'widget.qsProject',
|
25 |
|
|
|
26 |
|
|
forceLayout: true,
|
27 |
|
|
layout: {
|
28 |
|
|
type: "vbox",
|
29 |
|
|
align: 'center',
|
30 |
|
|
pack: 'start'
|
31 |
|
|
},
|
32 |
|
|
border: false,
|
33 |
|
|
bodyCls: 'quickStart',
|
34 |
|
|
|
35 |
|
|
initComponent: function () {
|
36 |
|
|
|
37 |
|
|
var title = Ext.create('Ext.form.Label', {
|
38 |
|
|
cls: 'qs-h1',
|
39 |
|
|
html: i18n.get('label.qsProjectTitle')
|
40 |
|
|
});
|
41 |
|
|
|
42 |
|
|
var desc = Ext.create('Ext.form.Label', {
|
43 |
|
|
cls: 'qs-div',
|
44 |
|
|
id: "start-desc",
|
45 |
|
|
html: i18n.get('label.qsProjectDesc')
|
46 |
|
|
});
|
47 |
|
|
|
48 |
|
|
var img = Ext.create('Ext.form.Label', {
|
49 |
|
|
html: '<img id="qs-projet" class="qs-image" src="/sitools/client-admin/res/html/quickStart/screenshots/projects.png"/>',
|
50 |
|
|
listeners: {
|
51 |
|
|
scope: this,
|
52 |
|
|
afterrender: function (img) {
|
53 |
|
|
Ext.get("qs-projet").on('load', function () {
|
54 |
|
|
|
55 |
|
|
img.getEl().alignTo("start-desc", "c-c");
|
56 |
|
|
|
57 |
|
|
var imgProjet = Ext.create('Ext.form.Label', {
|
58 |
|
|
html: '<img id="qs-projet-logo" class="bouton_action" src="/sitools/client-admin/res/html/quickStart/icons/project-logo.png"/>',
|
59 |
|
|
tooltip: new Ext.ToolTip({
|
60 |
|
|
html: "Open Project"
|
61 |
|
|
}),
|
62 |
|
|
listeners: {
|
63 |
|
|
scope: this,
|
64 |
|
|
afterrender: function (imgProjet) {
|
65 |
|
|
Ext.get("qs-projet-logo").on('load', function () {
|
66 |
|
|
|
67 |
|
|
imgProjet.getEl().on('mouseleave', function (e, t, o) {
|
68 |
|
|
Ext.get(t).update("<img id='qs-projet-logo' class='bouton_action' src='/sitools/client-admin/res/html/quickStart/icons/project-logo.png'/>");
|
69 |
|
|
});
|
70 |
|
|
imgProjet.getEl().on('mouseenter', function (e, t, o) {
|
71 |
|
|
Ext.get(t).update("<img id='qs-projet-logo' class='bouton_action' src='/sitools/client-admin/res/html/quickStart/icons/project-logo-hover.png'/>");
|
72 |
|
|
});
|
73 |
|
|
imgProjet.getEl().on('click', function (e, t, o) {
|
74 |
|
|
this.qs.openFeature("projectsNodeId");
|
75 |
|
|
}, this);
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
imgProjet.getEl().alignTo("qs-projet", "br-br", [50, 40]);
|
79 |
|
|
|
80 |
|
|
new Ext.ToolTip({
|
81 |
|
|
target: 'qs-projet-logo',
|
82 |
|
|
anchor: 'left',
|
83 |
|
|
autoShow: true,
|
84 |
|
|
showDelay: 0,
|
85 |
|
|
html: "<b>Open Project</b>"
|
86 |
|
|
});
|
87 |
|
|
|
88 |
|
|
}, this);
|
89 |
|
|
}
|
90 |
|
|
}
|
91 |
|
|
});
|
92 |
|
|
this.add(imgProjet);
|
93 |
|
|
|
94 |
|
|
}, this);
|
95 |
|
|
}
|
96 |
|
|
}
|
97 |
|
|
});
|
98 |
|
|
|
99 |
|
|
this.items = [title, desc, img];
|
100 |
|
|
this.callParent(arguments);
|
101 |
|
|
}
|
102 |
|
|
}); |