Merge branch 'feature/bower+grunt' into feature/bootstrapUI

This commit is contained in:
jekkos committed 2016-02-18 17:42:38 +01:00
commit aae36bce00
37 files changed
+880 -8753

No files matched your search

+4 -4
View File
@@ -61,7 +61,7 @@ class Reports extends Secure_area
$summary_data = array(anchor('sales/edit/'.$report_data['sale_id'] . '/width:'.FORM_WIDTH,
'POS '.$report_data['sale_id'],
array('class' => 'thickbox')),
array('class' => 'modal')),
$report_data['sale_date'],
$report_data['items_purchased'],
$report_data['employee_name'],
@@ -85,7 +85,7 @@ class Reports extends Secure_area
$summary_data = array(anchor('receivings/edit/'.$report_data['receiving_id'] . '/width:'.FORM_WIDTH,
'RECV '.$report_data['receiving_id'],
array('class' => 'thickbox')),
array('class' => 'modal')),
$report_data['receiving_date'],
$report_data['items_purchased'],
$report_data['employee_name'],
@@ -872,7 +872,7 @@ class Reports extends Secure_area
foreach($report_data['summary'] as $key=>$row)
{
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'] . '/width:'.FORM_WIDTH, 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']), $row['payment_type'], $row['comment']);
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'] . '/width:'.FORM_WIDTH, 'POS '.$row['sale_id'], array('class' => 'modal')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']), $row['payment_type'], $row['comment']);
foreach($report_data['details'][$key] as $drow)
{
@@ -915,7 +915,7 @@ class Reports extends Secure_area
foreach($report_data['summary'] as $key=>$row)
{
$summary_data[] = array(anchor('receivings/edit/'.$row['receiving_id'].'/width:'.FORM_WIDTH, 'RECV '.$row['receiving_id'], array('class' => 'thickbox')), $row['receiving_date'], $row['items_purchased'], $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['invoice_number'], $row['comment']);
$summary_data[] = array(anchor('receivings/edit/'.$row['receiving_id'].'/width:'.FORM_WIDTH, 'RECV '.$row['receiving_id'], array('class' => 'modal')), $row['receiving_date'], $row['items_purchased'], $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['invoice_number'], $row['comment']);
foreach($report_data['details'][$key] as $drow)
{
+9 -9
View File
@@ -77,7 +77,7 @@ function get_sales_manage_sale_data_row($sale, $controller)
$table_data_row.='<td width="12%">'.$sale['payment_type'].'</td>';
$table_data_row.='<td width="8%">'.$sale['invoice_number'].'</td>';
$table_data_row.='<td width="8%">';
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'] . "/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update')));
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'] . "/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal','title'=>$CI->lang->line($controller_name.'_update')));
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
$table_data_row.='<a href="'.site_url($controller_name. "/receipt/" . $sale['sale_id']) . '">' . $CI->lang->line('sales_show_receipt') . '</a>';
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
@@ -174,8 +174,8 @@ function get_person_data_row($person,$controller)
$table_data_row.='<td width="20%">'.character_limiter($person->last_name,13).'</td>';
$table_data_row.='<td width="20%">'.character_limiter($person->first_name,13).'</td>';
$table_data_row.='<td width="30%">'.mailto($person->email,character_limiter($person->email,22)).'</td>';
$table_data_row.='<td width="20%">'.character_limiter($person->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="20%">'.character_limiter($person->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -262,7 +262,7 @@ function get_supplier_data_row($supplier,$controller)
$table_data_row.='<td width="22%">'.mailto($supplier->email,character_limiter($supplier->email,22)).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.character_limiter($supplier->person_id,5).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -358,10 +358,10 @@ function get_item_data_row($item,$controller)
}
}
$table_data_row.='<td align="center" width="55px">' . $image . '</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'data-modal','data-toggle'=>'modal','data-target'=>'#ajaxModal','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id/width:$width", $CI->lang->line('common_inv'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
$table_data_row.='<td width="5%">'*/'&nbsp;&nbsp;&nbsp;&nbsp;'.anchor($controller_name."/count_details/$item->item_id/width:$width", $CI->lang->line('common_det'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id/width:$width", $CI->lang->line('common_inv'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
$table_data_row.='<td width="5%">'*/'&nbsp;&nbsp;&nbsp;&nbsp;'.anchor($controller_name."/count_details/$item->item_id/width:$width", $CI->lang->line('common_det'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='</tr>';
@@ -429,7 +429,7 @@ function get_giftcard_data_row($giftcard,$controller)
$table_data_row.='<td width="15%">'.$giftcard->first_name.'</td>';
$table_data_row.='<td width="15%">'.$giftcard->giftcard_number.'</td>';
$table_data_row.='<td width="20%">'.to_currency($giftcard->value).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -498,7 +498,7 @@ function get_item_kit_data_row($item_kit, $controller)
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_cost_price).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_unit_price).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
+15 -19
View File
@@ -1,29 +1,25 @@
<?php echo form_open_multipart('customers/do_excel_import/',array('id'=>'item_form')); ?>
<?php echo form_open_multipart('customers/do_excel_import/',array('id'=>'item_form', 'class'=>'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('customers_import_items_excel'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<b><a href="<?php echo site_url('customers/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a></b>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line('common_import'); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_import_file_path').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_upload(array(
'name'=>'file_path',
'id'=>'file_path',
'value'=>'')
);?>
<div class="form-group">
<div class="col-xs-6">
<a href="<?php echo site_url('customers/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path'), 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<label class="file">
<input type="file" id="file_input" name="file_input">
<span class="file-custom"></span>
</label>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submitf',
'id'=>'submitf',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -37,7 +33,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'
+32 -40
View File
@@ -1,48 +1,40 @@
<?php echo form_open('customers/save/'.$person_info->person_id,array('id'=>'customer_form')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="customer_basic_info">
<legend><?php echo $this->lang->line("customers_basic_information"); ?></legend>
<?php $this->load->view("people/form_basic_info"); ?>
<?php echo form_open('customers/save/'.$person_info->person_id,array('id'=>'customer_form', 'class'=>'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="customer_basic_info">
<legend><?php echo $this->lang->line("customers_basic_information"); ?></legend>
<?php $this->load->view("people/form_basic_info"); ?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('customers_company_name').':', 'company_name'); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'company_name',
'value'=>$person_info->company_name)
);?>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_company_name'), 'company_name', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'company_name',
'class'=>'form-control',
'value'=>$person_info->company_name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('customers_account_number').':', 'account_number'); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'account_number',
'value'=>$person_info->account_number)
);?>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_account_number'), 'account_number', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'account_number form-control',
'value'=>$person_info->account_number)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('customers_taxable').':', 'taxable'); ?>
<div class='form_field'>
<?php echo form_checkbox('taxable', '1', $person_info->taxable == '' ? TRUE : (boolean)$person_info->taxable);?>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('customers_taxable'), 'taxable', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox('taxable', '1', $person_info->taxable == '' ? TRUE : (boolean)$person_info->taxable);?>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
</div>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -74,7 +66,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'
+17 -23
View File
@@ -1,4 +1,4 @@
<?php echo form_open('employees/save/'.$person_info->person_id,array('id'=>'employee_form')); ?>
<?php echo form_open('employees/save/'.$person_info->person_id,array('id'=>'employee_form', 'class'=> 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="employee_basic_info">
@@ -8,36 +8,39 @@
<fieldset id="employee_login_info">
<legend><?php echo $this->lang->line("employees_login_info"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_username').':', 'username',array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_username'), 'username',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-5'>
<?php echo form_input(array(
'name'=>'username',
'id'=>'username',
'class'=>'form-control',
'value'=>$person_info->username));?>
</div>
</div>
<?php
$password_label_attributes = $person_info->person_id == "" ? array('class'=>'required'):array();
$password_label_attributes = $person_info->person_id == "" ? array('class'=>'required col-xs-3 control-label'):array();
?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_password').':', 'password',$password_label_attributes); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_password'), 'password',$password_label_attributes); ?>
<div class='col-xs-5'>
<?php echo form_password(array(
'name'=>'password',
'id'=>'password'
'id'=>'password',
'class'=>'form-control'
));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('employees_repeat_password').':', 'repeat_password',$password_label_attributes); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('employees_repeat_password'), 'repeat_password',$password_label_attributes); ?>
<div class='col-xs-5'>
<?php echo form_password(array(
'name'=>'repeat_password',
'id'=>'repeat_password'
'id'=>'repeat_password',
'class'=>'form-control'
));?>
</div>
</div>
@@ -83,15 +86,6 @@
?>
</li>
</ul>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -138,7 +132,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'
+14 -20
View File
@@ -1,51 +1,45 @@
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('giftcards/save/'.$giftcard_info->giftcard_id,array('id'=>'giftcard_form')); ?>
<?php echo form_open('giftcards/save/'.$giftcard_info->giftcard_id,array('id'=>'giftcard_form', 'class'=>'form-horizontal')); ?>
<fieldset id="giftcard_basic_info" style="padding: 5px;">
<legend><?php echo $this->lang->line("giftcards_basic_information"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_person_id').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_person_id').':', 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'person_id',
'id'=>'person_id',
'class'=>'form-control',
'value'=>$selected_person)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_giftcard_number').':', 'name',array('class'=>'required wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_giftcard_number').':', 'name',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'giftcard_number',
'id'=>'giftcard_number',
'class'=>'form-control',
'value'=>$giftcard_number)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('giftcards_card_value').':', 'name',array('class'=>'required wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('giftcards_card_value').':', 'name',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'value',
'id'=>'value',
'class'=>'form-control',
'value'=>$giftcard_info->value)
);?>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -74,7 +68,7 @@ $(document).ready(function()
{
success:function(response)
{
tb_remove();
dialog_support.hide();
post_giftcard_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown)
+1 -1
View File
@@ -60,7 +60,7 @@ function post_giftcard_form_submit(response)
<div id="title" class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_'.$controller_name); ?></div>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'thickbox none', 'title'=>$this->lang->line($controller_name.'_new')));
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name.'_new')));
?>
</div>
+58 -63
View File
@@ -1,72 +1,67 @@
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('item_kits/save/'.$item_kit_info->item_kit_id,array('id'=>'item_kit_form')); ?>
<fieldset id="item_kit_info">
<legend><?php echo $this->lang->line("item_kits_info"); ?></legend>
<?php echo form_open('item_kits/save/'.$item_kit_info->item_kit_id,array('id'=>'item_kit_form', 'class' => 'form-horizontal')); ?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_name').':', 'name',array('class'=>'wide required')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'value'=>$item_kit_info->name)
);?>
</div>
</div>
<fieldset id="item_kit_info">
<legend><?php echo $this->lang->line("item_kits_info"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_description').':', 'description',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'value'=>$item_kit_info->description,
'rows'=>'5',
'cols'=>'17')
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_name').':', 'name',array('class'=>'control-label col-xs-3 required')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'class'=>'form-control',
'value'=>$item_kit_info->name)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_description').':', 'description',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'class'=>'form-control',
'value'=>$item_kit_info->description,
)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('item_kits_add_item').':', 'item',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'item',
'id'=>'item'
));?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('item_kits_add_item').':', 'item',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'item',
'id'=>'item',
'class'=>'form-control',
));?>
</div>
</div>
<table id="item_kit_items">
<tr>
<th><?php echo $this->lang->line('common_delete');?></th>
<th><?php echo $this->lang->line('item_kits_item');?></th>
<th><?php echo $this->lang->line('item_kits_quantity');?></th>
</tr>
<?php foreach ($this->Item_kit_items->get_info($item_kit_info->item_kit_id) as $item_kit_item) {?>
<tr>
<?php
$item_info = $this->Item->get_info($item_kit_item['item_id']);
?>
<td><a href="#" onclick='return deleteItemKitRow(this);'>X</a></td>
<td><?php echo $item_info->name; ?></td>
<td><input class='quantity' id='item_kit_item_<?php echo $item_kit_item['item_id'] ?>' type='text' size='3' name=item_kit_item[<?php echo $item_kit_item['item_id'] ?>] value='<?php echo $item_kit_item['quantity'] ?>'/></td>
</tr>
<?php } ?>
</table>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<table id="item_kit_items">
<tr>
<th><?php echo $this->lang->line('common_delete');?></th>
<th><?php echo $this->lang->line('item_kits_item');?></th>
<th><?php echo $this->lang->line('item_kits_quantity');?></th>
</tr>
<?php foreach ($this->Item_kit_items->get_info($item_kit_info->item_kit_id) as $item_kit_item) {?>
<tr>
<?php
$item_info = $this->Item->get_info($item_kit_item['item_id']);
?>
<td><a href="#" onclick='return deleteItemKitRow(this);'>X</a></td>
<td><?php echo $item_info->name; ?></td>
<td><input class='quantity' id='item_kit_item_<?php echo $item_kit_item['item_id'] ?>' type='text' class='form-control' name=item_kit_item[<?php echo $item_kit_item['item_id'] ?>] value='<?php echo $item_kit_item['quantity'] ?>'/></td>
</tr>
<?php } ?>
</table>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -91,7 +86,7 @@ $("#item").result(function(event, data, formatted)
}
else
{
$("#item_kit_items").append("<tr><td><a href='#' onclick='return deleteItemKitRow(this);'>X</a></td><td>"+data[1]+"</td><td><input class='quantity' id='item_kit_item_"+data[0]+"' type='text' size='3' name=item_kit_item["+data[0]+"] value='1'/></td></tr>");
$("#item_kit_items").append("<tr><td><a href='#' onclick='return deleteItemKitRow(this);'><span class='glyphicon glyphicon-remove'></span></a></td><td>"+data[1]+"</td><td><input class='quantity form-control' id='item_kit_item_"+data[0]+"' type='text' name=item_kit_item["+data[0]+"] value='1'/></td></tr>");
}
});
@@ -105,7 +100,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_item_kit_form_submit(response);
},
dataType:'json'
+1 -1
View File
@@ -73,7 +73,7 @@ function post_item_kit_form_submit(response)
<div id="title" class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_'.$controller_name); ?></div>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'thickbox none', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
+9 -19
View File
@@ -1,11 +1,9 @@
<?php echo form_open('items/save_inventory/'.$item_info->item_id,array('id'=>'item_form')); ?>
<fieldset id="inv_item_basic_info">
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
<table align="center" border="0" bgcolor="#CCCCCC">
<table border="0" bgcolor="#CCCCCC">
<div class="field_row clearfix">
<tr>
<td>
<td>
<?php echo form_label($this->lang->line('items_item_number').':', 'name',array('class'=>'wide')); ?>
</td>
<td>
@@ -22,10 +20,10 @@
</td>
</tr>
<tr>
<td>
<td>
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'wide')); ?>
</td>
<td>
<td>
<?php $iname = array (
'name'=>'name',
'id'=>'name',
@@ -38,10 +36,10 @@
</td>
</tr>
<tr>
<td>
<td>
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'wide')); ?>
</td>
<td>
<td>
<?php $cat = array (
'name'=>'category',
@@ -86,13 +84,7 @@
</div>
</table>
<div class="field_row clearfix">
<div class='form_field'></div>
</div>
<div class="field_row clearfix">
<div class='form_field'></div>
</div>
</fieldset>
<?php echo form_close(); ?>
@@ -106,9 +98,9 @@ foreach( $inventory_array as $row)
array_push($employee_name, $employee->first_name." ".$employee->last_name);
}
?>
<table id="inventory_result" border="0" align="center">
<table id="inventory_result" style="width:100%;">
<tr bgcolor="#FF0033" align="center" style="font-weight:bold"><td colspan="4">Inventory Data Tracking</td></tr>
<tr align="center" style="font-weight:bold"><td width="15%">Date</td><td width="25%">Employee</td><td width="15%">In/Out Qty</td><td width="45%">Remarks</td></tr>
<tr style="font-weight:bold"><td width="30%">Date</td><td width="25%">Employee</td><td width="15%">In/Out Qty</td><td width="45%">Remarks</td></tr>
</table>
<script type='text/javascript'>
@@ -141,8 +133,7 @@ function display_stock(location_id)
{
var tr = document.createElement('TR');
tr.setAttribute("bgColor","#CCCCCC");
tr.setAttribute("align","#center");
var td = document.createElement('TD');
td.appendChild(document.createTextNode(data['trans_date']));
tr.appendChild(td);
@@ -152,7 +143,6 @@ function display_stock(location_id)
tr.appendChild(td);
td = document.createElement('TD');
td.setAttribute("align","right");
td.appendChild(document.createTextNode(data['trans_inventory']));
tr.appendChild(td);
+21 -23
View File
@@ -1,30 +1,28 @@
<?php echo form_open_multipart('items/do_excel_import/',array('id'=>'item_form')); ?>
<?php echo form_open_multipart('items/do_excel_import/',array('id'=>'item_form', 'class' => 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('items_import_items_excel'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<b><a href="<?php echo site_url('items/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a></b>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line('common_import'); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_import_file_path').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_upload(array(
'name'=>'file_path',
'id'=>'file_path',
'value'=>'')
);?>
</div>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line('common_import'); ?></legend>
<div class="form-group">
<div class="col-xs-6">
<a href="<?php echo site_url('items/excel'); ?>"><?php echo $this->lang->line('common_download_import_template'); ?></a>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('common_import_file_path'), 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<label class="file">
<input type="file" id="item_image" name="file_path">
<span class="file-custom"></span>
</label>
</div>
</div>
</fieldset>
<?php
echo form_submit(array(
'name'=>'submitf',
'id'=>'submitf',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
@@ -37,7 +35,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_item_form_submit(response);
},
dataType:'json'
+386 -399
View File
@@ -1,403 +1,390 @@
<div class="modal-dialog" id="myModal" tabindex="-1" role="dialog">
<div class="modal-content">
<div class="modal-header">
<?php echo $this->lang->line("items_basic_information"); ?>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body" >
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('items/save/'.$item_info->item_id,array('id'=>'item_form', 'enctype'=>'multipart/form-data', 'data-target' => 'ajaxModal')); ?>
<fieldset id="item_basic_info">
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_item_number').':', 'item_number',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'item_number',
'class'=>'item_number',
'id'=>'item_number',
'value'=>$item_info->item_number)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'value'=>$item_info->name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'category',
'id'=>'category',
'value'=>$item_info->category)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_supplier').':', 'supplier',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_dropdown('supplier_id', $suppliers, $selected_supplier);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_cost_price').':', 'cost_price',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'cost_price',
'size'=>'8',
'id'=>'cost_price',
'value'=>$item_info->cost_price)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_unit_price').':', 'unit_price',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'unit_price',
'size'=>'8',
'id'=>'unit_price',
'value'=>$item_info->unit_price)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_tax_1').':', 'tax_percent_1',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'tax_names[]',
'id'=>'tax_name_1',
'size'=>'8',
'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name'))
);?>
</div>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'tax_percents[]',
'id'=>'tax_percent_name_1',
'size'=>'3',
'value'=> isset($item_tax_info[0]['percent']) ? $item_tax_info[0]['percent'] : $default_tax_1_rate)
);?>
%
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_tax_2').':', 'tax_percent_2',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'tax_names[]',
'id'=>'tax_name_2',
'size'=>'8',
'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name'))
);?>
</div>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'tax_percents[]',
'id'=>'tax_percent_name_2',
'size'=>'3',
'value'=> isset($item_tax_info[1]['percent']) ? $item_tax_info[1]['percent'] : $default_tax_2_rate)
);?>
%
</div>
</div>
<?php
foreach($stock_locations as $key=>$location_detail)
{
?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_quantity').' '.$location_detail['location_name'] .':',
$key.'_quantity',
array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>$key.'_quantity',
'id'=>$key.'_quantity',
'class'=>'quantity',
'size'=>'8',
'value'=>isset($item_info->item_id)?$location_detail['quantity']:0)
);?>
</div>
</div>
<?php
}
?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_receiving_quantity').':', 'receiving_quantity',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'receiving_quantity',
'id'=>'receiving_quantity',
'size'=>'8',
'value'=>$item_info->receiving_quantity)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_reorder_level').':', 'reorder_level',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'reorder_level',
'id'=>'reorder_level',
'size'=>'8',
'value'=>!isset($item_info->item_id)?0:$item_info->reorder_level)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_description').':', 'description',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'value'=>$item_info->description,
'rows'=>'5',
'cols'=>'17')
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_image').':', 'item_image',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_upload('item_image');?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_allow_alt_description').':', 'allow_alt_description',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_checkbox(array(
'name'=>'allow_alt_description',
'id'=>'allow_alt_description',
'value'=>1,
'checked'=>($item_info->allow_alt_description)? 1 :0)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_is_serialized').':', 'is_serialized',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_checkbox(array(
'name'=>'is_serialized',
'id'=>'is_serialized',
'value'=>1,
'checked'=>($item_info->is_serialized)? 1 : 0)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_is_deleted').':', 'is_deleted',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_checkbox(array(
'name'=>'is_deleted',
'id'=>'is_deleted',
'value'=>1,
'checked'=>($item_info->deleted)? 1 : 0)
);?>
</div>
</div>
<?php for ($i = 0; $i < 11; $i++)
{
?>
<?php
if($this->config->item('custom'.$i.'_name') != null)
{
$item_arr = (array)$item_info;
?>
<div class="field_row clearfix">
<?php echo form_label($this->config->item('custom'.$i.'_name').':', 'custom'.$i,array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'custom'.$i,
'id'=>'custom'.$i,
'value'=>$item_arr['custom'.$i])
);?>
</div>
</div>
<?php
}
}
?>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
echo form_submit(array(
'name'=>'continue',
'id'=>'continue',
'value'=>$this->lang->line('common_new'),
'class'=>'btn btn-default btn-sm pull-right',
'style'=>'margin-right: 10px;')
);
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
//validation and submit handling
$(document).ready(function()
{
$("#continue").click(function()
{
stay_open = true;
});
$("#submit").click(function()
{
stay_open = false;
});
var no_op = function(event, data, formatted){};
$("#category").autocomplete("<?php echo site_url('items/suggest_category');?>",{max:100,minChars:0,delay:10}).result(no_op).search();
<?php for ($i = 0; $i < 11; $i++)
{
?>
$("#custom"+<?php echo $i; ?>).autocomplete("<?php echo site_url('items/suggest_custom'.$i);?>",{max:100,minChars:0,delay:10}).result(no_op).search();
<?php
}
?>
$.validator.addMethod("item_number", function(value, element)
{
return JSON.parse($.ajax(
{
type: 'POST',
url: '<?php echo site_url($controller_name . "/check_item_number")?>',
data: {'item_id' : '<?php echo $item_info->item_id; ?>', 'item_number' : $(element).val() },
success: function(response)
{
success=response.success;
},
async:false,
dataType: 'json'
}).responseText).success;
}, '<?php echo $this->lang->line("items_item_number_duplicate"); ?>');
$('#item_form').validate({
submitHandler:function(form)
{
var $form = $(form);
var $target = $(".modal");
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
dataType: 'json',
success: function(response, status) {
if (stay_open)
{
// set action of item_form to url without item id, so a new one can be created
$("#item_form").attr("action", "<?php echo site_url("items/save/")?>");
// use a whitelist of fields to minimize unintended side effects
$(':text, :password, :file, #description, #item_form').not('.quantity, #reorder_level, #tax_name_1,' +
'#tax_percent_name_1, #reference_number, #name, #cost_price, #unit_price, #taxed_cost_price, #taxed_unit_price').val('');
// de-select any checkboxes, radios and drop-down menus
$(':input', '#item_form').not('#item_category_id').removeAttr('checked').removeAttr('selected');
}
else
{
$target.modal('hide');
}
post_item_form_submit(response, stay_open);
}
});
event.preventDefault();
},
errorLabelContainer: "#error_message_box",
wrapper: "li",
rules:
{
name:"required",
category:"required",
item_number: { item_number: true },
cost_price:
{
required:true,
number:true
},
unit_price:
{
required:true,
number:true
},
tax_percent:
{
required:true,
number:true
},
reorder_level:
{
required:true,
number:true
}
},
messages:
{
name:"<?php echo $this->lang->line('items_name_required'); ?>",
category:"<?php echo $this->lang->line('items_category_required'); ?>",
cost_price:
{
required:"<?php echo $this->lang->line('items_cost_price_required'); ?>",
number:"<?php echo $this->lang->line('items_cost_price_number'); ?>"
},
unit_price:
{
required:"<?php echo $this->lang->line('items_unit_price_required'); ?>",
number:"<?php echo $this->lang->line('items_unit_price_number'); ?>"
},
tax_percent:
{
required:"<?php echo $this->lang->line('items_tax_percent_required'); ?>",
number:"<?php echo $this->lang->line('items_tax_percent_number'); ?>"
},
reorder_level:
{
required:"<?php echo $this->lang->line('items_reorder_level_required'); ?>",
number:"<?php echo $this->lang->line('items_reorder_level_number'); ?>"
}
}
});
});
</script>
<?php echo form_open('items/save/'.$item_info->item_id,array('id'=>'item_form', 'enctype'=>'multipart/form-data', 'class' => 'form-horizontal')); ?>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
<div class="form-group">
<?php echo form_label($this->lang->line('items_item_number'), 'item_number',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'item_number',
'class'=>'item_number',
'id'=>'item_number',
'class'=>'form-control',
'value'=>$item_info->item_number)
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_name'), 'name',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name',
'class'=>'form-control',
'value'=>$item_info->name)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_category'), 'category',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'category',
'id'=>'category',
'class'=>'form-control',
'value'=>$item_info->category)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_supplier'), 'supplier',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_dropdown('supplier_id', $suppliers, $selected_supplier, 'class="form-control"');?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_cost_price'), 'cost_price',array('class'=>'required control-label col-xs-3')); ?>
<div class="col-xs-3">
<div class="input-group">
<span class="input-group-addon">$</span>
<?php echo form_input(array(
'name'=>'cost_price',
'id'=>'cost_price',
'class'=>'form-control',
'value'=>$item_info->cost_price)
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_unit_price'), 'unit_price',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-3'>
<div class="input-group">
<span class="input-group-addon"><?php echo $this->config->item('currency_symbol'); ?></span>
<?php echo form_input(array(
'name'=>'unit_price',
'id'=>'unit_price',
'class'=>'form-control',
'value'=>$item_info->unit_price)
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_tax_1'), 'tax_percent_1',array('class'=>'wide control-label col-xs-3')); ?>
<div class='col-sm-3'>
<?php echo form_input(array(
'name'=>'tax_names[]',
'id'=>'tax_name_1',
'class'=>'form-control',
'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name'))
);?>
</div>
<div class="col-sm-2 input-group">
<?php echo form_input(array(
'name'=>'tax_percents[]',
'id'=>'tax_percent_name_1',
'class'=>'form-control',
'value'=> isset($item_tax_info[0]['percent']) ? $item_tax_info[0]['percent'] : $default_tax_1_rate)
);?>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_tax_2'), 'tax_percent_2',array('class'=>'wide control-label col-xs-3')); ?>
<div class='col-sm-3'>
<?php echo form_input(array(
'name'=>'tax_names[]',
'id'=>'tax_name_2',
'class'=>'form-control',
'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name'))
);?>
</div>
<div class="col-sm-2 input-group">
<?php echo form_input(array(
'name'=>'tax_percents[]',
'class'=>'form-control',
'id'=>'tax_percent_name_2',
'value'=> isset($item_tax_info[1]['percent']) ? $item_tax_info[1]['percent'] : $default_tax_2_rate)
);?>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<?php
foreach($stock_locations as $key=>$location_detail)
{
?>
<div class="form-group">
<?php echo form_label($this->lang->line('items_quantity').' '.$location_detail['location_name'] ,
$key.'_quantity',
array('class'=>'required wide control-label col-xs-3')); ?>
<div class='col-xs-2'>
<?php echo form_input(array(
'name'=>$key.'_quantity',
'id'=>$key.'_quantity',
'class'=>'quantity form-control',
'value'=>isset($item_info->item_id)?$location_detail['quantity']:0)
);?>
</div>
</div>
<?php
}
?>
<div class="form-group">
<?php echo form_label($this->lang->line('items_receiving_quantity'), 'receiving_quantity',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-2'>
<?php echo form_input(array(
'name'=>'receiving_quantity',
'id'=>'receiving_quantity',
'class'=>'form-control',
'value'=>$item_info->receiving_quantity)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_reorder_level'), 'reorder_level',array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-2'>
<?php echo form_input(array(
'name'=>'reorder_level',
'id'=>'reorder_level',
'class'=>'form-control',
'value'=>!isset($item_info->item_id)?0:$item_info->reorder_level)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_description'), 'description',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'class'=>'form-control',
'value'=>$item_info->description)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_image'), 'item_image',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<label class="file">
<input type="file" id="item_image">
<span class="file-custom"></span>
</label>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_allow_alt_description'), 'allow_alt_description',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'allow_alt_description',
'id'=>'allow_alt_description',
'value'=>1,
'checked'=>($item_info->allow_alt_description)? 1 :0)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_is_serialized'), 'is_serialized',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'is_serialized',
'id'=>'is_serialized',
'value'=>1,
'checked'=>($item_info->is_serialized)? 1 : 0)
);?>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_is_deleted'), 'is_deleted',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name'=>'is_deleted',
'id'=>'is_deleted',
'value'=>1,
'checked'=>($item_info->deleted)? 1 : 0)
);?>
</div>
</div>
<?php for ($i = 0; $i < 11; $i++)
{
?>
<?php
if($this->config->item('custom'.$i.'_name') != null)
{
$item_arr = (array)$item_info;
?>
<div class="form-group">
<?php echo form_label($this->config->item('custom'.$i.'_name'), 'custom'.$i,array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'custom'.$i,
'id'=>'custom'.$i,
'class'=>'form-control',
'value'=>$item_arr['custom'.$i])
);?>
</div>
</div>
<?php
}
}
?>
</fieldset>
<?php echo form_close(); ?>
<script type='text/javascript'>
//validation and submit handling
$(document).ready(function()
{
$("#continue").click(function()
{
stay_open = true;
});
$("#submit").click(function()
{
stay_open = false;
});
var no_op = function(event, data, formatted){};
$("#category").autocomplete("<?php echo site_url('items/suggest_category');?>",{max:100,minChars:0,delay:10}).result(no_op).search();
<?php for ($i = 0; $i < 11; $i++)
{
?>
$("#custom"+<?php echo $i; ?>).autocomplete("<?php echo site_url('items/suggest_custom'.$i);?>",{max:100,minChars:0,delay:10}).result(no_op).search();
<?php
}
?>
$.validator.addMethod("item_number", function(value, element)
{
return JSON.parse($.ajax(
{
type: 'POST',
url: '<?php echo site_url($controller_name . "/check_item_number")?>',
data: {'item_id' : '<?php echo $item_info->item_id; ?>', 'item_number' : $(element).val() },
success: function(response)
{
success=response.success;
},
async:false,
dataType: 'json'
}).responseText).success;
}, '<?php echo $this->lang->line("items_item_number_duplicate"); ?>');
$('#item_form').validate({
submitHandler:function(form, event)
{
var stay_open = dialog_support.clicked_id() != 'submit';
var $form = $(form);
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
dataType: 'json',
success: function(response, status) {
if (stay_open)
{
// set action of item_form to url without item id, so a new one can be created
$("#item_form").attr("action", "<?php echo site_url("items/save/")?>");
// use a whitelist of fields to minimize unintended side effects
$(':text, :password, :file, #description, #item_form').not('.quantity, #reorder_level, #tax_name_1,' +
'#tax_percent_name_1, #reference_number, #name, #cost_price, #unit_price, #taxed_cost_price, #taxed_unit_price').val('');
// de-select any checkboxes, radios and drop-down menus
$(':input', '#item_form').not('#item_category_id').removeAttr('checked').removeAttr('selected');
}
else
{
dialog_support.hide();
}
post_item_form_submit(response, stay_open);
}
});
event.preventDefault();
},
errorLabelContainer: "#error_message_box",
wrapper: "li",
rules:
{
name:"required",
category:"required",
item_number: { item_number: true },
cost_price:
{
required:true,
number:true
},
unit_price:
{
required:true,
number:true
},
tax_percent:
{
required:true,
number:true
},
reorder_level:
{
required:true,
number:true
}
},
messages:
{
name:"<?php echo $this->lang->line('items_name_required'); ?>",
category:"<?php echo $this->lang->line('items_category_required'); ?>",
cost_price:
{
required:"<?php echo $this->lang->line('items_cost_price_required'); ?>",
number:"<?php echo $this->lang->line('items_cost_price_number'); ?>"
},
unit_price:
{
required:"<?php echo $this->lang->line('items_unit_price_required'); ?>",
number:"<?php echo $this->lang->line('items_unit_price_number'); ?>"
},
tax_percent:
{
required:"<?php echo $this->lang->line('items_tax_percent_required'); ?>",
number:"<?php echo $this->lang->line('items_tax_percent_number'); ?>"
},
reorder_level:
{
required:"<?php echo $this->lang->line('items_reorder_level_required'); ?>",
number:"<?php echo $this->lang->line('items_reorder_level_number'); ?>"
}
}
});
});
</script>
+1 -1
View File
@@ -171,7 +171,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_bulk_form_submit(response);
},
dataType:'json'
+36 -58
View File
@@ -3,15 +3,10 @@
<?php echo form_open('items/save_inventory/'.$item_info->item_id,array('id'=>'item_form')); ?>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
<table align="center" border="0" bgcolor="#CCCCCC">
<div class="field_row clearfix">
<tr>
<td>
<?php echo form_label($this->lang->line('items_item_number').':', 'name',array('class'=>'wide')); ?>
</td>
<td>
<div class="form_field">
<?php $inumber = array (
'name'=>'item_number',
'id'=>'item_number',
@@ -19,16 +14,14 @@
'style' => 'border:none',
'readonly' => 'readonly'
);
echo form_input($inumber);
?>
</td>
</tr>
<tr>
<td>
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'wide')); ?>
</td>
<td>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<?php $iname = array (
'name'=>'name',
'id'=>'name',
@@ -36,60 +29,53 @@
'style' => 'border:none',
'readonly' => 'readonly'
);
echo form_input($iname);
?>
</td>
</tr>
<tr>
<td>
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'wide')); ?>
</td>
<td>
echo form_input($iname);
?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'wide')); ?>
<div class='form_field'>
<?php $cat = array (
'name'=>'category',
'id'=>'category',
'value'=>$item_info->category,
'style' => 'border:none',
'readonly' => 'readonly'
);
echo form_input($cat);
?>
</td>
</tr>
<tr>
<td>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_stock_location').':', 'stock_location',array('class'=>'wide')); ?>
</td>
<td>
<?php
echo form_dropdown('stock_location',$stock_locations,current($stock_locations),'onchange="fill_quantity(this.value)"');
?>
</td>
</tr>
<tr>
<td>
<div class='form_field'>
<?php
echo form_dropdown('stock_location',$stock_locations,current($stock_locations),'onchange="fill_quantity(this.value)"');
?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_current_quantity').':', 'quantity',array('class'=>'wide')); ?>
</td>
<td>
<div class='form_field'>
<?php $qty = array (
'name'=>'quantity',
'id'=>'quantity',
'value'=>current($item_quantities),
'style' => 'border:none',
'readonly' => 'readonly'
);
echo form_input($qty);
?>
</td>
</tr>
</div>
</table>
</div>
</div>
<div class="field_row clearfix">
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_add_minus').':', 'quantity',array('class'=>'required wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
@@ -100,25 +86,17 @@
</div>
</div>
<div class="field_row clearfix">
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_inventory_comments').':', 'description',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_textarea(array(
'name'=>'trans_comment',
'id'=>'trans_comment',
'rows'=>'3',
'cols'=>'17')
'cols'=>'17')
);?>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -133,7 +111,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_item_form_submit(response);
},
dataType:'json'
+20 -2
View File
@@ -166,6 +166,24 @@ function init_table_sorting()
}
}
var item_details = function(url, title) {
return BootstrapDialog.show({
title: title,
message: $('<div></div>').load(url),
buttons: [{
id: 'submit',
label: '<?php echo $this->lang->line('common_submit'); ?>',
action: dialog_support.submit('submit')
}, {
id: 'new',
label: '<?php echo $this->lang->line('common_new'); ?>',
action: dialog_support.submit('new')
}]
});
};
function post_item_form_submit(response)
{
if(!response.success)
@@ -214,11 +232,11 @@ function post_bulk_form_submit(response)
<div id="title" class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_'.$controller_name); ?></div>
<?php echo anchor("$controller_name/excel_import/width:$form_width",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line('common_import_excel') . "</span></div>",
array('class'=>'thickbox none', 'title'=>'Import Items from Excel'));
array('class'=>'modal-dlg none', 'title'=>'Import Items from Excel'));
?>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
"<div class='btn btn-info btn-sm pull-right' style='margin-right: 10px;'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'thickbox none', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>'modal-dlg', 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
+1 -1
View File
@@ -5,7 +5,7 @@
<base href="<?php echo base_url();?>" />
<title>Open Source Point Of Sale <?php echo $this->lang->line('login_login'); ?></title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
<script type="text/javascript">
+1 -2
View File
@@ -23,7 +23,6 @@
<script src="bower_components/jquery-validate/dist/jquery.validate.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.js"></script>
<script src="bower_components/swfobject/swfobject/swfobject.js"></script>
<script src="bower_components/thickbox/thickbox.js"></script>
<script src="bower_components/tablesorter/dist/js/jquery.tablesorter.combined.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js"></script>
@@ -44,7 +43,7 @@
<!-- end js template tags -->
<?php else : ?>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d847fd4fb1" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=0c1bada54f" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>
+83 -71
View File
@@ -1,139 +1,151 @@
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_first_name').':', 'first_name',array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_first_name'), 'first_name',array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'first_name',
'id'=>'first_name',
'class'=>'form-control',
'value'=>$person_info->first_name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_last_name').':', 'last_name',array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_last_name'), 'last_name',array('class'=>'required control-label required col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'last_name',
'id'=>'last_name',
'class'=>'form-control',
'value'=>$person_info->last_name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_gender').':', 'gender',
!empty($basic_version) ? array('class'=>'required') : array()); ?>
<div class='form_field'>
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>1,
'checked'=>$person_info->gender === '1')
);
echo '&nbsp;' . $this->lang->line('common_gender_male') . '&nbsp;';
echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>0,
'checked'=>$person_info->gender === '0')
);
echo '&nbsp;' . $this->lang->line('common_gender_female');
?>
<div class="form-group">
<?php echo form_label($this->lang->line('common_gender'), 'gender',
!empty($basic_version) ? array('class'=>'control-label required col-xs-3') : array('class' => 'control-label col-xs-3')); ?>
<div class="col-xs-4">
<label class="radio-inline">
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>1,
'checked'=>$person_info->gender === '1')
);
?> <?php echo $this->lang->line('common_gender_male'); ?>
</label>
<label class="radio-inline">
<?php echo form_radio(array(
'name'=>'gender',
'type'=>'radio',
'id'=>'gender',
'value'=>0,
'checked'=>$person_info->gender === '0')
); ?> <?php echo $this->lang->line('common_gender_female'); ?>
</label>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_email').':', 'email'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_email'), 'email', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'email',
'id'=>'email',
'class'=>'form-control',
'value'=>$person_info->email)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_phone_number').':', 'phone_number'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_phone_number'), 'phone_number', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'phone_number',
'id'=>'phone_number',
'class'=>'form-control',
'value'=>$person_info->phone_number));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_address_1').':', 'address_1'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_address_1'), 'address_1', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'address_1',
'id'=>'address_1',
'class'=>'form-control',
'value'=>$person_info->address_1));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_address_2').':', 'address_2'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_address_2'), 'address_2', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'address_2',
'id'=>'address_2',
'class'=>'form-control',
'value'=>$person_info->address_2));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_city').':', 'city'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_city'), 'city', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'city',
'id'=>'city',
'class'=>'form-control',
'value'=>$person_info->city));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_state').':', 'state'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_state'), 'state', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'state',
'id'=>'state',
'class'=>'form-control',
'value'=>$person_info->state));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_zip').':', 'zip'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_zip'), 'zip', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'zip',
'id'=>'postcode',
'class'=>'form-control',
'value'=>$person_info->zip));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_country').':', 'country'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_country'), 'country', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'country',
'id'=>'country',
'class'=>'form-control',
'value'=>$person_info->country));?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('common_comments').':', 'comments'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('common_comments'), 'comments', array('class' => 'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_textarea(array(
'name'=>'comments',
'id'=>'comments',
'value'=>$person_info->comments,
'rows'=>'5',
'cols'=>'17')
);?>
'class'=>'form-control',
'value'=>$person_info->comments
));?>
</div>
</div>
@@ -143,29 +155,29 @@ $(document).ready(function()
{
nominatim.init({
fields : {
postcode : {
dependencies : ["postcode", "city", "state", "country"],
response : {
field : 'postalcode',
format: ["postcode", "village|town|hamlet|city_district|city", "state", "country"]
postcode : {
dependencies : ["postcode", "city", "state", "country"],
response : {
field : 'postalcode',
format: ["postcode", "village|town|hamlet|city_district|city", "state", "country"]
}
},
city : {
dependencies : ["postcode", "city", "state", "country"],
response : {
format: ["postcode", "village|town|hamlet|city_district|city", "state", "country"]
dependencies : ["postcode", "city", "state", "country"],
response : {
format: ["postcode", "village|town|hamlet|city_district|city", "state", "country"]
}
},
state : {
dependencies : ["state", "country"]
},
country : {
dependencies : ["state", "country"]
dependencies : ["state", "country"]
}
},
language : '<?php echo $this->config->item('language');?>'
});
+2 -2
View File
@@ -64,7 +64,7 @@ function post_person_form_submit(response)
?>
<?php echo anchor("$controller_name/excel_import/width:$form_width",
"<div class='btn btn-info btn-sm pull-right''><span>" . $this->lang->line('common_import_excel') . "</span></div>",
array('class'=>'thickbox none', 'title'=>'Import Items from Excel'));
array('class'=>'modal-dlg none', 'title'=>'Import Items from Excel'));
?>
<?php
}
@@ -72,7 +72,7 @@ function post_person_form_submit(response)
<?php echo anchor("$controller_name/view/-1/width:$form_width",
"<div class='btn btn-info btn-sm pull-right' style='margin-right: 10px;'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'thickbox none', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
+2 -2
View File
@@ -120,7 +120,7 @@ $(document).ready(function()
$(this).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown) {
@@ -161,7 +161,7 @@ $(document).ready(function()
{
if (confirm('<?php echo $this->lang->line("recvs_delete_confirmation"); ?>'))
{
tb_remove();
dialog_support.hide();
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
var $element = get_table_row(id).parent().parent();
$element.find("td").animate({backgroundColor:"green"},1200,"linear")
+2 -2
View File
@@ -53,7 +53,7 @@ if(isset($error))
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-sm btn-info'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
array('class'=>'modal-dlg none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
<?php echo form_close(); ?>
@@ -207,7 +207,7 @@ if(isset($error))
<h3 style="margin: 5px 0 5px 0"><?php echo $this->lang->line('common_or'); ?></h3>
<?php echo anchor("suppliers/view/-1/width:400",
"<div class='btn btn-sm btn-info' style='margin:0 auto;'><span>".$this->lang->line('recvs_new_supplier')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('recvs_new_supplier')));
array('class'=>'modal-dlg none','title'=>$this->lang->line('recvs_new_supplier')));
?>
</div>
<div class="clearfix">&nbsp;</div>
@@ -108,7 +108,7 @@ else
update_sortable_table();
animate_row(row);
row.find("a.expand").click(expand_handler).text(sign);
tb_init(row.find("a.thickbox"));
dialog_support.init(row.find("a.modal"));
});
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
}
+3 -3
View File
@@ -83,7 +83,7 @@ $(document).ready(function()
if (confirm("<?php echo $this->lang->line('sales_invoice_confirm') . ' ' . $sale_info['email'] ?>")) {
$.get('<?=site_url() . "/sales/send_invoice/" . $sale_info['sale_id']?>',
function(response) {
tb_remove();
dialog_support.hide();
post_form_submit(response);
}, "json"
);
@@ -202,7 +202,7 @@ $(document).ready(function()
{
success: function(response)
{
tb_remove();
dialog_support.hide();
post_form_submit(response);
},
error: function(jqXHR, textStatus, errorThrown)
@@ -246,7 +246,7 @@ $(document).ready(function()
$(this).ajaxSubmit({
success: function(response)
{
tb_remove();
dialog_support.hide();
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
var $element = get_table_row(id).parent().parent();
$element.find("td").animate({backgroundColor:"green"},1200,"linear")
+3 -3
View File
@@ -46,7 +46,7 @@ if (isset($success))
<?php echo anchor("sales/suspended/width:425",
"<div class='btn btn-default btn-sm' id='show_suspended_sales_button'><span>".$this->lang->line('sales_suspended_sales')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_suspended_sales')));
array('class'=>'modal-dlg none','title'=>$this->lang->line('sales_suspended_sales')));
?>
<?php echo form_close(); ?>
@@ -60,7 +60,7 @@ if (isset($success))
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-info btn-sm'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
array('class'=>'modal-dlg none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
<?php echo form_close(); ?>
@@ -229,7 +229,7 @@ if (isset($success))
<h3 style="margin: 5px 0 5px 0"><?php echo $this->lang->line('common_or'); ?></h3>
<?php echo anchor("customers/view/-1/width:400",
"<div class='btn btn-sm btn-info' style='margin:0 auto;'><span>".$this->lang->line('sales_new_customer')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_customer')));
array('class'=>'modal-dlg none','title'=>$this->lang->line('sales_new_customer')));
?>
</div>
+14 -19
View File
@@ -1,50 +1,45 @@
<?php echo form_open('suppliers/save/'.$person_info->person_id,array('id'=>'supplier_form')); ?>
<?php echo form_open('suppliers/save/'.$person_info->person_id,array('id'=>'supplier_form', 'class' => 'form-horizontal')); ?>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<fieldset id="supplier_basic_info">
<legend><?php echo $this->lang->line("suppliers_basic_information"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_company_name').':', 'company_name', array('class'=>'required')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_company_name'), 'company_name', array('class'=>'required control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'company_name',
'id'=>'company_name_input',
'class'=>'form-control',
'value'=>$person_info->company_name)
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_agency_name').':', 'agency_name'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_agency_name'), 'agency_name', array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'agency_name',
'id'=>'agency_name_input',
'class'=>'form-control',
'value'=>$person_info->agency_name)
);?>
</div>
</div>
<?php $this->load->view("people/form_basic_info"); ?>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('suppliers_account_number').':', 'account_number'); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('suppliers_account_number'), 'account_number', array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'account_number',
'id'=>'account_number',
'class'=>'form-control',
'value'=>$person_info->account_number)
);?>
</div>
</div>
<?php
echo form_submit(array(
'name'=>'submit',
'id'=>'submit',
'value'=>$this->lang->line('common_submit'),
'class'=>'btn btn-primary btn-sm pull-right')
);
?>
</fieldset>
<?php echo form_close(); ?>
@@ -58,7 +53,7 @@ $(document).ready(function()
$(form).ajaxSubmit({
success:function(response)
{
tb_remove();
dialog_support.hide();
post_person_form_submit(response);
},
dataType:'json'
+1 -1
View File
@@ -61,7 +61,7 @@ function post_person_form_submit(response)
<div id="title" class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_'.$controller_name); ?></div>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'thickbox none', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
-1
View File
@@ -31,7 +31,6 @@
"jquery": "~1.12.0",
"jquery-ui": "1.11.4",
"swfobject": "*",
"thickbox": "~3.1.2",
"tablesorter": "jquery.tablesorter#^2.20.1",
"bootstrap3-dialog": "bootstrap-dialog#^1.34.9",
"jasny-bootstrap": "^3.1.3",
+4 -12
View File
@@ -1,19 +1,13 @@
.field_row
{
margin: 0 0 10px 0;
}
.field_row label
.field_row label
{
float:left;
width:100px;
width:20%;
text-align:left;
line-height:2.3;
}
.field_row label.wide
{
width:150px;
width:30%;
}
label.required
@@ -25,12 +19,10 @@ label.required
{
float:left;
padding: 3px;
background-color: #f2f2f2;
}
.form_field input, .form_field textarea
{
border: 1px solid #ccc;
padding: 4px;
}
@@ -49,7 +41,7 @@ input
padding: 3px;
}
.clearfix:after
.clearfix:after
{
content: ".";
display: block;
+5 -1
View File
@@ -5,7 +5,6 @@
@import url(receipt.css);
@import url(reports.css);
@import url(tables.css);
@import url(thickbox.css);
@import url(invoice.css);
html, body
@@ -200,4 +199,9 @@ a.rollover img
{
display: none !important;
}
}
.modal-body {
max-height: calc(100vh - 212px);
overflow-y: auto;
}
-165
View File
@@ -1,165 +0,0 @@
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
*{padding: 0; margin: 0;}
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
#TB_window {
font: 12px Arial, Helvetica, sans-serif;
color: #333333;
}
#TB_secondLine {
font: 10px Arial, Helvetica, sans-serif;
color:#666666;
}
#TB_window a:link {color: #666666;}
#TB_window a:visited {color: #666666;}
#TB_window a:hover {color: #000;}
#TB_window a:active {color: #666666;}
#TB_window a:focus{color: #666666;}
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
#TB_overlay {
position: fixed;
z-index:100;
top: 0px;
left: 0px;
height:100%;
width:100%;
}
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
.TB_overlayBG {
background-color:#000;
filter:alpha(opacity=75);
-moz-opacity: 0.75;
opacity: 0.75;
}
* html #TB_overlay { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
#TB_window {
position: fixed;
background: #ffffff;
z-index: 102;
color:#000000;
display:none;
border: 4px solid #525252;
text-align:left;
bottom:10%;
left:50%;
}
* html #TB_window { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}
#TB_window img#TB_Image {
display:block;
margin: 15px 0 0 15px;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-top: 1px solid #666;
border-left: 1px solid #666;
}
#TB_caption{
height:25px;
padding:7px 30px 10px 25px;
float:left;
}
#TB_closeWindow{
height:25px;
padding:11px 25px 10px 0;
float:right;
}
#TB_closeAjaxWindow{
padding:7px 10px 5px 0;
margin-bottom:1px;
text-align:right;
float:right;
}
#TB_ajaxWindowTitle{
float:left;
padding:7px 0 5px 10px;
margin-bottom:1px;
}
#TB_title{
background-color:#e8e8e8;
font-size:1.25em;
font-weight:bold;
height:27px;
}
#TB_ajaxContent{
clear:both;
padding:2px 15px 15px 15px;
overflow:auto;
text-align:left;
line-height:1.4em;
}
#TB_ajaxContent.TB_modal{
padding:15px;
}
#TB_ajaxContent p{
padding:5px 0px 5px 0px;
}
#TB_load{
position: fixed;
display:none;
height:13px;
width:208px;
z-index:103;
top: 50%;
left: 50%;
margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */
}
* html #TB_load { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}
#TB_HideSelect{
z-index:99;
position:fixed;
top: 0;
left: 0;
background-color:#fff;
border:none;
filter:alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
height:100%;
width:100%;
}
* html #TB_HideSelect { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
#TB_iframeContent{
clear:both;
border:none;
margin-bottom:-1px;
margin-top:1px;
_margin-bottom:1px;
}
+56 -320
View File
@@ -43057,324 +43057,7 @@ if(ac){if(/\?/.test(ac)){ac=ac.split("?")[1]}if(ad==null){return N(ac)}var ab=ac
return $.tablesorter;
}));
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage = "images/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
//on page load call tb_init
$(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
$(domChunk).click(function(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
return false;
});
}
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove);
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove);
}
}
if(tb_detectMacXFF()){
$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
}else{
$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
$('#TB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
TB_PrevCaption = "";
TB_PrevURL = "";
TB_PrevHTML = "";
TB_NextCaption = "";
TB_NextURL = "";
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
if(imageGroup){
TB_TempArray = $("a[@rel="+imageGroup+"]").get();
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if (!(TB_TempArray[TB_Counter].href == url)) {
if (TB_FoundURL) {
TB_NextCaption = TB_TempArray[TB_Counter].title;
TB_NextURL = TB_TempArray[TB_Counter].href;
TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[TB_Counter].href;
TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
}
} else {
TB_FoundURL = true;
TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
$("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML === "")) {
function goPrev(){
if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
$("#TB_prev").click(goPrev);
}
if (!(TB_NextHTML === "")) {
function goNext(){
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
$("#TB_next").click(goNext);
}
document.onkeydown = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
} else if(keycode == 190){ // display previous image
if(!(TB_NextHTML == "")){
document.onkeydown = "";
goNext();
}
} else if(keycode == 188){ // display next image
if(!(TB_PrevHTML == "")){
document.onkeydown = "";
goPrev();
}
}
};
tb_position();
$("#TB_load").remove();
$("#TB_ImageOff").click(tb_remove);
$("#TB_window").css({display:"block"}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html
var queryString = url.replace(/^[^\?]+\??/,'');
var params = tb_parseQuery( queryString );
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
ajaxContentW = TB_WIDTH - 30;
ajaxContentH = TB_HEIGHT - 45;
if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
urlNoQuery = url.split('TB_');
$("#TB_iframeContent").remove();
if(params['modal'] != "true"){//iframe no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
}else{//iframe modal
$("#TB_overlay").unbind();
$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
}
}else{// not an iframe, ajax
if($("#TB_window").css("display") != "block"){
if(params['modal'] != "true"){//ajax no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{//ajax modal
$("#TB_overlay").unbind();
$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
}
}else{//this means the window is already up, we are just loading new content via ajax
$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#TB_ajaxContent")[0].scrollTop = 0;
$("#TB_ajaxWindowTitle").html(caption);
}
}
$("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
$("#TB_window").unload(function () {
$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
if($.browser.safari){//safari needs help because it will not fire iframe onload
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
}else{
$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
$("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
$("#TB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
function tb_remove() {
$("#TB_imageOff").unbind("click");
$("#TB_closeWindowButton").unbind("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
}
function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
function tb_detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
};/**
;/**
* Ajax Queue Plugin
*
* Homepage: http://jquery.com/plugins/project/ajaxqueue
@@ -44835,7 +44518,7 @@ function do_search(show_feedback,on_complete)
$('#search').removeClass("ac_loading");
//$('#spinner').hide();
//re-init elements in new table, as table tbody children were replaced
tb_init('#sortable_table a.thickbox');
dialog_support.init('#sortable_table a.modal-dlg');
$('#pagination').html(response.pagination);
$('#sortable_table tbody :checkbox').click(checkbox_click);
$("#select_all").attr('checked',false);
@@ -45083,7 +44766,7 @@ function reinit_row(checkbox_id)
enable_row_selection(new_row);
//Re-init some stuff as we replaced row
update_sortable_table();
tb_init(new_row.find("a.thickbox"));
dialog_support.init(new_row.find("a.modal-dlg"));
//re-enable e-mail
new_checkbox.click(checkbox_click);
}
@@ -45133,6 +44816,59 @@ function get_visible_checkbox_ids()
});
return row_ids;
}
dialog_support = (function() {
var btn_id, dialog_ref;
var hide = function() {
debugger;;
dialog_ref.close();
};
var clicked_id = function() {
return btn_id;
};
var submit = function(button_id) {
btn_id = button_id;
return function(dlog_ref)
{
dialog_ref = dlog_ref;
$('form', dlog_ref.$modalBody).submit();
}
};
var init = function(selector) {
$(selector).click(function(event) {
var $link = $(event.target);
$link = $link.is("a") ? $link : $link.parents("a");
BootstrapDialog.show({
title: $link.attr('title'),
message: $('<div></div>').load($link.attr('href')),
buttons: [{
id: 'submit',
label: 'submit',
action: submit('submit')
}]
});
event.preventDefault();
});
};
$(document).ready(function() {
init("a.modal-dlg");
});
return {
hide: hide,
clicked_id: clicked_id,
init: init,
submit: submit
};
})();
;(function($) {
function http_s(url)
+22 -22
View File
File diff suppressed because one or more lines are too long.
-318
View File
@@ -43057,321 +43057,3 @@ if(ac){if(/\?/.test(ac)){ac=ac.split("?")[1]}if(ad==null){return N(ac)}var ab=ac
return $.tablesorter;
}));
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage = "images/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
//on page load call tb_init
$(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
$(domChunk).click(function(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
return false;
});
}
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove);
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove);
}
}
if(tb_detectMacXFF()){
$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
}else{
$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
$('#TB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
TB_PrevCaption = "";
TB_PrevURL = "";
TB_PrevHTML = "";
TB_NextCaption = "";
TB_NextURL = "";
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
if(imageGroup){
TB_TempArray = $("a[@rel="+imageGroup+"]").get();
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if (!(TB_TempArray[TB_Counter].href == url)) {
if (TB_FoundURL) {
TB_NextCaption = TB_TempArray[TB_Counter].title;
TB_NextURL = TB_TempArray[TB_Counter].href;
TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[TB_Counter].href;
TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
}
} else {
TB_FoundURL = true;
TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
$("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML === "")) {
function goPrev(){
if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
$("#TB_prev").click(goPrev);
}
if (!(TB_NextHTML === "")) {
function goNext(){
$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
$("#TB_next").click(goNext);
}
document.onkeydown = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
} else if(keycode == 190){ // display previous image
if(!(TB_NextHTML == "")){
document.onkeydown = "";
goNext();
}
} else if(keycode == 188){ // display next image
if(!(TB_PrevHTML == "")){
document.onkeydown = "";
goPrev();
}
}
};
tb_position();
$("#TB_load").remove();
$("#TB_ImageOff").click(tb_remove);
$("#TB_window").css({display:"block"}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html
var queryString = url.replace(/^[^\?]+\??/,'');
var params = tb_parseQuery( queryString );
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
ajaxContentW = TB_WIDTH - 30;
ajaxContentH = TB_HEIGHT - 45;
if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
urlNoQuery = url.split('TB_');
$("#TB_iframeContent").remove();
if(params['modal'] != "true"){//iframe no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
}else{//iframe modal
$("#TB_overlay").unbind();
$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
}
}else{// not an iframe, ajax
if($("#TB_window").css("display") != "block"){
if(params['modal'] != "true"){//ajax no modal
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{//ajax modal
$("#TB_overlay").unbind();
$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
}
}else{//this means the window is already up, we are just loading new content via ajax
$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#TB_ajaxContent")[0].scrollTop = 0;
$("#TB_ajaxWindowTitle").html(caption);
}
}
$("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
$("#TB_window").unload(function () {
$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
if($.browser.safari){//safari needs help because it will not fire iframe onload
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
}else{
$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
$("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
$("#TB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
function tb_remove() {
$("#TB_imageOff").unbind("click");
$("#TB_closeWindowButton").unbind("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
}
function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
function tb_detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
}
+55 -2
View File
@@ -89,7 +89,7 @@ function do_search(show_feedback,on_complete)
$('#search').removeClass("ac_loading");
//$('#spinner').hide();
//re-init elements in new table, as table tbody children were replaced
tb_init('#sortable_table a.thickbox');
dialog_support.init('#sortable_table a.modal-dlg');
$('#pagination').html(response.pagination);
$('#sortable_table tbody :checkbox').click(checkbox_click);
$("#select_all").attr('checked',false);
@@ -337,7 +337,7 @@ function reinit_row(checkbox_id)
enable_row_selection(new_row);
//Re-init some stuff as we replaced row
update_sortable_table();
tb_init(new_row.find("a.thickbox"));
dialog_support.init(new_row.find("a.modal-dlg"));
//re-enable e-mail
new_checkbox.click(checkbox_click);
}
@@ -387,3 +387,56 @@ function get_visible_checkbox_ids()
});
return row_ids;
}
dialog_support = (function() {
var btn_id, dialog_ref;
var hide = function() {
debugger;;
dialog_ref.close();
};
var clicked_id = function() {
return btn_id;
};
var submit = function(button_id) {
btn_id = button_id;
return function(dlog_ref)
{
dialog_ref = dlog_ref;
$('form', dlog_ref.$modalBody).submit();
}
};
var init = function(selector) {
$(selector).click(function(event) {
var $link = $(event.target);
$link = $link.is("a") ? $link : $link.parents("a");
BootstrapDialog.show({
title: $link.attr('title'),
message: $('<div></div>').load($link.attr('href')),
buttons: [{
id: 'submit',
label: 'submit',
action: submit('submit')
}]
});
event.preventDefault();
});
};
$(document).ready(function() {
init("a.modal-dlg");
});
return {
hide: hide,
clicked_id: clicked_id,
init: init,
submit: submit
};
})();
File diff suppressed because it is too large. Load diff
-161
View File
@@ -1,161 +0,0 @@
html, body {
height: 100%;
}
body {
/*padding-top: 80px;*/
}
.wrapper {
min-height: 100%;
margin-bottom: -75px;
}
.navbar {
min-height: 40px;
border-radius: 0;
}
.navbar-brand {
padding: 22px 15px;
height: 40px;
}
.topbar {
color: #eee;
font-size: 12px;
background: #182735;
padding: 5px;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #2C3E50;
background-color: #FFFFFF;
}
table.tablesorter {
border: 0;
}
table.tablesorter tbody td {
padding: 8px;
}
table.tablesorter tbody td.over {
background-color: #F5F5F5;
}
table.tablesorter tbody td.selected {
background-color: #ECECEC;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
padding: 8px;
}
#table_action_header {
height: 35px;
background-color: transparent;
border: 0;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #18BC9C;
}
#search_filter_section {
padding: 5px;
margin-bottom: 10px;
}
#titleTextImg {
background-color: transparent !important;
}
#table_action_header ul li span a {
background-color: rgba(0, 0, 0, 0);
border: 0;
color: #aaa;
}
#table_action_header ul li span a:hover {
color: #555;
}
#title,
#page_title {
font-size: 32px;
margin-top: 21px;
margin-bottom: 10.5px;
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 400;
line-height: 1.1;
color: inherit;
}
#new_button {
bottom: 5px;
}
#new_button > a {
border-width: 2px;
padding: 6px 9px;
font-size: 13px;
line-height: 1.5;
border-radius: 3px;
color: #ffffff;
background-color: #2c3e50;
border-color: #2c3e50;
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#new_button > a > .big_button {
float: none !important;
position: static;
width: auto;
height: auto;
background: none;
}
#new_button > a > .big_button > span {
position: static;
font-size: 13px;
font-weight: normal;
}
#home_module_list {
padding: 20px 0;
text-align: center;
}
.module_item {
min-width: 105px;
display: inline-block;
text-align: center;
margin-bottom: 3px;
border: 1px solid #ddd;
}
.module_item a {
display: block;
}
.navbar .menu-icon {
text-align: center;
font-size: 11px;
}
.navbar .menu-icon img {
width: 24px;
}
#feedback_bar {
top: 64px;
}
#footer {
height: 35px;
margin: 40px 0 0 0;
background: white;
padding: 10px
}
@media (min-width: 768px){
.navbar-nav > li > a {
padding: 10px 10px 9px;
}
}
+1 -1
View File
@@ -38,7 +38,7 @@
<!-- end js template tags -->
<?php else : ?>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d847fd4fb1" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=0c1bada54f" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>