Update Horizon for Angular 1.4
Wraps deprecated code in relevant versioned blocks. Implements: blueprint update-dependencies-newton Change-Id: I4cb71c6306f221c825006be62b30ac8238aa3a78
This commit is contained in:
parent
268e44b349
commit
ffceacd349
@ -38,7 +38,7 @@ horizon.tabs.load_tab = function () {
|
||||
};
|
||||
|
||||
horizon.addInitFunction(horizon.tabs.init = function () {
|
||||
var data = horizon.cookies.get("tabs") || {};
|
||||
var data = horizon.cookies.getObject("tabs") || {};
|
||||
|
||||
$(".tab-content").find(".js-tab-pane").addClass("tab-pane");
|
||||
horizon.modals.addModalInitFunction(function (el) {
|
||||
@ -63,7 +63,7 @@ horizon.addInitFunction(horizon.tabs.init = function () {
|
||||
}
|
||||
|
||||
data[$tab.closest(".nav-tabs").attr("id")] = $tab.attr('data-target');
|
||||
horizon.cookies.put("tabs", data);
|
||||
horizon.cookies.putObject("tabs", data);
|
||||
});
|
||||
|
||||
// Initialize stored tab state for tab groups on this page.
|
||||
|
@ -119,10 +119,16 @@
|
||||
|
||||
horizon.conf.spinner_options = spinnerOptions;
|
||||
|
||||
if (angular.version.major === 1 && angular.version.minor < 4) {
|
||||
horizon.cookies = angular.extend({}, $cookieStore, {
|
||||
getObject: $cookieStore.get,
|
||||
put: put,
|
||||
putObject: put,
|
||||
getRaw: getRaw
|
||||
});
|
||||
} else {
|
||||
horizon.cookies = $cookies;
|
||||
}
|
||||
|
||||
// rewire the angular-gettext catalog to use django catalog
|
||||
gettextCatalog.setCurrentLanguage(horizon.languageCode);
|
||||
|
Loading…
Reference in New Issue
Block a user