From a0c887cd5f930d6ef7243b45457cfc11ae5c8336 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Fri, 7 Sep 2012 16:24:25 -0400 Subject: [PATCH] new inline post styles --- .../discussion_thread_inline_view.coffee | 8 +- lms/static/images/small-grey-arrows.png | Bin 0 -> 1252 bytes lms/static/sass/_discussion.scss | 106 +++++++++++++----- .../mustache/_inline_thread.mustache | 12 +- 4 files changed, 90 insertions(+), 36 deletions(-) create mode 100644 lms/static/images/small-grey-arrows.png diff --git a/lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee b/lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee index 76037d7341..e4cd5986de 100644 --- a/lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee +++ b/lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee @@ -195,8 +195,8 @@ class @DiscussionThreadInlineView extends DiscussionContentView @expanded = true @$el.find('.post-body').html(@model.get('body')) @convertMath() - @$el.find('.expand-post').hide() - @$el.find('.collapse-post').show() + @$el.find('.expand-post').css('display', 'none') + @$el.find('.collapse-post').css('display', 'block') @$el.find('.post-extended-content').show() @makeWmdEditor "reply-body" if @$el.find('.loading').length @@ -206,6 +206,6 @@ class @DiscussionThreadInlineView extends DiscussionContentView @expanded = false @$el.find('.post-body').html(@model.get('abbreviatedBody')) @convertMath() - @$el.find('.collapse-post').hide() + @$el.find('.collapse-post').css('display', 'none') @$el.find('.post-extended-content').hide() - @$el.find('.expand-post').show() + @$el.find('.expand-post').css('display', 'block') diff --git a/lms/static/images/small-grey-arrows.png b/lms/static/images/small-grey-arrows.png new file mode 100644 index 0000000000000000000000000000000000000000..d8d7a0e8be2d8b0ecd06aadf3092d058d9ca8ffc GIT binary patch literal 1252 zcmeAS@N?(olHy`uVBq!ia0vp^CLlHk8<2d)>)QvUBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFso#SM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcp$o0y!L2NKW( z>+top^2{qPNz6-5^>ndS0-B+hnVDi`?qp`^Z0T(7>f~Z8Iua(|ZvxVNaE3DQ93{4D)nx45_$v zCoI?Rkb}TmvzS9unp_>vJ<$IuR5d|var%YXTYeobV7ubPt6yhA@Xr(*wFN$dO$S&zp@&(2s_>71FHU9(}wrc`n6bKAJhM5c1pe+r85 z*}ua4e2H^$*`6 header .vote-btn { + position: relative; + z-index: 100; margin-top: 5px; } .post-tools { + @include clearfix; + margin-top: 15px; + .ui-icon { - display: inline; - float: right; - } - a { display: inline; float: left; - height: 26px; - padding: 0 12px; - border-radius: 3px; - border: 1px solid #b2b2b2; - @include linear-gradient(top, #fff 35%, #ebebeb); - font-size: 13px; - line-height: 24px; - color: #737373; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); - width: 6em; + width: 13px; + height: 13px; + margin-right: 4px; + background: url(../images/small-grey-arrows.png) no-repeat; + + &.expand { + margin-top: 5px; + background-position: 0 0; + } + + &.collapse { + margin-top: 6px; + background-position: -13px 0; + } } } } @@ -1296,6 +1301,8 @@ body.discussion { } .vote-btn { + position: relative; + z-index: 100; float: right; display: block; height: 27px; @@ -1441,7 +1448,6 @@ body.discussion { padding: 0; @include clearfix; - li { float: left; margin-right: 8px; @@ -1579,30 +1585,71 @@ body.discussion { p { margin-bottom: 0em; } + .discussion-article { - border: 1px solid; + border: 1px solid #b2b2b2; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); min-height: 0; - padding: 1em; - .discussion-post { - header { - padding-bottom: 0.1em; - margin-bottom: 10px; + padding: 10px 10px 40px; + .discussion-post { + @include clearfix; + + header { + padding-bottom: 0; + margin-bottom: 15px; + + h3 { + font-size: 22px; + font-weight: 700; + margin-bottom: 0px; + } } + .post-body { font-size: 14px; clear: both; } } + .post-tools { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + border-radius: 0 0 3px 3px; + border-top: 1px solid #ddd; + @include linear-gradient(top, #f2f2f2, #e2e2e2); + + a { + display: block; + width: 100%; + text-align: center; + font-size: 12px; + line-height: 30px; + + &.expand-post:before { + content: '▾ '; + } + + &.collapse-post:before { + content: '▴ '; + } + + &.collapse-post { + display: none; + } + } + } + .responses { margin-top: 10px; header { padding-bottom: 0em; margin-bottom: 5px; + .posted-by { font-size: 0.8em; } @@ -1611,20 +1658,20 @@ body.discussion { margin-bottom: 0.2em; font-size: 14px; } - } + .discussion-reply-new { .wmd-input { height: 120px; } } + // Content that is hidden by default in the inline view .post-extended-content{ display: none; } - .collapse-post{ - display:none; - } + + } } } @@ -1806,10 +1853,15 @@ body.discussion { margin: 8px 7px 0 0; background: url(../images/new-post-icon.png) no-repeat; } + + .moderator-actions { + padding-left: 0 !important; + } + section.pagination { nav.discussion-paginator { - ol{ - li{ + ol { + li { list-style: none; display: inline-block; padding-right: 0.5em; diff --git a/lms/templates/discussion/mustache/_inline_thread.mustache b/lms/templates/discussion/mustache/_inline_thread.mustache index b2c29aab07..37066c1b04 100644 --- a/lms/templates/discussion/mustache/_inline_thread.mustache +++ b/lms/templates/discussion/mustache/_inline_thread.mustache @@ -3,7 +3,7 @@
+ {{votes.up_count}} -

{{title}}

+

{{title}}

{{created_at}} by {{username}} @@ -11,12 +11,9 @@ • This thread is closed.

-
- Expand - Collapse -
{{abbreviatedBody}}
+
+
+ View discussion + Hide discussion +
+