You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/06 15:54:13 UTC

[1/2] incubator-ponymail git commit: some comments

Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake 826fe3db1 -> 1c88bbbd9


some comments


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

Branch: refs/heads/coffee-and-cake
Commit: 42e499eca8d9407f17c53cca8870011607d5590a
Parents: 826fe3d
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 16:46:15 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 16:46:15 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/search.coffee | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/42e499ec/site/js/coffee/search.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/search.coffee b/site/js/coffee/search.coffee
index b67365c..ea46750 100644
--- a/site/js/coffee/search.coffee
+++ b/site/js/coffee/search.coffee
@@ -15,6 +15,8 @@
  limitations under the License.
 ###
 
+
+### Quick Search bar creation ###
 quickSearchBar = () ->
     qs = new HTML('form', { class: "quicksearch", onsubmit: 'quickSearch(); return false;'})
     
@@ -35,9 +37,13 @@ quickSearchBar = () ->
     
     options.inject([span, new HTML('br'), list])
     
-    
+    ### Input field for text search ###
     input = new HTML('input', { type: "text", id: 'qs_input', class: "qs_input", placeholder: "Type search terms..."})
+    
+    ### The blue search button ###
     button = new HTML('input', { type: 'submit', class: 'qs_button'})
+    
+    ### Add it all to the form ###
     qs.inject(options)
     qs.inject(input)
     qs.inject(button)


[2/2] incubator-ponymail git commit: ensure we display something even if no author/subject

Posted by hu...@apache.org.
ensure we display something even if no author/subject

it could happen!


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

Branch: refs/heads/coffee-and-cake
Commit: 1c88bbbd9cef2d9a69c7029ce17e1a856f6062f3
Parents: 42e499e
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 17:53:58 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 17:53:58 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/listview_basic.coffee |  8 ++++++++
 site/js/ponymail-coffee.js           | 17 +++++++++++++++++
 2 files changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/1c88bbbd/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index 980bde8..f9bfe47 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -217,6 +217,13 @@ class BasicListView
             ### Gravatar ###
             avatar = new HTML('img', { class: "gravatar", src: "https://secure.gravatar.com/avatar/#{original.gravatar}.png?s=24&r=g&d=mm"})
             
+            
+            ### Make sure subject and author is...something ###
+            if original.subject.length == 0
+                original.subject = "(No subject)"
+            if original.from.length == 0
+                original.from = "(No author?)"
+            
             ### Sender, without the <fo...@bar> part - just the name ###
             sender = new HTML('div', {style: {fontWeight: "bold"}}, original.from.replace(/\s*<.+>/, "").replace(/"/g, ''))
             
@@ -225,6 +232,7 @@ class BasicListView
             if hasRead(thread.tid)
                 readStyle = "normal"
                 
+            
             ### Subject, PLUS a bit of the body with a break before ###
             subject = new HTML('div', {}, [
                 new HTML('a', { style: {fontWeight: readStyle}, href: "thread.html/#{thread.tid}", onclick: "readEmail(this.parentNode.parentNode.parentNode); this.style.fontWeight = 'normal'; return false;"}, original.subject),

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/1c88bbbd/site/js/ponymail-coffee.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail-coffee.js b/site/js/ponymail-coffee.js
index 744c8cc..1231e62 100644
--- a/site/js/ponymail-coffee.js
+++ b/site/js/ponymail-coffee.js
@@ -1873,6 +1873,14 @@ BasicListView = (function() {
         src: "https://secure.gravatar.com/avatar/" + original.gravatar + ".png?s=24&r=g&d=mm"
       });
 
+      /* Make sure subject and author is...something */
+      if (original.subject.length === 0) {
+        original.subject = "(No subject)";
+      }
+      if (original.from.length === 0) {
+        original.from = "(No author?)";
+      }
+
       /* Sender, without the <fo...@bar> part - just the name */
       sender = new HTML('div', {
         style: {
@@ -2785,6 +2793,9 @@ threadScaffolding = function() {
  limitations under the License.
  */
 
+
+/* Quick Search bar creation */
+
 quickSearchBar = function() {
   var button, datedata, input, list, listdata, listname, options, qs, span;
   qs = new HTML('form', {
@@ -2818,16 +2829,22 @@ quickSearchBar = function() {
     data: listdata
   }, listname);
   options.inject([span, new HTML('br'), list]);
+
+  /* Input field for text search */
   input = new HTML('input', {
     type: "text",
     id: 'qs_input',
     "class": "qs_input",
     placeholder: "Type search terms..."
   });
+
+  /* The blue search button */
   button = new HTML('input', {
     type: 'submit',
     "class": 'qs_button'
   });
+
+  /* Add it all to the form */
   qs.inject(options);
   qs.inject(input);
   qs.inject(button);