mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-22 06:32:24 +03:00
Changed message buttons in order to avoid issues with invalid translations.
This commit is contained in:
parent
32d4cf8bf2
commit
fe5341a0af
6 changed files with 96 additions and 61 deletions
|
@ -107,17 +107,24 @@
|
|||
$('#delete-category').click(function() {
|
||||
var categoryId = $('#category-id').val();
|
||||
|
||||
var messageBtns = {};
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
instance.delete(categoryId);
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
text: EALang['delete'],
|
||||
click: function() {
|
||||
instance.delete(categoryId);
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: EALang['cancel'],
|
||||
click: function() {
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
GeneralFunctions.displayMessageBox(EALang['delete_category'],
|
||||
EALang['delete_record_prompt'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -168,19 +168,24 @@
|
|||
*/
|
||||
$('#delete-customer').click(function() {
|
||||
var customerId = $('#customer-id').val();
|
||||
var messageBtns = {};
|
||||
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
instance.delete(customerId);
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
text: EALang['delete'],
|
||||
click: function() {
|
||||
instance.delete(customerId);
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: EALang['cancel'],
|
||||
click: function() {
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
GeneralFunctions.displayMessageBox(EALang['delete_customer'],
|
||||
EALang['delete_record_prompt'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -162,19 +162,24 @@
|
|||
*/
|
||||
$('#delete-service').click(function() {
|
||||
var serviceId = $('#service-id').val();
|
||||
var messageBtns = {};
|
||||
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
instance.delete(serviceId);
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
text: EALang['delete'],
|
||||
click: function() {
|
||||
instance.delete(serviceId);
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: EALang['cancel'],
|
||||
click: function() {
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
GeneralFunctions.displayMessageBox(EALang['delete_service'],
|
||||
EALang['delete_record_prompt'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -112,19 +112,25 @@
|
|||
*/
|
||||
$('#admins').on('click', '#delete-admin', function() {
|
||||
var adminId = $('#admin-id').val();
|
||||
var messageBtns = {};
|
||||
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
this.delete(adminId);
|
||||
$('#message_box').dialog('close');
|
||||
}.bind(this);
|
||||
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
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'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
}.bind(this));
|
||||
|
||||
/**
|
||||
|
|
|
@ -125,17 +125,24 @@
|
|||
$('#providers').on('click', '#delete-provider', function() {
|
||||
var providerId = $('#provider-id').val();
|
||||
|
||||
var messageBtns = {};
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
this.delete(providerId);
|
||||
$('#message_box').dialog('close');
|
||||
}.bind(this);
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
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'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
}.bind(this));
|
||||
|
||||
/**
|
||||
|
|
|
@ -117,19 +117,24 @@
|
|||
*/
|
||||
$('#secretaries').on('click', '#delete-secretary', function() {
|
||||
var secretaryId = $('#secretary-id').val();
|
||||
var messageBtns = {};
|
||||
|
||||
messageBtns[EALang['delete']] = function() {
|
||||
this.delete(secretaryId);
|
||||
$('#message_box').dialog('close');
|
||||
}.bind(this);
|
||||
|
||||
messageBtns[EALang['cancel']] = function() {
|
||||
$('#message_box').dialog('close');
|
||||
};
|
||||
var buttons = [
|
||||
{
|
||||
text: EALang['delete'],
|
||||
click: function() {
|
||||
this.delete(secretaryId);
|
||||
$('#message_box').dialog('close');
|
||||
}.bind(this)
|
||||
},
|
||||
{
|
||||
text: EALang['cancel'],
|
||||
click: function() {
|
||||
$('#message_box').dialog('close');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
GeneralFunctions.displayMessageBox(EALang['delete_secretary'],
|
||||
EALang['delete_record_prompt'], messageBtns);
|
||||
EALang['delete_record_prompt'], buttons);
|
||||
}.bind(this));
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue