From ef0b52dfe6f5202a0d22711bff51e3c3c12987c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 25 Jul 2008 18:42:21 +0000 Subject: [PATCH] Monotone-Parent: 6f946a78a43cf1914cfbcff43562c9c0ed48a1b0 Monotone-Revision: 1816a792f1f7aa94e6d90dc5abea13dcd55ac0c6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-25T18:42:21 Monotone-Branch: ca.inverse.sogo --- UI/MailerUI/product.plist | 6 +- UI/WebServerResources/searchfield.js | 108 --------------------------- 2 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 UI/WebServerResources/searchfield.js diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist index da02d0149..27ef5d7fc 100644 --- a/UI/MailerUI/product.plist +++ b/UI/MailerUI/product.plist @@ -1,11 +1,7 @@ { /* -*-java-*- */ requires = ( MAIN, MainUI, CommonUI, Mailer, MailPartViewers ); /* , Sieve */ - publicResources = ("uix.css", - "mailer.css", - "mailer.js", - "generic.js", - "searchfield.js", + publicResources = ("generic.js", "UIxAppointmentEditor.js", "UIxContactEditor.js", "UIxMailToSelection.js", diff --git a/UI/WebServerResources/searchfield.js b/UI/WebServerResources/searchfield.js deleted file mode 100644 index c01af591c..000000000 --- a/UI/WebServerResources/searchfield.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ -/* JavaScript for SOGo Mailer */ - -var didStop = false; -var field = null; -var firstValue = ""; -var isRegistered = false; -var lastKeyPress = null; -var submitAfterMS = 500; - -function ml_reloadTableView(searchtext, elementid) { - var http = createHTTPClient(); - - if (http) { - var viewURL, url; - var hasQueryPara; - - // TODO: properly parse query parameters - viewURL = this.location.href; - hasQueryPara = viewURL.indexOf("?") == -1 ? false : true; - url = (hasQueryPara ? "&" : "?") + "noframe=1&search="; - url = url + encodeURIComponent(searchtext); - // alert("GET " + url); - - url = viewURL + url; - http.open("GET", url, false); - http.send(null); - if (http.status != 200) { - alert("Could not reload view."); - } - else { - var tv; - - tv = document.getElementById(elementid) - tv.innerHTML = http.responseText; - } - } -} - -function ml_reloadSearchIfFieldChanged() { - if (field) { - if (field.value && field.value != firstValue) { - ml_reloadTableView(field.value, "cl_tableview_reloadroot"); - firstValue = field.value; - } - } -} - -function ml_timeoutCallback() { - if (didStop) { - didStop = false; - return; - } - - var now = new Date().getTime(); - if ((now - lastKeyPress) < submitAfterMS) { - setTimeout("ml_timeoutCallback()", 10); - isRegistered = true; - return; - } - - ml_reloadSearchIfFieldChanged(); - isRegistered = false; -} - -function ml_activateSearchField(sender, _submitTimeout) { - didStop = false; - field = sender; - firstValue = field.value; - submitAfterMS = _submitTimeout; - return true; -} -function ml_deactivateSearchField(sender) { - didStop = true; - field = null; - firstValue = ""; - return true; -} - -function ml_searchFieldKeyPressed(sender) { - lastKeyPress = new Date().getTime(); - - if (isRegistered) - return; - - setTimeout("ml_timeoutCallback()", 10); - isRegistered = true; - return true; -}