Skip to content

Commit

Permalink
changed to boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
Güray Yarar committed Jun 21, 2017
1 parent 54fb3de commit c1da2f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ $(function () {
skinChanger();
activateNotificationAndTasksScroll();

setSkinListHeightAndScroll('firstTime');
setSettingListHeightAndScroll('firstTime');
setSkinListHeightAndScroll(true);
setSettingListHeightAndScroll(true);
$(window).resize(function () {
setSkinListHeightAndScroll();
setSettingListHeightAndScroll();
setSkinListHeightAndScroll(false);
setSettingListHeightAndScroll(false);
});
});

Expand All @@ -26,11 +26,11 @@ function skinChanger() {
}

//Skin tab content set height and show scroll
function setSkinListHeightAndScroll(firstTime) {
function setSkinListHeightAndScroll(isFirstTime) {
var height = $(window).height() - ($('.navbar').innerHeight() + $('.right-sidebar .nav-tabs').outerHeight());
var $el = $('.demo-choose-skin');

if(firstTime == undefined){
if (!isFirstTime){
$el.slimScroll({ destroy: true }).height('auto');
$el.parent().find('.slimScrollBar, .slimScrollRail').remove();
}
Expand All @@ -46,11 +46,11 @@ function setSkinListHeightAndScroll(firstTime) {
}

//Setting tab content set height and show scroll
function setSettingListHeightAndScroll(firstTime) {
function setSettingListHeightAndScroll(isFirstTime) {
var height = $(window).height() - ($('.navbar').innerHeight() + $('.right-sidebar .nav-tabs').outerHeight());
var $el = $('.right-sidebar .demo-settings');

if(firstTime == undefined){
if (!isFirstTime){
$el.slimScroll({ destroy: true }).height('auto');
$el.parent().find('.slimScrollBar, .slimScrollRail').remove();
}
Expand Down

0 comments on commit c1da2f7

Please sign in to comment.