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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
51f8f51a
Commit
51f8f51a
authored
Oct 07, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Use a job to render the listbox lines
parent
660050d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
103 deletions
+91
-103
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+89
-101
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
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
51f8f51a
/*jslint indent: 2, maxerr: 3, nomen: true */
/*global window, document, rJS, URI, RSVP,
loopEventListener,
/*global window, document, rJS, URI, RSVP,
SimpleQuery, ComplexQuery, Query, Handlebars, console, QueryFactory*/
(
function
(
window
,
document
,
rJS
,
URI
,
RSVP
,
loopEventListener
,
(
function
(
window
,
document
,
rJS
,
URI
,
RSVP
,
SimpleQuery
,
ComplexQuery
,
Query
,
Handlebars
,
console
,
QueryFactory
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
...
...
@@ -311,6 +311,7 @@
})
.
push
(
function
(
my_html
)
{
gadget
.
props
.
element
.
querySelector
(
"
.thead
"
).
innerHTML
=
my_html
;
gadget
.
renderContent
();
});
})
.
declareMethod
(
'
getListboxInfo
'
,
function
()
{
...
...
@@ -324,7 +325,7 @@
//////////////////////////////////////////////
// render the listbox in an asynchronous way
//////////////////////////////////////////////
.
declare
Service
(
function
()
{
.
declare
Job
(
'
renderContent
'
,
function
()
{
var
gadget
=
this
,
props
=
gadget
.
props
,
field_json
=
props
.
field_json
,
...
...
@@ -525,32 +526,20 @@
return
data
;
});
})
.
declareService
(
function
(
)
{
.
onEvent
(
'
click
'
,
function
(
evt
)
{
var
gadget
=
this
,
sort_button
=
gadget
.
props
.
element
.
querySelector
(
'
button[name="Sort"]
'
),
hide_button
=
gadget
.
props
.
element
.
querySelector
(
'
button[name="Hide"]
'
),
url
,
options
=
{},
sort_button
=
gadget
.
props
.
element
.
querySelector
(
'
button[name="Sort"]
'
);
return
loopEventListener
(
sort_button
,
"
click
"
,
false
,
function
()
{
options
=
{};
if
(
evt
.
target
===
sort_button
)
{
url
=
"
gadget_erp5_sort_editor.html
"
;
options
.
sort_column_list
=
gadget
.
props
.
field_json
.
sort_column_list
;
options
.
sort_list
=
gadget
.
props
.
sort_list
;
options
.
key
=
gadget
.
props
.
field_json
.
key
+
"
_sort_list:json
"
;
return
gadget
.
renderEditorPanel
(
url
,
options
);
}
);
})
.
declareService
(
function
()
{
var
gadget
=
this
,
hide_button
=
gadget
.
props
.
element
.
querySelector
(
'
button[name="Hide"]
'
);
return
loopEventListener
(
hide_button
,
"
click
"
,
false
,
function
()
{
if
(
evt
.
target
===
hide_button
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
i
,
...
...
@@ -626,8 +615,7 @@
});
});
}
);
})
},
false
,
false
)
.
allowPublicAcquisition
(
"
notifyInvalid
"
,
function
()
{
return
;
...
...
@@ -637,5 +625,5 @@
return
;
});
}(
window
,
document
,
rJS
,
URI
,
RSVP
,
loopEventListener
,
}(
window
,
document
,
rJS
,
URI
,
RSVP
,
SimpleQuery
,
ComplexQuery
,
Query
,
Handlebars
,
console
,
QueryFactory
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
51f8f51a
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.2
5745.6524.38843
</string>
</value>
<value>
<string>
954.2
8831.10592.12339
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1475
666953.92
</float>
<float>
1475
852314.74
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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