Permalink
Browse files

Merge remote-tracking branch 'origin/development' into development

  • Loading branch information...
2 parents cbdcdef + 8b6b008 commit 59e4e2c8d0c50ffb5d65671f28225a53e691bb24 @Anthropic Anthropic committed May 29, 2016
@@ -0,0 +1,23 @@
+<!--
+Only include sections relevant to your issue.
+
+If you have not read docs/support.md and followed its guidance you may be ignored or closed without response.
+
+Please use PREVIEW before you submit!!
+-->
+#### Enhancement
+As a user/developer, when I ... I should be able to ...
+
+#### Expected behaviour
+I expected ...
+
+#### Actual behaviour
+It actually ...
+
+#### Gist/Plunker/Demo
+[Description](url)
+
+#### Related issues
+This is/maybe related to ...
+
+@json-schema-form/angular-schema-form-lead
@@ -0,0 +1,16 @@
+####Description
+
+Add your description here
+
+####Fixes Related issues
+- add related
+- issues here
+
+####Checklist
+- [ ] I have read and understand the CONTRIBUTIONS.md file
+- [ ] I have searched for and linked related issues
+- [ ] I have created test cases to ensure quick resolution of the PR is easier
+- [ ] I am NOT targeting main branch
+- [ ] I did NOT include the dist folder in my PR
+
+@json-schema-form/angular-schema-form-lead
View
@@ -9,71 +9,14 @@ Angular Schema Form
Generate forms from JSON schemas using AngularJS!
-Recent developments
-===================
-First, as there has been a rather intensive period of planning and change for this project, there have been important new developments for the project.
-Lets get into those first(the normal front page continues below):
-
-The json-schema-form standard
------------------------------
-A standard, json-schema-form, is being created.
-
-The concept of combining data, JSON Schema and a form definition, is something that isn't just usable in a JavaScript Angular web application, but in any framework, on any platform.
-Current ports are [angular-schema-form](https://github.com/json-schema-form/angular-schema-form) and [react-schema-form](https://github.com/networknt/react-schema-form), but delphi-schema-form and laravel-schema-form are planned as well.
-To make these ports easier to do, and for everything to work in harmony, a common ground has to be established, a [standard](https://github.com/json-schema-form/json-schema-form).
-
-Organisational
---------------
-1. ASF has changed into using a more open governance model. This basically means that ASF is now governed by more people.
-2. An umbrella organisaton, json-schema-form, has been formed. As you can see, this repo is now a part of that Github organisation, not Textalk.
-
-Projects
---------
-After a phase of planning, the following list of projects has been decided upon:
-https://github.com/json-schema-form/json-schema-form/wiki/Current-projects
-
-Release 1.0
------------
-The next major release of ASF will be 1.0.
-
-The goal for that version is to include the breaking changes that is needed for future developments, like *Of and local $refs:
-
-* Break out the non-framework specific parts of ASF into a vanilla ES6 module
-* Remove the built-in bootstrap decorator, and in doing that require that users wanting to use that load that separately. The reason obviously being the material decorator.
-
-The reason for the core break out is for all javascript-based ports of the json-schema-form concept to be able to share the same central code base.
-Work in that direction is being done in the [json-schema-form-core](https://github.com/json-schema-form/json-schema-form-core) repository.
-
-Schema builder UI
------------------
-There is now a UI for building schemas and forms being developed at [json-schema-builder repository](https://github.com/json-schema-form/json-schema-builder).
-
-Ralphael Owino (main author), has a [demo up already](http://ralphowino.github.io/schema-form-builder/#/builder).
-
-Schema and form repository
---------------------------
-This is now a [repository with template schemas and forms](https://github.com/json-schema-form/json-schema-form-repository).
-So far all the [schema.org types](http://schema.org/docs/full.html) has been converted to JSON schema approximations, and also some has been further resolved and had (huge) forms generated. Schema.org is *big*.
-
-Documentation
--------------
-The documentation is evolving, and it is happening mostly on the wiki:
-* [The ASF wiki](https://github.com/json-schema-form/angular-schema-form/wiki)
-* [The wiki of the json-schema-form organisation](https://github.com/json-schema-form/json-schema-form/wiki)
-
-New Gitter rooms
-----------------
-These are just started.
-* Discussions on the [general json-schema-form projects being carried out](https://gitter.im/json-schema-form/json-schema-form-projects)
-* Discussions on the [angular-specific ASF projects](https://gitter.im/json-schema-form/angular-schema-form-projects)
-
-
The Blog / The Web Site / The Twitter / The Movie
=================================================
[medium.com/@SchemaFormIO](https://medium.com/@SchemaFormIO) / [schemaform.io](http://schemaform.io) / [@SchemaFormIO](http://twitter.com/SchemaFormIO) / [Movie](https://www.youtube.com/watch?v=duBFMipRq2o)
If you use ASF in your project/company please let us know! We'd love to feature you on the site.
+There has been some recent developments in this project that you might want to [read about](https://github.com/json-schema-form/angular-schema-form/wiki/Recent-developments).
+
Demo Time!
==========
[Try out the example page](http://schemaform.io/examples/bootstrap-example.html). Try editing the schema or form definition and see what comes out!
View
@@ -0,0 +1,20 @@
+Support
+=============
+
+### Creating an issue
+- We are an **open source project** and our members devote their **personal time** to try to help. As it could be time spent doing development **please try not to waste their time** with poorly written issues.
+- Please search for related issues and reference anything that may be related to help us resolve your issue.
+- Be sure you have properly read the documentation and understand the main concepts of ASF: https://github.com/json-schema-form/angular-schema-form/blob/development/docs/index.md
+- Remember that you can **test** schemas and forms at http://schemaform.io/examples/bootstrap-example.html
+- If applicable, **always provide a running example**, like a gist or a plunker, do not put code into the issue unless it is really basic and not more than a few lines formatted using markdown code blocks.
+- **You can create a Gist from the example page.** It helps us to help you!
+- You will not get a constructive response if the question is poorly described and not formatted to be readable.
+- Items tagged as needing something "need: ..." will be closed unless we get a response within 2 weeks so please check back even if you don't get a notification email.
+- You are always welcome to re-open a closed issue, we prefer that to opening a new one for the same thing.
+
+### Gitter
+All of our projects have Gitter, please ensure you discuss your problem in the apprpriate Gitter or you may not get a quick response to your problem.
+
+We are **NOT** available for basic JavaScript support, please use Stack Overflow or similar support sites for basic support.
+
+
View
@@ -62,12 +62,12 @@
"licenses": [
{
"type": "MIT",
- "url": "https://raw.githubusercontent.com/Textalk/angular-schema-form/master/LICENSE"
+ "url": "https://raw.githubusercontent.com/json-schema-form/angular-schema-form/master/LICENSE"
}
],
"autoupdate": {
"source": "git",
- "target": "git://github.com/Textalk/angular-schema-form.git",
+ "target": "git://github.com/json-schema-form/angular-schema-form.git",
"basePath": "/dist/",
"files": [
"schema-form.min.js",
@@ -161,12 +161,20 @@ angular.module('schemaForm').directive('sfField',
// It looks better with dot notation.
scope.$on(
'schemaForm.error.' + form.key.join('.'),
- function(event, error, validationMessage, validity) {
+ function(event, error, validationMessage, validity, formName) {
+ // validationMessage and validity are mutually exclusive
+ formName = validity;
if (validationMessage === true || validationMessage === false) {
validity = validationMessage;
validationMessage = undefined;
}
+ // If we have specified a form name, and this model is not within
+ // that form, then leave things be.
+ if(formName != undefined && scope.ngModel.$$parentForm.$name !== formName) {
+ return;
+ }
+
if (scope.ngModel && error) {
if (scope.ngModel.$setDirty) {
scope.ngModel.$setDirty();
@@ -133,7 +133,7 @@ angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(s
var items = args.fieldFrag.querySelector('[schema-form-array-items]');
if (items) {
state = angular.copy(args.state);
- state.keyRedaction = state.keyRedaction || 0;
+ state.keyRedaction = 0;
state.keyRedaction += args.form.key.length + 1;
// Special case, an array with just one item in it that is not an object.
@@ -229,12 +229,20 @@ angular.module('schemaForm').provider('schemaFormDecorators',
// It looks better with dot notation.
scope.$on(
'schemaForm.error.' + form.key.join('.'),
- function(event, error, validationMessage, validity) {
+ function(event, error, validationMessage, validity, formName) {
+ // validationMessage and validity are mutually exclusive
+ formName = validity;
if (validationMessage === true || validationMessage === false) {
validity = validationMessage;
validationMessage = undefined;
}
+ // If we have specified a form name, and this model is not within
+ // that form, then leave things be.
+ if(formName != undefined && scope.ngModel.$$parentForm.$name !== formName) {
+ return;
+ }
+
if (scope.ngModel && error) {
if (scope.ngModel.$setDirty) {
scope.ngModel.$setDirty();
@@ -168,6 +168,7 @@ angular.module('schemaForm').provider('schemaForm',
if (stripNullType(schema.type) === 'object') {
var f = stdFormObj(name, schema, options);
f.type = 'fieldset';
+ f.key = options.path;
f.items = [];
options.lookup[sfPathProvider.stringify(options.path)] = f;
@@ -386,7 +387,7 @@ angular.module('schemaForm').provider('schemaForm',
if (obj.type === 'checkbox' && angular.isUndefined(obj.schema['default'])) {
obj.schema['default'] = false;
}
-
+
// Special case: template type with tempplateUrl that's needs to be loaded before rendering
// TODO: this is not a clean solution. Maybe something cleaner can be made when $ref support
// is introduced since we need to go async then anyway

0 comments on commit 59e4e2c

Please sign in to comment.