From 3c61fc8fa265f972deca17e450377fa1c137f49f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 30 Jan 2015 11:18:39 -0500 Subject: [PATCH] CRM-15890 - Switch jQuery to use bower version --- CRM/Core/Resources.php | 8 ++++---- bower.json | 4 +++- css/civicrm.css | 4 ++-- css/dashboard.css | 2 +- templates/CRM/Core/APIDoc.tpl | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index f160634176..b61edda6e9 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -672,9 +672,9 @@ class CRM_Core_Resources { // Scripts needed by everyone, everywhere // FIXME: This is too long; list needs finer-grained segmentation $items = array( - "packages/jquery/jquery-1.11.1$min.js", - "packages/jquery/jquery-ui/jquery-ui$min.js", - "packages/jquery/jquery-ui/jquery-ui$min.css", + "bower_components/jquery/dist/jquery.min.js", + "bower_components/jquery-ui/jquery-ui.min.js", + "bower_components/jquery-ui/themes/smoothness/jquery-ui$min.css", "packages/backbone/lodash.compat$min.js", "packages/jquery/plugins/jquery.mousewheel$min.js", "packages/jquery/plugins/select2/select2$min.js", @@ -715,7 +715,7 @@ class CRM_Core_Resources { if ($config->lcMessages && $config->lcMessages != 'en_US') { // Search for i18n file in order of specificity (try fr-CA, then fr) list($lang) = explode('_', $config->lcMessages); - $path = "packages/jquery/jquery-ui/i18n"; + $path = "bower_components/jquery-ui/ui/i18n"; foreach (array(str_replace('_', '-', $config->lcMessages), $lang) as $language) { $localizationFile = "$path/datepicker-{$language}.js"; if ($this->getPath('civicrm', $localizationFile)) { diff --git a/bower.json b/bower.json index c88109ebb9..9c8a3f15cd 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,9 @@ "angular-ui-utils": "0.1.x", "angular-unsavedChanges": "~0.1.1", "qunit": "1.10.0", - "d3": "3.4.11" + "d3": "3.4.11", + "jquery": "1.11.2", + "jquery-ui": "1.11.2" }, "resolutions": { "angular": "~1.3.8" diff --git a/css/civicrm.css b/css/civicrm.css index 541356aea7..3995a2925d 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2579,7 +2579,7 @@ div.grippie { } .crm-container .dark-icon { - background-image: url("../packages/jquery/jquery-ui/images/ui-icons_222222_256x240.png") + background-image: url("../bower_components/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png") } .crm-container .delete-icon { background-position: -176px -96px; @@ -2820,7 +2820,7 @@ div.grippie { } .crm-status-box-outer.status-start { - background: #F8FF03 url("../packages/jquery/jquery-ui/images/animated-overlay.gif"); + background: #F8FF03 url("../bower_components/jquery-ui/themes/smoothness/images/animated-overlay.gif"); } .crm-status-box-outer .crm-status-box-inner { diff --git a/css/dashboard.css b/css/dashboard.css index a379d10412..d641a086c9 100644 --- a/css/dashboard.css +++ b/css/dashboard.css @@ -95,7 +95,7 @@ } #crm-container .widget-icon { - background-image:url('../packages/jquery/jquery-ui/images/ui-icons_222222_256x240.png'); + background-image:url('../bower_components/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png'); height:16px; width:16px; padding-right:2px; diff --git a/templates/CRM/Core/APIDoc.tpl b/templates/CRM/Core/APIDoc.tpl index 20bf48d857..3fbec8f814 100644 --- a/templates/CRM/Core/APIDoc.tpl +++ b/templates/CRM/Core/APIDoc.tpl @@ -15,7 +15,7 @@ if (!jQuery) {ldelim} var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; -script.src= CRM.config.resourceBase + 'js/packages/jquery/jquery.js'; +script.src= CRM.config.resourceBase + 'bower_components/jquery/dist/jquery.min.js'; head.appendChild(script); {rdelim} restURL = '{crmURL p="civicrm/api/json"}'; -- 2.25.1