From c530a7a9366b1c89a63fc1782ec620db992efc3b Mon Sep 17 00:00:00 2001 From: marijus Date: Tue, 20 May 2014 17:33:06 +0200 Subject: some work on comment_item.tpl --- view/css/conversation.css | 59 ++++--------------------- view/js/main.js | 30 +++++++------ view/theme/redbasic/css/style.css | 52 +++------------------- view/theme/redbasic/js/redbasic.js | 20 --------- view/tpl/comment_item.tpl | 88 ++++++++++++++++++-------------------- view/tpl/conv_item.tpl | 4 +- 6 files changed, 77 insertions(+), 176 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 4e7b59f80..3fc82154b 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -199,60 +199,21 @@ /* comment_item */ -.comment-wwedit-wrapper.threaded > .comment-edit-form > .comment-edit-photo { - width: 40px; -} - -.comment-wwedit-wrapper.threaded > .comment-edit-form > .comment-edit-text-empty { - height: 1.5em; -} - -.comment-wwedit-wrapper.threaded > .comment-edit-form > .comment-edit-submit-wrapper > .comment-edit-submit { - margin-left: 50px; -} - -.comment-edit-photo { - margin: 10px 10px 10px 7px; - float: left; -} - -[class^="comment-edit-bb"] { - display: none; - margin: 0px 0 -5px 0px; - padding: 0px; - width: 75%; - min-width: 170px -} - -[class^="comment-edit-bb"] > li { - display: inline-block; - margin: 10px 10px 0 0; - visibility: none; -} - -[class^="comment-edit-bb-end"] { - clear: both; -} - .comment-edit-text-empty, .comment-edit-text-full { float: left; - margin-top: 10px; - padding: 3px 1px 1px 3px; + width: 100%; padding: 8px; } .comment-edit-text-empty { height: 2.8em; - width: 30%; - min-width: 170px; overflow: auto; - margin-bottom: 10px; + resize: none; + } .comment-edit-text-full { height: 150px; - width: 50%; - min-width: 170px; overflow: auto; } @@ -280,14 +241,12 @@ filter:alpha(opacity=100); } -.comment-edit-text-end { - clear: both; -} - -.comment-edit-submit { - margin: 10px 0px 10px 52px; +.comment-tools { + display: none; + margin-top: 7px; } -.comment-preview-icon { - margin-left: 15px; +.comment-edit-preview { + display: none; + margin-top: 7px; } diff --git a/view/js/main.js b/view/js/main.js index fa32df424..a4cbed064 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -6,21 +6,25 @@ $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).show(); - openMenu("comment-edit-submit-wrapper-" + id); + openMenu("comment-tools-" + id); return true; } return false; } + function commentClose(obj,id) { - if(obj.value == '') { - obj.value = aStr['comment']; - $("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); - $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); - $("#mod-cmnt-wrap-" + id).hide(); - closeMenu("comment-edit-submit-wrapper-" + id); - return true; - } - return false; + $(document).on('click', function() { + if(obj.value == '') { + obj.value = aStr['comment']; + $("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); + $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); + $("#mod-cmnt-wrap-" + id).hide(); + closeMenu("comment-tools-" + id); + return true; + } + return false; + }); + } function showHideCommentBox(id) { @@ -32,14 +36,13 @@ } } - function commentInsert(obj,id) { var tmpStr = $("#comment-edit-text-" + id).val(); if(tmpStr == '$comment') { tmpStr = ''; $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); - openMenu("comment-edit-submit-wrapper-" + id); + openMenu("comment-tools-" + id); } var ins = $(obj).html(); ins = ins.replace('<','<'); @@ -62,7 +65,7 @@ tmpStr = ""; $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); - openMenu("comment-edit-submit-wrapper-" + id); + openMenu("comment-tools-" + id); $("#comment-edit-text-" + id).val(tmpStr); } @@ -748,6 +751,7 @@ function updateConvItems(mode,data) { $("#comment-edit-form-" + id).serialize(), function(data) { if(data.success) { + $("#comment-edit-preview-" + id).hide(); $("#comment-edit-wrapper-" + id).hide(); $("#comment-edit-text-" + id).val(''); var tarea = document.getElementById("comment-edit-text-" + id); diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index f7df3bf52..f773264cc 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1884,7 +1884,6 @@ img.mail-list-sender-photo { .wall-item-content-wrapper { background-color: $item_colour; - opacity: $item_opacity; padding: 10px; } @@ -1893,9 +1892,6 @@ img.mail-list-sender-photo { border-top-left-radius: $radiuspx; } -.wall-item-content-wrapper:hover { - z-index:99; -} .comment .wall-item-body { padding-left: $comment_padding; } @@ -1905,35 +1901,23 @@ img.mail-list-sender-photo { background-color: $comment_item_colour; border-left: $comment_border_left $comment_border_colour; border-right: $comment_border_right $comment_border_colour; - border-bottom: $comment_border_bottom $comment_border_colour; border-radius: 0px; padding: 7px 10px 7px 7px; } -/* -.thread-wrapper.toplevel_item{ - border-bottom: $comment_border_bottom $comment_border_colour; - border-right: $comment_border_right $item_colour; - border-left: $comment_border_left $item_colour; - - border-top-right-radius: $radiuspx; - border-top-left-radius: $radiuspx; - border-bottom-right-radius: $radiuspx; - border-bottom-left-radius: $radiuspx; -} - */ .wall-item-comment-wrapper { - background-color: $comment_item_colour; - /* border-top: $comment_border_top $item_colour; */ - border-right: $comment_border_right $item_colour; - border-left: $comment_border_left $item_colour; - border-bottom: $comment_border_bottom $item_colour; + padding: 7px 10px; + background-color: $item_colour; border-radius: 0px; border-bottom-right-radius: $radiuspx; border-bottom-left-radius: $radiuspx; + margin-top: 3px; } +.wall-item-comment-wrapper-wc { + margin-top: 0px; +} .wall-item-like, .wall-item-dislike { @@ -1981,37 +1965,15 @@ img.mail-list-sender-photo { color: $toolicon_colour; } -.item-tool:hover { - /*color: $toolicon_activecolour;*/ -} - .like-rotator { color: $toolicon_colour; } -.my-comment-photo { - border-radius: $radiuspx; - -moz-border-radius: $radiuspx; - box-shadow: $shadowpx $shadowpx $shadowpx 0 #444444; -} - -.comment-edit-photo img { - width: $reply_photo; -} - -[class^="comment-edit-bb"] { - list-style: none; -} - .comment-icon { - font-size: 1.2em; + font-size: 0.8em; color: $toolicon_colour; } -.comment-icon:hover { - color: $toolicon_activecolour; -} - .comment-edit-text-empty, .comment-edit-text-full { border: 1px solid #ccc; diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 20902fe1a..d981b0c11 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -1,23 +1,3 @@ -function cmtBbOpen(comment, id) { - if($(comment).hasClass('comment-edit-text-full')) { - $(".comment-edit-bb-" + id).show(); - return true; - } - return false; -} - -function cmtBbClose(comment, id) { -// if($(comment).hasClass('comment-edit-text-empty')) { -// $(".comment-edit-bb-" + id).hide(); -// return true; -// } - return false; -} - -//document.jotpermslock = 'icon-lock'; -//document.jotpermsunlock = 'icon-unlock'; - - $(document).ready(function() { $('#expand-aside').click(function() { diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 1ea619774..598c0d58e 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -10,44 +10,7 @@ - -
- {{$mytitle}} -
-
- -
- + {{if $qcomment}} {{/if}} - -
- diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index ee10b6633..fe54ac377 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -174,9 +174,11 @@ {{/foreach}} {{/if}} {{if $item.comment}} -
+
{{$item.comment}}
+
+
{{/if}}
{{if $item.comment_lastcollapsed}} -- cgit v1.2.3 From 1aa7f3136f336a66220aae28f1404e2e2a4ecd39 Mon Sep 17 00:00:00 2001 From: marijus Date: Tue, 20 May 2014 19:16:05 +0200 Subject: the js seems to interfere with something else... comment out for now... --- view/js/main.js | 4 ++-- view/tpl/comment_item.tpl | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/view/js/main.js b/view/js/main.js index a4cbed064..b388ab940 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -13,7 +13,7 @@ } function commentClose(obj,id) { - $(document).on('click', function() { + //$(document).on('click', function() { if(obj.value == '') { obj.value = aStr['comment']; $("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); @@ -23,7 +23,7 @@ return true; } return false; - }); + //}); } diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 598c0d58e..121cf0995 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -53,12 +53,12 @@ {{/if}}
- {{if $preview}} - - {{/if}} - + {{if $preview}} + + {{/if}} +
-- cgit v1.2.3