9035706950
- fixed cross browser issues. (IE and Safari don't let you say someobject.class, presumably because "class" is a keyword that's reserved for future versions of JS. Firefox and Opera allow it.) - added text to the grid for added clarity. Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
199 lines
4.9 KiB
Cheetah
199 lines
4.9 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration › Item Circulation Alerts</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<style>
|
|
div.circulation-alert h2 {
|
|
margin-top: 1.5em;
|
|
}
|
|
div.circulation-alert h3 {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
table.grid thead th {
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
table.grid tbody th {
|
|
text-align: right;
|
|
}
|
|
|
|
table.grid tbody td {
|
|
font-size: xx-small;
|
|
}
|
|
|
|
table.grid tbody td.info {
|
|
background: #fff;
|
|
}
|
|
|
|
table.grid.active tbody td {
|
|
width: 10%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
table.grid tbody td {
|
|
background: #cfc;
|
|
color: #111;
|
|
}
|
|
|
|
table.grid td.disabled {
|
|
background: #fcc;
|
|
}
|
|
|
|
table.grid td.default {
|
|
background: #f88;
|
|
}
|
|
</style>
|
|
<script>
|
|
var $branch = "<!-- TMPL_VAR NAME="branch" -->";
|
|
$(function(){
|
|
|
|
var blocked = _('Blocked!');
|
|
var saving = _('Saving...');
|
|
var disabledForAll = _('Disabled for all');
|
|
var disabledForCurrent = _('Disabled for') + ' ' + $branch;
|
|
|
|
$('#branch_selector input:submit').hide();
|
|
$('#branch').change(function(){
|
|
$('#branch_selector').submit();
|
|
});
|
|
|
|
$('table.grid.active tbody td').click(function(ev){
|
|
var id = this.id;
|
|
var td = $(this);
|
|
if (td.hasClass('default') && $branch != '*') {
|
|
td.html(blocked);
|
|
window.setTimeout(
|
|
function(){ td.html(disabledForAll) },
|
|
3000
|
|
);
|
|
} else {
|
|
td.html(saving);
|
|
$.ajax({
|
|
url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
|
|
type : 'POST',
|
|
dataType : 'json',
|
|
data : { action: 'toggle', id: id, branch: $branch },
|
|
success : function(response){
|
|
if ($branch == '*' && response.classes.match(/default/)) {
|
|
td.html(disabledForAll);
|
|
} else if (response.classes.match(/disabled/)) {
|
|
td.html(disabledForCurrent);
|
|
} else {
|
|
td.html(' ');
|
|
}
|
|
td.attr('class', response.classes);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Item Circulation Alerts </div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
|
|
<div id="bd">
|
|
|
|
<div id="yui-main" class="circulation-alert">
|
|
<div class="yui-b">
|
|
<h1>Item Circulation Alerts</h1>
|
|
|
|
|
|
<h2>Select a library:</h2>
|
|
<form id="branch_selector" method="GET">
|
|
<select id="branch" name="branch">
|
|
<!-- TMPL_LOOP NAME="branches" -->
|
|
<!-- TMPL_IF NAME="selected" -->
|
|
<option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
<input type="submit" name="pick" value="Pick" />
|
|
</form>
|
|
|
|
|
|
<h2>Circulation Alerts for <!-- TMPL_VAR NAME="branch_name" --></h2>
|
|
<p>Click on the grid to toggle the settings.</p>
|
|
|
|
<h3>Checkout</h3>
|
|
<table class="grid active" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<!-- TMPL_LOOP NAME="item_types" -->
|
|
<th><!-- TMPL_VAR NAME="br_description" --></th>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- TMPL_LOOP NAME="grid_checkout" -->
|
|
<tr>
|
|
<th><!-- TMPL_VAR NAME="description" --></th>
|
|
<!-- TMPL_LOOP NAME="items" -->
|
|
<td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="text" --></td>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3>Check-in</h3>
|
|
<table class="grid active" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<!-- TMPL_LOOP NAME="item_types" -->
|
|
<th><!-- TMPL_VAR NAME="br_description" --></th>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- TMPL_LOOP NAME="grid_checkin" -->
|
|
<tr>
|
|
<th><!-- TMPL_VAR NAME="description" --></th>
|
|
<!-- TMPL_LOOP NAME="items" -->
|
|
<td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="text" --></td>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3>Legend</h3>
|
|
<table class="grid">
|
|
<thead>
|
|
<th>Color</th>
|
|
<th>Meaning</th>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td width="100" class="default"> </td>
|
|
<td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="disabled"> </td>
|
|
<td class="info">These are disabled for the current library.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class=""> </td>
|
|
<td class="info">These are enabled.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|