config: reorder item keys
This commit is contained in:
parent
204fdce0cf
commit
1735967306
2 changed files with 14 additions and 14 deletions
45
static/js/updateButton.js
Normal file
45
static/js/updateButton.js
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.updateButton = function() {
|
||||
|
||||
var that = Ox.Element({
|
||||
tooltip: Ox._('Updates Available')
|
||||
})
|
||||
.css({
|
||||
marginRight: '3px'
|
||||
}).hide();
|
||||
|
||||
function check() {
|
||||
oml.api.getVersion(function(response) {
|
||||
if (response.data.update) {
|
||||
that.show();
|
||||
} else {
|
||||
that.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
check();
|
||||
setTimeout(check, 86400000);
|
||||
|
||||
Ox.Button({
|
||||
style: 'symbol',
|
||||
title: 'upload',
|
||||
type: 'image'
|
||||
})
|
||||
.css({
|
||||
float: 'left',
|
||||
borderRadius: 0
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
oml.UI.set({
|
||||
'page': 'app',
|
||||
'part.app': 'update'
|
||||
})
|
||||
}
|
||||
})
|
||||
.appendTo(that);
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue