Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diversity-tree-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Genesys PGR
diversity-tree-editor
Commits
e5d3f381
Commit
e5d3f381
authored
Feb 22, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent browser form-submit on Enter key
parent
71dc226a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
index.html
index.html
+3
-3
src/index.js
src/index.js
+8
-3
No files found.
index.html
View file @
e5d3f381
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"large-4 columns"
>
<a
href=
"#"
data-close
class=
"button info closeModal"
>
Cancel
</a>
<
a
href=
"#"
class=
"button success"
>
Rename
</a
>
<
button
type=
"submit"
class=
"button success"
>
Rename
</button
>
</div>
</div>
</form>
...
...
@@ -87,7 +87,7 @@
</div>
<div
class=
"large-4 columns"
>
<a
href=
"#"
data-close
class=
"button info closeModal"
>
Cancel
</a>
<
a
href=
"#"
class=
"button success"
>
Create
</a
>
<
button
type=
"submit"
class=
"button success"
>
Create
</button
>
</div>
</div>
</form>
...
...
@@ -124,7 +124,7 @@
</div>
<div
class=
"large-4 columns"
>
<a
href=
"#"
data-close
class=
"button info closeModal"
>
Cancel
</a>
<
a
href=
"#"
class=
"button success"
>
Load tree
</a
>
<
button
type=
"submit"
class=
"button success"
>
Load tree
</button
>
</div>
</div>
</form>
...
...
src/index.js
View file @
e5d3f381
...
...
@@ -44,17 +44,22 @@ $('document').ready(function() {
element
.
focus
();
});
$
(
'
#RenameNodeForm .success
'
).
click
((
e
)
=>
{
$
(
'
form#RenameNodeForm
'
).
submit
((
e
)
=>
{
// console.log('Submit renamenode form');
e
.
preventDefault
();
rename_node
();
return
false
;
});
$
(
'
#CreateNodeForm .success
'
).
click
((
e
)
=>
{
$
(
'
form#CreateNodeForm
'
).
submit
((
e
)
=>
{
// console.log('Submit createnode form');
e
.
preventDefault
();
create_node
();
return
false
;
});
$
(
'
#ImportTreeModal .success
'
).
click
((
e
)
=>
{
$
(
'
#ImportTreeModal form
'
).
submit
((
e
)
=>
{
// console.log('Submit importtree form');
e
.
preventDefault
();
$
(
'
#ImportTreeModal .errorMessage
'
)[
0
].
innerHTML
=
''
;
...
...
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