-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathangular-schema-form-download.min.js
1 lines (1 loc) · 1.42 KB
/
angular-schema-form-download.min.js
1
angular.module("schemaForm").run(["$templateCache",function(o){o.put("directives/decorators/bootstrap/download/angular-schema-form-download.html",'<div class="form-group" ng-class="{\'has-error\': hasError()}"><div><a download-options="" data-id="{{form.schema.id || \'download\'}}" class="btn btn-default {{ (form.schema.cssClass || form.cssClass) || \'btn-primary\' }}" download="" href="{{(form.schema.url || form.url)}}" role="button" target="_blank">{{form.title || \'Download\'}}</a></div><span class="help-block">{{ (hasError() && errorMessage(schemaError())) || (form.schema.description || form.description)}}</span></div>')}]),angular.module("schemaForm").config(["schemaFormProvider","schemaFormDecoratorsProvider","sfPathProvider",function(o,r,a){var t=function(r,t,e){if("string"===t.type&&"download"===t.format){var n=o.stdFormObj(r,t,e);return n.key=e.path,n.type="download",e.lookup[a.stringify(e.path)]=n,n}};o.defaults.string.unshift(t),r.addMapping("bootstrapDecorator","download","directives/decorators/bootstrap/download/angular-schema-form-download.html"),r.createDirective("download","directives/decorators/bootstrap/download/angular-schema-form-download.html")}]),angular.module("schemaForm").directive("downloadOptions",function(){return{restrict:"A",controller:function(o,r){o.notifyClick=function(o){r.$emit("DownloadTriggered",{element:o})}},link:function(o,r,a){angular.element(r).click(function(){o.notifyClick(r)})}}});