scratchpad:custom_audio
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scratchpad:custom_audio [2010/07/16 13:37] – phasefx | scratchpad:custom_audio [2022/02/10 13:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 17: | Line 17: | ||
Lines in custom.js will override similar lines in the stock server/ | Lines in custom.js will override similar lines in the stock server/ | ||
- | See [[http://svn.open-ils.org/trac/ | + | See [[http://git.evergreen-ils.org/? |
===== Comprehensive example for Check-In workflows ===== | ===== Comprehensive example for Check-In workflows ===== | ||
+ | <code javascript> | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Configuring audio for check-in scenarios | ||
+ | var customized = ' | ||
+ | |||
+ | // For a clean slate | ||
+ | urls[' | ||
+ | urls[' | ||
+ | urls[' | ||
+ | urls[' | ||
+ | urls[' | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 1: Scanning (or mis-scanning) a barcode not in the database | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog (this dialog gets re-used throughout the client, so effectively it can only have one | ||
+ | // defined sound globally): | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 2: Scanning an item that goes smoothly into Reshelving status | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // Hard-coded sound: | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 3: Scanning an item that is already checked-in and for which no action is needed | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // Hard-coded sound: | ||
+ | urls[' | ||
+ | // Already defined previously, but here for completeness. | ||
+ | // previous assignments. | ||
+ | // even if the sound gets used in different contexts. | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Note: For both scenario 2 and scenario 3, the code dictates that an AUDIO_circ_good sound plays. | ||
+ | // will come after any sound defined for the event, but it can possibly trump or truncate that sound. | ||
+ | // you wanted scenario 2 and 3 to have completely different sounds, it would be best to set AUDIO_circ_good | ||
+ | // (the sound they have in common) to an empty string ('' | ||
+ | // specific event. | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 4: Scanning an item that needs to transit | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog (which may be suppressed): | ||
+ | urls[' | ||
+ | // Hard-coded sound, once the dialog closes and the list shows the item: | ||
+ | urls[' | ||
+ | |||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 5: Scanning an item that needs to go to the Hold Shelf | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog (which may be suppressed): | ||
+ | urls[' | ||
+ | // Hard-coded sound: | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Note: There' | ||
+ | // scenario 5 (check-in for hold shelf) with this configuration file. Both scenarios use the same | ||
+ | // event. | ||
+ | // action:: | ||
+ | // needed to arbitrary code-paths. | ||
+ | // sound, and create a .hold_shelf() method to the sound object to insert into the check-in code. A | ||
+ | // similar situation exists with scenario 4, if you need to distinguish between a normal transit and | ||
+ | // a hold-transit. | ||
+ | |||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 6: Scanning an item that is marked Claimed Returned | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog for check-in failure override: | ||
+ | urls[' | ||
+ | // Hard-coded sound (if the failure is overriden): | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 7: Scanning an item that is marked Lost | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog for check-in failure override: | ||
+ | urls[' | ||
+ | // Hard-coded sound (if the failure is overriden): | ||
+ | urls[' | ||
+ | |||
+ | ////////////////////////////////////////////////////////////////////////// | ||
+ | // Scenario 8: Scanning a pre-cataloged item | ||
+ | // | ||
+ | // The event returned: | ||
+ | urls[' | ||
+ | // From the pop-up dialog for route to cataloging (which may be suppressed): | ||
+ | urls[' | ||
+ | // Hard-coded sound post-dialog: | ||
+ | urls[' | ||
+ | </ |
scratchpad/custom_audio.1279301863.txt.gz · Last modified: 2022/02/10 13:33 (external edit)