mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-06 08:27:54 -05:00
Remove thickbox from bower.json (#328)
Items edit working now (items module only) (#116)
This commit is contained in:
@@ -358,9 +358,8 @@ 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="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%"><a onclick="item_details(\''.$controller_name.'/view/'. $item->item_id . '/width:' . $width . '\')">'. $CI->lang->line('common_edit').'</a></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%">'*/' '.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.='</tr>';
|
||||
|
||||
@@ -1,403 +1,375 @@
|
||||
<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">×</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')); ?>
|
||||
<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>
|
||||
|
||||
<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
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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_button != '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_dialog();
|
||||
}
|
||||
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>
|
||||
|
||||
|
||||
@@ -109,6 +109,37 @@ function init_table_sorting()
|
||||
}
|
||||
}
|
||||
|
||||
var item_details = function(url) {
|
||||
|
||||
dialog_support = { hide: function () {}, clicked_button : undefined };
|
||||
|
||||
var submit_form = function(button_id) {
|
||||
return function(dialog_ref)
|
||||
{
|
||||
dialog_support.clicked_button = button_id;
|
||||
$('#item_form').submit();
|
||||
dialog_support.hide_dialog = function() {
|
||||
dialog_ref.close();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return BootstrapDialog.show({
|
||||
title: '<?php echo $this->lang->line("items_basic_information"); ?>',
|
||||
message: $('<div></div>').load(url),
|
||||
buttons: [{
|
||||
id: 'submit',
|
||||
label: '<?php echo $this->lang->line('common_submit'); ?>',
|
||||
action: submit_form('submit')
|
||||
}, {
|
||||
id: 'new',
|
||||
label: '<?php echo $this->lang->line('common_new'); ?>',
|
||||
action: submit_form('new')
|
||||
}]
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function post_item_form_submit(response)
|
||||
{
|
||||
if(!response.success)
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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=76a0f9124b" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,10 @@ a.rollover img
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.modal .modal-body
|
||||
{
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
165
css/thickbox.css
165
css/thickbox.css
@@ -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;
|
||||
}
|
||||
319
dist/opensourcepos.js
vendored
319
dist/opensourcepos.js
vendored
@@ -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'> <a href='#'>Next ></a></span>";
|
||||
} else {
|
||||
TB_PrevCaption = TB_TempArray[TB_Counter].title;
|
||||
TB_PrevURL = TB_TempArray[TB_Counter].href;
|
||||
TB_PrevHTML = "<span id='TB_prev'> <a href='#'>< 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
|
||||
|
||||
44
dist/opensourcepos.min.js
vendored
44
dist/opensourcepos.min.js
vendored
File diff suppressed because one or more lines are too long
318
dist/opensourcepos_bower.js
vendored
318
dist/opensourcepos_bower.js
vendored
@@ -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'> <a href='#'>Next ></a></span>";
|
||||
} else {
|
||||
TB_PrevCaption = TB_TempArray[TB_Counter].title;
|
||||
TB_PrevURL = TB_TempArray[TB_Counter].href;
|
||||
TB_PrevHTML = "<span id='TB_prev'> <a href='#'>< 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;
|
||||
}
|
||||
}
|
||||
6961
templates/spacelab/css/bootstrap.css
vendored
6961
templates/spacelab/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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=76a0f9124b" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user