Commit c5ec7d2e authored by Romain Courteaud's avatar Romain Courteaud

Explicitely make local renderJS parameter non JSLint compliant.

It may help developper to see all properties which are not part of the API.
parent 76805e06
...@@ -78,12 +78,12 @@ module.exports = function (grunt) { ...@@ -78,12 +78,12 @@ module.exports = function (grunt) {
'QUnit', 'QUnit',
'renderJS', 'renderJS',
'rJS', 'rJS',
'RenderJSGadget', '__RenderJSGadget',
'sinon', 'sinon',
'RSVP', 'RSVP',
'DOMParser', 'DOMParser',
'RenderJSIframeGadget', '__RenderJSIframeGadget',
'RenderJSEmbeddedGadget' '__RenderJSEmbeddedGadget'
] ]
} }
}, },
......
/*global ace */ /*global ace */
/*jslint nomen: true*/
(function (window, rJS) { (function (window, rJS) {
"use strict"; "use strict";
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
}); });
gk.ready(function (g) { gk.ready(function (g) {
g.editor = ace.edit(g.element.getElementsByTagName('div')[0]); g.editor = ace.edit(g.__element.getElementsByTagName('div')[0]);
g.editor.setTheme("ace/theme/monokai"); g.editor.setTheme("ace/theme/monokai");
}); });
......
/*jslint nomen: true*/
(function (window, rJS) { (function (window, rJS) {
"use strict"; "use strict";
...@@ -11,11 +12,11 @@ ...@@ -11,11 +12,11 @@
var gk = rJS(window); var gk = rJS(window);
gk.declareMethod('setContent', function (value) { gk.declareMethod('setContent', function (value) {
this.element.getElementsByTagName('textarea')[0].value = this.__element.getElementsByTagName('textarea')[0].value =
escape_text(value); escape_text(value);
}) })
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
return this.element.getElementsByTagName('textarea')[0].value; return this.__element.getElementsByTagName('textarea')[0].value;
}); });
}(window, rJS)); }(window, rJS));
/*jslint nomen: true*/
(function (window, rJS, $) { (function (window, rJS, $) {
"use strict"; "use strict";
...@@ -5,13 +6,13 @@ ...@@ -5,13 +6,13 @@
gk.declareMethod('setContent', function (value) { gk.declareMethod('setContent', function (value) {
// return this.context.find('textarea').val(escape_text(value)); // return this.context.find('textarea').val(escape_text(value));
return $(this.element).find('#textarea-b').jqteVal(value); return $(this.__element).find('#textarea-b').jqteVal(value);
}) })
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
return $(this.element).find('#textarea-b').val(); return $(this.__element).find('#textarea-b').val();
}); });
gk.ready(function (g) { gk.ready(function (g) {
$(g.element).find("#textarea-b").jqte(); $(g.__element).find("#textarea-b").jqte();
}); });
}(window, rJS, jQuery)); }(window, rJS, jQuery));
/*global console */ /*global console */
/*jslint nomen: true*/
(function (window, $, rJS, RSVP) { (function (window, $, rJS, RSVP) {
"use strict"; "use strict";
...@@ -6,8 +7,8 @@ ...@@ -6,8 +7,8 @@
var editor = all_param[0], var editor = all_param[0],
io = all_param[1], io = all_param[1],
id = all_param[2]; id = all_param[2];
$(io.element).trigger('create'); $(io.__element).trigger('create');
$(editor.element).trigger('create'); $(editor.__element).trigger('create');
// .then(function (element) { // .then(function (element) {
// element.trigger('create'); // element.trigger('create');
// }); // });
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
]) ])
.then(function (all_param) { .then(function (all_param) {
i_c.empty(); i_c.empty();
i_c[0].appendChild(all_param[1].element); i_c[0].appendChild(all_param[1].__element);
return attachIOToEditor(all_param); return attachIOToEditor(all_param);
}) })
.fail(handleError); .fail(handleError);
...@@ -64,8 +65,8 @@ ...@@ -64,8 +65,8 @@
} }
rJS(window).ready(function (g) { rJS(window).ready(function (g) {
var editor_a_context = $(g.element).find(".editor_a").last(), var editor_a_context = $(g.__element).find(".editor_a").last(),
io_a_context = $(g.element).find(".editor_a_safe").last(); io_a_context = $(g.__element).find(".editor_a_safe").last();
// editor_b_context = g.context.find(".editor_b").last(), // editor_b_context = g.context.find(".editor_b").last(),
// io_b_context = g.context.find(".editor_b_safe").last(); // io_b_context = g.context.find(".editor_b_safe").last();
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
]); ]);
}) })
.then(function (all_list) { .then(function (all_list) {
var panel_context = $(g.element).find(".bare_panel"), var panel_context = $(g.__element).find(".bare_panel"),
editor_list = all_list[0], editor_list = all_list[0],
io_list = all_list[1], io_list = all_list[1],
editor_definition, editor_definition,
...@@ -102,7 +103,7 @@ ...@@ -102,7 +103,7 @@
]) ])
.then(function (all_param) { .then(function (all_param) {
io_a_context.empty(); io_a_context.empty();
io_a_context[0].appendChild(all_param[1].element); io_a_context[0].appendChild(all_param[1].__element);
return attachIOToEditor(all_param); return attachIOToEditor(all_param);
}) })
.then(function () { .then(function () {
......
This diff is collapsed.
/*jslint nomen: true*/
(function (window, rJS) { (function (window, rJS) {
"use strict"; "use strict";
...@@ -11,8 +12,8 @@ ...@@ -11,8 +12,8 @@
return ready_called; return ready_called;
}) })
.declareMethod('isSubGadgetDictInitialize', function () { .declareMethod('isSubGadgetDictInitialize', function () {
return ((this.hasOwnProperty("sub_gadget_dict")) && return ((this.hasOwnProperty("__sub_gadget_dict")) &&
(JSON.stringify(this.sub_gadget_dict) === "{}")); (JSON.stringify(this.__sub_gadget_dict) === "{}"));
}) })
.declareMethod('triggerError', function (value) { .declareMethod('triggerError', function (value) {
throw new Error("Manually triggered embedded error"); throw new Error("Manually triggered embedded error");
......
This diff is collapsed.
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