openmedialibrary/static/js/fullscreenButton.js
2014-05-12 04:09:31 +02:00

34 lines
No EOL
723 B
JavaScript

'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() {
Ox.Fullscreen.enter(oml.$ui.viewer.find('iframe')[0]);
},
oml_itemview: function() {
that.update();
}
});
that.update = function() {
return that.options({
disabled: ui.itemView != 'book'
});
};
return that.update();
};