From 41dfc7f29e8f6cdd50e5db764c267ed558c357c4 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 9 Nov 2012 11:13:59 -0500 Subject: [PATCH 1/6] items: new property 'shiny'. separate 'indent' (''|'comment') from 'shiny' (''|'shiny') --- mod/content.php | 4 +++- object/Item.php | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mod/content.php b/mod/content.php index e0634b3e8..c4b0ca2f6 100644 --- a/mod/content.php +++ b/mod/content.php @@ -784,8 +784,9 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $indent = (($toplevelpost) ? '' : ' comment'); + $shiny = ""; if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) - $indent .= ' shiny'; + $shiny = 'shiny'; // localize_item($item); @@ -829,6 +830,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { 'lock' => $lock, 'location' => template_escape($location), 'indent' => $indent, + 'shiny' => $shiny, 'owner_url' => $owner_url, 'owner_photo' => $owner_photo, 'owner_name' => template_escape($owner_name), diff --git a/object/Item.php b/object/Item.php index 9ec63b4f2..b8afe2213 100644 --- a/object/Item.php +++ b/object/Item.php @@ -93,6 +93,7 @@ class Item extends BaseObject { $star = false; $isstarred = "unstarred"; $indent = ''; + $shiny = ''; $osparkle = ''; $total_children = $this->count_descendants(); @@ -199,8 +200,9 @@ class Item extends BaseObject { if ($shareable) $buttons['share'] = array( t('Share this'), t('share')); } - if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) - $indent .= ' shiny'; + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0){ + $shiny = 'shiny'; + } localize_item($item); @@ -241,6 +243,7 @@ class Item extends BaseObject { 'lock' => $lock, 'location' => template_escape($location), 'indent' => $indent, + 'shiny' => $shiny, 'owner_url' => $this->get_owner_url(), 'owner_photo' => $this->get_owner_photo(), 'owner_name' => template_escape($this->get_owner_name()), From c8b4ce9ccad9e710bdc40086368aba1c6ec05f6d Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 9 Nov 2012 11:24:49 -0500 Subject: [PATCH 2/6] quattro: fix shiny items with threads. fix 'tagged' template --- view/theme/quattro/wall_item_tag.tpl | 10 +++++++++- view/theme/quattro/wall_thread.tpl | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/view/theme/quattro/wall_item_tag.tpl b/view/theme/quattro/wall_item_tag.tpl index e1ef93213..fd0c59ea3 100644 --- a/view/theme/quattro/wall_item_tag.tpl +++ b/view/theme/quattro/wall_item_tag.tpl @@ -1,6 +1,6 @@ {{ if $item.thread_level!=1 }}
{{ endif }} -
+
@@ -17,6 +17,14 @@
$item.ago $item.body
+
+ {{ if $item.drop.pagedrop }} + + {{ endif }} + {{ if $item.drop.dropping }} + $item.drop.delete + {{ endif }} +
diff --git a/view/theme/quattro/wall_thread.tpl b/view/theme/quattro/wall_thread.tpl index 2e5c49392..622968ab0 100644 --- a/view/theme/quattro/wall_thread.tpl +++ b/view/theme/quattro/wall_thread.tpl @@ -27,7 +27,7 @@
-
+
{{endif}} {{ endif }} +{# top thread comment box #} {{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
$item.comment
{{ endif }}{{ endif }}{{ endif }} From b15352f650c21a98256db9c5e274afbe75d00354 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 9 Nov 2012 11:58:35 -0500 Subject: [PATCH 3/6] quattro: collapse threaded comment box --- view/theme/quattro/dark/style.css | 28 ++++++++++++++++++++++++++++ view/theme/quattro/green/style.css | 28 ++++++++++++++++++++++++++++ view/theme/quattro/lilac/style.css | 28 ++++++++++++++++++++++++++++ view/theme/quattro/quattro.less | 23 +++++++++++++++++++++-- view/theme/quattro/wall_thread.tpl | 2 +- 5 files changed, 106 insertions(+), 3 deletions(-) diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index fff08b2e4..65f976245 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1050,6 +1050,34 @@ section { .wall-item-container.comment .wall-item-links { padding-left: 12px; } +.wall-item-container.comment .commentbox { + height: 0px; + overflow: hidden; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment .commentbox .wall-item-comment-wrapper { + border-top: 1px solid #999999; + height: 0px; + overflow: hidden; +} +.wall-item-container.comment:hover .commentbox { + height: auto; + overflow: visible; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment:hover .commentbox .wall-item-comment-wrapper { + border-top: 0px; + height: auto; + overflow: visible; +} /* 'tag' item type */ .wall-item-container.item-tag .wall-item-content { opacity: 0.5; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 9584b019a..5c875feaf 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1050,6 +1050,34 @@ section { .wall-item-container.comment .wall-item-links { padding-left: 12px; } +.wall-item-container.comment .commentbox { + height: 0px; + overflow: hidden; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment .commentbox .wall-item-comment-wrapper { + border-top: 1px solid #999999; + height: 0px; + overflow: hidden; +} +.wall-item-container.comment:hover .commentbox { + height: auto; + overflow: visible; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment:hover .commentbox .wall-item-comment-wrapper { + border-top: 0px; + height: auto; + overflow: visible; +} /* 'tag' item type */ .wall-item-container.item-tag .wall-item-content { opacity: 0.5; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 4c9c74e75..5640f5ba5 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -1050,6 +1050,34 @@ section { .wall-item-container.comment .wall-item-links { padding-left: 12px; } +.wall-item-container.comment .commentbox { + height: 0px; + overflow: hidden; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment .commentbox .wall-item-comment-wrapper { + border-top: 1px solid #999999; + height: 0px; + overflow: hidden; +} +.wall-item-container.comment:hover .commentbox { + height: auto; + overflow: visible; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container.comment:hover .commentbox .wall-item-comment-wrapper { + border-top: 0px; + height: auto; + overflow: visible; +} /* 'tag' item type */ .wall-item-container.item-tag .wall-item-content { opacity: 0.5; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 62260ef39..1c4da1bf7 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -509,7 +509,7 @@ section { a { float: right; } input { float: right; } } - + } @@ -523,6 +523,25 @@ section { left: 0px !important; } .wall-item-links { padding-left: 12px; } + + .commentbox { + height: 0px; + overflow: hidden; + .wall-item-comment-wrapper { + border-top: 1px solid @CommentBoxEmptyBorderColor; + height: 0px; overflow: hidden; + } + .transition(); + } + + &:hover .commentbox { + height:auto; overflow: visible; + .wall-item-comment-wrapper { + border-top: 0px; + height:auto;overflow: visible; + } + .transition(); + } } /* 'tag' item type */ @@ -544,6 +563,7 @@ section { .wall-item-comment-wrapper { margin: 1em 2em 1em 60px; .comment-edit-photo { display: none; } + textarea { height: 1em; width: 100%; font-size: 10px; color: @CommentBoxEmptyColor; @@ -555,7 +575,6 @@ section { color: @CommentBoxFullColor; border: 1px solid @CommentBoxFullBorderColor; } - } .threaded .wall-item-comment-wrapper { margin-left: 0px; } diff --git a/view/theme/quattro/wall_thread.tpl b/view/theme/quattro/wall_thread.tpl index 622968ab0..b39dda3a2 100644 --- a/view/theme/quattro/wall_thread.tpl +++ b/view/theme/quattro/wall_thread.tpl @@ -132,7 +132,7 @@
{{ if $item.threaded }}{{ if $item.comment }}{{ if $item.indent==comment }} -
+
$item.comment From ff659a822bee461fcc3de87dac7ca3b2a11a82e5 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 9 Nov 2012 13:23:47 -0500 Subject: [PATCH 4/6] add apple/gnome web app tags --- view/head.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/view/head.tpl b/view/head.tpl index f861060c7..f5998703f 100644 --- a/view/head.tpl +++ b/view/head.tpl @@ -8,6 +8,11 @@ + + + + + Date: Mon, 12 Nov 2012 12:45:49 -0500 Subject: [PATCH 5/6] quattro: fix tag item template add correct initial and final divs --- view/theme/quattro/wall_item_tag.tpl | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/view/theme/quattro/wall_item_tag.tpl b/view/theme/quattro/wall_item_tag.tpl index fd0c59ea3..63373ab16 100644 --- a/view/theme/quattro/wall_item_tag.tpl +++ b/view/theme/quattro/wall_item_tag.tpl @@ -1,5 +1,27 @@ +{{if $mode == display}} +{{ else }} +{{if $item.comment_firstcollapsed}} +
+ $item.num_comments + $item.hide_text + {{ if $item.thread_level==3 }} - + expand / + collapse thread{{ endif }} +
+