Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
5d523a3e
Commit
5d523a3e
authored
Apr 25, 2016
by
Carsten Rose
Browse files
Merge remote-tracking branch 'origin/raos_work' into crose_work
parents
4fcf2fd4
99b5c69d
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/Element/NameSpaceFunctions.js
View file @
5d523a3e
...
...
@@ -21,7 +21,7 @@ QfqNS.Element = QfqNS.Element || {};
}
if
(
!
$element
[
0
].
hasAttribute
(
'
type
'
))
{
return
new
n
.
Text
(
$element
);
return
new
n
.
Text
ual
(
$element
);
}
var
type
=
$element
[
0
].
getAttribute
(
'
type
'
).
toLowerCase
();
...
...
@@ -41,7 +41,7 @@ QfqNS.Element = QfqNS.Element || {};
case
"
month
"
:
case
"
time
"
:
case
"
week
"
:
return
new
n
.
Text
(
$element
);
return
new
n
.
Text
ual
(
$element
);
default
:
throw
new
Error
(
"
Don't know how to handle <input> of type '
"
+
type
+
"
'
"
);
}
...
...
javascript/src/Element/Text.js
→
javascript/src/Element/Text
ual
.js
View file @
5d523a3e
...
...
@@ -14,25 +14,52 @@ QfqNS.Element = QfqNS.Element || {};
* @param $element
* @constructor
*/
function
Text
(
$element
)
{
function
Text
ual
(
$element
)
{
n
.
FormGroup
.
call
(
this
,
$element
);
if
(
!
this
.
isType
(
"
text
"
))
{
var
textualTypes
=
[
'
text
'
,
'
datetime
'
,
'
datetime-local
'
,
'
date
'
,
'
month
'
,
'
time
'
,
'
week
'
,
'
number
'
,
'
range
'
,
'
email
'
,
'
url
'
,
'
search
'
,
'
tel
'
,
'
password
'
,
'
hidden
'
];
var
textualTypesLength
=
textualTypes
.
length
;
var
isTextual
=
false
;
for
(
var
i
=
0
;
i
<
textualTypesLength
;
i
++
)
{
if
(
this
.
isType
(
textualTypes
[
i
]))
{
isTextual
=
true
;
break
;
}
}
if
(
!
isTextual
)
{
throw
new
Error
(
"
$element is not of type 'text'
"
);
}
}
Text
.
prototype
=
Object
.
create
(
n
.
FormGroup
.
prototype
);
Text
.
prototype
.
constructor
=
Text
;
Text
ual
.
prototype
=
Object
.
create
(
n
.
FormGroup
.
prototype
);
Text
ual
.
prototype
.
constructor
=
Text
ual
;
Text
.
prototype
.
setValue
=
function
(
val
)
{
Text
ual
.
prototype
.
setValue
=
function
(
val
)
{
this
.
$element
.
val
(
val
);
};
Text
.
prototype
.
getValue
=
function
()
{
Text
ual
.
prototype
.
getValue
=
function
()
{
return
this
.
$element
.
val
();
};
n
.
Text
=
Text
;
n
.
Text
ual
=
Text
ual
;
})(
QfqNS
.
Element
);
\ No newline at end of file
Write
Preview
Supports
Markdown
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