From adacedb496ee99e9d557dda8656a3b5e277d83ae Mon Sep 17 00:00:00 2001 From: Andrew Orlov Date: Fri, 5 Feb 2016 13:45:50 +0200 Subject: [PATCH 1/8] Angular UI Bootstrap error notifications --- .../Themes/default/assets/default.scss.liquid | 2 +- .../Themes/default/assets/storefrontApp.js | 6 +- .../App_Data/Themes/default/assets/toastr.css | 197 ------------------ .../default/layout/checkout_layout.liquid | 4 +- .../Themes/default/layout/theme.liquid | 8 +- .../default/snippets/notification.liquid | 22 +- .../Controllers/CartController.cs | 6 +- .../VirtoCommerce.Storefront.csproj | 1 - 8 files changed, 34 insertions(+), 212 deletions(-) delete mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid index 1f57d13eaba..684c9883350 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid @@ -3712,7 +3712,7 @@ html[xmlns] .slides { display: block; } background: $headerBackgroundTop; height: 30px; position: relative; - z-index: 999999; + z-index: 999998; } @include at-query ($max, $medium) { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js index fa388b2bbda..4b3a7e89f86 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js @@ -1,11 +1,11 @@ -var storefrontApp = angular.module('storefrontApp', ['ngRoute']); +var storefrontApp = angular.module('storefrontApp', ['ngRoute', 'ui.bootstrap']); storefrontApp.factory('httpErrorInterceptor', ['$q', '$rootScope', function ($q, $rootScope) { var httpErrorInterceptor = {}; httpErrorInterceptor.responseError = function (rejection) { $rootScope.$broadcast('storefrontError', { - type: 'error', + type: 'danger', title: rejection.data.message, message: rejection.data.stackTrace }); @@ -13,7 +13,7 @@ storefrontApp.factory('httpErrorInterceptor', ['$q', '$rootScope', function ($q, }; httpErrorInterceptor.requestError = function (rejection) { $rootScope.$broadcast('storefrontError', { - type: 'error', + type: 'danger', title: rejection.data.message, message: rejection.data.stackTrace }); diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css deleted file mode 100644 index f5135933c0e..00000000000 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css +++ /dev/null @@ -1,197 +0,0 @@ -.toast-title { - font-weight: bold; -} -.toast-message { - -ms-word-wrap: break-word; - word-wrap: break-word; -} -.toast-message a, -.toast-message label { - color: #ffffff; -} -.toast-message a:hover { - color: #cccccc; - text-decoration: none; -} -.toast-close-button { - position: relative; - right: -0.3em; - top: -0.3em; - float: right; - font-size: 20px; - font-weight: bold; - color: #ffffff; - -webkit-text-shadow: 0 1px 0 #ffffff; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.9; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); - filter: alpha(opacity=90); -} -.toast-close-button:hover, -.toast-close-button:focus { - color: #000000; - text-decoration: none; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); -} -/*Additional properties for button version - iOS requires the button element instead of an anchor tag. - If you want the anchor version, it requires `href="#"`.*/ -button.toast-close-button { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -.toast-top-center { - top: 0; - right: 0; - width: 100%; -} -.toast-bottom-center { - bottom: 0; - right: 0; - width: 100%; -} -.toast-top-full-width { - top: 0; - right: 0; - width: 100%; -} -.toast-bottom-full-width { - bottom: 0; - right: 0; - width: 100%; -} -.toast-top-left { - top: 12px; - left: 12px; -} -.toast-top-right { - top: 12px; - right: 12px; -} -.toast-bottom-right { - right: 12px; - bottom: 12px; -} -.toast-bottom-left { - bottom: 12px; - left: 12px; -} -#toast-container { - position: fixed; - z-index: 999999; - pointer-events: none; - /*overrides*/ -} -#toast-container * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -#toast-container > div { - position: relative; - pointer-events: auto; - overflow: hidden; - margin: 0 0 6px; - padding: 15px 15px 15px 50px; - width: 300px; - -moz-border-radius: 3px 3px 3px 3px; - -webkit-border-radius: 3px 3px 3px 3px; - border-radius: 3px 3px 3px 3px; - background-position: 15px 20px; - background-repeat: no-repeat; - -moz-box-shadow: 0 0 12px #000000; - -webkit-box-shadow: 0 0 12px #000000; - box-shadow: 0 0 12px #000000; color: #ffffff; - opacity: 0.9; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); - filter: alpha(opacity=90); -} -#toast-container > :hover { - -moz-box-shadow: 0 0 12px #000000; - -webkit-box-shadow: 0 0 12px #000000; - box-shadow: 0 0 12px #000000; - opacity: 1; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - filter: alpha(opacity=100); -} -#toast-container > .toast-info { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; -} -#toast-container > .toast-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; -} -#toast-container > .toast-success { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; -} -#toast-container > .toast-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; -} -#toast-container.toast-top-center > div, -#toast-container.toast-bottom-center > div { - width: 300px; - margin-left: auto; - margin-right: auto; -} -#toast-container.toast-top-full-width > div, -#toast-container.toast-bottom-full-width > div { - width: 96%; - margin-left: auto; - margin-right: auto; -} -.toast { - background-color: #030303; -} -.toast-success { - background-color: #51a351; -} -.toast-error { - background-color: #bd362f; -} -.toast-info { - background-color: #2f96b4; -} -.toast-warning { - background-color: #f89406; -} -.toast-progress { - position: absolute; - left: 0; - bottom: 0; - height: 4px; - background-color: #000000; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); -} -/*Responsive Design*/ -@media all and (max-width: 240px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 11em; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } -} -@media all and (min-width: 241px) and (max-width: 480px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 18em; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } -} -@media all and (min-width: 481px) and (max-width: 768px) { - #toast-container > div { - padding: 15px 15px 15px 50px; - width: 25em; - } -} \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid index 72c3d8d7dd0..f38e582158e 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid @@ -8,9 +8,8 @@ {{ shop.name }} - {{ 'checkout.title' | t }} {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css' | stylesheet_tag }} + {{ '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' | stylesheet_tag }} {{ 'checkout.css' | global_asset_url | stylesheet_tag }} - - {{ 'toastr.css' | asset_url | stylesheet_tag }} @@ -18,6 +17,7 @@ {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-route.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-sanitize.min.js' | script_tag }} + {{ '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.min.js' | script_tag }} {{ 'storefrontApp.js' | global_asset_url | script_tag }} {{ 'storefrontServices.js' | global_asset_url | script_tag }} {{ 'storefrontDirectives.js' | global_asset_url | script_tag }} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid index 1482da40bdb..7f970ae4b47 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid @@ -26,11 +26,11 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css' | stylesheet_tag }} {{ 'ajaxify.scss.css' | asset_url | stylesheet_tag }} {{ 'default.scss.css' | asset_url | stylesheet_tag }} + {{ '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' | stylesheet_tag }} {{ 'storefront.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider-default-theme.css' | asset_url | stylesheet_tag }} - - {{ 'toastr.css' | asset_url | stylesheet_tag }} + {% include 'google-fonts' %} {{ content_for_header }} @@ -44,6 +44,7 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-route.min.js' | script_tag }} + {{ '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.min.js' | script_tag }} {{ 'storefrontApp.js' | asset_url | script_tag }} {{ 'storefrontServices.js' | asset_url | script_tag }} {{ 'storefrontDirectives.js' | asset_url | script_tag }} @@ -58,6 +59,7 @@ {{ 'customer_area.js' | shopify_asset_url | script_tag }} + {% include 'notification' %} {% if settings.store_selector_enable %} {% include 'top-header-selector' %} @@ -164,8 +166,6 @@ {% include 'quote-modal' %} {% endif %} - - {% include 'notification' %} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid index dc3707a5c9f..a02ddc9e1e5 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid @@ -1,4 +1,21 @@ -
+ + + + +

+
+ +{% comment %} +
{{ 'notification.error_title' | t }}
@@ -10,4 +27,5 @@
-
\ No newline at end of file +
+{% endcomment %} \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs b/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs index b0c33e75eca..b432aa57c5e 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs +++ b/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs @@ -60,9 +60,11 @@ public async Task CartJson() EnsureThatCartExist(); await _cartBuilder.EvaluatePromotionsAsync(); - await _cartValidator.ValidateAsync(_cartBuilder.Cart); - return Json(_cartBuilder.Cart, JsonRequestBehavior.AllowGet); + throw new Exception("Test"); + //await _cartValidator.ValidateAsync(_cartBuilder.Cart); + + //return Json(_cartBuilder.Cart, JsonRequestBehavior.AllowGet); } // POST: /cart/additem?id=...&quantity=... diff --git a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj index 148e3ddefaa..7d86efdd231 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj +++ b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj @@ -313,7 +313,6 @@ - From 0725bfbccbbe26e058ba8c037a94bab3678bf83c Mon Sep 17 00:00:00 2001 From: Andrew Orlov Date: Fri, 5 Feb 2016 13:46:30 +0200 Subject: [PATCH 2/8] Removed test exception --- .../VirtoCommerce.Storefront/Controllers/CartController.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs b/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs index b432aa57c5e..b0c33e75eca 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs +++ b/STOREFRONT/VirtoCommerce.Storefront/Controllers/CartController.cs @@ -60,11 +60,9 @@ public async Task CartJson() EnsureThatCartExist(); await _cartBuilder.EvaluatePromotionsAsync(); + await _cartValidator.ValidateAsync(_cartBuilder.Cart); - throw new Exception("Test"); - //await _cartValidator.ValidateAsync(_cartBuilder.Cart); - - //return Json(_cartBuilder.Cart, JsonRequestBehavior.AllowGet); + return Json(_cartBuilder.Cart, JsonRequestBehavior.AllowGet); } // POST: /cart/additem?id=...&quantity=... From 424d25fbee0675b6760acb1cc5510156d51c4954 Mon Sep 17 00:00:00 2001 From: build Date: Fri, 5 Feb 2016 11:48:36 +0000 Subject: [PATCH 3/8] Updated version number --- PLATFORM/GlobalAssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PLATFORM/GlobalAssemblyInfo.cs b/PLATFORM/GlobalAssemblyInfo.cs index c7e89bdf5b3..f2825d2b68f 100644 --- a/PLATFORM/GlobalAssemblyInfo.cs +++ b/PLATFORM/GlobalAssemblyInfo.cs @@ -11,7 +11,7 @@ [assembly: AssemblyCompany("VirtoCommerce")] [assembly: AssemblyProduct("Virto Commerce 2.7")] [assembly: AssemblyCopyright("Copyright © VirtoCommerce 2011-2016")] -[assembly: AssemblyFileVersion("2.7.1212.0")] +[assembly: AssemblyFileVersion("2.7.1213.0")] [assembly: AssemblyVersion("2.7.0.0")] [assembly: AssemblyInformationalVersion("2.7")] From f4f671b0c9ee520ea49e6b1ab1c269c76df1cf70 Mon Sep 17 00:00:00 2001 From: Andrew Orlov Date: Fri, 5 Feb 2016 15:57:36 +0200 Subject: [PATCH 4/8] Angular UI Bootstrap recently added product to cart modal (first approach) --- .../assets/storefrontProductController.js | 14 +++++- ...ntRecentlyAddedCartItemDialogController.js | 13 ++++++ .../default/assets/storefrontServices.js | 16 +++++++ .../default/layout/checkout_layout.liquid | 1 - .../Themes/default/layout/theme.liquid | 4 +- .../recently-added-cart-item-dialog.liquid | 44 +++++++++++++++++++ .../Themes/default/templates/product.liquid | 2 +- .../VirtoCommerce.Storefront.csproj | 2 + 8 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js create mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js index 48a3f3344a1..c3eaa300f7b 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js @@ -1,6 +1,6 @@ var storefrontApp = angular.module('storefrontApp'); -storefrontApp.controller('productController', ['$scope', '$window', 'catalogService', function ($scope, $window, catalogService) { +storefrontApp.controller('productController', ['$scope', '$window', 'dialogService', 'catalogService', 'cartService', function ($scope, $window, dialogService, catalogService, cartService) { //TODO: prevent add to cart not selected variation // display validator please select property // display price range @@ -11,6 +11,18 @@ storefrontApp.controller('productController', ['$scope', '$window', 'catalogServ $scope.productPrice = null; $scope.productPriceLoaded = false; + $scope.addProductToCart = function (product, quantity) { + var dialogData = { + ImageUrl: product.PrimaryImage.Url, + ListPrice: product.Price.ListPrice, + Name: product.Name, + PlacedPrice: product.Price.ActualPrice, + Quantity: quantity + }; + dialogService.showDialog(dialogData, 'recentlyAddedCartItemDialogController', 'storefront.recently-added-cart-item-dialog.tpl'); + cartService.addLineItem(product.Id, quantity); + } + function Initialize() { var productId = $window.products[0].id; catalogService.getProduct(productId).then(function (response) { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js new file mode 100644 index 00000000000..d29ef00bfea --- /dev/null +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js @@ -0,0 +1,13 @@ +var storefrontApp = angular.module('storefrontApp'); + +storefrontApp.controller('recentlyAddedCartItemDialogController', ['$scope', '$window', '$uibModalInstance', 'dialogData', function ($scope, $window, $uibModalInstance, dialogData) { + $scope.dialogData = dialogData; + + $scope.close = function () { + $uibModalInstance.close(); + } + + $scope.redirect = function (url) { + $window.location = url; + } +}]); \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js index 3edfc2336bf..d90886a1bb7 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js @@ -1,5 +1,21 @@ var storefrontApp = angular.module('storefrontApp'); +storefrontApp.service('dialogService', ['$uibModal', function ($uibModal) { + return { + showDialog: function (dialogData, controller, templateUrl) { + var modalInstance = $uibModal.open({ + controller: controller, + templateUrl: templateUrl, + resolve: { + dialogData: function () { + return dialogData; + } + } + }); + } + } +}]); + storefrontApp.service('customerService', ['$http', function ($http) { return { getCurrentCustomer: function () { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid index f38e582158e..bb74b8e41e4 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid @@ -8,7 +8,6 @@ {{ shop.name }} - {{ 'checkout.title' | t }} {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css' | stylesheet_tag }} - {{ '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' | stylesheet_tag }} {{ 'checkout.css' | global_asset_url | stylesheet_tag }} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid index 7f970ae4b47..89d837f7333 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid @@ -26,7 +26,6 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css' | stylesheet_tag }} {{ 'ajaxify.scss.css' | asset_url | stylesheet_tag }} {{ 'default.scss.css' | asset_url | stylesheet_tag }} - {{ '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' | stylesheet_tag }} {{ 'storefront.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider-default-theme.css' | asset_url | stylesheet_tag }} @@ -47,6 +46,7 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.min.js' | script_tag }} {{ 'storefrontApp.js' | asset_url | script_tag }} {{ 'storefrontServices.js' | asset_url | script_tag }} + {{ 'storefrontRecentlyAddedCartItemDialogController.js' | asset_url | script_tag }} {{ 'storefrontDirectives.js' | asset_url | script_tag }} {{ 'storefrontMainController.js' | asset_url | script_tag }} {{ 'storefrontCartController.js' | asset_url | script_tag }} @@ -60,6 +60,7 @@ {% include 'notification' %} + {% include 'recently-added-cart-item-dialog' %} {% if settings.store_selector_enable %} {% include 'top-header-selector' %} @@ -161,7 +162,6 @@ {{ content_for_layout }} {% include 'footer' %} - {% include 'cart-modal' %} {% if shop.quotes_enabled %} {% include 'quote-modal' %} {% endif %} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid new file mode 100644 index 00000000000..172e3af5c58 --- /dev/null +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid index 9da042f6b3d..d1cad8a55a5 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid @@ -101,7 +101,7 @@ {% endif %} - diff --git a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj index 7d86efdd231..406f4c797a0 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj +++ b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj @@ -302,6 +302,7 @@ + @@ -421,6 +422,7 @@ + Designer From bc60c4bcb8e380bd2a091f63b7933066396a5468 Mon Sep 17 00:00:00 2001 From: build Date: Fri, 5 Feb 2016 14:00:23 +0000 Subject: [PATCH 5/8] Updated version number --- PLATFORM/GlobalAssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PLATFORM/GlobalAssemblyInfo.cs b/PLATFORM/GlobalAssemblyInfo.cs index f2825d2b68f..d26e69ca753 100644 --- a/PLATFORM/GlobalAssemblyInfo.cs +++ b/PLATFORM/GlobalAssemblyInfo.cs @@ -11,7 +11,7 @@ [assembly: AssemblyCompany("VirtoCommerce")] [assembly: AssemblyProduct("Virto Commerce 2.7")] [assembly: AssemblyCopyright("Copyright © VirtoCommerce 2011-2016")] -[assembly: AssemblyFileVersion("2.7.1213.0")] +[assembly: AssemblyFileVersion("2.7.1214.0")] [assembly: AssemblyVersion("2.7.0.0")] [assembly: AssemblyInformationalVersion("2.7")] From 8ce707a63ff25d7561c43ef0b0baa9029a4b230a Mon Sep 17 00:00:00 2001 From: Woland2k Date: Fri, 5 Feb 2016 14:55:32 -0800 Subject: [PATCH 6/8] Fix #284 --- .../Scripts/blades/themes/edit-asset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Scripts/blades/themes/edit-asset.js b/PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Scripts/blades/themes/edit-asset.js index 0f05f586d35..aeacbff242d 100644 --- a/PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Scripts/blades/themes/edit-asset.js +++ b/PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Scripts/blades/themes/edit-asset.js @@ -54,7 +54,7 @@ name: "platform.commands.save", icon: 'fa fa-save', executeMethod: $scope.saveChanges, canExecuteMethod: function () { - return isDirty() && formScope.$valid; + return isDirty(); }, permission: 'content:update' }, From 7ed026d6ecad7089490271299308a159726913af Mon Sep 17 00:00:00 2001 From: build Date: Fri, 5 Feb 2016 22:58:11 +0000 Subject: [PATCH 7/8] Updated version number --- PLATFORM/GlobalAssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PLATFORM/GlobalAssemblyInfo.cs b/PLATFORM/GlobalAssemblyInfo.cs index d26e69ca753..ce1a8b0f8bc 100644 --- a/PLATFORM/GlobalAssemblyInfo.cs +++ b/PLATFORM/GlobalAssemblyInfo.cs @@ -11,7 +11,7 @@ [assembly: AssemblyCompany("VirtoCommerce")] [assembly: AssemblyProduct("Virto Commerce 2.7")] [assembly: AssemblyCopyright("Copyright © VirtoCommerce 2011-2016")] -[assembly: AssemblyFileVersion("2.7.1214.0")] +[assembly: AssemblyFileVersion("2.7.1215.0")] [assembly: AssemblyVersion("2.7.0.0")] [assembly: AssemblyInformationalVersion("2.7")] From fc42b14649db55fdf4c8a38479f31e09ccb581d9 Mon Sep 17 00:00:00 2001 From: artem-dudarev Date: Mon, 8 Feb 2016 10:22:37 +0200 Subject: [PATCH 8/8] Reverted Angular UI Bootstrap --- .../Themes/default/assets/default.scss.liquid | 2 +- .../Themes/default/assets/storefrontApp.js | 6 +- .../assets/storefrontProductController.js | 14 +- ...ntRecentlyAddedCartItemDialogController.js | 13 -- .../default/assets/storefrontServices.js | 16 -- .../App_Data/Themes/default/assets/toastr.css | 197 ++++++++++++++++++ .../default/layout/checkout_layout.liquid | 3 +- .../Themes/default/layout/theme.liquid | 10 +- .../default/snippets/notification.liquid | 22 +- .../recently-added-cart-item-dialog.liquid | 44 ---- .../Themes/default/templates/product.liquid | 2 +- .../VirtoCommerce.Storefront.csproj | 3 +- 12 files changed, 213 insertions(+), 119 deletions(-) delete mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js create mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css delete mode 100644 STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid index 684c9883350..1f57d13eaba 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/default.scss.liquid @@ -3712,7 +3712,7 @@ html[xmlns] .slides { display: block; } background: $headerBackgroundTop; height: 30px; position: relative; - z-index: 999998; + z-index: 999999; } @include at-query ($max, $medium) { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js index 4b3a7e89f86..fa388b2bbda 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontApp.js @@ -1,11 +1,11 @@ -var storefrontApp = angular.module('storefrontApp', ['ngRoute', 'ui.bootstrap']); +var storefrontApp = angular.module('storefrontApp', ['ngRoute']); storefrontApp.factory('httpErrorInterceptor', ['$q', '$rootScope', function ($q, $rootScope) { var httpErrorInterceptor = {}; httpErrorInterceptor.responseError = function (rejection) { $rootScope.$broadcast('storefrontError', { - type: 'danger', + type: 'error', title: rejection.data.message, message: rejection.data.stackTrace }); @@ -13,7 +13,7 @@ storefrontApp.factory('httpErrorInterceptor', ['$q', '$rootScope', function ($q, }; httpErrorInterceptor.requestError = function (rejection) { $rootScope.$broadcast('storefrontError', { - type: 'danger', + type: 'error', title: rejection.data.message, message: rejection.data.stackTrace }); diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js index c3eaa300f7b..48a3f3344a1 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontProductController.js @@ -1,6 +1,6 @@ var storefrontApp = angular.module('storefrontApp'); -storefrontApp.controller('productController', ['$scope', '$window', 'dialogService', 'catalogService', 'cartService', function ($scope, $window, dialogService, catalogService, cartService) { +storefrontApp.controller('productController', ['$scope', '$window', 'catalogService', function ($scope, $window, catalogService) { //TODO: prevent add to cart not selected variation // display validator please select property // display price range @@ -11,18 +11,6 @@ storefrontApp.controller('productController', ['$scope', '$window', 'dialogServi $scope.productPrice = null; $scope.productPriceLoaded = false; - $scope.addProductToCart = function (product, quantity) { - var dialogData = { - ImageUrl: product.PrimaryImage.Url, - ListPrice: product.Price.ListPrice, - Name: product.Name, - PlacedPrice: product.Price.ActualPrice, - Quantity: quantity - }; - dialogService.showDialog(dialogData, 'recentlyAddedCartItemDialogController', 'storefront.recently-added-cart-item-dialog.tpl'); - cartService.addLineItem(product.Id, quantity); - } - function Initialize() { var productId = $window.products[0].id; catalogService.getProduct(productId).then(function (response) { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js deleted file mode 100644 index d29ef00bfea..00000000000 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontRecentlyAddedCartItemDialogController.js +++ /dev/null @@ -1,13 +0,0 @@ -var storefrontApp = angular.module('storefrontApp'); - -storefrontApp.controller('recentlyAddedCartItemDialogController', ['$scope', '$window', '$uibModalInstance', 'dialogData', function ($scope, $window, $uibModalInstance, dialogData) { - $scope.dialogData = dialogData; - - $scope.close = function () { - $uibModalInstance.close(); - } - - $scope.redirect = function (url) { - $window.location = url; - } -}]); \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js index d90886a1bb7..3edfc2336bf 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/storefrontServices.js @@ -1,21 +1,5 @@ var storefrontApp = angular.module('storefrontApp'); -storefrontApp.service('dialogService', ['$uibModal', function ($uibModal) { - return { - showDialog: function (dialogData, controller, templateUrl) { - var modalInstance = $uibModal.open({ - controller: controller, - templateUrl: templateUrl, - resolve: { - dialogData: function () { - return dialogData; - } - } - }); - } - } -}]); - storefrontApp.service('customerService', ['$http', function ($http) { return { getCurrentCustomer: function () { diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css new file mode 100644 index 00000000000..f5135933c0e --- /dev/null +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/assets/toastr.css @@ -0,0 +1,197 @@ +.toast-title { + font-weight: bold; +} +.toast-message { + -ms-word-wrap: break-word; + word-wrap: break-word; +} +.toast-message a, +.toast-message label { + color: #ffffff; +} +.toast-message a:hover { + color: #cccccc; + text-decoration: none; +} +.toast-close-button { + position: relative; + right: -0.3em; + top: -0.3em; + float: right; + font-size: 20px; + font-weight: bold; + color: #ffffff; + -webkit-text-shadow: 0 1px 0 #ffffff; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.9; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); + filter: alpha(opacity=90); +} +.toast-close-button:hover, +.toast-close-button:focus { + color: #000000; + text-decoration: none; + opacity: 0.4; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: alpha(opacity=40); +} +/*Additional properties for button version + iOS requires the button element instead of an anchor tag. + If you want the anchor version, it requires `href="#"`.*/ +button.toast-close-button { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.toast-top-center { + top: 0; + right: 0; + width: 100%; +} +.toast-bottom-center { + bottom: 0; + right: 0; + width: 100%; +} +.toast-top-full-width { + top: 0; + right: 0; + width: 100%; +} +.toast-bottom-full-width { + bottom: 0; + right: 0; + width: 100%; +} +.toast-top-left { + top: 12px; + left: 12px; +} +.toast-top-right { + top: 12px; + right: 12px; +} +.toast-bottom-right { + right: 12px; + bottom: 12px; +} +.toast-bottom-left { + bottom: 12px; + left: 12px; +} +#toast-container { + position: fixed; + z-index: 999999; + pointer-events: none; + /*overrides*/ +} +#toast-container * { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +#toast-container > div { + position: relative; + pointer-events: auto; + overflow: hidden; + margin: 0 0 6px; + padding: 15px 15px 15px 50px; + width: 300px; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; + background-position: 15px 20px; + background-repeat: no-repeat; + -moz-box-shadow: 0 0 12px #000000; + -webkit-box-shadow: 0 0 12px #000000; + box-shadow: 0 0 12px #000000; color: #ffffff; + opacity: 0.9; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); + filter: alpha(opacity=90); +} +#toast-container > :hover { + -moz-box-shadow: 0 0 12px #000000; + -webkit-box-shadow: 0 0 12px #000000; + box-shadow: 0 0 12px #000000; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + filter: alpha(opacity=100); +} +#toast-container > .toast-info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; +} +#toast-container > .toast-error { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; +} +#toast-container > .toast-success { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; +} +#toast-container > .toast-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; +} +#toast-container.toast-top-center > div, +#toast-container.toast-bottom-center > div { + width: 300px; + margin-left: auto; + margin-right: auto; +} +#toast-container.toast-top-full-width > div, +#toast-container.toast-bottom-full-width > div { + width: 96%; + margin-left: auto; + margin-right: auto; +} +.toast { + background-color: #030303; +} +.toast-success { + background-color: #51a351; +} +.toast-error { + background-color: #bd362f; +} +.toast-info { + background-color: #2f96b4; +} +.toast-warning { + background-color: #f89406; +} +.toast-progress { + position: absolute; + left: 0; + bottom: 0; + height: 4px; + background-color: #000000; + opacity: 0.4; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: alpha(opacity=40); +} +/*Responsive Design*/ +@media all and (max-width: 240px) { + #toast-container > div { + padding: 8px 8px 8px 50px; + width: 11em; + } + #toast-container .toast-close-button { + right: -0.2em; + top: -0.2em; + } +} +@media all and (min-width: 241px) and (max-width: 480px) { + #toast-container > div { + padding: 8px 8px 8px 50px; + width: 18em; + } + #toast-container .toast-close-button { + right: -0.2em; + top: -0.2em; + } +} +@media all and (min-width: 481px) and (max-width: 768px) { + #toast-container > div { + padding: 15px 15px 15px 50px; + width: 25em; + } +} \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid index bb74b8e41e4..72c3d8d7dd0 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/checkout_layout.liquid @@ -9,6 +9,8 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css' | stylesheet_tag }} {{ 'checkout.css' | global_asset_url | stylesheet_tag }} + + {{ 'toastr.css' | asset_url | stylesheet_tag }} @@ -16,7 +18,6 @@ {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-route.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-sanitize.min.js' | script_tag }} - {{ '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.min.js' | script_tag }} {{ 'storefrontApp.js' | global_asset_url | script_tag }} {{ 'storefrontServices.js' | global_asset_url | script_tag }} {{ 'storefrontDirectives.js' | global_asset_url | script_tag }} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid index 89d837f7333..1482da40bdb 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/layout/theme.liquid @@ -29,7 +29,8 @@ {{ 'storefront.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider.css' | asset_url | stylesheet_tag }} {{ 'ideal-image-slider-default-theme.css' | asset_url | stylesheet_tag }} - + + {{ 'toastr.css' | asset_url | stylesheet_tag }} {% include 'google-fonts' %} {{ content_for_header }} @@ -43,10 +44,8 @@ {{ '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js' | script_tag }} {{ '//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-route.min.js' | script_tag }} - {{ '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.min.js' | script_tag }} {{ 'storefrontApp.js' | asset_url | script_tag }} {{ 'storefrontServices.js' | asset_url | script_tag }} - {{ 'storefrontRecentlyAddedCartItemDialogController.js' | asset_url | script_tag }} {{ 'storefrontDirectives.js' | asset_url | script_tag }} {{ 'storefrontMainController.js' | asset_url | script_tag }} {{ 'storefrontCartController.js' | asset_url | script_tag }} @@ -59,8 +58,6 @@ {{ 'customer_area.js' | shopify_asset_url | script_tag }} - {% include 'notification' %} - {% include 'recently-added-cart-item-dialog' %} {% if settings.store_selector_enable %} {% include 'top-header-selector' %} @@ -162,10 +159,13 @@ {{ content_for_layout }} {% include 'footer' %} + {% include 'cart-modal' %} {% if shop.quotes_enabled %} {% include 'quote-modal' %} {% endif %} + + {% include 'notification' %} diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid index a02ddc9e1e5..dc3707a5c9f 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/notification.liquid @@ -1,21 +1,4 @@ - - - - -

-
- -{% comment %} -
+
{{ 'notification.error_title' | t }}
@@ -27,5 +10,4 @@
-
-{% endcomment %} \ No newline at end of file +
\ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid deleted file mode 100644 index 172e3af5c58..00000000000 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/snippets/recently-added-cart-item-dialog.liquid +++ /dev/null @@ -1,44 +0,0 @@ - \ No newline at end of file diff --git a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid index d1cad8a55a5..9da042f6b3d 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid +++ b/STOREFRONT/VirtoCommerce.Storefront/App_Data/Themes/default/templates/product.liquid @@ -101,7 +101,7 @@ {% endif %} - diff --git a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj index 406f4c797a0..148e3ddefaa 100644 --- a/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj +++ b/STOREFRONT/VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj @@ -302,7 +302,6 @@ - @@ -314,6 +313,7 @@ + @@ -422,7 +422,6 @@
- Designer