mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 12:34:47 -04:00
Semantics.
This commit is contained in:
parent
05504d8e5d
commit
9da65f9fc7
5 changed files with 12 additions and 12 deletions
|
@ -3,13 +3,13 @@ modulejs.define('core/resource', ['core/settings'], function (settings) {
|
||||||
|
|
||||||
var image = function (id) {
|
var image = function (id) {
|
||||||
|
|
||||||
return settings.appUrl + 'client/images/' + id + '.svg';
|
return settings.appHref + 'client/images/' + id + '.svg';
|
||||||
},
|
},
|
||||||
|
|
||||||
icon = function (id) {
|
icon = function (id) {
|
||||||
|
|
||||||
return settings.appUrl + 'client/themes/faenza/icons/' + id + '.png';
|
return settings.appHref + 'client/themes/faenza/icons/' + id + '.png';
|
||||||
// return settings.appUrl + 'client/themes/evolvere/icons/' + id + '.svg';
|
// return settings.appHref + 'client/themes/evolvere/icons/' + id + '.svg';
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
modulejs.define('core/settings', ['config', '_'], function (config, _) {
|
modulejs.define('core/settings', ['config', '_'], function (config, _) {
|
||||||
|
|
||||||
return _.extend({}, config.options, {
|
return _.extend({}, config.options, {
|
||||||
appUrl: config.setup.APP_URL,
|
appHref: config.setup.APP_URL,
|
||||||
rootUrl: config.setup.ROOT_URL
|
rootHref: config.setup.ROOT_URL
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,11 +63,11 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/event', 'ex
|
||||||
},
|
},
|
||||||
loadSyntaxhighlighter = function (callback) {
|
loadSyntaxhighlighter = function (callback) {
|
||||||
|
|
||||||
loadScript(allsettings.appUrl + 'client/js/syntaxhighlighter.js', 'SyntaxHighlighter', callback);
|
loadScript(allsettings.appHref + 'client/js/syntaxhighlighter.js', 'SyntaxHighlighter', callback);
|
||||||
},
|
},
|
||||||
loadMarkdown = function (callback) {
|
loadMarkdown = function (callback) {
|
||||||
|
|
||||||
loadScript(allsettings.appUrl + 'client/js/markdown.js', 'markdown', callback);
|
loadScript(allsettings.appHref + 'client/js/markdown.js', 'markdown', callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
preloadText = function (absHref, callback) {
|
preloadText = function (absHref, callback) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ modulejs.define('ext/qrcode', ['_', '$', 'modernizr', 'core/settings', 'core/eve
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: allsettings.appUrl + 'client/js/qrcode.js',
|
url: allsettings.appHref + 'client/js/qrcode.js',
|
||||||
dataType: 'script',
|
dataType: 'script',
|
||||||
complete: function () {
|
complete: function () {
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ modulejs.define('model/item', ['_', 'core/types', 'core/event', 'core/settings',
|
||||||
if (match) {
|
if (match) {
|
||||||
var split = { parent: match[1], name: match[2] };
|
var split = { parent: match[1], name: match[2] };
|
||||||
|
|
||||||
if (split.parent && !startsWith(split.parent, settings.rootUrl)) {
|
if (split.parent && !startsWith(split.parent, settings.rootHref)) {
|
||||||
split.parent = null;
|
split.parent = null;
|
||||||
}
|
}
|
||||||
return split;
|
return split;
|
||||||
|
@ -45,7 +45,7 @@ modulejs.define('model/item', ['_', 'core/types', 'core/event', 'core/settings',
|
||||||
|
|
||||||
absHref = location.forceEncoding(absHref);
|
absHref = location.forceEncoding(absHref);
|
||||||
|
|
||||||
if (!startsWith(absHref, settings.rootUrl)) {
|
if (!startsWith(absHref, settings.rootHref)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,12 +164,12 @@ modulejs.define('model/item', ['_', 'core/types', 'core/event', 'core/settings',
|
||||||
|
|
||||||
isRoot: function () {
|
isRoot: function () {
|
||||||
|
|
||||||
return this.absHref === settings.rootUrl;
|
return this.absHref === settings.rootHref;
|
||||||
},
|
},
|
||||||
|
|
||||||
isH5ai: function () {
|
isH5ai: function () {
|
||||||
|
|
||||||
return this.absHref === settings.appUrl;
|
return this.absHref === settings.appHref;
|
||||||
},
|
},
|
||||||
|
|
||||||
isEmpty: function () {
|
isEmpty: function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue