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
594ab7d1
Commit
594ab7d1
authored
Jul 07, 2021
by
Prakhar Agarwal
🎯
Browse files
Fixed spaces and target bug
parent
43b10ce7
Pipeline
#3667
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
emscripten/project/purr-data/index.html
View file @
594ab7d1
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
id=
"send-message-btn"
class=
"btn btn-primary"
>
Send message
</button>
<button
type=
"button"
id=
"send-message-btn"
class=
"btn btn-primary"
onclick=
"pdbundle.pdgui.web_menu_send()"
>
Send message
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
pd/nw/pdgui.js
View file @
594ab7d1
...
@@ -1192,15 +1192,6 @@ function menu_send(name) {
...
@@ -1192,15 +1192,6 @@ function menu_send(name) {
if
(
is_webapp
)
{
if
(
is_webapp
)
{
$
(
"
#message-modal
"
).
modal
(
"
show
"
);
$
(
"
#message-modal
"
).
modal
(
"
show
"
);
$
(
"
#message-text
"
).
val
(
name
);
$
(
"
#message-text
"
).
val
(
name
);
$
(
"
#send-message-btn
"
).
click
(
function
()
{
var
message
=
$
(
"
#message-text
"
).
val
();
if
(
message
!=
undefined
&&
message
.
length
)
{
post
(
"
Sending message to Pd:
"
+
message
+
"
;
"
);
pdsend
(
message
);
}
$
(
"
#message-text
"
).
val
(
""
);
$
(
"
#message-modal
"
).
modal
(
"
hide
"
);
});
}
else
{
}
else
{
var
message
,
var
message
,
win
=
name
?
patchwin
[
name
]
:
pd_window
;
win
=
name
?
patchwin
[
name
]
:
pd_window
;
...
@@ -1212,6 +1203,19 @@ function menu_send(name) {
...
@@ -1212,6 +1203,19 @@ function menu_send(name) {
}
}
}
}
function
web_menu_send
()
{
var
message
=
$
(
"
#message-text
"
).
val
();
console
.
log
(
"
Message
"
,
typeof
(
message
));
if
(
message
!=
undefined
&&
message
.
length
)
{
post
(
"
Sending message to Pd:
"
+
message
+
"
;
"
);
pdsend
(
message
);
}
$
(
"
#message-text
"
).
val
(
""
);
$
(
"
#message-modal
"
).
modal
(
"
hide
"
);
}
exports
.
web_menu_send
=
web_menu_send
;
// requires nw.js API (Menuitem)
// requires nw.js API (Menuitem)
function
canvas_set_editmode
(
cid
,
state
)
{
function
canvas_set_editmode
(
cid
,
state
)
{
var
patchsvg_id
=
is_webapp
()
?
"
patchsvg_
"
+
cid
:
"
patchsvg
"
var
patchsvg_id
=
is_webapp
()
?
"
patchsvg_
"
+
cid
:
"
patchsvg
"
...
...
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