mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-29 15:15:37 +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:
@@ -1496,15 +1496,18 @@ function getDragHandlesStateCallback(http) {
|
||||
if (http.status == 200) {
|
||||
if (http.responseText.length > 0) {
|
||||
// The response text is a JSON array
|
||||
// of the right and top offsets.
|
||||
// of the top and right offsets.
|
||||
var data = http.responseText.evalJSON(true);
|
||||
|
||||
$("leftPanel").setStyle({ width: data[0] });
|
||||
$("rightPanel").setStyle({ left: data[0] });
|
||||
$("verticalDragHandle").setStyle({ left: data[0] });
|
||||
$("mailboxContent").setStyle({ height: data[1] });
|
||||
$("messageContent").setStyle({ top: data[1] });
|
||||
$("rightDragHandle").setStyle({ top: data[1] });
|
||||
if (data[0].length > 0) {
|
||||
$("mailboxContent").setStyle({ height: data[0] });
|
||||
$("messageContent").setStyle({ top: data[0] });
|
||||
$("rightDragHandle").setStyle({ top: data[0] });
|
||||
}
|
||||
if (data[1].length > 0) {
|
||||
$("leftPanel").setStyle({ width: data[1] });
|
||||
$("rightPanel").setStyle({ left: data[1] });
|
||||
$("verticalDragHandle").setStyle({ left: data[1] });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1532,26 +1535,6 @@ function getFoldersStateCallback(http) {
|
||||
}
|
||||
}
|
||||
|
||||
function saveDragHandlesState() {
|
||||
// Call from SOGoDragHandles.js
|
||||
var leftBlock = $("leftPanel");
|
||||
var upperBlock = $("mailboxContent");
|
||||
|
||||
if (leftBlock && upperBlock) {
|
||||
var dragHandlesState = new Array(leftBlock.getStyle("width"),
|
||||
upperBlock.getStyle("height"));
|
||||
var urlstr = ApplicationBaseURL + "saveDragHandlesState" + "?dragHandles=" + dragHandlesState.toJSON();
|
||||
triggerAjaxRequest(urlstr, saveDragHandlesStateCallback);
|
||||
}
|
||||
}
|
||||
|
||||
function saveDragHandlesStateCallback(http) {
|
||||
if (http.readyState == 4
|
||||
&& isHttpStatus204(http.status)) {
|
||||
log ("drag handles state saved");
|
||||
}
|
||||
}
|
||||
|
||||
function saveFoldersState() {
|
||||
if (mailAccounts.length > 0) {
|
||||
var foldersState = mailboxTree.getFoldersState();
|
||||
|
||||
Reference in New Issue
Block a user