mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en el datatable
This commit is contained in:
@ -21,9 +21,22 @@ class Language extends BaseController
|
||||
public function getTranslation()
|
||||
{
|
||||
$translationFile = $this->request->getPost('translationFile');
|
||||
$locale = $this->request->getPost('locale');
|
||||
$path = "Language/{$locale}/$translationFile.php";
|
||||
$lang = require APPPATH.$path;
|
||||
return json_encode($lang);
|
||||
$data = [];
|
||||
if(is_array($translationFile)){
|
||||
foreach($translationFile as $file){
|
||||
$locale = $this->request->getPost('locale');
|
||||
$path = "Language/{$locale}/$file.php";
|
||||
$lang = require APPPATH.$path;
|
||||
$data[$file] = $lang;
|
||||
}
|
||||
return json_encode($data);
|
||||
}
|
||||
else{
|
||||
$locale = $this->request->getPost('locale');
|
||||
$path = "Language/{$locale}/$translationFile.php";
|
||||
$lang = require APPPATH.$path;
|
||||
return json_encode($lang);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1046,6 +1046,8 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
})
|
||||
})
|
||||
|
||||
/*
|
||||
|
||||
var theTablePrecios = $('#tableOfPrecios').DataTable( {
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
@ -1143,7 +1145,7 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
|
||||
*/
|
||||
|
||||
const initPrecioTemplate = <?php echo json_encode($precioTemplate);?>;
|
||||
if(initPrecioTemplate != null){
|
||||
@ -1151,7 +1153,7 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
$('#plantillas').append(newOption);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Activate an inline edit on click of a table cell
|
||||
$('#tableOfPrecios').on( 'click', 'tbody span.edit', function (e) {
|
||||
editorPrecios.inline(
|
||||
@ -1165,7 +1167,7 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
}
|
||||
);
|
||||
} );
|
||||
|
||||
*/
|
||||
|
||||
// Delete row
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
|
||||
Reference in New Issue
Block a user