mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Adds core/mode. Lots of changes to make installation more flexible.
This commit is contained in:
parent
fd89ea1d90
commit
f1a2a44079
14 changed files with 116 additions and 82 deletions
|
@ -39,6 +39,11 @@ modulejs.define('ext/crumb', ['_', '$', 'core/settings', 'core/resource', 'core/
|
|||
$a.find('img').attr('src', resource.image('home'));
|
||||
}
|
||||
|
||||
if (entry.isRoot()) {
|
||||
$html.addClass('root');
|
||||
$a.find('img').attr('src', resource.image('home'));
|
||||
}
|
||||
|
||||
if (entry.isCurrentFolder()) {
|
||||
$html.addClass('current');
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
modulejs.define('ext/mode', ['_', '$', 'core/settings', 'core/parser'], function (_, $, allsettings, parser) {
|
||||
modulejs.define('ext/mode', ['_', '$', 'core/mode', 'core/settings'], function (_, $, mode, allsettings) {
|
||||
|
||||
var defaults = {
|
||||
enabled: false,
|
||||
|
@ -16,14 +16,14 @@ modulejs.define('ext/mode', ['_', '$', 'core/settings', 'core/parser'], function
|
|||
|
||||
var info = '';
|
||||
|
||||
if (parser.mode) {
|
||||
info += parser.mode;
|
||||
if (mode.id) {
|
||||
info += mode.id;
|
||||
}
|
||||
if (settings.display > 0 && parser.server.name) {
|
||||
info += (info ? ' on ' : '') + parser.server.name;
|
||||
if (settings.display > 0 && mode.serverName) {
|
||||
info += (info ? ' on ' : '') + mode.serverName;
|
||||
}
|
||||
if (settings.display > 1 && parser.server.version) {
|
||||
info += (info ? '-' : '') + parser.server.version;
|
||||
if (settings.display > 1 && mode.serverVersion) {
|
||||
info += (info ? '-' : '') + mode.serverVersion;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
|
|
|
@ -61,6 +61,12 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
|||
$img.attr('src', resource.icon('folder-home'));
|
||||
}
|
||||
|
||||
// is it the root?
|
||||
if (entry.isRoot()) {
|
||||
$html.addClass('root');
|
||||
$img.attr('src', resource.icon('folder-home'));
|
||||
}
|
||||
|
||||
// is it the current folder?
|
||||
if (entry.isCurrentFolder()) {
|
||||
$html.addClass('current');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue