View | Details | Raw Unified | Return to bug 43999
Collapse All | Expand All

(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-app-appliance/templates/setup_style.css (-1 / +1 lines)
 Lines 26-32    Link Here 
26
	background-size: auto 20px;
26
	background-size: auto 20px;
27
}
27
}
28
28
29
.umc .umcCard .dijitDefaultButton .dijitButtonText {
29
.umc .umcInlineDialog .dijitDefaultButton .dijitButtonText {
30
	color: %(primary_color)s;
30
	color: %(primary_color)s;
31
}
31
}
32
32
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-app-appliance/templates/system_activation_style.css (-2 / +2 lines)
 Lines 26-33    Link Here 
26
	background-size: auto 20px;
26
	background-size: auto 20px;
27
}
27
}
28
28
29
.umc .umcWizard.umcCard .dijitDefaultButton .dijitButtonText,
29
.umc .umcWizard.umcInlineDialog .dijitDefaultButton .dijitButtonText,
30
.umc .umcWizard.umcCard .dijitUploader .dijitButtonText {
30
.umc .umcWizard.umcInlineDialog .dijitUploader .dijitButtonText {
31
	color: %(primary_color)s;
31
	color: %(primary_color)s;
32
}
32
}
33
33
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-firewall/umc/js/firewall.js (-3 / +3 lines)
 Lines 221-231    Link Here 
221
			var _confirmDialog = lang.hitch(this, function() {
221
			var _confirmDialog = lang.hitch(this, function() {
222
				var message = _('Are you sure to delete the %d selected firewall rule(s)?', ids.length);
222
				var message = _('Are you sure to delete the %d selected firewall rule(s)?', ids.length);
223
				dialog.confirm(message, [{
223
				dialog.confirm(message, [{
224
					label: _('Cancel'),
225
					'default': true
226
				}, {
224
					label: _('Delete'),
227
					label: _('Delete'),
225
					callback: _remove
228
					callback: _remove
226
				}, {
227
					label: _('Cancel'),
228
					'default': true
229
				}]);
229
				}]);
230
			});
230
			});
231
231
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-quota/umc/js/quota/PartitionPage.js (-2 / +3 lines)
 Lines 215-220    Link Here 
215
				dialogMessage = _('Please confirm to remove the following %(length)s users: %(usernames)s', {'usernames': usernames, 'length': usernames.length});
215
				dialogMessage = _('Please confirm to remove the following %(length)s users: %(usernames)s', {'usernames': usernames, 'length': usernames.length});
216
			}
216
			}
217
			dialog.confirm(dialogMessage, [{
217
			dialog.confirm(dialogMessage, [{
218
				label: _('Cancel'),
219
				'default': true
220
			}, {
218
				label: _('OK'),
221
				label: _('OK'),
219
				callback: lang.hitch(this, function() {
222
				callback: lang.hitch(this, function() {
220
					var transaction = this.moduleStore.transaction();
223
					var transaction = this.moduleStore.transaction();
 Lines 237-244    Link Here 
237
						}
240
						}
238
					}));
241
					}));
239
				})
242
				})
240
			}, {
241
				label: _('Cancel')
242
			}]);
243
			}]);
243
		}
244
		}
244
	});
245
	});
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-quota/umc/js/quota.js (-3 / +3 lines)
 Lines 194-199    Link Here 
194
				dialogMessage = _('Please confirm quota support deactivation on device: %s', [partitionDevice]);
194
				dialogMessage = _('Please confirm quota support deactivation on device: %s', [partitionDevice]);
195
			}
195
			}
196
			dialog.confirm(dialogMessage, [{
196
			dialog.confirm(dialogMessage, [{
197
				label: _('Cancel'),
198
				'default': true
199
			}, {
197
				label: _('OK'),
200
				label: _('OK'),
198
				callback: lang.hitch(this, function() {
201
				callback: lang.hitch(this, function() {
199
					var cmd = 'quota/partitions/' + (doActivate ? 'activate' : 'deactivate');
202
					var cmd = 'quota/partitions/' + (doActivate ? 'activate' : 'deactivate');
 Lines 206-214    Link Here 
206
						}
209
						}
207
					}));
210
					}));
208
				})
211
				})
209
			}, {
210
				label: _('Cancel'),
211
				'default': true
212
			}]);
212
			}]);
213
		},
213
		},
214
214
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-system-activation/www/main.js (-1 / +1 lines)
 Lines 90-96    Link Here 
90
90
91
		createWizard: function() {
91
		createWizard: function() {
92
			this._wizard = new ActivationWizard({
92
			this._wizard = new ActivationWizard({
93
				'class': 'umcCard',
93
				'class': 'umcInlineDialog',
94
				entries: entries
94
				entries: entries
95
			});
95
			});
96
			var contentNode = dom.byId('content');
96
			var contentNode = dom.byId('content');
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-system-activation/www/style.styl (-12 / +1 lines)
 Lines 48-73    Link Here 
48
				height: 100%
48
				height: 100%
49
				margin-left: 12px
49
				margin-left: 12px
50
	
50
	
51
	.umcWizard.umcCard
51
	.umcWizard.umcInlineDialog
52
		max-width: 700px
52
		max-width: 700px
53
53
54
		ol
54
		ol
55
			margin: 10px 0
55
			margin: 10px 0
56
56
57
		.dijitDefaultButton,
58
		.dijitUploader
59
			.dijitButtonText
60
				color: $ucs-green
61
62
		.umcPage
57
		.umcPage
63
			.umcLabelPaneLabeNodeBottom
58
			.umcLabelPaneLabeNodeBottom
64
				display: none
59
				display: none
65
60
66
			.umcPageNav
61
			.umcPageNav
67
				margin-top: 20px
68
				margin-bottom: 0
62
				margin-bottom: 0
69
70
				.umcPageHeader
71
					h1
72
						font-size: 24px
73
						font-weight: normal
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-system-setup/umc/js/setup/InterfaceWizard.js (-2 / +2 lines)
 Lines 630-637    Link Here 
630
					var description = string.substitute('<ul><li>${0}: ${1}</li><li>${2}: ${3}</li></ul>', [_('Gateway'), result.gateway || _('None'), _('Nameserver'), nameservers]);
630
					var description = string.substitute('<ul><li>${0}: ${1}</li><li>${2}: ${3}</li></ul>', [_('Gateway'), result.gateway || _('None'), _('Nameserver'), nameservers]);
631
631
632
					dialog.confirm(_('Should the nameserver and gateway be set: %s', description), [
632
					dialog.confirm(_('Should the nameserver and gateway be set: %s', description), [
633
						{label: _('set'), name: 'yes', 'default': true},
633
						{label: _("don't set"), name: 'no'},
634
						{label: _("don't set"), name: 'no'}
634
						{label: _('set'), name: 'yes', 'default': true}
635
					]).then(lang.hitch(this, function(answer) {
635
					]).then(lang.hitch(this, function(answer) {
636
						if (answer === 'yes') {
636
						if (answer === 'yes') {
637
							this.setValues({
637
							this.setValues({
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-system-setup/usr/share/univention-system-setup/www/main.js (-1 / +1 lines)
 Lines 133-139    Link Here 
133
133
134
			this.wizard = new ApplianceWizard({
134
			this.wizard = new ApplianceWizard({
135
				//progressBar: progressBar
135
				//progressBar: progressBar
136
				'class': this.local_mode ? '' : 'umcCard',
136
				'class': this.local_mode ? '' : 'umcInlineDialog',
137
				moduleID: this.moduleID,
137
				moduleID: this.moduleID,
138
				disabledPages: pageBlacklist,
138
				disabledPages: pageBlacklist,
139
				disabledFields: fieldBlacklist,
139
				disabledFields: fieldBlacklist,
(-)a/branches/ucs-4.2/ucs-4.2-1/base/univention-system-setup/usr/share/univention-system-setup/www/style.styl (-3 / +3 lines)
 Lines 35-41    Link Here 
35
	min-height: 100%
35
	min-height: 100%
36
36
37
	@media (min-width: 768px)
37
	@media (min-width: 768px)
38
		.container:not(.umcCard)
38
		.container:not(.umcInlineDialog)
39
			width: 100%;
39
			width: 100%;
40
40
41
	/* standby animation */
41
	/* standby animation */
 Lines 66-72    Link Here 
66
				width: 100%
66
				width: 100%
67
67
68
	.umcPage
68
	.umcPage
69
		margin-top: 65px
69
		margin-top: 41px
70
70
71
		.umcPageNav .umcPageHeader
71
		.umcPageNav .umcPageHeader
72
			position: absolute
72
			position: absolute
 Lines 77-83    Link Here 
77
				font-weight: normal
77
				font-weight: normal
78
				width: 600px
78
				width: 600px
79
79
80
	.umcCard
80
	.umcInlineDialog
81
		/* the content is displayed as a Google Material Card in an external browser */
81
		/* the content is displayed as a Google Material Card in an external browser */
82
		max-width: 970px
82
		max-width: 970px
83
83
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-appcenter/umc/js/appcenter/PackagesPage.js (-8 / +9 lines)
 Lines 192-198    Link Here 
192
192
193
					this._grid.standby(false);
193
					this._grid.standby(false);
194
194
195
					var head_style	= 'font-size:120%;font-weight:bold;margin:.5em;text-decoration:underline;';
195
					var head_style	= 'font-size:120%;font-weight:bold;margin-bottom:.5em;text-decoration:underline;';
196
					var label_style = 'vertical-align:top;text-align:right;padding-left:1em;padding-right:.5em;white-space:nowrap;font-weight:bold;';
196
					var label_style = 'vertical-align:top;text-align:right;padding-left:1em;padding-right:.5em;white-space:nowrap;font-weight:bold;';
197
					var data_style	= 'vertical-align:top;padding-bottom:.25em;';
197
					var data_style	= 'vertical-align:top;padding-bottom:.25em;';
198
198
 Lines 228-233    Link Here 
228
					}));
228
					}));
229
					txt += "</table>\n";
229
					txt += "</table>\n";
230
					var buttons = [];
230
					var buttons = [];
231
					// always: a button to close the dialog.
232
					buttons.push({
233
						name: 'cancel',
234
						'default': true,
235
						label: _("Close")
236
					});
237
231
					if (this._can_install(data.result)) {
238
					if (this._can_install(data.result)) {
232
						buttons.push({
239
						buttons.push({
233
							name: 'install',
240
							name: 'install',
 Lines 255-266    Link Here 
255
							})
262
							})
256
						});
263
						});
257
					}
264
					}
258
					// always: a button to close the dialog.
259
					buttons.push({
260
						name: 'cancel',
261
						'default': true,
262
						label: _("Close")
263
					});
264
265
265
					var confirmDialog = new ConfirmDialog({
266
					var confirmDialog = new ConfirmDialog({
266
						title: _('Package details'),
267
						title: _('Package details'),
 Lines 436-442    Link Here 
436
					];
437
					];
437
				}
438
				}
438
439
439
				dialog.confirm('<h2>' + headline + '</h2>' + txt, buttons);
440
				dialog.confirm('<h2 style="margin-top:0;">' + headline + '</h2>' + txt, buttons);
440
			}));
441
			}));
441
		},
442
		},
442
443
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-join/umc/js/join.js (-4 / +4 lines)
 Lines 240-254    Link Here 
240
				if (this._serverRole == 'domaincontroller_master') {
240
				if (this._serverRole == 'domaincontroller_master') {
241
					// we do not need credentials on DC master
241
					// we do not need credentials on DC master
242
					dialog.confirm(_('The following join scripts will be executed: ') + txtscripts, [{
242
					dialog.confirm(_('The following join scripts will be executed: ') + txtscripts, [{
243
						name: 'cancel',
244
						label: 'Cancel',
245
						'default': true
246
					}, {
243
						name: 'run',
247
						name: 'run',
244
						label: _('Run join scripts'),
248
						label: _('Run join scripts'),
245
						callback: lang.hitch(this, function() {
249
						callback: lang.hitch(this, function() {
246
							this.runJoinScripts(scripts, force, {});
250
							this.runJoinScripts(scripts, force, {});
247
						})
251
						})
248
					}, {
249
						name: 'cancel',
250
						label: 'Cancel',
251
						'default': true
252
					}]);
252
					}]);
253
				} else {
253
				} else {
254
					this.getCredentials(txtscripts).then(lang.hitch(this, function(credentials) {
254
					this.getCredentials(txtscripts).then(lang.hitch(this, function(credentials) {
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/umc-module-templates/simple_form/umc/js/MODULEID.js (-3 / +3 lines)
 Lines 156-168    Link Here 
156
					var values = this._form.get('value');
156
					var values = this._form.get('value');
157
					if ( values.message ) {
157
					if ( values.message ) {
158
						dialog.confirm( _( 'Should the UMC module be closed? All unsaved modification will be lost.' ), [ {
158
						dialog.confirm( _( 'Should the UMC module be closed? All unsaved modification will be lost.' ), [ {
159
							label: _( 'Cancel' ),
160
							'default': true
161
						}, {
159
							label: _( 'Close' ),
162
							label: _( 'Close' ),
160
							callback: lang.hitch( this, function() {
163
							callback: lang.hitch( this, function() {
161
								topic.publish('/umc/tabs/close', [ this ] );
164
								topic.publish('/umc/tabs/close', [ this ] );
162
							} )
165
							} )
163
						}, {
164
							label: _( 'Cancel' ),
165
							'default': true
166
						} ] );
166
						} ] );
167
					} else {
167
					} else {
168
						topic.publish('/umc/tabs/close', [ this ] );
168
						topic.publish('/umc/tabs/close', [ this ] );
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/www/management/widgets/ActivationDialog.js (-4 / +5 lines)
 Lines 41-54    Link Here 
41
	"umc/widgets/Wizard",
41
	"umc/widgets/Wizard",
42
	"umc/widgets/Text",
42
	"umc/widgets/Text",
43
	"umc/widgets/ProgressBar",
43
	"umc/widgets/ProgressBar",
44
	"umc/widgets/StandbyMixin",
44
	"./ActivationPage!",  // needs to be loaded as AMD plugin
45
	"./ActivationPage!",  // needs to be loaded as AMD plugin
45
	"./LicenseImportPage!",  // needs to be loaded as AMD plugin
46
	"./LicenseImportPage!",  // needs to be loaded as AMD plugin
46
	"./FinishedActivationPage",
47
	"./FinishedActivationPage",
47
	"umc/i18n!management"
48
	"umc/i18n!management"
48
], function(declare, lang, array, domClass, when, topic, Dialog, tools, dialog, Wizard, Text, ProgressBar,
49
], function(declare, lang, array, domClass, when, topic, Dialog, tools, dialog, Wizard, Text, ProgressBar,
49
		ActivationPage, LicenseImportPage, FinishedActivationPage, _) {
50
		StandbyMixin, ActivationPage, LicenseImportPage, FinishedActivationPage, _) {
50
51
51
	return declare(Dialog, {
52
	return declare([Dialog, StandbyMixin], {
52
		// summary:
53
		// summary:
53
		//		The dialog which is shown during the first login of Administrator.
54
		//		The dialog which is shown during the first login of Administrator.
54
55
 Lines 98-104    Link Here 
98
						return success ? nextPage : pageName;
99
						return success ? nextPage : pageName;
99
					});
100
					});
100
					thisDialog._progressBar.setInfo(_('Sending activation email...'), null, Infinity);
101
					thisDialog._progressBar.setInfo(_('Sending activation email...'), null, Infinity);
101
					this.standbyDuring(deferred, thisDialog._progressBar);
102
					thisDialog.standbyDuring(deferred, thisDialog._progressBar);
102
					return deferred;
103
					return deferred;
103
				},
104
				},
104
105
 Lines 137-143    Link Here 
137
			licenseUploader.onImportLicense = lang.hitch(this, function(deferred) {
138
			licenseUploader.onImportLicense = lang.hitch(this, function(deferred) {
138
				this._progressBar.setInfo(_('Importing license data...'), null, Infinity);
139
				this._progressBar.setInfo(_('Importing license data...'), null, Infinity);
139
				topic.publish('/umc/actions', 'activation-wizard', 'licenseImport', 'upload');
140
				topic.publish('/umc/actions', 'activation-wizard', 'licenseImport', 'upload');
140
				this._wizard.standbyDuring(deferred, this._progressBar);
141
				this.standbyDuring(deferred, this._progressBar);
141
				deferred.then(lang.hitch(this, function() {
142
				deferred.then(lang.hitch(this, function() {
142
					// activation has been successful -> close dialogue
143
					// activation has been successful -> close dialogue
143
					topic.publish('/umc/actions', 'activation-wizard', 'licenseImport', 'success');
144
					topic.publish('/umc/actions', 'activation-wizard', 'licenseImport', 'success');
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-services/umc/js/services.js (-3 / +3 lines)
 Lines 230-235    Link Here 
230
			confirmMessage += '</ul>';
230
			confirmMessage += '</ul>';
231
231
232
			dialog.confirm(confirmMessage, [{
232
			dialog.confirm(confirmMessage, [{
233
				'default': true,
234
				label: _('Cancel')
235
			}, {
233
				label: _('OK'),
236
				label: _('OK'),
234
				callback: lang.hitch(this, function() {
237
				callback: lang.hitch(this, function() {
235
					this.standbyDuring(tools.umcpCommand(command, data)).then(lang.hitch(this, function(response) {
238
					this.standbyDuring(tools.umcpCommand(command, data)).then(lang.hitch(this, function(response) {
 Lines 236-244    Link Here 
236
						this.reloadGrid();
239
						this.reloadGrid();
237
					}));
240
					}));
238
				})
241
				})
239
			}, {
240
				'default': true,
241
				label: _('Cancel')
242
			}]);
242
			}]);
243
		}
243
		}
244
	});
244
	});
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-top/umc/js/top.js (-3 / +3 lines)
 Lines 64-69    Link Here 
64
				msg = _('Please confirm sending %(signal)s to the %(processid)s selected processes!', {signal: signal, processid: pids.length});
64
				msg = _('Please confirm sending %(signal)s to the %(processid)s selected processes!', {signal: signal, processid: pids.length});
65
			}
65
			}
66
			dialog.confirm(msg, [{
66
			dialog.confirm(msg, [{
67
				'default': true,
68
				label: _('Cancel')
69
			}, {
67
				label: _('OK'),
70
				label: _('OK'),
68
				callback: lang.hitch(this, function() {
71
				callback: lang.hitch(this, function() {
69
					this.standbyDuring(this.umcpCommand('top/kill', params)).then(lang.hitch(this, function() {
72
					this.standbyDuring(this.umcpCommand('top/kill', params)).then(lang.hitch(this, function() {
 Lines 71-79    Link Here 
71
						this.reloadGrid();
74
						this.reloadGrid();
72
					}));
75
					}));
73
				})
76
				})
74
			}, {
75
				'default': true,
76
				label: _('Cancel')
77
			}]);
77
			}]);
78
		},
78
		},
79
79
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-ucr/umc/js/ucr.js (-10 / +9 lines)
 Lines 102-114    Link Here 
102
			}];
102
			}];
103
103
104
			var buttons = [{
104
			var buttons = [{
105
				name: 'submit',
106
				label: _( 'Save' ),
107
				style: 'float: right',
108
				callback: lang.hitch(this, function() {
109
					this._form.save();
110
				})
111
			}, {
112
				//FIXME: Should be much simpler. The key name should be enough
105
				//FIXME: Should be much simpler. The key name should be enough
113
				name: 'cancel',
106
				name: 'cancel',
114
				label: _( 'Cancel' ),
107
				label: _( 'Cancel' ),
 Lines 115-120    Link Here 
115
				callback: lang.hitch(this, function() {
108
				callback: lang.hitch(this, function() {
116
					this.hide();
109
					this.hide();
117
				})
110
				})
111
			}, {
112
				name: 'submit',
113
				label: _( 'Save' ),
114
				callback: lang.hitch(this, function() {
115
					this._form.save();
116
				})
118
			}];
117
			}];
119
118
120
			var layout = ['key', 'value', 'description'];//, ['categories']];
119
			var layout = ['key', 'value', 'description'];//, ['categories']];
 Lines 257-262    Link Here 
257
				isMultiAction: true,
256
				isMultiAction: true,
258
				callback: lang.hitch(this, function(ids) {
257
				callback: lang.hitch(this, function(ids) {
259
					dialog.confirm(_('Are you sure to delete the %d selected UCR variable(s)?', ids.length), [{
258
					dialog.confirm(_('Are you sure to delete the %d selected UCR variable(s)?', ids.length), [{
259
						label: _('Cancel'),
260
						'default': true
261
					}, {
260
						label: _('Delete'),
262
						label: _('Delete'),
261
						callback: lang.hitch(this, function() {
263
						callback: lang.hitch(this, function() {
262
							// remove the selected elements via a transaction on the module store
264
							// remove the selected elements via a transaction on the module store
 Lines 264-272    Link Here 
264
							array.forEach(ids, lang.hitch(this.moduleStore, 'remove'));
266
							array.forEach(ids, lang.hitch(this.moduleStore, 'remove'));
265
							transaction.commit();
267
							transaction.commit();
266
						})
268
						})
267
					}, {
268
						label: _('Cancel'),
269
						'default': true
270
					}]);
269
					}]);
271
270
272
				})
271
				})
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-udm/umc/js/udm/CreateReportDialog.js (-9 / +6 lines)
 Lines 94-111    Link Here 
94
94
95
			// buttons
95
			// buttons
96
			var buttons = [ {
96
			var buttons = [ {
97
				name: 'create',
98
				label: _('Create'),
99
				defaultButton: true,
100
				callback: lang.hitch(this, function() {
101
					this.onDone(this._form.get('value'));
102
				})
103
			}, {
104
				name: 'cancel',
97
				name: 'cancel',
105
				label: _('Cancel'),
98
				label: _('Cancel'),
106
				callback: lang.hitch(this, function() {
99
				callback: lang.hitch(this, function() {
107
					this.destroyRecursive();
100
					this.destroyRecursive();
108
				})
101
				})
102
			}, {
103
				name: 'submit',
104
				label: _('Create'),
105
				callback: lang.hitch(this, function() {
106
					this.onDone(this._form.get('value'));
107
				})
109
			} ];
108
			} ];
110
109
111
			// now create a Form
110
			// now create a Form
 Lines 209-221    Link Here 
209
				this._container.addChild(new Text({content: message}));
208
				this._container.addChild(new Text({content: message}));
210
209
211
				var btnContainer = new ContainerWidget({
210
				var btnContainer = new ContainerWidget({
212
					style: 'text-align: center;',
213
					'class' : 'umcButtonRow'
211
					'class' : 'umcButtonRow'
214
				});
212
				});
215
				btnContainer.addChild(new Button({
213
				btnContainer.addChild(new Button({
216
					defaultButton: true,
214
					defaultButton: true,
217
					label: _('Close'),
215
					label: _('Close'),
218
					style: 'margin-left: auto;',
219
					callback: lang.hitch(this, function() {
216
					callback: lang.hitch(this, function() {
220
						this.destroyRecursive();
217
						this.destroyRecursive();
221
					})
218
					})
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-udm/umc/js/udm/LicenseImportDialog.js (-9 / +12 lines)
 Lines 42-49    Link Here 
42
	"umc/widgets/TextArea",
42
	"umc/widgets/TextArea",
43
	"umc/widgets/Uploader",
43
	"umc/widgets/Uploader",
44
	"umc/widgets/ProgressBar",
44
	"umc/widgets/ProgressBar",
45
	"umc/widgets/Button",
45
	"umc/i18n!umc/modules/udm"
46
	"umc/i18n!umc/modules/udm"
46
], function(declare, lang, domClass, tools, dialog, render, ContainerWidget, ConfirmDialog, StandbyMixin, Text, TextArea, Uploader, ProgressBar, _) {
47
], function(declare, lang, domClass, tools, dialog, render, ContainerWidget, ConfirmDialog, StandbyMixin, Text, TextArea, Uploader, ProgressBar, Button, _) {
47
48
48
	return declare('umc.modules.udm.LicenseImportDialog', [ConfirmDialog, StandbyMixin], {
49
	return declare('umc.modules.udm.LicenseImportDialog', [ConfirmDialog, StandbyMixin], {
49
		// summary:
50
		// summary:
 Lines 96-104    Link Here 
96
					}
97
					}
97
					this._handleUploaded(result);
98
					this._handleUploaded(result);
98
				})
99
				})
99
			}]);
100
			}, {
100
101
				type: Button,
101
			var buttons = [{
102
				name : 'btnLicenseText',
102
				name : 'btnLicenseText',
103
				label : _('Import from text field'),
103
				label : _('Import from text field'),
104
				callback: lang.hitch(this, function() {
104
				callback: lang.hitch(this, function() {
 Lines 114-122    Link Here 
114
						})
114
						})
115
					), this._progressBar);
115
					), this._progressBar);
116
				})
116
				})
117
			}, {
117
			}]);
118
				name: 'submit', // workaround for a style as default button
118
119
				style: 'float: right',
119
			this.options = [{
120
				'default': true,
121
				name: 'close',
120
				label: _('Close'),
122
				label: _('Close'),
121
				callback: lang.hitch(this, function() {
123
				callback: lang.hitch(this, function() {
122
					this.close();
124
					this.close();
 Lines 128-136    Link Here 
128
				'message',
130
				'message',
129
				'licenseUpload',
131
				'licenseUpload',
130
				'licenseText',
132
				'licenseText',
131
				['btnLicenseText', 'submit']
133
				'btnLicenseText'
132
			], this._widgets, render.buttons(buttons));
134
			], this._widgets);
133
			domClass.add(content.domNode, 'col-xxs-12 col-xs-8');
135
			domClass.add(content.domNode, 'col-xxs-12 col-xs-8');
136
			domClass.add(this._widgets.btnLicenseText.$refLabel$.domNode, 'umcUploader');
134
			this.message.addChild(content);
137
			this.message.addChild(content);
135
		},
138
		},
136
139
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-udm/umc/js/udm/NewObjectDialog.js (-5 / +6 lines)
 Lines 38-51    Link Here 
38
	"dijit/Dialog",
38
	"dijit/Dialog",
39
	"dijit/layout/StackContainer",
39
	"dijit/layout/StackContainer",
40
	"umc/tools",
40
	"umc/tools",
41
	"umc/widgets/StandbyMixin",
41
	"umc/modules/udm/cache",
42
	"umc/modules/udm/cache",
42
	"umc/modules/udm/wizards/FirstPageWizard",
43
	"umc/modules/udm/wizards/FirstPageWizard",
43
	"umc/modules/udm/NotificationText",
44
	"umc/modules/udm/NotificationText",
44
	"umc/modules/udm/UsernameMaxLengthChecker",
45
	"umc/modules/udm/UsernameMaxLengthChecker",
45
	"umc/i18n!umc/modules/udm"
46
	"umc/i18n!umc/modules/udm"
46
], function(declare, lang, array, topic, all, Deferred, Dialog, StackContainer, tools, cache, FirstPageWizard, NotificationText, UsernameMaxLengthChecker, _) {
47
], function(declare, lang, array, topic, all, Deferred, Dialog, StackContainer, tools, StandbyMixin, cache, FirstPageWizard, NotificationText, UsernameMaxLengthChecker, _) {
47
48
48
	return declare("umc.modules.udm.NewObjectDialog", [ Dialog ], {
49
	return declare("umc.modules.udm.NewObjectDialog", [ Dialog, StandbyMixin ], {
49
		// summary:
50
		// summary:
50
		//		Dialog class for creating a new LDAP object.
51
		//		Dialog class for creating a new LDAP object.
51
52
 Lines 201-207    Link Here 
201
				wizardDeferred.reject();
202
				wizardDeferred.reject();
202
			}
203
			}
203
			this._readyForCreateWizard = new Deferred();
204
			this._readyForCreateWizard = new Deferred();
204
			this._preWizard.standbyDuring(all([this.createWizardAdded, wizardDeferred]));
205
			this.standbyDuring(all([this.createWizardAdded, wizardDeferred]));
205
			this.onFirstPageFinished(firstPageValues);
206
			this.onFirstPageFinished(firstPageValues);
206
207
207
			wizardDeferred.then(
208
			wizardDeferred.then(
 Lines 227-233    Link Here 
227
						this._wizardContainer.selectChild(createWizard);
228
						this._wizardContainer.selectChild(createWizard);
228
						this.createWizardAdded.resolve();
229
						this.createWizardAdded.resolve();
229
						var finishWizard = lang.hitch(this, function(wizardFormValues, submit) {
230
						var finishWizard = lang.hitch(this, function(wizardFormValues, submit) {
230
							createWizard.standbyDuring(detailsValues.detailPage.ready()).then(lang.hitch(this, function() {
231
							this.standbyDuring(detailsValues.detailPage.ready()).then(lang.hitch(this, function() {
231
								lang.mixin(detailsValues.detailPage.templateObject._userChanges, createWizard.templateObject._userChanges);
232
								lang.mixin(detailsValues.detailPage.templateObject._userChanges, createWizard.templateObject._userChanges);
232
								tools.forIn(wizardFormValues, lang.hitch(this, function(key, val) {
233
								tools.forIn(wizardFormValues, lang.hitch(this, function(key, val) {
233
									detailsValues.detailPage._form.getWidget(key).set('value', val);
234
									detailsValues.detailPage._form.getWidget(key).set('value', val);
 Lines 237-243    Link Here 
237
									detailsValues.detailPage._form.ready().then(lang.hitch(this, function() {
238
									detailsValues.detailPage._form.ready().then(lang.hitch(this, function() {
238
										var saveDeferred = detailsValues.detailPage.save();
239
										var saveDeferred = detailsValues.detailPage.save();
239
										if (saveDeferred.then) {
240
										if (saveDeferred.then) {
240
											createWizard.standbyDuring(saveDeferred);
241
											this.standbyDuring(saveDeferred);
241
											saveDeferred.then(
242
											saveDeferred.then(
242
												lang.hitch(this, function() {
243
												lang.hitch(this, function() {
243
													this._notificationText.showSuccess(_('The %s has been created.', createWizard.objectName()));
244
													this._notificationText.showSuccess(_('The %s has been created.', createWizard.objectName()));
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-udm/umc/js/udm/NotificationText.js (-1 / +3 lines)
 Lines 66-72    Link Here 
66
66
67
			domStyle.set(this.domNode, {
67
			domStyle.set(this.domNode, {
68
				height: "0",
68
				height: "0",
69
				margin: "-1.61em -1.6em 1em -1.6em",
69
				margin: "0 -24px",
70
				position: "relative",
70
				position: "relative",
71
				"-webkit-transition": "height 1s",
71
				"-webkit-transition": "height 1s",
72
				"transition": "height 1s",
72
				"transition": "height 1s",
 Lines 101-106    Link Here 
101
				this.set('message', message);
101
				this.set('message', message);
102
				domStyle.set(this.domNode, {
102
				domStyle.set(this.domNode, {
103
					padding: "0.3em 1.6em",
103
					padding: "0.3em 1.6em",
104
					"margin-bottom": "8px",
104
					height: "auto"
105
					height: "auto"
105
				});
106
				});
106
			}));
107
			}));
 Lines 109-114    Link Here 
109
		_hideMessage: function(stopDeferred) {
110
		_hideMessage: function(stopDeferred) {
110
			domStyle.set(this.domNode, {
111
			domStyle.set(this.domNode, {
111
				padding: "0",
112
				padding: "0",
113
				"margin-bottom": "",
112
				height: "0"
114
				height: "0"
113
			});
115
			});
114
116
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console-module-udm/umc/js/udm.js (-2 / +1 lines)
 Lines 1802-1809    Link Here 
1802
				}, {
1802
				}, {
1803
					name: 'remove',
1803
					name: 'remove',
1804
					label: _('Delete'),
1804
					label: _('Delete'),
1805
					callback: _remove,
1805
					callback: _remove
1806
					style: 'float:right'
1807
				}]
1806
				}]
1808
				//layout: [ 'text', [ 'deleteReferring', 'submit' ] ]
1807
				//layout: [ 'text', [ 'deleteReferring', 'submit' ] ]
1809
			});
1808
			});
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-self-service/www/PasswordForgotten.js (-1 / +1 lines)
 Lines 173-179    Link Here 
173
				label: _('Next'),
173
				label: _('Next'),
174
				onClick: lang.hitch(this, '_requestToken')
174
				onClick: lang.hitch(this, '_requestToken')
175
			});
175
			});
176
			var buttonRow = put(step, 'div.buttonRow');
176
			var buttonRow = put(step, 'div.buttonRow.umcPageFooter');
177
			put(buttonRow, this._requestTokenButton.domNode);
177
			put(buttonRow, this._requestTokenButton.domNode);
178
			put(this.steps, step);
178
			put(this.steps, step);
179
			var firstRenewOptions = renewOptions.firstChild.children[2].firstChild;
179
			var firstRenewOptions = renewOptions.firstChild.children[2].firstChild;
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-self-service/www/css/self-service.styl (-2 / +30 lines)
 Lines 21-27    Link Here 
21
}
21
}
22
22
23
ol.PasswordOl {
23
ol.PasswordOl {
24
	margin-left: 0;
24
	margin: 0
25
	padding-right: 0;
25
	padding-right: 0;
26
	padding-left: 0;
26
	padding-left: 0;
27
	list-style-type: none;
27
	list-style-type: none;
 Lines 45-51    Link Here 
45
		text-align: right;
45
		text-align: right;
46
46
47
		.dijitButton {
47
		.dijitButton {
48
			margin: 0.6em 0 0 0.6em;
48
			margin: 24px 0 0 !important; 
49
50
			&:not(:first-child) {
51
				margin-left: 8px !important;
52
			}
49
		}
53
		}
50
	}
54
	}
51
55
 Lines 53-58    Link Here 
53
		margin-bottom: 1.5em;
57
		margin-bottom: 1.5em;
54
	}
58
	}
55
59
60
	li:last-of-type .dijitTextBox:last-child {
61
		margin-bottom: 0;
62
	}
63
64
	&#PasswordForgottenSteps {
65
		li:last-of-type .dijitTextBox {
66
			margin-bottom: 0;
67
		}
68
	}
56
}
69
}
57
70
58
ol#PasswordForgottenSteps li.step::before {
71
ol#PasswordForgottenSteps li.step::before {
 Lines 133-135    Link Here 
133
	padding: 1.3em;
146
	padding: 1.3em;
134
	background-color: rgb(20, 240, 10);
147
	background-color: rgb(20, 240, 10);
135
}
148
}
149
150
div.PasswordServiceContent
151
	padding: 24px 24px 8px !important
152
	padding: 0 !important
153
154
	.PasswordServiceContentChild
155
		padding: 24px 24px 8px
156
		overflow: visible
157
158
		h2
159
			line-height: 28px
160
			margin: 20px 0
161
		
162
		.PasswordOl .buttonRow
163
			margin: 0 -16px
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-self-service/www/main.js (+1 lines)
 Lines 104-109    Link Here 
104
104
105
					// create page object
105
					// create page object
106
					var subpage = new ContentPane({
106
					var subpage = new ContentPane({
107
						"class": "PasswordServiceContentChild",
107
						content: content,
108
						content: content,
108
						page_name: page_name
109
						page_name: page_name
109
					});
110
					});
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/css/Dialog.styl (-63 / +136 lines)
 Lines 1-31    Link Here 
1
/* Dialog 
1
/* Dialog
2
 * 
2
 *
3
 * Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
3
 * Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
4
 * 
4
 *
5
 * Dialog:
5
 * Dialog:
6
 * 1. Dialog (default styling): 
6
 * 1. Dialog (default styling):
7
 * 		.dijitDialog - styles for dialog's bounding box
7
 * 		.dijitDialog - styles for dialog's bounding box
8
 *
8
 *
9
 * 2. Dialog title 
9
 * 2. Dialog title
10
 * 		.dijitDialogTitleBar - styles for the title container at the top of dialog
10
 * 		.dijitDialogTitleBar - styles for the title container at the top of dialog
11
 * 		.dijitDialogTitle - the text container in dialog title
11
 * 		.dijitDialogTitle - the text container in dialog title
12
 * 
12
 *
13
 * 3. Dialog content 
13
 * 3. Dialog content
14
 * 		.dijitDialogPaneContent - main container for content area and action bar
14
 * 		.dijitDialogPaneContent - main container for content area and action bar
15
 * 		.dijitDialogPaneContentArea - styles for content container
15
 * 		.dijitDialogPaneContentArea - styles for content container
16
 * 
16
 *
17
 * 4. Dialog action bar 
17
 * 4. Dialog action bar
18
 * 		.dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
18
 * 		.dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
19
 * 
19
 *
20
 * 5. Dialog underlay 
20
 * 5. Dialog underlay
21
 * 		.dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
21
 * 		.dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
22
 * 
22
 *
23
 * 
23
 *
24
 * Tooltip & TooltipDialog:
24
 * Tooltip & TooltipDialog:
25
 * 1. tooltip content container: 
25
 * 1. tooltip content container:
26
 * 		.dijitTooltipContainer - tooltip content container
26
 * 		.dijitTooltipContainer - tooltip content container
27
 *
27
 *
28
 * 2. tooltip connector: 
28
 * 2. tooltip connector:
29
 * 		.dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
29
 * 		.dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
30
 */
30
 */
31
31
 Lines 32-46    Link Here 
32
@import "variables"
32
@import "variables"
33
33
34
.umc .dijitDialog
34
.umc .dijitDialog
35
	//border: 1px solid $popup-border-color
35
	material-shadow(5)
36
	border: none
37
	box-shadow: 0 0px 25px rgba(0,0,0,0.15)
38
	max-width: $dialog-max-width
36
	max-width: $dialog-max-width
39
37
40
	@media (max-width: $dialog-max-width)
38
	@media (max-width: $dialog-max-width)
41
		max-width: 100%
39
		max-width: 100%
42
40
43
44
	&.umcLargeDialog
41
	&.umcLargeDialog
45
		width: 100%
42
		width: 100%
46
		@media (min-width: ($dialog-max-width + 1))
43
		@media (min-width: ($dialog-max-width + 1))
 Lines 51-71    Link Here 
51
48
52
	.umcPageFooter,
49
	.umcPageFooter,
53
	.umcButtonRow
50
	.umcButtonRow
51
		padding-top: 24px
52
		margin-top: 0 !important
53
54
		.dijitButton
54
		.dijitButton
55
			material-flat-button()
55
			material-flat-button()
56
			margin: 0
57
			&:not(:first-child)
58
				margin-left: 8px
56
59
60
			.dijitButtonNode
61
				min-width: 64px
62
57
		.dijitDefaultButton .dijitButtonText
63
		.dijitDefaultButton .dijitButtonText
58
			color: $ucs-green
64
			color: $ucs-green
59
65
66
	.umcButtonRow
67
		margin-right: -16px
68
		text-align: right
69
	
70
	.dijitContainer
71
		overflow: visible
60
72
73
	.umcWizard
74
		overflow: visible
75
76
		.umcPage
77
			&:after
78
				content: ''
79
				display: block
80
				clear: both
81
82
			.umcPageFooter
83
				left: -16px
84
				width: calc(100% + 32px)
85
61
.umc .dijitDialogPaneContent
86
.umc .dijitDialogPaneContent
62
	background: $pane-background-color repeat-x top left
87
	background: $pane-background-color
63
	border-top: 1px solid $popup-border-color
88
	padding: 0 24px 8px 24px
64
	padding: 1.6em 1.2em 1.2em 1.2em
65
	position: relative
89
	position: relative
66
	//box-sizing: content-box
67
90
68
69
.umc .dijitDialogPaneContent,
91
.umc .dijitDialogPaneContent,
70
.umc .dijitDialogTitleBar
92
.umc .dijitDialogTitleBar
71
	width: 100%
93
	width: 100%
 Lines 75-85    Link Here 
75
.umc .dijitDialogPaneContentArea
97
.umc .dijitDialogPaneContentArea
76
	/* trick to get action bar (gray bar at bottom with OK/cancel buttons) to span from
98
	/* trick to get action bar (gray bar at bottom with OK/cancel buttons) to span from
77
	 * left to right but still indent dialog content
99
	 * left to right but still indent dialog content
78
	 */ 
100
	 */
79
	margin: -10px -8px
101
	margin: -10px -8px
80
	padding: 10px 8px
102
	padding: 10px 8px
81
103
82
83
.umc .dijitDialogPaneActionBar
104
.umc .dijitDialogPaneActionBar
84
	/* gray bar at bottom of dialog with OK/Cancel buttons */
105
	/* gray bar at bottom of dialog with OK/Cancel buttons */
85
	//background-color: $bar-background-color
106
	//background-color: $bar-background-color
 Lines 100-148    Link Here 
100
.umc .dijitDialogPaneActionBar .dijitButton
121
.umc .dijitDialogPaneActionBar .dijitButton
101
	float: none
122
	float: none
102
123
103
104
.umc .dijitDialogTitleBar
124
.umc .dijitDialogTitleBar
105
	/* outer container for the titlebar of the dialog */
125
	/* outer container for the titlebar of the dialog */
106
	//border: 1px solid $dialog-titlebar-border-color
126
	background-color: white
107
	border: none
127
	padding: 24px 24px 20px 24px
108
	border-top:none
109
	background-color: $dialog-titlebar-background-color
110
	standard-gradient()
111
	padding: 0.9em 3em 0.9em 1.2em
112
	//box-sizing: content-box
113
128
114
129
115
.umc .dijitDialogTitle
130
.umc .dijitDialogTitle
116
	/* typography and styling of the dialog title */
131
	/* typography and styling of the dialog title */
117
	padding: 0 1px
118
	font-size: $font-size-title
132
	font-size: $font-size-title
119
	color: $text-color-dark-background
133
	font-weight: 500
134
	line-height: 28px
135
	color: $text-color
120
136
121
122
.umc .dijitDialogCloseIcon
123
	/* the default close icon for the dialog */
124
	//background: url($image-dialog-close)
125
	//background-repeat:no-repeat
126
	position: absolute
127
	right: 0
128
	top: 0
129
	margin: 0.75em 1.2em
130
	//height: 15px
131
	//width: 21px
132
	icon-image(0, -60, "", "-white")
133
134
.dj_ie6 .umc .dijitDialogCloseIcon
135
	//background-image: url($image-dialog-close-ie6)
136
137
.umc .dijitDialogCloseIconHover
138
	background-position:-20px -60px
139
	opacity: 1
140
141
.umc .dijitDialogCloseIconActive
142
	background-position:-20px -60px
143
	opacity: 0.66
144
145
146
/* Tooltip and TooltipDialog */
137
/* Tooltip and TooltipDialog */
147
138
148
.umc .dijitTooltip,
139
.umc .dijitTooltip,
 Lines 152-158    Link Here 
152
	padding: 4px
143
	padding: 4px
153
	//box-sizing: content-box
144
	//box-sizing: content-box
154
145
155
156
.umc .dijitTooltip
146
.umc .dijitTooltip
157
	box-sizing: content-box
147
	box-sizing: content-box
158
148
 Lines 232-238    Link Here 
232
	right: 4px
222
	right: 4px
233
223
234
224
235
236
.umc .dijitTooltipLeft
225
.umc .dijitTooltipLeft
237
	//padding-right: 14px
226
	//padding-right: 14px
238
227
 Lines 283-285    Link Here 
283
	opacity: 1
272
	opacity: 1
284
273
285
274
275
/** inline dialogs **/
276
/* inline wizards */
277
.umc .umcWizard.umcInlineDialog,
278
.umc .umcModule .umcWizard
279
	background-color: #fff
280
	material-shadow(1)
281
	margin: 7px 15px
282
	padding: 24px 9px 8px
283
	overflow: visible
284
	
285
	.umcPage
286
		&:after
287
			content: ''
288
			display: block
289
			clear: both
290
291
		.umcPageNav
292
			.umcPageHeader h1
293
				line-height: 28px
294
				margin-bottom: 20px
295
296
		.umcPageFooter
297
			padding: 0
298
			margin-top: 24px
299
			width: calc(100% + 2px)
300
			left: -1px
301
302
			.dijitButton
303
				material-flat-button()
304
				margin: 0
305
				&:not(:first-child)
306
					margin-left: 8px
307
308
			.dijitDefaultButton,
309
			.dijitUploader
310
				.dijitButtonText
311
					color: $ucs-green
312
313
	.dijitTextBox,
314
	.dijitSelect
315
		background-color: #fafafa
316
317
	.dijitTextBoxDisabled
318
		background: $textbox-disabled-background-color
319
320
.umc .umcWizard.umcInlineDialog
321
	margin: 48px auto
322
323
/* App dialog */
324
.umc .umcAppDialog
325
	margin: 7px 15px
326
	&:after
327
		content: ''
328
		display: block
329
		clear: both
330
331
	.umcPageMain
332
		background-color: #fff
333
		material-shadow(1)
334
		padding: 24px 24px 8px
335
336
		.umcPageHeader h1
337
			margin: 0 0 20px
338
			line-height: 28px
339
340
		.umcButtonRow
341
			margin: 0 -16px
342
			padding-top: 32px
343
344
			.dijitButton
345
				material-flat-button()
346
				margin: 0
347
				&:not(:first-child)
348
					margin-left: 8px
349
350
	.umcPageFooter
351
		display: none
352
353
	.dijitTextBox,
354
	.dijitSelect
355
		background-color: #fafafa
356
357
	.dijitTextBoxDisabled
358
		background: $textbox-disabled-background-color
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/hooks/default_menu_entries.js (-3 / +3 lines)
 Lines 122-135    Link Here 
122
					topic.publish('/umc/actions', 'menu', 'switch-language', language.id);
122
					topic.publish('/umc/actions', 'menu', 'switch-language', language.id);
123
					if (tools.status('loggedIn')) {
123
					if (tools.status('loggedIn')) {
124
						dialog.confirm(_('<b>Warning</b>: The current session with all opened modules and unsaved settings gets lost and a page reload is done when switching the language.'), [{
124
						dialog.confirm(_('<b>Warning</b>: The current session with all opened modules and unsaved settings gets lost and a page reload is done when switching the language.'), [{
125
							name: 'cancel',
126
							label: _('Cancel')
127
						}, {
125
							name: 'change',
128
							name: 'change',
126
							label: _('Switch language'),
129
							label: _('Switch language'),
127
							callback: function() {
130
							callback: function() {
128
								i18nTools.setLanguage(language.id);
131
								i18nTools.setLanguage(language.id);
129
							}
132
							}
130
						}, {
131
							name: 'cancel',
132
							label: _('Cancel')
133
						}], _('Changing language'));
133
						}], _('Changing language'));
134
						return;
134
						return;
135
					}
135
					}
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/render.js (-1 / +1 lines)
 Lines 318-324    Link Here 
318
				// add all buttons that have not been rendered so far to a separate container
318
				// add all buttons that have not been rendered so far to a separate container
319
				// and respect their correct order (i.e., using the interal array field $order$)
319
				// and respect their correct order (i.e., using the interal array field $order$)
320
				var buttonContainer = new ContainerWidget({
320
				var buttonContainer = new ContainerWidget({
321
					'class': 'umcLayoutRow'
321
					'class': 'umcLayoutRow umcButtonRow'
322
				});
322
				});
323
				array.forEach(buttons.$order$, function(ibutton) {
323
				array.forEach(buttons.$order$, function(ibutton) {
324
					if (!ibutton.$isRendered$) {
324
					if (!ibutton.$isRendered$) {
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/widgets/ConfirmDialog.js (-2 / +7 lines)
 Lines 123-129    Link Here 
123
			// add the new message
123
			// add the new message
124
			if (typeof this.message == "string") {
124
			if (typeof this.message == "string") {
125
				var widget = new Text({
125
				var widget = new Text({
126
					content: message
126
					content: message,
127
					'class': 'umcConfirmDialogText'
127
				});
128
				});
128
				this._container.addChild(widget, 0);
129
				this._container.addChild(widget, 0);
129
			}
130
			}
 Lines 152-163    Link Here 
152
			}
153
			}
153
		},
154
		},
154
155
156
		postMixInProperties: function() {
157
			this.inherited(arguments);
158
			this.baseClass += ' umcConfirmDialog';
159
		},
160
155
		buildRendering: function() {
161
		buildRendering: function() {
156
			this.inherited(arguments);
162
			this.inherited(arguments);
157
163
158
			// put buttons into separate container
164
			// put buttons into separate container
159
			var buttons = new ContainerWidget({
165
			var buttons = new ContainerWidget({
160
				style: 'text-align: center;',
161
				'class': 'umcButtonRow'
166
				'class': 'umcButtonRow'
162
			});
167
			});
163
			var defaultButton = null;
168
			var defaultButton = null;
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/widgets/Form.js (-8 / +13 lines)
 Lines 36-47    Link Here 
36
	"dojo/Deferred",
36
	"dojo/Deferred",
37
	"dojo/when",
37
	"dojo/when",
38
	"dojo/promise/all",
38
	"dojo/promise/all",
39
	"dojo/dom-style",
39
	"dojo/dom-class",
40
	"dijit/form/Form",
40
	"dijit/form/Form",
41
	"umc/tools",
41
	"umc/tools",
42
	"umc/render",
42
	"umc/render",
43
	"umc/i18n!"
43
	"umc/i18n!"
44
], function(declare, lang, array, kernel, Deferred, when, all, style, Form, tools, render, _) {
44
], function(declare, lang, array, kernel, Deferred, when, all, domClass, Form, tools, render, _) {
45
45
46
	// in order to break circular dependencies (umc.dialog needs a Form and
46
	// in order to break circular dependencies (umc.dialog needs a Form and
47
	// Form needs umc/dialog), we define umc/dialog as an empty object and
47
	// Form needs umc/dialog), we define umc/dialog as an empty object and
 Lines 135-154    Link Here 
135
135
136
			// in case no submit button has been defined, we define one and hide it
136
			// in case no submit button has been defined, we define one and hide it
137
			// this allows us to connect to the onSubmit event in any case
137
			// this allows us to connect to the onSubmit event in any case
138
			var submitButtonDefined = false;
138
			this.submitButtonDefined = false;
139
			array.forEach(this.buttons, function(ibutton) {
139
			array.forEach(this.buttons, lang.hitch(this, function(ibutton) {
140
				if ('submit' == ibutton.name) {
140
				if ('submit' == ibutton.name) {
141
					submitButtonDefined = true;
141
					this.submitButtonDefined = true;
142
					return false; // break loop
142
					return false; // break loop
143
				}
143
				}
144
			});
144
			}));
145
			if (!submitButtonDefined) {
145
			if (!this.submitButtonDefined) {
146
				// no submit button defined, add a hidden one :)
146
				// no submit button defined, add a hidden one :)
147
				this.buttons = this.buttons instanceof Array ? this.buttons : [];
147
				this.buttons = this.buttons instanceof Array ? this.buttons : [];
148
				this.buttons.push({
148
				this.buttons.push({
149
					label: 'submit',
149
					label: 'submit',
150
					name: 'submit',
150
					name: 'submit',
151
					style: 'border: 0; height: 0; overflow: hidden; margin: 0; padding: 0;' // using display=none will prevent button from being called
151
					'class': 'dijitOffScreen'
152
				});
152
				});
153
			}
153
			}
154
154
 Lines 184-189    Link Here 
184
				this._widgets = render.widgets(this.widgets, this);
184
				this._widgets = render.widgets(this.widgets, this);
185
				this._buttons = render.buttons(this.buttons || [], this);
185
				this._buttons = render.buttons(this.buttons || [], this);
186
				this._container = render.layout(this.layout, this._widgets, this._buttons);
186
				this._container = render.layout(this.layout, this._widgets, this._buttons);
187
				// if the submit button was not defined and no other buttons were specified we hide
188
				// the row of the default submit button
189
				if (!this.submitButtonDefined && this.buttons.length === 1) {
190
					domClass.add(this._buttons.submit.getParent().domNode, 'dijitOffScreen');
191
				}
187
192
188
				// start processing the layout information
193
				// start processing the layout information
189
				this._container.placeAt(this.containerNode);
194
				this._container.placeAt(this.containerNode);
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/widgets/MultiObjectSelect.js (-14 / +16 lines)
 Lines 117-125    Link Here 
117
				}));
117
				}));
118
118
119
				// add the final buttons to close the dialog
119
				// add the final buttons to close the dialog
120
				this._container.addChild(new Button({
120
				var btnContainer = new ContainerWidget({
121
					'class': 'umcButtonRow'
122
				});
123
				btnContainer.addChild(new Button({
124
					label: _('Cancel'),
125
					onClick: lang.hitch(this, function() {
126
						// hide the dialog
127
						this.hide();
128
129
						// unselect all elements
130
						this._multiSelect.selection.clear();
131
132
					})
133
				}));
134
				btnContainer.addChild(new Button({
121
					label: _('Add'),
135
					label: _('Add'),
122
					style: 'float: right;',
123
					onClick: lang.hitch(this, function() {
136
					onClick: lang.hitch(this, function() {
124
						// get all elements an trigger onAdd event
137
						// get all elements an trigger onAdd event
125
						var ids = this._multiSelect.get('value');
138
						var ids = this._multiSelect.get('value');
 Lines 135-153    Link Here 
135
						this._multiSelect.selection.clear();
148
						this._multiSelect.selection.clear();
136
					})
149
					})
137
				}));
150
				}));
138
				this._container.addChild(new Button({
151
				this._container.addChild(btnContainer);
139
					label: _('Cancel'),
140
					defaultButton: true,
141
					onClick: lang.hitch(this, function() {
142
						// hide the dialog
143
						this.hide();
144
152
145
						// unselect all elements
146
						this._multiSelect.selection.clear();
147
148
					})
149
				}));
150
151
				// put focus to last widget in the SearchForm
153
				// put focus to last widget in the SearchForm
152
				this.on('focus', lang.hitch(this, function() {
154
				this.on('focus', lang.hitch(this, function() {
153
					if (this.widgets.length) {
155
					if (this.widgets.length) {
(-)a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/widgets/Wizard.js (+3 lines)
 Lines 89-94    Link Here 
89
89
90
		headerButtons: null,
90
		headerButtons: null,
91
91
92
		/* StandbyMixin properties */
93
		standbyColor: '#fff',
94
92
		buildRendering: function() {
95
		buildRendering: function() {
93
			this.inherited(arguments);
96
			this.inherited(arguments);
94
97
(-)a/branches/ucs-4.2/ucs-4.2-1/services/univention-printserver/umc/js/printers/QuotaDialog.js (-7 / +7 lines)
 Lines 47-59    Link Here 
47
47
48
			var buttons = [
48
			var buttons = [
49
				{
49
				{
50
					name:			'submit',
51
					label:			_("Save changes")
52
					// no callback here: the onSubmit() event of the form
53
					// will automatically be fired if our button has
54
					// the name 'submit'
55
				},
56
				{
57
					name:			'cancel',
50
					name:			'cancel',
58
					label:			_("Cancel"),
51
					label:			_("Cancel"),
59
					// no special meaning of the button name 'cancel', so we
52
					// no special meaning of the button name 'cancel', so we
 Lines 61-66    Link Here 
61
					callback: lang.hitch(this, function() {
54
					callback: lang.hitch(this, function() {
62
						this.onCancel();
55
						this.onCancel();
63
					})
56
					})
57
				},
58
				{
59
					name:			'submit',
60
					label:			_("Save changes")
61
					// no callback here: the onSubmit() event of the form
62
					// will automatically be fired if our button has
63
					// the name 'submit'
64
				}
64
				}
65
			];
65
			];
66
66
(-)a/branches/ucs-4.2/ucs-4.2-1/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveGrid.js (-4 / +4 lines)
 Lines 324-338    Link Here 
324
			var disk = items[ 0 ];
324
			var disk = items[ 0 ];
325
325
326
			var buttons = [ {
326
			var buttons = [ {
327
				name: 'cancel',
328
				'default': true,
329
				label: _('Cancel')
330
			}, {
327
				name: 'detach',
331
				name: 'detach',
328
				label: _('Detach')
332
				label: _('Detach')
329
			}, {
333
			}, {
330
				name: 'delete',
334
				name: 'delete',
331
				label: _('Delete')
335
				label: _('Delete')
332
			}, {
333
				name: 'cancel',
334
				'default': true,
335
				label: _('Cancel')
336
			} ];
336
			} ];
337
337
338
			// confirm removal of drive
338
			// confirm removal of drive
(-)a/branches/ucs-4.2/ucs-4.2-1/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceGrid.js (-3 / +3 lines)
 Lines 129-140    Link Here 
129
				msg = _('Should the %d network interfaces be removed?', ids.length);
129
				msg = _('Should the %d network interfaces be removed?', ids.length);
130
			}
130
			}
131
			dialog.confirm(msg, [{
131
			dialog.confirm(msg, [{
132
				name: 'remove',
133
				label: _('Remove')
134
			}, {
135
				name: 'cancel',
132
				name: 'cancel',
136
				'default': true,
133
				'default': true,
137
				label: _('Cancel')
134
				label: _('Cancel')
135
			}, {
136
				name: 'remove',
137
				label: _('Remove')
138
			}]).then(lang.hitch(this, function(response) {
138
			}]).then(lang.hitch(this, function(response) {
139
				if (response == 'cancel') {
139
				if (response == 'cancel') {
140
					return;
140
					return;
(-)a/branches/ucs-4.2/ucs-4.2-1/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js (-6 / +6 lines)
 Lines 187-198    Link Here 
187
187
188
			// confirm applying of snapshot
188
			// confirm applying of snapshot
189
			dialog.confirm(_('Are you sure to revert to the selected snapshot?'), [{
189
			dialog.confirm(_('Are you sure to revert to the selected snapshot?'), [{
190
				name: 'revert',
191
				label: _('Revert')
192
			}, {
193
				name: 'cancel',
190
				name: 'cancel',
194
				'default': true,
191
				'default': true,
195
				label: _('Cancel')
192
				label: _('Cancel')
193
			}, {
194
				name: 'revert',
195
				label: _('Revert')
196
			}]).then(lang.hitch(this, function(response) {
196
			}]).then(lang.hitch(this, function(response) {
197
				if (response != 'revert') {
197
				if (response != 'revert') {
198
					return;
198
					return;
 Lines 224-235    Link Here 
224
				msg = _('Are you sure to delete the selected snapshot?');
224
				msg = _('Are you sure to delete the selected snapshot?');
225
			}
225
			}
226
			dialog.confirm(msg, [{
226
			dialog.confirm(msg, [{
227
				name: 'delete',
228
				label: _('Delete')
229
			}, {
230
				name: 'cancel',
227
				name: 'cancel',
231
				'default': true,
228
				'default': true,
232
				label: _('Cancel')
229
				label: _('Cancel')
230
			}, {
231
				name: 'delete',
232
				label: _('Delete')
233
			}]).then(lang.hitch(this, function(response) {
233
			}]).then(lang.hitch(this, function(response) {
234
				if (response != 'delete') {
234
				if (response != 'delete') {
235
					return;
235
					return;

Return to bug 43999