[Bug 10405] New: User-editable sections should have ids
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Bug ID: 10405 Summary: User-editable sections should have ids Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jcamins@cpbibliography.com Right now the following user-editable sections do not have css ids: opacheader OpacNavBottom OpacNavRight OpacSearchForTitleIn OpacUserCSS opacuserjs They should. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 18787 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18787&action=edit Bug 10405: add IDs for custom regions This patch adds unique IDs for: opaccredits opacheader OPACMobileUserCSS OpacNavBottom OpacUserCSS opacuserjs This is most useful for previewing changes you make in the OPAC preferences using the following javascript in your IntranetUserJS: function showPreview(url) { $('#preview-loading').show(); document.getElementById('opac-preview').src = url; $('#opac-preview').load(function () { $('#opac-preview').show(); $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val()); $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val()); $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val()); $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val()); $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val()); $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val()); $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val()); $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val()); $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val()); $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>'); $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); $('#preview-loading').hide(); }); } $(document).ready(function () { if ($('#pref_OpacNav').size() > 0) { $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>'); $('#preview-main').click(function () { showPreview('/cgi-bin/koha/opac/opac-main.pl'); }); $('#preview-results').click(function () { showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit='); }); $('#preview-details').click(function () { showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1'); }); $('#preview-hide').click(function () { $('#opac-preview').hide(); $('#preview-loading').hide(); }); } }); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18787|0 |1 is obsolete| | --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 18788 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18788&action=edit Bug 10405: add IDs for custom regions This patch adds unique IDs for: opaccredits opacheader OPACMobileUserCSS OpacNavBottom OpacUserCSS opacuserjs This is an amended patch which includes the changes to CCSR which I forgot to commit before. The patch does not add a unique ID for opacheader to CCSR, since opacheader is positioned wrong. This is most useful for previewing changes you make in the OPAC preferences using the following javascript in your IntranetUserJS: function showPreview(url) { $('#preview-loading').show(); document.getElementById('opac-preview').src = url; $('#opac-preview').load(function () { $('#opac-preview').show(); $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val()); $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val()); $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val()); $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val()); $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val()); $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val()); $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val()); $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val()); $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val()); $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>'); $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); $('#preview-loading').hide(); }); } $(document).ready(function () { if ($('#pref_OpacNav').size() > 0) { $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>'); $('#preview-main').click(function () { showPreview('/cgi-bin/koha/opac/opac-main.pl'); }); $('#preview-results').click(function () { showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit='); }); $('#preview-details').click(function () { showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1'); }); $('#preview-hide').click(function () { $('#opac-preview').hide(); $('#preview-loading').hide(); }); } }); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18788|0 |1 is obsolete| | --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 18831 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18831&action=edit [SIGNED-OFF] Bug 10405: add IDs for custom regions This patch adds unique IDs for: opaccredits opacheader OPACMobileUserCSS OpacNavBottom OpacUserCSS opacuserjs This is an amended patch which includes the changes to CCSR which I forgot to commit before. The patch does not add a unique ID for opacheader to CCSR, since opacheader is positioned wrong. This is most useful for previewing changes you make in the OPAC preferences using the following javascript in your IntranetUserJS: function showPreview(url) { $('#preview-loading').show(); document.getElementById('opac-preview').src = url; $('#opac-preview').load(function () { $('#opac-preview').show(); $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val()); $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val()); $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val()); $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val()); $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val()); $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val()); $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val()); $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val()); $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val()); $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>'); $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); $('#preview-loading').hide(); }); } $(document).ready(function () { if ($('#pref_OpacNav').size() > 0) { $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>'); $('#preview-main').click(function () { showPreview('/cgi-bin/koha/opac/opac-main.pl'); }); $('#preview-results').click(function () { showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit='); }); $('#preview-details').click(function () { showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1'); }); $('#preview-hide').click(function () { $('#opac-preview').hide(); $('#preview-loading').hide(); }); } }); Signed-off-by: Srdjan <srdjan@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |srdjan@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'd love to test this with the provided javascript, but it doesn't work for me, I get an error about this line: $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18831|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19051 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19051&action=edit [PASSED QA] Bug 10405: add IDs for custom regions This patch adds unique IDs for: opaccredits opacheader OPACMobileUserCSS OpacNavBottom OpacUserCSS opacuserjs This is an amended patch which includes the changes to CCSR which I forgot to commit before. The patch does not add a unique ID for opacheader to CCSR, since opacheader is positioned wrong. This is most useful for previewing changes you make in the OPAC preferences using the following javascript in your IntranetUserJS: function showPreview(url) { $('#preview-loading').show(); document.getElementById('opac-preview').src = url; $('#opac-preview').load(function () { $('#opac-preview').show(); $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val()); $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val()); $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val()); $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val()); $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val()); $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val()); $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val()); $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val()); $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val()); $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>'); $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); $('#preview-loading').hide(); }); } $(document).ready(function () { if ($('#pref_OpacNav').size() > 0) { $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>'); $('#preview-main').click(function () { showPreview('/cgi-bin/koha/opac/opac-main.pl'); }); $('#preview-results').click(function () { showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit='); }); $('#preview-details').click(function () { showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1'); }); $('#preview-hide').click(function () { $('#opac-preview').hide(); $('#preview-loading').hide(); }); } }); Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Note: The provided JavaScript didn't work for me and resulted in an error in Firebug. Ater talking to Jared it seems like there is more needed than the bit of Javascript so make this work, but it might be a good starting point, so I am leaving it in the commit message. Passes all tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Just a general comment -- it may take me a bit longer than normal to test this; because this patch adds divs wrapping all of the user-editable sections -- whether the sysprefs have contents or not -- I'm going to be checking whether any CSS tweaks may be called for. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jared! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Could you explain koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc changes? I can understand removing the IF/END around it, but why did the content line disappear?! [% OPACResultsSidebar %] should be left as is. I eyeballed the other changes and they all make sense and within scope. I'll let someone else change the status of this bug, as perhaps there is a reason of which I am unaware. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- That looks like a mistake. Please feel free to open a new bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10840 --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Done. See Bug -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10405 Bruce Metcalf <bugzilla@augustansociety.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@augustansociety.co | |m -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org