version 1 of the inbox search

This commit is contained in:
Alexandre Cloutier
2014-08-06 14:49:36 -04:00
parent 1cc93c700a
commit 7794d716b9
16 changed files with 891 additions and 82 deletions

View File

@@ -72,22 +72,13 @@ SOGoMailDataSource = Class.create({
// log ("MailDataSource.init() " + this.uids.length + " UIDs, " + this.cache.keys().length + " headers");
},
load: function(urlParams) {
var params;
load: function(content) {
this.loaded = false;
if (urlParams.keys().length > 0) {
params = urlParams.keys().collect(function(key) { return key + "=" + urlParams.get(key); }).join("&");
}
else
params = "";
this.id = this.url + "?" + params;
// log ("MailDataSource.load() " + params);
triggerAjaxRequest(this.url + "/uids",
this._loadCallback.bind(this),
null,
params,
{ "Content-type": "application/x-www-form-urlencoded" });
content,
{ "content-type": "application/json" });
},
_loadCallback: function(http) {