- freeze: function(message) {
- this.overlay = this.overlay
- || $('<div><div>' + message + '</div></div>')
- .addClass(this.overlayClass)
- .css({
- position: 'absolute',
- width: this.element.width(),
- height: this.element.height(),
- top: this.element.position().top,
- left: this.element.position().left
- })
- .appendTo(this.element.parent());
+ freeze: function(message) {
+ if (this.frozen()) {
+ this.unfreeze();
+ }
+ this.overlay = this.overlay
+ || $('<div><div>' + message + '</div></div>')
+ .addClass(this.overlayClass)
+ .css({
+ position: 'absolute',
+ width: this.element.width(),
+ height: this.element.height(),
+ top: this.element.position().top,
+ left: this.element.position().left,
+ 'user-select': 'none',
+ '-webkit-user-select': 'none',
+ '-khtml-user-select': 'none',
+ '-moz-user-select': 'none',
+ overflow: 'hidden'
+ })
+ .attr('unselectable', 'on')
+ .appendTo(this.element.parent());