Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Prakhar Agarwal
purr-data
Commits
aaf8b923
Commit
aaf8b923
authored
Jul 26, 2021
by
Jonathan Wilkes
Browse files
Merge branch 'prakhar/purr-data-imp_prop_layout' into emscripten
parents
2237366d
e06c02e2
Changes
6
Hide whitespace changes
Inline
Side-by-side
emscripten/project/purr-data/index.html
View file @
aaf8b923
...
...
@@ -31,6 +31,20 @@
</div>
<!-- Modal -->
<div
class=
"modal fade"
id=
"dialog-modal"
tabindex=
"-1"
role=
"dialog"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered"
role=
"document"
style=
"width: fit-content;"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"dialog-title"
></h5>
<button
type=
"button"
class=
"close"
onClick=
"cancel()"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
id=
"dialog-body"
>
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"message-modal"
tabindex=
"-1"
role=
"dialog"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered"
role=
"document"
>
<div
class=
"modal-content"
>
...
...
emscripten/project/purr-data/index.js
View file @
aaf8b923
...
...
@@ -58,9 +58,17 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) {
// cleaning dialog div
dialog_div
.
innerHTML
=
""
;
$
(
"
#
sidebar-body-
dialog
"
).
prepend
(
dialog_div
.
outerHTML
)
$
(
"
#dialog
-body
"
).
prepend
(
dialog_div
.
outerHTML
)
$
(
"
#dialog-div
"
).
prepend
(
data
)
var
props_map
=
{
"
dialog_canvas.html
"
:
"
Canvas
"
,
"
dialog_iemgui.html
"
:
"
Iemgui
"
,
"
dialog_gatom.html
"
:
"
Atom
"
,
"
dialog_font.html
"
:
"
Font
"
};
$
(
"
#dialog-title
"
).
text
(
props_map
[
f
]
+
"
Properties
"
);
$
(
"
#dialog-modal
"
).
modal
(
"
show
"
);
// initialize the dialog window
register_dialog
(
cid
,
attr_array
);
});
...
...
pd/nw/dialog_canvas.html
View file @
aaf8b923
...
...
@@ -613,7 +613,7 @@ function cancel() {
var
i
,
attrs
,
gfxstub
;
//window.close(true);
if
(
pdgui
.
is_webapp
()){
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
modal
(
"
hide
"
);
}
pdgui
.
pdsend
(
pd_object_callback
,
"
cancel
"
);
...
...
@@ -803,6 +803,12 @@ function add_events(name) {
});
}
pdgui
.
dialog_bindings
(
name
);
if
(
pdgui
.
is_webapp
)
{
$
(
"
#dialog-modal
"
).
on
(
"
hidden.bs.modal
"
,
function
(
e
)
{
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
off
(
"
hidden.bs.modal
"
)
})
}
}
</script>
...
...
pd/nw/dialog_font.html
View file @
aaf8b923
...
...
@@ -118,7 +118,7 @@ function apply() {
function
cancel
()
{
//window.close(true);
if
(
pdgui
.
is_webapp
()){
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
modal
(
"
hide
"
);
}
pdgui
.
pdsend
(
pd_object_callback
,
"
cancel
"
);
...
...
@@ -191,6 +191,12 @@ function add_events(name) {
});
}
pdgui
.
dialog_bindings
(
name
);
if
(
pdgui
.
is_webapp
)
{
$
(
"
#dialog-modal
"
).
on
(
"
hidden.bs.modal
"
,
function
(
e
)
{
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
off
(
"
hidden.bs.modal
"
)
})
}
}
</script>
</body>
...
...
pd/nw/dialog_gatom.html
View file @
aaf8b923
...
...
@@ -259,7 +259,7 @@ function cancel(revert_changes) {
var
dirty
=
false
,
attr
;
//window.close(true);
if
(
pdgui
.
is_webapp
()){
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
modal
(
"
hide
"
);
}
if
(
revert_changes
)
{
...
...
@@ -394,6 +394,12 @@ function add_events(name) {
});
}
pdgui
.
dialog_bindings
(
name
);
if
(
pdgui
.
is_webapp
)
{
$
(
"
#dialog-modal
"
).
on
(
"
hidden.bs.modal
"
,
function
(
e
)
{
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
off
(
"
hidden.bs.modal
"
)
})
}
}
</script>
...
...
pd/nw/dialog_iemgui.html
View file @
aaf8b923
...
...
@@ -531,7 +531,7 @@ function cancel(revert_changes) {
var
dirty
=
false
,
attr
;
//window.close(true);
if
(
pdgui
.
is_webapp
()){
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
modal
(
"
hide
"
);
}
if
(
revert_changes
)
{
for
(
attr
in
old_attrs
)
{
...
...
@@ -673,6 +673,12 @@ function add_events(name) {
});
}
pdgui
.
dialog_bindings
(
name
);
if
(
pdgui
.
is_webapp
)
{
$
(
"
#dialog-modal
"
).
on
(
"
hidden.bs.modal
"
,
function
(
e
)
{
remove_dialog
(
pd_object_callback
)
$
(
"
#dialog-modal
"
).
off
(
"
hidden.bs.modal
"
)
})
}
}
</script>
...
...
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