use Dojo dialog to get bookbag name instead of prompt()

Bug #740320 reported by Galen Charlton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Status tracked in Main
2.0
Fix Released
Undecided
Unassigned
Main
Fix Released
Low
Unassigned

Bug Description

When creating a new bookbag from the bibliographic details page in the OPAC, a JavaScript prompt() box is used to get the name of the new bookbag. This should be replaced with a Dojo dialog control, which would look better and make it possible to style the dialog.

Evergreen version: 2.0

Revision history for this message
Galen Charlton (gmc) wrote :

This is a bitesize bug; although anybody can work on it, preference should be given to somebody new to coding for Evergreen.

Revision history for this message
Jason Boyer (jasonb-myjclibrary) wrote :

Should this be marked a duplicate of #499499? The only (certain) way to fix 499499 is to not use prompt(), and that pretty much leaves this.

Revision history for this message
Joseph (joehms22) wrote :

I'm going to attach a patch to this, although there may be a better way to do this; probably a custom dojo widget.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Joseph Lewis <email address hidden>

Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Revision history for this message
Mike Rylander (mrylander) wrote :

Herein lies a branch implementing a markup-based variation on Joseph's theme:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/miker/dijit_dialog_bookbag

tags: added: pullrequest
Revision history for this message
James Fournie (jfournie) wrote :

Hi there,

Tested a bit (on 2.0) and the general functionality is fine.

I've pushed additional changes for the following:

- the patch changed both the "name your bookbag" and subsequent confirmation dialog to dojo dialogs. The latter did not have an OK button and just a close icon in the top corner which is not user-friendly -- I've switched it back to an alert to simplify things.

- advanced.go should probably not be the i18n string for the button as that's only used in the advanced search page, and if that's ever changed it would unwittingly affect this dialog. I've switched it to common.submit (although, perhaps we need a common.OK?)

- the initial dialog's title bar is not wide enough to accomodate the full (English) title, I've put a style tag to make it 25em, but this is really hackish, not sure why Dojo doesn't scale up the dialog to fit the title

Revision history for this message
Dan Scott (denials) wrote :

Committed to master - but forgot to sign off (doh). Also included a commit of my own to enable the Enter key to submit the request for the new bookbag.

Revision history for this message
Dan Scott (denials) wrote :

Also backported to rel_2_1 and rel_2_0 - signed off this time. Slight adjustment required for rel_2_0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.