Commit 43b10ce7 authored by Prakhar Agarwal's avatar Prakhar Agarwal 🎯
Browse files

removed target options msg diag

parent 0901d119
Pipeline #3650 failed with stage
in 0 seconds
......@@ -42,17 +42,6 @@
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="target-name" class="col-form-label mr-3">Target:</label>
<div class="form-check form-check-inline mr-3">
<input class="form-check-input" type="radio" name="target-options" id="pd-option" value="pd-opt-value">
<label class="form-check-label" for="pd-option">Pd</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="target-options" id="canvas-option" value="canvas-opt-value">
<label class="form-check-label" for="canvas-option">Canvas</label>
</div>
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">Message:</label>
<textarea class="form-control" id="message-text"></textarea>
......
......@@ -1189,23 +1189,27 @@ function gui_quit_dialog() {
// send a message to Pd
function menu_send(name) {
var message,
win = name ? patchwin[name] : pd_window;
if (name) {
$("#pd-option").prop("checked", true);
} else {
$("#canvas-option").prop("checked", true);
}
$("#message-modal").modal("show");
$("#send-message-btn").on("click", function() {
message = $("#message-text").val();
$("#message-text").val("");
$("#message-modal").modal("hide");
if (is_webapp) {
$("#message-modal").modal("show");
$("#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 {
var message,
win = name ? patchwin[name] : pd_window;
message = win.window.prompt("Type a message to send to Pd", name);
if (message != undefined && message.length) {
post("Sending message to Pd: " + message + ";");
pdsend(message);
}
}
}
// requires nw.js API (Menuitem)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment