Commit c2fc0402 authored by Romain Courteaud's avatar Romain Courteaud Committed by Jérome Perrin

Drop duplicated code.

parent 29ea1090
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<title>Create Document</title> <title>Create Document</title>
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="create_document.js" type="text/javascript"></script> <script src="create_document.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, promiseEventListener, promiseReadAsText */ /*global rJS, RSVP, promiseEventListener, promiseReadAsText,
(function (window, rJS, RSVP, promiseEventListener, promiseReadAsText) { initGadgetMixin */
(function (window, rJS, RSVP, promiseEventListener, promiseReadAsText,
initGadgetMixin) {
"use strict"; "use strict";
rJS(window) var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -12,22 +16,6 @@ ...@@ -12,22 +16,6 @@
.declareAcquiredMethod("whoWantToDisplayThisDocument", .declareAcquiredMethod("whoWantToDisplayThisDocument",
"whoWantToDisplayThisDocument") "whoWantToDisplayThisDocument")
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -83,4 +71,5 @@ ...@@ -83,4 +71,5 @@
}); });
}); });
}(window, rJS, RSVP, promiseEventListener, promiseReadAsText)); }(window, rJS, RSVP, promiseEventListener, promiseReadAsText,
initGadgetMixin));
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<title>Debug JSON</title> <title>Debug JSON</title>
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="debug_json.js" type="text/javascript"></script> <script src="debug_json.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin */ /*global console, rJS, RSVP, initDocumentPageMixin, initGadgetMixin */
(function (window, rJS, RSVP, initDocumentPageMixin) { (function (window, rJS, RSVP, initDocumentPageMixin, initGadgetMixin) {
"use strict"; "use strict";
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -56,4 +41,4 @@ ...@@ -56,4 +41,4 @@
}); });
}(window, rJS, RSVP, initDocumentPageMixin)); }(window, rJS, RSVP, initDocumentPageMixin, initGadgetMixin));
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</ul> </ul>
</script> </script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="document_list.js" type="text/javascript"></script> <script src="document_list.js" type="text/javascript"></script>
</head> </head>
<body> <body>
......
/*global console, rJS, RSVP, Handlebars */ /*global console, rJS, RSVP, Handlebars, initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, Handlebars) { (function (window, rJS, RSVP, Handlebars, initGadgetMixin) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -13,24 +13,9 @@ ...@@ -13,24 +13,9 @@
.innerHTML, .innerHTML,
table_template = Handlebars.compile(source); table_template = Handlebars.compile(source);
initGadgetMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -95,4 +80,4 @@ ...@@ -95,4 +80,4 @@
return [{title: "New Document", link: url}]; return [{title: "New Document", link: url}];
}); });
}); });
}(window, rJS, RSVP, Handlebars)); }(window, rJS, RSVP, Handlebars, initGadgetMixin));
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="edit_table.js" type="text/javascript"></script> <script src="edit_table.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin */ /*global console, rJS, RSVP, initDocumentPageMixin, initGadgetMixin */
(function (window, rJS, RSVP, initDocumentPageMixin) { (function (window, rJS, RSVP, initDocumentPageMixin, initGadgetMixin) {
"use strict"; "use strict";
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
initGadgetMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -57,4 +42,4 @@ ...@@ -57,4 +42,4 @@
return tableeditor.startService(); return tableeditor.startService();
}); });
}); });
}(window, rJS, RSVP, initDocumentPageMixin)); }(window, rJS, RSVP, initDocumentPageMixin, initGadgetMixin));
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="exit_stat.js" type="text/javascript"></script> <script src="exit_stat.js" type="text/javascript"></script>
......
/*global console, rJS, RSVP, initDocumentPageMixin, Handlebars */ /*global console, rJS, RSVP, initDocumentPageMixin, Handlebars,
initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, initDocumentPageMixin, Handlebars) { (function (window, rJS, RSVP, initDocumentPageMixin, Handlebars,
initGadgetMixin) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -122,24 +124,9 @@ ...@@ -122,24 +124,9 @@
return result; return result;
} }
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -165,4 +152,4 @@ ...@@ -165,4 +152,4 @@
gadget.props.element.innerHTML = result; gadget.props.element.innerHTML = result;
}); });
}); });
}(window, rJS, RSVP, initDocumentPageMixin, Handlebars)); }(window, rJS, RSVP, initDocumentPageMixin, Handlebars, initGadgetMixin));
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.handlebars.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jquerymobilejs.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquerymobilejs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="index.js" type="text/javascript"></script> <script src="index.js" type="text/javascript"></script>
<script id="navigation-template" type="text/x-handlebars-template"> <script id="navigation-template" type="text/x-handlebars-template">
......
/*global console, jQuery, rJS, RSVP, alert, Handlebars */ /*global console, jQuery, rJS, RSVP, alert, Handlebars, initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, $, rJS, RSVP, Handlebars) { (function (window, $, rJS, RSVP, Handlebars, initGadgetMixin) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
$.mobile.hashListeningEnabled = false; $.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false; $.mobile.pushStateEnabled = false;
var navigation_template; var navigation_template,
gadget_klass = rJS(window);
rJS(window) initGadgetMixin(gadget_klass);
gadget_klass
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -94,19 +95,6 @@ ...@@ -94,19 +95,6 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// ready // ready
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
// Create some link on the page // Create some link on the page
.ready(function (g) { .ready(function (g) {
return g.aq_pleasePublishMyState({}) return g.aq_pleasePublishMyState({})
...@@ -215,4 +203,4 @@ ...@@ -215,4 +203,4 @@
} }
}); });
}); });
}(window, jQuery, rJS, RSVP, Handlebars)); }(window, jQuery, rJS, RSVP, Handlebars, initGadgetMixin));
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.dhtmlxganttjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.dhtmlxganttjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="job_gantt.js" type="text/javascript"></script> <script src="job_gantt.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery, gantt */ /*global console, rJS, RSVP, initDocumentPageMixin, jQuery, gantt,
initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, initDocumentPageMixin, $, gantt) { (function (window, rJS, RSVP, initDocumentPageMixin, $, gantt,
initGadgetMixin) {
"use strict"; "use strict";
gantt.templates.task_class = function (start, end, obj) { gantt.templates.task_class = function (start, end, obj) {
...@@ -200,24 +202,9 @@ ...@@ -200,24 +202,9 @@
} }
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -271,4 +258,4 @@ ...@@ -271,4 +258,4 @@
throw error; throw error;
}); });
}); });
}(window, rJS, RSVP, initDocumentPageMixin, jQuery, gantt)); }(window, rJS, RSVP, initDocumentPageMixin, jQuery, gantt, initGadgetMixin));
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.momentjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.momentjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="job_schedule_spreadsheet.js" type="text/javascript"></script> <script src="job_schedule_spreadsheet.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin, moment */ /*global console, rJS, RSVP, initDocumentPageMixin, moment, initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, initDocumentPageMixin, moment) { (function (window, rJS, RSVP, initDocumentPageMixin, moment, initGadgetMixin) {
"use strict"; "use strict";
function job_schedule_spreadsheet_widget(all_data) { function job_schedule_spreadsheet_widget(all_data) {
...@@ -149,23 +149,9 @@ ...@@ -149,23 +149,9 @@
} }
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
...@@ -220,4 +206,4 @@ ...@@ -220,4 +206,4 @@
return tableeditor.startService(); return tableeditor.startService();
}); });
}); });
}(window, rJS, RSVP, initDocumentPageMixin, moment)); }(window, rJS, RSVP, initDocumentPageMixin, moment, initGadgetMixin));
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jquerymobilejs.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquerymobilejs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="manage_document.js" type="text/javascript"></script> <script src="manage_document.js" type="text/javascript"></script>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery, /*global console, rJS, RSVP, initDocumentPageMixin, jQuery,
promiseEventListener */ promiseEventListener, initGadgetMixin */
(function (window, rJS, RSVP, initDocumentPageMixin, $, promiseEventListener) { (function (window, rJS, RSVP, initDocumentPageMixin, $, promiseEventListener,
initGadgetMixin) {
"use strict"; "use strict";
function datatouri(data, mime_type) { function datatouri(data, mime_type) {
...@@ -102,24 +103,9 @@ ...@@ -102,24 +103,9 @@
} }
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -167,4 +153,5 @@ ...@@ -167,4 +153,5 @@
waitForKnowledgeExtraction(this) waitForKnowledgeExtraction(this)
]); ]);
}); });
}(window, rJS, RSVP, initDocumentPageMixin, jQuery, promiseEventListener)); }(window, rJS, RSVP, initDocumentPageMixin, jQuery, promiseEventListener,
initGadgetMixin));
(function (window) {
"use strict";
window.initGadgetMixin = function (gadget_klass) {
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
});
};
}(window));
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script> <script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jqueryflot.relative_dest %>"></script> <script src="../<%= curl.jqueryflot.relative_dest %>"></script>
<script src="../<%= curl.jqueryflotstack.relative_dest %>"></script> <script src="../<%= curl.jqueryflotstack.relative_dest %>"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="queue_stat_graph.js" type="text/javascript"></script> <script src="queue_stat_graph.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery */ /*global console, rJS, RSVP, initDocumentPageMixin, jQuery, initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, initDocumentPageMixin, $) { (function (window, rJS, RSVP, initDocumentPageMixin, $, initGadgetMixin) {
"use strict"; "use strict";
function queue_stat_widget(output_data) { function queue_stat_widget(output_data) {
...@@ -18,24 +18,9 @@ ...@@ -18,24 +18,9 @@
} }
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -68,4 +53,4 @@ ...@@ -68,4 +53,4 @@
this.props.series this.props.series
); );
}); });
}(window, rJS, RSVP, initDocumentPageMixin, jQuery)); }(window, rJS, RSVP, initDocumentPageMixin, jQuery, initGadgetMixin));
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<label>{{label}}</label> <label>{{label}}</label>
</script> </script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="run_simulation.js" type="text/javascript"></script> <script src="run_simulation.js" type="text/javascript"></script>
......
/*global rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars, /*global rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars,
promiseEventListener */ promiseEventListener, initGadgetMixin */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, initDocumentPageMixin, $, Handlebars, (function (window, rJS, RSVP, initDocumentPageMixin, $, Handlebars,
promiseEventListener) { promiseEventListener, initGadgetMixin) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -15,24 +15,9 @@ ...@@ -15,24 +15,9 @@
.innerHTML, .innerHTML,
label_template = Handlebars.compile(source); label_template = Handlebars.compile(source);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -167,4 +152,4 @@ ...@@ -167,4 +152,4 @@
}); });
}); });
}(window, rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars, }(window, rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars,
promiseEventListener)); promiseEventListener, initGadgetMixin));
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script> <script src="../<%= curl.jquery.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.jqueryflot.relative_dest %>"></script> <script src="../<%= curl.jqueryflot.relative_dest %>"></script>
<script src="../<%= curl.jqueryflotstack.relative_dest %>"></script> <script src="../<%= curl.jqueryflotstack.relative_dest %>"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_document_page.js" type="text/javascript"></script> <script src="mixin_document_page.js" type="text/javascript"></script>
<script src="station_utilisation_graph.js" type="text/javascript"></script> <script src="station_utilisation_graph.js" type="text/javascript"></script>
</head> </head>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery */ /*global console, rJS, RSVP, initDocumentPageMixin, jQuery, initGadgetMixin */
(function (window, rJS, RSVP, initDocumentPageMixin, $) { (function (window, rJS, RSVP, initDocumentPageMixin, $, initGadgetMixin) {
"use strict"; "use strict";
function station_utilisation_graph_widget(output_data) { function station_utilisation_graph_widget(output_data) {
...@@ -123,24 +123,9 @@ ...@@ -123,24 +123,9 @@
} }
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
initDocumentPageMixin(gadget_klass); initDocumentPageMixin(gadget_klass);
gadget_klass gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -174,4 +159,4 @@ ...@@ -174,4 +159,4 @@
this.props.result_list[1] this.props.result_list[1]
); );
}); });
}(window, rJS, RSVP, initDocumentPageMixin, jQuery)); }(window, rJS, RSVP, initDocumentPageMixin, jQuery, initGadgetMixin));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment