-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
944 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<h1>Comments</h1> | ||
<div ng-if="vm.id"> | ||
<jsonforms schema="vm.commentSchema" ui-schema="vm.commentUiSchema" data="vm.CommentDataProvider"></jsonforms> | ||
<jsonforms schema="vm.commentSchema" uischema="vm.commentUiSchema" data="vm.CommentDataProvider"></jsonforms> | ||
</div> | ||
<div ng-if="!vm.id"> | ||
<jsonforms schema="vm.commentsSchema" ui-schema="vm.commentsUiSchema" data="vm.CommentDataProvider"></jsonforms> | ||
<jsonforms schema="vm.commentsSchema" uischema="vm.commentsUiSchema" data="vm.CommentDataProvider"></jsonforms> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<h1>Users</h1> | ||
<div ng-if="vm.id"> | ||
<jsonforms schema="vm.userSchema" ui-schema="vm.userUiSchema" data="vm.UserDataProvider"></jsonforms> | ||
<jsonforms schema="vm.userSchema" uischema="vm.userUiSchema" data="vm.UserDataProvider"></jsonforms> | ||
</div> | ||
<div ng-if="!vm.id"> | ||
<jsonforms schema="vm.usersSchema" ui-schema="vm.usersUiSchema" data="vm.UserDataProvider"></jsonforms> | ||
<jsonforms schema="vm.usersSchema" uischema="vm.usersUiSchema" data="vm.UserDataProvider"></jsonforms> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,77 @@ | ||
import "angular" | ||
import "angular-mocks" | ||
import "../../jsonforms_bootstrap.ts" | ||
import 'angular'; | ||
import 'angular-mocks'; | ||
import '../../jsonforms_bootstrap.ts'; | ||
|
||
describe('MasterDetailBootstrap', () => { | ||
|
||
// load all necessary modules and templates | ||
beforeEach(angular.mock.module('jsonforms.form')); | ||
|
||
xit("should be rendered", | ||
xit('should be rendered', | ||
angular.mock.inject(($rootScope, $compile) => { | ||
|
||
let scope = $rootScope.$new(); | ||
scope.schema = { | ||
"type": "object", | ||
"properties": { | ||
"a":{ | ||
"type": "array", | ||
"items": { | ||
"type":"object", | ||
"properties":{ | ||
"name": { | ||
"type": "string" | ||
'type': 'object', | ||
'properties': { | ||
'a': { | ||
'type': 'array', | ||
'items': { | ||
'type': 'object', | ||
'properties': { | ||
'name': { | ||
'type': 'string' | ||
}, | ||
} | ||
}, | ||
}, | ||
"c":{ | ||
"type": "array", | ||
"items": { | ||
"type":"object", | ||
"properties":{ | ||
"name": { | ||
"type": "string" | ||
'c': { | ||
'type': 'array', | ||
'items': { | ||
'type': 'object', | ||
'properties': { | ||
'name': { | ||
'type': 'string' | ||
}, | ||
} | ||
} | ||
}, | ||
} | ||
}; | ||
scope.uiSchema = { | ||
"type":"MasterDetailLayout", | ||
"scope": { | ||
"$ref": "#" | ||
'type': 'MasterDetailLayout', | ||
'scope': { | ||
'$ref': '#' | ||
}, | ||
}; | ||
scope.data = { | ||
"a": | ||
[ | ||
{"name":"x_1"}, | ||
{"name":"x_2"} | ||
'a': [ | ||
{'name': 'x_1'}, | ||
{'name': 'x_2'} | ||
], | ||
"c":[ | ||
{"name":"y_1"}, | ||
{"name":"y_2"} | ||
'c': [ | ||
{'name': 'y_1'}, | ||
{'name': 'y_2'} | ||
] | ||
}; | ||
let el = $compile('<jsonforms schema="schema" ui-schema="uiSchema" data="data"/>')(scope); | ||
let el = $compile('<jsonforms schema="schema" uischema="uiSchema" data="data"/>')(scope); | ||
scope.$digest(); | ||
expect(el.html()).toContain("<!-- Master -->"); //this is not resolved completly | ||
expect(el.html()).toContain("<!-- Detail -->"); //this is not resolved completly | ||
expect(el.html()).toContain('<!-- Master -->'); // this is not resolved completly | ||
expect(el.html()).toContain('<!-- Detail -->'); // this is not resolved completly | ||
expect(el.html()).toContain('a'); | ||
expect(el.html()).toContain('x_1'); | ||
expect(el.html()).toContain('x_2'); | ||
expect(el.html()).toContain('c'); | ||
expect(el.html()).toContain('y_1'); | ||
expect(el.html()).toContain('y_2'); | ||
|
||
let nameInput_empty = el[0].querySelector("#\\#\\/properties\\/name"); | ||
let nameInput_empty = el[0].querySelector('#\\#\\/properties\\/name'); | ||
expect(nameInput_empty).toBeNull(); | ||
|
||
let x1 = el[0].querySelector("uib-accordion uib-accordion uib-accordion-heading span"); | ||
angular.element(x1).triggerHandler("click"); | ||
expect(el.html()).toContain("<label"); | ||
let nameInput = el[0].querySelector("#\\#\\/properties\\/name"); | ||
let x1 = el[0].querySelector('uib-accordion uib-accordion uib-accordion-heading span'); | ||
angular.element(x1).triggerHandler('click'); | ||
expect(el.html()).toContain('<label'); | ||
let nameInput = el[0].querySelector('#\\#\\/properties\\/name'); | ||
expect(nameInput).not.toBeNull(); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<jsonforms-layout> | ||
<div class="jsf-vertical-layout"> | ||
<fieldset class="row"> | ||
<jsonforms-inner ng-repeat="child in vm.uiSchema.elements" ui-schema="child" class="col-sm-100"></jsonforms-inner> | ||
<jsonforms-inner ng-repeat="child in vm.uiSchema.elements" uischema="child" class="col-sm-100"></jsonforms-inner> | ||
</fieldset> | ||
</div> | ||
</jsonforms-layout> |
Oops, something went wrong.