Skip to content

Commit d560be5

Browse files
committed
Merge branch 'release/0.7.8' into development
2 parents e413740 + 9e14725 commit d560be5

File tree

6 files changed

+26
-6
lines changed

6 files changed

+26
-6
lines changed

CHANGELOG

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
v0.7.8
2+
------
3+
* Thanks to @burdiuz for finding a memory leak issue and finding a solution. And thanks to @davidlgj for implementing that solution.
4+
* Post render event, thanks @mrijken
5+
* Events documentation, thanks @Dervisevic
6+
* startEmpty documentation, thanks @davidlj
7+
* npm and bower updates, thanks @Dervisevic
8+
* x-schema-form attribute, thanks @davidlgj
9+
* htmlClass and fieldHtmlClass form options, thanks @davidlgj
10+
111
v0.7.7
212
------
313
* Array ref changes in model updates form, thanks @Sandreu

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dist/schema-form.min.js",
55
"dist/bootstrap-decorator.min.js"
66
],
7-
"version": "0.7.7",
7+
"version": "0.7.8",
88
"authors": [
99
"Textalk",
1010
"David Jensen <david.lgj@gmail.com>",

dist/bootstrap-decorator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/schema-form.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,15 @@ angular.module('schemaForm').provider('schemaForm',
481481
var def;
482482
for (var i = 0; i < rules.length; i++) {
483483
def = rules[i](name, schema, options);
484+
484485
//first handler in list that actually returns something is our handler!
485486
if (def) {
487+
488+
// Do we have form defaults in the schema under the x-schema-form-attribute?
489+
if (def.schema['x-schema-form'] && angular.isObject(def.schema['x-schema-form'])) {
490+
def = angular.extend(def, def.schema['x-schema-form']);
491+
}
492+
486493
return def;
487494
}
488495
}
@@ -508,14 +515,16 @@ angular.module('schemaForm').provider('schemaForm',
508515
if (schema.minimum) { f.minimum = schema.minimum + (schema.exclusiveMinimum ? 1 : 0); }
509516
if (schema.maximum) { f.maximum = schema.maximum - (schema.exclusiveMaximum ? 1 : 0); }
510517

511-
//Non standard attributes
518+
// Non standard attributes (DONT USE DEPRECATED)
519+
// If you must set stuff like this in the schema use the x-schema-form attribute
512520
if (schema.validationMessage) { f.validationMessage = schema.validationMessage; }
513521
if (schema.enumNames) { f.titleMap = canonicalTitleMap(schema.enumNames, schema['enum']); }
514522
f.schema = schema;
515523

516524
// Ng model options doesn't play nice with undefined, might be defined
517525
// globally though
518526
f.ngModelOptions = f.ngModelOptions || {};
527+
519528
return f;
520529
};
521530

@@ -1355,7 +1364,8 @@ angular.module('schemaForm')
13551364
}
13561365
}
13571366
});
1358-
}
1367+
};
1368+
scope.$emit('sf-render-finished', element);
13591369
});
13601370
}
13611371
};

dist/schema-form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-schema-form",
3-
"version": "0.7.7",
3+
"version": "0.7.8",
44
"description": "Create complex forms from a JSON schema with angular.",
55
"repository": "Textalk/angular-schema-form",
66
"main": "dist/schema-form.min.js",

0 commit comments

Comments
 (0)