diff --git a/angular-schema-form-dynamic-select.js b/angular-schema-form-dynamic-select.js index da99278..c989595 100644 --- a/angular-schema-form-dynamic-select.js +++ b/angular-schema-form-dynamic-select.js @@ -7,9 +7,9 @@ root.angularSchemaFormDynamicSelect = factory(root.schemaForm); } }(this, function(schemaForm) { -angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/strap/strapmultiselect.html","
\n \n\n
\n \n {{ (hasError() && errorMessage(schemaError())) || form.description}}\n
\n
\n"); -$templateCache.put("directives/decorators/bootstrap/strap/strapselect.html","
\n \n\n
\n \n \n {{ (hasError() && errorMessage(schemaError())) || form.description}} \n
\n
\n\n");}]); -angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/uiselect/uiselect.html","
\n \n\n
\n \n \n {{select_model.selected.name}}\n \n \n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\'))+ \'\'\">\n
\n
\n
\n \n \n {{select_model.selected.name}} \n {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}\n \n \n \n
\' + (item.name | highlight: $select.search) + \' \' + form.options.taggingLabel + \'
\'\">
\n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\')) + \'\'\">\n
\n \n \n\n \n\n \n \n {{select_model.selected.name}} \n {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}\n \n \n
\' + (item.name | highlight: $select.search) + \' \' + form.options.taggingLabel + \'
\'\">
\n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\')) + \'\'\">\n
\n \n \n\n \n\n \n\n
\n\n \n\n"); +angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/strap/strapmultiselect.html","
\n \n\n
\n \n {{ (hasError() && errorMessage(schemaError())) || form.description}}\n
\n
\n"); +$templateCache.put("directives/decorators/bootstrap/strap/strapselect.html","
\n \n\n
\n \n \n {{ (hasError() && errorMessage(schemaError())) || form.description}} \n
\n
\n\n");}]); +angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/uiselect/uiselect.html","
\n \n\n
\n \n \n {{select_model.selected.name}}\n \n \n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\'))+ \'\'\">\n
\n
\n
\n \n \n {{select_model.selected.name}} \n {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}\n \n \n \n
\' + (item.name | highlight: $select.search) + \' \' + form.options.taggingLabel + \'
\'\">
\n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\')) + \'\'\">\n
\n \n \n\n \n\n \n \n {{select_model.selected.name}} \n {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}\n \n \n
\' + (item.name | highlight: $select.search) + \' \' + form.options.taggingLabel + \'
\'\">
\n
\n
\n \' + (\'\'+item.description | highlight: (form.options.searchDescriptions===true ? $select.search : \'NOTSEARCHINGFORTHIS\')) + \'\'\">\n
\n \n \n\n \n\n \n\n
\n\n \n\n"); $templateCache.put("directives/decorators/bootstrap/uiselect/uiselectmultiple.html","\n
\n \n
\n \n {{$item.name}}\n \n
\n
\n
\n \n
\n
\n
\n");}]); angular.module('schemaForm').config( ['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider', diff --git a/angular-schema-form-dynamic-select.min.js b/angular-schema-form-dynamic-select.min.js index b6e3d33..e6ac3f9 100644 --- a/angular-schema-form-dynamic-select.min.js +++ b/angular-schema-form-dynamic-select.min.js @@ -1 +1 @@ -!function(e,t){"function"==typeof define&&define.amd?define(["angular-schema-form"],t):"object"==typeof exports?module.exports=t(require("angular-schema-form")):e.angularSchemaFormDynamicSelect=t(e.schemaForm)}(this,function(e){return angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/strap/strapmultiselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/strapselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/uiselect.html",'
{{select_model.selected.name}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
'),e.put("directives/decorators/bootstrap/strap/uiselectmultiple.html",'
{{$item.name}}
')}]),angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/strap/strapmultiselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/strapselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
')}]),angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/uiselect/uiselect.html",'
{{select_model.selected.name}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
'),e.put("directives/decorators/bootstrap/uiselect/uiselectmultiple.html",'
{{$item.name}}
')}]),angular.module("schemaForm").config(["schemaFormProvider","schemaFormDecoratorsProvider","sfPathProvider",function(e,t,o){var l=function(t,l,s){if("string"===l.type&&"enum"in l){var a=e.stdFormObj(t,l,s);return a.key=s.path,a.type="strapselect",s.lookup[o.stringify(s.path)]=a,a}};e.defaults.string.unshift(l),t.addMapping("bootstrapDecorator","strapselect","directives/decorators/bootstrap/strap/strapselect.html"),t.addMapping("bootstrapDecorator","strapmultiselect","directives/decorators/bootstrap/strap/strapmultiselect.html"),t.addMapping("bootstrapDecorator","strapselectdynamic","directives/decorators/bootstrap/strap/strapselect.html"),t.addMapping("bootstrapDecorator","strapmultiselectdynamic","directives/decorators/bootstrap/strap/strapmultiselect.html"),t.addMapping("bootstrapDecorator","uiselect","directives/decorators/bootstrap/uiselect/uiselect.html"),t.addMapping("bootstrapDecorator","uiselectmultiple","directives/decorators/bootstrap/uiselect/uiselectmultiple.html")}]).directive("toggleSingleModel",function(){return{require:"ngModel",restrict:"A",scope:{},replace:!0,controller:["$scope",function(e){e.$parent.$watch("select_model.selected",function(){void 0!=e.$parent.select_model.selected&&(e.$parent.insideModel=e.$parent.select_model.selected.value,e.$parent.ngModel.$setViewValue(e.$parent.select_model.selected.value))})}]}}).directive("multipleOn",function(){return{link:function(e,t,o){e.$watch(function(){return t.attr("multiple-on")},function(e){if("true"==e){var o=angular.element(t).scope().$$childTail;o.$isMultiple=!0,o.options.multiple=!0,o.$select.$element.addClass("select-multiple")}else angular.element(t).scope().$$childTail.$isMultiple=!1})}}}).filter("whereMulti",function(){return function(e,t,o){var l=[];return angular.isArray(o)&&void 0!==e?o.forEach(function(o){for(var s=0;s-1?o.splice(o.indexOf(e.value),1):o==e.value&&(console.log("Setting model of type "+t.localModelType+"to null."),o=null))}),"[object Array]"!=t.localModelType||o||(console.log("Resetting model of type "+t.localModelType+" to []."),t.$eval(l+"=[]")),console.log("----- Exiting filter for "+t.form.title+"-----"),s}}]),angularSchemaFormDynamicSelect}); \ No newline at end of file +!function(e,t){"function"==typeof define&&define.amd?define(["angular-schema-form"],t):"object"==typeof exports?module.exports=t(require("angular-schema-form")):e.angularSchemaFormDynamicSelect=t(e.schemaForm)}(this,function(e){return angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/strap/strapmultiselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/strapselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/uiselect.html",'
{{select_model.selected.name}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
'),e.put("directives/decorators/bootstrap/strap/uiselectmultiple.html",'
{{$item.name}}
')}]),angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/strap/strapmultiselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
'),e.put("directives/decorators/bootstrap/strap/strapselect.html",'
{{ (hasError() && errorMessage(schemaError())) || form.description}}
')}]),angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/uiselect/uiselect.html",'
{{select_model.selected.name}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
{{select_model.selected.name}}  {{(select_model.selected.isTag===true ? form.options.taggingLabel : \'\')}}
'),e.put("directives/decorators/bootstrap/uiselect/uiselectmultiple.html",'
{{$item.name}}
')}]),angular.module("schemaForm").config(["schemaFormProvider","schemaFormDecoratorsProvider","sfPathProvider",function(e,t,l){var o=function(t,o,a){if("string"===o.type&&"enum"in o){var s=e.stdFormObj(t,o,a);return s.key=a.path,s.type="strapselect",a.lookup[l.stringify(a.path)]=s,s}};e.defaults.string.unshift(o),t.addMapping("bootstrapDecorator","strapselect","directives/decorators/bootstrap/strap/strapselect.html"),t.addMapping("bootstrapDecorator","strapmultiselect","directives/decorators/bootstrap/strap/strapmultiselect.html"),t.addMapping("bootstrapDecorator","strapselectdynamic","directives/decorators/bootstrap/strap/strapselect.html"),t.addMapping("bootstrapDecorator","strapmultiselectdynamic","directives/decorators/bootstrap/strap/strapmultiselect.html"),t.addMapping("bootstrapDecorator","uiselect","directives/decorators/bootstrap/uiselect/uiselect.html"),t.addMapping("bootstrapDecorator","uiselectmultiple","directives/decorators/bootstrap/uiselect/uiselectmultiple.html")}]).directive("toggleSingleModel",function(){return{require:"ngModel",restrict:"A",scope:{},replace:!0,controller:["$scope",function(e){e.$parent.$watch("select_model.selected",function(){void 0!=e.$parent.select_model.selected&&(e.$parent.insideModel=e.$parent.select_model.selected.value,e.$parent.ngModel.$setViewValue(e.$parent.select_model.selected.value))})}]}}).directive("multipleOn",function(){return{link:function(e,t,l){e.$watch(function(){return t.attr("multiple-on")},function(e){if("true"==e){var l=angular.element(t).scope().$$childTail;l.$isMultiple=!0,l.options.multiple=!0,l.$select.$element.addClass("select-multiple")}else angular.element(t).scope().$$childTail.$isMultiple=!1})}}}).filter("whereMulti",function(){return function(e,t,l){var o=[];return angular.isArray(l)&&void 0!==e?l.forEach(function(l){for(var a=0;a-1?l.splice(l.indexOf(e.value),1):l==e.value&&(console.log("Setting model of type "+t.localModelType+"to null."),l=null))}),"[object Array]"!=t.localModelType||l||(console.log("Resetting model of type "+t.localModelType+" to []."),t.$eval(o+"=[]")),console.log("----- Exiting filter for "+t.form.title+"-----"),a}}]),angularSchemaFormDynamicSelect}); \ No newline at end of file diff --git a/src/uiselect.html b/src/uiselect.html index 135413b..089d845 100644 --- a/src/uiselect.html +++ b/src/uiselect.html @@ -8,6 +8,7 @@ ng-if="!(form.options.tagging||false)" theme="bootstrap" ng-disabled="form.disabled" on-select="$$value$$=$item.value" class="{{form.options.uiClass}}"> {{select_model.selected.name}}