forked from 0x2620/oxjs
updating Ox.App
This commit is contained in:
parent
d8d14cffe7
commit
6c0d7cd3ca
2 changed files with 69 additions and 115 deletions
|
|
@ -32,9 +32,9 @@ Provides function Ox.UI([options], callback) that fires when
|
|||
}
|
||||
},
|
||||
oxUIOptions = {
|
||||
// 'icon', 'console' or 'none'
|
||||
display: 'none',
|
||||
theme: 'classic'
|
||||
app: false,
|
||||
display: 'none', // 'icon', 'console' or 'none'
|
||||
theme: 'classic' // 'classic' or 'modern
|
||||
};
|
||||
|
||||
files.forEach(function(file, i) {
|
||||
|
|
@ -161,7 +161,9 @@ Provides function Ox.UI([options], callback) that fires when
|
|||
'Consolas', 'Lucida Console'
|
||||
].join(', '),
|
||||
fontSize: '12px',
|
||||
color: 'rgb(240, 240, 240)'
|
||||
color: 'rgb(' + (
|
||||
oxUIOptions.theme == 'classic' ? '16, 16, 16' : '240, 240 240'
|
||||
) + ')'
|
||||
})
|
||||
.html(str)
|
||||
.appendTo(element);
|
||||
|
|
@ -376,7 +378,7 @@ Provides function Ox.UI([options], callback) that fires when
|
|||
$.when.apply(null, promises)
|
||||
.done(function() {
|
||||
var $div, error = $('.error').length;
|
||||
if (!error) {
|
||||
if (!error && !oxUIOptions.app) {
|
||||
$div = $('div');
|
||||
$('img').remove();
|
||||
$div.animate({
|
||||
|
|
@ -441,7 +443,7 @@ Provides function Ox.UI([options], callback) that fires when
|
|||
};
|
||||
|
||||
Ox.UI.elements = {};
|
||||
Ox.UI.DEFAULT_THEME = 'classic';
|
||||
Ox.UI.DEFAULT_THEME = 'classic'; // fixme: needed?
|
||||
Ox.UI.DIMENSIONS = {
|
||||
horizontal: ['width', 'height'],
|
||||
vertical: ['height', 'width']
|
||||
|
|
@ -456,23 +458,13 @@ Provides function Ox.UI([options], callback) that fires when
|
|||
filename = 'symbolRight.svg';
|
||||
}
|
||||
return Ox.UI.PATH + filename.split('.').pop() +
|
||||
'/ox.ui.' + Ox.UI.theme() + '/' + filename;
|
||||
'/ox.ui.' + Ox.Theme() + '/' + filename;
|
||||
};
|
||||
Ox.UI.IMAGE_CACHE = [];
|
||||
Ox.UI.PATH = $('script[src*="OxUI.js"]')
|
||||
.attr('src').replace('js/OxUI.js', '');
|
||||
Ox.UI.SCROLLBAR_SIZE = $.browser.mozilla ? 16 : 12;
|
||||
// fixme: the follwing should be deprecated
|
||||
Ox.UI.theme = function() {
|
||||
var theme;
|
||||
Ox.forEach(Ox.UI.$body.attr('class').split(' '), function(v) {
|
||||
if (Ox.startsWith(v, 'OxTheme')) {
|
||||
theme = v.replace('OxTheme', '').toLowerCase();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return theme || Ox.UI.DEFAULT_THEME; // fixme: shouldn't be neccessary
|
||||
};
|
||||
Ox.UI.getBarSize = function(size) {
|
||||
var sizes = {
|
||||
small: 20,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue