diff --git a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.css b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.css index 396d6992..8512f1e3 100644 --- a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.css +++ b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.css @@ -22,13 +22,14 @@ .CommentItems { clear: both; - border-bottom: 1px solid #000; } - .CommentItems + button { + border-bottom: 1px solid #777; } + .CommentItems + button.ui-button { margin-top: 1em; } .CommentItem { clear: both; - border-top: 1px solid #000; + border-top: 1px solid #777; + padding: 0.75em 0; margin: 0; width: 100%; /* @@ -54,7 +55,7 @@ .CommentItem table th, .CommentItem table td { padding: 4px 10px 4px 0; - border-bottom: 1px dotted #ccc; + border-bottom: 1px solid #ddd; vertical-align: top; } .CommentItem table th { font-weight: bold; @@ -103,6 +104,7 @@ cursor: pointer; padding-right: 1em; } .CommentItem .CommentContent .CommentText textarea { + font-size: 1em; width: 100%; min-height: 15em; margin-top: 1em; @@ -181,5 +183,7 @@ .CommentItem .CommentContent .CommentTextOverflow { overflow-y: auto; max-height: inherit; } } +.WireTabs { + opacity: 0; } /*# sourceMappingURL=ProcessCommentsManager.css.map */ diff --git a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.js b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.js index 861e2f1d..8600a08e 100644 --- a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.js +++ b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.js @@ -1,4 +1,14 @@ $(document).ready(function() { + + var ready = false; + + $(document).on('click', '.WireTabs a', function($event) { + if(ready) window.location.href = $(this).attr('href'); + return false; + }); + + $('.WireTabs').css('opacity', 1.0); + $('.WireTabs a.on').click(); $("a.CommentTextEdit").click(function() { var $textarea = $(""); @@ -106,4 +116,6 @@ $(document).ready(function() { // for AdminThemeReno var color = $(".WireTabs a.on").css('border-top-color'); $("#CommentListHeader").css('border-top-color', color); + + ready = true; }); diff --git a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.min.js b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.min.js index d4478f1f..ddb5251a 100644 --- a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.min.js +++ b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.min.js @@ -1 +1 @@ -$(document).ready(function(){$("a.CommentTextEdit").click(function(){var d=$("");var c=$(this).closest(".CommentTextEditable");c.parent(".CommentText").removeClass("CommentTextOverflow");d.attr("name",c.attr("id"));$(this).remove();d.val(c.text());c.after(d);c.remove();return false});$(".CommentText").click(function(){$(this).find("a.CommentTextEdit").click();return false});$(".CommentItem").each(function(){var d=$(this);var e=d.find(".CommentItemInfo");var c=e.height()+30;var f=d.find(".CommentText");if(f.height()>c){f.addClass("CommentTextOverflow")}});$("#CommentLimitSelect").change(function(){window.location="./?limit="+parseInt($(this).val())});$("#CommentListSort").change(function(){window.location="./?sort="+$(this).val()});function b(d){var c=d.closest(".CommentItem");if(d.is(":checked")){c.addClass("CommentChecked")}else{c.removeClass("CommentChecked")}}$(".CommentCheckbox").click(function(){b($(this))});$("#CommentCheckAll").click(function(){var c=$(".CommentCheckbox");if($(this).is(":checked")){c.attr("checked","checked")}else{c.removeAttr("checked")}c.each(function(){b($(this))})});$("#CommentActions").change(function(){var d=$(this).val();if(!d.length){return}var c=$(".CommentChecked");if(c.length){c.each(function(){if(d=="reset-upvotes"){$(this).find(".CommentUpvotes > input").val(0).change()}else{if(d=="reset-downvotes"){$(this).find(".CommentDownvotes > input").val(0).change()}else{$(this).find(".CommentStatus > input[value='"+d+"']").click()}}});c.effect("highlight",500)}else{ProcessWire.alert($(this).attr("data-nochecked"))}$(this).val("")});$(document).on("change",".CommentItem :input",function(){var c=$(this);if(c.is("[type='checkbox']")){return}$(this).closest(".CommentItem").addClass("CommentItemChanged")});$("#CommentListForm").submit(function(){$(this).addClass("CommentListFormSubmitted")});window.addEventListener("beforeunload",function(d){if($(".CommentListFormSubmitted").length){return}var c=$(".CommentItemChanged");if(c.length==0){return}var f=$("#CommentListForm").attr("data-unsaved");(d||window.event).returnValue=f;return f});var a=$(".WireTabs a.on").css("border-top-color");$("#CommentListHeader").css("border-top-color",a)}); \ No newline at end of file +$(document).ready(function(){var c=false;$(document).on("click",".WireTabs a",function(d){if(c){window.location.href=$(this).attr("href")}return false});$(".WireTabs").css("opacity",1);$(".WireTabs a.on").click();$("a.CommentTextEdit").click(function(){var e=$("");var d=$(this).closest(".CommentTextEditable");d.parent(".CommentText").removeClass("CommentTextOverflow");e.attr("name",d.attr("id"));$(this).remove();e.val(d.text());d.after(e);d.remove();return false});$(".CommentText").click(function(){$(this).find("a.CommentTextEdit").click();return false});$(".CommentItem").each(function(){var e=$(this);var f=e.find(".CommentItemInfo");var d=f.height()+30;var g=e.find(".CommentText");if(g.height()>d){g.addClass("CommentTextOverflow")}});$("#CommentLimitSelect").change(function(){window.location="./?limit="+parseInt($(this).val())});$("#CommentListSort").change(function(){window.location="./?sort="+$(this).val()});function b(e){var d=e.closest(".CommentItem");if(e.is(":checked")){d.addClass("CommentChecked")}else{d.removeClass("CommentChecked")}}$(".CommentCheckbox").click(function(){b($(this))});$("#CommentCheckAll").click(function(){var d=$(".CommentCheckbox");if($(this).is(":checked")){d.attr("checked","checked")}else{d.removeAttr("checked")}d.each(function(){b($(this))})});$("#CommentActions").change(function(){var e=$(this).val();if(!e.length){return}var d=$(".CommentChecked");if(d.length){d.each(function(){if(e=="reset-upvotes"){$(this).find(".CommentUpvotes > input").val(0).change()}else{if(e=="reset-downvotes"){$(this).find(".CommentDownvotes > input").val(0).change()}else{$(this).find(".CommentStatus > input[value='"+e+"']").click()}}});d.effect("highlight",500)}else{ProcessWire.alert($(this).attr("data-nochecked"))}$(this).val("")});$(document).on("change",".CommentItem :input",function(){var d=$(this);if(d.is("[type='checkbox']")){return}$(this).closest(".CommentItem").addClass("CommentItemChanged")});$("#CommentListForm").submit(function(){$(this).addClass("CommentListFormSubmitted")});window.addEventListener("beforeunload",function(f){if($(".CommentListFormSubmitted").length){return}var d=$(".CommentItemChanged");if(d.length==0){return}var g=$("#CommentListForm").attr("data-unsaved");(f||window.event).returnValue=g;return g});var a=$(".WireTabs a.on").css("border-top-color");$("#CommentListHeader").css("border-top-color",a);c=true}); \ No newline at end of file diff --git a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module index c9de3d5e..ce7ac4f2 100644 --- a/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module +++ b/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module @@ -172,7 +172,8 @@ class ProcessCommentsManager extends Process { if(empty($status) || ($status != 'all' && !in_array($status, $this->statuses))) { $session->redirect($this->wire('page')->url . "list/$field->name/all/"); } - $headline = ucfirst($status); + $statusNum = array_search($status, $this->statuses); + $headline = $statusNum !== false ? $this->statusTranslations[$statusNum] : ucfirst($status); $this->breadcrumb('../', $field->getLabel()); $limit = (int) $this->wire('input')->get('limit'); @@ -351,7 +352,7 @@ class ProcessCommentsManager extends Process { $out = - "
" . " |
---|