Commit abd69b54 authored by Romain Courteaud's avatar Romain Courteaud

Fix syntax (based on jslint)

parent e76d964e
...@@ -235,8 +235,8 @@ ...@@ -235,8 +235,8 @@
}\n }\n
\n \n
return field_queue\n return field_queue\n
.push(function () {\n .push(function () {\n
return form_gadget.translateHtml(field_element.innerHTML);\n return form_gadget.translateHtml(field_element.innerHTML);\n
})\n })\n
.push(function (my_translate_html) {\n .push(function (my_translate_html) {\n
field_element.innerHTML = my_translate_html;\n field_element.innerHTML = my_translate_html;\n
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.10454.31463.21265</string> </value> <value> <string>940.11553.26313.55261</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -504,8 +504,8 @@ ...@@ -504,8 +504,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420736435.02</float> <float>1421080954.49</float>
<string>UTC</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n /*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*global window, rJS, Handlebars, document, loopEventListener */\n /*global window, rJS, Handlebars, document, loopEventListener, RSVP */\n
(function (window, rJS, Handlebars, document, loopEventListener) {\n (function (window, rJS, Handlebars, document, loopEventListener, RSVP) {\n
"use strict";\n "use strict";\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
...@@ -444,7 +444,7 @@ ...@@ -444,7 +444,7 @@
);\n );\n
});\n });\n
\n \n
}(window, rJS, Handlebars, document, loopEventListener)); }(window, rJS, Handlebars, document, loopEventListener, RSVP));
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -567,7 +567,7 @@ ...@@ -567,7 +567,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -581,7 +581,7 @@ ...@@ -581,7 +581,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.2108.16108.5614</string> </value> <value> <string>940.10099.40468.62378</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -599,7 +599,7 @@ ...@@ -599,7 +599,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420237508.03</float> <float>1421080897.75</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -101,9 +101,9 @@ ...@@ -101,9 +101,9 @@
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*global window, rJS, Handlebars */\n /*global window, rJS, Handlebars, document, RSVP */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n /*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS, Handlebars) {\n (function (window, rJS, Handlebars, document, RSVP) {\n
"use strict";\n "use strict";\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
...@@ -127,12 +127,12 @@ ...@@ -127,12 +127,12 @@
g.element = element;\n g.element = element;\n
});\n });\n
})\n })\n
\n \n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
// acquired method\n // acquired method\n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n .declareAcquiredMethod("translateHtml", "translateHtml")\n
\n \n
.declareMethod(\'render\', function (options) {\n .declareMethod(\'render\', function (options) {\n
var i,\n var i,\n
template,\n template,\n
...@@ -165,20 +165,19 @@ ...@@ -165,20 +165,19 @@
.push(function (my_translated_html) {\n .push(function (my_translated_html) {\n
// XXX: no fan...\n // XXX: no fan...\n
var option_list,\n var option_list,\n
i,\n
i_len,\n i_len,\n
fragment = document.createDocumentFragment(),\n fragment = document.createDocumentFragment(),\n
div = document.createElement("div");\n div = document.createElement("div");\n
\n \n
div.innerHTML = my_translated_html;\n div.innerHTML = my_translated_html;\n
option_list = div.querySelectorAll("option");\n option_list = div.querySelectorAll("option");\n
for (i = 0, i_len = option_list.length; i < i_len; i += 1) {\n for (i = 0, i_len = option_list.length; i < i_len; i += 1) {\n
fragment.appendChild(option_list[i]);\n fragment.appendChild(option_list[i]);\n
}\n }\n
\n \n
select.appendChild(fragment);\n select.appendChild(fragment);\n
// XXX: no fan end\n // XXX: no fan end\n
\n \n
if (field_json.required === 1) {\n if (field_json.required === 1) {\n
select.setAttribute(\'required\', \'required\');\n select.setAttribute(\'required\', \'required\');\n
}\n }\n
...@@ -186,7 +185,7 @@ ...@@ -186,7 +185,7 @@
select.setAttribute(\'readonly\', \'readonly\');\n select.setAttribute(\'readonly\', \'readonly\');\n
select.setAttribute(\'data-wrapper-class\', \'ui-state-readonly\');\n select.setAttribute(\'data-wrapper-class\', \'ui-state-readonly\');\n
// select.setAttribute(\'disabled\', \'disabled\');\n // select.setAttribute(\'disabled\', \'disabled\');\n
\n \n
}\n }\n
});\n });\n
})\n })\n
...@@ -198,7 +197,7 @@ ...@@ -198,7 +197,7 @@
return result;\n return result;\n
});\n });\n
\n \n
}(window, rJS, Handlebars)); }(window, rJS, Handlebars, document, RSVP));
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -321,7 +320,7 @@ ...@@ -321,7 +320,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -335,7 +334,7 @@ ...@@ -335,7 +334,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.61577.21369.11400</string> </value> <value> <string>940.16203.52595.49561</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -353,7 +352,7 @@ ...@@ -353,7 +352,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419871313.56</float> <float>1421081098.25</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n /*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*global window, rJS, Handlebars, jQuery */\n /*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */\n
(function (window, rJS, Handlebars, $) {\n (function (window, rJS, Handlebars, $, RSVP, loopEventListener) {\n
"use strict";\n "use strict";\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
.ready(function (g) {\n .ready(function (g) {\n
g.props = {};\n g.props = {};\n
})\n })\n
\n \n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
// acquired method\n // acquired method\n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
language_list,\n language_list,\n
document_list = [],\n document_list = [],\n
raw_language_list = all_result[2];\n raw_language_list = all_result[2];\n
\n \n
// XXX: Customize panel header!\n // XXX: Customize panel header!\n
tmp = panel_template();\n tmp = panel_template();\n
\n \n
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
});\n });\n
return g.translateHtml(tmp);\n return g.translateHtml(tmp);\n
}\n }\n
\n \n
// no translations available or not loaded when reaching this point\n // no translations available or not loaded when reaching this point\n
tmp += panel_template_nolang({\n tmp += panel_template_nolang({\n
module_href: all_result[0],\n module_href: all_result[0],\n
...@@ -213,8 +213,8 @@ ...@@ -213,8 +213,8 @@
.declareMethod(\'toggle\', function () {\n .declareMethod(\'toggle\', function () {\n
this.props.jelement.panel("toggle");\n this.props.jelement.panel("toggle");\n
})\n })\n
\n \n
.declareMethod(\'render\', function (option_dict) {\n .declareMethod(\'render\', function () {\n
var panel_gadget = this;\n var panel_gadget = this;\n
\n \n
if (panel_gadget.props.set_search === true) {\n if (panel_gadget.props.set_search === true) {\n
...@@ -222,11 +222,11 @@ ...@@ -222,11 +222,11 @@
}\n }\n
\n \n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function() {\n .push(function () {\n
return panel_gadget.declareGadget("gadget_erp5_searchfield.html", {"scope": "search"});\n return panel_gadget.declareGadget("gadget_erp5_searchfield.html", {"scope": "search"});\n
})\n })\n
.push(function (my_search_gadget) {\n .push(function (my_search_gadget) {\n
var selector, parent_node, search_option_dict = {};\n var parent_node, search_option_dict = {};\n
\n \n
panel_gadget.props.set_search = true;\n panel_gadget.props.set_search = true;\n
\n \n
...@@ -243,14 +243,14 @@ ...@@ -243,14 +243,14 @@
return panel_gadget;\n return panel_gadget;\n
});\n });\n
})\n })\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
// declared services\n // declared services\n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
.declareService(function () {\n .declareService(function () {\n
var panel_gadget, \n var panel_gadget,\n
form_list, \n form_list,\n
event_list, \n event_list,\n
handler,\n handler,\n
i,\n i,\n
len;\n len;\n
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
});\n });\n
});\n });\n
\n \n
}(window, rJS, Handlebars, jQuery)); }(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -407,7 +407,7 @@ ...@@ -407,7 +407,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -421,7 +421,7 @@ ...@@ -421,7 +421,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.1635.5936.59528</string> </value> <value> <string>940.16198.52720.49783</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420206973.03</float> <float>1421080772.85</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -184,12 +184,12 @@ ...@@ -184,12 +184,12 @@
i18n: view_list[i - 2].title\n i18n: view_list[i - 2].title\n
});\n });\n
}\n }\n
\n \n
return gadget.translateHtml(table_template({\n return gadget.translateHtml(table_template({\n
definition_title: "Workflow Transitions",\n definition_title: "Workflow Transitions",\n
documentlist: tab_list,\n documentlist: tab_list,\n
definition_i18n: "Workflow-Transitions"\n definition_i18n: "Workflow-Transitions"\n
})); \n }));\n
})\n })\n
.push(function (my_translated_html) {\n .push(function (my_translated_html) {\n
gadget.props.element.innerHTML = my_translated_html;\n gadget.props.element.innerHTML = my_translated_html;\n
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.2136.15566.12765</string> </value> <value> <string>940.11553.26313.55261</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420237984.64</float> <float>1421080866.35</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -179,11 +179,21 @@ ...@@ -179,11 +179,21 @@
\n \n
// XXX hardcoded...\n // XXX hardcoded...\n
switch (title) {\n switch (title) {\n
case "Create User": icon = " ui-icon-user"; break;\n case "Create User":\n
case "Create Document": icon = " ui-icon-file-o"; break;\n icon = " ui-icon-user";\n
case "Change State": icon = " ui-icon-share-alt"; break;\n break;\n
case "Submit": icon = " ui-icon-check"; break;\n case "Create Document":\n
default: icon = " ui-icon-random"; break;\n icon = " ui-icon-file-o";\n
break;\n
case "Change State":\n
icon = " ui-icon-share-alt";\n
break;\n
case "Submit":\n
icon = " ui-icon-check";\n
break;\n
default:\n
icon = " ui-icon-random";\n
break;\n
}\n }\n
span.className = "ui-icon ui-icon-custom" + icon;\n span.className = "ui-icon ui-icon-custom" + icon;\n
span.textContent = "\\u00A0";\n span.textContent = "\\u00A0";\n
...@@ -208,14 +218,14 @@ ...@@ -208,14 +218,14 @@
form_gadget.whoWantToDisplayThisPage({page: "breadcrumb"})\n form_gadget.whoWantToDisplayThisPage({page: "breadcrumb"})\n
]);\n ]);\n
})\n })\n
.push(function (all_result) {\n .push(function (all_result) {\n
return form_gadget.renderPageHeader({\n return form_gadget.renderPageHeader({\n
cancel_url: all_result[1],\n cancel_url: all_result[1],\n
page_title: options.erp5_document.title,\n page_title: options.erp5_document.title,\n
breadcrumb_url: all_result[2],\n breadcrumb_url: all_result[2],\n
submit_action: true\n submit_action: true\n
});\n
});\n });\n
});\n
});\n });\n
})\n })\n
\n \n
...@@ -417,7 +427,7 @@ ...@@ -417,7 +427,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.16022.61765.35328</string> </value> <value> <string>940.16195.40887.33757</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -435,7 +445,7 @@ ...@@ -435,7 +445,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1421070245.4</float> <float>1421080553.89</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
.declareMethod("render", function () {\n .declareMethod("render", function () {\n
var gadget = this;\n var gadget = this;\n
\n \n
// XXX: Lot of DOM touches\n // XXX: Lot of DOM touches\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function () {\n .push(function () {\n
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -300,7 +300,7 @@ ...@@ -300,7 +300,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.54011.36657.61064</string> </value> <value> <string>940.11553.26313.55261</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419435753.44</float> <float>1421080830.84</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
})\n })\n
.push(function (my_translated_html) {\n .push(function (my_translated_html) {\n
gadget.props.element.innerHTML = my_translated_html;\n gadget.props.element.innerHTML = my_translated_html;\n
\n \n
return gadget.renderPageHeader({\n return gadget.renderPageHeader({\n
cancel_url: tab_list[matching].link\n cancel_url: tab_list[matching].link\n
});\n });\n
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.62551.57559.50790</string> </value> <value> <string>940.11553.26313.55261</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419929834.4</float> <float>1421080804.4</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -99,9 +99,9 @@ ...@@ -99,9 +99,9 @@
</item> </item>
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>/*global window, rJS, RSVP, loopEventListener */\n <value> <string>/*global window, rJS, RSVP, loopEventListener, Handlebars */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n /*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS, RSVP, loopEventListener) {\n (function (window, rJS, RSVP, loopEventListener, Handlebars) {\n
"use strict";\n "use strict";\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
}));\n }));\n
})\n })\n
.push(function (my_translated_html) {\n .push(function (my_translated_html) {\n
search_gadget.props.element.querySelector("form").innerHTML = \n search_gadget.props.element.querySelector("form").innerHTML =\n
my_translated_html;\n my_translated_html;\n
return search_gadget;\n return search_gadget;\n
});\n });\n
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
);\n );\n
});\n });\n
\n \n
}(window, rJS, RSVP, loopEventListener));</string> </value> }(window, rJS, RSVP, loopEventListener, Handlebars));</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.1897.14544.10120</string> </value> <value> <string>940.11553.26313.55261</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420236368.31</float> <float>1421080302.1</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </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