Change "hashchange.exit_settings" to "hashchange.exit_modal".

Change the name of the hashignore and replace mechanism from
exit_settings to exit_modals since it is now used for more than just
the settings.
This commit is contained in:
Brock Whittaker
2017-03-13 11:42:10 -07:00
committed by Tim Abbott
parent 075b7cd630
commit 2e30cef8e9
4 changed files with 5 additions and 5 deletions

View File

@@ -639,7 +639,7 @@ $(function () {
$("#settings_overlay_container").on("click", function (e) {
var $target = $(e.target);
if ($target.is(".exit-sign, .exit")) {
hashchange.exit_settings();
hashchange.exit_modal();
}
});

View File

@@ -210,7 +210,7 @@ exports.launch = function () {
};
exports.close = function () {
hashchange.exit_settings();
hashchange.exit_modal();
$("#draft_overlay").removeClass("show");
};

View File

@@ -204,7 +204,7 @@ function do_hashchange(from_reload) {
// return `true` for the current state -- we want to ignore hash changes from
// within the settings page. The previous hash however should return `false` as it
// was outside of the scope of settings.
// there is then an `exit_settings` function that allows the hash to change exactly
// there is then an `exit_modal` function that allows the hash to change exactly
// once without triggering any events. This allows the hash to reset back from
// a settings page to the previous view available before the settings page
// (eg. narrow/is/private). This saves the state, scroll position, and makes the
@@ -326,7 +326,7 @@ exports.close_modals = function () {
$("[data-overlay]").removeClass("show");
};
exports.exit_settings = function (callback) {
exports.exit_modal = function (callback) {
if (should_ignore(window.location.hash)) {
ui.blur_active_element();
ignore.flag = true;

View File

@@ -821,7 +821,7 @@ Object.defineProperty(exports, "is_open", {
});
exports.close = function () {
hashchange.exit_settings();
hashchange.exit_modal();
meta.is_open = false;
$("#subscription_overlay").removeClass("show");
subs.remove_miscategorized_streams();