La timeline du portal » History » Version 1
Anonymous, 02/07/2012 17:46
1 | 1 | Anonymous | h1. La timeline du portal |
---|---|---|---|
2 | 1 | Anonymous | |
3 | 1 | Anonymous | La timeline est un plugin indépendant qui doit être accessible sur le server, actuellement : _/usr/local/Sitools2_Corot/workspace/client-public/timeline_v2.3.0_ |
4 | 1 | Anonymous | |
5 | 1 | Anonymous | Un onglet "timeline" spécifique a été créer dans le portal pour pouvoir afficher ou non cette timeline. |
6 | 1 | Anonymous | |
7 | 1 | Anonymous | Pour configurer les données affichées sur la timeline ainsi que les couleurs, éditer */usr/local/Sitools2_Corot/workspace/client-public/timeline_v2.3.0corot_timeline.xml* |
8 | 1 | Anonymous | |
9 | 1 | Anonymous | Le code extJS pour la timeline : Dans le fichier *portal.js* (_/usr/local/Sitools2_Corot/workspace/client-user/js/portal_) |
10 | 1 | Anonymous | |
11 | 1 | Anonymous | <pre><code class="javascript"> |
12 | 1 | Anonymous | |
13 | 1 | Anonymous | /*************************************************************************** ligne 270 |
14 | 1 | Anonymous | * Creation du portlet Timeline |
15 | 1 | Anonymous | */ |
16 | 1 | Anonymous | |
17 | 1 | Anonymous | var portlet_timeline = new Ext.ux.Portlet({ |
18 | 1 | Anonymous | layout : 'fit', |
19 | 1 | Anonymous | xtype : 'portal', |
20 | 1 | Anonymous | portalId : "idPortal", |
21 | 1 | Anonymous | id : ID.PORTLET.TIMELINE, |
22 | 1 | Anonymous | title : 'Timeline', |
23 | 1 | Anonymous | height : 300, |
24 | 1 | Anonymous | autoload: true, |
25 | 1 | Anonymous | triggerAction : 'all', |
26 | 1 | Anonymous | items : [ new Ext.ux.ManagedIFrame.Panel({ |
27 | 1 | Anonymous | defaultSrc : "res/html/" + LOCALE + "/timeline.html", |
28 | 1 | Anonymous | autoScroll : true |
29 | 1 | Anonymous | })] |
30 | 1 | Anonymous | }); |
31 | 1 | Anonymous | |
32 | 1 | Anonymous | [.............] |
33 | 1 | Anonymous | |
34 | 1 | Anonymous | |
35 | 1 | Anonymous | /*************************************************************************** ligne 370 |
36 | 1 | Anonymous | |
37 | 1 | Anonymous | items : [ { |
38 | 1 | Anonymous | region : 'north', |
39 | 1 | Anonymous | //id : 'portalId', |
40 | 1 | Anonymous | columnWidth : 1, |
41 | 1 | Anonymous | style : 'padding:10px 10px 10px 10px', // 10 0 10 10 MH 12dec |
42 | 1 | Anonymous | // baseCls : 'portalMainPanel', |
43 | 1 | Anonymous | items : [ portlet_timeline ] |
44 | 1 | Anonymous | }, |
45 | 1 | Anonymous | |
46 | 1 | Anonymous | |
47 | 1 | Anonymous | [..............] |
48 | 1 | Anonymous | |
49 | 1 | Anonymous | |
50 | 1 | Anonymous | /*************************************************************************** ligne 416 |
51 | 1 | Anonymous | |
52 | 1 | Anonymous | children : [ { |
53 | 1 | Anonymous | id : ID.PORTALTREENAV.TIMELINE, |
54 | 1 | Anonymous | panelId : ID.PORTLET.TIMELINE, |
55 | 1 | Anonymous | icon : 'res/images/icons/portlet.png', |
56 | 1 | Anonymous | text : 'Timeline', |
57 | 1 | Anonymous | leaf : true, |
58 | 1 | Anonymous | checked : true, |
59 | 1 | Anonymous | listeners : { |
60 | 1 | Anonymous | checkchange : function (node) { |
61 | 1 | Anonymous | if (!node.attributes.checked) { |
62 | 1 | Anonymous | Ext.get(node.attributes.panelId).hide(); |
63 | 1 | Anonymous | // Pour que le panel n'ait plus de place reservee |
64 | 1 | Anonymous | // dans le portal |
65 | 1 | Anonymous | Ext.get(node.attributes.panelId).addClass('x-hide-display'); |
66 | 1 | Anonymous | } else { |
67 | 1 | Anonymous | Ext.get(node.attributes.panelId).show(); |
68 | 1 | Anonymous | Ext.get(node.attributes.panelId).removeClass('x-hide-display'); |
69 | 1 | Anonymous | } |
70 | 1 | Anonymous | } |
71 | 1 | Anonymous | } |
72 | 1 | Anonymous | }, |
73 | 1 | Anonymous | |
74 | 1 | Anonymous | |
75 | 1 | Anonymous | |
76 | 1 | Anonymous | </code></pre> |
77 | 1 | Anonymous | |
78 | 1 | Anonymous | |
79 | 1 | Anonymous | |
80 | 1 | Anonymous | Dans le fichier *id.js* (_/usr/local/Sitools2_Corot/workspace/client-user/js_) : rajouter la ligne _TIMELINE : 'portletTimelineId'_ |
81 | 1 | Anonymous | |
82 | 1 | Anonymous | <pre><code class="javascript"> |
83 | 1 | Anonymous | |
84 | 1 | Anonymous | var ID = { |
85 | 1 | Anonymous | PANEL : { |
86 | 1 | Anonymous | MENU : 'menuPanelId', |
87 | 1 | Anonymous | TREE : 'treePanelId', |
88 | 1 | Anonymous | MAIN : 'mainPanelId', |
89 | 1 | Anonymous | HELP : 'helpPanelId' |
90 | 1 | Anonymous | }, |
91 | 1 | Anonymous | CMP : { |
92 | 1 | Anonymous | TOOLBAR : 'toolbarId', |
93 | 1 | Anonymous | MENU : 'menuId' |
94 | 1 | Anonymous | }, |
95 | 1 | Anonymous | WIN : { |
96 | 1 | Anonymous | LOGIN : 'loginWinId', |
97 | 1 | Anonymous | ORDER : 'orderWinId' |
98 | 1 | Anonymous | }, |
99 | 1 | Anonymous | BOX : { |
100 | 1 | Anonymous | REG : 'regBoxId', |
101 | 1 | Anonymous | USER : 'userBoxId', |
102 | 1 | Anonymous | GROUP : 'groupBoxId', |
103 | 1 | Anonymous | FIREWALL : 'firewallBoxId' |
104 | 1 | Anonymous | }, |
105 | 1 | Anonymous | PORTLET : { |
106 | 1 | Anonymous | PROJET : 'portletProjectId', |
107 | 1 | Anonymous | RECHERCHE : 'portletRecherceID', |
108 | 1 | Anonymous | FEEDS : 'portletFeedsId', |
109 | 1 | Anonymous | TIMELINE : 'portletTimelineId' |
110 | 1 | Anonymous | }, |
111 | 1 | Anonymous | PORTALTREENAV : { |
112 | 1 | Anonymous | PROJET : 'navProjectId', |
113 | 1 | Anonymous | RECHERCHE : 'navRechercheId', |
114 | 1 | Anonymous | FEEDS : 'navFeedsId', |
115 | 1 | Anonymous | TIMELINE : 'navTimelineId' |
116 | 1 | Anonymous | |
117 | 1 | Anonymous | } |
118 | 1 | Anonymous | }; |
119 | 1 | Anonymous | |
120 | 1 | Anonymous | </pre></code> |