View | Details | Raw Unified | Return to bug 38544 | Differences between
and this patch

Collapse All | Expand All

(-)a/ucs-4.0-2/management/univention-management-console-frontend/umc/app.js (-5 / +16 lines)
 Lines 45-50   define([ Link Here 
45
	"dojo/promise/all",
45
	"dojo/promise/all",
46
	"dojo/cookie",
46
	"dojo/cookie",
47
	"dojo/topic",
47
	"dojo/topic",
48
	"dojo/io-query",
48
	"dojo/fx",
49
	"dojo/fx",
49
	"dojo/fx/easing",
50
	"dojo/fx/easing",
50
	"dojo/store/Memory",
51
	"dojo/store/Memory",
 Lines 86-92   define([ Link Here 
86
	"xstyle/css!./app.css",
87
	"xstyle/css!./app.css",
87
	"dojo/sniff" // has("ie"), has("ff")
88
	"dojo/sniff" // has("ie"), has("ff")
88
], function(declare, lang, kernel, array, baseFx, baseWin, win, on, aspect, has,
89
], function(declare, lang, kernel, array, baseFx, baseWin, win, on, aspect, has,
89
		Evented, Deferred, when, all, cookie, topic, fx, fxEasing, Memory, Observable,
90
		Evented, Deferred, when, all, cookie, topic, ioQuery, fx, fxEasing, Memory, Observable,
90
		dom, style, domAttr, domClass, domGeometry, domConstruct, locale, styles, entities, gfx, registry, tools, dialog, store,
91
		dom, style, domAttr, domClass, domGeometry, domConstruct, locale, styles, entities, gfx, registry, tools, dialog, store,
91
		Menu, MenuItem, PopupMenuItem, MenuSeparator, Tooltip, DropDownButton, StackContainer,
92
		Menu, MenuItem, PopupMenuItem, MenuSeparator, Tooltip, DropDownButton, StackContainer,
92
		TabController, LiveSearchSidebar, GalleryPane, ContainerWidget, Page, Form, Button, Text, Module, ModuleHeader, CategoryButton,
93
		TabController, LiveSearchSidebar, GalleryPane, ContainerWidget, Page, Form, Button, Text, Module, ModuleHeader, CategoryButton,
 Lines 450-456   define([ Link Here 
450
		getModule: function(/*String?*/ id, /*String?*/ flavor, /*String?*/ category) {
451
		getModule: function(/*String?*/ id, /*String?*/ flavor, /*String?*/ category) {
451
			var query = {
452
			var query = {
452
				id: id,
453
				id: id,
453
				flavor: flavor || /.*/,
454
				flavor: flavor || null,
454
				// by default, match categories != favorites category
455
				// by default, match categories != favorites category
455
				category: category || /^((?!_favorites_).)*$/
456
				category: category || /^((?!_favorites_).)*$/
456
			};
457
			};
 Lines 1303-1318   define([ Link Here 
1303
			tools.status('singleModule', launchableModules.length < 2);
1304
			tools.status('singleModule', launchableModules.length < 2);
1304
1305
1305
			this.setupGui();
1306
			this.setupGui();
1307
			var props = undefined;
1308
			if (tools.status('autoStartModule')) {
1309
				props = ioQuery.queryToObject(window.location.search.substring(1));
1310
				array.forEach(['username', 'password', 'overview', 'lang', 'module', 'flavor'], function(key) {
1311
					delete props[key];
1312
				});
1313
				props = {
1314
					props: props
1315
				};
1316
			}
1306
1317
1307
			if (!launchableModules.length) {
1318
			if (!launchableModules.length) {
1308
				dialog.alert(_('There is no module available for the authenticated user %s.', tools.status('username')));
1319
				dialog.alert(_('There is no module available for the authenticated user %s.', tools.status('username')));
1309
			} else if (launchableModules.length === 1) {
1320
			} else if (launchableModules.length === 1) {
1310
				// if only one module exists open it
1321
				// if only one module exists open it
1311
				var module = launchableModules[0];
1322
				var module = launchableModules[0];
1312
				this.openModule(module.id, module.flavor);
1323
				this.openModule(module.id, module.flavor, props);
1313
			} else if (tools.status('autoStartModule')) {
1324
			} else if (tools.status('autoStartModule')) {
1314
				// if module is given in the query string, open it directly
1325
				// if module is given in the query string, open it directly
1315
				this.openModule(tools.status('autoStartModule'), tools.status('autoStartFlavor'));
1326
				this.openModule(tools.status('autoStartModule'), tools.status('autoStartFlavor'), props);
1316
			}
1327
			}
1317
		},
1328
		},
1318
1329
 Lines 1676-1682   define([ Link Here 
1676
1687
1677
		_toggleFavoriteModule: function(module) {
1688
		_toggleFavoriteModule: function(module) {
1678
			if (isFavorite(module)) {
1689
			if (isFavorite(module)) {
1679
				// for the favorite category, remove the moduel from the favorites
1690
				// for the favorite category, remove the module from the favorites
1680
				this._moduleStore.removeFavoriteModule(module.id, module.flavor);
1691
				this._moduleStore.removeFavoriteModule(module.id, module.flavor);
1681
				topic.publish('/umc/actions', 'overview', 'favorites', module.id, module.flavor, 'remove');
1692
				topic.publish('/umc/actions', 'overview', 'favorites', module.id, module.flavor, 'remove');
1682
			}
1693
			}
(-)a/ucs-4.0-2/management/univention-management-console-frontend/umc/store.js (-1 / +1 lines)
 Lines 193-199   define([ Link Here 
193
			var query = {};
193
			var query = {};
194
			var nQueryEl = 0;
194
			var nQueryEl = 0;
195
			tools.forIn(_query, function(ikey, ival) {
195
			tools.forIn(_query, function(ikey, ival) {
196
				query[ikey] = (typeof ival == "string" || typeof ival == 'boolean' || 'null' === ival) ? ival : String(ival);
196
				query[ikey] = (typeof ival == "string" || typeof ival == 'boolean' || null === ival) ? ival : String(ival);
197
				++nQueryEl;
197
				++nQueryEl;
198
			}, this, true);
198
			}, this, true);
199
			var deferred = new Deferred();
199
			var deferred = new Deferred();
(-)a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter.js (-1 / +2 lines)
 Lines 100-106   define([ Link Here 
100
				moduleID: this.moduleID,
100
				moduleID: this.moduleID,
101
				moduleFlavor: this.moduleFlavor,
101
				moduleFlavor: this.moduleFlavor,
102
				addWarning: lang.hitch(this, 'addWarning'),
102
				addWarning: lang.hitch(this, 'addWarning'),
103
				standbyDuring: lang.hitch(this, 'standbyDuring')
103
				standbyDuring: lang.hitch(this, 'standbyDuring'),
104
				openApp: this.props && this.props.app
104
			});
105
			});
105
			// switched from app center to app details and back
106
			// switched from app center to app details and back
106
			this._appCenterPage.on('showApp', lang.hitch(this, 'showApp'));
107
			this._appCenterPage.on('showApp', lang.hitch(this, 'showApp'));
(-)a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter/AppCenterPage.js (-1 / +9 lines)
 Lines 137-143   define([ Link Here 
137
				}
137
				}
138
			}), lang.hitch(this, function() {
138
			}), lang.hitch(this, function() {
139
				return this.updateApplications();
139
				return this.updateApplications();
140
			})));
140
			}))).then(lang.hitch(this ,function() {
141
				if (this.openApp) {
142
					var apps = this._grid.store.query({id: this.openApp});
143
					if (apps && apps.length) {
144
						this.showDetails(apps[0]);
145
					}
146
147
				}
148
			}));
141
		},
149
		},
142
150
143
		getAppCenterSeen: function() {
151
		getAppCenterSeen: function() {

Return to bug 38544