|
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 |
} |