mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 09:02:43 +00:00
Improved JavaScript of UIxContactsUserFolders to avoid useless AJAX requests.
Monotone-Parent: 23831e953238f691f5c6c210b4ddec5d7aee5aec Monotone-Revision: a62454d2734ee40074efa8872c2a7dfef7bf59fc Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-09-04T21:32:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -24,14 +24,14 @@ function onSearchFormSubmit() {
|
||||
}
|
||||
|
||||
function usersSearchCallback(http) {
|
||||
document.userFoldersRequest = null;
|
||||
var div = $("folders");
|
||||
if (http.status == 200) {
|
||||
var response = http.responseText;
|
||||
buildUsersTree(div, http.responseText)
|
||||
}
|
||||
else if (http.status == 404)
|
||||
div.update();
|
||||
document.userFoldersRequest = null;
|
||||
var div = $("folders");
|
||||
if (http.status == 200) {
|
||||
var response = http.responseText;
|
||||
buildUsersTree(div, http.responseText);
|
||||
}
|
||||
else if (http.status == 404)
|
||||
div.update();
|
||||
}
|
||||
|
||||
function addUserLineToTree(tree, parent, line) {
|
||||
@@ -223,20 +223,25 @@ function onConfirmFolderSelection(event) {
|
||||
}
|
||||
|
||||
function onFolderSearchKeyDown(event) {
|
||||
if (event.ctrlKey
|
||||
|| event.metaKey
|
||||
|| event.keyCode == Event.KEY_TAB)
|
||||
return;
|
||||
|
||||
var div = $("folders");
|
||||
|
||||
|
||||
if (!div.clean) {
|
||||
var oldD = $("d");
|
||||
if (oldD) {
|
||||
oldD.remove();
|
||||
delete d;
|
||||
}
|
||||
div.clean = true;
|
||||
$("addButton").disabled = true;
|
||||
var oldD = $("d"); // the folders tree
|
||||
if (oldD) {
|
||||
oldD.remove();
|
||||
delete d;
|
||||
}
|
||||
div.clean = true;
|
||||
$("addButton").disabled = true;
|
||||
}
|
||||
|
||||
if (this.timer)
|
||||
startAnimation($("pageContent"), $("filterPanel"));
|
||||
startAnimation($("pageContent"), $("filterPanel"));
|
||||
}
|
||||
|
||||
function initUserFoldersWindow() {
|
||||
|
||||
Reference in New Issue
Block a user