Skip to content

Commit

Permalink
Change names of the states
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Dec 6, 2014
1 parent 53922d9 commit ee3c42b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/jquery.remodal.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

/* Hide scroll bar */

html.remodal_lock,
body.remodal_lock {
html.remodal-is-locked,
body.remodal-is-locked {
overflow: hidden;
}

Expand Down Expand Up @@ -90,7 +90,7 @@ body.remodal_lock {
transition: filter 0.2s linear;
}

body.remodal_active .remodal-bg {
body.remodal-is-active .remodal-bg {
-webkit-filter: blur(3px);
-ms-filter: blur(3px);
filter: blur(3px);
Expand All @@ -110,7 +110,7 @@ body.remodal_active .remodal-bg {
background: rgba(33, 36, 46, 0.95);
}

body.remodal_active .remodal-overlay {
body.remodal-is-active .remodal-overlay {
opacity: 1;
}

Expand Down Expand Up @@ -143,7 +143,7 @@ body.remodal_active .remodal-overlay {
box-shadow: 0 0 8px #171a24;
}

body.remodal_active .remodal {
body.remodal-is-active .remodal {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
Expand Down
10 changes: 5 additions & 5 deletions src/jquery.remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
paddingRight = parseInt($body.css("padding-right"), 10) + getScrollbarWidth();

$body.css("padding-right", paddingRight + "px");
$("html, body").addClass(pluginName + "_lock");
$("html, body").addClass(pluginName + "-is-locked");
}

/**
Expand All @@ -105,7 +105,7 @@
paddingRight = parseInt($body.css("padding-right"), 10) - getScrollbarWidth();

$body.css("padding-right", paddingRight + "px");
$("html, body").removeClass(pluginName + "_lock");
$("html, body").removeClass(pluginName + "-is-locked");
}

/**
Expand Down Expand Up @@ -256,7 +256,7 @@

if (current && current !== remodal) {
current.$overlay.hide();
current.$body.removeClass(pluginName + "_active");
current.$body.removeClass(pluginName + "-is-active");
}

current = remodal;
Expand All @@ -265,7 +265,7 @@
remodal.$overlay.show();

setTimeout(function() {
remodal.$body.addClass(pluginName + "_active");
remodal.$body.addClass(pluginName + "-is-active");

setTimeout(function() {
remodal.busy = false;
Expand Down Expand Up @@ -295,7 +295,7 @@
$(window).scrollTop(scrollTop);
}

remodal.$body.removeClass(pluginName + "_active");
remodal.$body.removeClass(pluginName + "-is-active");

setTimeout(function() {
remodal.$overlay.hide();
Expand Down
4 changes: 2 additions & 2 deletions test/remodal_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@
$(document.body).css("height", "10000px");

$document.one("opened", "[data-remodal-id=modal]", function() {
assert.ok($("html, body").hasClass("remodal_lock"));
assert.ok($("html, body").hasClass("remodal-is-locked"));
assert.ok(parseInt($(document.body).css("padding-right")) > 0);
$inst1.close();
});

$document.one("closed", "[data-remodal-id=modal]", function() {
assert.ok(!$("html, body").hasClass("remodal_lock"));
assert.ok(!$("html, body").hasClass("remodal-is-locked"));
assert.ok(parseInt($(document.body).css("padding-right")) === 0);
QUnit.start();
});
Expand Down

0 comments on commit ee3c42b

Please sign in to comment.