2014-05-04 17:26:43 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
oml.ui.openButton = function() {
|
|
|
|
|
|
|
|
var ui = oml.user.ui,
|
|
|
|
|
|
|
|
that = Ox.Button({
|
|
|
|
style: 'squared',
|
|
|
|
title: 'arrowRight',
|
2014-09-29 13:17:59 +00:00
|
|
|
tooltip: Ox._('Open Book {0}', [Ox.SYMBOLS.return]),
|
2014-05-04 17:26:43 +00:00
|
|
|
type: 'image'
|
|
|
|
})
|
|
|
|
.css({
|
|
|
|
float: 'left',
|
|
|
|
margin: '4px 2px 4px 4px'
|
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
click: function() {
|
|
|
|
oml.UI.set({item: ui.listSelection[0]});
|
|
|
|
},
|
|
|
|
oml_listselection: function() {
|
2014-05-18 23:24:04 +00:00
|
|
|
that.updateElement();
|
2014-05-04 17:26:43 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-05-17 11:45:57 +00:00
|
|
|
that.updateElement = function() {
|
2014-05-04 17:26:43 +00:00
|
|
|
return that.options({disabled: ui.listSelection.length == 0});
|
|
|
|
};
|
|
|
|
|
2014-05-17 11:45:57 +00:00
|
|
|
return that.updateElement();
|
2014-05-04 17:26:43 +00:00
|
|
|
|
2014-05-18 23:24:04 +00:00
|
|
|
};
|