Commit 467dd844 authored by Prakhar Agarwal's avatar Prakhar Agarwal 🎯
Browse files

added message send via dialog

parent 6b1d99cd
......@@ -61,7 +61,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
<button type="button" id="send-message-btn" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
......
......@@ -1191,7 +1191,16 @@ function gui_quit_dialog() {
function menu_send(name) {
var message,
win = name ? patchwin[name] : pd_window;
message = win.window.prompt("Type a message to send to Pd", name);
if (name) {
$("#pd-option").prop("checked", true);
} else {
$("#canvas-option").prop("checked", true);
}
$("#message-modal").modal("show");
$("#send-message-btn").click(function() {
message = $("#message-text").val();
$("#message-modal").modal("hide");
});
if (message != undefined && message.length) {
post("Sending message to Pd: " + message + ";");
pdsend(message);
......
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