Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
0fb28363
Commit
0fb28363
authored
Jul 11, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return the modal from the convenient function
parent
dca07a60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modal-dialog-custom.js
src/app/ui/modal-dialog-custom.js
+6
-6
No files found.
src/app/ui/modal-dialog-custom.js
View file @
0fb28363
...
@@ -4,13 +4,13 @@ var css = require('./styles/modal-dialog-custom-styles')
...
@@ -4,13 +4,13 @@ var css = require('./styles/modal-dialog-custom-styles')
module
.
exports
=
{
module
.
exports
=
{
alert
:
function
(
text
)
{
alert
:
function
(
text
)
{
modal
(
''
,
yo
`<div>
${
text
}
</div>`
,
null
,
{
label
:
null
})
return
modal
(
''
,
yo
`<div>
${
text
}
</div>`
,
null
,
{
label
:
null
})
},
},
prompt
:
function
(
title
,
text
,
inputValue
,
ok
,
cancel
,
focus
)
{
prompt
:
function
(
title
,
text
,
inputValue
,
ok
,
cancel
,
focus
)
{
prompt
(
title
,
text
,
false
,
inputValue
,
ok
,
cancel
,
focus
)
return
prompt
(
title
,
text
,
false
,
inputValue
,
ok
,
cancel
,
focus
)
},
},
promptPassphrase
:
function
(
title
,
text
,
inputValue
,
ok
,
cancel
)
{
promptPassphrase
:
function
(
title
,
text
,
inputValue
,
ok
,
cancel
)
{
prompt
(
title
,
text
,
true
,
inputValue
,
ok
,
cancel
)
return
prompt
(
title
,
text
,
true
,
inputValue
,
ok
,
cancel
)
},
},
promptPassphraseCreation
:
function
(
ok
,
cancel
)
{
promptPassphraseCreation
:
function
(
ok
,
cancel
)
{
var
text
=
'Please provide a Passphrase for the account creation'
var
text
=
'Please provide a Passphrase for the account creation'
...
@@ -20,7 +20,7 @@ module.exports = {
...
@@ -20,7 +20,7 @@ module.exports = {
<br>
<br>
<input id="prompt2" type="password" name='prompt_text' class="
${
css
[
'prompt_text'
]}
" >
<input id="prompt2" type="password" name='prompt_text' class="
${
css
[
'prompt_text'
]}
" >
</div>`
</div>`
modal
(
null
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
return
modal
(
null
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
{
{
fn
:
()
=>
{
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
{
if
(
typeof
ok
===
'function'
)
{
...
@@ -42,7 +42,7 @@ module.exports = {
...
@@ -42,7 +42,7 @@ module.exports = {
promptMulti
:
function
({
title
,
text
,
inputValue
},
ok
,
cancel
)
{
promptMulti
:
function
({
title
,
text
,
inputValue
},
ok
,
cancel
)
{
if
(
!
inputValue
)
inputValue
=
''
if
(
!
inputValue
)
inputValue
=
''
var
input
=
yo
`<textarea id="prompt_text" class=
${
css
.
prompt_text
}
rows="4" cols="50"></textarea>`
var
input
=
yo
`<textarea id="prompt_text" class=
${
css
.
prompt_text
}
rows="4" cols="50"></textarea>`
modal
(
title
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
return
modal
(
title
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
{
{
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
(
document
.
getElementById
(
'prompt_text'
).
value
)
}
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
(
document
.
getElementById
(
'prompt_text'
).
value
)
}
},
},
...
@@ -52,7 +52,7 @@ module.exports = {
...
@@ -52,7 +52,7 @@ module.exports = {
)
)
},
},
confirm
:
function
(
title
,
text
,
ok
,
cancel
)
{
confirm
:
function
(
title
,
text
,
ok
,
cancel
)
{
modal
(
title
,
yo
`<div>
${
text
}
</div>`
,
return
modal
(
title
,
yo
`<div>
${
text
}
</div>`
,
{
{
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
()
}
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
()
}
},
},
...
...
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