if (g.templates[ name ] != 'undefined') {
var template = g.templates[ name ];
for (var i in template) {
+ if (g.is_field_hidden(i)) {
+ alert($('catStrings').getFormattedString(
+ 'staff.cat.copy_editor.apply_unsafe_field',
+ [i]
+ ));
+ continue;
+ }
+ if (template[i].field == 'status') {
+ if (!g.safe_to_edit_copy_status()) {
+ alert($('catStrings').getFormattedString('staff.cat.copy_editor.apply_unsafe_field',[i]));
+ continue;
+ }
+ }
g.changed[ i ] = template[ i ];
switch( template[i].type ) {
case 'attribute' :
}
/******************************************************************************************************/
+/* This returns true if the field has been hidden via util.hide */
+
+g.is_field_hidden = function(field) {
+ try {
+ g.data.stash_retrieve();
+ if (g.data.hash.aous['ui.hide_copy_editor_fields']
+ && g.data.hash.aous['ui.hide_copy_editor_fields'].indexOf(field) > -1) {
+ return true;
+ }
+ } catch(E) {
+ g.error.standard_unexpected_error_alert('is_field_hidden?',E);
+ return false;
+ }
+}
+
+
+/******************************************************************************************************/
/* This concats and uniques all the alert messages for use as the default value for a new alert message */
g.populate_alert_message_input = function(tb) {
}
}
+ util.hide.generate_css('ui.hide_copy_editor_fields');
}
/******************************************************************************************************/
staff.cat.copy_editor.import_templates.save.error=Error saving templates
staff.cat.copy_editor.import_templates.note=Note: These imported templates will get saved along with any new template you try to create, but if that does not happen, then these templates will disappear with the next invocation of the item attribute editor.
staff.cat.copy_editor.import_templates.error=Error importing templates
+staff.cat.copy_editor.apply_unsafe_field=Template tried to change field '%1$s', which is not allowed currently.
staff.cat.copy_editor.apply_owning_lib.undefined_volume.error=Error retrieving Volume information for copy %1$s. The owning library for this copy will not be changed.
staff.cat.copy_editor.apply_owning_lib.call_number.error=Error changing owning library for copy %1$s. The owning library for this copy will not be changed.
staff.cat.copy_editor.copy_count=1 copy