[open-ils-commits] r16896 - in trunk: . Open-ILS/web/opac/locale/en-US Open-ILS/xul/staff_client/server/cat (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 9 10:34:49 EDT 2010
Author: miker
Date: 2010-07-09 10:34:47 -0400 (Fri, 09 Jul 2010)
New Revision: 16896
Modified:
trunk/
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul
Log:
add support for switching between xul and textarea marc editors
Property changes on: trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2010-07-01 15:46:44.638000011 -0400
committer: Mike Rylander <miker at esilibrary.com>
properties:
branch-nick: trunk
+ timestamp: 2010-07-09 10:34:43.571000099 -0400
committer: Mike Rylander <miker at esilibrary.com>
properties:
branch-nick: trunk
Name: bzr:file-ids
- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm 3034 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fsrc%2Fperlmods%2FOpenILS%2FApplication%2FSuperCat.pm
+ Open-ILS/web/opac/locale/en-US/lang.dtd 1681 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fweb%2Fopac%2Flocale%2Fen-US%2Flang.dtd
Open-ILS/xul/staff_client/server/cat/marcedit.js 3870 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fxul%2Fstaff_client%2Fserver%2Fcat%2Fmarcedit.js
Open-ILS/xul/staff_client/server/cat/marcedit.xul 3870 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fxul%2Fstaff_client%2Fserver%2Fcat%2Fmarcedit.xul
Name: bzr:revision-id:v4
- 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
12215 jason at esilibrary.com-20091209133642-bp8mb3tc5vpoc1ij
12220 jason at esilibrary.com-20091209143447-i1st1to8ln4hhwyb
12231 jason at esilibrary.com-20091209221438-vv4crqppm8ajj3dr
12804 jason at esilibrary.com-20100324194046-jza2ic2dlpq8txhc
12946 miker at esilibrary.com-20100402183612-8xznj35wfohk7zyu
12955 miker at esilibrary.com-20100403141037-h8d57ryrmkkg9yhb
12971 miker at whirly-20100405202254-aztbsf3p3eey9e8e
12997 miker at esilibrary.com-20100408154146-zodwuxxizwf0y449
13010 miker at miker-msi-20100409021618-5f0ohbg5cgi5pai0
13014 miker at esilibrary.com-20100409135406-mitf09aw1srnps3g
13022 miker at esilibrary.com-20100412144909-fc4bx1n80ac0z8ox
13023 miker at esilibrary.com-20100412145629-92g9jts2k8yqsm38
13152 miker at esilibrary.com-20100503010126-67i6kclipxip27du
13153 miker at esilibrary.com-20100503010322-3ri56680p7bf4o26
13161 miker at esilibrary.com-20100504150623-34h9t5p64cd52swu
13163 miker at esilibrary.com-20100504180646-77rxefvetqkiyo3s
13164 miker at esilibrary.com-20100504182041-0s81n6j3dxb14hrk
13175 miker at esilibrary.com-20100506194925-xg5folqttvehr2np
13306 miker at esilibrary.com-20100601190218-nf7sqyxzgsylm94f
13533 miker at esilibrary.com-20100629181055-xsdvq3z3mhylm0vb
13546 miker at esilibrary.com-20100701194644-2jo870hjjdn1mg43
+ 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
12215 jason at esilibrary.com-20091209133642-bp8mb3tc5vpoc1ij
12220 jason at esilibrary.com-20091209143447-i1st1to8ln4hhwyb
12231 jason at esilibrary.com-20091209221438-vv4crqppm8ajj3dr
12804 jason at esilibrary.com-20100324194046-jza2ic2dlpq8txhc
12946 miker at esilibrary.com-20100402183612-8xznj35wfohk7zyu
12955 miker at esilibrary.com-20100403141037-h8d57ryrmkkg9yhb
12971 miker at whirly-20100405202254-aztbsf3p3eey9e8e
12997 miker at esilibrary.com-20100408154146-zodwuxxizwf0y449
13010 miker at miker-msi-20100409021618-5f0ohbg5cgi5pai0
13014 miker at esilibrary.com-20100409135406-mitf09aw1srnps3g
13022 miker at esilibrary.com-20100412144909-fc4bx1n80ac0z8ox
13023 miker at esilibrary.com-20100412145629-92g9jts2k8yqsm38
13152 miker at esilibrary.com-20100503010126-67i6kclipxip27du
13153 miker at esilibrary.com-20100503010322-3ri56680p7bf4o26
13161 miker at esilibrary.com-20100504150623-34h9t5p64cd52swu
13163 miker at esilibrary.com-20100504180646-77rxefvetqkiyo3s
13164 miker at esilibrary.com-20100504182041-0s81n6j3dxb14hrk
13175 miker at esilibrary.com-20100506194925-xg5folqttvehr2np
13306 miker at esilibrary.com-20100601190218-nf7sqyxzgsylm94f
13533 miker at esilibrary.com-20100629181055-xsdvq3z3mhylm0vb
13546 miker at esilibrary.com-20100701194644-2jo870hjjdn1mg43
13589 miker at esilibrary.com-20100709143443-pdq2w1vhxcwdvtt4
Name: bzr:text-parents
- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm miker at esilibrary.com-20100629181055-xsdvq3z3mhylm0vb
+ Open-ILS/web/opac/locale/en-US/lang.dtd svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:16887
Open-ILS/xul/staff_client/server/cat/marcedit.js svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:16884
Open-ILS/xul/staff_client/server/cat/marcedit.xul svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:14578
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-07-09 12:06:13 UTC (rev 16895)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-07-09 14:34:47 UTC (rev 16896)
@@ -2454,6 +2454,7 @@
<!ENTITY staff.cat.marcedit.validate.accesskey "V">
<!ENTITY staff.cat.marcedit.save-button.accesskey "d">
<!ENTITY staff.cat.marcedit.help.label "Help">
+<!ENTITY staff.cat.marcedit.swapEditor.label "Swap Editor Type">
<!ENTITY staff.cat.marcedit.help.accesskey "H">
<!ENTITY staff.cat.marcedit.caption.label "MARC Record">
<!ENTITY staff.cat.marcedit.toggleFFE.label "Fixed Fields -- Record type: ">
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2010-07-09 12:06:13 UTC (rev 16895)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2010-07-09 14:34:47 UTC (rev 16896)
@@ -78,6 +78,36 @@
);
}
+function swap_editors () {
+
+ dojo.require('MARC.Record');
+
+ var xe = $('xul-editor');
+ var te = $('text-editor');
+
+ te.hidden = te.hidden ? false : true;
+ xe.hidden = xe.hidden ? false : true;
+
+ if (te.hidden) {
+ // get the marcxml from the text box
+ var xml_string = new MARC.Record({
+ marcbreaker : $('text-editor-box').value,
+ delimiter : '$'
+ }).toXmlString();
+
+ // reset the xml record and rerender it
+ xml_record = new XML( xml_string );
+ loadRecord(xml_record);
+ } else {
+ var xml_string = xml_record.toXMLString();
+
+ // push the xml record into the textbox
+ var rec = new MARC.Record ({ delimiter : '$', marcxml : xml_string });
+ $('text-editor-box').value = rec.toBreaker();
+ }
+}
+
+
function my_init() {
try {
@@ -107,6 +137,7 @@
document.getElementById('save-button').setAttribute('label', window.xulG.save.label);
document.getElementById('save-button').setAttribute('oncommand',
+ 'if ($("xul-editor").hidden) swap_editors(); ' +
'mangle_005(); ' +
'var xml_string = xml_escape_unicode( xml_record.toXMLString() ); ' +
'save_attempt( xml_string ); ' +
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul 2010-07-09 12:06:13 UTC (rev 16895)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul 2010-07-09 14:34:47 UTC (rev 16896)
@@ -33,6 +33,7 @@
</hbox>
<button label="&staff.cat.marcedit.validate.label;" accesskey="&staff.cat.marcedit.validate.accesskey;" oncommand="validateAuthority(this);"/>
<button id="save-button" accesskey="&staff.cat.marcedit.save-button.accesskey;"/>
+ <button label="&staff.cat.marcedit.swapEditor.label;" oncommand="swap_editors()"/>
<button label="&staff.cat.marcedit.help.label;" accesskey="&staff.cat.marcedit.help.accesskey;"
oncommand="alert(
$('catStrings').getString('staff.cat.marcedit.help.add_row') + '\n' +
@@ -50,7 +51,7 @@
</hbox>
</groupbox>
-<groupbox flex="1">
+<groupbox id="xul-editor" flex="1">
<caption label="&staff.cat.marcedit.caption.label;"/>
<vbox flex="1" style="overflow: auto;">
<hbox>
@@ -196,6 +197,10 @@
</vbox>
</groupbox>
+<hbox hidden="true" id="text-editor" flex="1">
+ <xhtml:textarea rows="50" cols='100' id="text-editor-box"></xhtml:textarea>
+</hbox>
+
<grid name="authority-marc-template" hidden="true">
<columns>
<column/>
More information about the open-ils-commits
mailing list