From: Coleman Watts Date: Mon, 16 Dec 2013 23:32:02 +0000 (-0800) Subject: CRM-13997 - Upgrade jQuery UI to 1.10.3 and switch theme to "black-tie" X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dbe0bbc6a1987a303a9fa5abed5dfd4d5fb8bff3;p=civicrm-core.git CRM-13997 - Upgrade jQuery UI to 1.10.3 and switch theme to "black-tie" --- diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index d84c8c765e..919cb3503e 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -429,7 +429,7 @@ class CRM_Core_Resources { $config = CRM_Core_Config::singleton(); // Add resources from coreResourceList - $files = self::coreResourceList(); + $files = $this->coreResourceList(); $jsWeight = -9999; foreach ($files as $file) { if (substr($file, -2) == 'js') { @@ -442,17 +442,6 @@ class CRM_Core_Resources { } } - // Add localized calendar js - // Search for i18n file in order of specificity (try fr-CA, then fr) - list($lang) = explode('_', $config->lcMessages); - foreach (array(str_replace('_', '-', $config->lcMessages), $lang) as $language) { - $localizationFile = "packages/jquery/jquery-ui-1.9.0/development-bundle/ui/i18n/jquery.ui.datepicker-{$language}.js"; - if ($this->getPath('civicrm', $localizationFile)) { - $this->addScriptFile('civicrm', $localizationFile, $jsWeight++, $region, FALSE); - break; - } - } - // Initialize CRM.url and CRM.formatMoney $url = CRM_Utils_System::url('civicrm/example', 'placeholder', FALSE, NULL, FALSE); $js = "CRM.url('init', '$url');\n"; @@ -538,15 +527,16 @@ class CRM_Core_Resources { * * @return array */ - static function coreResourceList() { - // Use minified javascript for production, uncompressed in debug mode - $min = CRM_Core_Config::singleton()->debug ? '' : '.min'; + public function coreResourceList() { + $config = CRM_Core_Config::singleton(); + // Use minified files for production, uncompressed in debug mode + $min = $config->debug ? '' : '.min'; $items = array( "packages/jquery/jquery-1.10.2.min.js", "packages/jquery/jquery-migrate-1.2.1.js", - "packages/jquery/jquery-ui-1.9.0/js/jquery-ui-1.9.0.custom.min.js", - "packages/jquery/jquery-ui-1.9.0/css/smoothness/jquery-ui-1.9.0.custom.min.css", + "packages/jquery/jquery-ui/js/jquery-ui-1.10.3.custom$min.js", + "packages/jquery/jquery-ui/css/black-tie/jquery-ui-1.10.3.custom$min.css", "packages/jquery/plugins/jquery.autocomplete.js", "packages/jquery/css/jquery.autocomplete.css", @@ -585,6 +575,20 @@ class CRM_Core_Resources { "js/jquery/jquery.crmeditable.js", "js/jquery/jquery.crmasmselect.js", ); + + // Add localized jQuery UI files + 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/development-bundle/ui/" . ($min ? 'minified/' : '') . "i18n"; + foreach (array(str_replace('_', '-', $config->lcMessages), $lang) as $language) { + $localizationFile = "$path/jquery.ui.datepicker-{$language}{$min}.js"; + if ($this->getPath('civicrm', $localizationFile)) { + $items[] = $localizationFile; + break; + } + } + } return $items; } } diff --git a/css/civicrm.css b/css/civicrm.css index f89093fe01..4b0b9f1106 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2514,7 +2514,7 @@ div.grippie { } .crm-container .dark-icon { - background-image: url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-icons_222222_256x240.png")} + background-image: url("../packages/jquery/jquery-ui/css/black-tie/images/ui-icons_222222_256x240.png")} .crm-container .red-icon { background-image: url("../i/icons/jquery-ui-8A1F11.png")} @@ -2540,11 +2540,12 @@ div.grippie { background-position: -129px -112px; } .crm-container .button:hover .delete-icon { - background-image: url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-icons_cd0a0a_256x240.png")!important; + background-image: url("../i/icons/jquery-ui-8A1F11.png")!important; } .crm-container .restore-icon { - background-position: 0px -66px;background-image: url("../i/icons/jquery-ui-91CE00.png"); + background-position: 0px -66px; + background-image: url("../i/icons/jquery-ui-91CE00.png"); } .crm-container .button:hover .restore-icon { background-image: url("../i/icons/jquery-ui-91CE00.png"); @@ -2982,34 +2983,6 @@ div#crm-container form { width: 100%!important; } -/* ui dialog state */ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-content, -.ui-widget-header { - color: #3e3e3e; - border:0px solid transparent; - border-color:transparent; -} - -/* ui dialog state */ -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { - border: 0px solid #70716b; - background: #484e4c url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; - font-weight: normal; - color: #f5f6f1; -} - -/* add border to jQuery ui-dialog box CRM-13177 */ -div.ui-dialog { - border: 1px solid black; -} - #Tag .tree .collapsable .hit, #Tag .tree .expandable .hit { padding-left: 16px; @@ -3482,7 +3455,7 @@ div.m ul#civicrm-menu, cursor: pointer; cursor: hand; background-position: -66px -114px; - background-image: url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-icons_222222_256x240.png"); + background-image: url("../i/icons/jquery-ui-3E3E3E.gif"); } .crm-container span.batch-valid { @@ -3491,7 +3464,7 @@ div.m ul#civicrm-menu, cursor: pointer; cursor: hand; background-position: -322px -143px; - background-image: url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-icons_222222_256x240.png"); + background-image: url("../i/icons/jquery-ui-3E3E3E.gif"); } .crm-container span.batch-invalid { @@ -3500,7 +3473,7 @@ div.m ul#civicrm-menu, cursor: pointer; cursor: hand; background-position: -258px -143px; - background-image: url("../packages/jquery/jquery-ui-1.9.0/css/smoothness/images/ui-icons_222222_256x240.png"); + background-image: url("../i/icons/jquery-ui-3E3E3E.gif"); } .crm-container #Entry ul#errorList {