# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-->
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/locale/${locale}/conify.dtd"-->
+]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>Conify :: Global :: Config :: Copy Status</title>
+ <title>&conify.copy_status.title;</title>
<style type="text/css">
@import url('/js/dojo/dojox/grid/_grid/tundraGrid.css');
method : 'open-ils.permacrud.search.ccs.atomic',
timeout : 10,
params : [ ses, { id : { "!=" : null } }, { order_by : { ccs : 'name' } } ],
- onerror : function (r) { status_update('Problem fetching statuses') },
+ onerror : function (r) { status_update(ccs_strings.ERROR_FETCHING_STATUSES) },
oncomplete : function (r) {
window._status_list = r.recv().content();
if (dirtyStore.length > 0) {
var confirmation = confirm(
- 'There are unsaved modified Statuses! '+
- 'OK to save these changes, Cancel to abandon them.'
+ ccs_strings.CONFIRM_EXIT
);
if (confirmation) {
</script>
<div dojoType="dijit.layout.LayoutContainer" orientation="horizontal" style="margin-top: 5px;" layoutAlign="top">
- <span>New Status:</span>
- <div dojoType="dijit.form.TextBox" id="new_status_code" jsId="new_status_name" label="New Status Name"></div>
- <button dojoType="dijit.form.Button" id="save_new_status_code" jsId="save_new_status_name" label="Add">
+ <span>&conify.copy_status.new_status.label;</span>
+ <div dojoType="dijit.form.TextBox" id="new_status_code" jsId="new_status_name" label="&conify.copy_status.new_status.name;"></div>
+ <button dojoType="dijit.form.Button" id="save_new_status_code" jsId="save_new_status_name" label="&conify.copy_status.new_status.save;">
<script type="dojo/connect" event="onClick">
<!--
var new_name = new_status_name.getValue();
params : [ ses, new_fm_obj ],
onerror : function (r) {
highlighter.red.play();
- status_update( 'Problem calling method to create new Status' );
+ status_update( ccs_strings.ERROR_CALLING_METHOD );
err = true;
},
oncomplete : function (r) {
if ( res && res.content() ) {
var new_item_hash = res.content().toHash();
status_store.newItem( new_item_hash );
- status_update( 'New ' + new_item_hash.name + ' status created' );
+ status_update( dojo.string.substitute(ccs_strings.SUCCESS_CREATING_STATUS, [new_item_hash.name]) );
status_grid.model.sort(-2);
highlighter.green.play();
} else {
highlighter.red.play();
- status_update( 'Problem creating new Status' );
+ status_update( ccs_strings.ERROR_CREATING_STATUS );
err = true;
}
}
var status_grid_layout = [
{ cells : [
[
- { name : "ID",
+ { name : ccs_strings.ID,
field : "id",
},
- { name : "Name",
+ { name : ccs_strings.NAME,
field : "name",
width : "auto",
editor : dojox.grid.editors.Dijit
},
- { name : "Translation",
+ { name : ccs_strings.TRANSLATION,
width : "10em",
height : "2em",
get : function (row) {
return '';
}
},
- { name : "Holdable",
+ { name : ccs_strings.HOLDABLE,
field : "holdable",
editor : dojox.grid.editors.bool,
get : function (row) {
}
}
},
- { name : "OPAC Visible",
+ { name : ccs_strings.OPAC_VISIBLE,
field : "opac_visible",
editor : dojox.grid.editors.bool,
get : function (row) {
<div dojoType="dijit.layout.ContentPane" orientation="horizontal" style="margin-bottom: 5px;" layoutAlign="bottom">
- <button jsId="save_ccs_button" dojoType="dijit.form.Button" label="Save Changes" onClick="save_them_all()"></button>
+ <button jsId="save_ccs_button" dojoType="dijit.form.Button" label="&conify.copy_status.save_changes;" onClick="save_them_all()"></button>
- <button jsId="delete_ccs_button" dojoType="dijit.form.Button" label="Delete Selected">
+ <button jsId="delete_ccs_button" dojoType="dijit.form.Button" label="&conify.copy_status.delete_selected;">
<script type="dojo/connect" event="onClick">
<!--
var selected_rows = status_grid.selection.getSelected();
for (var i in selected_items) {
current_status = selected_items[i];
- if ( confirm('Are you sure you want to delete ' + status_store.getValue( current_status, 'name' ) + '?')) {
+ if ( confirm(dojo.string.substitue(ccs_strings.CONFIRM_DELETE, [status_store.getValue( current_status, 'name' )]))) {
status_store.setValue( current_status, 'isdeleted', 1 );
params : [ ses, modified_ccs ],
onerror : function (r) {
highlighter.red.play();
- status_update( 'Problem deleting ' + status_store.getValue( current_status, 'name' ) );
+ status_update( dojo.string.substitute( ccs_strings.ERROR_DELETING, [status_store.getValue( current_status, 'name' )] ) );
},
oncomplete : function (r) {
var res = r.recv();
current_status = null;
highlighter.green.play();
- status_update( old_name + ' deleted' );
+ status_update( dojo.string.substitute(ccs_strings.STATUS_DELETED, [old_name]) );
} else {
highlighter.red.play();
- status_update( 'Problem deleting ' + old_name );
+ status_update( dojo.string.substitute(ccs_strings.ERROR_DELETING, [old_name]) );
}
}
}).send();
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
dojo.require('dojox.grid.Grid');
+dojo.requireLocalization("openils.conify", "ccs");
// some handy globals
var cgi = new CGI();
var current_status;
var virgin_out_id = -1;
+var ccs_strings = dojo.i18n.getLocalization('openils.conify', 'ccs');
+
var highlighter = {};
function status_update (markup) {
params : [ ses, modified_ccs ],
onerror : function (r) {
highlighter.red.play();
- status_update( 'Problem saving ' + status_store.getValue( current_status, 'name' ) );
+ status_update( dojo.string.substitute(ccs_strings.ERROR_SAVING_STATUS, [status_store.getValue( current_status, 'name' )]) );
},
oncomplete : function (r) {
var res = r.recv();
if ( res && res.content() ) {
status_store.setValue( current_status, 'ischanged', 0 );
highlighter.green.play();
- status_update( 'Saved changes to ' + status_store.getValue( current_status, 'name' ) );
+ status_update( dojo.string.substitute(ccs_strings.SUCCESS_SAVE, [status_store.getValue( current_status, 'name' )]) );
} else {
highlighter.red.play();
- status_update( 'Problem saving ' + status_store.getValue( current_status, 'name' ) );
+ status_update( dojo.string.substitute(ccs_strings.ERROR_SAVING_STATUS, [status_store.getValue( current_status, 'name' )]) );
}
},
}).send();
if (event && dirtyStore.length > 0) {
confirmation = confirm(
- 'There are unsaved modified Statuses! '+
- 'OK to save these changes, Cancel to abandon them.'
+ ccs_strings.CONFIRM_EXIT
);
}
--- /dev/null
+{
+ "CONFIRM_DELETE": "Are you sure you want to delete ${0}?",
+ "CONFIRM_EXIT": "There are unsaved changes to one or more copy statuses. Click OK to save these changes, or Cancel to abandon them.",
+ "ERROR_CALLING_METHOD": "Problem calling method to create new copy status",
+ "ERROR_CREATING_STATUS": "Problem creating new Status",
+ "ERROR_DELETING": "Problem deleting ${0}",
+ "ERROR_FETCHING_STATUSES": "Problem fetching statuses",
+ "ERROR_SAVING_STATUS": "Problem saving ${0}",
+ "HOLDABLE": "Holdable",
+ "ID": "ID",
+ "NAME": "Name",
+ "OPAC_VISIBLE": "OPAC Visible",
+ "STATUS_DELETED": "${0} deleted",
+ "SUCCESS_CREATING_STATUS": "New ${0} status created",
+ "SUCCESS_SAVE": "Saved changes to ${0}",
+ "TRANSLATION": "Translation",
+}