diff --git a/angular/helpers/util.js b/angular/helpers/util.js index 6838d166..8009151d 100755 --- a/angular/helpers/util.js +++ b/angular/helpers/util.js @@ -6,16 +6,7 @@ module.exports = ['storage', 'config', 'common', '$window', '$rootScope', '$inte service.variant = {}; - // service.variant.hash = function (a, b) { - // if (!("ValueEn" in a) || a.ValueEn) return "[API Error]"; - // if (!('ValueEn' in b) || b.ValueEn) return (a.AttributeId + "-" + a.ValueEn.trim() + "-" + "null" + "-"); - // return (a.AttributeId + "-" + a.ValueEn.trim() + "-" + b.AttributeId + "-" + b.ValueEn.trim()); - // }; - service.variant.toString = function (a, b) { - // if (!("ValueEn" in a) || !a.ValueEn) return "[API Error]"; - // if (!('ValueEn' in b) || !b.ValueEn) return a.ValueEn.trim(); - var left = null; var right = null; left = (a.ValueEn || a.AttributeValueEn || a.AttributeValues.length && a.AttributeValues[0].AttributeValueEn || ''); @@ -25,12 +16,7 @@ module.exports = ['storage', 'config', 'common', '$window', '$rootScope', '$inte }; service.uniqueSet = function (a, prop) { - // var seen = new Set(); - // return a.filter(function (x) { - // var y = x; - // if (prop) y = x[prop]; - // return !seen.has(y) && seen.add(y); - // }) + return _.uniqWith(a, function(x,y){ if(x == y) return true; if(prop && _.get(x, prop) && _.get(y, prop)){ diff --git a/angular/template-options/addProductForm.js b/angular/template-options/addProductForm.js index c8d8c442..0c77a193 100644 --- a/angular/template-options/addProductForm.js +++ b/angular/template-options/addProductForm.js @@ -8,6 +8,11 @@ module.exports = { } } }, + MasterVariant_DescriptionFull: { + 'formGroupClass': 'margin-top-40', + 'labelClass': 'required', + 'inputSize': 'xxl' + }, MasterVariant_ProductNameTh: { 'labelClass': 'required', 'error': { diff --git a/angular/template.js b/angular/template.js index da32531b..a39ba8bd 100644 --- a/angular/template.js +++ b/angular/template.js @@ -1,6 +1,6 @@ /** * Generated by grunt-angular-templates - * Tue Mar 01 2016 16:37:38 GMT+0700 (SE Asia Standard Time) + * Tue Mar 01 2016 17:00:51 GMT+0700 (SE Asia Standard Time) */ module.exports = ["$templateCache", function($templateCache) { 'use strict'; diff --git a/public/assets/js/bundle.js b/public/assets/js/bundle.js index 5b05c009..e27950e6 100644 --- a/public/assets/js/bundle.js +++ b/public/assets/js/bundle.js @@ -5431,16 +5431,7 @@ module.exports = ['storage', 'config', 'common', '$window', '$rootScope', '$inte service.variant = {}; - // service.variant.hash = function (a, b) { - // if (!("ValueEn" in a) || a.ValueEn) return "[API Error]"; - // if (!('ValueEn' in b) || b.ValueEn) return (a.AttributeId + "-" + a.ValueEn.trim() + "-" + "null" + "-"); - // return (a.AttributeId + "-" + a.ValueEn.trim() + "-" + b.AttributeId + "-" + b.ValueEn.trim()); - // }; - service.variant.toString = function (a, b) { - // if (!("ValueEn" in a) || !a.ValueEn) return "[API Error]"; - // if (!('ValueEn' in b) || !b.ValueEn) return a.ValueEn.trim(); - var left = null; var right = null; left = (a.ValueEn || a.AttributeValueEn || a.AttributeValues.length && a.AttributeValues[0].AttributeValueEn || ''); @@ -5450,12 +5441,7 @@ module.exports = ['storage', 'config', 'common', '$window', '$rootScope', '$inte }; service.uniqueSet = function (a, prop) { - // var seen = new Set(); - // return a.filter(function (x) { - // var y = x; - // if (prop) y = x[prop]; - // return !seen.has(y) && seen.add(y); - // }) + return _.uniqWith(a, function(x,y){ if(x == y) return true; if(prop && _.get(x, prop) && _.get(y, prop)){ @@ -10595,6 +10581,11 @@ module.exports = { } } }, + MasterVariant_DescriptionFull: { + 'formGroupClass': 'margin-top-40', + 'labelClass': 'required', + 'inputSize': 'xxl' + }, MasterVariant_ProductNameTh: { 'labelClass': 'required', 'error': { @@ -10966,7 +10957,7 @@ module.exports = { },{}],148:[function(require,module,exports){ /** * Generated by grunt-angular-templates - * Tue Mar 01 2016 16:37:38 GMT+0700 (SE Asia Standard Time) + * Tue Mar 01 2016 17:00:51 GMT+0700 (SE Asia Standard Time) */ module.exports = ["$templateCache", function($templateCache) { 'use strict'; diff --git a/templates/partials/add-product-information.php b/templates/partials/add-product-information.php index d1bc9d5e..248069d0 100755 --- a/templates/partials/add-product-information.php +++ b/templates/partials/add-product-information.php @@ -123,19 +123,40 @@

Description

- insert('components/forms/ckeditor-with-label', - ["label" => "Description (English)", "ng_model" => "formData.MasterVariant.DescriptionFullEn", "size" => "xxl", "label_class" => "required"]) ?> + + +
+ +
- - insert('components/forms/ckeditor-with-label', ["label" => "Description (ไทย)", "ng_model" => "formData.MasterVariant.DescriptionFullTh", "size" => "xxl", "form_group_class" => "margin-top-40","label_class" => "required"]) ?> -
- -
+ + + +
+ +
+ + +
+ +