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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
628eaa5f
Commit
628eaa5f
authored
Nov 27, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: auto focus on textarea
parent
a48df1f1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
11 deletions
+24
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
...ateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
...eItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.xml
...Item/web_page_module/rjs_gadget_erp5_textareafield_js.xml
+3
-3
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
+13
-2
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_stringfield_js.js
View file @
628eaa5f
...
...
@@ -19,6 +19,7 @@
error_text
:
field_json
.
error_text
,
title
:
field_json
.
description
,
hidden
:
field_json
.
hidden
,
focus
:
field_json
.
focus
,
trim
:
true
,
maxlength
:
field_json
.
maxlength
,
// Force calling subfield render
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
View file @
628eaa5f
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
988.26496.42040.8686
</string>
</value>
<value>
<string>
1008.49638.7192.9762
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1
609253229.32
</float>
<float>
1
701078143.96
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
View file @
628eaa5f
...
...
@@ -18,6 +18,7 @@
title
:
field_json
.
description
,
hidden
:
field_json
.
hidden
,
required
:
field_json
.
required
,
focus
:
field_json
.
focus
,
// Force calling subfield render
// as user may have modified the input value
render_timestamp
:
new
Date
().
getTime
()
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.xml
View file @
628eaa5f
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
989.27523.29749.43383
</string>
</value>
<value>
<string>
1008.49638.7192.9762
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1
614692613.61
</float>
<float>
1
701077004.8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.js
View file @
628eaa5f
...
...
@@ -17,6 +17,7 @@
id
:
options
.
id
,
name
:
options
.
name
,
title
:
options
.
title
,
focus
:
options
.
focus
,
error_text
:
options
.
error_text
||
""
,
hidden
:
options
.
hidden
});
...
...
@@ -30,7 +31,8 @@
modification_dict
.
hasOwnProperty
(
'
required
'
)
||
modification_dict
.
hasOwnProperty
(
'
id
'
)
||
modification_dict
.
hasOwnProperty
(
'
name
'
)
||
modification_dict
.
hasOwnProperty
(
'
title
'
)
modification_dict
.
hasOwnProperty
(
'
title
'
)
||
modification_dict
.
hasOwnProperty
(
'
focus
'
)
)
{
if
(
modification_dict
.
hasOwnProperty
(
"
value
"
))
{
...
...
@@ -52,6 +54,11 @@
textarea
.
required
=
false
;
}
if
(
this
.
state
.
focus
===
true
)
{
textarea
.
autofocus
=
true
;
textarea
.
focus
();
}
if
(
this
.
state
.
editable
)
{
textarea
.
removeAttribute
(
'
readonly
'
);
}
else
{
...
...
@@ -78,7 +85,11 @@
}
})
.
declareService
(
function
focus
()
{
if
(
this
.
state
.
focus
===
true
)
{
this
.
element
.
querySelector
(
'
textarea
'
).
focus
();
}
})
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
var
result
=
{},
input
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
View file @
628eaa5f
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
990.28225.23941.23466
</string>
</value>
<value>
<string>
1012.50673.40518.63351
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1
614695136.3
5
</float>
<float>
1
701080787.9
5
</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