Move the call to action button of modals to the right

This commit is contained in:
Alex Tselegidis 2020-09-07 11:15:01 +03:00
parent 5031b66bd2
commit 769668c828
11 changed files with 55 additions and 60 deletions

View file

@ -329,9 +329,9 @@
</div>
<div class="modal-footer">
<button id="save-appointment" class="btn btn-primary"><?= lang('save') ?></button>
<button id="cancel-appointment" class="btn btn-light"
data-dismiss="modal"><?= lang('cancel') ?></button>
<button id="save-appointment" class="btn btn-primary"><?= lang('save') ?></button>
</div>
</div>
</div>
@ -395,9 +395,9 @@
</form>
</div>
<div class="modal-footer">
<button id="save-unavailable" class="btn btn-primary"><?= lang('save') ?></button>
<button id="cancel-unavailable" class="btn btn-light"
data-dismiss="modal"><?= lang('cancel') ?></button>
<button id="save-unavailable" class="btn btn-primary"><?= lang('save') ?></button>
</div>
</div>
</div>
@ -456,8 +456,8 @@
</form>
</div>
<div class="modal-footer">
<button id="save-extra" class="btn btn-primary"><?= lang('save') ?></button>
<button id="cancel-extra" class="btn btn-light" data-dismiss="modal"><?= lang('cancel') ?></button>
<button id="save-extra" class="btn btn-primary"><?= lang('save') ?></button>
</div>
</div>
</div>
@ -480,8 +480,8 @@
</div>
</div>
<div class="modal-footer">
<button id="select-calendar" class="btn btn-primary"><?= lang('select') ?></button>
<button id="close-calendar" class="btn btn-light" data-dismiss="modal"><?= lang('close') ?></button>
<button id="select-calendar" class="btn btn-primary"><?= lang('select') ?></button>
</div>
</div>
</div>

View file

@ -161,6 +161,12 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
}
else if (lastFocusedEventData.data.is_unavailable === '0') {
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: 'OK',
click: function () {
@ -181,12 +187,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
})
.fail(GeneralFunctions.ajaxFailureHandler);
}
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];
@ -197,7 +197,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
$('<textarea/>', {
'class': 'form-control w-100',
'id': 'delete-reason',
'rows': '3',
'rows': '3'
})
.appendTo('#message-box');
} else {

View file

@ -84,9 +84,6 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
};
var errorCallback = function (jqXHR, textStatus, errorThrown) {
GeneralFunctions.displayMessageBox('Communication Error', 'Unfortunately ' +
'the operation could not complete due to server communication errors.');
$dialog.find('.modal-message').text(EALang.service_communication_error);
$dialog.find('.modal-message').addClass('alert-danger').removeClass('hidden');
};

View file

@ -238,6 +238,12 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
.fail(GeneralFunctions.ajaxFailureHandler);
} else if (lastFocusedEventData.data.is_unavailable === '0') {
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: 'OK',
click: function () {
@ -258,12 +264,6 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
})
.fail(GeneralFunctions.ajaxFailureHandler);
}
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];

View file

@ -106,6 +106,12 @@
var categoryId = $('#category-id').val();
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: EALang.delete,
click: function () {
@ -113,12 +119,6 @@
$('#message-box').dialog('close');
}
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];
GeneralFunctions.displayMessageBox(EALang.delete_category,

View file

@ -170,15 +170,15 @@
var customerId = $('#customer-id').val();
var buttons = [
{
text: EALang.delete,
text: EALang.cancel,
click: function () {
instance.delete(customerId);
$('#message-box').dialog('close');
}
},
{
text: EALang.cancel,
text: EALang.delete,
click: function () {
instance.delete(customerId);
$('#message-box').dialog('close');
}
}

View file

@ -169,15 +169,15 @@
var serviceId = $('#service-id').val();
var buttons = [
{
text: EALang.delete,
text: EALang.cancel,
click: function () {
instance.delete(serviceId);
$('#message-box').dialog('close');
}
},
{
text: EALang.cancel,
text: EALang.delete,
click: function () {
instance.delete(serviceId);
$('#message-box').dialog('close');
}
}

View file

@ -243,6 +243,12 @@ window.BackendSettings = window.BackendSettings || {};
*/
$('#apply-global-working-plan').on('click', function() {
var buttons = [
{
text: EALang.cancel,
click: function() {
$('#message-box').dialog('close');
}
},
{
text: 'OK',
click: function() {
@ -262,12 +268,6 @@ window.BackendSettings = window.BackendSettings || {};
$('#message-box').dialog('close');
});
}
},
{
text: EALang.cancel,
click: function() {
$('#message-box').dialog('close');
}
}
];

View file

@ -110,23 +110,22 @@
var adminId = $('#admin-id').val();
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: EALang.delete,
click: function () {
this.delete(adminId);
$('#message-box').dialog('close');
}.bind(this)
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];
GeneralFunctions.displayMessageBox(EALang.delete_admin,
EALang.delete_record_prompt, buttons);
GeneralFunctions.displayMessageBox(EALang.delete_admin, EALang.delete_record_prompt, buttons);
}.bind(this));
/**

View file

@ -121,23 +121,22 @@
var providerId = $('#provider-id').val();
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: EALang.delete,
click: function () {
this.delete(providerId);
$('#message-box').dialog('close');
}.bind(this)
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];
GeneralFunctions.displayMessageBox(EALang.delete_provider,
EALang.delete_record_prompt, buttons);
GeneralFunctions.displayMessageBox(EALang.delete_provider, EALang.delete_record_prompt, buttons);
}.bind(this));
/**

View file

@ -115,18 +115,18 @@
$('#secretaries').on('click', '#delete-secretary', function () {
var secretaryId = $('#secretary-id').val();
var buttons = [
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
},
{
text: EALang.delete,
click: function () {
this.delete(secretaryId);
$('#message-box').dialog('close');
}.bind(this)
},
{
text: EALang.cancel,
click: function () {
$('#message-box').dialog('close');
}
}
];