|
|
|
|
@ -34,7 +34,8 @@ $(document).ready(function () { |
|
|
|
|
popup; |
|
|
|
|
|
|
|
|
|
body.on('click', '[data-popup]', function(e){ |
|
|
|
|
let data = $(this).data('popup'); |
|
|
|
|
const $this = $(this); |
|
|
|
|
let data = $this.data('popup'); |
|
|
|
|
if(! data) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
@ -50,7 +51,7 @@ $(document).ready(function () { |
|
|
|
|
console.log('reset selected'); |
|
|
|
|
$('[data-day]').prop('checked', false); |
|
|
|
|
|
|
|
|
|
if ($(this).text() === 'продлить') { |
|
|
|
|
if ($this.text() === 'продлить') { |
|
|
|
|
//data-purchased
|
|
|
|
|
//restore purchased selection
|
|
|
|
|
console.log('restore purchased'); |
|
|
|
|
@ -72,19 +73,19 @@ $(document).ready(function () { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if( data === '.js-popup-auth') { |
|
|
|
|
let nextUrl = $(this).data('auth-next-url'); |
|
|
|
|
let nextUrl = $this.data('auth-next-url'); |
|
|
|
|
if(nextUrl === 'href') { |
|
|
|
|
nextUrl = $(this).attr('href'); |
|
|
|
|
nextUrl = $this.attr('href'); |
|
|
|
|
} |
|
|
|
|
popup.data('next-url', nextUrl); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if($(this).data('day')) { |
|
|
|
|
let day = $(this).data('day'); |
|
|
|
|
if($this.data('day')) { |
|
|
|
|
let day = $this.data('day'); |
|
|
|
|
$('[data-day='+day+']').prop('checked', true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!is_extend && !$(this).data('day')) { |
|
|
|
|
if(!is_extend && !$this.data('day')) { |
|
|
|
|
console.log('check all'); |
|
|
|
|
$('[data-day]').each(function(){ |
|
|
|
|
$(this).prop('checked', true); |
|
|
|
|
|