3 | `{{name}}` {{#if type}}
<{{#crossLink type}}{{/crossLink}}>{{/if}}
4 | {{#if extended_from}}
`/* Extended from {{extended_from}} */`{{/if}}
5 | {{#if overwritten_from}}
`/* Overwritten from {{name}} */`{{/if}}
6 |
7 |
`{{file}}:{{line}}`
8 | {{{eventDescription}}}
9 | {{#if params}}
10 |
Extra event object properties:
11 |
12 | {{#params}}
13 | -
14 | {{#if optional}}
15 | `[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]` <{{#crossLink type}}{{/crossLink}}>
16 | {{else}}
17 | `{{name}}` <{{#crossLink type}}{{/crossLink}}>
18 | {{/if}}
19 | {{#if multiple}}
20 | (*..n)
21 | {{/if}}
22 | {{{description}}}
23 | {{#if props}}
24 |
25 | {{#props}}
26 | - `{{name}}` <{{#crossLink type}}{{/crossLink}}> {{{description}}}
27 | {{/props}}
28 |
29 | {{/if}}
30 |
31 | {{/params}}
32 |
33 | {{/if}}
34 |
35 |
36 |
--------------------------------------------------------------------------------
/samples/sample/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
3 | `{{name}}` {{#if type}}
<{{#crossLink type}}{{/crossLink}}>{{/if}}
4 | {{#if extended_from}}
`/* Extended from {{extended_from}} */`{{/if}}
5 | {{#if overwritten_from}}
`/* Overwritten from {{name}} */`{{/if}}
6 |
7 |
`{{file}}:{{line}}`
8 | {{{attrDescription}}}
9 | {{#if emit}}
10 |
11 | Fires:
`{{name}}Change(e)`
12 |
Fires when the value for the configuration attribute `{{name}}` is changed. You can listen for the event using the `on` method if you wish to be notified before the attribute's value has changed, or using the `after` method if you wish to be notified after the attribute's value has changed.
13 |
Parameters:
14 | `e`
<EventFacade> An Event Facade object with the following attribute specific properties added:
15 |
16 | - `prevVal` The value of the attribute, prior to it being set
17 | - `newVal` The value the attribute is to be set to
18 | - `attrName` The name of the attribute being set
19 | - `subAttrName` If setting a property within the attribute's value, the name of the sub-attribute property being set
20 |
21 |
22 | {{/if}}
23 |
24 |
--------------------------------------------------------------------------------
/samples/sample-ui/app/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
28 |
29 | {{#if methods}}
30 | - Methods
31 | {{/if}}
32 | {{#if properties}}
33 | - Properties
34 | {{/if}}
35 | {{#if attrs}}
36 | - Attributes
37 | {{/if}}
38 | {{#if events}}
39 | - Events
40 | {{/if}}
41 |
42 |
43 | {{#if methods}}
44 |
45 | {{#methods}}
46 | {{>method}}
47 | {{/methods}}
48 |
49 | {{/if}}
50 | {{#if properties}}
51 |
52 | {{#properties}}
53 | {{>props}}
54 | {{/properties}}
55 |
56 | {{/if}}
57 | {{#if attrs}}
58 |
59 | {{#attrs}}
60 | {{>attrs}}
61 | {{/attrs}}
62 |
63 | {{/if}}
64 | {{#if events}}
65 |
66 | {{#events}}
67 | {{>events}}
68 | {{/events}}
69 |
70 | {{/if}}
71 |
72 |
73 |
--------------------------------------------------------------------------------
/website/theme/partials/method.handlebars:
--------------------------------------------------------------------------------
1 |
3 | {{#if final}}
final {{/if}}
{{name}} ({{paramsList}}) {{#if access}}
`/* {{access}} method */`{{/if}}
4 |
5 | {{{methodDescription}}}
6 | {{#if params}}
7 |
Parameters:
8 |
9 | {{#params}}
10 | -
11 | {{#if optional}}
12 | `[{{name}}{{#if optdefault}}={{optdefault}}{{/if}}]` <{{#crossLink type}}{{/crossLink}}>
13 | {{else}}
14 | `{{name}}` <{{#crossLink type}}{{/crossLink}}>
15 | {{/if}}
16 | {{#if multiple}}
17 | (*..n)
18 | {{/if}}
19 | {{{description}}}
20 | {{#if props}}
21 |
22 | {{#props}}
23 | - `{{name}}` <{{#crossLink type}}{{/crossLink}}> {{{description}}}
24 | {{#if props}}
25 |
26 | {{#props}}
27 | - `{{name}}` <{{#crossLink type}}{{/crossLink}}> {{{description}}}
28 | {{/props}}
29 |
30 | {{/if}}
31 |
32 | {{/props}}
33 |
34 | {{/if}}
35 |
36 | {{/params}}
37 |
38 | {{/if}}
39 | {{#if return}}
40 | {{#return}}
41 |
Returns: {{#if type}}<{{#crossLink type}}{{/crossLink}}> {{/if}}{{{description}}}
42 | {{/return}}
43 | {{/if}}
44 | {{#if example}}
45 |
Example:
46 | {{{example}}}
47 | {{/if}}
48 |
49 |
--------------------------------------------------------------------------------
/website/less/ubuntu.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Ubuntu';
3 | font-style: normal;
4 | font-weight: 300;
5 | src: local('Ubuntu Light'), local('Ubuntu-Light'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
6 | }
7 | @font-face {
8 | font-family: 'Ubuntu';
9 | font-style: normal;
10 | font-weight: 400;
11 | src: local('Ubuntu'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/vRvZYZlUaogOuHbBTT1SNevvDin1pK8aKteLpeZ5c0A.woff) format('woff');
12 | }
13 | @font-face {
14 | font-family: 'Ubuntu';
15 | font-style: normal;
16 | font-weight: 500;
17 | src: local('Ubuntu Medium'), local('Ubuntu-Medium'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
18 | }
19 | @font-face {
20 | font-family: 'Ubuntu';
21 | font-style: normal;
22 | font-weight: 700;
23 | src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
24 | }
25 | @font-face {
26 | font-family: 'Ubuntu';
27 | font-style: italic;
28 | font-weight: 300;
29 | src: local('Ubuntu Light Italic'), local('Ubuntu-LightItalic'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/DZ_YjBPqZ88vcZCcIXm6VrrIa-7acMAeDBVuclsi6Gc.woff) format('woff');
30 | }
31 | @font-face {
32 | font-family: 'Ubuntu';
33 | font-style: italic;
34 | font-weight: 400;
35 | src: local('Ubuntu Italic'), local('Ubuntu-Italic'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/kbP_6ONYVgE-bLa9ZRbvvnYhjbSpvc47ee6xR_80Hnw.woff) format('woff');
36 | }
37 | @font-face {
38 | font-family: 'Ubuntu';
39 | font-style: italic;
40 | font-weight: 500;
41 | src: local('Ubuntu Medium Italic'), local('Ubuntu-MediumItalic'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/ohKfORL_YnhBMzkCPoIqwrrIa-7acMAeDBVuclsi6Gc.woff) format('woff');
42 | }
43 | @font-face {
44 | font-family: 'Ubuntu';
45 | font-style: italic;
46 | font-weight: 700;
47 | src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/ubuntu/v4/OMD20Sg9RTs7sUORCEN-7brIa-7acMAeDBVuclsi6Gc.woff) format('woff');
48 | }
--------------------------------------------------------------------------------
/src/dsl/property.js:
--------------------------------------------------------------------------------
1 | var _computedPropery = Ember.computed(function (key, value, oldValue) {
2 | var temp = this.get('data').findProperty('key', key);
3 |
4 | if (!temp) {
5 | temp = this.get('data').pushObject(Em.Object.create({
6 | key: key,
7 | value: value,
8 | orig: value
9 | }));
10 | } else {
11 | temp.value = value;
12 | }
13 |
14 | if (oldValue) {
15 | this.set('isDirty', true);
16 | }
17 |
18 | return temp.value;
19 | });
20 |
21 | /**
22 | @namespace Milo
23 | @module milo-dsl
24 | @class property
25 | */
26 | Milo.property = function (type, options) {
27 | options = options || {};
28 | options.occurrences = "one";
29 | options.embedded = true;
30 | options.type = type || 'string';
31 | options.defaultValue = (options.defaultValue === undefined) ? null : options.defaultValue;
32 | options.operations = (options.operations === undefined) ? ['put', 'post'] : options.operations;
33 | options.validationRules = (options.validationRules === undefined) ? {} : options.validationRules;
34 |
35 | return _computedPropery.property().meta(options);
36 | };
37 |
38 | /**
39 | @namespace Milo
40 | @module milo-dsl
41 | @class collection
42 | */
43 | Milo.collection = function (type, options) {
44 | options = options || {};
45 | options.occurrences = "many";
46 | options.embedded = options.embedded || false ? true : false;
47 | options.type = type || 'string';
48 | options.defaultValue = (options.defaultValue === undefined) ? null : options.defaultValue;
49 | options.operations = (options.operations === undefined) ? ['put', 'post'] : options.operations;
50 | options.validationRules = (options.validationRules === undefined) ? {} : options.validationRules;
51 |
52 | if (options.embedded) {
53 | return _computedPropery.property().meta(options);
54 | } else {
55 | return Ember.computed(function (key, value, oldValue) {
56 | var parentName = this.constructor.toString(),
57 | param = '%@Id'.fmt(parentName.substring(parentName.indexOf('.') + 1, parentName.length)).camelize(),
58 | findParams = JSON.parse(JSON.stringify(this.get('anyClause') || {}));
59 |
60 | type = (typeof(type) === 'string') ? Em.get(type) : type;
61 |
62 | findParams[param] = findParams.id || this.get('id');
63 | delete findParams.id;
64 |
65 | return type.find(findParams);
66 | }).property().volatile().meta(options);
67 | }
68 | };
69 |
--------------------------------------------------------------------------------
/website/theme/partials/sidebar.handlebars:
--------------------------------------------------------------------------------
1 |
37 |
38 |
Methods On Page
39 |
40 |
41 |
42 | {{#methods}}
43 | - {{name}}
44 | {{/methods}}
45 |
46 |
47 |
48 | {{/if}}
49 |
50 | {{#if events}}
51 |
82 |
83 |
Attributes On Page
84 |
85 |
86 |
87 | {{#events}}
88 | - {{name}}
89 | {{/events}}
90 |
91 |
92 |
93 | {{/if}}
94 |
95 | {{#if fileTree}}
96 |