Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
c60bd188
Commit
c60bd188
authored
Dec 16, 2014
by
Marc Duez
Browse files
builder.js / list.js : improve edit functions for firefox (inspired by spaceship)
parent
2d02d1b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
browser/js/builder.js
View file @
c60bd188
...
...
@@ -313,13 +313,18 @@ Builder.prototype = {
input
.
style
.
width
=
"
100px
"
;
input
.
style
.
border
=
"
0px
"
;
input
.
style
.
margin
=
"
0px
"
;
input
.
onkeydown
=
function
()
{
if
(
event
.
keyCode
==
13
)
document
.
getElementById
(
'
btnSaveTag
'
)
input
.
onkeydown
=
function
(
e
)
{
e
=
e
||
window
.
event
;
var
key
=
e
.
keyCode
if
(
key
==
0
)
key
=
e
.
which
if
(
key
==
13
)
document
.
getElementById
(
'
btnSaveTag
'
)
.
click
();
}
$
(
input
).
focusout
(
function
()
{
self
.
build_tagSelector
()
self
.
build_displaySelector
()
setTimeout
(
function
(){
self
.
build_tagSelector
()
self
.
build_displaySelector
()
},
500
);
})
divParent
.
appendChild
(
input
);
divParent
.
onclick
=
""
;
...
...
@@ -328,7 +333,9 @@ Builder.prototype = {
a
.
className
=
"
button
"
;
a
.
appendChild
(
document
.
createTextNode
(
"
save
"
));
a
.
id
=
"
btnSaveTag
"
;
a
.
onclick
=
function
()
{
a
.
onclick
=
function
(
event
)
{
event
.
stopPropagation
()
event
.
preventDefault
()
var
newTagName
=
document
.
getElementById
(
"
new_tag_name
"
)
.
value
;
tagName
[
tagID
]
=
newTagName
...
...
@@ -355,12 +362,17 @@ Builder.prototype = {
input
.
style
.
width
=
"
200px
"
;
input
.
style
.
border
=
"
0px
"
;
input
.
style
.
margin
=
"
0px
"
;
input
.
onkeydown
=
function
()
{
if
(
event
.
keyCode
==
13
)
document
.
getElementById
(
'
btnSave
'
)
input
.
onkeydown
=
function
(
e
)
{
e
=
e
||
window
.
event
;
var
key
=
e
.
keyCode
if
(
key
==
0
)
key
=
e
.
which
if
(
key
==
13
)
document
.
getElementById
(
'
btnSave
'
)
.
click
();
}
$
(
input
).
focusout
(
function
()
{
m
.
update
()
setTimeout
(
function
(){
m
.
update
()
},
500
);
})
divParent
.
appendChild
(
input
);
divParent
.
onclick
=
""
;
...
...
browser/js/list.js
View file @
c60bd188
...
...
@@ -459,8 +459,11 @@ List.prototype = {
input
.
style
.
width
=
"
200px
"
;
//TODO remplacer par une class css
input
.
style
.
border
=
"
0px
"
;
input
.
style
.
margin
=
"
0px
"
;
input
.
onkeydown
=
function
()
{
if
(
event
.
keyCode
==
13
)
document
.
getElementById
(
'
btnSave
'
)
input
.
onkeydown
=
function
(
e
)
{
e
=
e
||
window
.
event
;
var
key
=
e
.
keyCode
if
(
key
==
0
)
key
=
e
.
which
if
(
key
==
13
)
document
.
getElementById
(
'
btnSave
'
)
.
click
();
}
$
(
input
).
focusout
(
function
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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