mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-13 01:08:50 +00:00
Monotone-Parent: 27ade59da309caaf33ffd176d44a95672955e9c4
Monotone-Revision: d3b9346b7ff729aa3e123d710cf798285311dc5c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-02-04T22:22:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -70,7 +70,9 @@ var SOGoDragHandlesInterface = {
|
||||
this.rightBlock.setStyle({ left: (this.origRight + deltaX) + 'px' });
|
||||
this.leftBlock.setStyle({ width: (this.origLeft + deltaX) + 'px' });
|
||||
}
|
||||
} else if (this.dhType == 'vertical') {
|
||||
this.saveDragHandleState(this.dhType, this.leftBlock.getStyle("width"));
|
||||
}
|
||||
else if (this.dhType == 'vertical') {
|
||||
var pointerY = Event.pointerY(event);
|
||||
if (pointerY <= this.topMargin) {
|
||||
this.lowerBlock.setStyle({ top: (this.topMargin - delta) + 'px' });
|
||||
@@ -81,6 +83,7 @@ var SOGoDragHandlesInterface = {
|
||||
this.lowerBlock.setStyle({ top: (this.origLower + deltaY - delta) + 'px' });
|
||||
this.upperBlock.setStyle({ height: (this.origUpper + deltaY - delta) + 'px' });
|
||||
}
|
||||
this.saveDragHandleState(this.dhType, this.upperBlock.getStyle("height"));
|
||||
}
|
||||
Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBound, true);
|
||||
Event.stopObserving(document.body, "mousemove", this.moveBound, true);
|
||||
@@ -88,8 +91,6 @@ var SOGoDragHandlesInterface = {
|
||||
document.body.setAttribute('style', '');
|
||||
|
||||
Event.stop(event);
|
||||
|
||||
saveDragHandlesState();
|
||||
},
|
||||
move: function (event) {
|
||||
if (!this.dhType)
|
||||
@@ -135,6 +136,19 @@ var SOGoDragHandlesInterface = {
|
||||
this.lowerBlock.setStyle({ top: (uTop + topdelta) + 'px' });
|
||||
}
|
||||
}
|
||||
},
|
||||
saveDragHandleState: function (type, position) {
|
||||
var urlstr = ApplicationBaseURL + "saveDragHandleState"
|
||||
+ "?" + type + "=" + position;
|
||||
triggerAjaxRequest(urlstr, this.saveDragHandleStateCallback);
|
||||
},
|
||||
|
||||
saveDragHandleStateCallback: function (http) {
|
||||
if (isHttpStatus204(http.status)) {
|
||||
log ("drag handle state saved");
|
||||
}
|
||||
else if (http.readyState == 4) {
|
||||
log ("can't save handle state");
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user