Skip to content

Commit

Permalink
[publish] 2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarincev committed Mar 9, 2017
1 parent 199b893 commit fd0ce1a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
[assembly: AssemblyProduct("Virto Commerce 2.12")]
[assembly: AssemblyCopyright("Copyright © VirtoCommerce 2011-2016")]

[assembly: AssemblyFileVersion("2.12.9.0")]
[assembly: AssemblyVersion("2.12.9.0")]
[assembly: AssemblyInformationalVersion("2.12")]
[assembly: AssemblyFileVersion("2.13.0.0")]
[assembly: AssemblyVersion("2.13.0.0")]
[assembly: AssemblyInformationalVersion("2.13")]

#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.5</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.6</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.5</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.6</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.5</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.5</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>$id$</id>
<version>2.12.5</version>
<version>2.13.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
Expand Down
20 changes: 14 additions & 6 deletions VirtoCommerce.Platform.Web/Scripts/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,17 @@ angular.module('platformWebApp', AppDependencies).
$scope.isAuthenticated = authContext.isAuthenticated;
});

var userProfileSettings;
var userProfileSettings;

var unwatchMenuChangesFn;
$scope.$on('loginStatusChanged', function (event, authContext) {
//unsubscribe from previous watch
//We cannot use global watch because saveMenuState may be executed before menu initialized loaded persisted state
if (unwatchMenuChangesFn) {
unwatchMenuChangesFn();
unwatchMenuChangesFn = undefined;
}
//reset menu to default state
angular.forEach(mainMenuService.menuItems, function(menuItem) { mainMenuService.resetMenuItemDefaults(menuItem); });
if (authContext.isAuthenticated) {
settings.getCurrentUserProfile(function(currentUserProfileSettings) {
Expand All @@ -76,6 +85,8 @@ angular.module('platformWebApp', AppDependencies).
$translate.use(settingsHelper.getSetting(currentUserProfileSettings, "VirtoCommerce.Platform.UI.Language").value);

initializeMainMenu(userProfileSettings);

unwatchMenuChangesFn = $scope.$watch('mainMenu', function () { saveMenuState($scope.mainMenu, userProfileSettings); }, true);
});

$timeout(function() {
Expand All @@ -88,9 +99,7 @@ angular.module('platformWebApp', AppDependencies).

$scope.mainMenu = {};
$scope.mainMenu.items = mainMenuService.menuItems;

$scope.$watch('mainMenu', function () { saveMenuState($scope.mainMenu, userProfileSettings); }, true);


function initializeMainMenu(profileSettings) {
if (profileSettings) {
var mainMenuStateSetting = settingsHelper.getSetting(profileSettings, "VirtoCommerce.Platform.UI.MainMenu.State");
Expand All @@ -103,11 +112,10 @@ angular.module('platformWebApp', AppDependencies).
angular.extend(existItem, x);
}
});
}
}
}
}


function saveMenuState(mainMenu, profileSettings) {
if (mainMenu && profileSettings) {
var menuState =
Expand Down

0 comments on commit fd0ce1a

Please sign in to comment.