Continue bootstrapification (item bulk edit, bootstrap modals)

(#116, #361)
Remove get_form_width() from controllers, add new class to define modal width
Add bootstrap validation markup to edit forms
This commit is contained in:
jekkos committed 2016-02-25 23:31:43 +01:00
1 parent 75cf2997b8
commit a9902219ae
29 files changed
+9928 -10014

No files matched your search

+1 -9
View File
@@ -11,7 +11,6 @@ class Customers extends Person_controller
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$customers = $this->Customer->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Customer, $lines_per_page, $limit_from);
@@ -210,13 +209,6 @@ class Customers extends Person_controller
echo json_encode( array('success'=>$success,'message'=>$msg) );
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 400;
}
}
?>
-8
View File
@@ -11,7 +11,6 @@ class Employees extends Person_controller
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$employees = $this->Employee->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Employee, $lines_per_page, $limit_from);
@@ -128,12 +127,5 @@ class Employees extends Person_controller
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_cannot_be_deleted')));
}
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 750;
}
}
?>
-9
View File
@@ -12,7 +12,6 @@ class Giftcards extends Secure_area implements iData_controller
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$giftcards = $this->Giftcard->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Giftcard, $lines_per_page, $limit_from);
@@ -117,13 +116,5 @@ class Giftcards extends Secure_area implements iData_controller
echo json_encode(array('success'=>false, 'message'=>$this->lang->line('giftcards_cannot_be_deleted')));
}
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 360;
}
}
?>
-9
View File
@@ -29,7 +29,6 @@ class Item_kits extends Secure_area implements iData_controller
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$item_kits = $this->Item_kit->get_all($lines_per_page, $limit_from);
@@ -186,13 +185,5 @@ class Item_kits extends Secure_area implements iData_controller
$data['barcode_config'] = $barcode_config;
$this->load->view("barcode_sheet", $data);
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 400;
}
}
?>
-8
View File
@@ -16,7 +16,6 @@ class Items extends Secure_area implements iData_controller
$stock_locations = $this->Stock_location->get_allowed_locations();
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$items = $this->Item->get_all($stock_location, $lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from);
@@ -786,12 +785,5 @@ class Items extends Secure_area implements iData_controller
echo json_encode( array('success'=>$success, 'message'=>$msg) );
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 450;
}
}
?>
-10
View File
@@ -79,16 +79,6 @@ class Sales extends Secure_area
echo $data_row;
}
/**
*
* Get the width for the add/edit form.
* @return number The form width
*/
function get_form_width()
{
return 400;
}
/*
Returns Sales table data rows. This will be called with AJAX.
*/
-9
View File
@@ -11,7 +11,6 @@ class Suppliers extends Person_controller
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$suppliers = $this->Supplier->get_all($lines_per_page);
@@ -127,13 +126,5 @@ class Suppliers extends Person_controller
$data_row=get_supplier_data_row($this->Supplier->get_info($person_id),$this);
echo $data_row;
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 360;
}
}
?>
@@ -12,6 +12,5 @@ interface iData_controller
public function view($data_item_id=-1);
public function save($data_item_id=-1);
public function delete();
public function get_form_width();
}
?>
+10 -15
View File
@@ -64,7 +64,6 @@ function get_sales_manage_sale_data_row($sale, $controller)
{
$CI =& get_instance();
$controller_name = $CI->uri->segment(1);
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.='<td width="3%"><input type="checkbox" id="sale_' . $sale['sale_id'] . '" value="' . $sale['sale_id']. '" /></td>';
@@ -77,7 +76,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'=>'modal','title'=>$CI->lang->line($controller_name.'_update')));
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'], $CI->lang->line('common_edit'),array('class'=>"modal-dlg",'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;';
@@ -167,15 +166,15 @@ function get_person_data_row($person,$controller)
{
$CI =& get_instance();
$controller_name=strtolower(get_class($CI));
$width = $controller->get_form_width();
$modal_class = $controller_name == 'employees' ? 'modal-dlg-wide' : '';
$table_data_row='<tr>';
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$person->person_id' value='".$person->person_id."'/></td>";
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$person->person_id' <value='".$person->person_id."'/></td>";
$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'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg $modal_class",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -251,7 +250,6 @@ function get_supplier_data_row($supplier,$controller)
{
$CI =& get_instance();
$controller_name=strtolower(get_class($CI));
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$supplier->person_id' value='".$supplier->person_id."'/></td>";
@@ -262,7 +260,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'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id", $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;
@@ -334,7 +332,6 @@ function get_item_data_row($item,$controller)
}
$tax_percents=substr($tax_percents, 0, -2);
$controller_name=strtolower(get_class($CI));
$width = $controller->get_form_width();
$item_quantity='';
@@ -358,10 +355,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'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-new",'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'=>'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.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id", $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", $CI->lang->line('common_det'),array('class'=>"modal-dlg",'title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='</tr>';
@@ -421,7 +418,6 @@ function get_giftcard_data_row($giftcard,$controller)
{
$CI =& get_instance();
$controller_name=strtolower(get_class($CI));
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.="<td width='3%'><input type='checkbox' id='giftcard_$giftcard->giftcard_id' value='".$giftcard->giftcard_id."'/></td>";
@@ -429,7 +425,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'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id", $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;
@@ -489,7 +485,6 @@ function get_item_kit_data_row($item_kit, $controller)
{
$CI =& get_instance();
$controller_name=strtolower(get_class($CI));
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.="<td width='3%'><input type='checkbox' id='item_kit_$item_kit->item_kit_id' value='".$item_kit->item_kit_id."'/></td>";
@@ -498,7 +493,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'=>'modal-dlg','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id", $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;
+1 -1
View File
@@ -58,7 +58,7 @@ function post_giftcard_form_submit(response)
<div id="title_bar">
<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",
<?php echo anchor("$controller_name/view/-1",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name.'_new')));
?>
+1 -1
View File
@@ -71,7 +71,7 @@ function post_item_kit_form_submit(response)
<div id="title_bar">
<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",
<?php echo anchor("$controller_name/view/-1",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
?>
+1 -1
View File
@@ -1,7 +1,7 @@
<?php echo form_open('items/save_inventory/'.$item_info->item_id,array('id'=>'item_form')); ?>
<fieldset id="inv_item_basic_info">
<table border="0" bgcolor="#CCCCCC">
<div class="field_row clearfix">
<div class="form-group">
<tr>
<td>
<?php echo form_label($this->lang->line('items_item_number').':', 'name',array('class'=>'wide')); ?>
+23 -18
View File
@@ -54,7 +54,7 @@
<div class="col-xs-3">
<div class="input-group">
<span class="input-group-addon">$</span>
<span class="input-group-addon"><?php echo $this->config->item('currency_symbol'); ?></span>
<?php echo form_input(array(
'name'=>'cost_price',
'id'=>'cost_price',
@@ -76,7 +76,7 @@
'class'=>'form-control',
'value'=>$item_info->unit_price)
);?>
</div>
</div>
</div>
</div>
@@ -90,14 +90,16 @@
'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 class="col-sm-3">
<div class="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>
@@ -112,14 +114,16 @@
'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 class="col-sm-3">
<div class="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>
@@ -327,6 +331,7 @@
event.preventDefault();
},
errorLabelContainer: "#error_message_box",
errorClass: "has-error",
wrapper: "li",
rules:
{
+111 -109
View File
@@ -1,147 +1,148 @@
<div id="required_fields_message"><?php echo $this->lang->line('items_edit_fields_you_want_to_update'); ?></div>
<ul id="error_message_box" class="error_message_box"></ul>
<?php echo form_open('items/bulk_update/',array('id'=>'item_form')); ?>
<?php echo form_open('items/bulk_update/',array('id'=>'item_form', 'class'=>'form-horizontal')); ?>
<fieldset id="item_basic_info">
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('items_name'), 'name',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'name',
'id'=>'name')
'id'=>'name',
'class'=>'form-control')
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('items_category'), 'category',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_input(array(
'name'=>'category',
'id'=>'category')
'id'=>'category',
'class'=>'form-control')
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_supplier').':', 'supplier',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_dropdown('supplier_id', $suppliers, '');?>
<div class="form-group">
<?php echo form_label($this->lang->line('items_supplier'), 'supplier',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-6'>
<?php echo form_dropdown('supplier_id', $suppliers, '', 'class="form-control"');?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_cost_price').':', 'cost_price',array('class'=>'wide')); ?>
<div class='form_field'>
<div class="form-group">
<?php echo form_label($this->lang->line('items_cost_price'), 'cost_price',array('class'=>'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'=>'cost_price',
'id'=>'cost_price',
'class'=>'form-control')
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_unit_price'), 'unit_price',array('class'=>'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')
);?>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_tax_1'), 'tax_percent_1',array('class'=>'control-label col-xs-3')); ?>
<div class='col-sm-3'>
<?php echo form_input(array(
'name'=>'cost_price',
'size'=>'8',
'id'=>'cost_price')
'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('items_sales_tax_1'))
);?>
</div>
<div class="col-sm-3">
<div class="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'] : '')
);?>
<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'=>'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('items_sales_tax_2'))
);?>
</div>
<div class="col-sm-3">
<div class="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'] : '')
);?>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<?php echo form_label($this->lang->line('items_reorder_level'), 'reorder_level',array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-3'>
<?php echo form_input(array(
'name'=>'reorder_level',
'id'=>'reorder_level',
'class'=>'form-control')
);?>
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_unit_price').':', 'unit_price',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'unit_price',
'size'=>'8',
'id'=>'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->lang->line('items_sales_tax_1'))
);?>
</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'] : '')
);?>
%
</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->lang->line('items_sales_tax_2'))
);?>
</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'] : '')
);?>
%
</div>
</div>
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('items_reorder_level').':', 'reorder_level',array('class'=>'wide')); ?>
<div class='form_field'>
<?php echo form_input(array(
'name'=>'reorder_level',
'id'=>'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'>
<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-5'>
<?php echo form_textarea(array(
'name'=>'description',
'id'=>'description',
'rows'=>'5',
'cols'=>'17')
'name'=>'description',
'id'=>'description',
'class'=>'form-control')
);?>
</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_dropdown('allow_alt_description', $allow_alt_description_choices);?>
<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-5'>
<?php echo form_dropdown('allow_alt_description', $allow_alt_description_choices, '', 'class="form-control"');?>
</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_dropdown('is_serialized', $serialization_choices);?>
<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-5'>
<?php echo form_dropdown('is_serialized', $serialization_choices, '', 'class="form-control"');?>
</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(); ?>
@@ -180,7 +181,8 @@ $(document).ready(function()
},
errorLabelContainer: "#error_message_box",
wrapper: "li",
errorClass: "has-error",
wrapper: "li",
rules:
{
unit_price:
+6 -78
View File
@@ -50,61 +50,8 @@ $(document).ready(function()
$('#search_form').submit();
}
});
// set the locale language for the datetime picker
$.fn.datetimepicker.dates['<?php echo $this->config->item("language"); ?>'] = {
days: ["<?php echo $this->lang->line("common_days_sunday"); ?>",
"<?php echo $this->lang->line("common_days_monday"); ?>",
"<?php echo $this->lang->line("common_days_tueday"); ?>",
"<?php echo $this->lang->line("common_days_wednesday"); ?>",
"<?php echo $this->lang->line("common_days_thursday"); ?>",
"<?php echo $this->lang->line("common_days_friday"); ?>",
"<?php echo $this->lang->line("common_days_saturday"); ?>",
"<?php echo $this->lang->line("common_days_sunday"); ?>"],
daysShort: ["<?php echo $this->lang->line("common_daysshort_sunday"); ?>",
"<?php echo $this->lang->line("common_daysshort_monday"); ?>",
"<?php echo $this->lang->line("common_daysshort_tueday"); ?>",
"<?php echo $this->lang->line("common_daysshort_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysshort_thursday"); ?>",
"<?php echo $this->lang->line("common_daysshort_friday"); ?>",
"<?php echo $this->lang->line("common_daysshort_saturday"); ?>",
"<?php echo $this->lang->line("common_daysshort_sunday"); ?>"],
daysMin: ["<?php echo $this->lang->line("common_daysmin_sunday"); ?>",
"<?php echo $this->lang->line("common_daysmin_monday"); ?>",
"<?php echo $this->lang->line("common_daysmin_tueday"); ?>",
"<?php echo $this->lang->line("common_daysmin_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysmin_thursday"); ?>",
"<?php echo $this->lang->line("common_daysmin_friday"); ?>",
"<?php echo $this->lang->line("common_daysmin_saturday"); ?>",
"<?php echo $this->lang->line("common_daysmin_sunday"); ?>"],
months: ["<?php echo $this->lang->line("common_months_january"); ?>",
"<?php echo $this->lang->line("common_months_february"); ?>",
"<?php echo $this->lang->line("common_months_march"); ?>",
"<?php echo $this->lang->line("common_months_april"); ?>",
"<?php echo $this->lang->line("common_months_may"); ?>",
"<?php echo $this->lang->line("common_months_june"); ?>",
"<?php echo $this->lang->line("common_months_july"); ?>",
"<?php echo $this->lang->line("common_months_august"); ?>",
"<?php echo $this->lang->line("common_months_september"); ?>",
"<?php echo $this->lang->line("common_months_october"); ?>",
"<?php echo $this->lang->line("common_months_november"); ?>",
"<?php echo $this->lang->line("common_months_december"); ?>"],
monthsShort: ["<?php echo $this->lang->line("common_monthsshort_january"); ?>",
"<?php echo $this->lang->line("common_monthsshort_february"); ?>",
"<?php echo $this->lang->line("common_monthsshort_march"); ?>",
"<?php echo $this->lang->line("common_monthsshort_april"); ?>",
"<?php echo $this->lang->line("common_monthsshort_may"); ?>",
"<?php echo $this->lang->line("common_monthsshort_june"); ?>",
"<?php echo $this->lang->line("common_monthsshort_july"); ?>",
"<?php echo $this->lang->line("common_monthsshort_august"); ?>",
"<?php echo $this->lang->line("common_monthsshort_september"); ?>",
"<?php echo $this->lang->line("common_monthsshort_october"); ?>",
"<?php echo $this->lang->line("common_monthsshort_november"); ?>",
"<?php echo $this->lang->line("common_monthsshort_december"); ?>"],
today: "<?php echo $this->lang->line("common_today"); ?>",
meridiem: [],
weekStart: <?php echo $this->lang->line("common_weekstart"); ?>,
};
<?php $this->load->view('partial/datepicker_locale'); ?>
// initialise the datetime picker and trigger a search on any change date
$(".date_filter").datetimepicker({
@@ -165,24 +112,6 @@ 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)
@@ -229,13 +158,13 @@ function post_bulk_form_submit(response)
<div id="title_bar">
<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",
<?php echo anchor("$controller_name/excel_import",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line('common_import_excel') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>'Import Items from Excel'));
?>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
<?php echo anchor("$controller_name/view/-1",
"<div class='btn btn-info btn-sm pull-right' style='margin-right: 10px;'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'modal-dlg', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>'modal-dlg modal-btn-new', 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
@@ -271,7 +200,7 @@ function post_bulk_form_submit(response)
<div id="table_action_header">
<ul>
<li class="float_left"><span><?php echo anchor("$controller_name/delete",$this->lang->line("common_delete"),array('id'=>'delete')); ?></span></li>
<li class="float_left"><span><?php echo anchor("$controller_name/bulk_edit/width:$form_width",$this->lang->line("items_bulk_edit"),array('id'=>'bulk_edit','title'=>$this->lang->line('items_edit_multiple_items'))); ?></span></li>
<li class="float_left"><span><?php echo anchor("$controller_name/bulk_edit",$this->lang->line("items_bulk_edit"),array('id'=>'bulk_edit','class'=>'modal-dlg','title'=>$this->lang->line('items_edit_multiple_items'))); ?></span></li>
<li class="float_left"><span><?php echo anchor("$controller_name/generate_barcodes",$this->lang->line("items_generate_barcodes"),array('id'=>'generate_barcodes', 'target' =>'_blank','title'=>$this->lang->line('items_generate_barcodes'))); ?></span></li>
<?php
if (count($stock_locations) > 1)
@@ -282,7 +211,6 @@ function post_bulk_form_submit(response)
}
?>
<li class="float_right">
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
<input type="text" name ='search' id='search'/>
<input type="hidden" name ='limit_from' id='limit_from'/>
</li>
@@ -0,0 +1,73 @@
$.fn.datetimepicker.dates['<?php echo $this->config->item("language"); ?>'] = {
days: ["<?php echo $this->lang->line("common_days_sunday"); ?>",
"<?php echo $this->lang->line("common_days_monday"); ?>",
"<?php echo $this->lang->line("common_days_tueday"); ?>",
"<?php echo $this->lang->line("common_days_wednesday"); ?>",
"<?php echo $this->lang->line("common_days_thursday"); ?>",
"<?php echo $this->lang->line("common_days_friday"); ?>",
"<?php echo $this->lang->line("common_days_saturday"); ?>",
"<?php echo $this->lang->line("common_days_sunday"); ?>"],
daysShort: ["<?php echo $this->lang->line("common_daysshort_sunday"); ?>",
"<?php echo $this->lang->line("common_daysshort_monday"); ?>",
"<?php echo $this->lang->line("common_daysshort_tueday"); ?>",
"<?php echo $this->lang->line("common_daysshort_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysshort_thursday"); ?>",
"<?php echo $this->lang->line("common_daysshort_friday"); ?>",
"<?php echo $this->lang->line("common_daysshort_saturday"); ?>",
"<?php echo $this->lang->line("common_daysshort_sunday"); ?>"],
daysMin: ["<?php echo $this->lang->line("common_daysmin_sunday"); ?>",
"<?php echo $this->lang->line("common_daysmin_monday"); ?>",
"<?php echo $this->lang->line("common_daysmin_tueday"); ?>",
"<?php echo $this->lang->line("common_daysmin_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysmin_thursday"); ?>",
"<?php echo $this->lang->line("common_daysmin_friday"); ?>",
"<?php echo $this->lang->line("common_daysmin_saturday"); ?>",
"<?php echo $this->lang->line("common_daysmin_sunday"); ?>"],
months: ["<?php echo $this->lang->line("common_months_january"); ?>",
"<?php echo $this->lang->line("common_months_february"); ?>",
"<?php echo $this->lang->line("common_months_march"); ?>",
"<?php echo $this->lang->line("common_months_april"); ?>",
"<?php echo $this->lang->line("common_months_may"); ?>",
"<?php echo $this->lang->line("common_months_june"); ?>",
"<?php echo $this->lang->line("common_months_july"); ?>",
"<?php echo $this->lang->line("common_months_august"); ?>",
"<?php echo $this->lang->line("common_months_september"); ?>",
"<?php echo $this->lang->line("common_months_october"); ?>",
"<?php echo $this->lang->line("common_months_november"); ?>",
"<?php echo $this->lang->line("common_months_december"); ?>"],
monthsShort: ["<?php echo $this->lang->line("common_monthsshort_january"); ?>",
"<?php echo $this->lang->line("common_monthsshort_february"); ?>",
"<?php echo $this->lang->line("common_monthsshort_march"); ?>",
"<?php echo $this->lang->line("common_monthsshort_april"); ?>",
"<?php echo $this->lang->line("common_monthsshort_may"); ?>",
"<?php echo $this->lang->line("common_monthsshort_june"); ?>",
"<?php echo $this->lang->line("common_monthsshort_july"); ?>",
"<?php echo $this->lang->line("common_monthsshort_august"); ?>",
"<?php echo $this->lang->line("common_monthsshort_september"); ?>",
"<?php echo $this->lang->line("common_monthsshort_october"); ?>",
"<?php echo $this->lang->line("common_monthsshort_november"); ?>",
"<?php echo $this->lang->line("common_monthsshort_december"); ?>"
],
today: "<?php echo $this->lang->line("common_today"); ?>",
<?php
if( strpos($this->config->item('timeformat'), 'a') !== false )
{
?>
meridiem: ["am", "pm"],
<?php
}
else if( strpos($this->config->item('timeformat'), 'A') !== false )
{
?>
meridiem: ["AM", "PM"],
<?php
}
else
{
?>
meridiem: [],
<?php
}
?>
weekStart: <?php echo $this->lang->line("common_weekstart"); ?>
};
+2 -2
View File
@@ -62,10 +62,10 @@
<![endif]-->
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=f8680d8d01"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=9e50afc69c"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=f94af9ca53" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=a9b2f1b945" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>
+5 -5
View File
@@ -62,17 +62,17 @@ function post_person_form_submit(response)
<?php if ($controller_name =='customers')
{
?>
<?php echo anchor("$controller_name/excel_import/width:$form_width",
<?php echo anchor("$controller_name/excel_import",
"<div class='btn btn-info btn-sm pull-right''><span>" . $this->lang->line('common_import_excel') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>'Import Items from Excel'));
?>
array('class'=>"modal-dlg modal-dlg", 'title'=>$this->lang->line('items_import_items_excel')));
?>
<?php
}
?>
<?php echo anchor("$controller_name/view/-1/width:$form_width",
<?php $dlog_class = ($controller_name == 'employees' ? 'modal-dlg-wide' : ''); echo anchor("$controller_name/view/-1",
"<div class='btn btn-info btn-sm pull-right' style='margin-right: 10px;'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
array('class'=>"modal-dlg $dlog_class", 'title'=>$this->lang->line($controller_name . '_new')));
?>
</div>
+1 -1
View File
@@ -47,7 +47,7 @@ if (isset($error))
echo form_input(array('name'=>'item','id'=>'item','size'=>'40'));
echo anchor("items/view/-1/width:450", $this->lang->line('sales_new_item'),
array('class'=>'btn btn-info btn-sm pull-right modal-dlg none', 'id'=>'new_item_button', 'title'=>$this->lang->line('sales_new_item')));
array('class'=>'btn btn-info btn-sm pull-right modal-dlg modal-btn-new', 'id'=>'new_item_button', 'title'=>$this->lang->line('sales_new_item')));
?>
<?php echo form_close(); ?>
+2 -74
View File
@@ -50,80 +50,8 @@ $(document).ready(function()
});
*/
// set the locale language for the datetime picker
$.fn.datetimepicker.dates['<?php echo $this->config->item("language"); ?>'] = {
days: ["<?php echo $this->lang->line("common_days_sunday"); ?>",
"<?php echo $this->lang->line("common_days_monday"); ?>",
"<?php echo $this->lang->line("common_days_tueday"); ?>",
"<?php echo $this->lang->line("common_days_wednesday"); ?>",
"<?php echo $this->lang->line("common_days_thursday"); ?>",
"<?php echo $this->lang->line("common_days_friday"); ?>",
"<?php echo $this->lang->line("common_days_saturday"); ?>",
"<?php echo $this->lang->line("common_days_sunday"); ?>"],
daysShort: ["<?php echo $this->lang->line("common_daysshort_sunday"); ?>",
"<?php echo $this->lang->line("common_daysshort_monday"); ?>",
"<?php echo $this->lang->line("common_daysshort_tueday"); ?>",
"<?php echo $this->lang->line("common_daysshort_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysshort_thursday"); ?>",
"<?php echo $this->lang->line("common_daysshort_friday"); ?>",
"<?php echo $this->lang->line("common_daysshort_saturday"); ?>",
"<?php echo $this->lang->line("common_daysshort_sunday"); ?>"],
daysMin: ["<?php echo $this->lang->line("common_daysmin_sunday"); ?>",
"<?php echo $this->lang->line("common_daysmin_monday"); ?>",
"<?php echo $this->lang->line("common_daysmin_tueday"); ?>",
"<?php echo $this->lang->line("common_daysmin_wednesday"); ?>",
"<?php echo $this->lang->line("common_daysmin_thursday"); ?>",
"<?php echo $this->lang->line("common_daysmin_friday"); ?>",
"<?php echo $this->lang->line("common_daysmin_saturday"); ?>",
"<?php echo $this->lang->line("common_daysmin_sunday"); ?>"],
months: ["<?php echo $this->lang->line("common_months_january"); ?>",
"<?php echo $this->lang->line("common_months_february"); ?>",
"<?php echo $this->lang->line("common_months_march"); ?>",
"<?php echo $this->lang->line("common_months_april"); ?>",
"<?php echo $this->lang->line("common_months_may"); ?>",
"<?php echo $this->lang->line("common_months_june"); ?>",
"<?php echo $this->lang->line("common_months_july"); ?>",
"<?php echo $this->lang->line("common_months_august"); ?>",
"<?php echo $this->lang->line("common_months_september"); ?>",
"<?php echo $this->lang->line("common_months_october"); ?>",
"<?php echo $this->lang->line("common_months_november"); ?>",
"<?php echo $this->lang->line("common_months_december"); ?>"],
monthsShort: ["<?php echo $this->lang->line("common_monthsshort_january"); ?>",
"<?php echo $this->lang->line("common_monthsshort_february"); ?>",
"<?php echo $this->lang->line("common_monthsshort_march"); ?>",
"<?php echo $this->lang->line("common_monthsshort_april"); ?>",
"<?php echo $this->lang->line("common_monthsshort_may"); ?>",
"<?php echo $this->lang->line("common_monthsshort_june"); ?>",
"<?php echo $this->lang->line("common_monthsshort_july"); ?>",
"<?php echo $this->lang->line("common_monthsshort_august"); ?>",
"<?php echo $this->lang->line("common_monthsshort_september"); ?>",
"<?php echo $this->lang->line("common_monthsshort_october"); ?>",
"<?php echo $this->lang->line("common_monthsshort_november"); ?>",
"<?php echo $this->lang->line("common_monthsshort_december"); ?>"],
today: "<?php echo $this->lang->line("common_today"); ?>",
<?php
if( strpos($this->config->item('timeformat'), 'a') !== false )
{
?>
meridiem: ["am", "pm"],
<?php
}
else if( strpos($this->config->item('timeformat'), 'A') !== false )
{
?>
meridiem: ["AM", "PM"],
<?php
}
else
{
?>
meridiem: [],
<?php
}
?>
weekStart: <?php echo $this->lang->line("common_weekstart"); ?>
};
<?php $this->load->view('partial/datepicker_locale'); ?>
// initialise the datetime picker and trigger a search on any change of date
$(".date_filter").datetimepicker({
format: "<?php echo dateformat_bootstrap($this->config->item("dateformat")) . ' ' . dateformat_bootstrap($this->config->item("timeformat"));?>",
+1 -1
View File
@@ -48,7 +48,7 @@ if (isset($success))
echo form_input(array('name'=>'item', 'id'=>'item', 'size'=>'40', 'tabindex'=>'1'));
echo anchor("items/view/-1/width:450", $this->lang->line('sales_new_item'),
array('class'=>'btn btn-info btn-sm pull-right modal-dlg none', 'id'=>'new_item_button', 'title'=>$this->lang->line('sales_new_item')));
array('class'=>'btn btn-info btn-sm pull-right modal-dlg modal-btn-new', 'id'=>'new_item_button', 'title'=>$this->lang->line('sales_new_item')));
?>
<?php echo form_close(); ?>
+3 -2
View File
@@ -4,7 +4,7 @@
<fieldset id="supplier_basic_info">
<legend><?php echo $this->lang->line("suppliers_basic_information"); ?></legend>
<div class="form-group">
<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(
@@ -61,7 +61,8 @@ $(document).ready(function()
},
errorLabelContainer: "#error_message_box",
wrapper: "li",
errorClass: "has-error",
wrapper: "li",
rules:
{
company_name: "required",
+1 -1
View File
@@ -59,7 +59,7 @@ function post_person_form_submit(response)
<div id="title_bar">
<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",
<?php echo anchor("$controller_name/view/-1",
"<div class='btn btn-info btn-sm pull-right'><span>" . $this->lang->line($controller_name . '_new') . "</span></div>",
array('class'=>'modal-dlg none', 'title'=>$this->lang->line($controller_name . '_new')));
?>
+10
View File
@@ -177,6 +177,16 @@ a.rollover img
{
padding: 10px 10px 9px;
}
.modal-dlg .modal-dialog
{
width: 500px;
}
.modal-dlg-wide .modal-dialog
{
width: 750px;
}
}
.modal-body
+9635 -9618
View File
File diff suppressed because one or more lines are too long.
+3 -3
View File
File diff suppressed because one or more lines are too long.
+3 -3
View File
File diff suppressed because one or more lines are too long.
+33 -16
View File
@@ -74,7 +74,7 @@ function do_search(show_feedback,on_complete)
//If search is not enabled, don't do anything
if(!enable_search.enabled)
return;
if(show_feedback)
$('#search').addClass("ac_loading");
@@ -206,16 +206,12 @@ function enable_bulk_edit(none_selected_message)
$('#bulk_edit').click(function(event)
{
event.preventDefault();
if($("#sortable_table tbody :checkbox:checked").length >0)
{
tb_show($(this).attr('title'),$(this).attr('href'),false);
$(this).blur();
}
else
if($("#sortable_table tbody :checkbox:checked").length == 0)
{
alert(none_selected_message);
return false;
}
event.preventDefault();
});
}
enable_bulk_edit.enabled=false;
@@ -393,7 +389,6 @@ dialog_support = (function() {
var btn_id, dialog_ref;
var hide = function() {
debugger;;
dialog_ref.close();
};
@@ -411,19 +406,41 @@ dialog_support = (function() {
};
var init = function(selector) {
$(selector).click(function(event) {
return $(selector).click(function(event) {
var buttons = [{
id: 'submit',
label: 'Submit',
cssClass: 'btn-primary',
action: submit('submit')
}];
var dialog_class = 'modal-dlg';
$.each($(this).attr('class').split(/\s+/), function(classIndex, className) {
var width_class = className.split("modal-dlg-");
if (width_class && width_class.length > 1) {
dialog_class = className;
}
var btn_class = className.split("modal-btn-");
if (btn_class && btn_class.length > 1) {
var btn_name = btn_class[1];
buttons.push({
id: btn_name,
label: btn_name.charAt(0).toUpperCase() + btn_name.slice(1),
action: submit(btn_name)
});
}
});
var $link = $(event.target);
$link = $link.is("a") ? $link : $link.parents("a");
BootstrapDialog.show({
cssClass: dialog_class,
title: $link.attr('title'),
message: $('<div></div>').load($link.attr('href')),
buttons: [{
id: 'submit',
label: 'Submit',
cssClass: 'btn-primary',
action: submit('submit')
}]
buttons: buttons
});
event.preventDefault();
});
};
+2 -2
View File
@@ -62,11 +62,11 @@
<![endif]-->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=9ed20b1ee8"/>
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=f8680d8d01"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=9e50afc69c"/>
<!-- end mincss template tags -->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=f94af9ca53" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=a9b2f1b945" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>