Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.36 KB | None | 0 0
  1. Index: main/package.json
  2. IDEA additional info:
  3. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  4. <+>UTF-8
  5. ===================================================================
  6. --- main/package.json (revision 59844a8bd21fdf853fea7b21c693297b18e28411)
  7. +++ main/package.json (date 1528970936000)
  8. @@ -30,7 +30,7 @@
  9. "yargs": "^3.30.0"
  10. },
  11. "dependencies": {
  12. - "angular": "^1.4.1",
  13. + "angular": "^1.6.6",
  14. "angular-animate": "^1.5.0-beta.2",
  15. "angular-cookies": "^1.5.0-beta.2",
  16. "angular-css": "^1.0.7",
  17. @@ -42,6 +42,7 @@
  18. "angular-paging": "^2.2.2",
  19. "angular-resource": "^1.5.0-beta.2",
  20. "angular-route": "^1.5.0-beta.2",
  21. + "angular-sanitize": "^1.6.6",
  22. "angular-ui-bootstrap": "^0.14.3",
  23. "angular-ui-router": "^1.0.3",
  24. "angular-ui-slider": "^0.1.2",
  25. Index: main/app/config.js
  26. IDEA additional info:
  27. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  28. <+>UTF-8
  29. ===================================================================
  30. --- main/app/config.js (revision 59844a8bd21fdf853fea7b21c693297b18e28411)
  31. +++ main/app/config.js (date 1528970064000)
  32. @@ -18,7 +18,7 @@
  33. routes.initRoutes($urlRouterProvider, $stateProvider, CHECKOUT_STATES, CUSTOM_STATES);
  34. $sceProvider.enabled(true);
  35.  
  36. - localStorageServiceProvider.setStorageType('sessionStorage');
  37. + localStorageServiceProvider.setStorageType('localStorage');
  38.  
  39. $translateProvider
  40. .useStaticFilesLoader({
  41. Index: core/services/Customer.js
  42. IDEA additional info:
  43. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  44. <+>UTF-8
  45. ===================================================================
  46. --- core/services/Customer.js (revision 414587dcb03ec98627c8d6aa8d6c1d028f6310db)
  47. +++ core/services/Customer.js (date 1528973267000)
  48. @@ -6,8 +6,8 @@
  49. 'core/services/CheckoutService'
  50. ], function (module) {
  51.  
  52. - return module.factory('Customer', ['$q', '$rootScope', 'Notification', 'ModelFactory', 'LocalStorageService', 'jwtHelper', 'ShoppingCartService', 'CheckoutService', '$cookieStore',
  53. - function ($q, $rootScope, Notification, ModelFactory, LocalStorageService, jwtHelper, ShoppingCartService, CheckoutService, $cookieStore) {
  54. + return module.factory('Customer', ['$q', '$rootScope', 'Notification', 'ModelFactory', 'LocalStorageService', 'jwtHelper', 'ShoppingCartService', 'CheckoutService', '$cookies',
  55. + function ($q, $rootScope, Notification, ModelFactory, LocalStorageService, jwtHelper, ShoppingCartService, CheckoutService, $cookies) {
  56.  
  57. var _currentUser = LocalStorageService.read('_currentUser');
  58. if (!_currentUser) {
  59. @@ -282,10 +282,11 @@
  60. _currentUser = {};
  61. CheckoutService.setType('guest');
  62. LocalStorageService.remove("_token");
  63. - $cookieStore.remove('checkoutType');
  64. + $cookies.remove('checkoutType');
  65. LocalStorageService.remove('_currentUser');
  66. LocalStorageService.remove('_visitedStates');
  67. ShoppingCartService.loadCart();
  68. + $rootScope.$emit("UserLoggedOut");
  69. },
  70. register: function (user) {
  71. var ref = $q.defer();
  72. Index: core/directives/catalog/details/ProductDetails.js
  73. IDEA additional info:
  74. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  75. <+>UTF-8
  76. ===================================================================
  77. --- core/directives/catalog/details/ProductDetails.js (revision 414587dcb03ec98627c8d6aa8d6c1d028f6310db)
  78. +++ core/directives/catalog/details/ProductDetails.js (date 1528975403000)
  79. @@ -36,10 +36,6 @@
  80. controller: ['$rootScope', '$scope', '$window', '$location', '$state', '$sce', 'ShoppingCartService', 'TemplateService', 'FileUploadService', 'md5', 'ShopService', 'SessionValuesService', 'ProductService', 'Customer', 'Notification', 'ConfiguratorService', 'WishlistService',
  81. function ($rootScope, $scope, $window, $location, $state, $sce, ShoppingCartService, TemplateService, FileUploadService, md5, ShopService, SessionValuesService, ProductService, Customer, Notification, ConfiguratorService, WishlistService) {
  82.  
  83. - $rootScope.$on("UserLoggedIn", function () {
  84. - $window.location.reload();
  85. - });
  86. -
  87. $scope.showMoreDescription = false;
  88. $scope.fullDescription = $scope.productRoot.description;
  89. $scope.filterPages = [];
  90. @@ -86,6 +82,15 @@
  91.  
  92. $scope.isLoggedIn = Customer.isLoggedIn();
  93.  
  94. + $rootScope.$on("UserLoggedIn", function () {
  95. + $scope.isLoggedIn = Customer.isLoggedIn();
  96. +
  97. + if (!$scope.hideConfigurator)
  98. + ConfiguratorService.calculatePrice($scope.product.id, $scope.amount);
  99. + else
  100. + ConfiguratorService.calculatePriceNoPrint($scope.product.id, $scope.amount);
  101. + });
  102. +
  103. $scope.configurableProductChoosen = function () {
  104.  
  105. if($scope.productRoot.variants == undefined || $scope.productRoot.variants.length == 0) {
  106. Index: core/directives/priceTag/PriceTag.js
  107. IDEA additional info:
  108. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  109. <+>UTF-8
  110. ===================================================================
  111. --- core/directives/priceTag/PriceTag.js (revision 414587dcb03ec98627c8d6aa8d6c1d028f6310db)
  112. +++ core/directives/priceTag/PriceTag.js (date 1528973916000)
  113. @@ -23,7 +23,13 @@
  114. function ($scope, $location, $rootScope, Customer, ProductService) {
  115. $scope.isPriceOnRequest = ProductService.isPriceOnRequest;
  116.  
  117. - $scope.loggedIn = Customer.isLoggedIn();
  118. + $scope.updateLoggedIn = function() {
  119. + $scope.loggedIn = Customer.isLoggedIn();
  120. + };
  121. + $scope.updateLoggedIn();
  122. +
  123. + $rootScope.$on("UserLoggedIn", $scope.updateLoggedIn);
  124. + $rootScope.$on("UserLoggedOut", $scope.updateLoggedIn);
  125. }]
  126. }
  127. }
  128. Index: core/modules/checkout/controllers/CheckoutSuccessController.js
  129. IDEA additional info:
  130. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  131. <+>UTF-8
  132. ===================================================================
  133. --- core/modules/checkout/controllers/CheckoutSuccessController.js (revision 414587dcb03ec98627c8d6aa8d6c1d028f6310db)
  134. +++ core/modules/checkout/controllers/CheckoutSuccessController.js (date 1528969829000)
  135. @@ -9,8 +9,8 @@
  136. ],
  137. function (module, models) {
  138. 'use strict';
  139. - module.controller('CheckoutSuccessController', ['$rootScope', '$cookieStore', '$scope', '$state', 'StateFader', 'LocalStorageService', 'ModelFactory', 'ShoppingCartService', 'CheckoutService', 'SessionValuesService', 'Notification', '$window',
  140. - function ($rootScope, $cookieStore, $scope, $state, StateFader, LocalStorageService, ModelFactory, ShoppingCartService, CheckoutService, SessionValuesService, Notification, $window) {
  141. + module.controller('CheckoutSuccessController', ['$rootScope', '$cookies', '$scope', '$state', 'StateFader', 'LocalStorageService', 'ModelFactory', 'ShoppingCartService', 'CheckoutService', 'SessionValuesService', 'Notification', '$window',
  142. + function ($rootScope, $cookies, $scope, $state, StateFader, LocalStorageService, ModelFactory, ShoppingCartService, CheckoutService, SessionValuesService, Notification, $window) {
  143.  
  144. $scope.cleanLocalStorage = function () {
  145. if (CheckoutService.getType() === 'guest') {
  146. @@ -23,7 +23,7 @@
  147. LocalStorageService.remove('_payPalPlusApprovalURL');
  148. LocalStorageService.remove('_visitedStates');
  149. LocalStorageService.remove('_currentCheckoutState');
  150. - $cookieStore.remove('checkoutType');
  151. + $cookies.remove('checkoutType');
  152. };
  153.  
  154. var shoppingCart;
  155. Index: core/services/CheckoutService.js
  156. IDEA additional info:
  157. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  158. <+>UTF-8
  159. ===================================================================
  160. --- core/services/CheckoutService.js (revision 414587dcb03ec98627c8d6aa8d6c1d028f6310db)
  161. +++ core/services/CheckoutService.js (date 1528969829000)
  162. @@ -5,8 +5,8 @@
  163. 'core/services/Notification'
  164. ], function (module) {
  165.  
  166. - return module.factory('CheckoutService', ['$window', '$cookieStore', '$q', '$location', 'StateFader', 'SHOP_MAP', 'ModelFactory', 'LocalStorageService', 'CHECKOUT_STATES', 'Notification', '$rootScope', '$state', 'SessionValuesService', 'ShoppingCartService',
  167. - function ($window, $cookieStore, $q, $location, StateFader, SHOP_MAP, ModelFactory, LocalStorageService, CHECKOUT_STATES, Notification, $rootScope, $state, SessionValuesService, ShoppingCartService) {
  168. + return module.factory('CheckoutService', ['$window', '$cookies', '$q', '$location', 'StateFader', 'SHOP_MAP', 'ModelFactory', 'LocalStorageService', 'CHECKOUT_STATES', 'Notification', '$rootScope', '$state', 'SessionValuesService', 'ShoppingCartService',
  169. + function ($window, $cookies, $q, $location, StateFader, SHOP_MAP, ModelFactory, LocalStorageService, CHECKOUT_STATES, Notification, $rootScope, $state, SessionValuesService, ShoppingCartService) {
  170. var _availableCountries;
  171. var _availablePaymentMethods;
  172. var _availableShippingMethods;
  173. @@ -37,11 +37,11 @@
  174. };
  175.  
  176. var _setType = function (type) {
  177. - $cookieStore.put('checkoutType', type);
  178. + $cookies.put('checkoutType', type);
  179. };
  180.  
  181. var _getType = function () {
  182. - return $cookieStore.get('checkoutType');
  183. + return $cookies.get('checkoutType');
  184. };
  185.  
  186. var _goToNextStep = function (shoppingCart, customer) {
  187. @@ -117,10 +117,10 @@
  188. };
  189.  
  190. var _isGuestCheckout = function () {
  191. - if (!$cookieStore.get('checkoutType')) {
  192. + if (!$cookies.get('checkoutType')) {
  193. return false;
  194. }
  195. - return $cookieStore.get('checkoutType') === "guest";
  196. + return $cookies.get('checkoutType') === "guest";
  197. };
  198.  
  199. var _showPayPalPlusPaymentWall = function (approvalUrl, shoppingCart) {
  200. @@ -319,10 +319,10 @@
  201. return _isGuestCheckout();
  202. },
  203. setState: function (state) {
  204. - $cookieStore.put('checkoutState', state);
  205. + $cookies.put('checkoutState', state);
  206. },
  207. getState: function () {
  208. - return $cookieStore.get('checkoutState');
  209. + return $cookies.get('checkoutState');
  210. },
  211. goTo: function (state) {
  212. StateFader.go(state);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement