Open Media Library
This commit is contained in:
commit
2ee2bc178a
228 changed files with 85988 additions and 0 deletions
34
static/js/previewButton.js
Normal file
34
static/js/previewButton.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.previewButton = function() {
|
||||
|
||||
var ui = oml.user.ui,
|
||||
|
||||
that = Ox.Button({
|
||||
selectable: true,
|
||||
style: 'squared',
|
||||
title: 'view',
|
||||
tooltip: Ox._('Preview {0}', [Ox.UI.symbols.space]),
|
||||
type: 'image'
|
||||
})
|
||||
.css({
|
||||
float: 'left',
|
||||
margin: '4px 2px'
|
||||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
oml.$ui.list[data.value ? 'openPreview' : 'closePreview']();
|
||||
},
|
||||
oml_listselection: function() {
|
||||
that.update();
|
||||
}
|
||||
});
|
||||
|
||||
that.update = function() {
|
||||
return that.options({disabled: ui.listSelection.length == 0});
|
||||
};
|
||||
|
||||
return that.update();
|
||||
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue