mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +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() {
|
$('#delete-category').click(function() {
|
||||||
var categoryId = $('#category-id').val();
|
var categoryId = $('#category-id').val();
|
||||||
|
|
||||||
var messageBtns = {};
|
var buttons = [
|
||||||
messageBtns[EALang['delete']] = function() {
|
{
|
||||||
instance.delete(categoryId);
|
text: EALang['delete'],
|
||||||
$('#message_box').dialog('close');
|
click: function() {
|
||||||
};
|
instance.delete(categoryId);
|
||||||
messageBtns[EALang['cancel']] = function() {
|
$('#message_box').dialog('close');
|
||||||
$('#message_box').dialog('close');
|
}
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_category'],
|
GeneralFunctions.displayMessageBox(EALang['delete_category'],
|
||||||
EALang['delete_record_prompt'], messageBtns);
|
EALang['delete_record_prompt'], buttons);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -168,19 +168,24 @@
|
||||||
*/
|
*/
|
||||||
$('#delete-customer').click(function() {
|
$('#delete-customer').click(function() {
|
||||||
var customerId = $('#customer-id').val();
|
var customerId = $('#customer-id').val();
|
||||||
var messageBtns = {};
|
var buttons = [
|
||||||
|
{
|
||||||
messageBtns[EALang['delete']] = function() {
|
text: EALang['delete'],
|
||||||
instance.delete(customerId);
|
click: function() {
|
||||||
$('#message_box').dialog('close');
|
instance.delete(customerId);
|
||||||
};
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
messageBtns[EALang['cancel']] = function() {
|
},
|
||||||
$('#message_box').dialog('close');
|
{
|
||||||
};
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_customer'],
|
GeneralFunctions.displayMessageBox(EALang['delete_customer'],
|
||||||
EALang['delete_record_prompt'], messageBtns);
|
EALang['delete_record_prompt'], buttons);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -162,19 +162,24 @@
|
||||||
*/
|
*/
|
||||||
$('#delete-service').click(function() {
|
$('#delete-service').click(function() {
|
||||||
var serviceId = $('#service-id').val();
|
var serviceId = $('#service-id').val();
|
||||||
var messageBtns = {};
|
var buttons = [
|
||||||
|
{
|
||||||
messageBtns[EALang['delete']] = function() {
|
text: EALang['delete'],
|
||||||
instance.delete(serviceId);
|
click: function() {
|
||||||
$('#message_box').dialog('close');
|
instance.delete(serviceId);
|
||||||
};
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
messageBtns[EALang['cancel']] = function() {
|
},
|
||||||
$('#message_box').dialog('close');
|
{
|
||||||
};
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_service'],
|
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() {
|
$('#admins').on('click', '#delete-admin', function() {
|
||||||
var adminId = $('#admin-id').val();
|
var adminId = $('#admin-id').val();
|
||||||
var messageBtns = {};
|
|
||||||
|
|
||||||
messageBtns[EALang['delete']] = function() {
|
var buttons = [
|
||||||
this.delete(adminId);
|
{
|
||||||
$('#message_box').dialog('close');
|
text: EALang['delete'],
|
||||||
}.bind(this);
|
click: function() {
|
||||||
|
this.delete(adminId);
|
||||||
messageBtns[EALang['cancel']] = function() {
|
$('#message_box').dialog('close');
|
||||||
$('#message_box').dialog('close');
|
}.bind(this)
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_admin'],
|
GeneralFunctions.displayMessageBox(EALang['delete_admin'],
|
||||||
EALang['delete_record_prompt'], messageBtns);
|
EALang['delete_record_prompt'], buttons);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -125,17 +125,24 @@
|
||||||
$('#providers').on('click', '#delete-provider', function() {
|
$('#providers').on('click', '#delete-provider', function() {
|
||||||
var providerId = $('#provider-id').val();
|
var providerId = $('#provider-id').val();
|
||||||
|
|
||||||
var messageBtns = {};
|
var buttons = [
|
||||||
messageBtns[EALang['delete']] = function() {
|
{
|
||||||
this.delete(providerId);
|
text: EALang['delete'],
|
||||||
$('#message_box').dialog('close');
|
click: function() {
|
||||||
}.bind(this);
|
this.delete(providerId);
|
||||||
messageBtns[EALang['cancel']] = function() {
|
$('#message_box').dialog('close');
|
||||||
$('#message_box').dialog('close');
|
}.bind(this)
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_provider'],
|
GeneralFunctions.displayMessageBox(EALang['delete_provider'],
|
||||||
EALang['delete_record_prompt'], messageBtns);
|
EALang['delete_record_prompt'], buttons);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,19 +117,24 @@
|
||||||
*/
|
*/
|
||||||
$('#secretaries').on('click', '#delete-secretary', function() {
|
$('#secretaries').on('click', '#delete-secretary', function() {
|
||||||
var secretaryId = $('#secretary-id').val();
|
var secretaryId = $('#secretary-id').val();
|
||||||
var messageBtns = {};
|
var buttons = [
|
||||||
|
{
|
||||||
messageBtns[EALang['delete']] = function() {
|
text: EALang['delete'],
|
||||||
this.delete(secretaryId);
|
click: function() {
|
||||||
$('#message_box').dialog('close');
|
this.delete(secretaryId);
|
||||||
}.bind(this);
|
$('#message_box').dialog('close');
|
||||||
|
}.bind(this)
|
||||||
messageBtns[EALang['cancel']] = function() {
|
},
|
||||||
$('#message_box').dialog('close');
|
{
|
||||||
};
|
text: EALang['cancel'],
|
||||||
|
click: function() {
|
||||||
|
$('#message_box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang['delete_secretary'],
|
GeneralFunctions.displayMessageBox(EALang['delete_secretary'],
|
||||||
EALang['delete_record_prompt'], messageBtns);
|
EALang['delete_record_prompt'], buttons);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue