Skip to content

Commit

Permalink
fix admin button display LDEV-2633 (#825)
Browse files Browse the repository at this point in the history
* Added a fix for LDEV-2633
* Added some more fixes in services.tasks for LDEV-2633
  • Loading branch information
cfmitrah authored Apr 1, 2021
1 parent 126cee2 commit d74bcfb
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 45 deletions.
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/debugging.templates.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Redirtect to entry --->
<tr>
<cfif isWeb>
<td>
<input type="checkbox" class="checkbox" name="row_#qry.currentrow#" value="#qry.currentrow#">
<input type="checkbox" class="checkbox" name="row_#qry.currentrow#" id="clickCheckbox" value="#qry.currentrow#">
</td>
</cfif>
<td>
Expand All @@ -147,8 +147,8 @@ Redirtect to entry --->
<tfoot>
<tr>
<td colspan="#isWeb?5:3#">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.delete#">
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.delete#" disabled style="opacity:0.5">
<input type="reset" class="br button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#" disabled style="opacity:0.5">
</td>
</tr>
</tfoot>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/ext.providers.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ list all mappings and display necessary edit fields --->
<tfoot>
<tr>
<td colspan="#columns#">
<input type="submit" class="button submit" name="mainAction" value="#stText.Buttons.verify#">
<input type="submit" class="button submit" name="mainAction" value="#stText.Buttons.Delete#">
<input type="reset" class="reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="button submit enablebutton" name="mainAction" value="#stText.Buttons.verify#">
<input type="submit" class="button submit enablebutton" name="mainAction" value="#stText.Buttons.Delete#">
<input type="reset" class="reset enablebutton" name="cancel" id="clickCancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/cfml/context/admin/info.bundle.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@
#listLast(bundles.path,"\/")#
</td> --->
<!--- vendor --->
<td >
<td>
#bundles.vendor#
</td>

<!--- usedBy --->
<td nowrap="nowrap">
<td>
#replace(bundles.usedBy,',','<br>','all')#
</td>

Expand Down
8 changes: 4 additions & 4 deletions core/src/main/cfml/context/admin/resources.cfx_tags.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ Redirtect to entry --->
<td colspan="4">
<input type="hidden" name="type_#idx#" value="java">
<input type="hidden" name="mainAction" value="updateJava">
<input type="submit" class="bl button submit" name="subAction" value="#stText.Buttons.Verify#">
<input type="submit" class="bm button submit" name="subAction" value="#stText.Buttons.save#">
<input type="reset" class="bm reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit" name="subAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bl button submit enablebutton" name="subAction" value="#stText.Buttons.Verify#">
<input type="submit" class="bm button submit enablebutton" name="subAction" value="#stText.Buttons.save#">
<input type="reset" class="bm reset enablebutton" name="cancel" id="clickCancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit enablebutton" name="subAction" value="#stText.Buttons.Delete#">
</td>
</tr>
</tfoot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@
<tr>
<td colspan="7">
<input type="hidden" name="mainAction" value="#stText.Buttons.Update#">
<input type="submit" class="bl button submit" name="subAction" value="#stText.Buttons.Update#">
<input type="reset" class="bm reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit" name="subAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bl button submit enablebutton" name="subAction" value="#stText.Buttons.Update#">
<input type="reset" class="bm reset enablebutton" name="cancel" id="clickCancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit enablebutton" name="subAction" value="#stText.Buttons.Delete#">
</td>
</tr>
</cfif>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/resources.mappings.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ this.mappings=["#mappings.virtual#"]={<cfif len(mappings.strPhysical)>
<input type="hidden" name="mainAction" value="#stText.Buttons.save#">
<!---<input type="submit" class="button submit" name="subAction" value="#stText.Buttons.save#">
--->
<input type="reset" class="bl button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit" name="subAction" value="#stText.Buttons.Delete#">
<input type="submit" class="br button submit" name="subAction" value="#stText.Buttons.compileAll#">
<input type="reset" class="bl button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit enablebutton" name="subAction" value="#stText.Buttons.Delete#">
<input type="submit" class="br button submit enablebutton" name="subAction" value="#stText.Buttons.compileAll#">
</td>
</tr>
</tfoot>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/resources.rest.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ list all mappings and display necessary edit fields --->
<tfoot>
<tr>
<td colspan="5">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.save#">
<input type="reset" class="bm button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.save#">
<input type="reset" class="bm button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit enablebutton" name="mainAction" value="#stText.Buttons.Delete#">
</td>
</tr>
</tfoot>
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/cfml/context/admin/server.logging.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ Redirtect to entry --->
<tfoot>
<tr>
<td colspan="4">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.delete#">
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.delete#">
<input type="reset" class="br button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/services.cache.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ Redirtect to entry --->
<tfoot>
<tr>
<td colspan="4">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.verify#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Buttons.delete#">
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.verify#">
<input type="submit" class="bm button submit enablebutton" name="mainAction" value="#stText.Buttons.delete#">
<input type="reset" class="br button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/cfml/context/admin/services.datasource.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ list all mappings and display necessary edit fields --->
<tfoot>
<tr>
<td colspan="5">
<input type="submit" class="button submit" name="mainAction" value="#stText.Buttons.Verify#">
<input type="reset" class="reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="button submit enablebutton" name="mainAction" value="#stText.Buttons.Verify#">
<input type="reset" class="reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
Expand Down Expand Up @@ -328,9 +328,9 @@ list all mappings and display necessary edit fields --->
<tr>
<td colspan="6">

<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Verify#">
<input type="reset" class="bm reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.Verify#">
<input type="reset" class="bm reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit enablebutton" name="mainAction" value="#stText.Buttons.Delete#">
</td>
</tr>
</tfoot>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/cfml/context/admin/services.mail.serverlist.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ loop query="ms" {
<input type="hidden" name="mainAction" value="#stText.Buttons.Update#">
<input type="hidden" name="contextType" value="#contextType#">
<cfif contextType=="local" or request.adminType=='server'>
<input type="submit" class="bl button submit" name="subAction" value="#stText.Buttons.Verify#">
<input type="reset" class="bm button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit" name="subAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bl button submit enablebutton" name="subAction" value="#stText.Buttons.Verify#">
<input type="reset" class="bm button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="br button submit enablebutton" name="subAction" value="#stText.Buttons.Delete#">
<cfelse>
<input type="submit" class="blr button submit" name="subAction" value="#stText.Buttons.Verify#">

Expand Down
10 changes: 5 additions & 5 deletions core/src/main/cfml/context/admin/services.schedule.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ Redirtect to entry --->
<tfoot>
<tr>
<td colspan="6">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Execute#">
<input type="reset" class="bm button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Schedule.pause#">
<input type="submit" class="br button submit" name="mainAction" value="#stText.Schedule.resume#">
<input type="submit" class="bl button submit enablebutton" name="mainAction" value="#stText.Buttons.Execute#">
<input type="reset" class="bm button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit enablebutton" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="bm button submit enablebutton" name="mainAction" value="#stText.Schedule.pause#">
<input type="submit" class="br button submit enablebutton" name="mainAction" value="#stText.Schedule.resume#">
</td>
</tr>
</tfoot>
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/cfml/context/admin/services.tasks.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
<thead>
<tr>
<th width="3%">
<input type="checkbox" class="checkbox" name="row" onclick="selectAll(this)">
<input type="checkbox" class="checkbox" name="row" id="selectAll" onclick="selectAll(this)">
</th>
<th width="20%">#stText.remote.ot.type#</th>
<th width="39%">#stText.remote.ot.name#</th>
Expand Down Expand Up @@ -469,7 +469,7 @@
<!--- and now display --->
<tr>
<td>
<input type="checkbox" class="checkbox" name="row_#tasks.currentrow#" value="#tasks.currentrow#">
<input type="checkbox" class="checkbox checkAll" id="checkAll" name="row_#tasks.currentrow#" value="#tasks.currentrow#">
</td>
<td class="tblContent#css#"><input type="hidden" name="id_#tasks.currentrow#" value="#tasks.id#">
#tasks.type#
Expand Down Expand Up @@ -507,10 +507,10 @@
<tfoot>
<tr>
<td colspan="6">
<input type="reset" class="bl button reset" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Buttons.Execute#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="br button" name="mainAction" value="#stText.Buttons.DeleteAll#">
<input type="reset" class="bl button reset enablebutton" id="clickCancel" name="cancel" value="#stText.Buttons.Cancel#">
<input type="submit" class="bm button submit enablebutton" name="mainAction" value="#stText.Buttons.Execute#">
<input type="submit" class="bm button submit enablebutton" name="mainAction" value="#stText.Buttons.Delete#">
<input type="submit" class="br button enablebutton" name="mainAction" disabled style="opacity:0.5" value="#stText.Buttons.DeleteAll#">
</td>
</tr>
</tfoot>
Expand Down
23 changes: 23 additions & 0 deletions core/src/main/cfml/context/res/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ $(function(){
enableBtnsWhenChecked(btns, cbs);
}
});

$('#selectAll').on('click',function(){
$(this).parents('table:first').find('tbody tr td:first-child input:checkbox').prop('checked',$(this).prop('checked'))
.filter(':first').triggerHandler('change');
if($(this).prop('checked')){
$('.enablebutton').removeAttr('disabled').css('opacity',1)
}else{
$('.enablebutton').attr('disabled',true).css('opacity',0.5)
}
})

scrollToEl('div.error,div.warning:not(.nofocus)');
});
Expand Down Expand Up @@ -54,6 +64,19 @@ function initMenu() {
);
}

$("#clickCheckbox").change(function() {
set = $("#clickCheckbox")[0].checked;
if(set == true) {
$(".enablebutton").attr({disabled:false,style:"opacity:1"});
}
else if(set == false) {
$(".enablebutton").attr({disabled:true,style:"opacity:0.5"});
}
});
$("#clickCancel").click(function() {
$(".enablebutton").attr({disabled:true,style:"opacity:0.5"});
});

function initMenu2() {
$('#menu ul').hide();
$('#menu ul:first').show();
Expand Down

0 comments on commit d74bcfb

Please sign in to comment.