Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 507788 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.ui/web/js-tests/ui/uiTests.html (+1 lines)
Lines 39-44 Link Here
39
//			"js-tests/ui/commonjs-unittesting/test.html",
39
//			"js-tests/ui/commonjs-unittesting/test.html",
40
//			"js-tests/ui/githubfileapi/test.html",
40
//			"js-tests/ui/githubfileapi/test.html",
41
//			"js-tests/ui/searchRendering/disabled-test.html", // disabled
41
//			"js-tests/ui/searchRendering/disabled-test.html", // disabled
42
			"js-tests/ui/widgets/widgetsTests",
42
		], function(){
43
		], function(){
43
			mocha.run();
44
			mocha.run();
44
		});
45
		});
(-)a/bundles/org.eclipse.orion.client.ui/web/js-tests/ui/widgets/widgetsTests.js (+115 lines)
Added Link Here
1
/*******************************************************************************
2
 * @license
3
 * Copyright (c) 2016 IBM Corporation and others.
4
 * All rights reserved. This program and the accompanying materials are made 
5
 * available under the terms of the Eclipse Public License v1.0 
6
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
7
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
8
 * 
9
 * Contributors: Casey Flynn - Google Inc. - initial API and implementation
10
 ******************************************************************************/
11
/*eslint-env browser, amd, mocha*/
12
define([
13
	'chai/chai',
14
	'orion/widgets/themes/container/ThemeSheetWriter',
15
], function(chai, ThemeSheetWriter) {
16
	var assert = chai.assert;
17
18
	var themeSheetWriter;
19
20
	var setUp = function() {
21
		themeSheetWriter = new ThemeSheetWriter.ThemeSheetWriter();
22
	},
23
	tearDown = function() {
24
		themeSheetWriter = null;
25
	};
26
	describe("Widgets", function() {
27
		beforeEach(setUp);
28
		afterEach(tearDown);
29
		describe("Theme Sheet Writer", function() {
30
			it("Should write a valid style string", function() {
31
				var settings = {
32
					"styles": {
33
						".selector" : {
34
							"attribute" : "value"
35
						}
36
					}
37
				};
38
				
39
				var expected = "\n"+
40
					".orionPage .selector {\n"+
41
					"\tattribute: value;\n"+
42
					"}";
43
				
44
				
45
				var actual = themeSheetWriter.getSheet("orionPage", settings);
46
				assert.equal(actual, expected);				
47
			});
48
			it("Should write a valid style string - 2", function() {
49
				var settings = {
50
					"styles": {
51
						".multi.selector" : {
52
							"attribute0" : "value0"
53
						},
54
						".selector" : {
55
							".nested.multi.selector" : {
56
								"attribute1" : "value1",
57
								"attribute2" : "value2"
58
							},
59
							"attribute3" : "value3"
60
						},
61
						"#idSelector" : {
62
							"attribute4" : "value4"
63
						}
64
					}
65
				};
66
				
67
				var expected = "\n"+
68
					".orionPage .multi.selector {\n"+
69
					"	attribute0: value0;\n"+
70
					"}\n"+
71
					".orionPage .selector .nested.multi.selector {\n"+
72
					"	attribute1: value1;\n"+
73
					"	attribute2: value2;\n"+
74
					"}\n"+
75
					".orionPage .selector {\n"+
76
					"	attribute3: value3;\n"+
77
					"}\n"+
78
					".orionPage #idSelector {\n"+
79
					"	attribute4: value4;\n"+
80
					"}";
81
				
82
				var actual = themeSheetWriter.getSheet("orionPage", settings);
83
				assert.equal(actual, expected);				
84
			});
85
			it("Should return an empty style if no className is specified", function() {
86
				var settings = {
87
					"styles": {
88
						".selector" : {
89
							"attribute" : "value"
90
						}
91
					}
92
				};
93
				
94
				var expected = "";
95
				var actual = themeSheetWriter.getSheet(null, settings);
96
				assert.equal(actual, expected);				
97
			});
98
			it ("Should return an empty style if style is invalid - 1", function() {
99
				var expected = "";
100
				var actual = themeSheetWriter.getSheet(null, null);
101
				assert.equal(expected, actual);
102
			});
103
			it ("Should return an empty style if style is invalid - 2", function() {
104
				var expected = "";
105
				var actual = themeSheetWriter.getSheet(null, "");
106
				assert.equal(expected, actual);
107
			});
108
			it ("Should return an empty style if style is invalid - 3", function() {
109
				var expected = "";
110
				var actual = themeSheetWriter.getSheet(null, []);
111
				assert.equal(expected, actual);
112
			});
113
		});
114
	});
115
});
(-)a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/container/ThemeData.js (-259 / +836 lines)
Lines 7-22 Link Here
7
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
7
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
8
 * 
8
 * 
9
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
9
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
10
 * 				 Casey Flynn - Google Inc.
10
 ******************************************************************************/
11
 ******************************************************************************/
11
/*eslint-env browser, amd*/
12
/*eslint-env browser, amd*/
12
13
13
define([
14
define([
14
	'i18n!orion/settings/nls/messages',
15
	'orion/editor/textTheme',
15
	'orion/editor/textTheme',
16
	'orion/widgets/themes/container/ThemeSheetWriter',
16
	'orion/widgets/themes/container/ThemeSheetWriter',
17
	'orion/widgets/themes/ThemeVersion'
17
	'orion/widgets/themes/ThemeVersion'
18
],
18
],
19
	function(messages, mTextTheme, ThemeSheetWriter, THEMES_VERSION) {
19
	function(mTextTheme, ThemeSheetWriter, THEMES_VERSION) {
20
20
21
	// *******************************************************************************
21
	// *******************************************************************************
22
	//
22
	//
Lines 25-209 define([ Link Here
25
	//
25
	//
26
	// *******************************************************************************
26
	// *******************************************************************************
27
27
28
		function StyleSet(){
29
		    //
30
		}
31
		
32
		function multiply(a,b){
33
			var resultString = 'Result:';
34
			var result = a*b;
35
			return resultString + result;
36
		}
37
		
38
		// TODO: what are these for? They just get overridden by ThemeData constructor
39
		StyleSet.prototype.name = 'Orion';
40
		StyleSet.prototype.navbar = '#404648';
41
		StyleSet.prototype.button = '#EFEFEF';
42
		StyleSet.prototype.location = '#333';
43
		StyleSet.prototype.breadcrumb = '#3087B3';
44
		StyleSet.prototype.separator = '#333';
45
		StyleSet.prototype.selection = 'FEC';
46
		StyleSet.prototype.sidepanel = '#FBFBFB';
47
		StyleSet.prototype.mainpanel = 'white';
48
		StyleSet.prototype.toolpanel = 'white';
49
		StyleSet.prototype.navtext = '#bfbfbf';
50
		StyleSet.prototype.content = '#3087B3';
51
		StyleSet.prototype.search = '#444';
52
		StyleSet.prototype.bannerProgress = "white";
53
54
		function ThemeData(){
28
		function ThemeData(){
55
		
29
		
56
			this.styles = [];
30
			this.styles = [];
31
			var lightPage = {
32
				"className": "lightPage",
33
				"name": "lightPage",
34
				"styles": {
35
					"#configSection": {
36
						"background-color": "rgba(255,255,255,1) !important",
37
						"color": "rgba(0,0,0,1) !important"
38
					},
39
					"#log": {
40
						"margin": "5px",
41
						"width": "calc(100% - 17px)"
42
					},
43
					".auxpane": {
44
						"background": "rgba(196,197,200,1) !important"
45
					},
46
					".checkedRow": {
47
						"background-color": "rgba(61,114,179,1) !important",
48
						"color": "rgba(255,255,255,1) !important",
49
						".commandButton": {
50
							"border-color": "rgba(255,255,255,1)",
51
							"color": "rgba(255,255,255,1)"
52
						},
53
						".commandButton:not(.primaryButton):focus": {
54
							"background": "rgba(61,114,179,0.50)",
55
							"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
56
							"color": "rgba(0,0,0,1)"
57
						},
58
						".commandButton:not(.primaryButton):hover": {
59
							"background": "rgba(61,114,179,0.50)",
60
							"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
61
							"color": "rgba(0,0,0,1)"
62
						},
63
						".gitStatusIcon": {
64
							"color": "white !important"
65
						},
66
						".gitStatusTitle": {
67
							"color": "white !important"
68
						},
69
						"gitStatusIcon": {
70
							"color": "rgba(255,255,255,1)"
71
						},
72
						"gitStatusTitle": {
73
							"color": "rgba(255,255,255,1)"
74
						}
75
					},
76
					".commandButton": {
77
						"background-color": "rgba(0, 0, 0, 0)",
78
						"border-width": "1px",
79
						"border-style": "solid",
80
						"border-color": "rgba(61,114,179,1)",
81
						"color": "rgba(61,114,179,1)"
82
					},
83
					".commandButton.disabled": {
84
						"color": "#cdcdcd"
85
					},
86
					".commandButton.orionButton.dropdownTrigger:hover": {
87
						"border-color": "#ccc"
88
					},
89
					".commandButton:not(.primaryButton):focus": {
90
						"background-color": "rgba(61,114,179,0.25)",
91
						"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
92
						"color": "rgba(0,0,0,1)"
93
					},
94
					".commandButton:not(.primaryButton):hover": {
95
						"background-color": "rgba(61,114,179,0.25)",
96
						"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
97
						"color": "rgba(0,0,0,1)"
98
					},
99
					".content-fixedHeight": {
100
						"background": "rgba(196,197,200,1) !important"
101
					},
102
					".core-sprite-error": {
103
						"color": "red"
104
					},
105
					".dialogTitle": {
106
						"background-color": "rgba(61,114,179,1) !important",
107
						"color": "rgba(255,255,255,1) !important"
108
					},
109
					".dropdownButtonWithIcon": {
110
						"color": "rgba(21,41,53,1) !important"
111
					},
112
					".dropdownMenu": {
113
						".dropdownMenuItemSelected": {
114
							"background": "rgba(61,114,179,0.25)",
115
							"border-left-color": "rgba(61,114,179,1)"
116
						}
117
					},
118
					".dropdownTrigger:not(.dropdownDefaultButton)": {
119
						"color": "rgba(21,41,53,1)"
120
					},
121
					".editorViewerHeader": {
122
						"background": "rgba(245,247,250,1) !important",
123
						"border-bottom-width": "1px",
124
						"border-bottom-style": "solid",
125
						"border-bottom-color": "rgba(245,247,250,1)",
126
						"color": "rgba(0,0,0,1)"
127
					},
128
					".filesystemName": {
129
						"color": "rgba(21,41,53,1) !important"
130
					},
131
					".fixedToolbarHolder": {
132
						"background": "rgba(255,255,255,1)"
133
					},
134
					".gitCommitMessage": {
135
						"gitCommitMessageTopRow": {
136
							"border-width": "1px",
137
							"border-style": "solid",
138
							"border-color": "rgb(61, 114, 179)"
139
						},
140
						".gitCommitMessageTopRow": {
141
							"border-color": "rgba(61,114,179,1)"
142
						}
143
					},
144
					".gitCommitMessageSection": {
145
						"background-color": "rgba(61,114,179,0.25)"
146
					},
147
					".gitCommitMore": {
148
						"color": "rgba(61,114,179,1) !important"
149
					},
150
					".gitStatusIcon": {
151
						"color": "rgba(61,114,179,1) !important"
152
					},
153
					".gitStatusSection": {
154
						"background-color": "rgba(61,114,179,0.25)"
155
					},
156
					".gitStatusTitle": {
157
						"color": "rgba(61,114,179,1) !important"
158
					},
159
					".label.parameterInput": {
160
						"color": "rgba(255,255,255,1) !important"
161
					},
162
					".launchConfigurationMenuItem.dropdownMenuItemActive": {
163
						"background": "rgba(245,247,250,1)"
164
					},
165
					".launchConfigurationsButton": {
166
						".commandButton.orionButton.dropdownTrigger": {
167
							"color": "rgba(255,255,255,1) !important"
168
						}
169
					},
170
					".launchConfigurationsWrapper>.launchConfigurationsButton.dropdownTrigger": {
171
						"background-color": "rgba(61,114,179,1) !important",
172
						"color": "rgba(255,255,255,1) !important"
173
					},
174
					".launchConfsDropdown": {
175
						".dropdownDefaultButton": {
176
							"background-color": "rgba(61,114,179,1) !important",
177
							"color": "rgba(255,255,255,1) !important"
178
						}
179
					},
180
					".launchConfsLabel": {
181
						"background-color": "rgba(61,114,179,1) !important",
182
						"color": "rgba(255,255,255,1) !important"
183
					},
184
					".liveUpdateLabel": {
185
						"color": "rgba(61,114,179,1) !important"
186
					},
187
					".mainToolbar": {
188
						"background-color": "rgba(255,255,255,1)",
189
						"color": "rgba(21,41,53,1) !important",
190
						".commandButton.orionButton.dropdownTrigger": {
191
							"border-color": "rgba(255,255,255,1) !important",
192
							"color": "rgba(0,0,0,1) !important",
193
							".dropdownTriggerButtonLabel": {
194
								"color": "rgba(255,255,255,1)"
195
							}
196
						},
197
						".commandButton.orionButton.dropdownTrigger.dropdownTriggerOpen": {
198
							"color": "rgba(196,197,200,1) !important"
199
						},
200
						".commandButton.orionButton.dropdownTrigger.launchConfigurationsButton": {
201
							"dropdownArrowDown": {
202
								"color": "white"
203
							},
204
							".dropdownArrowDown": {
205
								"color": "rgba(255,255,255,1)"
206
							}
207
						},
208
						".commandImage.dropdownTrigger": {
209
							"color": "rgb(21, 41, 53) !important"
210
						},
211
						".gitSectionLabel": {
212
							"background-color": "rgba(61,114,179,1) !important",
213
							"color": "rgba(255,255,255,1) !important"
214
						},
215
						".sectionWrapper": {
216
							"background-color": "rgba(61,114,179,1) !important",
217
							"color": "rgba(255,255,255,1) !important"
218
						}
219
					},
220
					".mainpane": {
221
						"background": "rgba(196,197,200,1) !important"
222
					},
223
					".navbar-item-selected": {
224
						"background-color": "rgba(61,114,179,1) !important",
225
						"color": "rgba(255,255,255,1) !important"
226
					},
227
					".orionSwitchLabel": {
228
						"background-color": "rgba(61,114,179,1) !important",
229
						"color": "rgba(255,255,255,1) !important"
230
					},
231
					".outlineExplorer": {
232
						".treeIterationCursorRow_Dotted": {
233
							"background-color": "rgba(61,114,179,1) !important",
234
							"color": "rgba(255,255,255,1) !important"
235
						}
236
					},
237
					".primaryButton": {
238
						"background-color": "rgba(61,114,179,1) !important",
239
						"border-width": "1px",
240
						"border-style": "solid",
241
						"border-color": "rgba(61,114,179,1) !important",
242
						"border-radius": "0 !important",
243
						"color": "rgba(255,255,255,1) !important"
244
					},
245
					".primaryButton:hover,": {
246
						".primaryButton:focus": {
247
							"background": "rgb(61, 114, 179)",
248
							"border-color": "rgb(61, 114, 179)"
249
						}
250
					},
251
					".projectNavColumn": {
252
						"color": "rgba(0,0,0,1)"
253
					},
254
					".searchResultsWrapperDiv": {
255
						".selectableNavRow:hover": {
256
							"background": "rgba(61,114,179,0.25)",
257
							"border-left-color": "rgba(61,114,179,1)"
258
						}
259
					},
260
					".sectionTable": {
261
						"background-color": "rgba(255,255,255,1)"
262
					},
263
					".sideMenu": {
264
						"background-color": "rgba(255,255,255,1)"
265
					},
266
					".sideMenuItem": {
267
						"color": "rgba(21,41,53,1) !important"
268
					},
269
					".sideMenuItem>.submenu-trigger:hover": {
270
						"color": "rgba(61,114,179,1) !important"
271
					},
272
					".sideMenuItemActive": {
273
						"background-color": "rgba(61,114,179,1) !important",
274
						"color": "rgba(255,255,255,1) !important"
275
					},
276
					".sideMenuItemActive:hover": {
277
						"background": "rgba(61,114,179,0.25) !important",
278
						"color": "rgba(255,255,255,1)"
279
					},
280
					".sidebarWrapper": {
281
						"background": "rgba(245,247,250,1) !important",
282
						"color": "rgba(0,0,0,1)"
283
					},
284
					".slideParameters": {
285
						"background-color": "rgba(61,114,179,1) !important",
286
						"color": "rgba(255,255,255,1) !important"
287
					},
288
					".splash": {
289
						"background": "rgba(245,247,250,1) !important",
290
						"box-shadow": "none"
291
					},
292
					".splashAbout": {
293
						"color": "rgba(61,114,179,1) !important"
294
					},
295
					".splashDetailedMessage": {
296
						"color": "rgba(0,0,0,1)"
297
					},
298
					".splashLoader": {
299
						"background": "rgba(245,247,250,1) !important",
300
						"box-shadow": "none"
301
					},
302
					".splashLoadingImage": {
303
						"-webkit-animation": "rotateThis .5s infinite linear",
304
						"animation": "rotateThis .5s infinite linear",
305
						"background": "none",
306
						"border": "2px solid #00b299",
307
						"border-radius": "50%",
308
						"border-right-color": "transparent",
309
						"display": "inline-block",
310
						"height": "20px",
311
						"margin": "0",
312
						"opacity": ".4",
313
						"width": "20px"
314
					},
315
					".splashLoadingImage.initial": {
316
						"border-width": "4px",
317
						"height": "40px",
318
						"width": "40px"
319
					},
320
					".splashMessage": {
321
						"color": "rgba(0,0,0,1)"
322
					},
323
					".splashVerbal": {
324
						"color": "rgba(61,114,179,1) !important"
325
					},
326
					".split": {
327
						"background": "rgba(196,197,200,1)",
328
						"width": "4px"
329
					},
330
					".splitThumb": {
331
						"background": "rgba(196,197,200,1)"
332
					},
333
					".status": {
334
						"color": "rgba(0,0,0,1)"
335
					},
336
					".statusContainer": {
337
						"background": "rgba(245,247,250,1)",
338
						"color": "rgba(0,0,0,1)"
339
					},
340
					".statusLight": {
341
						"background": "lightgray"
342
					},
343
					".statusLight.statusLightAmber": {
344
						"background": "#FFE141"
345
					},
346
					".statusLight.statusLightGreen": {
347
						"background": "#13dd6d"
348
					},
349
					".statusLight.statusLightProgress": {
350
						"background": "transparent",
351
						"border-color": "lightgray",
352
						"border-top-color": "transparent"
353
					},
354
					".statusLight.statusLightRed": {
355
						"background": "#C1272D"
356
					},
357
					".textviewTooltip": {
358
						".commandButton": {
359
							"background-color": "inherit",
360
							"border": "1px solid #325C80",
361
							"border-color": "rgba(255,255,255,1)",
362
							"color": "white",
363
							"margin-bottom": "2px"
364
						},
365
						"color": "rgba(255,255,255,1)"
366
					},
367
					".titleActionContainer": {
368
						"background": "rgba(245,247,250,1) !important",
369
						"color": "rgba(0,0,0,1)"
370
					},
371
					".tooltip": {
372
						"background-color": "rgba(61,114,179,1) !important",
373
						"border-width": "1px",
374
						"border-style": "solid",
375
						"border-color": "rgba(61,114,179,1)",
376
						"color": "rgba(255,255,255,1) !important",
377
						"h2": {
378
							"color": "rgba(255,255,255,1) !important"
379
						},
380
						".navlinkonpage": {
381
							"background-color": "rgba(61,114,179,1) !important",
382
							"color": "rgba(255,255,255,1) !important"
383
						},
384
						".operationError": {
385
							"color": "rgba(255,255,255,1) !important"
386
						}
387
					},
388
					".tooltipTailFromabove:after": {
389
						"border-top-color": "rgba(61,114,179,1)"
390
					},
391
					".tooltipTailFromabove:before": {
392
						"border-top-color": "rgba(61,114,179,1)"
393
					},
394
					".tooltipTailFrombelow:after": {
395
						"border-bottom-color": "rgba(61,114,179,1)"
396
					},
397
					".tooltipTailFrombelow:before": {
398
						"border-bottom-color": "rgba(61,114,179,1)"
399
					},
400
					".tooltipTailFromleft:after": {
401
						"border-left-color": "rgba(61,114,179,1)"
402
					},
403
					".tooltipTailFromleft:before": {
404
						"border-left-color": "rgba(61,114,179,1)"
405
					},
406
					".tooltipTailFromright:after": {
407
						"border-right-color": "rgba(61,114,179,1)"
408
					},
409
					".tooltipTailFromright:before": {
410
						"border-right-color": "rgba(61,114,179,1)"
411
					},
412
					".treeIterationCursorRow": {
413
						"background-color": "rgba(61,114,179,0.25)"
414
					},
415
					".treeIterationCursorRow_Dotted": {
416
						"background-color": "rgba(61,114,179,0.25)"
417
					},
418
					".workingTarget": {
419
						"background-color": "rgba(255,255,255,1)"
420
					},
421
					".commandImage.dropdownTrigger": {
422
						"color": "rgba(21,41,53,1)"
423
					},
424
					".dropdownMenuItem": {
425
						"color": "rgba(245,247,250,1)"
426
					},
427
					".pageToolbar": {
428
						".dropdownTrigger:not(.dropdownDefaultButton)": {
429
							"color": "rgba(196,197,200,1)"
430
						}
431
					},
432
					".primaryButton:hover": {
433
						".primaryButton:focus": {
434
							"background": "rgba(61,114,179,1)",
435
							"border-color": "rgba(61,114,179,1)"
436
						}
437
					}
438
				}
439
			}
440
			this.styles.push(lightPage);
57
			
441
			
58
			var orion = new StyleSet();
442
			var orionPage = {
59
			orion.name = 'Orion';
443
				"className": "orionPage",
60
			orion.navbar = 'white'; // #404648 for dark banner
444
				"name": "orionPage",
61
			orion.button = '#EFEFEF';
445
				"styles": {
62
			orion.location = '#efefef';
446
					"#configSection": {
63
			orion.selection = 'FEC';
447
						"background-color": "rgba(38,52,63,1) !important",
64
			orion.sidepanel = '#FBFBFB';
448
						"color": "rgba(255,255,255,1) !important"
65
			orion.mainpanel = 'white';
449
					},
66
			orion.toolpanel = 'white';
450
					"#log": {
67
			orion.navtext = '#bfbfbf';
451
						"margin": "5px",
68
			orion.content = '#3087B3';
452
						"width": "calc(100% - 17px)"
69
			orion.search = '#444';
453
					},
70
			orion.breadcrumb = '#3087B3';
454
					".auxpane": {
71
			orion.separator = '#333';
455
						"background": "rgba(59,75,84,1) !important"
72
			orion.bannerProgress = "whitesmoke";
456
					},
73
457
					".checkedRow": {
74
			this.styles.push( orion );		
458
						"background-color": "rgba(27,177,153,1) !important",
75
			
459
						"color": "rgba(211,211,211,1) !important",
76
			var orion2014 = new StyleSet();
460
						".commandButton": {
77
			orion2014.name = 'Orion2014';
461
							"border-color": "rgba(38,52,63,1)",
78
			orion2014.navbar = 'white';
462
							"color": "rgba(211,211,211,1)"
79
			orion2014.button = '#EFEFEF';
463
						},
80
			orion2014.location = '#EFEFEF';
464
						".commandButton:not(.primaryButton):focus": {
81
			orion2014.selection = 'FEC';
465
							"background": "rgba(27,177,153,0.50)",
82
			orion2014.sidepanel = '#EEEEEE';
466
							"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
83
			orion2014.mainpanel = '#EEEEEE';
467
							"color": "rgba(255,255,255,1)"
84
			orion2014.toolpanel = '#EEEEEE';
468
						},
85
			orion2014.navtext = '#BFBFBF';
469
						".commandButton:not(.primaryButton):hover": {
86
			orion2014.content = '#333333';
470
							"background": "rgba(27,177,153,0.50)",
87
			orion2014.search = '#444444';
471
							"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
88
			orion2014.breadcrumb = '#333333';
472
							"color": "rgba(255,255,255,1)"
89
			orion2014.separator = '#333333';
473
						},
90
			orion2014.bannerProgress = "orange";
474
						".gitStatusIcon": {
91
475
							"color": "white !important"
92
			this.styles.push( orion2014 );		
476
						},
93
477
						".gitStatusTitle": {
94
			var eire = new StyleSet();
478
							"color": "white !important"
95
			
479
						},
96
			eire.name = 'Green Zone';
480
						"gitStatusIcon": {
97
			eire.navbar = 'seagreen';
481
							"color": "rgba(211,211,211,1)"
98
			eire.button = 'lavender';
482
						},
99
			eire.location = 'darkseagreen';
483
						"gitStatusTitle": {
100
			eire.selection = 'moccasin';
484
							"color": "rgba(211,211,211,1)"
101
			eire.sidepanel = 'aliceblue';
485
						}
102
			eire.mainpanel = 'white';
486
					},
103
			eire.toolpanel = 'white';
487
					".commandButton": {
104
			eire.navtext = '#FBFBFB';
488
						"background-color": "rgba(0, 0, 0, 0)",
105
			eire.content = 'darkgreen';
489
						"border-width": "1px",
106
			eire.search = 'darkgreen';
490
						"border-style": "solid",
107
			eire.breadcrumb = '#3087B3';
491
						"border-color": "rgba(27,177,153,1)",
108
			eire.separator = 'seagreen';
492
						"color": "rgba(27,177,153,1)"
109
			eire.bannerProgress = "#F2F2F2";
493
					},
110
			
494
					".commandButton.disabled": {
111
			this.styles.push( eire );
495
						"color": "#cdcdcd"
112
			
496
					},
113
			var avril = new StyleSet();
497
					".commandButton.orionButton.dropdownTrigger:hover": {
114
			
498
						"border-color": "#ccc"
115
			avril.name = 'Pretty In Pink';
499
					},
116
			avril.navbar = 'plum';
500
					".commandButton:not(.primaryButton):focus": {
117
			avril.button = 'lavender';
501
						"background-color": "rgba(27,177,153,0.25)",
118
			avril.location = 'pink';
502
						"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
119
			avril.selection = 'lavender';
503
						"color": "rgba(255,255,255,1)"
120
			avril.sidepanel = 'seashell';
504
					},
121
			avril.mainpanel = 'white';
505
					".commandButton:not(.primaryButton):hover": {
122
			avril.toolpanel = 'white';
506
						"background-color": "rgba(27,177,153,0.25)",
123
			avril.navtext = '#FBFBFB';
507
						"box-shadow": "0 1px 2px 0 rgb(61, 114, 179)",
124
			avril.content = 'mediumorchid';
508
						"color": "rgba(255,255,255,1)"
125
			avril.search = 'violet';
509
					},
126
			avril.breadcrumb = '#3087B3';
510
					".content-fixedHeight": {
127
			avril.separator = 'plum';
511
						"background": "rgba(59,75,84,1) !important"
128
			avril.bannerProgress = "#F2F2F2";
512
					},
129
			
513
					".core-sprite-error": {
130
			this.styles.push( avril );
514
						"color": "red"
131
			
515
					},
132
			var blue = new StyleSet();
516
					".dialogTitle": {
133
			
517
						"background-color": "rgba(27,177,153,1) !important",
134
			blue.name = 'Blue Monday';
518
						"color": "rgba(211,211,211,1) !important"
135
			blue.navbar = 'cornflowerblue';
519
					},
136
			blue.button = 'lavender';
520
					".dropdownButtonWithIcon": {
137
			blue.location = 'skyblue';
521
						"color": "rgba(255,255,255,1) !important"
138
			blue.selection = 'lavender';
522
					},
139
			blue.sidepanel = 'aliceblue';
523
					".dropdownMenu": {
140
			blue.mainpanel = 'white';
524
						".dropdownMenuItemSelected": {
141
			blue.toolpanel = 'white';
525
							"background": "rgba(27,177,153,0.25)",
142
			blue.navtext = '#FBFBFB';
526
							"border-left-color": "rgba(27,177,153,1)"
143
			blue.content = 'royalblue';
527
						}
144
			blue.search = 'royalblue';
528
					},
145
			blue.breadcrumb = '#3087B3';
529
					".dropdownTrigger:not(.dropdownDefaultButton)": {
146
			blue.separator = 'cornflowerblue';
530
						"color": "rgba(255,255,255,1)"
147
			blue.bannerProgress = "#F2F2F2";
531
					},
148
			
532
					".editorViewerHeader": {
149
			this.styles.push( blue );
533
						"background": "rgba(59,75,84,1) !important",
150
			
534
						"border-bottom-width": "1px",
151
			var vanilla = new StyleSet();
535
						"border-bottom-style": "solid",
152
			
536
						"border-bottom-color": "rgba(59,75,84,1)",
153
			vanilla.name = 'Vanilla Skies';
537
						"color": "rgba(255,255,255,1)"
154
			vanilla.navbar = 'sandybrown';
538
					},
155
			vanilla.button = 'lemmonchiffon';
539
					".filesystemName": {
156
			vanilla.location = 'cornsilk';
540
						"color": "rgba(255,255,255,1) !important"
157
			vanilla.selection = 'lemonchiffon';
541
					},
158
			vanilla.sidepanel = 'white';
542
					".fixedToolbarHolder": {
159
			vanilla.mainpanel = 'white';
543
						"background": "rgba(38,52,63,1)"
160
			vanilla.toolpanel = 'white';
544
					},
161
			vanilla.navtext = 'lemonchiffon';
545
					".gitCommitMessage": {
162
			vanilla.content = 'chocolate';
546
						"gitCommitMessageTopRow": {
163
			vanilla.search = 'moccasin';
547
							"border-width": "1px",
164
			vanilla.breadcrumb = '#3087B3';
548
							"border-style": "solid",
165
			vanilla.separator = 'sandybrown';
549
							"border-color": "rgb(61, 114, 179)"
166
			vanilla.bannerProgress = "#F2F2F2";
550
						},
167
			
551
						".gitCommitMessageTopRow": {
168
			this.styles.push( vanilla );
552
							"border-color": "rgba(27,177,153,1)"
169
			
553
						}
170
			var beetlejuice = new StyleSet();
554
					},
171
			
555
					".gitCommitMessageSection": {
172
			beetlejuice.name = 'Beetlejuice';
556
						"background-color": "rgba(27,177,153,0.25)"
173
			beetlejuice.navbar = 'indigo';
557
					},
174
			beetlejuice.button = 'slateblue';
558
					".gitCommitMore": {
175
			beetlejuice.location = 'darkslateblue';
559
						"color": "rgba(27,177,153,1) !important"
176
			beetlejuice.selection = 'silver';
560
					},
177
			beetlejuice.sidepanel = 'lavender';
561
					".gitStatusIcon": {
178
			beetlejuice.mainpanel = 'white';
562
						"color": "rgba(27,177,153,1) !important"
179
			beetlejuice.toolpanel = 'white';
563
					},
180
			beetlejuice.navtext = '#FBFBFB';
564
					".gitStatusSection": {
181
			beetlejuice.content = 'mediumslateblue';
565
						"background-color": "rgba(27,177,153,0.25)"
182
			beetlejuice.search = '#444';
566
					},
183
			beetlejuice.breadcrumb = '#3087B3';
567
					".gitStatusTitle": {
184
			beetlejuice.separator = 'indigo';
568
						"color": "rgba(27,177,153,1) !important"
185
			beetlejuice.bannerProgress = "#F2F2F2";
569
					},
186
			
570
					".label.parameterInput": {
187
			this.styles.push( beetlejuice );
571
						"color": "rgba(211,211,211,1) !important"
188
			
572
					},
189
			var red = new StyleSet();
573
					".launchConfigurationMenuItem.dropdownMenuItemActive": {
190
			
574
						"background": "rgba(59,75,84,1)"
191
			red.name = 'Red';
575
					},
192
			red.navbar = '#CD2127';
576
					".launchConfigurationsButton": {
193
			red.button = '#777777';
577
						".commandButton.orionButton.dropdownTrigger": {
194
			red.location = '#D85F56';
578
							"color": "rgba(211,211,211,1) !important"
195
			red.selection = 'lightcoral';
579
						}
196
			red.sidepanel = '#EFDAB2';
580
					},
197
			red.mainpanel = '#FDFADD';
581
					".launchConfigurationsWrapper>.launchConfigurationsButton.dropdownTrigger": {
198
			red.toolpanel = '#FDFADD';
582
						"background-color": "rgba(27,177,153,1) !important",
199
			red.navtext = '#FBFBFB';
583
						"color": "rgba(211,211,211,1) !important"
200
			red.content = 'darkred';
584
					},
201
			red.search = '#D85F56';
585
					".launchConfsDropdown": {
202
			red.breadcrumb = 'darkred';
586
						".dropdownDefaultButton": {
203
			red.separator = '#CD2127';
587
							"background-color": "rgba(27,177,153,1) !important",
204
			red.bannerProgress = "#F2F2F2";
588
							"color": "rgba(211,211,211,1) !important"
205
			
589
						}
206
			this.styles.push( red );		
590
					},
591
					".launchConfsLabel": {
592
						"background-color": "rgba(27,177,153,1) !important",
593
						"color": "rgba(211,211,211,1) !important"
594
					},
595
					".liveUpdateLabel": {
596
						"color": "rgba(27,177,153,1) !important"
597
					},
598
					".mainToolbar": {
599
						"background-color": "rgba(38,52,63,1)",
600
						"color": "rgba(255,255,255,1) !important",
601
						".commandButton.orionButton.dropdownTrigger": {
602
							"border-color": "rgba(38,52,63,1) !important",
603
							"color": "rgba(255,255,255,1) !important",
604
							".dropdownTriggerButtonLabel": {
605
								"color": "rgba(211,211,211,1)"
606
							}
607
						},
608
						".commandButton.orionButton.dropdownTrigger.dropdownTriggerOpen": {
609
							"color": "rgba(59,75,84,1) !important"
610
						},
611
						".commandButton.orionButton.dropdownTrigger.launchConfigurationsButton": {
612
							"dropdownArrowDown": {
613
								"color": "white"
614
							},
615
							".dropdownArrowDown": {
616
								"color": "rgba(211,211,211,1)"
617
							}
618
						},
619
						".commandImage.dropdownTrigger": {
620
							"color": "rgb(21, 41, 53) !important"
621
						},
622
						".gitSectionLabel": {
623
							"background-color": "rgba(27,177,153,1) !important",
624
							"color": "rgba(211,211,211,1) !important"
625
						},
626
						".sectionWrapper": {
627
							"background-color": "rgba(27,177,153,1) !important",
628
							"color": "rgba(211,211,211,1) !important"
629
						}
630
					},
631
					".mainpane": {
632
						"background": "rgba(59,75,84,1) !important"
633
					},
634
					".navbar-item-selected": {
635
						"background-color": "rgba(27,177,153,1) !important",
636
						"color": "rgba(211,211,211,1) !important"
637
					},
638
					".orionSwitchLabel": {
639
						"background-color": "rgba(27,177,153,1) !important",
640
						"color": "rgba(211,211,211,1) !important"
641
					},
642
					".outlineExplorer": {
643
						".treeIterationCursorRow_Dotted": {
644
							"background-color": "rgba(27,177,153,1) !important",
645
							"color": "rgba(211,211,211,1) !important"
646
						}
647
					},
648
					".primaryButton": {
649
						"background-color": "rgba(27,177,153,1) !important",
650
						"border-width": "1px",
651
						"border-style": "solid",
652
						"border-color": "rgba(27,177,153,1) !important",
653
						"border-radius": "0 !important",
654
						"color": "rgba(211,211,211,1) !important"
655
					},
656
					".primaryButton:hover,": {
657
						".primaryButton:focus": {
658
							"background": "rgb(61, 114, 179)",
659
							"border-color": "rgb(61, 114, 179)"
660
						}
661
					},
662
					".projectNavColumn": {
663
						"color": "rgba(255,255,255,1)"
664
					},
665
					".searchResultsWrapperDiv": {
666
						".selectableNavRow:hover": {
667
							"background": "rgba(27,177,153,0.25)",
668
							"border-left-color": "rgba(27,177,153,1)"
669
						}
670
					},
671
					".sectionTable": {
672
						"background-color": "rgba(255,255,255,1)"
673
					},
674
					".sideMenu": {
675
						"background-color": "rgba(38,52,63,1)"
676
					},
677
					".sideMenuItem": {
678
						"color": "rgba(255,255,255,1) !important"
679
					},
680
					".sideMenuItem>.submenu-trigger:hover": {
681
						"color": "rgba(27,177,153,1) !important"
682
					},
683
					".sideMenuItemActive": {
684
						"background-color": "rgba(27,177,153,1) !important",
685
						"color": "rgba(211,211,211,1) !important"
686
					},
687
					".sideMenuItemActive:hover": {
688
						"background": "rgba(27,177,153,0.25) !important",
689
						"color": "rgba(211,211,211,1)"
690
					},
691
					".sidebarWrapper": {
692
						"background": "rgba(59,75,84,1) !important",
693
						"color": "rgba(255,255,255,1)"
694
					},
695
					".slideParameters": {
696
						"background-color": "rgba(27,177,153,1) !important",
697
						"color": "rgba(211,211,211,1) !important"
698
					},
699
					".splash": {
700
						"background": "rgba(59,75,84,1) !important",
701
						"box-shadow": "none"
702
					},
703
					".splashAbout": {
704
						"color": "rgba(27,177,153,1) !important"
705
					},
706
					".splashDetailedMessage": {
707
						"color": "rgba(255,255,255,1)"
708
					},
709
					".splashLoader": {
710
						"background": "rgba(59,75,84,1) !important",
711
						"box-shadow": "none"
712
					},
713
					".splashLoadingImage": {
714
						"-webkit-animation": "rotateThis .5s infinite linear",
715
						"animation": "rotateThis .5s infinite linear",
716
						"background": "none",
717
						"border": "2px solid #00b299",
718
						"border-radius": "50%",
719
						"border-right-color": "transparent",
720
						"display": "inline-block",
721
						"height": "20px",
722
						"margin": "0",
723
						"opacity": ".4",
724
						"width": "20px"
725
					},
726
					".splashLoadingImage.initial": {
727
						"border-width": "4px",
728
						"height": "40px",
729
						"width": "40px"
730
					},
731
					".splashMessage": {
732
						"color": "rgba(255,255,255,1)"
733
					},
734
					".splashVerbal": {
735
						"color": "rgba(27,177,153,1) !important"
736
					},
737
					".split": {
738
						"background": "rgba(59,75,84,1)",
739
						"width": "4px"
740
					},
741
					".splitThumb": {
742
						"background": "rgba(59,75,84,1)"
743
					},
744
					".status": {
745
						"color": "rgba(255,255,255,1)"
746
					},
747
					".statusContainer": {
748
						"background": "rgba(59,75,84,1)",
749
						"color": "rgba(255,255,255,1)"
750
					},
751
					".statusLight": {
752
						"background": "lightgray"
753
					},
754
					".statusLight.statusLightAmber": {
755
						"background": "#FFE141"
756
					},
757
					".statusLight.statusLightGreen": {
758
						"background": "#13dd6d"
759
					},
760
					".statusLight.statusLightProgress": {
761
						"background": "transparent",
762
						"border-color": "lightgray",
763
						"border-top-color": "transparent"
764
					},
765
					".statusLight.statusLightRed": {
766
						"background": "#C1272D"
767
					},
768
					".textviewTooltip": {
769
						".commandButton": {
770
							"background-color": "inherit",
771
							"border": "1px solid #325C80",
772
							"border-color": "rgba(38,52,63,1)",
773
							"color": "white",
774
							"margin-bottom": "2px"
775
						},
776
						"color": "rgba(211,211,211,1)"
777
					},
778
					".titleActionContainer": {
779
						"background": "rgba(59,75,84,1) !important",
780
						"color": "rgba(255,255,255,1)"
781
					},
782
					".tooltip": {
783
						"background-color": "rgba(27,177,153,1) !important",
784
						"border-width": "1px",
785
						"border-style": "solid",
786
						"border-color": "rgba(27,177,153,1)",
787
						"color": "rgba(211,211,211,1) !important",
788
						"h2": {
789
							"color": "rgba(211,211,211,1) !important"
790
						},
791
						".navlinkonpage": {
792
							"background-color": "rgba(27,177,153,1) !important",
793
							"color": "rgba(211,211,211,1) !important"
794
						},
795
						".operationError": {
796
							"color": "rgba(211,211,211,1) !important"
797
						}
798
					},
799
					".tooltipTailFromabove:after": {
800
						"border-top-color": "rgba(27,177,153,1)"
801
					},
802
					".tooltipTailFromabove:before": {
803
						"border-top-color": "rgba(27,177,153,1)"
804
					},
805
					".tooltipTailFrombelow:after": {
806
						"border-bottom-color": "rgba(27,177,153,1)"
807
					},
808
					".tooltipTailFrombelow:before": {
809
						"border-bottom-color": "rgba(27,177,153,1)"
810
					},
811
					".tooltipTailFromleft:after": {
812
						"border-left-color": "rgba(27,177,153,1)"
813
					},
814
					".tooltipTailFromleft:before": {
815
						"border-left-color": "rgba(27,177,153,1)"
816
					},
817
					".tooltipTailFromright:after": {
818
						"border-right-color": "rgba(27,177,153,1)"
819
					},
820
					".tooltipTailFromright:before": {
821
						"border-right-color": "rgba(27,177,153,1)"
822
					},
823
					".treeIterationCursorRow": {
824
						"background-color": "rgba(27,177,153,0.25)"
825
					},
826
					".treeIterationCursorRow_Dotted": {
827
						"background-color": "rgba(27,177,153,0.25)"
828
					},
829
					".workingTarget": {
830
						"background-color": "rgba(255,255,255,1)"
831
					},
832
					".commandImage.dropdownTrigger": {
833
						"color": "rgba(255,255,255,1)"
834
					},
835
					".dropdownMenuItem": {
836
						"color": "rgba(59,75,84,1)"
837
					},
838
					".pageToolbar": {
839
						".dropdownTrigger:not(.dropdownDefaultButton)": {
840
							"color": "rgba(59,75,84,1)"
841
						}
842
					},
843
					".primaryButton:hover": {
844
						".primaryButton:focus": {
845
							"background": "rgba(27,177,153,1)",
846
							"border-color": "rgba(27,177,153,1)"
847
						}
848
					}
849
				}
850
			};
851
			this.styles.push(orionPage);
207
		}
852
		}
208
		
853
		
209
		function getStyles(){
854
		function getStyles(){
Lines 213-317 define([ Link Here
213
		ThemeData.prototype.styles = [];
858
		ThemeData.prototype.styles = [];
214
		ThemeData.prototype.getStyles = getStyles;
859
		ThemeData.prototype.getStyles = getStyles;
215
		
860
		
861
		function getProtectedThemes() {
862
			return ["lightPage", "orionPage"]; //$NON-NLS-1$ //$NON-NLS-0$
863
		}
864
865
		ThemeData.prototype.getProtectedThemes = getProtectedThemes;
216
		
866
		
217
		function getThemeStorageInfo(){
867
		function getThemeStorageInfo(){
218
			return {
868
			return {
219
				storage:'/themes',
869
				storage:'/themes',
220
				styleset:'styles',
870
				styleset:'containerStyles',
221
				defaultTheme:'Orion2014',
871
				defaultTheme: 'lightPage',
222
				selectedKey: 'selected',
872
				selectedKey: 'containerTheme',
223
				version: THEMES_VERSION
873
				version: THEMES_VERSION
224
			};
874
			};
225
		}
875
		}
226
227
		ThemeData.prototype.getThemeStorageInfo = getThemeStorageInfo;
228
229
		function getViewData(){
230
		
876
		
231
			var TOP = 10;
877
		ThemeData.prototype.getThemeStorageInfo = getThemeStorageInfo;
232
			var LEFT = 10;
233
			var UI_SIZE = 350;
234
			var BANNER_HEIGHT = 32;
235
			var NAV_HEIGHT = 29;
236
			var CONTENT_TOP = TOP + BANNER_HEIGHT + NAV_HEIGHT;
237
		
238
			var dataset = {};
239
			dataset.top = TOP;
240
			dataset.left = LEFT;
241
			dataset.width = UI_SIZE;
242
			dataset.height = UI_SIZE;
243
			
244
			dataset.shapes = [ 
245
								{ type:'RECTANGLE', 	name: messages["Navigation Bar"],		x:LEFT,		y:TOP,					width:UI_SIZE,	height: BANNER_HEIGHT, family:'navbar', fill: '#333', order:1 },
246
								{ type:'TEXT',		name: messages["Navigation Text"],	 label:'UserName',	x:LEFT + UI_SIZE - 70, y:TOP + 20, family:'navtext', fill: '#bfbfbf', font: '8pt sans-serif'},
247
								{ type:'ROUNDRECTANGLE', name: messages["Search Box"],	x:LEFT + UI_SIZE - 145,	y:TOP + 10, width: 70,	height: 12, family:'search', fill: '#444', order:3 },
248
								{ type:'RECTANGLE', name: messages["Tool Panel"],	x:LEFT + UI_SIZE * 0.4, y:CONTENT_TOP, width:UI_SIZE * 0.6 -1, height:30, family:'toolpanel', fill: 'white', order:4 },
249
								{ type:'RECTANGLE', name: messages["Selection Bar"],	x:LEFT + UI_SIZE * 0.4 + 5, y:CONTENT_TOP + 62, width:UI_SIZE * 0.6 -10, height:20, family:'selection', fill: '#FEC', order:7 },
250
							   	{ type:'RECTANGLE', 	name: messages["Location"],	x:LEFT,		y:TOP + BANNER_HEIGHT, 	width:UI_SIZE,	height: NAV_HEIGHT, family:'location', fill: '#efefef', order:8 },
251
								{ type:'TEXT',		name: messages["Navigation Text"],	 label:'Navigator',	x:LEFT + 50, y: TOP + 20, family:'navtext', fill: '#bfbfbf', font: '8pt sans-serif', order:2 },
252
							  	{ type:'TEXT',		name: messages["Content"],	 label:'Breadcrumb',	x:LEFT + 5, y:TOP + BANNER_HEIGHT + 18, family:'content', fill: '#3087B3', font: '8pt sans-serif' },
253
								{ type:'TEXT',		name: messages["Content"],	 label:'/',	x:LEFT + 68, y:TOP + BANNER_HEIGHT + 18, family:'content', fill: '#3087B3', font: '8pt sans-serif', order:9 },
254
								{ type:'TEXT',		name: messages["Content"],	 label:'Location',	x:LEFT + 74, y:TOP + BANNER_HEIGHT + 18, family:'content', fill: '#3087B3', font: '8pt sans-serif' },
255
								{ type:'RECTANGLE', name: messages["Main Panel"],	x:LEFT + UI_SIZE * 0.4, y:CONTENT_TOP + 30, width:UI_SIZE * 0.6 -1, height:UI_SIZE - CONTENT_TOP + TOP -31, family:'mainpanel', fill: 'white', order:6 },
256
								{ type:'ROUNDRECTANGLE', name: messages["Button"],	x:LEFT + UI_SIZE * 0.4 + 5, y:CONTENT_TOP + 5, width:37, height:20, family:'button', fill: '#EFEFEF', order:11 },
257
								{ type:'TEXT',		name: messages["Button Text"],	 label:'Button',	x:LEFT + UI_SIZE * 0.4 + 8, y:CONTENT_TOP + 19, family:'navbar', fill: '#333', font: '8pt sans-serif' },
258
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + UI_SIZE - 7, y1:TOP + 14, x2:LEFT + UI_SIZE - 13, y2:TOP + 14, x3:LEFT + UI_SIZE - 10, y3:TOP + 19, family:'userMenu', fill: '#BFBFBF' },
259
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + 10, y1:CONTENT_TOP + 17, x2:LEFT + 16, y2:CONTENT_TOP + 17, x3:LEFT + 13, y3:CONTENT_TOP + 22, family:'userMenu', fill: '#BFBFBF' },
260
								{ type:'TEXT',		name: messages["Section Text"],	 label:'Section',	x:LEFT + 20, y:CONTENT_TOP + 23, family:'navbar', fill: '#333', font: '8pt sans-serif' },
261
								{ type:'LINE', 		name: messages["Line Color"], x1:LEFT + UI_SIZE * 0.4, y1:CONTENT_TOP + 30, x2:LEFT + UI_SIZE, y2:CONTENT_TOP + 30, linewidth:2, fill:'#DEDEDE' },
262
								{ type:'LINE', 		name: messages["Line Color"], x1:LEFT + UI_SIZE * 0.4, y1:CONTENT_TOP, x2:LEFT + UI_SIZE * 0.4, y2:TOP + UI_SIZE, linewidth:2, fill:'#DEDEDE'},
263
								{ type:'LINE', 		name: messages["Line Color"], x1:LEFT + 10, y1:CONTENT_TOP + 29, x2:LEFT + UI_SIZE * 0.4 - 10, y2:CONTENT_TOP + 29, linewidth:2, fill:'#DEDEDE' },
264
								{ type:'RECTANGLE', 	name: messages["Side Panel"],	x:LEFT,		y:CONTENT_TOP, 			width: UI_SIZE * 0.4,	height: UI_SIZE - CONTENT_TOP + TOP, family:'sidepanel', fill: '#FBFBFB', order:12 },
265
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + UI_SIZE - 7, y1:TOP + 14, x2:LEFT + UI_SIZE - 13, y2:TOP + 14, x3:LEFT + UI_SIZE - 10, y3:TOP + 19, family:'userMenu', fill: '#BFBFBF' },
266
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + 10, y1:CONTENT_TOP + 17, x2:LEFT + 16, y2:CONTENT_TOP + 17, x3:LEFT + 13, y3:CONTENT_TOP + 22, family:'userMenu', fill: '#BFBFBF' },
267
								{ type:'TEXT',		name: messages["Navigation Text"],	 label:'Navigator',	x:LEFT + 50, y: TOP + 20, family:'navtext', fill: '#bfbfbf', font: '8pt sans-serif', order:2 },
268
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + UI_SIZE - 7, y1:TOP + 14, x2:LEFT + UI_SIZE - 13, y2:TOP + 14, x3:LEFT + UI_SIZE - 10, y3:TOP + 19, family:'userMenu', fill: '#BFBFBF' },
269
								{ type:'TRIANGLE',	name:'userMenu', x1:LEFT + 10, y1:CONTENT_TOP + 17, x2:LEFT + 16, y2:CONTENT_TOP + 17, x3:LEFT + 13, y3:CONTENT_TOP + 22, family:'userMenu', fill: '#BFBFBF' }
270
			];
271
			
272
			
273
			for( var count=0; count < 3; count++ ){
274
					
275
				/* Section Items */
276
					
277
				dataset.shapes.push( { type:'TEXT', name: messages["Content"], label:'org.eclipse.orion.content', x: LEFT + UI_SIZE * 0.4 + 20, y:CONTENT_TOP + 56 + ( 20 * count ), fill: '#3087B3', family:'content' } );
278
			}
279
			
280
			for( var count=0; count < 3; count++ ){
281
					
282
				/* Section Items */
283
					
284
				dataset.shapes.push( { type:'TEXT', name: messages["Content"], label:'Item', x:LEFT + 15, y:CONTENT_TOP + 44 + ( 20 * count ), fill: '#3087B3', family:'content' } );
285
			}
286
			
287
			for( var twisty = 0; twisty < 3; twisty++ ){
288
			
289
				dataset.shapes.push( { type:'TRIANGLE',	name:'twisty', 
290
				x1: LEFT + UI_SIZE * 0.4 + 10, y1:CONTENT_TOP + 50 + (twisty*20), 
291
				x2:LEFT + UI_SIZE * 0.4 + 15, y2: CONTENT_TOP + 53 + (twisty*20), 
292
				x3:LEFT + UI_SIZE * 0.4 + 10, y3: CONTENT_TOP + 56 + (twisty*20), 
293
				family:'navbar', fill: '#333' } );
294
			}
295
			
296
			dataset.shapes.push( { type:'IMAGE', 		name:'logo', x: LEFT + 5, y:TOP + 8, source: '../../images/orion-transparent.png', family:'logo' } );
297
			
298
			return dataset;
299
		}
300
878
301
		ThemeData.prototype.getViewData = getViewData;
302
		
879
		
303
		function processSettings( settings ){
880
		function processSettings(settings){
304
			var sheetMaker = new ThemeSheetWriter.ThemeSheetWriter();
881
			var sheetMaker = new ThemeSheetWriter.ThemeSheetWriter();
305
			var themeClass = "orionTheme";
882
			var themeClass = "orionPage";
306
			var theme = new mTextTheme.TextTheme.getTheme(themeClass);
883
			var theme = new mTextTheme.TextTheme.getTheme(themeClass);
307
			theme.setThemeClass(themeClass, sheetMaker.getSheet( settings ));
884
			theme.setThemeClass(themeClass, sheetMaker.getSheet(themeClass, settings ));
308
		}
885
		}
309
		
886
		
310
		ThemeData.prototype.processSettings = processSettings;
887
		ThemeData.prototype.processSettings = processSettings;
311
888
312
		return{
889
		return{
313
			ThemeData:ThemeData,
890
			ThemeData:ThemeData,
314
			getStyles:getStyles
891
			getStyles:getStyles,
315
		};
892
		};
316
	}
893
	}
317
);
894
);
(-)a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/container/ThemeSheetWriter.js (-367 / +41 lines)
Lines 7-387 Link Here
7
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
7
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
8
 * 
8
 * 
9
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
9
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
10
 * 				 Casey Flynn - Google Inc - Refactor for new styles.
10
 ******************************************************************************/
11
 ******************************************************************************/
11
/*eslint-env browser, amd*/
12
/*eslint-env browser, amd*/
12
13
13
define(['orion/widgets/themes/ThemeClass'], 
14
define([],
14
	function(ThemeClass) {
15
	function() {
15
		
16
		function writeStyleString(themeClass, settings) {
16
		// These values are used to override various themeable element -> color mappings provided by theme data.
17
			if (!settings || !settings.styles) {
17
		var navbar = 'white';
18
				return "";
18
		var button = '#777777';
19
		var location = '#EFEFEF';
20
		var selection = '#cedce7';
21
		var sidepanel = '#F7F7F7';
22
		var mainpanel = 'white';
23
		var navtext = '#bfbfbf';
24
		var content = '#3087B3';
25
		var search = '#444';
26
		var toolpanel = 'white';
27
		
28
		function ThemeSheetWriter(){}
29
		
30
		ThemeSheetWriter.prototype.navbar = navbar;
31
		ThemeSheetWriter.prototype.button = button;
32
		ThemeSheetWriter.prototype.location = location;
33
		ThemeSheetWriter.prototype.selection = selection;
34
		ThemeSheetWriter.prototype.sidepanel = sidepanel;
35
		ThemeSheetWriter.prototype.mainpanel = mainpanel;
36
		ThemeSheetWriter.prototype.navtext = navtext;
37
		ThemeSheetWriter.prototype.content = content;
38
		ThemeSheetWriter.prototype.search = search;
39
		ThemeSheetWriter.prototype.toolpanel = toolpanel;
40
		
41
		function writeNavigationStyle(){
42
		
43
			var styleBlock = '';
44
		
45
			var styles = [];
46
		
47
			var orionPage = new ThemeClass.ThemeClass( 'orionPage' );
48
			orionPage.style.backgroundColor = '#fdfdfd';
49
			orionPage.style.width = '100%';
50
			orionPage.style.height = '100%';
51
			
52
			styles.push( orionPage );
53
			
54
			var topRowBanner = new ThemeClass.ThemeClass( 'topRowBanner' );
55
			topRowBanner.style.margin = '0';
56
			topRowBanner.style.border = '0';
57
			topRowBanner.style.backgroundColor = this.navbar;
58
//			topRowBanner.style.background = 'linear-gradient(to bottom, #959595 0%,#0d0d0d 46%,#010101 50%,#0a0a0a 53%,#1b1b1b 100%)';
59
			/* topRowBanner.style.borderBottom = '1px solid #dddddd'; */
60
			topRowBanner.style.borderBottom = "none";
61
			topRowBanner.style.boxShadow = "0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";
62
			topRowBanner.style.zIndex = "100";
63
			
64
			styles.push( topRowBanner );
65
			
66
			var a = new ThemeClass.ThemeClass( 'a' );
67
			a.style.textDecoration = 'none';
68
			a.style.color = this.content;
69
			
70
			styles.push( a );
71
72
			var navlink = new ThemeClass.ThemeClass( 'navlink' );
73
			navlink.style.display = 'inline-block';
74
			navlink.style.padding = '2px';
75
			navlink.style.color = this.content;
76
			navlink.style.verticalAlign = 'bottom';
77
			
78
			styles.push( navlink );
79
80
81
		/*	var aVisited = new ThemeClass.ThemeClass( 'a:visited' );
82
			aVisited.style.color = this.content;
83
			
84
			styles.push( aVisited );
85
				
86
			var aActive = new ThemeClass.ThemeClass( 'a:active' );
87
			aActive.style.color = this.content;
88
			
89
			styles.push( aActive );
90
			
91
			var aHover = new ThemeClass.ThemeClass( 'a:hover' );
92
			aHover.style.textDecoration = 'underline';
93
			aHover.style.color = this.content;
94
			
95
			styles.push( aHover ); */
96
			
97
			var primaryNav = new ThemeClass.ThemeClass( 'primaryNav' );
98
			primaryNav.style.color = this.navtext;
99
			primaryNav.style.fontSize = '8pt';
100
			primaryNav.style.fontWeight = 'normal';
101
			primaryNav.style.paddingTop = '0';
102
			primaryNav.style.verticalAlign = 'baseline';
103
			
104
			styles.push( primaryNav );
105
			
106
			var primaryNavA = new ThemeClass.ThemeClass( 'primaryNav a' );
107
			primaryNavA.style.fontSize = '8pt'; 
108
			primaryNavA.style.color = this.navtext;
109
			primaryNavA.style.marginRight = '6px';
110
			primaryNavA.style.marginLeft = '6px'; 
111
			primaryNavA.style.verticalAlign = 'baseline';
112
			primaryNavA.style.textDecoration = 'none';
113
			
114
			styles.push( primaryNavA );
115
			
116
			var primaryNavAhover = new ThemeClass.ThemeClass( 'primaryNav a:hover' );
117
			primaryNavAhover.style.color = '#bfbfbf';
118
			primaryNavAhover.style.cursor = 'hand';
119
			primaryNavAhover.style.color = 'white';
120
			primaryNavAhover.style.fontWeight = 'normal';
121
122
			styles.push( primaryNavAhover );
123
			
124
			for( var s in styles ){
125
				styleBlock = styleBlock + styles[s].toString();
126
			}
127
						     
128
			return styleBlock;
129
		}
130
		
131
		ThemeSheetWriter.prototype.writeNavigationStyle = writeNavigationStyle;
132
		
133
		function writeLocationStyle(){
134
		
135
			var styleBlock = '';
136
		
137
			var styles = [];
138
			
139
			var titleArea = new ThemeClass.ThemeClass( 'titleArea' );
140
			titleArea.style.margin = '0';
141
			titleArea.style.paddingTop = '5px';
142
		    titleArea.style.border = '0';
143
		    titleArea.style.background = this.location;
144
			titleArea.style.background = '-webkit-gradient(linear, left top, left bottom, color-stop(0%,' + this.location + '), color-stop(100%,' + this.location + '))';
145
		    titleArea.style.borderBottom = '1px solid ' + this.location ;
146
		    titleArea.style.minHeight = '20px';
147
		    
148
		    styles.push( titleArea );
149
150
			var breadcrumb = new ThemeClass.ThemeClass( 'breadcrumb' );
151
			breadcrumb.style.fontSize = '8pt';
152
			breadcrumb.style.textDecoration = 'none';
153
			breadcrumb.style.color = '#f1f1f2;';
154
			breadcrumb.style.paddingTop = '2px';
155
			
156
			styles.push( breadcrumb );
157
			
158
			var aBreadcrumbHover = new ThemeClass.ThemeClass( 'a.breadcrumb:hover' );
159
			aBreadcrumbHover.style.textDecoration = 'none';
160
			aBreadcrumbHover.style.borderBottom = '1px dotted';
161
			aBreadcrumbHover.style.color = '#F58B0F';
162
			aBreadcrumbHover.style.cursor = 'pointer';
163
			
164
			styles.push( aBreadcrumbHover );
165
166
			var breadcrumbSeparator = new ThemeClass.ThemeClass( 'breadcrumbSeparator' );
167
			breadcrumbSeparator.style.fontSize = '8pt';
168
			breadcrumbSeparator.style.textDecoration = 'none';
169
			breadcrumbSeparator.style.color = this.separator;
170
			breadcrumbSeparator.style.fontWeight = 'bold';
171
			
172
			styles.push( breadcrumbSeparator );
173
			
174
			var currentLocation = new ThemeClass.ThemeClass( 'currentLocation' );
175
			currentLocation.style.fontWeight = 'bold';
176
			currentLocation.style.fontSize = '8pt';
177
			currentLocation.style.color = this.breadcrumb; //this.navbar; // should be a separate themeable item but hard coded for now.
178
			currentLocation.style.textDecoration = 'none';
179
			currentLocation.style.textWrap = 'normal';
180
			currentLocation.style.lineHeight = '10pt';
181
			
182
			styles.push( currentLocation );
183
			
184
			var currentLocationHover = new ThemeClass.ThemeClass( 'a.currentLocation:hover' );
185
			currentLocationHover.style.fontWeight = 'bold';
186
			currentLocationHover.style.fontSize = '10pt';
187
			currentLocationHover.style.color = '#666666';
188
			currentLocationHover.style.textDecoration = 'none';
189
			currentLocationHover.style.borderBottom = '0';
190
			
191
			styles.push( currentLocationHover );
192
			
193
			var navlinkonpage = new ThemeClass.ThemeClass( 'navlinkonpage' );
194
			navlinkonpage.style.color = this.content;
195
			navlinkonpage.style.verticalAlign = 'middle';
196
			
197
			styles.push( navlinkonpage );
198
			
199
			if (this.bannerProgress) {
200
				var progressIndicator = new ThemeClass.ThemeClass( 'topRowBanner .progressPane_running' );
201
				progressIndicator.style.borderColor = this.bannerProgress;
202
				styles.push( progressIndicator );
203
			}	
204
			
205
			for( var s in styles ){
206
				styleBlock = styleBlock + styles[s].toString();
207
			}
19
			}
208
			
20
			
209
			return styleBlock;
21
			var parseStyles = function(object, ancestors, className, result) {
210
		}
22
				if (!ancestors) {
211
		
23
					if (className) {
212
		ThemeSheetWriter.prototype.writeLocationStyle = writeLocationStyle;
24
						parseStyles(object, "." + className, className, result);
213
		
25
					} 
214
		function writeSidePanelStyle(){
26
					return;
215
		
27
				}
216
		}
28
				var localResult = [];
217
		
29
				var keys = Object.keys(object);
218
		function writeButtonStyle(){
30
				keys.forEach(function(key) {
219
		
31
					var value = object[key];
220
			var styleBlock = '';
32
					if (typeof value === "string") {
221
			var styles = [];
33
						localResult.push("\t" + key + ": " + value + ";"); 
222
		
34
					} else {
223
			var commandButton = new ThemeClass.ThemeClass( 'commandButton' );
35
						parseStyles(
224
			commandButton.style.color = '#666';
36
							value,
225
			commandButton.style.border = '1px solid #dedede'; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=386702#c2 
37
							className === key ? ancestors : ancestors + " " +  key,
226
			commandButton.style.backgroundColor = '#ddd';//this.button;
38
							className,
227
			commandButton.style.textAlign = 'center';
39
							result);
228
			commandButton.style.verticalAlign = 'middle';
40
					}
229
			commandButton.style.cursor = 'pointer';
41
				});
230
		    commandButton.style.display = 'inline-block';
42
				if (localResult.length) {
231
		    commandButton.style.padding = '4px 6px';
43
					result.push(ancestors +  " {");
232
		    commandButton.style.borderRadius = '3px';
44
					result.push.apply(result, localResult);
233
		    commandButton.style.lineHeight = '12px';
45
					result.push("}");
234
			commandButton.style.fontSize = '9pt';
46
				}
235
			commandButton.style.userSelect = 'none';
47
			};
236
			//	-webkit-touch-callout: none;
237
			//	-webkit-user-select: none;
238
			//	-khtml-user-select: none;
239
			//	-moz-user-select: none;
240
			//	-ms-user-select: none;
241
			styles.push( commandButton );
242
			
243
			var commandButtonOver = new ThemeClass.ThemeClass( 'commandButton:over' );
244
			commandButtonOver.style.backgroundColor = '#e6e6e6';
245
			commandButtonOver.style.border = '1px solid #808080';
246
			styles.push( commandButtonOver );
247
48
248
			var commandMenu = new ThemeClass.ThemeClass( 'commandMenu' );
49
			var result = [""];
249
			commandMenu.style.color = '#222';
50
			parseStyles(settings.styles, "", themeClass, result);
250
			commandMenu.style.display = 'inline-block';
51
			return result.join("\n");
251
			commandMenu.style.verticalAlign = 'baseline';
252
			commandMenu.style.margin = '0';
253
			commandMenu.style.fontSize = '8pt';
254
			commandMenu.style.fontWeight = 'normal';
255
			commandMenu.style.border = '1px solid #dedede'; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=386702#c2
256
			commandMenu.style.backgroundColor = '#efefef';
257
		    commandMenu.style.cursor = 'pointer';
258
		    commandMenu.style.borderRadius = '1px';
259
			styles.push( commandMenu );
260
	
261
			var commandMenuItem = new ThemeClass.ThemeClass( 'commandMenuItem' );
262
			commandMenuItem.style.border = '0';
263
			commandMenuItem.style.padding = '0';
264
			commandMenuItem.style.margin = '0';
265
			styles.push( commandMenuItem );
266
			
267
			for( var s in styles ){
268
				styleBlock = styleBlock + styles[s].toString();
269
			}
270
			
271
			return styleBlock;
272
		}
273
		
274
		ThemeSheetWriter.prototype.writeButtonStyle = writeButtonStyle;
275
		
276
		function writeMainStyle(){
277
		
278
			var styleBlock = '';
279
		
280
			var styles = [];
281
			
282
			var searchbox = new ThemeClass.ThemeClass( 'searchbox' );
283
			searchbox.style.backgroundImage = 'url(../images/core_sprites.png)';
284
		    searchbox.style.backgroundRepeat = 'no-repeat'; 
285
		    searchbox.style.backgroundPosition = '4px -297px'; 
286
			searchbox.style.width = '12px'; 
287
			searchbox.style.height = '12px';
288
		    searchbox.style.backgroundColor = this.search;
289
			searchbox.style.border = '1px solid ' + this.search;
290
			searchbox.style.fontSize = '11px';
291
			searchbox.style.width = '15em';
292
			searchbox.style.height = '16px';
293
			searchbox.style.borderRadius = '10px'; /* 10px */
294
			searchbox.style.color = '#999';
295
			searchbox.style.padding = '0';
296
			searchbox.style.paddingLeft = '20px';
297
			searchbox.style.marginLeft = '5px';
298
			searchbox.style.marginTop = '6px !important';
299
			searchbox.style.font = '7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important';
300
			
301
			styles.push( searchbox );
302
			
303
			var searchboxFocus = new ThemeClass.ThemeClass( 'searchbox:focus' );
304
			searchboxFocus.style.color = 'white';
305
			searchboxFocus.style.outline = 'none';
306
			
307
			styles.push( searchboxFocus );
308
			
309
			var checkedRow = new ThemeClass.ThemeClass( 'checkedRow' );
310
			checkedRow.style.cssText = 'background-color:' + this.selection + ' !important;';
311
			
312
			styles.push( checkedRow );
313
			
314
			var navItemSelected = new ThemeClass.ThemeClass( 'navbar-item-selected' );
315
			navItemSelected.style.background = this.selection;
316
			navItemSelected.style.color = this.content;
317
			
318
			styles.push( navItemSelected );
319
			
320
			var auxpane = new ThemeClass.ThemeClass( 'auxpane' );
321
			auxpane.style.border = '0';
322
			auxpane.style.background = this.sidepanel;
323
			styles.push( auxpane );
324
			
325
			var mainpane = new ThemeClass.ThemeClass( 'mainpane' );
326
			mainpane.style.background = this.mainpanel;
327
			mainpane.style.border = 0;
328
			
329
			styles.push( mainpane );
330
			
331
			var mainToolbar = new ThemeClass.ThemeClass( 'mainToolbar' );
332
			mainToolbar.style.background = this.toolpanel;
333
			styles.push( mainToolbar );
334
	
335
			for( var s in styles ){
336
				styleBlock = styleBlock + styles[s].toString();
337
			}
338
			
339
			return styleBlock;
340
		}
52
		}
341
		
53
		
342
		ThemeSheetWriter.prototype.writeMainStyle = writeMainStyle;
54
		function ThemeSheetWriter(){}
343
		
344
		function render( anchor ){
345
			console.log( this.writeNavigationStyle() );
346
			console.log( this.writeLocationStyle() );
347
			console.log( this.writeMainStyle() );
348
			console.log( this.writeButtonStyle() );
349
		}
350
		
351
		ThemeSheetWriter.prototype.render = render;
352
		
55
		
353
		function getSheet( settings ){
56
		function getSheet(themeClass, settings ){
354
			//TODO - temporarily disabled
57
			var sheet = writeStyleString(themeClass, settings);
355
			return "";
58
			return sheet;
356
//			if( settings.navbar.value ){	
357
//				this.navbar = settings.navbar.value;
358
//				this.button = settings.button.value;
359
//				this.location = settings.location.value;
360
//				this.selection = settings.selection.value;
361
//				this.sidepanel = settings.sidepanel.value;
362
//				this.mainpanel = settings.mainpanel.value;
363
//				this.navtext = settings.navtext.value;
364
//				this.search = settings.search.value;
365
//				this.content = settings.content.value;
366
//				this.toolpanel = settings.toolpanel.value;
367
//				this.bannerProgress = settings.bannerProgress.value;
368
//			}else{
369
//				this.navbar = settings.navbar;
370
//				this.button = settings.button;
371
//				this.location = settings.location;
372
//				this.selection = settings.selection;
373
//				this.sidepanel = settings.sidepanel;
374
//				this.mainpanel = settings.mainpanel;
375
//				this.navtext = settings.navtext;
376
//				this.search = settings.search;
377
//				this.content = settings.content;
378
//				this.toolpanel = settings.toolpanel;
379
//				this.bannerProgress = settings.bannerProgress;
380
//			}
381
//			
382
//			var sheet = this.writeNavigationStyle() + this.writeLocationStyle() + this.writeMainStyle() + this.writeButtonStyle();
383
//			
384
//			return sheet;
385
		}
59
		}
386
		
60
		
387
		ThemeSheetWriter.prototype.getSheet = getSheet;
61
		ThemeSheetWriter.prototype.getSheet = getSheet;
Lines 391-394 define(['orion/widgets/themes/ThemeClass'], Link Here
391
		};
65
		};
392
66
393
	}
67
	}
394
);
68
);

Return to bug 507788