mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-24 11:48:54 +00:00
SOGoDragHandles.js - cleanup source
This commit is contained in:
1 parent
90fe3edce2
commit
481b533fc6
1 file changed
+1
-27
@@ -4,8 +4,7 @@
|
|||||||
* Drag handle widget interface to be added to a DIV (the drag handle)
|
* Drag handle widget interface to be added to a DIV (the drag handle)
|
||||||
*
|
*
|
||||||
* Available events:
|
* Available events:
|
||||||
* handle:resize -- fired once the value of the input has changed
|
* handle:dragged -- fired once the handle has been dropped
|
||||||
* handle:dragged --
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
var SOGoDragHandlesInterface = {
|
var SOGoDragHandlesInterface = {
|
||||||
@@ -185,31 +184,6 @@ var SOGoDragHandlesInterface = {
|
|||||||
if (Prototype.Browser.IE && event.button != this.btn)
|
if (Prototype.Browser.IE && event.button != this.btn)
|
||||||
this.stopHandleDragging(event);
|
this.stopHandleDragging(event);
|
||||||
},
|
},
|
||||||
doubleClick: function (event) {
|
|
||||||
if (!this.dhType)
|
|
||||||
this._determineType();
|
|
||||||
if (this.dhType == 'horizontal') {
|
|
||||||
var lLeft = this.leftBlock.offsetLeft;
|
|
||||||
|
|
||||||
if (this.offsetLeft > lLeft) {
|
|
||||||
var leftdelta = this.rightBlock.offsetLeft - this.offsetLeft;
|
|
||||||
|
|
||||||
this.setStyle({ left: lLeft + 'px' });
|
|
||||||
this.leftBlock.setStyle({ width: '0px' });
|
|
||||||
this.rightBlock.setStyle({ left: (lLeft + leftdelta) + 'px' });
|
|
||||||
}
|
|
||||||
} else if (this.dhType == 'vertical') {
|
|
||||||
var uTop = this.upperBlock.offsetTop;
|
|
||||||
|
|
||||||
if (this.offsetTop > uTop) {
|
|
||||||
var topdelta = this.lowerBlock.offsetTop - this.offsetTop;
|
|
||||||
|
|
||||||
this.setStyle({ top: uTop + 'px' });
|
|
||||||
this.upperBlock.setStyle({ width: '0px' });
|
|
||||||
this.lowerBlock.setStyle({ top: (uTop + topdelta) + 'px' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
saveDragHandleState: function (type, position, fcn) {
|
saveDragHandleState: function (type, position, fcn) {
|
||||||
if (!$(document.body).hasClassName("popup")) {
|
if (!$(document.body).hasClassName("popup")) {
|
||||||
var urlstr = ApplicationBaseURL + "saveDragHandleState"
|
var urlstr = ApplicationBaseURL + "saveDragHandleState"
|
||||||
|
|||||||
Reference in new issue
Block a user