ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [09/12] incubator-ponymail git commit: start calling prefs and having that call back to listview
Date Sat, 03 Sep 2016 07:45:57 GMT
start calling prefs and having that call back to listview


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/496d7b49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/496d7b49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/496d7b49

Branch: refs/heads/coffee-and-cake
Commit: 496d7b492f36009bc241a2cfbfed91720f10e9c6
Parents: 2ee3d35
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Sat Sep 3 09:42:14 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Sat Sep 3 09:42:14 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/preferences.coffee |  6 +++++-
 site/js/coffee/scaffolding.coffee | 13 +++++++++----
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/496d7b49/site/js/coffee/preferences.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/preferences.coffee b/site/js/coffee/preferences.coffee
index bc1292c..4ec06ab 100644
--- a/site/js/coffee/preferences.coffee
+++ b/site/js/coffee/preferences.coffee
@@ -16,4 +16,8 @@
 ###
 
 setupAccount = (json, state) ->
-    
\ No newline at end of file
+    if json and isArray(json.lists)
+        for domain, lists of json.lists
+            ponymail_lists[domain] = lists
+    if state.listview
+        listView(null, true)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/496d7b49/site/js/coffee/scaffolding.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/scaffolding.coffee b/site/js/coffee/scaffolding.coffee
index 91783d0..26e2abe 100644
--- a/site/js/coffee/scaffolding.coffee
+++ b/site/js/coffee/scaffolding.coffee
@@ -57,11 +57,7 @@ listviewScaffolding = () ->
     ### Then make the calendar placeholder ###
     calHolder = new HTML('div', { id: "calendar"})
     mainDiv.inject(calHolder)
-    
-    ### TEST: Insert fake calendar ###
-    cal = new Calendar(2010)
     calHolder.inject(new HTML('h3', {}, "Archive:"))
-    calHolder.inject(cal)
     
     ### Finally, make the list view placeholder ###
     listDiv = new HTML('div', { id: "listview", class: "sbox"})
@@ -75,4 +71,13 @@ listviewScaffolding = () ->
         new HTML('a', { href: 'https://ponymail.incubator.apache.org/'}, "Apache Pony Mail
(Incubating) v/#{ponymail_version}"),
         ". Copyright 2016, the Apache Software Foundation."
     ])
+    
+    ### Make an API call to the preferences script, have it call back to listView once done
###
+    r = new HTTPRequest("api/preferences.lua", {
+        callback: setupAccount
+        state: {
+            listview: true
+        }
+    })
+    
     
\ No newline at end of file


Mime
View raw message