summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/templates')
-rw-r--r--modules-available/locations/templates/ajax-opening-location.html263
-rw-r--r--modules-available/locations/templates/location-subnets.html49
-rw-r--r--modules-available/locations/templates/locations.html126
-rw-r--r--modules-available/locations/templates/mismatch-cleanup.html24
4 files changed, 366 insertions, 96 deletions
diff --git a/modules-available/locations/templates/ajax-opening-location.html b/modules-available/locations/templates/ajax-opening-location.html
new file mode 100644
index 00000000..861bef65
--- /dev/null
+++ b/modules-available/locations/templates/ajax-opening-location.html
@@ -0,0 +1,263 @@
+<div>
+ <h4>{{lang_openingTime}}</h4>
+ <div class="checkbox">
+ <input id="oi{{id}}" class="openingtimes-inherited"
+ type="checkbox" name="openingtimes-inherited" value="1" {{openingtimes_inherited}}>
+ <label for="oi{{id}}">{{lang_inheritOpeningTimes}}</label>
+ </div>
+ {{^expertMode}}
+ <div class="simple-mode">
+
+ <div align="right" style="margin-bottom: 10px;">
+ <a href="#" class="btn btn-default btn-sm btn-show-expert">{{lang_expertMode}}</a>
+ </div>
+ <div class="clearfix"></div>
+ <table class="table table-condensed" style="margin-bottom:0">
+ <tr>
+ <th>{{lang_day}}</th>
+ <th>{{lang_openingTime}}</th>
+ <th>{{lang_closingTime}}</th>
+ </tr>
+
+ <tr class="tablerow">
+ <td>{{lang_monTilFr}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 week-open" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 week-close" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ </tr>
+ <tr class="tablerow">
+ <td>{{lang_saturday}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 saturday-open" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 saturday-close" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ </tr>
+ <tr class="tablerow">
+ <td>{{lang_sunday}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 sunday-open" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input type="text" class="form-control timepicker2 sunday-close" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ {{/expertMode}}
+
+ <div class="expert-mode" style="{{^expertMode}}display:none{{/expertMode}}">
+ <div class="clearfix"></div>
+ <div class="expert-table">
+ <div class="row">
+ <div class="col-sm-6">{{lang_openingTime}}</div>
+ <div class="col-sm-4">{{lang_closingTime}}</div>
+ <div class="col-sm-2 text-right">{{lang_delete}}</div>
+ </div>
+ </div>
+ <hr>
+ <div style="text-align: center;">
+ <a class="btn btn-success btn-sm new-openingtime">
+ <span class="glyphicon glyphicon-plus-sign"></span>
+ {{lang_openingTime}}
+ </a>
+ </div>
+ <br>
+ </div>
+</div>
+
+<div class="hidden expert-template">
+ <div class="row expert-row">
+ <hr>
+ <div class="col-xs-12 days-box">
+ <div class="pull-right checkbox checkbox-inline"><input type="checkbox" class="i-delete"><label><span class="glyphicon glyphicon-trash"></span></label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Monday"><label>{{lang_shortMonday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Tuesday"><label>{{lang_shortTuesday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Wednesday"><label>{{lang_shortWednesday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Thursday"><label>{{lang_shortThursday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Friday"><label>{{lang_shortFriday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Saturday"><label>{{lang_shortSaturday}}</label></div>
+ <div class="checkbox checkbox-inline"><input type="checkbox" class="i-Sunday"><label>{{lang_shortSunday}}</label></div>
+ </div>
+ <div class="col-sm-6">
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
+ <input type="text" class="form-control timepicker2 i-openingtime" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
+ <input type="text" class="form-control timepicker2 i-closingtime" pattern="[0-9]{1,2}:[0-9]{2}">
+ </div>
+ </div>
+ </div>
+</div>
+
+{{#rebootcontrol}}
+<h4>{{lang_automatedMachineActions}}</h4>
+<div class="row wol">
+ <div class="col-sm-4">
+ <div class="checkbox checkbox-inline">
+ <input id="wol-check-{{id}}" name="wol" type="checkbox" {{#scheduler-options.wol}}checked{{/scheduler-options.wol}}>
+ <label for="wol-check-{{id}}">{{lang_wakeonlan}}</label>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <div class="input-group">
+ <input disabled type="number" id="wol-offset-{{id}}" name="wol-offset" class="form-control"
+ value="{{scheduler-options.wol-offset}}" placeholder="0" min="0" max="60">
+ <span class="input-group-addon slx-ga2">
+ <label for="wol-offset-{{id}}">{{lang_offsetEarly}}</label>
+ </span>
+ </div>
+ </div>
+</div>
+<div class="row shutdown">
+ <div class="col-sm-4">
+ <div class="checkbox checkbox-inline">
+ <input id="sd-check-{{id}}" name="sd" type="checkbox" {{#scheduler-options.sd}}checked{{/scheduler-options.sd}}>
+ <label for="sd-check-{{id}}">{{lang_shutdown}}</label>
+ </div>
+ </div>
+ <div class="col-sm-8">
+ <div class="input-group">
+ <input disabled type="number" id="sd-offset-{{id}}" name="sd-offset" class="form-control"
+ value="{{scheduler-options.sd-offset}}" placeholder="0" min="0" max="60">
+ <span class="input-group-addon slx-ga2">
+ <label for="sd-offset-{{id}}">{{lang_offsetLate}}</label>
+ </span>
+ </div>
+ </div>
+</div>
+<h4>{{lang_remoteAccessConstraints}}</h4>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-ALWAYS-check-{{id}}" name="ra-mode" value="ALWAYS" type="radio"
+ {{scheduler_ALWAYS_checked}}>
+ <label for="ra-ALWAYS-check-{{id}}">{{lang_remoteAccessNoRestriction}}</label>
+ </div>
+</div>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-SELECTIVE-check-{{id}}" name="ra-mode" value="SELECTIVE" type="radio"
+ {{scheduler_SELECTIVE_checked}}>
+ <label for="ra-SELECTIVE-check-{{id}}">{{lang_remoteAccessOnlyWhenClosed}}</label>
+ </div>
+</div>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-NEVER-check-{{id}}" name="ra-mode" value="NEVER" type="radio"
+ {{scheduler_NEVER_checked}}>
+ <label for="ra-NEVER-check-{{id}}">{{lang_remoteAccessNever}}</label>
+ </div>
+</div>
+<p><i>{{lang_remoteAccessHelp}}</i></p>
+{{/rebootcontrol}}
+
+<script>
+ (function() {
+
+ var $loc = $('#openingTimesModal{{id}}');
+ var $wol = $loc.find('.wol');
+ var $sd = $loc.find('.shutdown');
+
+ var sync = function($div) {
+ $div.find('input[type="number"]').prop('disabled',
+ !$div.find('input[type="checkbox"]').is(':checked'));
+ };
+ sync($wol);
+ sync($sd);
+ $wol.find('input[type="checkbox"]').on('change', function() { sync($wol); });
+ $sd.find('input[type="checkbox"]').on('change', function() { sync($sd); });
+
+ var scheduleData = {{{schedule_data}}};
+
+ {{#expertMode}}
+ for (var i = 0; i < scheduleData.length; ++i) {
+ newOpeningTime($loc, scheduleData[i]);
+ }
+ {{/expertMode}}
+ {{^expertMode}}
+ for (var i = 0; i < scheduleData.length; ++i) {
+ if (scheduleData[i].days.length === 5) {
+ $loc.find('.week-open').val(scheduleData[i]['openingtime']);
+ $loc.find('.week-close').val(scheduleData[i]['closingtime']);
+ } else if (scheduleData[i].days.length === 1 && scheduleData[i].days[0] === 'Saturday') {
+ $loc.find('.saturday-open').val(scheduleData[i]['openingtime']);
+ $loc.find('.saturday-close').val(scheduleData[i]['closingtime']);
+ } else if (scheduleData[i].days.length === 1 && scheduleData[i].days[0] === 'Sunday') {
+ $loc.find('.sunday-open').val(scheduleData[i]['openingtime']);
+ $loc.find('.sunday-close').val(scheduleData[i]['closingtime']);
+ }
+ }
+ {{/expertMode}}
+
+ setTimepicker($loc.find('.timepicker2'));
+
+ $loc.find('.new-openingtime').click(function (e) {
+ e.preventDefault();
+ setTimepicker(newOpeningTime($loc, {}).find('.timepicker2'));
+ setInputEnabled();
+ });
+
+ $loc.find('.btn-show-expert').click(function (e) {
+ e.preventDefault();
+ scheduleData = simpleToExpert($loc);
+ for (var i = 0; i < scheduleData.length; ++i) {
+ setTimepicker(newOpeningTime($loc, scheduleData[i]).find('.timepicker2'));
+ }
+ $loc.find('.simple-mode').remove();
+ $loc.find('.expert-mode').show();
+ setInputEnabled();
+ });
+
+ $loc.find('form').submit(validateOpeningTimes);
+ var setInputEnabled = function () {
+ $loc.find('.expert-mode input, .simple-mode input').prop('disabled', $inheritCb.is(':checked') ? 'disabled' : false);
+ };
+ var $inheritCb = $loc.find('.openingtimes-inherited');
+ setInputEnabled();
+ $inheritCb.change(setInputEnabled);
+ $loc.find('.new-openingtime').click(function (e) {
+ if ($inheritCb.is(':checked')) {
+ $inheritCb.click();
+ }
+ });
+ })();
+
+</script>
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html
index 6062b559..976c3cc7 100644
--- a/modules-available/locations/templates/location-subnets.html
+++ b/modules-available/locations/templates/location-subnets.html
@@ -62,7 +62,7 @@
<div class="slx-bold">{{lang_locationInfo}}</div>
<div class="row">
- <div class="col-md-4">
+ <div class="col-md-5">
{{#haveDozmod}}
<div>
<span class="slx-ga2">{{lang_referencingLectures}}:</span> {{lectures}}
@@ -80,8 +80,23 @@
{{/statsLink}}
</div>
{{/haveStatistics}}
+ {{#next_action}}
+ <div>
+ {{lang_nextEvent}}: {{next_action}} – {{next_time}}
+ </div>
+ {{/next_action}}
</div>
- <div class="col-md-4 text-center">
+ <div class="col-md-7 text-right">
+ <button {{perms.location.edit.openingtimes.disabled}} type="button" class="btn btn-default" data-toggle="modal" data-target="#openingTimesModal{{locationid}}" onclick="loadOpeningTimes('{{locationid}}')">
+ <span class="glyphicon glyphicon-time"></span>
+ {{lang_openingTime}}
+ </button>
+ {{#news}}
+ <a class="btn btn-default" href="?do=news&amp;locationid={{locationid}}">
+ <span class="glyphicon glyphicon-pencil"></span>
+ {{lang_editNews}}
+ </a>
+ {{/news}}
{{#roomplanner}}
<a class="btn btn-default" href="?do=roomplanner&amp;locationid={{locationid}}" target="_blank"
onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false">
@@ -90,8 +105,6 @@
{{#perms.roomplanner.edit.disabled}}{{lang_showRoomplan}}{{/perms.roomplanner.edit.disabled}}
</a>
{{/roomplanner}}
- </div>
- <div class="col-md-4 text-right">
<button {{perms.location.delete.disabled}} type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_deleteLocation}}</button>
<button onclick="deleteSubnetWarning('{{locationid}}')" {{perms.save_button.disabled}} type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
</div>
@@ -130,4 +143,30 @@
</div>
</form>
-</div> \ No newline at end of file
+</div>
+
+<div class="modal fade" id="openingTimesModal{{locationid}}" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+
+ <div class="modal-content">
+ <form method="post" action="?do=Locations">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="updateOpeningtimes">
+ <input type="hidden" name="page" value="details">
+ <input type="hidden" name="openingtimes" value="">
+ <input type="hidden" name="locationid" value="{{locationid}}">
+
+ <div class="modal-header"><h3>{{locationname}}</h3></div>
+ <div class="modal-body"></div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_close}}</button>
+ <button type="submit" class="btn btn-primary">
+ <span class="glyphicon glyphicon-floppy-disk"></span>
+ {{lang_save}}
+ </button>
+ </div>
+ </form>
+ </div>
+
+ </div>
+</div>
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html
index 7adfe2fc..efd48216 100644
--- a/modules-available/locations/templates/locations.html
+++ b/modules-available/locations/templates/locations.html
@@ -28,24 +28,14 @@
</div>
{{/mismatchMachines}}
- <table class="table table-condensed locations" style="margin-bottom:0">
+ <table class="table table-condensed table-hover locations" style="margin-bottom:0">
<tr>
<th width="100%">{{lang_locationName}}</th>
- <th>
- {{#havestatistics}}{{lang_machineCount}}{{/havestatistics}}
- </th>
- <th>
- {{#havestatistics}}{{lang_machineLoad}}{{/havestatistics}}
- </th>
- <th class="text-nowrap">
- {{#havebaseconfig}}{{lang_editConfigVariables}}{{/havebaseconfig}}
- </th>
- <th class="text-nowrap">
- {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}}
- </th>
+ {{#plugins}}
<th class="text-nowrap">
- {{#haveipxe}}{{lang_bootMenu}}{{/haveipxe}}
+ {{header}}
</th>
+ {{/plugins}}
</tr>
{{#list}}
<tr>
@@ -55,91 +45,36 @@
<span>{{locationname}}</span>
{{/show-only}}
{{^show-only}}
- <a href="#" onclick="slxOpenLocation(this, {{locationid}}); return false">
+ <a id="loc-{{locationid}}" href="#" onclick="slxOpenLocation(this, {{locationid}}); return false">
{{locationname}}
<b class="caret"></b>
</a>
{{/show-only}}
</td>
- <td class="text-nowrap" align="right">
- {{#havestatistics}}
- <a href="?do=Statistics&amp;show=list&amp;filters=location={{locationid}}">&nbsp;{{clientCount}}&nbsp;</a>
- <span style="display:inline-block;width:5ex">
- {{#hasChild}}
- (<a href="?do=Statistics&amp;show=list&amp;filters=location~{{locationid}}">&downarrow;{{clientCountSum}}</a>)
- {{/hasChild}}
- </span>
- {{/havestatistics}}
- </td>
- <td class="text-nowrap load-col" {{#clientCount}} style="background:linear-gradient(to right, #f97, #f97 {{clientLoad}}%, #6fa {{clientLoad}}%, #6fa {{clientIdle}}%, #eee {{clientIdle}}%)"{{/clientCount}}>
- {{#clientCount}}
- {{clientLoad}}&thinsp;%
- {{/clientCount}}
- </td>
- <td class="text-nowrap {{overriddenClass}}">
- {{#havebaseconfig}}
- <div class="pull-right" style="z-index:-1">
- <a class="btn btn-default btn-xs" href="?do=baseconfig&amp;module=locations&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- {{#overriddenVars}}
- <span class="badge" title="{{lang_overridenVarsForLocation}}">
- <span class="glyphicon glyphicon-home"></span> {{.}}
- </span>
- {{/overriddenVars}}
- {{#machineVarsOverrideCount}}
- <span class="badge" title="{{lang_numMachinesWithOverrides}}">
- <span class="glyphicon glyphicon-tasks"></span> {{.}}
- </span>
- {{/machineVarsOverrideCount}}
- &emsp;&emsp;
- {{/havebaseconfig}}
- </td>
- <td class="text-nowrap">
- {{#havesysconfig}}
- <div class="pull-right">
- <a class="btn btn-default btn-xs" href="?do=sysconfig&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- <span class="{{configClass}}">
- {{configName}}&emsp;&emsp;
- </span>
- {{/havesysconfig}}
- </td>
- <td class="text-nowrap">
- {{#haveipxe}}
- <div class="pull-right">
- <a class="btn btn-default btn-xs" href="?do=serversetup&amp;show=assignlocation&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- <span class="{{customMenuClass}}">
- {{customMenu}}&emsp;&emsp;
- </span>
- {{/haveipxe}}
+ {{#plugins}}
+ <td>
+ <table width="100%"><tr>
+ <td class="text-nowrap {{class}}">{{{html}}}</td>
+ {{#url}}
+ <td class="edit-btn">
+ <a class="btn btn-default btn-xs" href="{{.}}">
+ <span class="glyphicon glyphicon-edit"></span>
+ </a>
+ </td>
+ {{/url}}
+ </tr></table>
</td>
+ {{/plugins}}
</tr>
{{/list}}
- {{#unassignedCount}}
<tr>
<td>{{lang_unassignedMachines}}</td>
- <td class="text-nowrap" align="right">
- <a href="?do=Statistics&amp;show=list&amp;filters=location=0">
- &nbsp;{{unassignedCount}}&nbsp;
- </a>
- <span style="display:inline-block;width:5ex"></span>
- </td>
- <td class="text-nowrap load-col"{{#unassignedCount}} style="background:linear-gradient(to right, #f97, #f97 {{unassignedLoad}}%, #6fa {{unassignedLoad}}%, #6fa {{unassignedIdle}}%, #eee {{unassignedIdle}}%)"{{/unassignedCount}}>
- {{#unassignedCount}}
- {{unassignedLoad}}&thinsp;%
- {{/unassignedCount}}
+ {{#plugins}}
+ <td class="text-nowrap">
+ {{{propagateDefaultHtml}}}
</td>
- <td>
- {{#unassignedOverrides}}
- <span class="badge" title="{{lang_numMachinesWithOverrides}}">
- <span class="glyphicon glyphicon-tasks"></span> {{.}}
- </span>
- {{/unassignedOverrides}}
- </td>
- <td>{{defaultConfig}}</td>
+ {{/plugins}}
</tr>
- {{/unassignedCount}}
</table>
<form method="post" action="?do=Locations">
<input type="hidden" name="token" value="{{token}}">
@@ -167,6 +102,14 @@ var slxLastLocation = false;
var newRowCounter = 0;
+document.addEventListener("DOMContentLoaded", function() {
+ var id = window.location.hash.substring(1);
+ if (id !== "") {
+ var loc_dom = document.getElementById("loc-" + id);
+ slxOpenLocation(loc_dom, id);
+ }
+});
+
function slxAddLocationRow() {
$("#saveLocationRows").show();
var tr = $('#lasttr');
@@ -206,7 +149,7 @@ function slxOpenLocation(e, lid) {
}
return;
}
- var td = $('<td>').attr('colspan', '6').css('padding', '0px 0px 12px');
+ var td = $('<td>').attr('colspan', '{{colspan}}').css('padding', '0px 0px 12px');
var tr = $('<tr>').attr('id', 'location-details-' + lid);
tr.append(td);
$(e).closest('tr').addClass('active slx-bold').after(tr);
@@ -250,5 +193,12 @@ function deleteSubnetWarning(locid) {
form.submit();
}
}
+
+function loadOpeningTimes(locid) {
+ var $e = $("#openingTimesModal" + locid).find('.modal-body');
+ if (!$e.is(':empty')) return;
+ $e.load("?do=Locations&page=details&action=getOpeningtimes&locid=" + locid)
+}
+
// -->
</script>
diff --git a/modules-available/locations/templates/mismatch-cleanup.html b/modules-available/locations/templates/mismatch-cleanup.html
index a6f45d27..53a956df 100644
--- a/modules-available/locations/templates/mismatch-cleanup.html
+++ b/modules-available/locations/templates/mismatch-cleanup.html
@@ -32,7 +32,7 @@
<tr>
<td>
<div class="checkbox checkbox-inline">
- <input id="machine-{{machineuuid}}" type="checkbox" name="machines[]" value="{{machineuuid}}" {{disabled}}>
+ <input class="mcb {{#canmove}}cmov{{/canmove}}" id="machine-{{machineuuid}}" type="checkbox" name="machines[]" value="{{machineuuid}}" {{disabled}}>
<label for="machine-{{machineuuid}}">{{hostname}}{{^hostname}}{{clientip}}{{/hostname}}</label>
</div>
</td>
@@ -60,10 +60,28 @@
<span class="glyphicon glyphicon-repeat"></span>
{{lang_resetMachines}}
</button>
- <button type="submit" class="btn btn-success" name="action" value="movemachines">
+ {{#canmove}}
+ <button id="btn-move" type="submit" class="btn btn-success" name="action" value="movemachines">
<span class="glyphicon glyphicon-arrow-right"></span>
{{lang_moveMachines}}
</button>
+ {{/canmove}}
</div>
</form>
-<div class="clearfix"></div> \ No newline at end of file
+<div class="clearfix"></div>
+
+<script>
+ document.addEventListener('DOMContentLoaded', function () {
+ var $btn = $('#btn-move');
+ if ($btn.length === 0)
+ return;
+ var ccheck = function() {
+ var $e = $('input.mcb:checked');
+ var nope = $e.is(':not(.cmov)');
+ var yep = $e.is('.cmov');
+ $btn.prop('disabled', nope || !yep);
+ };
+ ccheck();
+ $('input.mcb').change(ccheck);
+ });
+</script> \ No newline at end of file