Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
d2349b68
Commit
d2349b68
authored
Aug 20, 2014
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add tab on web script to do jslint syntax check
parent
4e1e4ba0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5022 additions
and
1 deletion
+5022
-1
bt5/erp5_web_renderjs_ui/ActionTemplateItem/portal_types/Web%20Script/view_syntax.xml
...ionTemplateItem/portal_types/Web%20Script/view_syntax.xml
+81
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_checkSyntax.xml
...rtal_skins/erp5_web_renderjs_ui/WebScript_checkSyntax.xml
+109
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_checkSyntax/my_syntax.xml
.../erp5_web_renderjs_ui/WebScript_checkSyntax/my_syntax.xml
+307
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_getTextContent.xml
...l_skins/erp5_web_renderjs_ui/WebScript_getTextContent.xml
+67
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_renderCheckSyntax.xml
...kins/erp5_web_renderjs_ui/WebScript_renderCheckSyntax.xml
+75
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/check_code.js.xml
...eItem/portal_skins/erp5_web_renderjs_ui/check_code.js.xml
+63
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/jslint.js.xml
...plateItem/portal_skins/erp5_web_renderjs_ui/jslint.js.xml
+4318
-0
bt5/erp5_web_renderjs_ui/bt/revision
bt5/erp5_web_renderjs_ui/bt/revision
+1
-1
bt5/erp5_web_renderjs_ui/bt/template_action_path_list
bt5/erp5_web_renderjs_ui/bt/template_action_path_list
+1
-0
No files found.
bt5/erp5_web_renderjs_ui/ActionTemplateItem/portal_types/Web%20Script/view_syntax.xml
0 → 100644
View file @
d2349b68
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view_syntax
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
Access contents information
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
3.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
JSLint
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/WebScript_checkSyntax
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_checkSyntax.xml
0 → 100644
View file @
d2349b68
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
my_syntax
</string>
</list>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebScript_checkSyntax
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
WebScript_checkSyntax
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
JSLint
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_checkSyntax/my_syntax.xml
0 → 100644
View file @
d2349b68
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_getTextContent.xml
0 → 100644
View file @
d2349b68
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
return context.getTextContent()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebScript_getTextContent
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebScript_renderCheckSyntax.xml
0 → 100644
View file @
d2349b68
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<tal:block tal:define=\'site_root python: here.getWebSiteValue() or here.getPortalObject();\n
portal_url python: site_root.absolute_url();\n
\'>
\n
\n
<script
type=
"text/javascript"
\n
tal:attributes=
"src string:${portal_url}/jslint.js"
></script>
\n
<script
type=
"text/javascript"
\n
tal:attributes=
"src string:${portal_url}/check_code.js"
></script>
\n
\n
</tal:block>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebScript_renderCheckSyntax
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/check_code.js.xml
0 → 100644
View file @
d2349b68
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"DTMLDocument"
module=
"OFS.DTMLDocument"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
check_code.js
</string>
</value>
</item>
<item>
<key>
<string>
_vars
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
globals
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
raw
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
$(document).ready(function(){\n
var get_code_url = document.baseURI + \'WebScript_getTextContent\';\n
check_code = function (code_to_check) {\n
\n
var i, len, data, err, table_html;\n
\n
JSLINT(code_to_check, {});\n
data = JSLINT.data();\n
table_html = \'<div class="listbox-container">
<div
class=
"listbox-content maximal-width"
><div
class=
"listbox-body"
><table
class=
"listbox listbox-table"
><tbody>
\';\n
line_letter = "A";\n
for (i = 0, len = data.errors.length; i
< len
;
i
+=
1)
{\n
console.log("err",
err)\n
err =
data.errors[i];\n
if
(err
!==
null)
{\n
table_html =
table_html
+
\'<tr
class=
"Data\' + line_letter + \'"
><td
class=
"listbox-table-data-cell"
>
\' + \'line: \' + err.line + \': \' + err.character + \': \' + (err.evidence || \'\') + \'
</td><td
class=
"listbox-table-data-cell"
>
\' + err.reason + "
</td></tr>
";\n
line_letter = line_letter === "A" ? "B": "A";\n
}\n
} \n
table_html = table_html + "
</tbody></table></div></div></div>
";\n
document.getElementsByClassName("check_code")[0].innerHTML = table_html;\n
};\n
$.get(get_code_url,\n
check_code);\n
});
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/jslint.js.xml
0 → 100644
View file @
d2349b68
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/bt/revision
View file @
d2349b68
55
56
\ No newline at end of file
bt5/erp5_web_renderjs_ui/bt/template_action_path_list
View file @
d2349b68
...
@@ -5,6 +5,7 @@ Web Manifest | web_view
...
@@ -5,6 +5,7 @@ Web Manifest | web_view
Web Script | version_view
Web Script | version_view
Web Script | view
Web Script | view
Web Script | view_editor
Web Script | view_editor
Web Script | view_syntax
Web Script | web_view
Web Script | web_view
Web Style | version_view
Web Style | version_view
Web Style | view
Web Style | view
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment