extjs-mvc 0.4.0.f → 0.4.0.g
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/bin/extjs-mvc +0 -3
- data/lib/extjs-mvc.rb +10 -6
- data/lib/extjs-mvc/api.rb +0 -1
- metadata +8 -84
- data/lib/src/App.js +0 -219
- data/lib/src/MVC.js +0 -260
- data/lib/src/Presenter.js +0 -52
- data/lib/src/README.rdoc +0 -69
- data/lib/src/controller/Controller.js +0 -278
- data/lib/src/controller/CrudController.js +0 -460
- data/lib/src/lib/Array.js +0 -26
- data/lib/src/lib/Booter.js +0 -416
- data/lib/src/lib/ClassManager.js +0 -191
- data/lib/src/lib/ControllerClassManager.js +0 -95
- data/lib/src/lib/Dependencies.js +0 -44
- data/lib/src/lib/DispatchMatcher.js +0 -98
- data/lib/src/lib/Dispatcher.js +0 -129
- data/lib/src/lib/Environment.js +0 -43
- data/lib/src/lib/Inflector.js +0 -155
- data/lib/src/lib/ModelClassManager.js +0 -19
- data/lib/src/lib/Route.js +0 -139
- data/lib/src/lib/Router.js +0 -282
- data/lib/src/lib/String.js +0 -94
- data/lib/src/lib/ViewClassManager.js +0 -229
- data/lib/src/lib/notes.txt +0 -32
- data/lib/src/model/AdapterManager.js +0 -30
- data/lib/src/model/Association.js +0 -26
- data/lib/src/model/Base.js +0 -63
- data/lib/src/model/BelongsToAssociation.js +0 -116
- data/lib/src/model/Cache.js +0 -131
- data/lib/src/model/HasManyAssociation.js +0 -160
- data/lib/src/model/Model.js +0 -331
- data/lib/src/model/UrlBuilder.js +0 -106
- data/lib/src/model/adapters/AbstractAdapter.js +0 -296
- data/lib/src/model/adapters/MemoryAdapter.js +0 -103
- data/lib/src/model/adapters/RESTAdapter.js +0 -345
- data/lib/src/model/adapters/RESTJSONAdapter.js +0 -68
- data/lib/src/model/adapters/notes.txt +0 -42
- data/lib/src/model/associations/Association.js +0 -192
- data/lib/src/model/associations/notes.txt +0 -87
- data/lib/src/model/validations/Errors.js +0 -136
- data/lib/src/model/validations/Plugin.js +0 -139
- data/lib/src/model/validations/Validations.js +0 -276
- data/lib/src/notes/Charts.graffle +0 -0
- data/lib/src/overrides/Ext.Component.js +0 -21
- data/lib/src/overrides/Ext.extend.js +0 -142
- data/lib/src/spec/Array.spec.js +0 -15
- data/lib/src/spec/ExtMVC.spec.js +0 -65
- data/lib/src/spec/Model.spec.js +0 -370
- data/lib/src/spec/OS.spec.js +0 -83
- data/lib/src/spec/Router.spec.js +0 -99
- data/lib/src/spec/SpecHelper.js +0 -106
- data/lib/src/spec/String.spec.js +0 -83
- data/lib/src/spec/model/AbstractAdapter.spec.js +0 -49
- data/lib/src/spec/model/Associations.spec.js +0 -99
- data/lib/src/spec/model/Cache.spec.js +0 -5
- data/lib/src/spec/model/RESTAdapter.spec.js +0 -19
- data/lib/src/spec/model/ValidationErrors.spec.js +0 -64
- data/lib/src/spec/model/Validations.spec.js +0 -166
- data/lib/src/spec/model/ValidationsPlugin.spec.js +0 -108
- data/lib/src/spec/suite.html +0 -60
- data/lib/src/specs-old/JSSpec.css +0 -216
- data/lib/src/specs-old/JSSpec.js +0 -1512
- data/lib/src/specs-old/all.html +0 -66
- data/lib/src/specs-old/base.js +0 -14
- data/lib/src/specs-old/controller.js +0 -17
- data/lib/src/specs-old/diff_match_patch.js +0 -1
- data/lib/src/specs-old/model.js +0 -70
- data/lib/src/specs-old/route.js +0 -38
- data/lib/src/specs-old/router.js +0 -59
- data/lib/src/specs-old/string.js +0 -22
- data/lib/src/testrunner/JSpecFormatter.js +0 -111
- data/lib/src/testrunner/TestClient.js +0 -181
- data/lib/src/testrunner/TestGrid.js +0 -351
- data/lib/src/testrunner/TestRunner.js +0 -110
- data/lib/src/testrunner/TestViewport.js +0 -94
- data/lib/src/vendor.yml +0 -29
- data/lib/src/vendor/ext-3.1.1/vendor.yml +0 -16
- data/lib/src/view/FormWindow.js +0 -184
- data/lib/src/view/HasManyEditorGridPanel.js +0 -211
- data/lib/src/view/scaffold/Edit.js +0 -46
- data/lib/src/view/scaffold/Index.js +0 -561
- data/lib/src/view/scaffold/New.js +0 -20
- data/lib/src/view/scaffold/ScaffoldFormPanel.js +0 -255
@@ -1,64 +0,0 @@
|
|
1
|
-
Screw.Unit(function() {
|
2
|
-
describe("A Validation Errors object", function() {
|
3
|
-
var errors = new ExtMVC.Model.validation.Errors();
|
4
|
-
|
5
|
-
before(function() {
|
6
|
-
//make sure we clear out any errors between each test
|
7
|
-
errors.clear();
|
8
|
-
});
|
9
|
-
|
10
|
-
it("should contain an object of all errors", function() {
|
11
|
-
expect(errors.all).to(equal, {});
|
12
|
-
});
|
13
|
-
|
14
|
-
it("should clear current errors out", function() {
|
15
|
-
//add some fake errors
|
16
|
-
errors.all = {'title': ['must be present'], 'text': ['is too short']};
|
17
|
-
|
18
|
-
errors.clear();
|
19
|
-
expect(errors.all).to(equal, {});
|
20
|
-
});
|
21
|
-
|
22
|
-
describe("when retrieving errors by field name or for a form", function() {
|
23
|
-
before(function() {
|
24
|
-
errors.add('title', 'must be present');
|
25
|
-
errors.add('title', 'is too short');
|
26
|
-
errors.add('title', 'is quite boring');
|
27
|
-
errors.add('text', 'is a hideous diatribe');
|
28
|
-
});
|
29
|
-
|
30
|
-
it("should allow retrieval of errors per field via the forField method", function() {
|
31
|
-
expect(errors.forField('title')).to(equal, ['must be present', 'is too short', 'is quite boring']);
|
32
|
-
});
|
33
|
-
|
34
|
-
it("should return a human readable form for errors on a given field", function() {
|
35
|
-
expect(errors.forField('title', true)).to(equal, 'must be present, is too short and is quite boring');
|
36
|
-
expect(errors.forField('text', true)).to(equal, 'is a hideous diatribe');
|
37
|
-
});
|
38
|
-
|
39
|
-
it("should return the errors in a format suitable for displaying on a FormPanel", function() {
|
40
|
-
var formErrors = {'title': 'must be present, is too short and is quite boring', 'text': 'is a hideous diatribe'};
|
41
|
-
expect(errors.forForm()).to(equal, formErrors);
|
42
|
-
});
|
43
|
-
});
|
44
|
-
|
45
|
-
it("should allow addition of new errors", function() {
|
46
|
-
expect(errors.forField('title').length).to(equal, 0);
|
47
|
-
|
48
|
-
errors.add('title', 'must be present');
|
49
|
-
expect(errors.forField('title').length).to(equal, 1);
|
50
|
-
|
51
|
-
errors.add('title', 'is too short');
|
52
|
-
expect(errors.forField('title').length).to(equal, 2);
|
53
|
-
});
|
54
|
-
|
55
|
-
it("should be valid if there are no errors", function() {
|
56
|
-
expect(errors.isValid()).to(equal, true);
|
57
|
-
});
|
58
|
-
|
59
|
-
it("should not be valid if there are errors present", function() {
|
60
|
-
errors.add('title', 'has serious problems');
|
61
|
-
expect(errors.isValid()).to(equal, false);
|
62
|
-
});
|
63
|
-
});
|
64
|
-
});
|
@@ -1,166 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Tests the validations framework and the built-in validations
|
3
|
-
*/
|
4
|
-
Screw.Unit(function() {
|
5
|
-
describe("Validation Classes", function() {
|
6
|
-
//keep track of the object to which models are currently assigned
|
7
|
-
var ns = ExtMVC.Model.modelNamespace;
|
8
|
-
|
9
|
-
ExtMVC.Model.define('SomeModel', {
|
10
|
-
fields: [
|
11
|
-
{name: 'title', type: 'string'},
|
12
|
-
{name: 'text', type: 'string'},
|
13
|
-
{name: 'price', type: 'number'}
|
14
|
-
]
|
15
|
-
});
|
16
|
-
|
17
|
-
var myInstance = new ns.SomeModel({});
|
18
|
-
var V = ExtMVC.Model.validation;
|
19
|
-
|
20
|
-
describe("Validates Presence Of", function() {
|
21
|
-
var v = new V.ValidatesPresenceOf(ns.SomeModel, 'title');
|
22
|
-
|
23
|
-
it("should not be valid if not present", function() {
|
24
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
25
|
-
});
|
26
|
-
|
27
|
-
it("should not be valid if an empty string", function() {
|
28
|
-
myInstance.set('title', '');
|
29
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
30
|
-
});
|
31
|
-
|
32
|
-
it("should be valid if any value is present", function() {
|
33
|
-
myInstance.set('title', 'My Title');
|
34
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
35
|
-
|
36
|
-
myInstance.set('title', {'some': 'object'});
|
37
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
38
|
-
});
|
39
|
-
|
40
|
-
it("should return a default message", function() {
|
41
|
-
expect(v.message).to(equal, 'must be present');
|
42
|
-
});
|
43
|
-
|
44
|
-
it("should allow specification of a customised message", function() {
|
45
|
-
var v = new V.ValidatesPresenceOf(ns.SomeModel, 'title', {message: 'My Message'});
|
46
|
-
expect(v.message).to(equal, 'My Message');
|
47
|
-
});
|
48
|
-
});
|
49
|
-
|
50
|
-
describe("Validates Numericality Of", function() {
|
51
|
-
var v = new V.ValidatesNumericalityOf(ns.SomeModel, 'price');
|
52
|
-
|
53
|
-
it("should pass if the field is a number", function() {
|
54
|
-
myInstance.set('price', 9.99);
|
55
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
56
|
-
});
|
57
|
-
|
58
|
-
it("should fail if the field is not a number", function() {
|
59
|
-
myInstance.set('price', 'not a number!');
|
60
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
61
|
-
|
62
|
-
expect(v.message).to(equal, 'must be a number');
|
63
|
-
});
|
64
|
-
});
|
65
|
-
|
66
|
-
describe("Validates Length Of", function() {
|
67
|
-
var v = new V.ValidatesLengthOf(ns.SomeModel, 'title', {minimum: 5, maximum: 9});
|
68
|
-
|
69
|
-
it("should fail if the field is too short", function() {
|
70
|
-
myInstance.set('title', 'a');
|
71
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
72
|
-
expect(v.message).to(equal, 'is too short');
|
73
|
-
});
|
74
|
-
|
75
|
-
it("should fail if the field is too long", function() {
|
76
|
-
myInstance.set('title', 'a very long title');
|
77
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
78
|
-
expect(v.message).to(equal, 'is too long');
|
79
|
-
});
|
80
|
-
|
81
|
-
it("should pass if the field is an acceptable length", function() {
|
82
|
-
//minimum
|
83
|
-
myInstance.set('title', 'Adama');
|
84
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
85
|
-
|
86
|
-
//maximum
|
87
|
-
myInstance.set('title', 'President');
|
88
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
89
|
-
|
90
|
-
//in between
|
91
|
-
myInstance.set('title', 'Colonel');
|
92
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
93
|
-
});
|
94
|
-
});
|
95
|
-
|
96
|
-
describe("Validates Inclusion Of", function() {
|
97
|
-
var v = new V.ValidatesInclusionOf(ns.SomeModel, 'title', {allowed: ['test', 'title', 'another title']});
|
98
|
-
|
99
|
-
it("should pass if the field is one of the allowed values", function() {
|
100
|
-
Ext.each(['test', 'title', 'another title'], function(allowedTitle) {
|
101
|
-
myInstance.set('title', allowedTitle);
|
102
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
103
|
-
}, this);
|
104
|
-
});
|
105
|
-
|
106
|
-
it("should fail if the field is not one of the allowed values", function() {
|
107
|
-
myInstance.set('title', 'not an allowed title ');
|
108
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
109
|
-
});
|
110
|
-
|
111
|
-
it("should generate a meaningful message", function() {
|
112
|
-
expect(v.message).to(equal, 'must be one of test, title or another title');
|
113
|
-
});
|
114
|
-
|
115
|
-
it("should allow setting of a custom message", function() {
|
116
|
-
var v = new V.ValidatesInclusionOf(ns.SomeModel, 'title', {allowed: [], message: 'My Message'});
|
117
|
-
expect(v.message).to(equal, 'My Message');
|
118
|
-
});
|
119
|
-
});
|
120
|
-
|
121
|
-
describe("Validates Exclusion Of", function() {
|
122
|
-
var v = new V.ValidatesExclusionOf(ns.SomeModel, 'title', {disallowed: ['test', 'title', 'another title']});
|
123
|
-
|
124
|
-
it("should pass if the field is not one of the disallowed values", function() {
|
125
|
-
myInstance.set('title', 'This is allowed');
|
126
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
127
|
-
});
|
128
|
-
|
129
|
-
it("should fail if the field is one of the disallowed values", function() {
|
130
|
-
Ext.each(['test', 'title', 'another title'], function(disallowedTitle) {
|
131
|
-
myInstance.set('title', disallowedTitle);
|
132
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
133
|
-
}, this);
|
134
|
-
});
|
135
|
-
|
136
|
-
it("should generate a meaningful message", function() {
|
137
|
-
expect(v.message).to(equal, 'must not be test, title or another title');
|
138
|
-
});
|
139
|
-
|
140
|
-
it("should allow setting of a custom message", function() {
|
141
|
-
var v = new V.ValidatesExclusionOf(ns.SomeModel, 'title', {disallowed: [], message: 'My Message'});
|
142
|
-
expect(v.message).to(equal, 'My Message');
|
143
|
-
});
|
144
|
-
});
|
145
|
-
|
146
|
-
describe("Validates Format Of", function() {
|
147
|
-
var v = new V.ValidatesFormatOf(ns.SomeModel, 'title', {regex: /[A-Za-z]*\. [A-Za-z]/});
|
148
|
-
|
149
|
-
it("should pass if the regex matches", function() {
|
150
|
-
myInstance.set('title', 'Mr. Bean');
|
151
|
-
|
152
|
-
expect(v.isValid(myInstance)).to(equal, true);
|
153
|
-
});
|
154
|
-
|
155
|
-
it("should fail if the regex does not match", function() {
|
156
|
-
myInstance.set('title', 'Ed');
|
157
|
-
|
158
|
-
expect(v.isValid(myInstance)).to(equal, false);
|
159
|
-
});
|
160
|
-
|
161
|
-
it("should supply a default message", function() {
|
162
|
-
expect(v.message).to(equal, 'is invalid');
|
163
|
-
});
|
164
|
-
});
|
165
|
-
});
|
166
|
-
});
|
@@ -1,108 +0,0 @@
|
|
1
|
-
Screw.Unit(function() {
|
2
|
-
describe("The Validations Plugin", function() {
|
3
|
-
var ns = ExtMVC.Model.modelNamespace;
|
4
|
-
|
5
|
-
delete ns.ValidatedModel;
|
6
|
-
ExtMVC.Model.define("ValidatedModel", {
|
7
|
-
fields: [
|
8
|
-
{name: 'title', type: 'string'},
|
9
|
-
{name: 'text', type: 'string'},
|
10
|
-
{name: 'price', type: 'number'}
|
11
|
-
],
|
12
|
-
validatesPresenceOf: ['title', 'text'],
|
13
|
-
validatesNumericalityOf: 'price',
|
14
|
-
validatesLengthOf: {field: 'title', minimum: 5, maximum: 10}
|
15
|
-
});
|
16
|
-
|
17
|
-
var validations = ns.ValidatedModel.prototype.validations;
|
18
|
-
|
19
|
-
it("should add a validations array to each model prototype", function() {
|
20
|
-
expect(Ext.isArray(validations)).to(equal, true);
|
21
|
-
});
|
22
|
-
|
23
|
-
it("should populate the validations array with the correct validations", function() {
|
24
|
-
expect(validations.length).to(equal, 4);
|
25
|
-
});
|
26
|
-
|
27
|
-
it("should create each validation with a reference to the parent model", function() {
|
28
|
-
Ext.each(validations, function(validation) {
|
29
|
-
expect(validation.ownerClass).to(equal, ns.ValidatedModel);
|
30
|
-
}, this);
|
31
|
-
});
|
32
|
-
|
33
|
-
it("should add an errors object to each model instance", function() {
|
34
|
-
//make sure it goes on the instance, not the prototype
|
35
|
-
expect(typeof ns.ValidatedModel.prototype.errors == 'undefined').to(equal, true);
|
36
|
-
|
37
|
-
var myInstance = new ns.ValidatedModel({});
|
38
|
-
expect(myInstance.errors instanceof ExtMVC.Model.validation.Errors).to(equal, true);
|
39
|
-
});
|
40
|
-
|
41
|
-
describe("the isValid method", function() {
|
42
|
-
/**
|
43
|
-
* Not sure if this is the best place to test this code. The isValid method is defined
|
44
|
-
* in ExtMVC.Model.validation.Plugin and applied to Ext.data.Record's prototype. As this
|
45
|
-
* means each Model instance has it available, that's how it's being tested here...
|
46
|
-
*/
|
47
|
-
var validInstance = new ns.ValidatedModel({
|
48
|
-
title: 'Title',
|
49
|
-
text: 'My Text',
|
50
|
-
price: 9.99
|
51
|
-
});
|
52
|
-
|
53
|
-
it("should clear any existing errors", function() {
|
54
|
-
//add a fake error to make sure it gets cleared
|
55
|
-
validInstance.errors.add('title', 'fake error');
|
56
|
-
expect(validInstance.errors.all).to_not(equal, {});
|
57
|
-
|
58
|
-
validInstance.isValid();
|
59
|
-
expect(validInstance.errors.all).to(equal, {});
|
60
|
-
});
|
61
|
-
|
62
|
-
it("should return true if there were no errors", function() {
|
63
|
-
expect(validInstance.isValid()).to(equal, true);
|
64
|
-
});
|
65
|
-
|
66
|
-
describe("if there were any errors", function() {
|
67
|
-
var invalidInstance = new ns.ValidatedModel({
|
68
|
-
price: 'test'
|
69
|
-
});
|
70
|
-
|
71
|
-
it("should return false", function() {
|
72
|
-
expect(invalidInstance.isValid()).to(equal, false);
|
73
|
-
});
|
74
|
-
|
75
|
-
it("should add the errors to the errors object", function() {
|
76
|
-
invalidInstance.isValid();
|
77
|
-
|
78
|
-
//we're expecting an error on title, text and price here
|
79
|
-
Ext.each(['title', 'text', 'price'], function(field) {
|
80
|
-
expect(invalidInstance.errors.forField(field).length).to(equal, 1);
|
81
|
-
}, this);
|
82
|
-
});
|
83
|
-
});
|
84
|
-
});
|
85
|
-
|
86
|
-
describe("the buildValidation method", function() {
|
87
|
-
var constructor = ExtMVC.Model.validation.ValidatesPresenceOf,
|
88
|
-
validation = ExtMVC.Model.validation.Plugin.buildValidation(constructor, 'somefield'),
|
89
|
-
validation2 = ExtMVC.Model.validation.Plugin.buildValidation(constructor, {field: 'anotherfield', message: 'test'});
|
90
|
-
|
91
|
-
it("should return an instance of the correct type", function() {
|
92
|
-
expect(validation instanceof constructor).to(equal, true);
|
93
|
-
});
|
94
|
-
|
95
|
-
it("should assign the field correctly if passed as a string", function() {
|
96
|
-
expect(validation.field).to(equal, 'somefield');
|
97
|
-
});
|
98
|
-
|
99
|
-
it("should assign the field correctly if passed inside a config object", function() {
|
100
|
-
expect(validation2.field).to(equal, 'anotherfield');
|
101
|
-
});
|
102
|
-
|
103
|
-
it("should pass config options except field to the validation's constructor", function() {
|
104
|
-
expect(validation2.message).to(equal, 'test');
|
105
|
-
});
|
106
|
-
});
|
107
|
-
});
|
108
|
-
});
|
data/lib/src/spec/suite.html
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
|
4
|
-
<html>
|
5
|
-
<head>
|
6
|
-
<link type="text/css" rel="stylesheet" href="../vendor/screw-unit/lib/screw.css" />
|
7
|
-
<title>Ext MVC Spec Suite</title>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<div id="dom_test" style="position: absolute; left: -9999"></div>
|
11
|
-
|
12
|
-
<!-- Library code (not directly part of the app) -->
|
13
|
-
<div id="libs">
|
14
|
-
<!-- Screw Unit -->
|
15
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/jquery-1.2.3.js"></script>
|
16
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/jquery.fn.js"></script>
|
17
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/jquery.print.js"></script>
|
18
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/screw.builder.js"></script>
|
19
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/screw.matchers.js"></script>
|
20
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/screw.events.js"></script>
|
21
|
-
<script type="text/javascript" src="../vendor/screw-unit/lib/screw.behaviors.js"></script>
|
22
|
-
|
23
|
-
<!-- ExtJS -->
|
24
|
-
<!-- <script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-8.js"></script> -->
|
25
|
-
<script type="text/javascript" src="../vendor/ext-base.js"></script>
|
26
|
-
<script type="text/javascript" src="../vendor/ext-all-debug.js"></script>
|
27
|
-
|
28
|
-
<!-- Ext MVC -->
|
29
|
-
<script type="text/javascript" src="../ext-mvc-all.js"></script>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<!-- Specs -->
|
33
|
-
<div id="specs">
|
34
|
-
<script type="text/javascript" src="SpecHelper.js"></script>
|
35
|
-
|
36
|
-
<!-- General MVC specs -->
|
37
|
-
<script type="text/javascript" src="ExtMVC.spec.js"></script>
|
38
|
-
<script type="text/javascript" src="OS.spec.js"></script>
|
39
|
-
|
40
|
-
<!-- Model specs -->
|
41
|
-
<script type="text/javascript" src="Model.spec.js"></script>
|
42
|
-
<script type="text/javascript" src="model/Validations.spec.js"></script>
|
43
|
-
<script type="text/javascript" src="model/ValidationErrors.spec.js"></script>
|
44
|
-
<script type="text/javascript" src="model/ValidationsPlugin.spec.js"></script>
|
45
|
-
|
46
|
-
<script type="text/javascript" src="model/Associations.spec.js"></script>
|
47
|
-
|
48
|
-
<script type="text/javascript" src="model/AbstractAdapter.spec.js"></script>
|
49
|
-
<script type="text/javascript" src="model/RESTAdapter.spec.js"></script>
|
50
|
-
|
51
|
-
<!-- Router specs -->
|
52
|
-
<script type="text/javascript" src="Router.spec.js"></script>
|
53
|
-
|
54
|
-
<!-- Augmentation specs -->
|
55
|
-
<script type="text/javascript" src="String.spec.js"></script>
|
56
|
-
<script type="text/javascript" src="Array.spec.js"></script>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
</body>
|
60
|
-
</html>
|
@@ -1,216 +0,0 @@
|
|
1
|
-
@CHARSET "UTF-8";
|
2
|
-
|
3
|
-
/* --------------------
|
4
|
-
* @Layout
|
5
|
-
*/
|
6
|
-
|
7
|
-
html {
|
8
|
-
overflow: hidden;
|
9
|
-
}
|
10
|
-
|
11
|
-
body, #jsspec_container {
|
12
|
-
overflow: hidden;
|
13
|
-
padding: 0;
|
14
|
-
margin: 0;
|
15
|
-
width: 100%;
|
16
|
-
height: 100%;
|
17
|
-
}
|
18
|
-
|
19
|
-
#title {
|
20
|
-
padding: 0;
|
21
|
-
margin: 0;
|
22
|
-
position: absolute;
|
23
|
-
top: 0px;
|
24
|
-
left: 0px;
|
25
|
-
width: 100%;
|
26
|
-
height: 40px;
|
27
|
-
overflow: hidden;
|
28
|
-
}
|
29
|
-
|
30
|
-
#list {
|
31
|
-
padding: 0;
|
32
|
-
margin: 0;
|
33
|
-
position: absolute;
|
34
|
-
top: 40px;
|
35
|
-
left: 0px;
|
36
|
-
bottom: 0px;
|
37
|
-
overflow: auto;
|
38
|
-
width: 250px;
|
39
|
-
_height:expression(document.body.clientHeight-40);
|
40
|
-
}
|
41
|
-
|
42
|
-
#log {
|
43
|
-
padding: 0;
|
44
|
-
margin: 0;
|
45
|
-
position: absolute;
|
46
|
-
top: 40px;
|
47
|
-
left: 250px;
|
48
|
-
right: 0px;
|
49
|
-
bottom: 0px;
|
50
|
-
overflow: auto;
|
51
|
-
_height:expression(document.body.clientHeight-40);
|
52
|
-
_width:expression(document.body.clientWidth-250);
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
/* --------------------
|
58
|
-
* @Decorations and colors
|
59
|
-
*/
|
60
|
-
* {
|
61
|
-
padding: 0;
|
62
|
-
margin: 0;
|
63
|
-
font-family: "Lucida Grande", Helvetica, sans-serif;
|
64
|
-
}
|
65
|
-
|
66
|
-
li {
|
67
|
-
list-style: none;
|
68
|
-
}
|
69
|
-
|
70
|
-
/* hiding subtitles */
|
71
|
-
h2 {
|
72
|
-
display: none;
|
73
|
-
}
|
74
|
-
|
75
|
-
/* title section */
|
76
|
-
div#title {
|
77
|
-
padding: 0em 0.5em;
|
78
|
-
}
|
79
|
-
|
80
|
-
div#title h1 {
|
81
|
-
font-size: 1.5em;
|
82
|
-
float: left;
|
83
|
-
}
|
84
|
-
|
85
|
-
div#title ul li {
|
86
|
-
float: left;
|
87
|
-
padding: 0.5em 0em 0.5em 0.75em;
|
88
|
-
}
|
89
|
-
|
90
|
-
div#title p {
|
91
|
-
float:right;
|
92
|
-
margin-right:1em;
|
93
|
-
font-size: 0.75em;
|
94
|
-
}
|
95
|
-
|
96
|
-
/* spec container */
|
97
|
-
ul.specs {
|
98
|
-
margin: 0.5em;
|
99
|
-
}
|
100
|
-
ul.specs li {
|
101
|
-
margin-bottom: 0.1em;
|
102
|
-
}
|
103
|
-
|
104
|
-
/* spec title */
|
105
|
-
ul.specs li h3 {
|
106
|
-
font-weight: bold;
|
107
|
-
font-size: 0.75em;
|
108
|
-
padding: 0.2em 1em;
|
109
|
-
cursor: pointer;
|
110
|
-
_cursor: hand;
|
111
|
-
}
|
112
|
-
|
113
|
-
/* example container */
|
114
|
-
ul.examples li {
|
115
|
-
border-style: solid;
|
116
|
-
border-width: 0px 0px 1px 5px;
|
117
|
-
margin: 0.2em 0em 0.2em 1em;
|
118
|
-
}
|
119
|
-
|
120
|
-
/* example title */
|
121
|
-
ul.examples li h4 {
|
122
|
-
font-weight: normal;
|
123
|
-
font-size: 0.75em;
|
124
|
-
margin-left: 1em;
|
125
|
-
}
|
126
|
-
|
127
|
-
/* example explaination */
|
128
|
-
ul.examples li div {
|
129
|
-
padding: 1em 2em;
|
130
|
-
font-size: 0.75em;
|
131
|
-
}
|
132
|
-
|
133
|
-
/* styles for ongoing, success, failure, error */
|
134
|
-
div.success, div.success a {
|
135
|
-
color: #FFFFFF;
|
136
|
-
background-color: #65C400;
|
137
|
-
}
|
138
|
-
|
139
|
-
ul.specs li.success h3, ul.specs li.success h3 a {
|
140
|
-
color: #FFFFFF;
|
141
|
-
background-color: #65C400;
|
142
|
-
}
|
143
|
-
|
144
|
-
ul.examples li.success, ul.examples li.success a {
|
145
|
-
color: #3D7700;
|
146
|
-
background-color: #DBFFB4;
|
147
|
-
border-color: #65C400;
|
148
|
-
}
|
149
|
-
|
150
|
-
div.exception, div.exception a {
|
151
|
-
color: #FFFFFF;
|
152
|
-
background-color: #C20000;
|
153
|
-
}
|
154
|
-
|
155
|
-
ul.specs li.exception h3, ul.specs li.exception h3 a {
|
156
|
-
color: #FFFFFF;
|
157
|
-
background-color: #C20000;
|
158
|
-
}
|
159
|
-
|
160
|
-
ul.examples li.exception, ul.examples li.exception a {
|
161
|
-
color: #C20000;
|
162
|
-
background-color: #FFFBD3;
|
163
|
-
border-color: #C20000;
|
164
|
-
}
|
165
|
-
|
166
|
-
div.ongoing, div.ongoing a {
|
167
|
-
color: #000000;
|
168
|
-
background-color: #FFFF80;
|
169
|
-
}
|
170
|
-
|
171
|
-
ul.specs li.ongoing h3, ul.specs li.ongoing h3 a {
|
172
|
-
color: #000000;
|
173
|
-
background-color: #FFFF80;
|
174
|
-
}
|
175
|
-
|
176
|
-
ul.examples li.ongoing, ul.examples li.ongoing a {
|
177
|
-
color: #000000;
|
178
|
-
background-color: #FFFF80;
|
179
|
-
border-color: #DDDD00;
|
180
|
-
}
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
/* --------------------
|
185
|
-
* values
|
186
|
-
*/
|
187
|
-
.number_value, .string_value, .regexp_value, .boolean_value, .dom_value {
|
188
|
-
font-family: monospace;
|
189
|
-
color: blue;
|
190
|
-
}
|
191
|
-
.object_value, .array_value {
|
192
|
-
line-height: 2em;
|
193
|
-
padding: 0.1em 0.2em;
|
194
|
-
margin: 0.1em 0;
|
195
|
-
}
|
196
|
-
.date_value {
|
197
|
-
font-family: monospace;
|
198
|
-
color: olive;
|
199
|
-
}
|
200
|
-
.undefined_value, .null_value {
|
201
|
-
font-style: italic;
|
202
|
-
color: blue;
|
203
|
-
}
|
204
|
-
.dom_attr_name {
|
205
|
-
}
|
206
|
-
.dom_attr_value {
|
207
|
-
color: red;
|
208
|
-
}
|
209
|
-
.dom_path {
|
210
|
-
font-size: 0.75em;
|
211
|
-
color: gray;
|
212
|
-
}
|
213
|
-
strong {
|
214
|
-
font-weight: normal;
|
215
|
-
background-color: #FFC6C6;
|
216
|
-
}
|