diff --git a/ucs-4.0-2/management/univention-management-console-frontend/umc/app.js b/ucs-4.0-2/management/univention-management-console-frontend/umc/app.js index 0b804b8..cb05c79 100644 --- a/ucs-4.0-2/management/univention-management-console-frontend/umc/app.js +++ b/ucs-4.0-2/management/univention-management-console-frontend/umc/app.js @@ -45,6 +45,7 @@ define([ "dojo/promise/all", "dojo/cookie", "dojo/topic", + "dojo/io-query", "dojo/fx", "dojo/fx/easing", "dojo/store/Memory", @@ -86,7 +87,7 @@ define([ "xstyle/css!./app.css", "dojo/sniff" // has("ie"), has("ff") ], function(declare, lang, kernel, array, baseFx, baseWin, win, on, aspect, has, - Evented, Deferred, when, all, cookie, topic, fx, fxEasing, Memory, Observable, + Evented, Deferred, when, all, cookie, topic, ioQuery, fx, fxEasing, Memory, Observable, dom, style, domAttr, domClass, domGeometry, domConstruct, locale, styles, entities, gfx, registry, tools, dialog, store, Menu, MenuItem, PopupMenuItem, MenuSeparator, Tooltip, DropDownButton, StackContainer, TabController, LiveSearchSidebar, GalleryPane, ContainerWidget, Page, Form, Button, Text, Module, ModuleHeader, CategoryButton, @@ -450,7 +451,7 @@ define([ getModule: function(/*String?*/ id, /*String?*/ flavor, /*String?*/ category) { var query = { id: id, - flavor: flavor || /.*/, + flavor: flavor || null, // by default, match categories != favorites category category: category || /^((?!_favorites_).)*$/ }; @@ -1303,16 +1304,26 @@ define([ tools.status('singleModule', launchableModules.length < 2); this.setupGui(); + var props = undefined; + if (tools.status('autoStartModule')) { + props = ioQuery.queryToObject(window.location.search.substring(1)); + array.forEach(['username', 'password', 'overview', 'lang', 'module', 'flavor'], function(key) { + delete props[key]; + }); + props = { + props: props + }; + } if (!launchableModules.length) { dialog.alert(_('There is no module available for the authenticated user %s.', tools.status('username'))); } else if (launchableModules.length === 1) { // if only one module exists open it var module = launchableModules[0]; - this.openModule(module.id, module.flavor); + this.openModule(module.id, module.flavor, props); } else if (tools.status('autoStartModule')) { // if module is given in the query string, open it directly - this.openModule(tools.status('autoStartModule'), tools.status('autoStartFlavor')); + this.openModule(tools.status('autoStartModule'), tools.status('autoStartFlavor'), props); } }, @@ -1676,7 +1687,7 @@ define([ _toggleFavoriteModule: function(module) { if (isFavorite(module)) { - // for the favorite category, remove the moduel from the favorites + // for the favorite category, remove the module from the favorites this._moduleStore.removeFavoriteModule(module.id, module.flavor); topic.publish('/umc/actions', 'overview', 'favorites', module.id, module.flavor, 'remove'); } diff --git a/ucs-4.0-2/management/univention-management-console-frontend/umc/store.js b/ucs-4.0-2/management/univention-management-console-frontend/umc/store.js index 5891fa8..cde7773 100644 --- a/ucs-4.0-2/management/univention-management-console-frontend/umc/store.js +++ b/ucs-4.0-2/management/univention-management-console-frontend/umc/store.js @@ -193,7 +193,7 @@ define([ var query = {}; var nQueryEl = 0; tools.forIn(_query, function(ikey, ival) { - query[ikey] = (typeof ival == "string" || typeof ival == 'boolean' || 'null' === ival) ? ival : String(ival); + query[ikey] = (typeof ival == "string" || typeof ival == 'boolean' || null === ival) ? ival : String(ival); ++nQueryEl; }, this, true); var deferred = new Deferred(); diff --git a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter.js b/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter.js index c824f7d..d404003 100644 --- a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter.js +++ b/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter.js @@ -100,7 +100,8 @@ define([ moduleID: this.moduleID, moduleFlavor: this.moduleFlavor, addWarning: lang.hitch(this, 'addWarning'), - standbyDuring: lang.hitch(this, 'standbyDuring') + standbyDuring: lang.hitch(this, 'standbyDuring'), + openApp: this.props && this.props.app }); // switched from app center to app details and back this._appCenterPage.on('showApp', lang.hitch(this, 'showApp')); diff --git a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter/AppCenterPage.js b/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter/AppCenterPage.js index 74d65c2..ae70ae2 100644 --- a/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter/AppCenterPage.js +++ b/ucs-4.0-2/management/univention-management-console-module-appcenter/umc/js/appcenter/AppCenterPage.js @@ -137,7 +137,15 @@ define([ } }), lang.hitch(this, function() { return this.updateApplications(); - }))); + }))).then(lang.hitch(this ,function() { + if (this.openApp) { + var apps = this._grid.store.query({id: this.openApp}); + if (apps && apps.length) { + this.showDetails(apps[0]); + } + + } + })); }, getAppCenterSeen: function() {