From 577d2e05958d02545b5798045c6ecded7f0b5ff7 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Fri, 24 Apr 2015 10:03:16 -0400 Subject: [PATCH] JS checkstyles. --- themes/blueprint/js/lightbox.js | 2 +- themes/blueprint/js/record.js | 2 +- themes/bootstrap3/js/record.js | 39 +++++++++++++++++---------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/themes/blueprint/js/lightbox.js b/themes/blueprint/js/lightbox.js index 2a9804f1f3c..4ba745d8c9d 100644 --- a/themes/blueprint/js/lightbox.js +++ b/themes/blueprint/js/lightbox.js @@ -1,4 +1,4 @@ -/*global btoa, checkSaveStatuses, confirm, extractController, extractSource, getItemsFromCartCookie, hexEncode, htmlEncode, path, printIDs, rc4Encrypt, Recaptcha, redrawCartStatus, refreshCommentList, removeRecordState, saveCartCookie, unescape, vufindString*/ +/*global btoa, checkSaveStatuses, confirm, extractController, extractSource, getItemsFromCartCookie, hexEncode, htmlEncode, path, printIDs, rc4Encrypt, Recaptcha, redrawCartStatus, refreshCommentList, removeRecordState, saveCartCookie, unescape, userIsLoggedIn, vufindString*/ // keep a handle to the current opened dialog so we can access it later var __dialogHandle = {dialog: null, processFollowup:false, followupModule: null, followupAction: null, recordId: null, postParams: null}; diff --git a/themes/blueprint/js/record.js b/themes/blueprint/js/record.js index 0adeff25fa3..c63a97a8b30 100644 --- a/themes/blueprint/js/record.js +++ b/themes/blueprint/js/record.js @@ -1,4 +1,4 @@ -/*global __dialogHandle, displayFormError, extractController, extractSource, getLightbox, path, toggleMenu*/ +/*global console, __dialogHandle, displayFormError, extractController, extractSource, getLightbox, path, refreshTagList, toggleMenu*/ /** * Functions and event handlers specific to record pages. diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index 942eadd7e0f..4f25e70794b 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -1,4 +1,4 @@ -/*global checkSaveStatuses, deparam, extractClassParams, htmlEncode, Lightbox, path, syn_get_widget, vufindString */ +/*global checkSaveStatuses, deparam, extractClassParams, htmlEncode, Lightbox, path, syn_get_widget, userIsLoggedIn, vufindString */ /** * Functions and event handlers specific to record pages. @@ -173,24 +173,6 @@ function ajaxLoadTab(tabid) { return false; } -function ajaxTagUpdate(tag, remove) { - if(typeof remove === "undefined") { - remove = false; - } - var recordId = $('#record_id').val(); - var recordSource = $('.hiddenSource').val(); - $.ajax({ - url:path+'/AJAX/JSON?method=tagRecord', - method:'POST', - data:{ - tag:'"'+tag.replace(/\+/g, ' ')+'"', - id:recordId, - source:recordSource, - remove:remove - }, - complete:refreshTagList - }); -} function refreshTagList(loggedin) { loggedin = !!loggedin || userIsLoggedIn; var recordId = $('#record_id').val(); @@ -216,6 +198,25 @@ function refreshTagList(loggedin) { } } +function ajaxTagUpdate(tag, remove) { + if(typeof remove === "undefined") { + remove = false; + } + var recordId = $('#record_id').val(); + var recordSource = $('.hiddenSource').val(); + $.ajax({ + url:path+'/AJAX/JSON?method=tagRecord', + method:'POST', + data:{ + tag:'"'+tag.replace(/\+/g, ' ')+'"', + id:recordId, + source:recordSource, + remove:remove + }, + complete:refreshTagList + }); +} + $(document).ready(function(){ var id = $('.hiddenId')[0].value; registerTabEvents(); -- GitLab