mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 17:33:19 +03:00
Fixed problem with JS manipulation of provider sync state.
This commit is contained in:
parent
f89527fe58
commit
1812d66bb4
2 changed files with 5 additions and 9 deletions
|
@ -57,7 +57,7 @@
|
|||
<button id="enable-sync" class="btn" data-toggle="button"
|
||||
title="<?php echo $this->lang->line('enable_appointment_sync_hint'); ?>">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
<?php echo $this->lang->line('enable_sync'); ?>
|
||||
<span><?php echo $this->lang->line('enable_sync'); ?></span>
|
||||
</button>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -268,13 +268,11 @@ var BackendCalendar = {
|
|||
// style changes.
|
||||
if ($('#select-filter-item option:selected').attr('google-sync') === 'true') {
|
||||
$('#enable-sync').addClass('btn-success enabled');
|
||||
$('#enable-sync span:eq(1)').addClass('icon-white');
|
||||
$('#enable-sync span:eq(2)').text(EALang['disable_sync']);
|
||||
$('#enable-sync span:eq(1)').text(EALang['disable_sync']);
|
||||
$('#google-sync').prop('disabled', false);
|
||||
} else {
|
||||
$('#enable-sync').removeClass('btn-success enabled');
|
||||
$('#enable-sync span:eq(1)').removeClass('icon-white');
|
||||
$('#enable-sync span:eq(2)').text(EALang['enable_sync']);
|
||||
$('#enable-sync span:eq(1)').text(EALang['enable_sync']);
|
||||
$('#google-sync').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
@ -715,8 +713,7 @@ var BackendCalendar = {
|
|||
windowHandle.close();
|
||||
window.clearInterval(authInterval);
|
||||
$('#enable-sync').addClass('btn-success enabled');
|
||||
$('#enable-sync span:eq(1)').addClass('icon-white');
|
||||
$('#enable-sync span:eq(2)').text(EALang['disable_sync']);
|
||||
$('#enable-sync span:eq(1)').text(EALang['disable_sync']);
|
||||
$('#google-sync').prop('disabled', false);
|
||||
$('#select-filter-item option:selected').attr('google-sync', 'true');
|
||||
|
||||
|
@ -760,8 +757,7 @@ var BackendCalendar = {
|
|||
BackendCalendar.disableProviderSync(provider['id']);
|
||||
|
||||
$('#enable-sync').removeClass('btn-success enabled');
|
||||
$('#enable-sync span:eq(1)').removeClass('icon-white');
|
||||
$('#enable-sync span:eq(2)').text(EALang['enable_sync']);
|
||||
$('#enable-sync span:eq(1)').text(EALang['enable_sync']);
|
||||
$('#google-sync').prop('disabled', true);
|
||||
$('#select-filter-item option:selected').attr('google-sync', 'false');
|
||||
|
||||
|
|
Loading…
Reference in a new issue