Commit d27e3c39 authored by Prakhar Agarwal's avatar Prakhar Agarwal 🎯
Browse files

Added dialog for preferences

parent b447f9a2
...@@ -30,6 +30,22 @@ ...@@ -30,6 +30,22 @@
</div> </div>
</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">&times;</span>
</button>
</div>
<div class="modal-body" id="dialog-body">
</div>
</div>
</div>
</div>
<div id="container-app" class="container-fluid"> <div id="container-app" class="container-fluid">
<!-- Menu --> <!-- Menu -->
<nav id="menu"></nav> <nav id="menu"></nav>
......
...@@ -58,9 +58,14 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) { ...@@ -58,9 +58,14 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) {
// cleaning dialog div // cleaning dialog div
dialog_div.innerHTML = ""; dialog_div.innerHTML = "";
$("#sidebar-body-dialog").prepend(dialog_div.outerHTML) $("#dialog-body").prepend(dialog_div.outerHTML)
$("#dialog-div").prepend(data) $("#dialog-div").prepend(data)
if (f === "dialog_canvas.html") {
$("#dialog-title").text("Canvas Properties");
} else if (f === "dialog_prefs.html") {
$("#dialog-title").text("Pd-L2Ork Properties");
}
$("#dialog-modal").modal("show");
// initialize the dialog window // initialize the dialog window
register_dialog(cid,attr_array); register_dialog(cid,attr_array);
}); });
......
This diff is collapsed.
...@@ -774,6 +774,7 @@ function cancel() { ...@@ -774,6 +774,7 @@ function cancel() {
pdgui.remove_dialogwin(pd_object_callback); pdgui.remove_dialogwin(pd_object_callback);
if(pdgui.is_webapp()){ if(pdgui.is_webapp()){
remove_dialog(pd_object_callback) remove_dialog(pd_object_callback)
$("#dialog-modal").modal("hide");
}else{ }else{
window.close(true); window.close(true);
} }
......
Supports Markdown
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