diff --git a/wire/modules/Process/ProcessPageLister/ProcessPageLister.css b/wire/modules/Process/ProcessPageLister/ProcessPageLister.css index f3a230e3..6bf36eda 100644 --- a/wire/modules/Process/ProcessPageLister/ProcessPageLister.css +++ b/wire/modules/Process/ProcessPageLister/ProcessPageLister.css @@ -1 +1 @@ -#ProcessLister{margin-top:-2px}#ProcessListerResultsTab{padding-top:.5em}#ProcessListerResults>form.InputfieldForm{margin-bottom:0}#ProcessListerResults #ProcessListerTable{clear:both;overflow-x:auto}#ProcessListerResults #ProcessListerTable>div{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable{clear:both;margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable td table{width:100%}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th{font-size:.8571428571em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th i{font-size:14px}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th strong{font-weight:inherit;white-space:nowrap}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th b,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead .th b{display:none}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th:first-child{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td{font-size:.9285714286em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child>a{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype{margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li{list-style:none;margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li+li{border-top:1px solid #eee}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:first-child{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:last-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:last-child{margin-bottom:0}#ProcessListerResults .PageListerActions{display:none;line-height:1.3em;text-transform:lowercase}#ProcessListerResults .PageListerActions a.PageExtra{margin-bottom:3px}#ProcessListerResults .PageListerActions a.PageExtras i{margin-left:3px;margin-right:2px}#ProcessListerResults .PageListerActions a.PageExtras.open i{margin-left:2px;margin-right:3px}#ProcessListerResults .row_message{display:inline}#ProcessListerResults .PageListStatusUnpublished{text-decoration:line-through}#ProcessListerResults .PageListStatusHidden{opacity:.6}#ProcessListerResults .MarkupPagerNav{float:right}#ProcessListerResults .nobr{white-space:nowrap}#ProcessListerResults table+.MarkupPagerNav{margin:0}#ProcessListerResults .datetime{white-space:nowrap}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldHeader{display:none}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldContent{padding:5px;border:none;margin-top:5px;margin-bottom:5px}@media only screen and (max-width: 767px){#ProcessListerResults table.ProcessListerTable+.MarkupPagerNav{margin-bottom:1em}#ProcessListerResults .MarkupPagerNav{float:none}}.AdminDataTable p{margin:1em 0}#ProcessListerResults+a button{float:left;margin-right:0;margin-top:0}#ProcessListerSpinner{margin-left:.5em;font-size:20px;position:relative}#ProcessListerSpinner i{position:absolute;top:-15px;left:0}.pw-content .lister_headline,#content .lister_headline{float:left;margin-top:1em}@media only screen and (max-width: 767px){.pw-content .lister_headline,#content .lister_headline{float:none;clear:both}}#lister_open_cnt{display:none}#filters_spinner{float:right;margin-top:4px}#ProcessListerRefreshTab{float:right}#ProcessListerSelector{display:inline-block}#ProcessListerResultNotes+#ProcessListerSelector{margin-top:0}p.version{clear:both;padding-top:1em}#ProcessListerScript{display:none}#tab_bookmarks table tr>td:first-child{width:30%}#tab_bookmarks table tr>td:nth-child(2){width:40%}.AdminThemeReno a.lister-lightbox{padding:0 !important}.AdminThemeReno a.lister-lightbox img{margin:0 !important}.AdminThemeReno #content .lister_headline{margin-top:.5em}#ProcessListerTable .InputfieldFile .InputfieldContent,#ProcessListerTable .InputfieldFile .InputfieldHeader,#ProcessListerTable .InputfieldImage .InputfieldContent,#ProcessListerTable .InputfieldImage .InputfieldHeader{background:inherit}#ProcessListerTable .InputfieldFile .InputfieldHeader,#ProcessListerTable .InputfieldImage .InputfieldHeader{padding-left:0;padding-right:0;padding-top:0}#ProcessListerTable .InputfieldFile .gridImage__tooltip table th,#ProcessListerTable .InputfieldFile .gridImage__tooltip table td,#ProcessListerTable .InputfieldImage .gridImage__tooltip table th,#ProcessListerTable .InputfieldImage .gridImage__tooltip table td{padding:0} +#ProcessLister{margin-top:-2px}#ProcessListerResultsTab{padding-top:.5em}#ProcessListerResults>form.InputfieldForm{margin-bottom:0}#ProcessListerResults #ProcessListerTable{clear:both;overflow-x:auto}#ProcessListerResults #ProcessListerTable>div{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable{clear:both;margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable td table{width:100%}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th{font-size:.8571428571em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th i{font-size:14px}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th.not_sortable{cursor:not-allowed}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th.not_sortable:hover{text-decoration:none}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th strong{font-weight:inherit;white-space:nowrap}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th b,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead .th b{display:none}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>thead th:first-child{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td{font-size:.9285714286em}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td:first-child>a{padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype{margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li{list-style:none;margin:0;padding-left:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td ul.MarkupFieldtype>li+li{border-top:1px solid #eee}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:first-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:first-child{margin-top:0}#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td>*:last-child,#ProcessListerResults #ProcessListerTable table.ProcessListerTable>tbody>tr>td .col_preview>*:last-child{margin-bottom:0}#ProcessListerResults .PageListerActions{display:none;line-height:1.3em;text-transform:lowercase}#ProcessListerResults .PageListerActions a.PageExtra{margin-bottom:3px}#ProcessListerResults .PageListerActions a.PageExtras i{margin-left:3px;margin-right:2px}#ProcessListerResults .PageListerActions a.PageExtras.open i{margin-left:2px;margin-right:3px}#ProcessListerResults .row_message{display:inline}#ProcessListerResults .PageListStatusUnpublished{text-decoration:line-through}#ProcessListerResults .PageListStatusHidden{opacity:.6}#ProcessListerResults .MarkupPagerNav{float:right}#ProcessListerResults .nobr{white-space:nowrap}#ProcessListerResults table+.MarkupPagerNav{margin:0}#ProcessListerResults .datetime{white-space:nowrap}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldHeader{display:none}#ProcessListerResults td:not(.col_editing) .InputfieldHasFileList .InputfieldContent{padding:5px;border:none;margin-top:5px;margin-bottom:5px}@media only screen and (max-width: 767px){#ProcessListerResults table.ProcessListerTable+.MarkupPagerNav{margin-bottom:1em}#ProcessListerResults .MarkupPagerNav{float:none}}.AdminDataTable p{margin:1em 0}#ProcessListerResults+a button{float:left;margin-right:0;margin-top:0}#ProcessListerSpinner{margin-left:.5em;font-size:20px;position:relative}#ProcessListerSpinner i{position:absolute;top:-15px;left:0}.pw-content .lister_headline,#content .lister_headline{float:left;margin-top:1em}@media only screen and (max-width: 767px){.pw-content .lister_headline,#content .lister_headline{float:none;clear:both}}#lister_open_cnt{display:none}#filters_spinner{float:right;margin-top:4px}#ProcessListerRefreshTab{float:right}#ProcessListerSelector{display:inline-block}#ProcessListerResultNotes+#ProcessListerSelector{margin-top:0}p.version{clear:both;padding-top:1em}#ProcessListerScript{display:none}#tab_bookmarks table tr>td:first-child{width:30%}#tab_bookmarks table tr>td:nth-child(2){width:40%}.AdminThemeReno a.lister-lightbox{padding:0 !important}.AdminThemeReno a.lister-lightbox img{margin:0 !important}.AdminThemeReno #content .lister_headline{margin-top:.5em}#ProcessListerTable .InputfieldFile .InputfieldContent,#ProcessListerTable .InputfieldFile .InputfieldHeader,#ProcessListerTable .InputfieldImage .InputfieldContent,#ProcessListerTable .InputfieldImage .InputfieldHeader{background:inherit}#ProcessListerTable .InputfieldFile .InputfieldHeader,#ProcessListerTable .InputfieldImage .InputfieldHeader{padding-left:0;padding-right:0;padding-top:0}#ProcessListerTable .InputfieldFile .gridImage__tooltip table th,#ProcessListerTable .InputfieldFile .gridImage__tooltip table td,#ProcessListerTable .InputfieldImage .gridImage__tooltip table th,#ProcessListerTable .InputfieldImage .gridImage__tooltip table td{padding:0} diff --git a/wire/modules/Process/ProcessPageLister/ProcessPageLister.js b/wire/modules/Process/ProcessPageLister/ProcessPageLister.js index b3b62f91..445b810e 100644 --- a/wire/modules/Process/ProcessPageLister/ProcessPageLister.js +++ b/wire/modules/Process/ProcessPageLister/ProcessPageLister.js @@ -114,13 +114,17 @@ var ProcessLister = { * */ columnSort: function() { - $(this).find("span").remove(); - var name = $(this).find('b').text(); + + if($(this).hasClass('not_sortable')) return false; + $(this).find('span').remove(); + + var $b = $(this).find('b'); + var name = $b.text(); var val = $("#lister_sort").val(); if(val == name) name = '-' + name; // reverse if(name.length < 1) name = val; - $("#lister_sort").val(name); + $('#lister_sort').val(name); ProcessLister.submit(); }, diff --git a/wire/modules/Process/ProcessPageLister/ProcessPageLister.min.js b/wire/modules/Process/ProcessPageLister/ProcessPageLister.min.js index 00bf7995..c3b9b5bd 100644 --- a/wire/modules/Process/ProcessPageLister/ProcessPageLister.min.js +++ b/wire/modules/Process/ProcessPageLister/ProcessPageLister.min.js @@ -1 +1 @@ -var ProcessLister={inInit:true,inTimeout:false,spinner:null,numSubmits:0,results:null,filters:null,lister:null,initialized:false,resetTotal:false,clickAfterRefresh:"",refreshRowPageIDs:[],extraSubmitData:{},init:function(){if(ProcessLister.initialized)return;ProcessLister.initialized=true;if($("#ProcessLister").length==0)return;ProcessLister.initSpinners();ProcessLister.filters=$("#ProcessListerFilters");ProcessLister.results=$("#ProcessListerResults");ProcessLister.lister=$("#ProcessLister");ProcessLister.filters.change(function(){ProcessLister.submit()});ProcessLister.results.on("click",".ProcessListerTable > thead th",ProcessLister.columnSort);$(document).on("click","a.actions_toggle",ProcessLister.pageClick);$(document).on("click",".actions a.ajax",ProcessLister.actionClickAjax);$("#actions_items_open").attr("disabled","disabled").parent("label").addClass("ui-state-disabled");$(document).on("click",".MarkupPagerNav a",function(){var url=$(this).attr("href");ProcessLister.submit(url);return false});$("#submit_refresh").click(function(){ProcessLister.resetTotal=true;ProcessLister.submit();$(this).fadeOut("normal",function(){$("#submit_refresh").removeClass("ui-state-active").fadeIn()});return false});$("#lister_columns").change(function(){ProcessLister.submit()});$("#ProcessListerActionsForm").find("script").remove();if(ProcessLister.lister.length>0)ProcessLister.lister.WireTabs({items:$(".WireTab")});$("#_ProcessListerRefreshTab").html("").unbind("click").click(function(){ProcessLister.resetTotal=true;ProcessLister.submit();return false});$("#_ProcessListerResetTab").html("").unbind("click").click(function(){window.location.href="./?reset=1";return false});ProcessLister.inInit=false;if(ProcessLister.numSubmits==0)ProcessLister.submit();else ProcessLister.spinner.fadeOut()},initSpinners:function(){var $parent=$("#breadcrumbs ul.nav");if($parent.length){ProcessLister.spinner=$("
Error retrieving results: "+error+"
")}})},_submitSuccess:function(data){var refreshAll=true;if(ProcessLister.refreshRowPageIDs.length){refreshAll=false;for(var n in ProcessLister.refreshRowPageIDs){var pageID=ProcessLister.refreshRowPageIDs[n];var idAttr="#page"+pageID;var $oldRow=$(idAttr).closest("tr");var $newRow=$(data).find(idAttr).closest("tr");var message=$oldRow.find(".actions_toggle").attr("data-message");if($oldRow.length&&$newRow.length){$oldRow.replaceWith($newRow);$newRow.addClass("row_refreshed_"+pageID);$newRow.effect("highlight","normal");if(message){var $message=$(" ");$newRow.find(".actions_toggle").addClass("row_message_on").closest(".col_preview, td").append($message);setTimeout(function(){$message.fadeOut("normal",function(){$newRow.find(".actions_toggle").removeClass("row_message_on").click()})},1e3)}if($newRow.find(".Inputfield").length)InputfieldsInit($newRow)}else if($oldRow.length&&!$newRow.length){$oldRow.remove()}}ProcessLister.refreshRowPageIDs=[]}else{ProcessLister.results.fadeTo(0,0);var sort=$("#lister_sort").val();ProcessLister.results.html(data).find("table.ProcessListerTable > thead th").each(function(){var $b=$(this).find("b");var txt=$b.text();$b.remove();$(this).find("span").remove();var $icon=$(this).find("i");if($icon.length)$icon.remove();var label=$(this).html();if(txt==sort){$(this).html(""+label+" ↓"+txt+"")}else if(sort=="-"+txt){$(this).html(""+label+" ↑"+txt+"")}else{$(this).html(label+""+txt+"")}if($icon.length>0)$(this).prepend($icon)}).end().effect("highlight","fast");if(ProcessLister.results.find(".Inputfield").length){InputfieldsInit(ProcessLister.results)}}if(ProcessLister.clickAfterRefresh.length>0){if(ProcessLister.clickAfterRefresh.indexOf("#")<0&&ProcessLister.clickAfterRefresh.indexOf(".")<0){ProcessLister.clickAfterRefresh="#"+ProcessLister.clickAfterRefresh}$(ProcessLister.clickAfterRefresh).each(function(){var $a=$(this);$a.click();var $tr=$a.closest("tr");$tr.fadeTo(100,.1);setTimeout(function(){$tr.fadeTo(250,1)},250)});ProcessLister.clickAfterRefresh=""}ProcessLister.spinner.fadeOut();setTimeout(function(){ProcessLister.results.trigger("loaded");ProcessLister.results.find(".Inputfield:not(.reloaded)").addClass("reloaded").trigger("reloaded",["ProcessPageLister"]);$("a.actions_toggle.open").click().removeClass("open");if(typeof AdminDataTable!="undefined")AdminDataTable.init();$("a.lister-lightbox",ProcessLister.results).magnificPopup({type:"image",closeOnContentClick:true,closeBtnInside:true});if(refreshAll)ProcessLister.results.fadeTo(0,1)},250);var pos=data.indexOf("ProcessListerScript");if(pos){var js=data.substring(pos+21);if(js!=""){pos=js.indexOf("");js=js.substring(0,pos);$("body").append("