From: Mike Rylander Date: Tue, 15 Aug 2017 16:51:16 +0000 (-0400) Subject: LP#1642086: Smallest possible JQuery patch that could work... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5e032ee030399b6fd1b2ffe8e10adfb8daa667e0;p=working%2FEvergreen.git LP#1642086: Smallest possible JQuery patch that could work... Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index aff6d6e3cd..28f730cdeb 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -237,6 +237,13 @@ ctx.exclude_electronic_checkbox = 0; ############################################################################## # obalkyknih_cz.enabled = 'false'; +############################################################################## +# JQuery support +############################################################################## +# Include JQuery in the TPAC? +# Set to a true value to enable +############################################################################## +# ctx.want_jquery = 1; ############################################################################## # Browser cache-busting key diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2 index d4c588fd0c..df0d4cc910 100644 --- a/Open-ILS/src/templates/opac/parts/js.tt2 +++ b/Open-ILS/src/templates/opac/parts/js.tt2 @@ -1,6 +1,11 @@ [% INCLUDE "opac/i18n_strings.tt2" %] + +[% IF ctx.want_jquery %] + +[% END; # ctx.want_jquery %] + + diff --git a/Open-ILS/web/js/ui/default/staff/Gruntfile.js b/Open-ILS/web/js/ui/default/staff/Gruntfile.js index 978e918539..d8a05e1f2a 100644 --- a/Open-ILS/web/js/ui/default/staff/Gruntfile.js +++ b/Open-ILS/web/js/ui/default/staff/Gruntfile.js @@ -30,7 +30,6 @@ module.exports = function(grunt) { 'node_modules/angular-location-update/angular-location-update.min.js', 'node_modules/angular-tree-control/angular-tree-control.js', 'node_modules/ng-toast/dist/ngToast.min.js', - 'node_modules/jquery/dist/jquery.min.js', 'node_modules/angular-cookies/angular-cookies.min.js', 'node_modules/angular-cookies/angular-cookies.min.js.map', 'node_modules/iframe-resizer/js/iframeResizer.min.js', @@ -43,6 +42,15 @@ module.exports = function(grunt) { 'node_modules/moment/min/moment-with-locales.min.js', 'node_modules/moment-timezone/builds/moment-timezone-with-data.min.js' ] + }, + { + dest: '../common/build/js/', + flatten: true, + filter: 'isFile', + expand : true, + src: [ + 'node_modules/jquery/dist/jquery.min.js' + ] }] }, @@ -139,7 +147,7 @@ module.exports = function(grunt) { src: [ // These are concatenated in order in the final build file. // The order is important. - 'build/js/jquery.min.js', + '../common/build/js/jquery.min.js', 'build/js/angular.min.js', 'build/js/angular-animate.min.js', 'build/js/angular-sanitize.min.js',