Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
ca098f8b
Commit
ca098f8b
authored
Jun 17, 2019
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "DATETIMEFIELDUPDATE +1 (remove TRISTAN, console.log, ERP5TypeTestCase)"
This reverts commit
9929bc4f
.
parent
34224342
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
31 deletions
+14
-31
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
+11
-28
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
+3
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
ca098f8b
...
...
@@ -19,7 +19,12 @@
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
render
(
options
)
{
if
(
this
.
state
&&
this
.
state
.
name
===
"
field_my_title
"
||
options
&&
options
.
name
===
"
field_my_title
"
)
console
.
log
(
"
input: render on call
"
,
options
);
var
input
=
this
.
element
.
querySelector
(
"
input
"
);
if
(
input
)
{
// force the state to have the current edited value
this
.
state
.
checked
=
input
.
checked
;
this
.
state
.
value
=
input
.
value
;
}
return
this
.
changeState
({
value
:
getFirstNonEmpty
(
options
.
value
,
""
),
checked
:
options
.
checked
,
...
...
@@ -42,31 +47,17 @@
})
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
if
(
this
.
state
.
name
===
"
field_my_title
"
)
console
.
log
(
"
input: onStateChange on call
"
,
modification_dict
);
var
textarea
=
this
.
element
.
querySelector
(
'
input
'
),
tmp
;
// general use short-scope variable
if
(
modification_dict
.
hasOwnProperty
(
"
value
"
))
{
// TRISTAN
textarea
.
value
=
this
.
state
.
value
;
textarea
.
setAttribute
(
'
value
'
,
this
.
state
.
value
);
}
if
(
modification_dict
.
hasOwnProperty
(
"
checked
"
))
{
// TRISTAN
textarea
.
checked
=
this
.
state
.
checked
;
if
(
this
.
state
.
checked
)
{
textarea
.
setAttribute
(
'
checked
'
,
'
checked
'
);
}
else
{
textarea
.
removeAttribute
(
'
checked
'
);
}
}
if
(
this
.
state
.
type
===
'
checkbox
'
)
{
// textarea.checked = this.state.checked; // TRISTAN
textarea
.
checked
=
this
.
state
.
checked
;
}
else
{
// textarea.setAttribute('value', this.state.value); // TRISTAN
// textarea.value = this.state.value; // TRISTAN
textarea
.
setAttribute
(
'
value
'
,
this
.
state
.
value
);
textarea
.
value
=
this
.
state
.
value
;
}
if
(
this
.
state
.
type
===
'
radio
'
)
{
// textarea.checked = this.state.checked; // TRISTAN
textarea
.
checked
=
this
.
state
.
checked
;
}
textarea
.
id
=
this
.
state
.
id
||
this
.
state
.
name
;
textarea
.
setAttribute
(
'
name
'
,
this
.
state
.
name
);
...
...
@@ -221,15 +212,7 @@
},
{
mutex
:
'
changestate
'
})
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
//.onEvent('change', function change() {
.
onEvent
(
'
change
'
,
function
change
(
event
)
{
if
(
this
.
state
.
name
===
"
field_my_title
"
)
console
.
log
(
"
input: event change
"
,
event
,
event
.
target
.
value
);
var
input
=
this
.
element
.
querySelector
(
"
input
"
);
// TRISTAN
if
(
input
)
{
// force the state to have the current edited value
this
.
state
.
checked
=
input
.
checked
;
this
.
state
.
value
=
input
.
value
;
}
.
onEvent
(
'
change
'
,
function
change
()
{
return
RSVP
.
all
([
this
.
checkValidity
(),
this
.
notifyChange
(
"
change
"
)
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
View file @
ca098f8b
...
...
@@ -214,7 +214,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
39254.10526.36096
</string>
</value>
<value>
<string>
975.
16158.58810.54749
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
155
7412896.19
</float>
<float>
155
6111993.61
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment