<div class="center-text">
Your RBdigital account has been created!<br><br>
Please remember the RBdigital password you just created. It may be different from your PINES password.<br><br>
- Visit <a href="https://[% vendor_library_url %]/#/help/support" target="_blank">https://[% vendor_library_url %]</a>/#/help/support to learn about RBdigital and to download RBdigital mobile and desktop apps.<br><br>
+ Visit <a href="https://[% vendor_library_url %]/#/help/support" target="_blank">https://[% vendor_library_url %]/#/help/support</a> to learn about RBdigital and to download RBdigital mobile and desktop apps.<br><br>
Visit <a href="https://[% vendor_library_url %]" target="_blank">https://[% vendor_library_url %]</a> to search for e-books and e-audiobooks at RBdigital.com or use the RBdigital tab to search from them from this PINES site
</div>
<button id="btnCloseRegisterSuccess" type="submit" class="btn btn-danger btn-default pull-right" data-dismiss="modal">Ok</button>
var ebook_spinner;
var rbdigitalPatronId;
var EG_ID_FIELD_SEPARATOR = '__';
+var EG_QUERY_STRING = "eg[query_string]";
$( document ).ready(function() {
ebook_rbdigital = new Ebook('rbdigital', 0);
trigger: 'hover focus'
});
+ //Update Default Vendor link
+ if ($('#hasVendors')) {
+ var query_string = getValueFromLocalStorage(EG_QUERY_STRING);
+ var default_search_link = $("#lnkSearchResults_default");
+ var default_search_uri = default_search_link.attr('href');
+
+ if (query_string.length > 0) {
+ default_search_link.attr("href",default_search_uri+ query_string);
+ }
+ }
+
});
function setupEventHandlers() {
return false;
});
- $("#lnkSearchResults_rbdigital").click(function(event){
+ $("#lnkSearchResults_rbdigital").click(function(event) {
+ //Presist existing query string to a local storage
+ saveToLocalStorage(EG_QUERY_STRING, window.location.search);
+
//Do not show registration modal if patronid exists
if (rbdigitalPatronId > 0) {
return true;
String.prototype.ucfirst = function() {
return this.charAt(0).toUpperCase() + this.substr(1);
+}
+
+/**
+ * Call this method save value to local storage
+ * @param {string} key
+ * @param {string} query_string
+ */
+function saveToLocalStorage(key, query_string) {
+ localStorage.setItem(key, JSON.stringify(query_string));
+}
+
+/**
+ * Call this method to get value from local storage
+ * @param {string} key
+ * @returns String containing value from localstorage (if any)
+ */
+function getValueFromLocalStorage(key) {
+ if (typeof localStorage[key] != 'undefined' ) {
+ return JSON.parse(localStorage[key]);
+ }
}
\ No newline at end of file