mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-01 15:58:19 -04:00
Update type system.
This commit is contained in:
parent
2d08633147
commit
12b2d3ef77
14 changed files with 30 additions and 29 deletions
|
@ -1,14 +1,29 @@
|
|||
|
||||
modulejs.define('core/resource', ['config', 'core/settings'], function (config, settings) {
|
||||
|
||||
var image = function (id) {
|
||||
var imagesHref = settings.appHref + 'client/images/',
|
||||
fallbackHref = settings.appHref + 'client/images/fallback/',
|
||||
themesHref = settings.appHref + 'client/themes/',
|
||||
fallbacks = ['file', 'folder', 'folder-page', 'folder-parent'],
|
||||
|
||||
return settings.appHref + 'client/images/' + id + '.svg';
|
||||
image = function (id) {
|
||||
|
||||
return imagesHref + id + '.svg';
|
||||
},
|
||||
|
||||
icon = function (id) {
|
||||
|
||||
return settings.appHref + 'client/themes/' + config.theme[id];
|
||||
var baseId = id.split('-')[0],
|
||||
href = config.theme[id] || config.theme[baseId];
|
||||
|
||||
if (href) {
|
||||
return themesHref + href;
|
||||
}
|
||||
|
||||
if (fallbacks.indexOf(id) >= 0) {
|
||||
return fallbackHref + id + '.svg';
|
||||
}
|
||||
return fallbackHref + 'file.svg';
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue