LP#1642086: Smallest possible JQuery patch that could work...
authorMike Rylander <mrylander@gmail.com>
Tue, 15 Aug 2017 16:51:16 +0000 (12:51 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 30 Aug 2017 20:56:24 +0000 (16:56 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/js.tt2
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/web/js/ui/default/staff/Gruntfile.js

index aff6d6e..28f730c 100644 (file)
@@ -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
index d4c588f..df0d4cc 100644 (file)
@@ -1,6 +1,11 @@
 <!-- JS imports, etc.  -->
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/simple.js[% ctx.cache_key %]"></script>
 [% INCLUDE "opac/i18n_strings.tt2" %]
+
+[% IF ctx.want_jquery %]
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/common/jquery.min.js[% ctx.cache_key %]"></script>
+[% END; # ctx.want_jquery %]
+
 <!-- DOB validation for Patron Registration in OPAC -->
 <script type="text/javascript">
     function dobValidate(input) {
index 7563869..db4de84 100644 (file)
@@ -82,7 +82,7 @@ UpUp.start({
 [% IF EXPAND_WEB_IMPORTS %]
 
 <!-- angular -->
-<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/jquery.min.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/common/build/js/jquery.min.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular.min.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-route.min.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/ui-bootstrap-tpls.min.js"></script>
index 978e918..d8a05e1 100644 (file)
@@ -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',