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
Nikola Balog
erp5
Commits
3306eae0
Commit
3306eae0
authored
May 18, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Name functions to ease traceback debugging
parent
9a411caf
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
252 additions
and
219 deletions
+252
-219
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_configureeditor_js.js
...tem/web_page_module/rjs_gadget_erp5_configureeditor_js.js
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_configureeditor_js.xml
...em/web_page_module/rjs_gadget_erp5_configureeditor_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_editor_panel_js.js
...teItem/web_page_module/rjs_gadget_erp5_editor_panel_js.js
+5
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_editor_panel_js.xml
...eItem/web_page_module/rjs_gadget_erp5_editor_panel_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
+15
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
...ateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
+8
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
...teItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+72
-47
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
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
+8
-8
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
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
...plateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
+9
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
...hTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
+11
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+7
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
+6
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+7
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
...eItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
...Item/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
+16
-14
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
...teItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
+6
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
...eItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
...lateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
...ateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.js
...mplateItem/web_page_module/rjs_gadget_html5_element_js.js
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.xml
...plateItem/web_page_module/rjs_gadget_html5_element_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
...TemplateItem/web_page_module/rjs_gadget_html5_input_js.js
+8
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
...emplateItem/web_page_module/rjs_gadget_html5_input_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_select_js.js
...emplateItem/web_page_module/rjs_gadget_html5_select_js.js
+7
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_select_js.xml
...mplateItem/web_page_module/rjs_gadget_html5_select_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.js
...plateItem/web_page_module/rjs_gadget_html5_textarea_js.js
+6
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
...lateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
+3
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_configureeditor_js.js
View file @
3306eae0
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
trigger
"
,
"
trigger
"
)
.
declareAcquiredMethod
(
"
trigger
"
,
"
trigger
"
)
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
,
var
gadget
=
this
,
div
=
document
.
createElement
(
"
div
"
),
div
=
document
.
createElement
(
"
div
"
),
container
=
gadget
.
element
.
querySelector
(
"
.container
"
);
container
=
gadget
.
element
.
querySelector
(
"
.container
"
);
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
});
});
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
column_list
:
options
.
column_list
,
column_list
:
options
.
column_list
,
displayable_column_list
:
options
.
displayable_column_list
,
displayable_column_list
:
options
.
displayable_column_list
,
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
});
});
})
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
var
gadget
=
this
,
var
gadget
=
this
,
container
;
container
;
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
},
false
,
false
)
},
false
,
false
)
.
onEvent
(
'
submit
'
,
function
(
evt
)
{
.
onEvent
(
'
submit
'
,
function
submit
(
evt
)
{
var
gadget
=
this
,
var
gadget
=
this
,
options
=
{},
options
=
{},
form
=
evt
.
target
,
form
=
evt
.
target
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_configureeditor_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.41976.11439.18449
</string>
</value>
<value>
<string>
96
7.40880.16026.33774
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15266563
34.61
</float>
<float>
15266563
89.18
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_editor_panel_js.js
View file @
3306eae0
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// acquired method
// acquired method
//////////////////////////////////////////////
//////////////////////////////////////////////
.
allowPublicAcquisition
(
'
trigger
'
,
function
()
{
.
allowPublicAcquisition
(
'
trigger
'
,
function
trigger
()
{
return
this
.
toggle
();
return
this
.
toggle
();
})
})
.
declareMethod
(
'
toggle
'
,
function
()
{
.
declareMethod
(
'
toggle
'
,
function
toggle
()
{
if
(
this
.
state
.
visible
)
{
if
(
this
.
state
.
visible
)
{
return
this
.
close
();
return
this
.
close
();
}
}
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
});
});
})
})
.
declareMethod
(
'
close
'
,
function
()
{
.
declareMethod
(
'
close
'
,
function
close
()
{
return
this
.
changeState
({
return
this
.
changeState
({
visible
:
false
,
visible
:
false
,
url
:
undefined
,
url
:
undefined
,
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
});
});
})
})
.
declareMethod
(
'
render
'
,
function
(
url
,
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
url
,
options
)
{
// XXX Hack to close the panel if the sort/filter button
// XXX Hack to close the panel if the sort/filter button
// is clicked twice
// is clicked twice
if
(
url
===
this
.
state
.
url
)
{
if
(
url
===
this
.
state
.
url
)
{
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
});
});
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
queue
,
var
queue
,
gadget
=
this
;
gadget
=
this
;
if
(
this
.
state
.
visible
)
{
if
(
this
.
state
.
visible
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_editor_panel_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
55.38199.61252.57992
</string>
</value>
<value>
<string>
9
63.11788.48702.26146
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
480349448.29
</float>
<float>
1
526656627.08
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
View file @
3306eae0
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
// ready
// ready
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Init local properties
// Init local properties
.
ready
(
function
()
{
.
ready
(
function
ready
()
{
this
.
props
=
{
this
.
props
=
{
element_list
:
[
element_list
:
[
this
.
element
.
querySelector
(
"
h1
"
),
this
.
element
.
querySelector
(
"
h1
"
),
...
@@ -98,41 +98,41 @@
...
@@ -98,41 +98,41 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
notifyLoaded
'
,
function
()
{
.
declareMethod
(
'
notifyLoaded
'
,
function
notifyLoaded
()
{
return
this
.
changeState
({
return
this
.
changeState
({
loaded
:
true
loaded
:
true
});
});
})
})
.
declareMethod
(
'
notifyLoading
'
,
function
()
{
.
declareMethod
(
'
notifyLoading
'
,
function
notifyLoading
()
{
return
this
.
changeState
({
return
this
.
changeState
({
loaded
:
false
loaded
:
false
});
});
})
})
.
declareMethod
(
'
notifySubmitted
'
,
function
()
{
.
declareMethod
(
'
notifySubmitted
'
,
function
notifySubmitted
()
{
return
this
.
changeState
({
return
this
.
changeState
({
submitted
:
true
,
submitted
:
true
,
// Change modify here, to allow user to redo some modification and being correctly notified
// Change modify here, to allow user to redo some modification and being correctly notified
modified
:
false
modified
:
false
});
});
})
})
.
declareMethod
(
'
notifySubmitting
'
,
function
()
{
.
declareMethod
(
'
notifySubmitting
'
,
function
notifySubmitting
()
{
return
this
.
changeState
({
return
this
.
changeState
({
submitted
:
false
submitted
:
false
});
});
})
})
.
declareMethod
(
'
notifyError
'
,
function
()
{
.
declareMethod
(
'
notifyError
'
,
function
notifyError
()
{
return
this
.
changeState
({
return
this
.
changeState
({
loaded
:
true
,
loaded
:
true
,
submitted
:
true
,
submitted
:
true
,
error
:
true
error
:
true
});
});
})
})
.
declareMethod
(
'
notifyChange
'
,
function
()
{
.
declareMethod
(
'
notifyChange
'
,
function
notifyChange
()
{
return
this
.
changeState
({
return
this
.
changeState
({
modified
:
true
modified
:
true
});
});
})
})
.
declareMethod
(
'
setButtonTitle
'
,
function
(
options
)
{
.
declareMethod
(
'
setButtonTitle
'
,
function
setButtonTitle
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
title_button_icon
:
options
.
icon
,
title_button_icon
:
options
.
icon
,
title_button_name
:
options
.
action
title_button_name
:
options
.
action
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
return this.render(this.stats.options);
return this.render(this.stats.options);
})
})
*/
*/
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state
=
{
var
state
=
{
error
:
false
,
error
:
false
,
title_text
:
''
,
title_text
:
''
,
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
return
this
.
changeState
(
state
);
return
this
.
changeState
(
state
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
right_link
,
right_link
,
right_button
,
right_button
,
...
@@ -254,7 +254,10 @@
...
@@ -254,7 +254,10 @@
default_title_icon
=
"
spinner
"
;
default_title_icon
=
"
spinner
"
;
}
}
// Updating globally the page title. Does not follow RenderJS philosophy, but, it is enough for now
// Updating globally the page title. Does not follow RenderJS philosophy, but, it is enough for now
if
(
modification_dict
.
hasOwnProperty
(
'
title_text
'
))
{
// Be careful, this is CPU costly
document
.
title
=
gadget
.
state
.
title_text
;
document
.
title
=
gadget
.
state
.
title_text
;
}
title_link
=
{
title_link
=
{
title
:
gadget
.
state
.
title_text
,
title
:
gadget
.
state
.
title_text
,
icon
:
default_title_icon
||
gadget
.
state
.
title_icon
,
icon
:
default_title_icon
||
gadget
.
state
.
title_icon
,
...
@@ -362,7 +365,7 @@
...
@@ -362,7 +365,7 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// handle button submit
// handle button submit
//////////////////////////////////////////////
//////////////////////////////////////////////
.
onEvent
(
'
submit
'
,
function
(
evt
)
{
.
onEvent
(
'
submit
'
,
function
submit
(
evt
)
{
var
name
=
evt
.
target
[
0
].
getAttribute
(
"
name
"
);
var
name
=
evt
.
target
[
0
].
getAttribute
(
"
name
"
);
if
(
name
===
"
panel
"
)
{
if
(
name
===
"
panel
"
)
{
return
this
.
triggerPanel
();
return
this
.
triggerPanel
();
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.14598.25770.31300
</string>
</value>
<value>
<string>
96
7.34935.2317.153
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
18538755.9
</float>
<float>
15
26656854.64
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
View file @
3306eae0
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
first_call
:
false
first_call
:
false
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
first_call
:
true
,
first_call
:
true
,
label_text
:
options
.
field_json
.
title
||
''
,
label_text
:
options
.
field_json
.
title
||
''
,
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
span
,
span
,
css_class
,
css_class
,
...
@@ -185,7 +185,7 @@
...
@@ -185,7 +185,7 @@
}
}
})
})
.
declareMethod
(
"
checkValidity
"
,
function
()
{
.
declareMethod
(
"
checkValidity
"
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
SCOPE
)
return
this
.
getDeclaredGadget
(
SCOPE
)
.
push
(
function
(
gadget
)
{
.
push
(
function
(
gadget
)
{
// XXX Implement checkValidity on all fields
// XXX Implement checkValidity on all fields
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
argument_list
=
arguments
;
var
argument_list
=
arguments
;
return
this
.
getDeclaredGadget
(
SCOPE
)
return
this
.
getDeclaredGadget
(
SCOPE
)
.
push
(
function
(
gadget
)
{
.
push
(
function
(
gadget
)
{
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getListboxInfo
'
,
function
()
{
.
declareMethod
(
'
getListboxInfo
'
,
function
getListboxInfo
()
{
var
argument_list
=
arguments
;
var
argument_list
=
arguments
;
return
this
.
getDeclaredGadget
(
SCOPE
)
return
this
.
getDeclaredGadget
(
SCOPE
)
.
push
(
function
(
gadget
)
{
.
push
(
function
(
gadget
)
{
...
@@ -215,19 +215,19 @@
...
@@ -215,19 +215,19 @@
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
allowPublicAcquisition
(
"
notifyInvalid
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
notifyInvalid
"
,
function
notifyInvalid
(
param_list
)
{
// Label doesn't know when a subgadget calls notifyInvalid
// Label doesn't know when a subgadget calls notifyInvalid
// Prevent mutex dead lock by defering the changeState call
// Prevent mutex dead lock by defering the changeState call
return
this
.
deferErrorTextRender
(
param_list
[
0
]);
return
this
.
deferErrorTextRender
(
param_list
[
0
]);
})
})
.
allowPublicAcquisition
(
"
notifyValid
"
,
function
()
{
.
allowPublicAcquisition
(
"
notifyValid
"
,
function
notifyValid
()
{
// Label doesn't know when a subgadget calls notifyValid
// Label doesn't know when a subgadget calls notifyValid
// Prevent mutex dead lock by defering the changeState call
// Prevent mutex dead lock by defering the changeState call
return
this
.
deferErrorTextRender
(
''
);
return
this
.
deferErrorTextRender
(
''
);
})
})
.
declareJob
(
'
deferErrorTextRender
'
,
function
(
error_text
)
{
.
declareJob
(
'
deferErrorTextRender
'
,
function
deferErrorTextRender
(
error_text
)
{
return
this
.
changeState
({
first_call
:
true
,
error_text
:
error_text
});
return
this
.
changeState
({
first_call
:
true
,
error_text
:
error_text
});
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.40
818.40178.55500
</string>
</value>
<value>
<string>
967.40
700.16743.2833
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1526652
740.61
</float>
<float>
1526652
636.72
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
3306eae0
...
@@ -303,7 +303,7 @@
...
@@ -303,7 +303,7 @@
//////////////////////////////////////////
//////////////////////////////////////////
// Allow Acquisition
// Allow Acquisition
//////////////////////////////////////////
//////////////////////////////////////////
.
allowPublicAcquisition
(
"
getSetting
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
getSetting
"
,
function
getSetting
(
argument_list
)
{
var
gadget
=
this
,
var
gadget
=
this
,
key
=
argument_list
[
0
],
key
=
argument_list
[
0
],
default_value
=
argument_list
[
1
];
default_value
=
argument_list
[
1
];
...
@@ -317,7 +317,7 @@
...
@@ -317,7 +317,7 @@
throw
error
;
throw
error
;
});
});
})
})
.
allowPublicAcquisition
(
"
setSetting
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
setSetting
"
,
function
setSetting
(
argument_list
)
{
var
jio_gadget
,
var
jio_gadget
,
gadget
=
this
,
gadget
=
this
,
key
=
argument_list
[
0
],
key
=
argument_list
[
0
],
...
@@ -338,26 +338,34 @@
...
@@ -338,26 +338,34 @@
return
jio_gadget
.
put
(
gadget
.
props
.
setting_id
,
doc
);
return
jio_gadget
.
put
(
gadget
.
props
.
setting_id
,
doc
);
});
});
})
})
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
translateHtml
(
argument_list
)
{
return
route
(
this
,
'
translation_gadget
'
,
'
translateHtml
'
,
argument_list
);
return
route
(
this
,
'
translation_gadget
'
,
'
translateHtml
'
,
argument_list
);
})
})
// XXX Those methods may be directly integrated into the header,
// XXX Those methods may be directly integrated into the header,
// as it handles the submit triggering
// as it handles the submit triggering
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
notifySubmitting
(
argument_list
)
{
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitting
'
),
route
(
this
,
"
header
"
,
'
notifySubmitting
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
)
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
)
]);
]);
})
})
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
notifySubmitted
(
argument_list
)
{
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitted
'
),
route
(
this
,
"
header
"
,
'
notifySubmitted
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
),
route
(
this
,
"
router
"
,
'
notify
'
,
argument_list
)
route
(
this
,
"
router
"
,
'
notify
'
,
argument_list
)
]);
]);
})
})
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
notifyChange
(
argument_list
)
{
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifyChange
'
),
route
(
this
,
"
header
"
,
'
notifyChange
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
),
...
@@ -365,11 +373,11 @@
...
@@ -365,11 +373,11 @@
]);
]);
})
})
.
allowPublicAcquisition
(
'
isDesktopMedia
'
,
function
()
{
.
allowPublicAcquisition
(
'
isDesktopMedia
'
,
function
isDesktopMedia
()
{
return
window
.
matchMedia
(
"
(min-width: 85em)
"
).
matches
;
return
window
.
matchMedia
(
"
(min-width: 85em)
"
).
matches
;
})
})
.
allowPublicAcquisition
(
'
refresh
'
,
function
()
{
.
allowPublicAcquisition
(
'
refresh
'
,
function
refresh
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
MAIN_SCOPE
)
return
gadget
.
getDeclaredGadget
(
MAIN_SCOPE
)
.
push
(
function
(
main
)
{
.
push
(
function
(
main
)
{
...
@@ -381,27 +389,31 @@
...
@@ -381,27 +389,31 @@
});
});
})
})
.
allowPublicAcquisition
(
"
translate
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
translate
"
,
function
translate
(
argument_list
)
{
return
route
(
this
,
'
translation_gadget
'
,
'
translate
'
,
argument_list
);
return
route
(
this
,
'
translation_gadget
'
,
'
translate
'
,
argument_list
);
})
})
.
allowPublicAcquisition
(
"
redirect
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
redirect
"
,
function
redirect
(
param_list
)
{
return
route
(
this
,
'
router
'
,
'
redirect
'
,
param_list
);
return
route
(
this
,
'
router
'
,
'
redirect
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
'
reload
'
,
function
()
{
.
allowPublicAcquisition
(
'
reload
'
,
function
reload
()
{
return
location
.
reload
();
return
location
.
reload
();
})
})
.
allowPublicAcquisition
(
"
getUrlParameter
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
getUrlParameter
"
,
function
getUrlParameter
(
param_list
)
{
return
route
(
this
,
'
router
'
,
'
getUrlParameter
'
,
param_list
);
return
route
(
this
,
'
router
'
,
'
getUrlParameter
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
getUrlFor
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
getUrlFor
"
,
function
getUrlFor
(
param_list
)
{
return
route
(
this
,
'
router
'
,
'
getCommandUrlFor
'
,
param_list
);
return
route
(
this
,
'
router
'
,
'
getCommandUrlFor
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
getUrlForList
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
getUrlForList
"
,
function
getUrlForList
(
param_list
)
{
return
route
(
this
,
'
router
'
,
'
getCommandUrlForList
'
,
param_list
);
return
route
(
this
,
'
router
'
,
'
getCommandUrlForList
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
updateHeader
(
param_list
)
{
var
gadget
=
this
;
var
gadget
=
this
;
initHeaderOptions
(
gadget
);
initHeaderOptions
(
gadget
);
return
this
.
getDeclaredGadget
(
"
translation_gadget
"
)
return
this
.
getDeclaredGadget
(
"
translation_gadget
"
)
...
@@ -447,67 +459,78 @@
...
@@ -447,67 +459,78 @@
});
});
})
})
.
allowPublicAcquisition
(
"
updatePanel
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
updatePanel
"
,
function
updatePanel
(
param_list
)
{
var
gadget
=
this
;
var
gadget
=
this
;
initPanelOptions
(
gadget
);
initPanelOptions
(
gadget
);
gadget
.
props
.
panel_argument_list
=
param_list
[
0
];
gadget
.
props
.
panel_argument_list
=
param_list
[
0
];
})
})
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
hidePanel
(
param_list
)
{
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
})
})
.
allowPublicAcquisition
(
'
triggerPanel
'
,
function
()
{
.
allowPublicAcquisition
(
'
triggerPanel
'
,
function
triggerPanel
()
{
return
route
(
this
,
"
panel
"
,
"
toggle
"
);
return
route
(
this
,
"
panel
"
,
"
toggle
"
);
})
})
.
allowPublicAcquisition
(
'
renderEditorPanel
'
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
'
renderEditorPanel
'
,
function
renderEditorPanel
(
param_list
)
{
return
route
(
this
,
"
editor_panel
"
,
'
render
'
,
param_list
);
return
route
(
this
,
"
editor_panel
"
,
'
render
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
jio_allDocs
(
param_list
)
{
return
callJioGadget
(
this
,
"
allDocs
"
,
param_list
);
return
callJioGadget
(
this
,
"
allDocs
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_remove
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_remove
"
,
function
jio_remove
(
param_list
)
{
return
callJioGadget
(
this
,
"
remove
"
,
param_list
);
return
callJioGadget
(
this
,
"
remove
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_post
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_post
"
,
function
jio_post
(
param_list
)
{
return
callJioGadget
(
this
,
"
post
"
,
param_list
);
return
callJioGadget
(
this
,
"
post
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_put
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_put
"
,
function
jio_put
(
param_list
)
{
return
callJioGadget
(
this
,
"
put
"
,
param_list
);
return
callJioGadget
(
this
,
"
put
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_get
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_get
"
,
function
jio_get
(
param_list
)
{
return
callJioGadget
(
this
,
"
get
"
,
param_list
);
return
callJioGadget
(
this
,
"
get
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_allAttachments
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_allAttachments
"
,
function
jio_allAttachments
(
param_list
)
{
return
callJioGadget
(
this
,
"
allAttachments
"
,
param_list
);
return
callJioGadget
(
this
,
"
allAttachments
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_getAttachment
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_getAttachment
"
,
function
jio_getAttachment
(
param_list
)
{
return
callJioGadget
(
this
,
"
getAttachment
"
,
param_list
);
return
callJioGadget
(
this
,
"
getAttachment
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_putAttachment
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_putAttachment
"
,
function
jio_putAttachment
(
param_list
)
{
return
callJioGadget
(
this
,
"
putAttachment
"
,
param_list
);
return
callJioGadget
(
this
,
"
putAttachment
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_removeAttachment
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_removeAttachment
"
,
function
jio_removeAttachment
(
param_list
)
{
return
callJioGadget
(
this
,
"
removeAttachment
"
,
param_list
);
return
callJioGadget
(
this
,
"
removeAttachment
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
jio_repair
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_repair
"
,
function
jio_repair
(
param_list
)
{
return
callJioGadget
(
this
,
"
repair
"
,
param_list
);
return
callJioGadget
(
this
,
"
repair
"
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
triggerSubmit
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
triggerSubmit
"
,
function
triggerSubmit
(
param_list
)
{
return
this
.
getDeclaredGadget
(
MAIN_SCOPE
)
return
this
.
getDeclaredGadget
(
MAIN_SCOPE
)
.
push
(
function
(
main_gadget
)
{
.
push
(
function
(
main_gadget
)
{
return
main_gadget
.
triggerSubmit
.
apply
(
main_gadget
,
param_list
);
return
main_gadget
.
triggerSubmit
.
apply
(
main_gadget
,
param_list
);
});
});
})
})
.
allowPublicAcquisition
(
"
triggerMaximize
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
triggerMaximize
"
,
function
maximize
(
param_list
)
{
return
triggerMaximize
(
this
,
param_list
[
0
]);
return
triggerMaximize
(
this
,
param_list
[
0
]);
})
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
"
renderApplication
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
renderApplication
"
,
function
renderApplication
(
param_list
)
{
return
this
.
render
.
apply
(
this
,
param_list
);
return
this
.
render
.
apply
(
this
,
param_list
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
route_result
=
gadget
.
state
;
route_result
=
gadget
.
state
;
...
@@ -582,7 +605,7 @@
...
@@ -582,7 +605,7 @@
});
});
})
})
// Render the page
// Render the page
.
declareMethod
(
'
render
'
,
function
(
route_result
,
keep_message
)
{
.
declareMethod
(
'
render
'
,
function
render
(
route_result
,
keep_message
)
{
var
gadget
=
this
;
var
gadget
=
this
;
// Reinitialize the loading counter
// Reinitialize the loading counter
...
@@ -623,8 +646,10 @@
...
@@ -623,8 +646,10 @@
/////////////////////////////////
/////////////////////////////////
// Handle sub gadgets services
// Handle sub gadgets services
/////////////////////////////////
/////////////////////////////////
.
allowPublicAcquisition
(
'
reportServiceError
'
,
function
(
param_list
,
.
allowPublicAcquisition
(
'
reportServiceError
'
,
function
reportServiceError
(
gadget_scope
)
{
param_list
,
gadget_scope
)
{
if
(
gadget_scope
===
undefined
)
{
if
(
gadget_scope
===
undefined
)
{
// don't fail in case of dropped subgadget (like previous page)
// don't fail in case of dropped subgadget (like previous page)
return
;
return
;
...
@@ -633,7 +658,7 @@
...
@@ -633,7 +658,7 @@
return
displayError
(
this
,
param_list
[
0
]);
return
displayError
(
this
,
param_list
[
0
]);
})
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
return
displayError
(
this
,
new
Error
(
"
Unexpected form submit
"
));
return
displayError
(
this
,
new
Error
(
"
Unexpected form submit
"
));
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.
35176.12886.11639
</string>
</value>
<value>
<string>
967.
40872.33961.51165
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1526655
527.49
</float>
<float>
1526655
959.21
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
3306eae0
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// initialize the gadget content
// initialize the gadget content
//////////////////////////////////////////////
//////////////////////////////////////////////
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
gadget
=
this
,
var
gadget
=
this
,
field_json
=
options
.
field_json
,
field_json
=
options
.
field_json
,
sort_column_list
=
[],
sort_column_list
=
[],
...
@@ -308,7 +308,7 @@
...
@@ -308,7 +308,7 @@
return
queue
;
return
queue
;
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
sort_key
=
gadget
.
state
.
key
+
"
_sort_list:json
"
,
sort_key
=
gadget
.
state
.
key
+
"
_sort_list:json
"
,
sort_list
,
sort_list
,
...
@@ -691,7 +691,7 @@
...
@@ -691,7 +691,7 @@
return
result_queue
;
return
result_queue
;
})
})
.
declareMethod
(
'
getListboxInfo
'
,
function
()
{
.
declareMethod
(
'
getListboxInfo
'
,
function
getListboxInfo
()
{
var
domain_list
=
JSON
.
parse
(
this
.
state
.
domain_list_json
),
var
domain_list
=
JSON
.
parse
(
this
.
state
.
domain_list_json
),
domain_dict
=
JSON
.
parse
(
this
.
state
.
domain_dict_json
),
domain_dict
=
JSON
.
parse
(
this
.
state
.
domain_dict_json
),
i
,
i
,
...
@@ -717,7 +717,7 @@
...
@@ -717,7 +717,7 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// render the listbox in an asynchronous way
// render the listbox in an asynchronous way
//////////////////////////////////////////////
//////////////////////////////////////////////
.
declareJob
(
'
fetchLineContent
'
,
function
(
only_cancel
)
{
.
declareJob
(
'
fetchLineContent
'
,
function
fetchLineContent
(
only_cancel
)
{
if
(
only_cancel
)
{
if
(
only_cancel
)
{
return
;
return
;
}
}
...
@@ -785,7 +785,7 @@
...
@@ -785,7 +785,7 @@
});
});
})
})
.
declareMethod
(
"
getContent
"
,
function
(
options
)
{
.
declareMethod
(
"
getContent
"
,
function
getContent
(
options
)
{
var
form_gadget
=
this
,
var
form_gadget
=
this
,
k
,
k
,
field_gadget
,
field_gadget
,
...
@@ -818,7 +818,7 @@
...
@@ -818,7 +818,7 @@
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
var
gadget
=
this
,
var
gadget
=
this
,
sort_button
=
gadget
.
element
.
querySelector
(
'
button[name="Sort"]
'
),
sort_button
=
gadget
.
element
.
querySelector
(
'
button[name="Sort"]
'
),
hide_button
=
gadget
.
element
.
querySelector
(
'
button[name="Hide"]
'
),
hide_button
=
gadget
.
element
.
querySelector
(
'
button[name="Hide"]
'
),
...
@@ -905,11 +905,11 @@
...
@@ -905,11 +905,11 @@
},
false
,
false
)
},
false
,
false
)
.
allowPublicAcquisition
(
"
notifyInvalid
"
,
function
()
{
.
allowPublicAcquisition
(
"
notifyInvalid
"
,
function
notifyInvalid
()
{
return
;
return
;
})
})
.
allowPublicAcquisition
(
"
notifyValid
"
,
function
()
{
.
allowPublicAcquisition
(
"
notifyValid
"
,
function
notifyValid
()
{
return
;
return
;
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
3306eae0
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.3
4904.15900.7253
</string>
</value>
<value>
<string>
967.3
5176.12886.11639
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1526
297884.31
</float>
<float>
1526
654510.2
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
View file @
3306eae0
...
@@ -63,20 +63,20 @@ and handling data send&receive.
...
@@ -63,20 +63,20 @@ and handling data send&receive.
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
// Proxy methods to the child gadget
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
.
declareMethod
(
'
triggerSubmit
'
,
function
triggerSubmit
()
{
return
this
.
getDeclaredGadget
(
'
fg
'
)
return
this
.
getDeclaredGadget
(
'
fg
'
)
.
push
(
function
(
g
)
{
.
push
(
function
(
g
)
{
return
g
.
triggerSubmit
();
return
g
.
triggerSubmit
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
'
fg
'
)
return
this
.
getDeclaredGadget
(
'
fg
'
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
checkValidity
();
return
declared_gadget
.
checkValidity
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
gadget
=
this
;
var
gadget
=
this
;
// no need to add runtime information in general for forms ...
// no need to add runtime information in general for forms ...
// each Form Page Template handles that on their own
// each Form Page Template handles that on their own
...
@@ -89,7 +89,7 @@ and handling data send&receive.
...
@@ -89,7 +89,7 @@ and handling data send&receive.
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Own methods
// Own methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
jio_allDocs
(
param_list
)
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
...
@@ -102,7 +102,7 @@ and handling data send&receive.
...
@@ -102,7 +102,7 @@ and handling data send&receive.
return
result
;
return
result
;
});
});
})
})
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
()
{
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
notifySubmit
()
{
return
this
.
triggerSubmit
();
return
this
.
triggerSubmit
();
})
})
/**
/**
...
@@ -112,7 +112,7 @@ and handling data send&receive.
...
@@ -112,7 +112,7 @@ and handling data send&receive.
* `erp5_document` or parameters to obtain one: `jio_key`, `view`
* `erp5_document` or parameters to obtain one: `jio_key`, `view`
* `editable`
* `editable`
*/
*/
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareMethod
(
"
render
"
,
function
render
(
options
)
{
var
gadget
=
this
,
var
gadget
=
this
,
promise_queue
=
new
RSVP
.
Queue
(),
promise_queue
=
new
RSVP
.
Queue
(),
new_state
=
{
new_state
=
{
...
@@ -181,7 +181,7 @@ and handling data send&receive.
...
@@ -181,7 +181,7 @@ and handling data send&receive.
});
});
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
queue
,
var
queue
,
gadget
=
this
,
gadget
=
this
,
options
=
gadget
.
state
.
options
,
options
=
gadget
.
state
.
options
,
...
@@ -249,7 +249,7 @@ and handling data send&receive.
...
@@ -249,7 +249,7 @@ and handling data send&receive.
Returns: on success it returns a Promise with {string} JIO key
Returns: on success it returns a Promise with {string} JIO key
on failure it throws an error with the invalid response
on failure it throws an error with the invalid response
*/
*/
.
allowPublicAcquisition
(
"
submitContent
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
submitContent
"
,
function
submitContent
(
param_list
)
{
var
gadget
=
this
,
var
gadget
=
this
,
jio_key
=
param_list
[
0
],
jio_key
=
param_list
[
0
],
target_url
=
param_list
[
1
],
target_url
=
param_list
[
1
],
...
@@ -482,7 +482,7 @@ and handling data send&receive.
...
@@ -482,7 +482,7 @@ and handling data send&receive.
/** The only way how to force download from javascript (working everywhere)
/** The only way how to force download from javascript (working everywhere)
* is unfortunately constructing <a> and clicking on it
* is unfortunately constructing <a> and clicking on it
*/
*/
.
declareJob
(
"
forceDownload
"
,
function
(
attachment
)
{
.
declareJob
(
"
forceDownload
"
,
function
forceDownload
(
attachment
)
{
var
attachment_data
=
attachment
.
target
.
response
,
var
attachment_data
=
attachment
.
target
.
response
,
filename
=
/
(?:
^|;
)\s
*filename
\s
*=
\s
*"
?([^
";
]
+
)
/i
.
exec
(
filename
=
/
(?:
^|;
)\s
*filename
\s
*=
\s
*"
?([^
";
]
+
)
/i
.
exec
(
attachment
.
target
.
getResponseHeader
(
"
Content-Disposition
"
)
||
""
attachment
.
target
.
getResponseHeader
(
"
Content-Disposition
"
)
||
""
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
View file @
3306eae0
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superkato
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.61650.63360.2466
1
</string>
</value>
<value>
<string>
96
7.24634.17714.1500
1
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
4060387.5
</float>
<float>
152
6655457.44
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
View file @
3306eae0
...
@@ -38,18 +38,18 @@
...
@@ -38,18 +38,18 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
toggle
'
,
function
()
{
.
declareMethod
(
'
toggle
'
,
function
toggle
()
{
return
this
.
changeState
({
return
this
.
changeState
({
visible
:
!
this
.
state
.
visible
visible
:
!
this
.
state
.
visible
});
});
})
})
.
declareMethod
(
'
close
'
,
function
()
{
.
declareMethod
(
'
close
'
,
function
close
()
{
return
this
.
changeState
({
return
this
.
changeState
({
visible
:
false
visible
:
false
});
});
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
erp5_document
=
options
.
erp5_document
,
var
erp5_document
=
options
.
erp5_document
,
view
=
options
.
view
,
view
=
options
.
view
,
context
=
this
,
context
=
this
,
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
});
});
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
context
=
this
,
var
context
=
this
,
gadget
=
this
,
gadget
=
this
,
queue
=
new
RSVP
.
Queue
(),
queue
=
new
RSVP
.
Queue
(),
...
@@ -310,14 +310,17 @@
...
@@ -310,14 +310,17 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared services
// declared services
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
if
((
evt
.
target
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
if
((
evt
.
target
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
(
evt
.
target
.
tagName
===
'
BUTTON
'
))
{
(
evt
.
target
.
tagName
===
'
BUTTON
'
))
{
return
this
.
toggle
();
return
this
.
toggle
();
}
}
},
false
,
false
)
},
false
,
false
)
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
,
scope
)
{
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
notifyChange
(
argument_list
,
scope
)
{
if
(
scope
===
'
erp5_checkbox
'
)
{
if
(
scope
===
'
erp5_checkbox
'
)
{
var
context
=
this
;
var
context
=
this
;
return
context
.
getDeclaredGadget
(
'
erp5_checkbox
'
)
return
context
.
getDeclaredGadget
(
'
erp5_checkbox
'
)
...
@@ -335,12 +338,12 @@
...
@@ -335,12 +338,12 @@
// Typing a search query should not modify the header status
// Typing a search query should not modify the header status
return
;
return
;
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
allowPublicAcquisition
(
'
notifyValid
'
,
function
()
{
.
allowPublicAcquisition
(
'
notifyValid
'
,
function
notifyValid
()
{
// Typing a search query should not modify the header status
// Typing a search query should not modify the header status
return
;
return
;
})
})
.
onEvent
(
'
submit
'
,
function
(
event
)
{
.
onEvent
(
'
submit
'
,
function
submit
(
event
)
{
var
gadget
=
this
,
var
gadget
=
this
,
search_gadget
,
search_gadget
,
redirect_options
=
{
redirect_options
=
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.58910.9997.17254
</string>
</value>
<value>
<string>
96
7.24634.17714.15001
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
3892386.86
</float>
<float>
152
6656725.01
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
3306eae0
...
@@ -112,14 +112,14 @@
...
@@ -112,14 +112,14 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
// Proxy methods to the child gadget
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
checkValidity
();
return
declared_gadget
.
checkValidity
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
sub_gadget
)
{
.
push
(
function
(
sub_gadget
)
{
return
sub_gadget
.
getContent
();
return
sub_gadget
.
getContent
();
...
@@ -129,11 +129,11 @@
...
@@ -129,11 +129,11 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
.
declareMethod
(
'
triggerSubmit
'
,
function
triggerSubmit
()
{
this
.
element
.
querySelector
(
'
input[type="submit"]
'
).
click
();
this
.
element
.
querySelector
(
'
input[type="submit"]
'
).
click
();
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
gadget
=
this
;
var
gadget
=
this
;
// copy out wanted items from options and pass it to `changeState`
// copy out wanted items from options and pass it to `changeState`
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
});
});
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
form_gadget
=
this
,
var
form_gadget
=
this
,
selector
=
form_gadget
.
element
.
querySelector
(
"
h3
"
),
selector
=
form_gadget
.
element
.
querySelector
(
"
h3
"
),
view_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_workflow
),
view_list
=
ensureArray
(
this
.
state
.
erp5_document
.
_links
.
action_workflow
),
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
});
});
})
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
if
(
this
.
state
.
has_update_action
===
true
)
{
if
(
this
.
state
.
has_update_action
===
true
)
{
// default action on submit is update in case of its existence
// default action on submit is update in case of its existence
return
submitDialog
(
this
,
true
);
return
submitDialog
(
this
,
true
);
...
@@ -260,7 +260,7 @@
...
@@ -260,7 +260,7 @@
return
submitDialog
(
this
,
false
);
return
submitDialog
(
this
,
false
);
},
false
,
true
)
},
false
,
true
)
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
if
(
evt
.
target
.
name
===
"
action_confirm
"
)
{
if
(
evt
.
target
.
name
===
"
action_confirm
"
)
{
evt
.
preventDefault
();
evt
.
preventDefault
();
return
submitDialog
(
this
,
false
);
return
submitDialog
(
this
,
false
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
3306eae0
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superkato
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.63118.5474.36386
</string>
</value>
<value>
<string>
96
7.24634.17714.15001
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
4572973.21
</float>
<float>
152
6654351.56
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
3306eae0
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
// Proxy methods to the child gadget
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
checkValidity
();
return
declared_gadget
.
checkValidity
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
getContent
();
return
declared_gadget
.
getContent
();
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
.
push
(
function
(
extended_search
)
{
.
push
(
function
(
extended_search
)
{
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
});
});
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
form_gadget
=
this
;
var
form_gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
})
})
.
declareMethod
(
'
triggerSubmit
'
,
function
(
options
)
{
.
declareMethod
(
'
triggerSubmit
'
,
function
triggerSubmit
(
options
)
{
var
gadget
=
this
,
var
gadget
=
this
,
extended_search
=
''
,
extended_search
=
''
,
focus_on
;
focus_on
;
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
"
erp5_searchfield
"
)
return
gadget
.
getDeclaredGadget
(
"
erp5_searchfield
"
)
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.57864.64457.52974
</string>
</value>
<value>
<string>
96
6.8130.3423.18312
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
0432653.26
</float>
<float>
152
6654620.37
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
3306eae0
...
@@ -13,20 +13,20 @@
...
@@ -13,20 +13,20 @@
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
getUrlParameter
'
,
'
getUrlParameter
'
)
.
declareAcquiredMethod
(
'
getUrlParameter
'
,
'
getUrlParameter
'
)
.
allowPublicAcquisition
(
"
notifyChange
"
,
function
()
{
.
allowPublicAcquisition
(
"
notifyChange
"
,
function
notifyChange
()
{
return
this
.
notifyChange
({
modified
:
true
});
return
this
.
notifyChange
({
modified
:
true
});
})
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
// Proxy methods to the child gadget
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
checkValidity
();
return
declared_gadget
.
checkValidity
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
getContent
();
return
declared_gadget
.
getContent
();
...
@@ -36,11 +36,11 @@
...
@@ -36,11 +36,11 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
.
declareMethod
(
'
triggerSubmit
'
,
function
triggerSubmit
()
{
this
.
element
.
querySelector
(
'
button
'
).
click
();
this
.
element
.
querySelector
(
'
button
'
).
click
();
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
jio_key
:
options
.
jio_key
,
jio_key
:
options
.
jio_key
,
view
:
options
.
view
,
view
:
options
.
view
,
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
;
var
gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
});
});
})
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
if
(
this
.
state
.
save_action
!==
true
)
{
if
(
this
.
state
.
save_action
!==
true
)
{
// If not action is defined on form, do nothing
// If not action is defined on form, do nothing
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
3306eae0
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superkato
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.61712.44180.1302
1
</string>
</value>
<value>
<string>
96
7.24634.17714.1500
1
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
4060534.16
</float>
<float>
152
6654723.98
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
View file @
3306eae0
...
@@ -36,13 +36,13 @@
...
@@ -36,13 +36,13 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
// Proxy methods to the child gadget
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
checkValidity
();
return
declared_gadget
.
checkValidity
();
});
});
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
return
this
.
getDeclaredGadget
(
"
erp5_form
"
)
.
push
(
function
(
declared_gadget
)
{
.
push
(
function
(
declared_gadget
)
{
return
declared_gadget
.
getContent
();
return
declared_gadget
.
getContent
();
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
jio_key
:
options
.
jio_key
,
jio_key
:
options
.
jio_key
,
title
:
options
.
title
,
title
:
options
.
title
,
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
;
var
gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.40859.
32808.1546
2
</string>
</value>
<value>
<string>
967.40859.
56331.2413
2
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15266551
11.52
</float>
<float>
15266551
83.34
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
View file @
3306eae0
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
tag
:
'
p
'
tag
:
'
p
'
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
var
field_json
=
options
.
field_json
||
{},
state_dict
=
{
state_dict
=
{
text_content
:
field_json
.
value
||
field_json
.
default
||
""
,
text_content
:
field_json
.
value
||
field_json
.
default
||
""
,
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
'
p
'
)
return
this
.
getDeclaredGadget
(
'
p
'
)
.
push
(
function
(
input
)
{
.
push
(
function
(
input
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.41976.11439.18449
</string>
</value>
<value>
<string>
96
7.40829.55479.20582
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15266533
10.74
</float>
<float>
15266533
77.62
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
View file @
3306eae0
...
@@ -916,13 +916,13 @@
...
@@ -916,13 +916,13 @@
rJS
(
window
)
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
.
ready
(
function
createProps
(
gadget
)
{
gadget
.
props
=
{
gadget
.
props
=
{
options
:
{}
options
:
{}
};
};
})
})
.
ready
(
function
(
gadget
)
{
.
ready
(
function
createJioSelection
(
gadget
)
{
return
gadget
.
getDeclaredGadget
(
"
jio_selection
"
)
return
gadget
.
getDeclaredGadget
(
"
jio_selection
"
)
.
push
(
function
(
jio_gadget
)
{
.
push
(
function
(
jio_gadget
)
{
gadget
.
props
.
jio_gadget
=
jio_gadget
;
gadget
.
props
.
jio_gadget
=
jio_gadget
;
...
@@ -936,7 +936,7 @@
...
@@ -936,7 +936,7 @@
});
});
})
})
.
ready
(
function
(
gadget
)
{
.
ready
(
function
createJioNavigationHistory
(
gadget
)
{
return
gadget
.
getDeclaredGadget
(
"
jio_navigation_history
"
)
return
gadget
.
getDeclaredGadget
(
"
jio_navigation_history
"
)
.
push
(
function
(
jio_gadget
)
{
.
push
(
function
(
jio_gadget
)
{
gadget
.
props
.
jio_navigation_gadget
=
jio_gadget
;
gadget
.
props
.
jio_navigation_gadget
=
jio_gadget
;
...
@@ -950,7 +950,7 @@
...
@@ -950,7 +950,7 @@
});
});
})
})
.
ready
(
function
(
gadget
)
{
.
ready
(
function
createJioDocumentState
(
gadget
)
{
return
gadget
.
getDeclaredGadget
(
"
jio_document_state
"
)
return
gadget
.
getDeclaredGadget
(
"
jio_document_state
"
)
.
push
(
function
(
jio_gadget
)
{
.
push
(
function
(
jio_gadget
)
{
gadget
.
props
.
jio_state_gadget
=
jio_gadget
;
gadget
.
props
.
jio_state_gadget
=
jio_gadget
;
...
@@ -960,7 +960,7 @@
...
@@ -960,7 +960,7 @@
});
});
});
});
})
})
.
ready
(
function
(
g
)
{
.
ready
(
function
createJioForContent
(
g
)
{
return
g
.
getDeclaredGadget
(
"
jio_form_content
"
)
return
g
.
getDeclaredGadget
(
"
jio_form_content
"
)
.
push
(
function
(
jio_form_content
)
{
.
push
(
function
(
jio_form_content
)
{
g
.
props
.
jio_form_content
=
jio_form_content
;
g
.
props
.
jio_form_content
=
jio_form_content
;
...
@@ -971,7 +971,9 @@
...
@@ -971,7 +971,9 @@
});
});
})
})
.
declareMethod
(
'
getCommandUrlForList
'
,
function
(
options_list
)
{
.
declareMethod
(
'
getCommandUrlForList
'
,
function
getCommandUrlForList
(
options_list
)
{
var
i
,
var
i
,
result_list
=
[];
result_list
=
[];
for
(
i
=
0
;
i
<
options_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
options_list
.
length
;
i
+=
1
)
{
...
@@ -979,11 +981,11 @@
...
@@ -979,11 +981,11 @@
}
}
return
result_list
;
return
result_list
;
})
})
.
declareMethod
(
'
getCommandUrlFor
'
,
function
(
options
)
{
.
declareMethod
(
'
getCommandUrlFor
'
,
function
getCommandUrlFor
(
options
)
{
return
getCommandUrlForMethod
(
this
,
options
);
return
getCommandUrlForMethod
(
this
,
options
);
})
})
.
declareMethod
(
'
redirect
'
,
function
(
options
,
push_history
)
{
.
declareMethod
(
'
redirect
'
,
function
redirect
(
options
,
push_history
)
{
this
.
props
.
form_content
=
options
.
form_content
;
this
.
props
.
form_content
=
options
.
form_content
;
// XXX Should we make it a second method parameter
// XXX Should we make it a second method parameter
this
.
props
.
keep_message
=
true
;
this
.
props
.
keep_message
=
true
;
...
@@ -994,11 +996,11 @@
...
@@ -994,11 +996,11 @@
});
});
})
})
.
declareMethod
(
'
getUrlParameter
'
,
function
(
key
)
{
.
declareMethod
(
'
getUrlParameter
'
,
function
getUrlParameter
(
key
)
{
return
this
.
props
.
options
[
key
];
return
this
.
props
.
options
[
key
];
})
})
.
declareMethod
(
'
route
'
,
function
(
command_options
)
{
.
declareMethod
(
'
route
'
,
function
route
(
command_options
)
{
var
gadget
=
this
,
var
gadget
=
this
,
result
;
result
;
...
@@ -1027,7 +1029,7 @@
...
@@ -1027,7 +1029,7 @@
});
});
})
})
.
declareMethod
(
'
start
'
,
function
()
{
.
declareMethod
(
'
start
'
,
function
start
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -1057,7 +1059,7 @@
...
@@ -1057,7 +1059,7 @@
throw
error
;
throw
error
;
});
});
})
})
.
declareMethod
(
'
notify
'
,
function
(
options
)
{
.
declareMethod
(
'
notify
'
,
function
notify
(
options
)
{
this
.
props
.
modified
=
(
options
&&
options
.
modified
);
this
.
props
.
modified
=
(
options
&&
options
.
modified
);
})
})
...
@@ -1070,10 +1072,10 @@
...
@@ -1070,10 +1072,10 @@
.
declareAcquiredMethod
(
'
translate
'
,
'
translate
'
)
.
declareAcquiredMethod
(
'
translate
'
,
'
translate
'
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareJob
(
'
listenHashChange
'
,
function
()
{
.
declareJob
(
'
listenHashChange
'
,
function
listenHashChangeJob
()
{
return
listenHashChange
(
this
);
return
listenHashChange
(
this
);
})
})
.
declareService
(
function
()
{
.
declareService
(
function
beforeunload
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
loopEventListener
(
return
loopEventListener
(
window
,
window
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
View file @
3306eae0
...
@@ -232,7 +232,7 @@
...
@@ -232,7 +232,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.3
4846.62513.42240
</string>
</value>
<value>
<string>
967.3
5176.12886.11639
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1526
294815.82
</float>
<float>
1526
656132.45
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
View file @
3306eae0
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
//////////////////////////////////////////////
//////////////////////////////////////////////
// initialize the gadget content
// initialize the gadget content
//////////////////////////////////////////////
//////////////////////////////////////////////
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
operator
=
'
AND
'
,
var
operator
=
'
AND
'
,
query_list
=
[],
query_list
=
[],
i
,
i
,
...
@@ -322,7 +322,7 @@
...
@@ -322,7 +322,7 @@
});
});
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
,
var
gadget
=
this
,
container
=
gadget
.
element
.
querySelector
(
"
.container
"
),
container
=
gadget
.
element
.
querySelector
(
"
.container
"
),
div
=
document
.
createElement
(
"
div
"
),
div
=
document
.
createElement
(
"
div
"
),
...
@@ -359,7 +359,7 @@
...
@@ -359,7 +359,7 @@
});
});
})
})
.
declareJob
(
'
focusOnLastInput
'
,
function
(
index
)
{
.
declareJob
(
'
focusOnLastInput
'
,
function
focusOnLastInput
(
index
)
{
var
input_list
=
this
.
element
.
querySelectorAll
(
'
input
'
);
var
input_list
=
this
.
element
.
querySelectorAll
(
'
input
'
);
if
(
index
===
undefined
)
{
if
(
index
===
undefined
)
{
index
=
input_list
.
length
-
1
;
index
=
input_list
.
length
-
1
;
...
@@ -369,7 +369,7 @@
...
@@ -369,7 +369,7 @@
}
}
})
})
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
var
new_state
=
getQueryStateFromDOM
(
this
),
var
new_state
=
getQueryStateFromDOM
(
this
),
operator
=
new_state
.
operator
,
operator
=
new_state
.
operator
,
query_list
=
new_state
.
query_list
,
query_list
=
new_state
.
query_list
,
...
@@ -430,7 +430,7 @@
...
@@ -430,7 +430,7 @@
})
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
var
new_state
;
var
new_state
;
if
(
evt
.
target
.
classList
.
contains
(
'
trash
'
))
{
if
(
evt
.
target
.
classList
.
contains
(
'
trash
'
))
{
...
@@ -464,7 +464,7 @@
...
@@ -464,7 +464,7 @@
}
}
},
false
,
false
)
},
false
,
false
)
.
onEvent
(
'
change
'
,
function
(
evt
)
{
.
onEvent
(
'
change
'
,
function
change
(
evt
)
{
if
(
evt
.
target
.
classList
.
contains
(
'
column
'
))
{
if
(
evt
.
target
.
classList
.
contains
(
'
column
'
))
{
// Reset the operator when user change the column/key
// Reset the operator when user change the column/key
evt
.
preventDefault
();
evt
.
preventDefault
();
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.8576.5602.10291
</string>
</value>
<value>
<string>
96
7.40700.16743.2833
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
0872456.29
</float>
<float>
152
6656468.0
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.js
View file @
3306eae0
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
trigger
"
,
"
trigger
"
)
.
declareAcquiredMethod
(
"
trigger
"
,
"
trigger
"
)
.
onStateChange
(
function
()
{
.
onStateChange
(
function
onStateChange
()
{
var
gadget
=
this
,
var
gadget
=
this
,
div
=
document
.
createElement
(
"
div
"
),
div
=
document
.
createElement
(
"
div
"
),
container
=
gadget
.
element
.
querySelector
(
"
.container
"
);
container
=
gadget
.
element
.
querySelector
(
"
.container
"
);
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
});
});
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
sort_column_list
:
options
.
sort_column_list
||
[],
sort_column_list
:
options
.
sort_column_list
||
[],
key
:
options
.
key
,
key
:
options
.
key
,
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
});
});
})
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
.
onEvent
(
'
click
'
,
function
click
(
evt
)
{
var
gadget
=
this
,
var
gadget
=
this
,
container
;
container
;
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
},
false
,
false
)
},
false
,
false
)
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
var
gadget
=
this
,
var
gadget
=
this
,
sort_list
=
gadget
.
element
.
querySelectorAll
(
"
.sort_item
"
),
sort_list
=
gadget
.
element
.
querySelectorAll
(
"
.sort_item
"
),
sort_query
=
[],
sort_query
=
[],
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_sorteditor_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.41976.11439.18449
</string>
</value>
<value>
<string>
96
7.40883.19504.22237
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15266565
17.8
</float>
<float>
15266565
72.21
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.js
View file @
3306eae0
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
prepend
:
''
prepend
:
''
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
text_content
:
getFirstNonEmpty
(
options
.
text_content
,
""
),
text_content
:
getFirstNonEmpty
(
options
.
text_content
,
""
),
inner_html
:
getFirstNonEmpty
(
options
.
inner_html
,
""
),
inner_html
:
getFirstNonEmpty
(
options
.
inner_html
,
""
),
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
element
=
this
.
element
,
var
element
=
this
.
element
,
new_element
=
document
.
createElement
(
this
.
state
.
tag
),
new_element
=
document
.
createElement
(
this
.
state
.
tag
),
content
=
this
.
state
.
text_content
,
content
=
this
.
state
.
text_content
,
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
* obtain value of readonly fields.
* obtain value of readonly fields.
* In order to make it more developer-friendly, only named fields return their values.
* In order to make it more developer-friendly, only named fields return their values.
*/
*/
.
declareMethod
(
"
getContent
"
,
function
()
{
.
declareMethod
(
"
getContent
"
,
function
getContent
()
{
var
data
=
{};
var
data
=
{};
if
(
!
this
.
state
.
name
)
{
if
(
!
this
.
state
.
name
)
{
return
data
;
return
data
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.xml
View file @
3306eae0
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.
35176.12886.11639
</string>
</value>
<value>
<string>
967.
40821.39698.7918
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15266528
16.29
</float>
<float>
15266528
86.57
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
3306eae0
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
rJS
(
window
)
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
checked
:
options
.
checked
,
checked
:
options
.
checked
,
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
});
});
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
textarea
=
this
.
element
.
querySelector
(
'
input
'
),
var
textarea
=
this
.
element
.
querySelector
(
'
input
'
),
tmp
;
// general use short-scope variable
tmp
;
// general use short-scope variable
...
@@ -119,13 +119,13 @@
...
@@ -119,13 +119,13 @@
}
}
})
})
.
declareService
(
function
()
{
.
declareService
(
function
focus
()
{
if
(
this
.
state
.
focus
===
true
)
{
if
(
this
.
state
.
focus
===
true
)
{
this
.
element
.
querySelector
(
'
input
'
).
focus
();
this
.
element
.
querySelector
(
'
input
'
).
focus
();
}
}
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
gadget
=
this
,
var
gadget
=
this
,
result
=
{},
result
=
{},
input
;
input
;
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
var
result
=
this
.
element
.
querySelector
(
'
input
'
).
checkValidity
(),
var
result
=
this
.
element
.
querySelector
(
'
input
'
).
checkValidity
(),
gadget
=
this
;
gadget
=
this
;
if
(
result
)
{
if
(
result
)
{
...
@@ -206,13 +206,13 @@
...
@@ -206,13 +206,13 @@
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
onEvent
(
'
change
'
,
function
()
{
.
onEvent
(
'
change
'
,
function
change
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
this
.
checkValidity
(),
this
.
checkValidity
(),
this
.
notifyChange
(
"
change
"
)
this
.
notifyChange
(
"
change
"
)
]);
]);
},
false
,
false
)
},
false
,
false
)
.
onEvent
(
'
input
'
,
function
()
{
.
onEvent
(
'
input
'
,
function
input
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
this
.
checkValidity
(),
this
.
checkValidity
(),
this
.
notifyChange
(
"
input
"
)
this
.
notifyChange
(
"
input
"
)
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
},
false
,
false
)
},
false
,
false
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
onEvent
(
'
invalid
'
,
function
(
evt
)
{
.
onEvent
(
'
invalid
'
,
function
invalid
(
evt
)
{
// invalid event does not bubble
// invalid event does not bubble
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
},
true
,
false
);
},
true
,
false
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.
20671.63313.4891
3
</string>
</value>
<value>
<string>
967.
40700.16743.283
3
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
5444277.62
</float>
<float>
152
6653024.9
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_select_js.js
View file @
3306eae0
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
required
:
false
required
:
false
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
item_list
:
JSON
.
stringify
(
options
.
item_list
),
item_list
:
JSON
.
stringify
(
options
.
item_list
),
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
i
,
var
i
,
found
=
false
,
found
=
false
,
template
,
template
,
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
}
}
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
result
=
{},
var
result
=
{},
select
=
this
.
element
.
querySelector
(
'
select
'
);
select
=
this
.
element
.
querySelector
(
'
select
'
);
if
(
this
.
state
.
editable
)
{
if
(
this
.
state
.
editable
)
{
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
})
})
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
var
result
=
this
.
element
.
querySelector
(
'
select
'
).
checkValidity
();
var
result
=
this
.
element
.
querySelector
(
'
select
'
).
checkValidity
();
if
(
result
)
{
if
(
result
)
{
return
this
.
notifyValid
()
return
this
.
notifyValid
()
...
@@ -136,13 +136,13 @@
...
@@ -136,13 +136,13 @@
})
})
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
onEvent
(
'
change
'
,
function
()
{
.
onEvent
(
'
change
'
,
function
change
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
this
.
checkValidity
(),
this
.
checkValidity
(),
this
.
notifyChange
()
this
.
notifyChange
()
]);
]);
},
false
,
false
)
},
false
,
false
)
.
onEvent
(
'
input
'
,
function
()
{
.
onEvent
(
'
input
'
,
function
input
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
this
.
checkValidity
(),
this
.
checkValidity
(),
this
.
notifyChange
()
this
.
notifyChange
()
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
},
false
,
false
)
},
false
,
false
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
onEvent
(
'
invalid
'
,
function
(
evt
)
{
.
onEvent
(
'
invalid
'
,
function
invalid
(
evt
)
{
// invalid event does not bubble
// invalid event does not bubble
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
},
true
,
false
);
},
true
,
false
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_select_js.xml
View file @
3306eae0
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.49904.48685.29218
</string>
</value>
<value>
<string>
96
7.24634.17714.15001
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
3352106.52
</float>
<float>
152
6653125.57
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.js
View file @
3306eae0
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
value
:
''
value
:
''
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
return
this
.
changeState
(
options
);
return
this
.
changeState
(
options
);
})
})
.
onStateChange
(
function
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
if
(
modification_dict
.
hasOwnProperty
(
"
value
"
))
{
if
(
modification_dict
.
hasOwnProperty
(
"
value
"
))
{
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
result
=
{},
var
result
=
{},
input
;
input
;
if
(
this
.
state
.
editable
)
{
if
(
this
.
state
.
editable
)
{
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
})
})
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
checkValidity
()
{
var
result
=
this
.
element
.
querySelector
(
'
textarea
'
).
checkValidity
();
var
result
=
this
.
element
.
querySelector
(
'
textarea
'
).
checkValidity
();
if
(
result
)
{
if
(
result
)
{
return
this
.
notifyValid
()
return
this
.
notifyValid
()
...
@@ -89,13 +89,13 @@
...
@@ -89,13 +89,13 @@
.
onEvent
(
'
input
'
,
checkChange
,
false
,
true
)
.
onEvent
(
'
input
'
,
checkChange
,
false
,
true
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
onEvent
(
'
invalid
'
,
function
(
evt
)
{
.
onEvent
(
'
invalid
'
,
function
invalid
(
evt
)
{
// invalid event does not bubble
// invalid event does not bubble
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
},
true
,
true
)
},
true
,
true
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
onEvent
(
'
keydown
'
,
function
(
evt
)
{
.
onEvent
(
'
keydown
'
,
function
keydown
(
evt
)
{
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
if
(
evt
.
keyCode
===
83
&&
(
navigator
.
platform
.
match
(
"
Mac
"
)
?
evt
.
metaKey
:
evt
.
ctrlKey
))
{
if
(
evt
.
keyCode
===
83
&&
(
navigator
.
platform
.
match
(
"
Mac
"
)
?
evt
.
metaKey
:
evt
.
ctrlKey
))
{
//Textarea's change event is generally launched by browser when press a predefined key
//Textarea's change event is generally launched by browser when press a predefined key
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
View file @
3306eae0
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
966.
9555.11713.4232
</string>
</value>
<value>
<string>
966.
49875.42877.4590
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,8 +254,8 @@
...
@@ -254,8 +254,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
0933309.18
</float>
<float>
152
6653198.19
</float>
<string>
GMT+1
</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