Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
99d76729
Commit
99d76729
authored
Nov 14, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Textarea: use a fixed size on focus
parent
94937af2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
20 deletions
+19
-20
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
+7
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.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
+0
-15
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
+2
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
...teItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
+8
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
View file @
99d76729
...
@@ -323,7 +323,14 @@ select:-moz-focusring {
...
@@ -323,7 +323,14 @@ select:-moz-focusring {
text-shadow
:
0
0
0
#000
;
text-shadow
:
0
0
0
#000
;
}
}
textarea
{
textarea
{
word-wrap
:
break-word
;
white-space
:
normal
;
vertical-align
:
top
;
vertical-align
:
top
;
transition
:
height
0.2s
ease-out
;
height
:
4em
;
}
textarea
:focus
{
height
:
20em
;
}
}
::-webkit-input-placeholder
{
::-webkit-input-placeholder
{
color
:
#575757
;
color
:
#575757
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
View file @
99d76729
...
@@ -259,7 +259,7 @@ vdf</string> </value>
...
@@ -259,7 +259,7 @@ vdf</string> </value>
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.1
2311.36129.4908
3
</string>
</value>
<value>
<string>
955.1
7985.54265.2389
3
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -277,7 +277,7 @@ vdf</string> </value>
...
@@ -277,7 +277,7 @@ vdf</string> </value>
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
8793295.77
</float>
<float>
147
9134904.68
</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 @
99d76729
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
rJS
(
window
)
rJS
(
window
)
.
setState
({
.
setState
({
editable
:
false
,
editable
:
false
,
focused
:
false
,
value
:
''
value
:
''
})
})
...
@@ -37,7 +36,6 @@
...
@@ -37,7 +36,6 @@
textarea
.
value
=
this
.
state
.
value
;
textarea
.
value
=
this
.
state
.
value
;
textarea
.
setAttribute
(
'
name
'
,
this
.
state
.
name
);
textarea
.
setAttribute
(
'
name
'
,
this
.
state
.
name
);
textarea
.
setAttribute
(
'
title
'
,
this
.
state
.
title
);
textarea
.
setAttribute
(
'
title
'
,
this
.
state
.
title
);
textarea
.
setAttribute
(
'
wrap
'
,
'
off
'
);
if
(
this
.
state
.
required
)
{
if
(
this
.
state
.
required
)
{
textarea
.
setAttribute
(
'
required
'
,
'
required
'
);
textarea
.
setAttribute
(
'
required
'
,
'
required
'
);
...
@@ -50,12 +48,6 @@
...
@@ -50,12 +48,6 @@
}
else
{
}
else
{
textarea
.
setAttribute
(
'
readonly
'
,
'
readonly
'
);
textarea
.
setAttribute
(
'
readonly
'
,
'
readonly
'
);
}
}
if
(
this
.
state
.
focused
)
{
textarea
.
setAttribute
(
'
rows
'
,
Math
.
max
(
this
.
state
.
value
.
split
(
'
\n
'
).
length
,
2
));
}
else
{
textarea
.
setAttribute
(
'
rows
'
,
2
);
}
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
...
@@ -90,13 +82,6 @@
...
@@ -90,13 +82,6 @@
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
},
true
,
true
)
},
true
,
true
)
.
onEvent
(
'
focus
'
,
function
()
{
return
this
.
changeState
({
focused
:
true
,
value
:
this
.
element
.
querySelector
(
'
textarea
'
).
value
});
},
true
,
false
)
.
onEvent
(
'
blur
'
,
function
()
{
return
this
.
changeState
({
focused
:
false
,
value
:
this
.
element
.
querySelector
(
'
textarea
'
).
value
});
},
true
,
false
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
onEvent
(
'
keydown
'
,
function
(
evt
)
{
.
onEvent
(
'
keydown
'
,
function
(
evt
)
{
if
(
evt
.
keyCode
===
83
&&
(
navigator
.
platform
.
match
(
"
Mac
"
)
?
evt
.
metaKey
:
evt
.
ctrlKey
))
{
if
(
evt
.
keyCode
===
83
&&
(
navigator
.
platform
.
match
(
"
Mac
"
)
?
evt
.
metaKey
:
evt
.
ctrlKey
))
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
View file @
99d76729
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.45675.44850.53452
</string>
</value>
<value>
<string>
95
5.18001.28212.40413
</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>
147
8794055
.21
</float>
<float>
147
9134598
.21
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
View file @
99d76729
...
@@ -405,10 +405,17 @@ select {
...
@@ -405,10 +405,17 @@ select {
}
}
textarea {
textarea {
word-wrap: break-word;
white-space: normal;
// Fix inconsistent Textarea bottom margin in Firefox and Chrome
// Fix inconsistent Textarea bottom margin in Firefox and Chrome
// http://stackoverflow.com/a/26904480
// http://stackoverflow.com/a/26904480
vertical-align: top;
vertical-align: top;
// BUG: how to transition on textarea row property
transition: height @transition-timing;
height: 4em;
&:focus {
height: 20em;
}
}
}
::-webkit-input-placeholder {
::-webkit-input-placeholder {
...
...
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