Skip to content

Commit fc1e16d

Browse files
author
Igor Melnikov
committed
MAGETWO-44975: Incorrect messgae on success page after extension installation
Refactoring
1 parent 67cbb98 commit fc1e16d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

setup/pub/magento/setup/app.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ var app = angular.module(
3131
'system-config'
3232
]);
3333

34-
app.config(function ($stateProvider) {
34+
app.config(['$httpProvider', '$stateProvider', function ($httpProvider, $stateProvider) {
35+
if (!$httpProvider.defaults.headers.get) {
36+
$httpProvider.defaults.headers.get = {};
37+
}
38+
$httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT';
39+
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
40+
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
3541
app.stateProvider = $stateProvider;
36-
})
42+
}])
3743
.config(function($provide) {
3844
$provide.decorator('$state', function($delegate, $stateParams) {
3945
$delegate.forceReload = function() {

setup/pub/magento/setup/component-grid.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ angular.module('component-grid', ['ngStorage'])
122122
if ($localStorage.titles['update'].indexOf($localStorage.moduleName) < 0 ) {
123123
$localStorage.titles['update'] = 'Update ' + $localStorage.moduleName;
124124
}
125-
$state.titles = $localStorage.titles;
125+
$rootScope.titles = $localStorage.titles;
126126
$scope.nextState();
127127
};
128128

@@ -140,7 +140,7 @@ angular.module('component-grid', ['ngStorage'])
140140
if ($localStorage.titles['uninstall'].indexOf($localStorage.moduleName) < 0 ) {
141141
$localStorage.titles['uninstall'] = 'Uninstall ' + $localStorage.moduleName;
142142
}
143-
$state.titles = $localStorage.titles;
143+
$rootScope.titles = $localStorage.titles;
144144
$localStorage.componentType = component.type;
145145
$state.go('root.readiness-check-uninstall');
146146
};
@@ -161,7 +161,7 @@ angular.module('component-grid', ['ngStorage'])
161161
$localStorage.titles[type] = type.charAt(0).toUpperCase() + type.slice(1) + ' '
162162
+ $localStorage.moduleName;
163163
}
164-
$state.titles = $localStorage.titles;
164+
$rootScope.titles = $localStorage.titles;
165165
$localStorage.componentType = component.type;
166166
$state.go('root.readiness-check-'+type);
167167
}

0 commit comments

Comments
 (0)