Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im trying to configure a color picker as a macro parameter and can get it to work but its throwing errors in the console about validation "TypeError: can't access property "mandatory", $scope.model.validation is undefined"
"propertyEditors": [ { "name": "A Name", "alias": "SomeAlias", "editor": { "valueType": "JSON", "view": "views/propertyeditors/colorpicker/colorpicker.html" }, "icon": "icon-colorpicker", "isParameterEditor": true, "defaultConfig": { "multiple": false, "items": [ { "label": "section--gray", "value": "#f7f7f6" } ] } } ],
I added a regular color picker and debugged the controller this is how validation object look:
{ "mandatory": false, "mandatoryMessage": null, "pattern": null, "patternMessage": null }
I then added the above to editor validation like this:
"propertyEditors": [ { "name": "A Name", "alias": "SomeAlias", "editor": { "valueType": "JSON", "view": "views/propertyeditors/colorpicker/colorpicker.html", "validation": { "mandatory": false, "mandatoryMessage": null, "pattern": null, "patternMessage": null } }, "icon": "icon-colorpicker", "isParameterEditor": true, "defaultConfig": { "multiple": false, "items": [ { "label": "section--gray", "value": "#f7f7f6" } ] } } ],
however when i add this the color picker breaks and i get a regular textbox editor. (the color picker controller is never called)
I solved this by cloning the picker and modifying the source directly.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to configure color picker validators to work as a macro parameter (package.manifest)
Im trying to configure a color picker as a macro parameter and can get it to work but its throwing errors in the console about validation "TypeError: can't access property "mandatory", $scope.model.validation is undefined"
I added a regular color picker and debugged the controller this is how validation object look:
I then added the above to editor validation like this:
however when i add this the color picker breaks and i get a regular textbox editor. (the color picker controller is never called)
I solved this by cloning the picker and modifying the source directly.
is working on a reply...