Skip to content

Commit

Permalink
Patch Materialize to not leave behind dark overlays on modal close.
Browse files Browse the repository at this point in the history
The path will not create additional overlays when an open modal is reopened, and instead bring it to top.

The additional code has been added too the minified version of materialize.js and a noted added to the README.md

Fixes #33.
  • Loading branch information
carlosperate committed Feb 21, 2016
1 parent 8e31049 commit e2f462f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
19 changes: 6 additions & 13 deletions ardublockly/ardublockly_design.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,14 @@ Ardublockly.openNotConnectedModal = function() {
});
};

/** Tracks if the settings modal is currently opened. */
Ardublockly.settingsOpen = false;

/** Opens the modal that displays the Settings. */
Ardublockly.openSettingsModal = function() {
if (!Ardublockly.settingsOpen) {
Ardublockly.settingsOpen = true;
$('#settings_dialog').openModal({
dismissible: true,
opacity: .5,
in_duration: 200,
out_duration: 250,
complete: function() { Ardublockly.settingsOpen = false; }
});
}
$('#settings_dialog').openModal({
dismissible: true,
opacity: .5,
in_duration: 200,
out_duration: 250
});
};

/**
Expand Down
2 changes: 2 additions & 0 deletions ardublockly/materialize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ This folder contains the CSS and Javascript for the Materialize CSS framework.
https://github.com/Dogfalo/materialize

Current version used: >0.97.5 [@09cd7116129c3f3b9879c24f7ff688e8c7da18f2 commit](https://github.com/Dogfalo/materialize/commit/09cd7116129c3f3b9879c24f7ff688e8c7da18f2)

There has been a patch added to the minified javascript file. The issue is described in https://github.com/Dogfalo/materialize/issues/1647 and fixed by un-merged PR https://github.com/Dogfalo/materialize/pull/1691 .
Loading

0 comments on commit e2f462f

Please sign in to comment.