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
Vivek
erp5
Commits
04df0c44
Commit
04df0c44
authored
Aug 24, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add draft support for filter editor which is used to make query
parent
7950d24e
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1166 additions
and
32 deletions
+1166
-32
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_html.xml
...tem/web_page_module/rjs_gadget_erp5_filtereditor_html.xml
+404
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
...eItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
+658
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
...PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
+10
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
...i/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
+4
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+7
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
...teItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
+11
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
...Item/web_page_module/rjs_gadget_erp5_searchfield_html.xml
+29
-15
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
+43
-5
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_html.xml
0 → 100644
View file @
04df0c44
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
0 → 100644
View file @
04df0c44
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
View file @
04df0c44
...
@@ -158,6 +158,13 @@
...
@@ -158,6 +158,13 @@
data-gadget-scope=
"panel"
\n
data-gadget-scope=
"panel"
\n
data-gadget-sandbox=
"public"
></div>
\n
data-gadget-sandbox=
"public"
></div>
\n
\n
\n
<div
data-gadget-url=
"gadget_erp5_filter_editor.html"
\n
data-gadget-scope=
"filterEditor"
\n
data-gadget-sandbox=
"public"
></div>
\n
\n
<div
role=
"main"
class=
"ui-content gadget-content"
></div>
\n
<div
role=
"main"
class=
"ui-content gadget-content"
></div>
\n
</div>
\n
</div>
\n
\n
\n
...
@@ -303,7 +310,7 @@
...
@@ -303,7 +310,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
945.
54056.18010.56797
</string>
</value>
<value>
<string>
945.
18332.59164.9181
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -321,8 +328,8 @@
...
@@ -321,8 +328,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
2581000.11
</float>
<float>
144
0437597.42
</float>
<string>
GMT
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
View file @
04df0c44
...
@@ -495,6 +495,9 @@
...
@@ -495,6 +495,9 @@
.allowPublicAcquisition(\'triggerPanel\', function () {\n
.allowPublicAcquisition(\'triggerPanel\', function () {\n
return route(this, "panel", "toggle");\n
return route(this, "panel", "toggle");\n
})\n
})\n
.allowPublicAcquisition(\'triggerFilterEditor\', function () {\n
return route(this, "filterEditor", "toggle");\n
})\n
\n
\n
.allowPublicAcquisition("jio_allDocs", function (param_list) {\n
.allowPublicAcquisition("jio_allDocs", function (param_list) {\n
return callJioGadget(this, "allDocs", param_list);\n
return callJioGadget(this, "allDocs", param_list);\n
...
@@ -775,7 +778,7 @@
...
@@ -775,7 +778,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
04df0c44
...
@@ -214,7 +214,11 @@
...
@@ -214,7 +214,11 @@
\n
\n
if (url_query) {\n
if (url_query) {\n
//query_string = field_json.column_list.reduce(buildQueryString, \' AND (\').replace(new RegExp("OR " + \'$\'), \')\');\n
//query_string = field_json.column_list.reduce(buildQueryString, \' AND (\').replace(new RegExp("OR " + \'$\'), \')\');\n
query_string = \' AND \' + url_query;\n
if (field_json.list_method_template === undefined) {\n
query_string = \' AND \' + url_query;\n
} else {\n
query_string = url_query;\n
}\n
}\n
}\n
\n
\n
for (i = 0; i < field_json.column_list.length; i += 1) {\n
for (i = 0; i < field_json.column_list.length; i += 1) {\n
...
@@ -604,7 +608,7 @@
...
@@ -604,7 +608,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
6.44927.40202.16725
</string>
</value>
<value>
<string>
94
5.18094.21629.29286
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -622,7 +626,7 @@
...
@@ -622,7 +626,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
5939419.7
1
</float>
<float>
144
0435604.5
1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
View file @
04df0c44
...
@@ -171,7 +171,13 @@
...
@@ -171,7 +171,13 @@
});\n
});\n
})\n
})\n
.push(function (result) {\n
.push(function (result) {\n
var sub_options = options.fg || {};\n
var sub_options = options.fg;\n
if (sub_options === undefined) {\n
sub_options = {};\n
if(options.filterEditor) {\n
sub_options.erp5_searchfield = options.filterEditor;\n
}\n
}\n
sub_options.erp5_document = erp5_document;\n
sub_options.erp5_document = erp5_document;\n
sub_options.form_definition = erp5_form;\n
sub_options.form_definition = erp5_form;\n
sub_options.view = options.view;\n
sub_options.view = options.view;\n
...
@@ -317,7 +323,7 @@
...
@@ -317,7 +323,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -331,7 +337,7 @@
...
@@ -331,7 +337,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
6.30055.63361.39150
</string>
</value>
<value>
<string>
94
5.12418.34036.47547
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -349,8 +355,8 @@
...
@@ -349,8 +355,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
5267203.04
</float>
<float>
144
0083034.81
</float>
<string>
GMT
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
View file @
04df0c44
...
@@ -120,24 +120,38 @@
...
@@ -120,24 +120,38 @@
<!-- custom script -->
\n
<!-- custom script -->
\n
<script
src=
"gadget_erp5_searchfield.js"
></script>
\n
<script
src=
"gadget_erp5_searchfield.js"
></script>
\n
\n
\n
<!-- XXX widget-status is bad! -->
\n
<script
id=
"panel-template"
type=
"text/x-handlebars-template"
>
\n
<script
id=
"panel-template"
type=
"text/x-handlebars-template"
>
\n
<div
class=
"field_container"
>
\n
<div
class=
"center"
>
\n
<div
class=
"ui-field-contain"
>
\n
<div
class=
"ui-field-contain"
>
\n
<div
class=
"css-compatability-helper"
>
\n
<div
class=
"ui-input-text ui-body-{{widget_theme}} ui-corner-all ui-shadow-inset ui-input-has-clear {{widget_status_class}}"
>
\n
<div
class=
"ui-input-text ui-body-{{theme}} ui-input-has-icon ui-corner-all ui-shadow-inset ui-input-has-clear {{status_class}} {{css_class}}"
>
\n
<input
type=
"text"
data-enhanced=
"true"
value=
"{{widget_value}}"
name=
"search"
{{widget_status_attribute}}
/>
\n
<form
class=
"save_form document_form"
>
\n
<div
class=
"ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext"
data-i18n=
"[node]header-submit"
>
\n
<input
type=
"text"
data-enhanced=
"true"
value=
"{{widget_value}}"
name=
"search"
{{widget_status_attribute}}
/>
\n
Submit
<input
data-enhanced=
"true"
type=
"submit"
data-i18n=
"[value]header-submit"
value=
"Submit"
{{widget_status_attribute}}
/>
\n
<div
class=
"ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext"
data-i18n=
"[node]{{search_i18n}}"
>
\n
{{search_i18n}}
<input
tabindex=
"-1"
data-role=
"button"
data-enhanced=
"true"
type=
"submit"
data-i18n=
"[value]{{search_i18n}}"
value=
" "
/>
\n
</div>
\n
</form>
\n
</div>
\n
</div>
\n
<div
class=
"ui-shadow-inset ui-btn ui-btn-inline ui-corner-all ui-btn-{{theme}} ui-btn-icon-notext ui-icon-filter ui-override-theme "
>
\n
<form
class=
"filter_form"
>
\n
<div
class=
"ui-input-btn"
>
\n
<input
data-role=
"button"
data-enhanced=
"true"
type=
"submit"
data-i18n=
"[value]"
value=
" "
>
\n
</div>
\n
\n
</form>
\n
</div>
\n
</div>
\n
<a
href=
"#"
data-i18n=
"filter"
class=
"ui-btn ui-btn-{{widget_theme}} ui-btn-icon-notext ui-icon-filter ui-override-theme ui-disabled"
>
Filters
</a>
\n
</div>
\n
</div>
\n
</div>
\n
</div>
\n
</div>
\n
</script>
\n
</script>
\n
\n
\n
\n
\n
\n
\n
</head>
\n
</head>
\n
<body>
\n
<body>
\n
<div
class=
"
save_form document_form
"
></div>
\n
<div
class=
"
container
"
></div>
\n
</body>
\n
</body>
\n
</html>
</html>
...
@@ -262,7 +276,7 @@
...
@@ -262,7 +276,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -276,7 +290,7 @@
...
@@ -276,7 +290,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
945.
50880.23560.7150
</string>
</value>
<value>
<string>
945.
13789.16491.47428
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -294,8 +308,8 @@
...
@@ -294,8 +308,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
2998364.27
</float>
<float>
144
0168925.51
</float>
<string>
GMT
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
04df0c44
...
@@ -135,7 +135,9 @@
...
@@ -135,7 +135,9 @@
// acquired method\n
// acquired method\n
//////////////////////////////////////////////\n
//////////////////////////////////////////////\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
\n
.declareAcquiredMethod("pleasePublishMyState", "pleasePublishMyState")\n
.declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash")\n
.declareAcquiredMethod("triggerFilterEditor", "triggerFilterEditor")\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
...
@@ -161,7 +163,7 @@
...
@@ -161,7 +163,7 @@
}));\n
}));\n
})\n
})\n
.push(function (my_translated_html) {\n
.push(function (my_translated_html) {\n
search_gadget.props.element.querySelector("
div
").innerHTML =\n
search_gadget.props.element.querySelector("
.container
").innerHTML =\n
my_translated_html;\n
my_translated_html;\n
return search_gadget;\n
return search_gadget;\n
});\n
});\n
...
@@ -173,6 +175,42 @@
...
@@ -173,6 +175,42 @@
\n
\n
result[input.getAttribute(\'name\')] = input.value;\n
result[input.getAttribute(\'name\')] = input.value;\n
return result;\n
return result;\n
})\n
\n
.declareService(function () {\n
var gadget = this;\n
\n
function filterSubmit(evt) {\n
return gadget.triggerFilterEditor();\n
}\n
\n
function formSubmit(evt) {\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.getContent();\n
})\n
.push(function (data) {\n
return gadget.pleasePublishMyState({\n
"extended_search": data.search\n
});\n
})\n
.push(function (url) {\n
return gadget.pleaseRedirectMyHash(url);\n
});\n
}\n
// Listen to form submit\n
loopEventListener(\n
gadget.props.element.querySelector(\'.save_form\'),\n
\'submit\',\n
false,\n
formSubmit\n
);\n
loopEventListener(\n
gadget.props.element.querySelector(\'.filter_form\'),\n
\'submit\',\n
false,\n
filterSubmit\n
);\n
});\n
});\n
\n
\n
}(window, rJS, RSVP, loopEventListener, Handlebars));
</string>
</value>
}(window, rJS, RSVP, loopEventListener, Handlebars));
</string>
</value>
...
@@ -310,7 +348,7 @@
...
@@ -310,7 +348,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
945.
61050.10650.48093
</string>
</value>
<value>
<string>
945.
13775.30295.64870
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -328,8 +366,8 @@
...
@@ -328,8 +366,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144
5265843.55
</float>
<float>
144
0164409.77
</float>
<string>
GMT
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
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