openmedialibrary/static/js/fullscreenButton.js

35 lines
730 B
JavaScript
Raw Normal View History

2014-05-04 17:26:43 +00:00
'use strict';
oml.ui.fullscreenButton = function() {
var ui = oml.user.ui,
that = Ox.Button({
style: 'squared',
title: 'grow',
tooltip: Ox._('Enter Fullscreen'),
type: 'image'
})
.css({
float: 'left',
margin: '4px 2px'
})
.bindEvent({
click: function() {
2019-02-12 07:30:06 +00:00
Ox.Fullscreen.enter(oml.$ui.viewer[0]);
2014-05-04 17:26:43 +00:00
},
oml_itemview: function() {
2014-05-17 11:45:57 +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.itemView != 'book'
});
};
2014-05-17 11:45:57 +00:00
return that.updateElement();
2014-05-04 17:26:43 +00:00
2019-02-12 07:30:06 +00:00
};