diff --git a/dist/bootstrap-decorator.js b/dist/bootstrap-decorator.js new file mode 100644 index 000000000..eabcc2c56 --- /dev/null +++ b/dist/bootstrap-decorator.js @@ -0,0 +1,90 @@ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(['schemaForm'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('schemaForm')); + } else { + root.bootstrapDecorator = factory(root.schemaForm); + } +}(this, function(schemaForm) { +angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/actions-trcl.html","
"); +$templateCache.put("directives/decorators/bootstrap/actions.html","
"); +$templateCache.put("directives/decorators/bootstrap/array.html","
"); +$templateCache.put("directives/decorators/bootstrap/checkbox.html","
"); +$templateCache.put("directives/decorators/bootstrap/checkboxes.html","
"); +$templateCache.put("directives/decorators/bootstrap/default.html","
{{ hasSuccess() ? \'(success)\' : \'(error)\' }}
"); +$templateCache.put("directives/decorators/bootstrap/fieldset-trcl.html","
{{ form.title }}
"); +$templateCache.put("directives/decorators/bootstrap/fieldset.html","
{{ form.title }}
"); +$templateCache.put("directives/decorators/bootstrap/help.html","
"); +$templateCache.put("directives/decorators/bootstrap/radio-buttons.html","
"); +$templateCache.put("directives/decorators/bootstrap/radios-inline.html","
"); +$templateCache.put("directives/decorators/bootstrap/radios.html","
"); +$templateCache.put("directives/decorators/bootstrap/section.html","
"); +$templateCache.put("directives/decorators/bootstrap/select.html","
"); +$templateCache.put("directives/decorators/bootstrap/submit.html","
"); +$templateCache.put("directives/decorators/bootstrap/tabarray.html","
"); +$templateCache.put("directives/decorators/bootstrap/tabs.html","
"); +$templateCache.put("directives/decorators/bootstrap/textarea.html","
");}]); +angular.module('schemaForm').config(['schemaFormDecoratorsProvider', function(decoratorsProvider) { + var base = 'directives/decorators/bootstrap/'; + + decoratorsProvider.defineDecorator('bootstrapDecorator', { + textarea: {template: base + 'textarea.html', replace: false}, + fieldset: {template: base + 'fieldset.html', replace: false}, + /*fieldset: {template: base + 'fieldset.html', replace: true, builder: function(args) { + var children = args.build(args.form.items, args.path + '.items'); + console.log('fieldset children frag', children.childNodes) + args.fieldFrag.childNode.appendChild(children); + }},*/ + array: {template: base + 'array.html', replace: false}, + tabarray: {template: base + 'tabarray.html', replace: false}, + tabs: {template: base + 'tabs.html', replace: false}, + section: {template: base + 'section.html', replace: false}, + conditional: {template: base + 'section.html', replace: false}, + actions: {template: base + 'actions.html', replace: false}, + select: {template: base + 'select.html', replace: false}, + checkbox: {template: base + 'checkbox.html', replace: false}, + checkboxes: {template: base + 'checkboxes.html', replace: false}, + number: {template: base + 'default.html', replace: false}, + password: {template: base + 'default.html', replace: false}, + submit: {template: base + 'submit.html', replace: false}, + button: {template: base + 'submit.html', replace: false}, + radios: {template: base + 'radios.html', replace: false}, + 'radios-inline': {template: base + 'radios-inline.html', replace: false}, + radiobuttons: {template: base + 'radio-buttons.html', replace: false}, + help: {template: base + 'help.html', replace: false}, + 'default': {template: base + 'default.html', replace: false} + }, []); + + //manual use directives + decoratorsProvider.createDirectives({ + textarea: base + 'textarea.html', + select: base + 'select.html', + checkbox: base + 'checkbox.html', + checkboxes: base + 'checkboxes.html', + number: base + 'default.html', + submit: base + 'submit.html', + button: base + 'submit.html', + text: base + 'default.html', + date: base + 'default.html', + password: base + 'default.html', + datepicker: base + 'datepicker.html', + input: base + 'default.html', + radios: base + 'radios.html', + 'radios-inline': base + 'radios-inline.html', + radiobuttons: base + 'radio-buttons.html', + }); + +}]).directive('sfFieldset', function() { + return { + transclude: true, + scope: true, + templateUrl: 'directives/decorators/bootstrap/fieldset-trcl.html', + link: function(scope, element, attrs) { + scope.title = scope.$eval(attrs.title); + } + }; +}); + +return schemaForm; +})); diff --git a/dist/bootstrap-decorator.min.js b/dist/bootstrap-decorator.min.js new file mode 100644 index 000000000..c34d9a39c --- /dev/null +++ b/dist/bootstrap-decorator.min.js @@ -0,0 +1 @@ +!function(e,t){"function"==typeof define&&define.amd?define(["schemaForm"],t):"object"==typeof exports?module.exports=t(require("schemaForm")):e.bootstrapDecorator=t(e.schemaForm)}(this,function(e){return angular.module("schemaForm").run(["$templateCache",function(e){e.put("directives/decorators/bootstrap/actions-trcl.html",'
'),e.put("directives/decorators/bootstrap/actions.html",'
'),e.put("directives/decorators/bootstrap/array.html",'
'),e.put("directives/decorators/bootstrap/checkbox.html",'
'),e.put("directives/decorators/bootstrap/checkboxes.html",'
'),e.put("directives/decorators/bootstrap/default.html",'
{{ hasSuccess() ? \'(success)\' : \'(error)\' }}
'),e.put("directives/decorators/bootstrap/fieldset-trcl.html",'
{{ form.title }}
'),e.put("directives/decorators/bootstrap/fieldset.html",'
{{ form.title }}
'),e.put("directives/decorators/bootstrap/help.html",'
'),e.put("directives/decorators/bootstrap/radio-buttons.html",'
'),e.put("directives/decorators/bootstrap/radios-inline.html",'
'),e.put("directives/decorators/bootstrap/radios.html",'
'),e.put("directives/decorators/bootstrap/section.html",'
'),e.put("directives/decorators/bootstrap/select.html",'
'),e.put("directives/decorators/bootstrap/submit.html",'
'),e.put("directives/decorators/bootstrap/tabarray.html",'
'),e.put("directives/decorators/bootstrap/tabs.html",'
'),e.put("directives/decorators/bootstrap/textarea.html",'
')}]),angular.module("schemaForm").config(["schemaFormDecoratorsProvider",function(e){var t="directives/decorators/bootstrap/";e.defineDecorator("bootstrapDecorator",{textarea:{template:t+"textarea.html",replace:!1},fieldset:{template:t+"fieldset.html",replace:!1},array:{template:t+"array.html",replace:!1},tabarray:{template:t+"tabarray.html",replace:!1},tabs:{template:t+"tabs.html",replace:!1},section:{template:t+"section.html",replace:!1},conditional:{template:t+"section.html",replace:!1},actions:{template:t+"actions.html",replace:!1},select:{template:t+"select.html",replace:!1},checkbox:{template:t+"checkbox.html",replace:!1},checkboxes:{template:t+"checkboxes.html",replace:!1},number:{template:t+"default.html",replace:!1},password:{template:t+"default.html",replace:!1},submit:{template:t+"submit.html",replace:!1},button:{template:t+"submit.html",replace:!1},radios:{template:t+"radios.html",replace:!1},"radios-inline":{template:t+"radios-inline.html",replace:!1},radiobuttons:{template:t+"radio-buttons.html",replace:!1},help:{template:t+"help.html",replace:!1},"default":{template:t+"default.html",replace:!1}},[]),e.createDirectives({textarea:t+"textarea.html",select:t+"select.html",checkbox:t+"checkbox.html",checkboxes:t+"checkboxes.html",number:t+"default.html",submit:t+"submit.html",button:t+"submit.html",text:t+"default.html",date:t+"default.html",password:t+"default.html",datepicker:t+"datepicker.html",input:t+"default.html",radios:t+"radios.html","radios-inline":t+"radios-inline.html",radiobuttons:t+"radio-buttons.html"})}]).directive("sfFieldset",function(){return{transclude:!0,scope:!0,templateUrl:"directives/decorators/bootstrap/fieldset-trcl.html",link:function(e,t,s){e.title=e.$eval(s.title)}}}),e}); \ No newline at end of file