mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-05 14:24:05 -04:00
Fix attribute delete (#68)
This commit is contained in:
@@ -80,7 +80,7 @@ class Expenses extends Secure_Controller
|
||||
|
||||
$data['expenses_info'] = $this->Expense->get_info($expense_id);
|
||||
|
||||
$data['expense_categories'] = array();
|
||||
$expense_categories = array();
|
||||
foreach($this->Expense_category->get_all(0, 0, TRUE)->result_array() as $row)
|
||||
{
|
||||
$expense_categories[$row['expense_category_id']] = $row['category_name'];
|
||||
|
||||
@@ -57,8 +57,6 @@ foreach($definition_values as $definition_id => $definition_value)
|
||||
(function() {
|
||||
<?php $this->load->view('partial/datepicker_locale'); ?>
|
||||
|
||||
$('.datetime').datetimepicker(pickerconfig());
|
||||
|
||||
var enable_delete = function() {
|
||||
$('.remove_attribute_btn').click(function() {
|
||||
$(this).parents('.form-group').remove();
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<span class="input-group-addon input-sm"><span class="glyphicon glyphicon-calendar"></span></span>
|
||||
<?php echo form_input(array(
|
||||
'name'=>'date',
|
||||
'id'=>'datetime',
|
||||
'class'=>'form-control input-sm datepicker',
|
||||
'value'=>date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), strtotime($expenses_info->date)))
|
||||
'class'=>'form-control input-sm datetime',
|
||||
'value'=>to_datetime(strtotime($expenses_info->date)),
|
||||
'readonly'=>'readonly')
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,8 +148,6 @@ $(document).ready(function()
|
||||
{
|
||||
<?php $this->load->view('partial/datepicker_locale'); ?>
|
||||
|
||||
$('#datetime').datetimepicker(pickerconfig)
|
||||
|
||||
var amount_validator = function(field) {
|
||||
return {
|
||||
url: "<?php echo site_url($controller_name . '/ajax_check_amount')?>",
|
||||
|
||||
@@ -33,11 +33,12 @@
|
||||
formatAllRows: function () {
|
||||
return "<?php echo $this->lang->line('tables_all'); ?>";
|
||||
},
|
||||
formatConfirmDelete : function() {
|
||||
return "<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_delete")?>";
|
||||
formatConfirmDelete: function(action) {
|
||||
|
||||
return "<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_delete")?>" + action;
|
||||
},
|
||||
formatConfirmRestore : function() {
|
||||
return "<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_restore")?>";
|
||||
return "<?php echo $this->lang->line((isset($editable) ? $editable : $controller_name). "_confirm_restore")?>";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -108,4 +108,6 @@ $.fn.datetimepicker.dates['<?php echo $this->config->item("language"); ?>'] = {
|
||||
}
|
||||
?>
|
||||
weekStart: <?php echo $this->lang->line("datepicker_weekstart"); ?>
|
||||
};
|
||||
};
|
||||
|
||||
$(".datetime").datetimepicker(pickerconfig());
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('sales_date'), 'date', array('class'=>'control-label col-xs-3')); ?>
|
||||
<div class='col-xs-8'>
|
||||
<?php echo form_input(array('name'=>'date','value'=>to_datetime(strtotime($sale_info['sale_time'])), 'id'=>'datetime', 'class'=>'form-control input-sm'));?>
|
||||
<?php echo form_input(array('name'=>'date','value'=>to_datetime(strtotime($sale_info['sale_time'])), 'class'=>'datetime form-control input-sm'));?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,8 +109,6 @@ $(document).ready(function()
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->load->view('partial/datepicker_locale'); ?>
|
||||
|
||||
$('#datetime').datetimepicker(pickerconfig);
|
||||
|
||||
var fill_value = function(event, ui) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -251,11 +251,15 @@
|
||||
};
|
||||
|
||||
var init_delete = function (confirmMessage) {
|
||||
$("#delete").click(do_action("delete"));
|
||||
$("#delete").click(function(event) {
|
||||
do_action("delete")();
|
||||
});
|
||||
};
|
||||
|
||||
var init_restore = function (confirmMessage) {
|
||||
$("#restore").click(do_action("restore"));
|
||||
$("#restore").click(function(event) {
|
||||
do_action("restore")();
|
||||
});
|
||||
};
|
||||
|
||||
var refresh = function() {
|
||||
|
||||
Reference in New Issue
Block a user