Apply changes from #226 (#116)

This commit is contained in:
FrancescoUK
2016-01-07 19:17:54 +00:00
parent 4b9d5113d3
commit 4cc3eadb97
12 changed files with 171 additions and 268 deletions

View File

@@ -0,0 +1,12 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| theme name
|--------------------------------------------------------------------------
|
| the theme folder name. If the folder doesn't exist it will use default theme
|
|
*/
$config['theme_name'] = 'flatly';

View File

@@ -10,8 +10,11 @@ class MY_Loader extends CI_Loader {
function view($view, $vars = array(), $return = FALSE)
{
// add other first view path
$this->_ci_view_paths = array_merge(array(realpath('templates/flatly').DIRECTORY_SEPARATOR => 1), $this->_ci_view_paths);
include APPPATH.'config/theme.php';
// add other first view path if exist
if(!empty($config['theme_name']) && file_exists('templates/'.$config['theme_name'].'/views'))
$this->_ci_view_paths = array_merge(array('templates/'.$config['theme_name'].'/views'.DIRECTORY_SEPARATOR => 1), $this->_ci_view_paths);
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
}

View File

@@ -1,18 +1,44 @@
/* additional styles placed here */
body {
padding-top: 60px;
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: 10px 15px;
height: 41px;
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;
}
@@ -58,10 +84,77 @@ table.tablesorter thead tr th, table.tablesorter tfoot tr th {
#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-top: 10px;
padding-bottom: 10px;
padding: 10px 10px 9px;
}
}

View File

@@ -1,8 +0,0 @@
</div>
</div>
<div id="footer">
</div>
</body>
</html>

View File

@@ -1,3 +0,0 @@
<!-- Export Excel Template, By OpenJoombiz.com -->
</body>
</html>

View File

@@ -1,54 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $this->config->item('company').' -- '.$this->lang->line('common_powered_by').' Open Source Point Of Sale' ?></title>
<style type="text/css">
html {
overflow: auto;
}
body
{
background-color:#FFFFFF;
font-size:100%;
}
#menubar,#footer
{
display:none;
}
#content_area
{
width:100%;
}
#content_area_wrapper
{
border:0px;
}
#sale_return_policy
{
width:100%;
text-align:center;
}
.long_name
{
display:none;
}
.short_name
{
display:inline;
}
#receipt_items td
{
white-space:nowrap;
}
</style>
</head>
<body>

View File

@@ -1,75 +0,0 @@
<?php if ($print_after_sale)
{
?>
<script type="text/javascript">
$(window).load(function()
{
// receipt layout sanity check
if ( $("#receipt_items, #items").length > 0)
{
// install firefox addon in order to use this plugin
if (window.jsPrintSetup)
{
// set top margins in millimeters
jsPrintSetup.setOption('marginTop', <?php echo $this->Appconfig->get('print_top_margin'); ?>);
jsPrintSetup.setOption('marginLeft', <?php echo $this->Appconfig->get('print_left_margin'); ?>);
jsPrintSetup.setOption('marginBottom', <?php echo $this->Appconfig->get('print_bottom_margin'); ?>);
jsPrintSetup.setOption('marginRight', <?php echo $this->Appconfig->get('print_right_margin'); ?>);
<?php if (!$this->Appconfig->get('print_header'))
{
?>
// set page header
jsPrintSetup.setOption('headerStrLeft', '');
jsPrintSetup.setOption('headerStrCenter', '');
jsPrintSetup.setOption('headerStrRight', '');
<?php
}
if (!$this->Appconfig->get('print_footer'))
{
?>
// set empty page footer
jsPrintSetup.setOption('footerStrLeft', '');
jsPrintSetup.setOption('footerStrCenter', '');
jsPrintSetup.setOption('footerStrRight', '');
<?php
}
?>
var printers = jsPrintSetup.getPrintersList().split(',');
// get right printer here..
for(var index in printers) {
var default_ticket_printer = window.localStorage && localStorage['<?php echo $selected_printer; ?>'];
var selected_printer = printers[index];
if (selected_printer == default_ticket_printer) {
// select epson label printer
jsPrintSetup.setPrinter(selected_printer);
// clears user preferences always silent print value
// to enable using 'printSilent' option
jsPrintSetup.clearSilentPrint();
<?php if (!$this->Appconfig->get('print_silently'))
{
?>
// Suppress print dialog (for this context only)
jsPrintSetup.setOption('printSilent', 1);
<?php
}
?>
// Do Print
// When print is submitted it is executed asynchronous and
// script flow continues after print independently of completetion of print process!
jsPrintSetup.print();
}
}
}
else
{
window.print();
}
}
});
</script>
<?php
}
?>

View File

@@ -1,20 +0,0 @@
<?php $i = 0; ?>
<?php foreach($stock_locations as $location => $location_data ) { ?>
<?php $location_id = $location_data['location_id']; ?>
<?php $location_name = $location_data['location_name']; ?>
<div class="field_row clearfix" style="<?php echo $location_data['deleted'] ? 'display:none;' : 'display:block;' ?>">
<?php echo form_label($this->lang->line('config_stock_location').' ' .++$i. ':', 'stock_location_'.$i ,array('class'=>'required wide')); ?>
<div class='form_field'>
<?php $form_data = array(
'name'=>'stock_location_'.$location_id,
'id'=>'stock_location_'.$location_id,
'class'=>'stock_location valid_chars required',
'value'=>$location_name);
$location_data['deleted'] && $form_data['disabled'] = 'disabled';
echo form_input($form_data);
?>
</div>
<img class="add_stock_location" src="<?php echo base_url('images/plus.png'); ?>" />
<img class="remove_stock_location" src="<?php echo base_url('images/minus.png'); ?>" />
</div>
<?php } ?>

View File

@@ -1,93 +0,0 @@
<?php $this->load->view("partial/header"); ?>
<script type="text/javascript">
$(document).ready(function()
{
init_table_sorting();
enable_select_all();
enable_row_selection();
enable_search({ suggest_url : '<?php echo site_url("$controller_name/suggest")?>',
confirm_search_message : '<?php echo $this->lang->line("common_confirm_search")?>'});
enable_email('<?php echo site_url("$controller_name/mailto")?>');
enable_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>','<?php echo $this->lang->line($controller_name."_none_selected")?>');
});
function init_table_sorting()
{
//Only init if there is more than one row
if($('.tablesorter tbody tr').length >1)
{
$("#sortable_table").tablesorter(
{
sortList: [[1,0]],
headers:
{
0: { sorter: false},
5: { sorter: false}
}
});
}
}
function post_person_form_submit(response)
{
if(!response.success)
{
set_feedback(response.message,'error_message',true);
}
else
{
//This is an update, just update one row
if(jQuery.inArray(response.person_id,get_visible_checkbox_ids()) != -1)
{
update_row(response.person_id,'<?php echo site_url("$controller_name/get_row")?>');
set_feedback(response.message,'success_message',false);
}
else //refresh entire table
{
do_search(true,function()
{
//highlight new row
hightlight_row(response.person_id);
set_feedback(response.message,'success_message',false);
});
}
}
}
</script>
<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>
<div id="new_button">
<?php echo anchor("$controller_name/view/-1/width:$form_width", $this->lang->line($controller_name.'_new'),
array('class'=>'thickbox none btn btn-primary btn-sm','title'=>$this->lang->line($controller_name.'_new')));
?>
<?php if ($controller_name =='customers') {?>
<?php echo anchor("$controller_name/excel_import/width:$form_width",
$this->lang->line('common_import_excel'),
array('class'=>'thickbox none btn btn-primary btn-sm','title'=>'Import Items from Excel'));
?>
<?php } ?>
</div>
</div>
<div id="pagination"><?= $links ?></div>
<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', 'class' => '')); ?></span></li>
<li class="float_left"><span><a href="#" id="email" class=""><?php echo $this->lang->line("common_email");?></a></span></li>
<li class="float_right">
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
<?php echo form_open("$controller_name/search",array('id'=>'search_form')); ?>
<input type="text" name ='search' id='search'/>
<input type="hidden" name ='limit_from' id='limit_from'/>
</form>
</li>
</ul>
</div>
<div id="table_holder">
<?php echo $manage_table; ?>
</div>
<div id="feedback_bar"></div>
<?php $this->load->view("partial/footer"); ?>

View File

@@ -0,0 +1,18 @@
<?php $this->load->view("partial/header"); ?>
<h3 class="text-center"><?php echo $this->lang->line('common_welcome_message'); ?></h3>
<div id="home_module_list">
<?php
foreach($allowed_modules->result() as $module)
{
?>
<div class="module_item" title="<?php echo $this->lang->line('module_'.$module->module_id.'_desc');?>">
<a href="<?php echo site_url("$module->module_id");?>"><img src="<?php echo base_url().'images/menubar/'.$module->module_id.'.png';?>" border="0" alt="Menubar Image" /></a>
<a href="<?php echo site_url("$module->module_id");?>"><?php echo $this->lang->line("module_".$module->module_id) ?></a>
</div>
<?php
}
?>
</div>
<?php $this->load->view("partial/footer"); ?>

View File

@@ -0,0 +1,13 @@
</div>
</div>
</div>
<div id="footer">
<?php echo $this->lang->line('common_you_are_using_ospos'); ?>
<?php echo $this->config->item('application_version'); ?>.
<?php echo $this->lang->line('common_please_visit_my'); ?>
<a href="https://github.com/jekkos/opensourcepos" target="_blank"><?php echo $this->lang->line('common_website'); ?></a>
<?php echo $this->lang->line('common_learn_about_project'); ?>
</div>
</body>
</html>

View File

@@ -60,9 +60,23 @@ html {
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<body>
<div class="wrapper">
<div class="topbar">
<div class="container">
<div class="navbar-left">
<?php echo date($this->config->item('dateformat').' '.$this->config->item('timeformat')) ?>
</div>
<div class="navbar-right" style="margin:0">
<?php echo $this->lang->line('common_welcome')." $user_info->first_name $user_info->last_name! | "; ?>
<a href="javascript:logout(true);"><?php echo $this->lang->line("common_logout"); ?></a>
</div>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
@@ -71,14 +85,17 @@ html {
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php echo site_url(); ?>">OSPOS</a>
<a class="navbar-brand hidden-sm" href="<?php echo site_url(); ?>">OSPOS</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<?php foreach($allowed_modules->result() as $module): ?>
<li>
<a href="<?php echo site_url("$module->module_id");?>"><?php echo $this->lang->line("module_".$module->module_id) ?></a>
<li class="<?php echo $module->module_id == $this->uri->segment(1)? 'active': ''; ?>">
<a href="<?php echo site_url("$module->module_id");?>" title="<?php echo $this->lang->line("module_".$module->module_id) ?>" class="menu-icon">
<img src="<?php echo base_url().'images/menubar/'.$module->module_id.'.png';?>" border="0" alt="Module Icon" /><br />
<?php echo $this->lang->line("module_".$module->module_id) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
@@ -87,5 +104,5 @@ html {
</div>
<div class="container">
<div class="row-fluid">
<div class="row">