if (g.copies.length > 0 && g.copies[0].id() < 0) {
document.getElementById('copy_notes').setAttribute('hidden','true');
g.apply("status",5 /* In Process */);
+ $('save').setAttribute('label','Create Copies');
} else {
g.panes_and_field_names.left_pane =
[
}
/******************************************************************************************************/
+ /* Backup copies :) */
+
+ g.original_copies = js2JSON( g.copies );
+
+ /******************************************************************************************************/
/* Do it */
g.summarize( g.copies );
}
/******************************************************************************************************/
+/* Restore backup copies */
+
+g.reset = function() {
+ g.changed = {};
+ g.copies = JSON2js( g.original_copies );
+ g.summarize( g.copies );
+ g.render();
+}
+
+/******************************************************************************************************/
/* Apply a value to a specific field on all the copies being edited */
g.apply = function(field,value) {
<groupbox flex="1" style="overflow: auto">
<caption id="caption" label="Copy Viewer"/>
- <hbox id="input_placeholder"/>
+ <hbox id="top_nav">
+ <button label="Reset" accesskey="R" oncommand="g.reset()"/>
+ </hbox>
<hbox flex="1" style="overflow: scroll">
<vbox flex="1">
<hbox id="nav">
<spacer flex="1"/>
<button id="copy_notes" label="Copy Notes" accesskey="N" oncommand="g.copy_notes();"/>
- <button id="save" label="Modify" hidden="true" accesskey="M"
- oncommand="g.stash_and_close();"/>
- <button id="cancel" label="Close" accesskey="C"
- oncommand="window.close();"/>
+ <button id="save" label="Modify Copies" hidden="true" accesskey="M" oncommand="g.stash_and_close();"/>
+ <button id="cancel" label="Close" accesskey="C" oncommand="window.close();"/>
</hbox>
<spacer/>