Commit 9a411caf authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] JSLint

parent 258067c2
......@@ -112,8 +112,8 @@
evt.preventDefault();
return createColumnItemTemplate(gadget, undefined, gadget.state.displayable_column_list)
.push(function (template) {
var tmp = document.createElement("div"),
container = gadget.element.querySelector(".column_item_container");
var tmp = document.createElement("div");
container = gadget.element.querySelector(".column_item_container");
tmp.innerHTML = template;
container.appendChild(tmp);
});
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.34874.4247.30668</string> </value>
<value> <string>965.41976.11439.18449</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1518777250.01</float>
<float>1526656334.61</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, document, rJS, RSVP */
/*global window, document, rJS */
/*jslint indent: 2, maxerr: 3 */
/**
* Label gadget takes care of displaying validation errors and label.
......@@ -11,7 +11,7 @@
* - class "horizontal_align_form_box" will prevent any label to show as well
*
*/
(function (window, document, rJS, RSVP) {
(function (window, document, rJS) {
"use strict";
var SCOPE = 'field';
......@@ -231,4 +231,4 @@
return this.changeState({first_call: true, error_text: error_text});
});
}(window, document, rJS, RSVP));
\ No newline at end of file
}(window, document, rJS));
\ No newline at end of file
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.36537.34665.7628</string> </value>
<value> <string>967.40818.40178.55500</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1526396024.69</float>
<float>1526652740.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -365,7 +365,7 @@
]);
})
.allowPublicAcquisition('isDesktopMedia', function (argument_list) {
.allowPublicAcquisition('isDesktopMedia', function () {
return window.matchMedia("(min-width: 85em)").matches;
})
......@@ -520,7 +520,8 @@
})
.push(function () {
// XXX Improve error rendering
gadget.props.content_element.innerHTML = "<br/><br/><br/><pre></pre>";
gadget.props.content_element.innerHTML =
"<br/><br/><br/><pre></pre>";
gadget.props.content_element.querySelector('pre').textContent =
"Error: " + gadget.state.error_text;
// reset gadget state
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.30869.54828.19677</string> </value>
<value> <string>967.35176.12886.11639</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1526293842.78</float>
<float>1526655527.49</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -73,14 +73,14 @@
var form_options = gadget.state.erp5_form,
embedded_form = gadget.state.erp5_document._embedded._view,
rendered_form = {},
key, field;
key;
/* Remove empty non-editable fields to prevent them from displaying (business requirement).
Deleting objects inplace was not a good idea.
So we pass through only non-empty (non-editable) fields.
*/
for (key in embedded_form) {
if (key[0] !== "_" && embedded_form.hasOwnProperty(key)) {
if (embedded_form.hasOwnProperty(key) && key[0] !== "_") {
if (isNonEmptyNonEditableField(embedded_form[key])) {
rendered_form[key] = embedded_form[key];
}
......@@ -113,8 +113,8 @@
(gadget.state.erp5_document._links.action_object_jio_report ||
gadget.state.erp5_document._links.action_object_jio_exchange ||
gadget.state.erp5_document._links.action_object_jio_print) ?
gadget.getUrlFor({command: 'change', options: {page: "export"}}) :
"",
gadget.getUrlFor({command: 'change', options: {page: "export"}}) :
"",
calculatePageTitle(gadget, gadget.state.erp5_document),
gadget.isDesktopMedia(),
gadget.state.erp5_document._links.action_object_new_content_action ?
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.24700.63112.6741</string> </value>
<value> <string>967.40859.32808.15462</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1525686010.1</float>
<float>1526655111.52</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -18,7 +18,7 @@
return this.changeState(state_dict);
})
.onStateChange(function (modification_dict) {
.onStateChange(function () {
var gadget = this;
return this.getDeclaredGadget('p')
.push(function (input) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.20749.13387.4693</string> </value>
<value> <string>965.41976.11439.18449</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1517935672.03</float>
<float>1526653310.74</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -130,8 +130,8 @@
evt.preventDefault();
return createSortItemTemplate(gadget)
.push(function (template) {
var tmp = document.createElement("div"),
container = gadget.element.querySelector(".sort_item_container");
var tmp = document.createElement("div");
container = gadget.element.querySelector(".sort_item_container");
tmp.innerHTML = template;
container.appendChild(tmp);
});
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.28338.34111.16742</string> </value>
<value> <string>965.41976.11439.18449</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1518777080.78</float>
<float>1526656517.8</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -41,7 +41,8 @@
var element = this.element,
new_element = document.createElement(this.state.tag),
content = this.state.text_content,
data, data_attr;
data,
data_attr;
if (!isEmpty(this.state.text_content)) {
if (this.state.prepend) {
content = this.state.prepend + "&nbsp;" + content;
......
......@@ -224,7 +224,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.27766.62273.12083</string> </value>
<value> <string>967.35176.12886.11639</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>1525874417.09</float>
<float>1526652816.29</float>
<string>UTC</string>
</tuple>
</state>
......
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