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

Merge branch 'emscripten' into imp_pref_layout

parents e297e8e0 b27ad529
...@@ -325,6 +325,26 @@ li .hr{ ...@@ -325,6 +325,26 @@ li .hr{
overflow: auto; overflow: auto;
} }
::-webkit-scrollbar {
width: 14px;
height: 18px;
}
::-webkit-scrollbar-thumb {
height: 6px;
border: 4px solid rgba(0, 0, 0, 0);
background-clip: padding-box;
-webkit-border-radius: 7px;
background-color: rgba(0, 0, 0, 0.15);
-webkit-box-shadow: inset -1px -1px 0px rgba(0, 0, 0, 0.05), inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-button {
width: 0;
height: 0;
display: none;
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
*[unselectable="on"] { *[unselectable="on"] {
-moz-user-select: -moz-none; -moz-user-select: -moz-none;
-khtml-user-select: none; -khtml-user-select: none;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</head> </head>
<body id="container"> <body id="container">
<!-- Modal --> <!-- Loading Modal -->
<div class="modal fade" id="loading-modal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="loading-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content"> <div class="modal-content">
...@@ -30,10 +30,9 @@ ...@@ -30,10 +30,9 @@
</div> </div>
</div> </div>
<!-- Modal --> <!-- Dialog Modal -->
<<<<<<< HEAD
<div class="modal fade" id="dialog-modal" tabindex="-1" role="dialog" aria-hidden="true"> <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-dialog modal-dialog-centered" role="document" style="width: fit-content;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="dialog-title"></h5> <h5 class="modal-title" id="dialog-title"></h5>
...@@ -45,8 +44,9 @@ ...@@ -45,8 +44,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
=======
<!-- Message Modal -->
<div class="modal fade" id="message-modal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="message-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content"> <div class="modal-content">
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
</div> </div>
</div> </div>
</div> </div>
>>>>>>> emscripten
<div id="container-app" class="container-fluid"> <div id="container-app" class="container-fluid">
<!-- Menu --> <!-- Menu -->
......
...@@ -61,9 +61,14 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) { ...@@ -61,9 +61,14 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) {
$("#dialog-body").prepend(dialog_div.outerHTML) $("#dialog-body").prepend(dialog_div.outerHTML)
$("#dialog-div").prepend(data) $("#dialog-div").prepend(data)
var props_map = { var props_map = {
"dialog_prefs.html": "Pd-L20rk" "dialog_prefs.html": "Pd-L20rk",
"dialog_canvas.html": "Canvas",
"dialog_iemgui.html": "Iemgui",
"dialog_gatom.html": "Atom",
"dialog_font.html": "Font"
}; };
$("#dialog-title").text(props_map[f] + " Properties"); $("#dialog-title").text(props_map[f] + " Properties");
$("#dialog-modal").modal("show"); $("#dialog-modal").modal("show");
// initialize the dialog window // initialize the dialog window
register_dialog(cid,attr_array); register_dialog(cid,attr_array);
......
...@@ -613,7 +613,7 @@ function cancel() { ...@@ -613,7 +613,7 @@ function cancel() {
var i, attrs, gfxstub; var i, attrs, gfxstub;
//window.close(true); //window.close(true);
if(pdgui.is_webapp()){ if(pdgui.is_webapp()){
remove_dialog(pd_object_callback) $("#dialog-modal").modal("hide");
} }
pdgui.pdsend(pd_object_callback, "cancel"); pdgui.pdsend(pd_object_callback, "cancel");
...@@ -803,6 +803,12 @@ function add_events(name) { ...@@ -803,6 +803,12 @@ function add_events(name) {
}); });
} }
pdgui.dialog_bindings(name); pdgui.dialog_bindings(name);
if (pdgui.is_webapp) {
$("#dialog-modal").on("hidden.bs.modal", function (e) {
remove_dialog(pd_object_callback)
$("#dialog-modal").off("hidden.bs.modal")
})
}
} }
</script> </script>
......
...@@ -118,7 +118,7 @@ function apply() { ...@@ -118,7 +118,7 @@ function apply() {
function cancel() { function cancel() {
//window.close(true); //window.close(true);
if(pdgui.is_webapp()){ if(pdgui.is_webapp()){
remove_dialog(pd_object_callback) $("#dialog-modal").modal("hide");
} }
pdgui.pdsend(pd_object_callback, "cancel"); pdgui.pdsend(pd_object_callback, "cancel");
...@@ -191,6 +191,12 @@ function add_events(name) { ...@@ -191,6 +191,12 @@ function add_events(name) {
}); });
} }
pdgui.dialog_bindings(name); pdgui.dialog_bindings(name);
if (pdgui.is_webapp) {
$("#dialog-modal").on("hidden.bs.modal", function (e) {
remove_dialog(pd_object_callback)
$("#dialog-modal").off("hidden.bs.modal")
})
}
} }
</script> </script>
</body> </body>
......
...@@ -259,7 +259,7 @@ function cancel(revert_changes) { ...@@ -259,7 +259,7 @@ function cancel(revert_changes) {
var dirty = false, attr; var dirty = false, attr;
//window.close(true); //window.close(true);
if(pdgui.is_webapp()){ if(pdgui.is_webapp()){
remove_dialog(pd_object_callback) $("#dialog-modal").modal("hide");
} }
if (revert_changes) { if (revert_changes) {
...@@ -394,6 +394,12 @@ function add_events(name) { ...@@ -394,6 +394,12 @@ function add_events(name) {
}); });
} }
pdgui.dialog_bindings(name); pdgui.dialog_bindings(name);
if (pdgui.is_webapp) {
$("#dialog-modal").on("hidden.bs.modal", function (e) {
remove_dialog(pd_object_callback)
$("#dialog-modal").off("hidden.bs.modal")
})
}
} }
</script> </script>
......
...@@ -531,7 +531,7 @@ function cancel(revert_changes) { ...@@ -531,7 +531,7 @@ function cancel(revert_changes) {
var dirty = false, attr; var dirty = false, attr;
//window.close(true); //window.close(true);
if(pdgui.is_webapp()){ if(pdgui.is_webapp()){
remove_dialog(pd_object_callback) $("#dialog-modal").modal("hide");
} }
if (revert_changes) { if (revert_changes) {
for (attr in old_attrs) { for (attr in old_attrs) {
...@@ -673,6 +673,12 @@ function add_events(name) { ...@@ -673,6 +673,12 @@ function add_events(name) {
}); });
} }
pdgui.dialog_bindings(name); pdgui.dialog_bindings(name);
if (pdgui.is_webapp) {
$("#dialog-modal").on("hidden.bs.modal", function (e) {
remove_dialog(pd_object_callback)
$("#dialog-modal").off("hidden.bs.modal")
})
}
} }
</script> </script>
......
...@@ -495,7 +495,7 @@ var canvas_events = (function() { ...@@ -495,7 +495,7 @@ var canvas_events = (function() {
}, },
text_keydown: function(evt) { text_keydown: function(evt) {
if (pdgui.is_webapp()) { // temporary fix if (pdgui.is_webapp()) { // temporary fix
if (pdgui.cmd_or_ctrl_key(evt) && evt.altKey) { if (pdgui.cmd_or_ctrl_key(evt)) {
return false; return false;
} }
} }
......
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