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
Jonathan Wilkes
purr-data
Commits
daf82a3f
Commit
daf82a3f
authored
Jun 25, 2021
by
Prakhar Agarwal
🎯
Browse files
Added dialog for showing props, prefs, etc.
parent
e0605ed6
Changes
3
Hide whitespace changes
Inline
Side-by-side
emscripten/project/purr-data/index.html
View file @
daf82a3f
...
...
@@ -30,6 +30,22 @@
</div>
</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"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"dialog-title"
></h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
id=
"dialog-body"
>
</div>
</div>
</div>
</div>
<div
id=
"container-app"
class=
"container-fluid"
>
<!-- Menu -->
<nav
id=
"menu"
></nav>
...
...
emscripten/project/purr-data/index.js
View file @
daf82a3f
...
...
@@ -58,9 +58,11 @@ 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
)
$
(
"
#dialog-modal
"
).
modal
(
"
show
"
);
// initialize the dialog window
register_dialog
(
cid
,
attr_array
);
});
...
...
pd/nw/dialog_canvas.html
View file @
daf82a3f
...
...
@@ -15,7 +15,7 @@
<table
class=
"pairs"
>
<tr
class=
"prop no_scroll hidden"
data-i18n=
"[title]canvas.prop.no_scroll_tt"
>
<td
colspan=
"2"
>
<label
style=
"text-align: left;"
>
<label>
<input
type=
"checkbox"
name=
"no_scroll"
value=
"off"
>
<span
data-i18n=
"canvas.prop.no_scroll"
></span>
</label>
...
...
@@ -23,14 +23,14 @@
</tr>
<tr
class=
"prop no_menu hidden"
data-i18n=
"[title]canvas.prop.no_menu_tt"
>
<td
colspan=
"2"
>
<label
style=
"text-align: left;"
>
<label>
<input
type=
"checkbox"
name=
"no_menu"
value=
"off"
>
<span
data-i18n=
"canvas.prop.no_menu"
></span>
</label>
</td>
</tr>
<tr
class=
"display_flags prop hidden"
data-i18n=
"[title]canvas.prop.gop_tt"
>
<td
colspan=
"2"
style=
"text-align: left;"
>
<td
colspan=
"2"
>
<label>
<input
type=
"checkbox"
name=
"gop"
value=
"on"
>
<span
data-i18n=
"canvas.prop.gop"
></span>
...
...
@@ -44,38 +44,38 @@
<table>
<tr>
<td>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x_pix_tt"
style=
"text-align: left;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x_pix_tt"
>
<span
data-i18n=
"canvas.prop.x_pix"
></span>
</label>
</td>
<td
data-i18n=
"[title]canvas.prop.x_pix_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x_pix"
style=
"width: 30px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x_pix"
>
</td>
<td>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y_pix_tt"
style=
"text-align: left;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y_pix_tt"
>
<span
data-i18n=
"canvas.prop.y_pix"
></span>
</label>
</td>
<td
data-i18n=
"[title]canvas.prop.y_pix_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y_pix"
style=
"width: 30px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y_pix"
>
</td>
</tr>
<tr
class=
"x_margin prop hidden"
>
<td>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x_margin_tt"
style=
"text-align: left;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x_margin_tt"
>
<span
data-i18n=
"canvas.prop.x_margin"
></span>
</label>
</td>
<td
data-i18n=
"[title]canvas.prop.x_margin_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x_margin"
style=
"width: 30px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x_margin"
>
</td>
<td>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y_margin_tt"
style=
"text-align: left;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y_margin_tt"
>
<span
data-i18n=
"canvas.prop.y_margin"
></span>
</label>
</td>
<td
data-i18n=
"[title]canvas.prop.y_margin_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y_margin"
style=
"width: 30px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y_margin"
>
</td>
</tr>
</table>
...
...
@@ -85,7 +85,7 @@
<td>
</td>
<td>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.hide_name_tt"
style=
"text-align: left;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.hide_name_tt"
>
<input
class=
"gop_opt"
type=
"checkbox"
name=
"hide_name"
value=
"on"
>
<span
data-i18n=
"canvas.prop.hide_name"
></span>
</label>
...
...
@@ -97,25 +97,25 @@
<fieldset
class=
"canvas"
>
<legend
data-i18n=
"canvas.prop.heading.data_scaling"
></legend>
<div
style=
"display: inline-block; align: left;"
>
<div
class=
"x_scale prop hidden"
style=
"text-align: left;"
>
<div
class=
"x_scale prop hidden"
>
<nobr>
<label
class=
"no_gop_opt"
data-i18n=
"[title]canvas.prop.x_scale_tt"
style=
"text-align: left;"
>
<label
class=
"no_gop_opt"
data-i18n=
"[title]canvas.prop.x_scale_tt"
>
<span
data-i18n=
"canvas.prop.x_scale"
></span>
<input
class=
"no_gop_opt"
type=
"text"
name=
"x_scale"
style=
"width: 25px;"
>
<input
class=
"no_gop_opt"
type=
"text"
name=
"x_scale"
>
</label>
<label
class=
"no_gop_opt"
data-i18n=
"[title]canvas.prop.y_scale_tt"
style=
"text-align: left;"
>
<label
class=
"no_gop_opt"
data-i18n=
"[title]canvas.prop.y_scale_tt"
>
<span
data-i18n=
"canvas.prop.y_scale"
></span>
<input
class=
"no_gop_opt"
type=
"text"
name=
"y_scale"
style=
"width: 25px;"
>
<input
class=
"no_gop_opt"
type=
"text"
name=
"y_scale"
>
</label>
</nobr>
</nobr>
</div>
<div
class=
"gop-range"
>
<div
class=
"y1 prop hidden"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y1_tt"
style=
"text-align: center;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y1_tt"
>
<span
data-i18n=
"canvas.prop.y1"
></span>
<br>
<input
class=
"gop_opt"
type=
"text"
name=
"y1"
style=
"width: 45px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y1"
>
</label>
<br>
</div>
...
...
@@ -123,18 +123,18 @@
<div
class=
"x1 prop hidden"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x1_tt"
>
<span
data-i18n=
"canvas.prop.x1"
></span>
<input
class=
"gop_opt"
type=
"text"
name=
"x1"
style=
"width: 40px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x1"
>
</label>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.x2_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x2"
style=
"width: 40px;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"x2"
>
<span
data-i18n=
"canvas.prop.x2"
></span>
</label>
<br>
</div>
<div
class=
"y2"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y2_tt"
style=
"text-align: center;"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y2"
style=
"width: 45px;"
>
<label
class=
"gop_opt"
data-i18n=
"[title]canvas.prop.y2_tt"
>
<input
class=
"gop_opt"
type=
"text"
name=
"y2"
>
<br>
<span
data-i18n=
"canvas.prop.y2"
></span>
</label>
...
...
@@ -157,7 +157,7 @@
<span
data-i18n=
"canvas.prop.array_name"
></span>
<input
onchange=
"update_array_attr(this);"
class=
"array-name"
type=
"
checkbox
"
type=
"
text
"
name=
"array_name"
id=
"array_name_input"
>
</label>
...
...
@@ -166,7 +166,7 @@
<span
data-i18n=
"canvas.prop.array_size"
></span>
<input
onchange=
"update_array_attr(this);"
class=
"array-size"
type=
"
checkbox
"
type=
"
text
"
name=
"array_size"
>
</label>
<br/>
...
...
@@ -474,7 +474,7 @@ function update_gop_form(opts, state) {
for
(
i
=
0
;
i
<
opts
.
length
;
i
++
)
{
elem
=
opts
[
i
];
if
(
elem
.
type
===
"
checkbox
"
||
elem
.
type
===
"
checkbox
"
)
{
elem
.
type
===
"
text
"
)
{
elem
.
disabled
=
state
?
false
:
true
;
}
if
(
state
)
{
...
...
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