diff --git a/angular-schema-form-dynamic-select.js b/angular-schema-form-dynamic-select.js index bc0c93e..a20b40b 100644 --- a/angular-schema-form-dynamic-select.js +++ b/angular-schema-form-dynamic-select.js @@ -7,13 +7,13 @@ 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/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', - function (schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider) { + ['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider', 'sfBuilderProvider', + function (schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider, sfBuilderProvider) { var select = function (name, schema, options) { if ((schema.type === 'string') && ("enum" in schema)) { @@ -26,11 +26,28 @@ angular.module('schemaForm').config( }; schemaFormProvider.defaults.string.unshift(select); - + // Building up new angular schema for builders; + + var simpleTransclusion = sfBuilderProvider.builders.simpleTransclusion; + var ngModelOptions = sfBuilderProvider.builders.ngModelOptions; + var ngModel = sfBuilderProvider.builders.ngModel; + var sfField = sfBuilderProvider.builders.sfField; + var condition = sfBuilderProvider.builders.condition; + var array = sfBuilderProvider.builders.array; + var defaults = [sfField, ngModel, ngModelOptions, condition]; + //Add to the bootstrap directive - schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'strapselect', - 'directives/decorators/bootstrap/strap/strapselect.html'); - + /*schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'strapselect', + 'directives/decorators/bootstrap/strap/strapselect.html');*/ + + //Add to the bootstrap directive with non deprecated methods + schemaFormDecoratorsProvider.defineAddOn( + 'bootstrapDecorator', + 'strapselect', + 'directives/decorators/bootstrap/strap/strapselect.html', + defaults + ); + schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'strapmultiselect', 'directives/decorators/bootstrap/strap/strapmultiselect.html'); @@ -39,17 +56,24 @@ angular.module('schemaForm').config( schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'strapmultiselectdynamic', 'directives/decorators/bootstrap/strap/strapmultiselect.html'); - - + // UI SELECT //Add to the bootstrap directive - schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'uiselect', - 'directives/decorators/bootstrap/uiselect/uiselect.html'); - - + /*schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'uiselect', + 'directives/decorators/bootstrap/uiselect/uiselect.html');*/ + + //Add to the bootstrap directive with non deprecated methods + schemaFormDecoratorsProvider.defineAddOn( + 'bootstrapDecorator', + 'uiselect', + 'directives/decorators/bootstrap/uiselect/uiselect.html', + defaults + ); + schemaFormDecoratorsProvider.addMapping('bootstrapDecorator', 'uiselectmultiple', 'directives/decorators/bootstrap/uiselect/uiselectmultiple.html'); + }]) .directive("toggleSingleModel", function() {