Diffstat (limited to 'frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js b/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js new file mode 100644 index 0000000..a98f041 --- a/dev/null +++ b/frontend/gamma/tests/tests/Components/GridLayout/TestPageComponent.js | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz's Javascript Crypto Library. | ||
6 | Javascript Crypto Library provides web developers with an extensive | ||
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | ||
11 | refer to http://www.clipperz.com | ||
12 | |||
13 | * Javascript Crypto Library is free software: you can redistribute | ||
14 | it and/or modify it under the terms of the GNU Affero General Public | ||
15 | License as published by the Free Software Foundation, either version | ||
16 | 3 of the License, or (at your option) any later version. | ||
17 | |||
18 | * Javascript Crypto Library is distributed in the hope that it will | ||
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | See the GNU Affero General Public License for more details. | ||
22 | |||
23 | * You should have received a copy of the GNU Affero General Public | ||
24 | License along with Javascript Crypto Library. If not, see | ||
25 | <http://www.gnu.org/licenses/>. | ||
26 | |||
27 | */ | ||
28 | |||
29 | Clipperz.Base.module('Clipperz.Tests.GridLayout'); | ||
30 | |||
31 | Clipperz.Tests.GridLayout.TestPageComponent = function(args) { | ||
32 | args = args || {}; | ||
33 | Clipperz.Tests.GridLayout.TestPageComponent.superclass.constructor.call(this, args); | ||
34 | |||
35 | this._element = args.element || null; | ||
36 | |||
37 | this._slots = { | ||
38 | 'cardList' : this.getId('cardList'), | ||
39 | 'cardGrid' : this.getId('cardGrid') | ||
40 | }; | ||
41 | |||
42 | this.render(); | ||
43 | |||
44 | |||
45 | return this; | ||
46 | } | ||
47 | |||
48 | //============================================================================= | ||
49 | |||
50 | Clipperz.Base.extend(Clipperz.Tests.GridLayout.TestPageComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | ||
51 | |||
52 | //------------------------------------------------------------------------- | ||
53 | |||
54 | 'toString': function () { | ||
55 | return "Clipperz.Tests.GridLayout.TestPageComponent component"; | ||
56 | }, | ||
57 | |||
58 | //------------------------------------------------------------------------- | ||
59 | |||
60 | 'renderSelf': function(/*aContainer, aPosition*/) { | ||
61 | this.append(this.element(), [ | ||
62 | {tag:'ul', cls:'testTabs', style:'', children:[ | ||
63 | {tag:'li', id:this.getId('list'), children:[{tag:'span', html:'list'}]}, | ||
64 | {tag:'li', id:this.getId('grid'), children:[{tag:'span', html:'grid'}]} | ||
65 | ]}, | ||
66 | {tag:'ul', cls:'testPanels', children:[ | ||
67 | {tag:'li', id:this.getId('listPanel'), children:[ | ||
68 | {tag:'div', /*id:this.getId('mainPanels'),*/ cls:'mainPanels', children:[ | ||
69 | {tag:'div', id:this.getId('cardList'), cls:'gridComponent cardGrid'} | ||
70 | ]} | ||
71 | ]}, | ||
72 | {tag:'li', id:this.getId('gridPanel'), children:[ | ||
73 | {tag:'div', /*id:this.getId('mainPanels'),*/ cls:'mainPanels', children:[ | ||
74 | // {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'} | ||
75 | {tag:'h1', html:"Ciao"} | ||
76 | ]} | ||
77 | ]} | ||
78 | ]} | ||
79 | ]); | ||
80 | |||
81 | // this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); | ||
82 | // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); | ||
83 | |||
84 | new Clipperz.PM.UI.Common.Controllers.TabPanelController({ | ||
85 | component:this, | ||
86 | configuration: { | ||
87 | 'LIST': { | ||
88 | tab:'list', | ||
89 | panel:'listPanel' | ||
90 | }, | ||
91 | 'GRID': { | ||
92 | tab:'grid', | ||
93 | panel:'gridPanel' | ||
94 | } | ||
95 | } | ||
96 | }); | ||
97 | }, | ||
98 | |||
99 | //------------------------------------------------------------------------- | ||
100 | |||
101 | __syntaxFix__: "syntax fix" | ||
102 | }); | ||