ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [1/4] incubator-ponymail git commit: registers and permalink workarounds
Date Mon, 05 Sep 2016 19:06:05 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake 14947e0a5 -> 37f71028b


registers and permalink workarounds


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

Branch: refs/heads/coffee-and-cake
Commit: 0ce93589743de2f69de6cf7c9b4885fadddfd9bd
Parents: 14947e0
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Mon Sep 5 21:05:11 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Mon Sep 5 21:05:11 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/email_display_basic.coffee    |  4 +++-
 site/js/coffee/email_display_bydate.coffee   |  2 +-
 site/js/coffee/email_display_threaded.coffee | 22 ++++++++++++++--------
 site/js/coffee/listview_basic.coffee         |  3 ++-
 site/js/coffee/listview_single_email.coffee  |  2 +-
 5 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0ce93589/site/js/coffee/email_display_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/email_display_basic.coffee b/site/js/coffee/email_display_basic.coffee
index 60e67f3..c7a7756 100644
--- a/site/js/coffee/email_display_basic.coffee
+++ b/site/js/coffee/email_display_basic.coffee
@@ -232,7 +232,9 @@ class BasicEmailDisplay
         @placeholder.show(false)
         ponymail_email_open.remove(this)
         ponymail_current_email = null
-        
+
+ponymail_register_display('default', "Single email view", BasicEmailDisplay)
+
 ### toggleQuote: show/hide a quote ###
 toggleQuote = (div) ->
     div.parentNode.childNodes[2].show()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0ce93589/site/js/coffee/email_display_bydate.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/email_display_bydate.coffee b/site/js/coffee/email_display_bydate.coffee
index 3e66b30..0d30a64 100644
--- a/site/js/coffee/email_display_bydate.coffee
+++ b/site/js/coffee/email_display_bydate.coffee
@@ -103,4 +103,4 @@ class DateEmailDisplay extends BasicEmailDisplay
                     me.render(json, state)
             })
         
-        
\ No newline at end of file
+ponymail_register_display('date', "Stacked view", DateEmailDisplay)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0ce93589/site/js/coffee/email_display_threaded.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/email_display_threaded.coffee b/site/js/coffee/email_display_threaded.coffee
index 233e599..37d37b5 100644
--- a/site/js/coffee/email_display_threaded.coffee
+++ b/site/js/coffee/email_display_threaded.coffee
@@ -17,10 +17,22 @@
 
 ### threaded email display class - extends BasicEmail Display ###
 class ThreadedEmailDisplay extends BasicEmailDisplay
-    constructor: (@parent, @mid, index) ->
+    constructor: (@parent, @mid, index, tjson = null) ->
         @placeholder = get("placeholder_" + @mid) || new HTML('div', { class: "email_placeholder",
id: "placeholder_" + @mid})
         
         
+        me = this
+        
+        ### Find the thread or fake one ###
+        thread = {tid: @mid}
+        if tjson
+            thread = tjson
+            @mid = tjson.mid
+            @parent = get('email_placeholder')
+        else if index and ponymail_current_listview and ponymail_current_listview.json.thread_struct[index]
+            thread = ponymail_current_listview.json.thread_struct[index]
+        
+        
         ### Inject into listview or body ###
         @parent.inject(@placeholder)
         
@@ -28,12 +40,6 @@ class ThreadedEmailDisplay extends BasicEmailDisplay
         @placeholder = @placeholder.empty()
         @placeholder.show(true)
         
-        me = this
-        
-        ### Find the thread or fake one ###
-        thread = {tid: @mid}
-        if index and ponymail_current_listview and ponymail_current_listview.json.thread_struct[index]
-            thread = ponymail_current_listview.json.thread_struct[index]
         
         @threadedFetch(@placeholder, thread, 1)
         return this
@@ -97,4 +103,4 @@ class ThreadedEmailDisplay extends BasicEmailDisplay
                 @threadedFetch(replyplace, item, Math.min(nestedness+1, 5))
         return this
     
-        
\ No newline at end of file
+ponymail_register_display('threaded', "Threaded view", ThreadedEmailDisplay)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0ce93589/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index cb48b68..8ad3fc0 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -291,4 +291,5 @@ class BasicListView
             ### Previous page? ###
             if @pos > 0
                 @scroll(@rpp, Math.max(0,@pos-@rpp))
-                
\ No newline at end of file
+                
+ponymail_register_listview('default', 'Compact (threaded) theme', BasicListView)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0ce93589/site/js/coffee/listview_single_email.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_single_email.coffee b/site/js/coffee/listview_single_email.coffee
index 8f1d3d7..07cd0f7 100644
--- a/site/js/coffee/listview_single_email.coffee
+++ b/site/js/coffee/listview_single_email.coffee
@@ -121,4 +121,4 @@ class SingleListView extends BasicListView
                             )
             return item
         
-                
\ No newline at end of file
+ponymail_register_listview('single', 'Single email theme', SingleListView)
\ No newline at end of file


Mime
View raw message