Skip to content

Commit

Permalink
🐛 Modal did not open #38
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyBlaze committed Apr 23, 2016
1 parent 4bd6773 commit 29d04b6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion octoprint_touchui/static/css/touchui.css

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions octoprint_touchui/static/js/touchui.bundled.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ TouchUI.prototype.components.touchscreen = {
if (this.settings.isEpiphanyOrKweb) {
this.settings.hasFullscreen(false);
}

$('.modal.fade').removeClass('fade');

// Improve performace
this.scroll.defaults.iScroll.scrollbars = false;
Expand Down Expand Up @@ -2016,14 +2018,13 @@ TouchUI.prototype.DOM.overwrite.modal = function() {

//We need a reliable event for catching new modals for attaching a scrolling bar
$.fn.modalBup = $.fn.modal;
$.fn.modal = function(option, args) {
$.fn.modal = function(options, args) {
// Update any other modifications made by others (i.e. OctoPrint itself)
$.fn.modalBup.defaults = $.fn.modal.defaults;

// Create modal, store into variable so we can trigger an event first before return
var tmp = $(this).modalBup(option, args);
var tmp = $(this).modalBup(options, args);
$(this).trigger("modal.touchui", this);

return tmp;
};
$.fn.modal.prototype = { constructor: $.fn.modal };
Expand Down
6 changes: 3 additions & 3 deletions octoprint_touchui/static/js/touchui.libraries.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions octoprint_touchui/static/less/touchui.bundled.less
Original file line number Diff line number Diff line change
Expand Up @@ -4276,6 +4276,7 @@ width: 95% !important;
margin: 0 !important;
min-height: 100%;
margin-left: -110% !important;
display: block;
.box-sizing(border-box);
.slimScrollDiv, #settings_plugin_pluginmanager_repositorydialog_list {
height: auto !important;
Expand Down
2 changes: 2 additions & 0 deletions source/js/components/touchscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ TouchUI.prototype.components.touchscreen = {
if (this.settings.isEpiphanyOrKweb) {
this.settings.hasFullscreen(false);
}

$('.modal.fade').removeClass('fade');

// Improve performace
this.scroll.defaults.iScroll.scrollbars = false;
Expand Down
5 changes: 2 additions & 3 deletions source/js/dom/overwrite/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ TouchUI.prototype.DOM.overwrite.modal = function() {

//We need a reliable event for catching new modals for attaching a scrolling bar
$.fn.modalBup = $.fn.modal;
$.fn.modal = function(option, args) {
$.fn.modal = function(options, args) {
// Update any other modifications made by others (i.e. OctoPrint itself)
$.fn.modalBup.defaults = $.fn.modal.defaults;

// Create modal, store into variable so we can trigger an event first before return
var tmp = $(this).modalBup(option, args);
var tmp = $(this).modalBup(options, args);
$(this).trigger("modal.touchui", this);

return tmp;
};
$.fn.modal.prototype = { constructor: $.fn.modal };
Expand Down
1 change: 1 addition & 0 deletions source/less/components/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
margin: 0 !important;
min-height: 100%;
margin-left: -110% !important;
display: block;

.box-sizing(border-box);

Expand Down

0 comments on commit 29d04b6

Please sign in to comment.