diff --git a/themes/bootstrap3/js/advanced_search.js b/themes/bootstrap3/js/advanced_search.js index f3d6982274c124c79e42c0536fba61cc93813052..d8f47aaa86d40f66aed18ca7bc64f6ffc809461b 100644 --- a/themes/bootstrap3/js/advanced_search.js +++ b/themes/bootstrap3/js/advanced_search.js @@ -1,4 +1,4 @@ -/*global addSearchString, searchFields, searchFieldLabel, searchLabel, searchMatch */ +/*global addSearchString, deleteSearchGroupString, searchFields, searchJoins, searchLabel, searchMatch */ var nextGroup = 0; diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index aa3a1f343852921c3d84a2c362d6519fb3a3d551..f2dab3db03dbf4d8251073b3455faa21474ed9b3 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -1,4 +1,4 @@ -/*global checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, vufindString */ +/*global ajaxLoadTab, Bloodhound, checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, vufindString */ /* --- GLOBAL FUNCTIONS --- */ function htmlEncode(value){ @@ -10,7 +10,9 @@ function htmlEncode(value){ } function extractClassParams(str) { str = $(str).attr('class'); - if (typeof str === "undefined") return []; + if (typeof str === "undefined") { + return []; + } var params = {}; var classes = str.split(/\s+/); for(var i = 0; i < classes.length; i++) { @@ -22,7 +24,7 @@ function extractClassParams(str) { return params; } function jqEscape(myid) { - return String(myid).replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&"); + return String(myid).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); } function html_entity_decode(string, quote_style) { @@ -319,7 +321,7 @@ $(document).ready(function() { $('.autocomplete').typeahead( { highlight: true, - minLength: 3, + minLength: 3 }, { displayKey:'val', source: autocompleteEngine.ttAdapter() @@ -386,7 +388,7 @@ $(document).ready(function() { checkSaveStatuses(); }); Lightbox.addFormHandler('feedback', function(evt) { - $form = $(evt.target); + var $form = $(evt.target); // Grabs hidden inputs var formSuccess = $form.find("input#formSuccess").val(); var feedbackFailure = $form.find("input#feedbackFailure").val(); diff --git a/themes/bootstrap3/js/hierarchyTree.js b/themes/bootstrap3/js/hierarchyTree.js index c829da499f06c4560b8d4b9978c5dd0493c97afe..a0384a7cc5d381138fcd18553d5674042f92f140 100644 --- a/themes/bootstrap3/js/hierarchyTree.js +++ b/themes/bootstrap3/js/hierarchyTree.js @@ -40,6 +40,11 @@ function changeLimitReachedLabel(display) } } +function htmlEncodeId(id) +{ + return id.replace(/\W/g, "-"); // Also change Hierarchy/TreeRenderer/JSTree.php +} + var searchAjax = false; function doTreeSearch() { @@ -71,8 +76,8 @@ function doTreeSearch() var id = htmlEncodeId(data.results[i]); tree._open_to(id); } - for(var i=data.results.length;i--;) { - var id = htmlEncodeId(data.results[i]); + for(i=data.results.length;i--;) { + id = htmlEncodeId(data.results[i]); $('#hierarchyTree').find('#'+id).addClass('jstree-search'); } changeNoResultLabel(false); @@ -167,7 +172,7 @@ $(document).ready(function() var nodes = buildJSONNodes($(xml).find('root')); cb.call(this, nodes); } - }) + }); }, 'themes' : { 'url': path + '/themes/bootstrap3/js/vendor/jsTree/themes/default/style.css' @@ -191,9 +196,4 @@ $(document).ready(function() doTreeSearch(); } }); -}); - -function htmlEncodeId(id) -{ - return id.replace(/\W/g, "-"); // Also change Hierarchy/TreeRenderer/JSTree.php -} \ No newline at end of file +}); \ No newline at end of file diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index e9fd7257891177e561cca5e0bec929ef1a55aea7..9a5df30326e2b316f2e5f4ff7eeaad529e3b1499 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -1,4 +1,4 @@ -/*global checkSaveStatuses, console, deparam, path, vufindString */ +/*global checkSaveStatuses, console, deparam, path, Recaptcha, vufindString */ var Lightbox = { /** @@ -164,7 +164,7 @@ var Lightbox = { var fi = html.indexOf('<div class="alert alert-danger">'); if(fi > -1) { var li = html.indexOf('</div>', fi+31); - Lightbox.displayError(html.substring(fi+31, li).replace(/^[\s\>\<]+|[\s\>\<]+$/g, '')); + Lightbox.displayError(html.substring(fi+31, li).replace(/^[\s<>]+|[\s<>]+$/g, '')); } else { success(html); } diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index a2c67eacc514181878c89f1e7e755bbbcf62a421..875131cf2d3cffa9f562d2c53470a2e6ea150ca9 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -1,4 +1,4 @@ -/*global deparam, extractClassParams, htmlEncode, Lightbox, path, vufindString */ +/*global deparam, extractClassParams, htmlEncode, Lightbox, path, syn_get_widget, vufindString */ /** * Functions and event handlers specific to record pages. @@ -202,7 +202,7 @@ $(document).ready(function(){ ajaxLoadTab(tabid); } return false; - }) + }); /* --- LIGHTBOX --- */ // Cite lightbox diff --git a/themes/bootstrap3/templates/search/advanced/globals.phtml b/themes/bootstrap3/templates/search/advanced/globals.phtml index 0a7a5e6d630610c4a7549c7ba59e81d556dd53c8..e880ce285355bd18c24ea0743eefcfd2a3fe7227 100644 --- a/themes/bootstrap3/templates/search/advanced/globals.phtml +++ b/themes/bootstrap3/templates/search/advanced/globals.phtml @@ -2,14 +2,14 @@ var searchFields = new Array(); <? foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> searchFields["<?=$this->escapeHtml($searchVal)?>"] = "<?=$this->transEsc($searchDesc)?>"; <? endforeach; ?> + var searchJoins = new Array(); searchJoins["AND"] = "<?=$this->transEsc("search_AND")?>"; searchJoins["OR"] = "<?=$this->transEsc("search_OR")?>"; searchJoins["NOT"] = "<?=$this->transEsc("search_NOT")?>"; + var addSearchString = "<?=$this->transEsc("add_search")?>"; -var addGroupString = "<?=$this->transEsc("add_search_group")?>"; -var searchLabel = "<?=$this->transEsc("adv_search_label")?>"; -var searchFieldLabel = "<?=$this->transEsc("in")?>"; var deleteSearchGroupString = "<?=$this->transEsc("del_search")?>"; -var searchMatch = "<?=$this->transEsc("search_match")?>"; -var searchFormId = 'advSearchForm'; +var searchFieldLabel = "<?=$this->transEsc("in")?>"; +var searchLabel = "<?=$this->transEsc("adv_search_label")?>"; +var searchMatch = "<?=$this->transEsc("search_match")?>";