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/04 16:24:21 UTC
[5/6] incubator-ponymail git commit: conform to the bootstrap-like
table model
conform to the bootstrap-like table model
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/b1ccbfa8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/b1ccbfa8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/b1ccbfa8
Branch: refs/heads/coffee-and-cake
Commit: b1ccbfa828c147ae0188a1f1499b79f338c99b5f
Parents: d2a1cac
Author: Daniel Gruno <hu...@apache.org>
Authored: Sun Sep 4 18:23:54 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Sun Sep 4 18:23:54 2016 +0200
----------------------------------------------------------------------
site/css/ponymail2.css | 32 ++++++++++++++++++++++++++-----
site/js/coffee/listview_basic.coffee | 19 +++++++++++++++---
2 files changed, 43 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/b1ccbfa8/site/css/ponymail2.css
----------------------------------------------------------------------
diff --git a/site/css/ponymail2.css b/site/css/ponymail2.css
index 53877d7..fb11cd0 100644
--- a/site/css/ponymail2.css
+++ b/site/css/ponymail2.css
@@ -288,16 +288,14 @@ h3, h2, h1 {
/* listview styles */
.listview_item {
- border-radius: 2px;
- border: 1px solid rgba(0,0,0,0.3);
padding: 2px;
- margin: 1px;
+ margin: 0px;
float: left;
width: calc(100% - 8px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
- background: #FAFAFA;
+ background: #FFF;
}
.listview_item img.gravatar {
@@ -323,7 +321,7 @@ h3, h2, h1 {
}
.listview_item div:nth-child(3) {
- width: calc(100% - 450px);
+ width: calc(100% - 380px);
}
.listview_right {
@@ -367,6 +365,30 @@ h3, h2, h1 {
user-select: none;
}
+.listview_table {
+ border-radius: 3px;
+ border: 1px solid rgba(0,0,0,0.15);
+ float: left;
+ width: 100%;
+}
+.listview_table .listview_item:hover {
+ background: #F0F0F0;
+}
+
+.listview_table .listview_item {
+ border-bottom: 1px solid rgba(0,0,0,0.15);
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ background: #FFF;
+
+}
+
+.listview_table .listview_item:last-child {
+ border-bottom: none;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+
a {
color: #248;
}
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/b1ccbfa8/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index 7f956bd..2b5665e 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -42,8 +42,15 @@ class BasicListView
@lv = get('listview')
@lv = @lv.empty()
+ ### Set some internal vars ###
+ @listsize = 0
+
### If we got results, use scroll() to display from result 0 on ###
if isArray(@json.thread_struct) and @json.thread_struct.length > 0
+
+ ### Set some internal vars ###
+ @listsize = @json.thread_struct.length
+
### Reverse thread struct, but only if we're not using an
# already reversed cache ###
if not @json.cached
@@ -53,8 +60,6 @@ class BasicListView
### No results, just say...that ###
@lv.inject("No emails found matching this criterion.")
- ### Set some internal vars ###
- @listsize = @json.thread_struct.length
# set current list view to this class
ponymail_current_listview = this
@@ -70,6 +75,12 @@ class BasicListView
@rpp = rpp
@pos = pos
+ ### Show how many threads out of how many we are showing ###
+ f = pos+1
+ l = Math.min(@listsize - pos, pos+rpp)
+ dStat = new HTML('div', { style: {float: "left", width: "100%", fontSize: "80%", textAlign: "center"}}, "Showing threads #{f} through #{l} out of #{@listsize}")
+ @lv.inject(dStat)
+
### First, build the prev/next buttons if needed ###
if pos > 0 or (pos+rpp) < @json.thread_struct.length
topButtons = new HTML('div', { style: {float: "left", width: "100%"}})
@@ -100,6 +111,7 @@ class BasicListView
@lv.inject(topButtons)
### For each email result,...###
+ lvitems = new HTML('div', { class: "listview_table" })
for item in @json.thread_struct[pos...(pos+rpp)]
original = @findEmail(item.tid)
### Be sure we actually have an email here ###
@@ -108,7 +120,8 @@ class BasicListView
item = @listViewItem(original, item)
### Inject new item into the list view ###
- @lv.inject(item)
+ lvitems.inject(item)
+ @lv.inject(lvitems)
### If we made buttons, clone them at the bottom ###
if topButtons