-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
39 lines (35 loc) · 1.09 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS */
(function (window, rJS) {
"use strict";
rJS(window)
.ready(function (my_gadget) {
my_gadget.property_dict = {};
return new RSVP.Queue()
.push(function () {
return my_gadget.getElement();
})
.push(function (my_element) {
my_gadget.property_dict.element = my_element;
});
})
.declareMethod('render', function (my_option_dict) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.declareGadget("gadget_textitor.html",
{"scope":"textitor"}
);
})
.push(function (my_declared_gadget) {
return my_declared_gadget.render(my_option_dict || {});
})
.push(function (my_rendered_gadget) {
gadget.property_dict.element.appendChild(my_rendered_gadget.property_dict.element);
})
.push(undefined, function (my_error) {
console.log(my_error);
document.body.textContent = my_error;
});
});
}(window, rJS));