Fixed horizontal scrollbar jobs list

This commit is contained in:
Karl Cordes 2011-03-30 10:16:42 +11:00
parent e812841dcb
commit 634683fafc
4 changed files with 52 additions and 77 deletions

View file

@ -24,47 +24,10 @@ $recordObj->records = $totalNoRecords;
$i=0;
foreach($jobs as $job) {
/* $cellArray[] = array(
'id' => $job['Job']['id'],
'created' => $job['Job']['created'],
'title' => $job['Job']['title'],
'customer' => $customers[$job['Enquiry']['customer_id']],
'customer_order_number' => $job['Job']['customer_order_number'],
'supplier_reference' =>$job['Job']['supplier_reference'],
'date_order_received' => $job['Job']['date_order_received'],
'date_order_placed_on_principle' => $job['Job']['date_order_placed_on_principle'],
'date_scheduled_ex_works' => $job['Job']['date_scheduled_ex_works'],
'date_order_sent_to_customer' => $job['Job']['date_order_sent_to_customer'],
'domestic_freight_paid_by' => $job['Job']['domestic_freight_paid_by'],
'sale_category' => $job['Job']['sale_category'],
'shipment_category' => $job['Job']['shipment_category'],
'comments' => $job['Job']['comments'],
'company_gross_sales_aud' => $job['Job']['company_gross_sales_aud'],
'net_sales_aud' => $job['Job']['net_sales_aud'],
'gross_profit_aud' => $job['Job']['gross_profit_aud'],
'ato_exchange_rate' => $job['Job']['ato_exchange_rate'],
'gst'=> $job['Job']['gst'],
'currency_id' => $job['Job']['currency_id'],
'gst_amount' => $job['Job']['gst_amount'],
'gross_commisions' => $job['Job']['gross_commisions'],
'invoiced_amount_inc_gst' => $job['Job']['invoiced_amount_inc_gst'],
'net_export_sales_aud' =>$job['Job']['net_export_sales_aud'],
'gross_profit_exports_aud' => $job['Job']['gross_profit_exports_aud'],
'gp_percent' => $job['Job']['gp_percent'],
'gross_australian_sales_foreign_currency' => $job['Job']['gross_australian_sales_foreign_currency'],
'net_australian_sales_foreign_currency' => $job['Job']['net_australian_sales_foreign_currency'],
'gross_profit_value_australian_sales_foreign_currency' => $job['Job']['gross_profit_value_australian_sales_foreign_currency'],
'gross_export_sales_foreign_currency' => $job['Job']['gross_export_sales_foreign_currency'],
'net_export_sales_foreign_currency' => $job['Job']['net_export_sales_foreign_currency'],
'gross_profit_value_after_discount_exports_foreign_currency' => $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'],
'gross_commissions' => $job['Job']['gross_commissions'],
'net_commissions' => $job['Job']['net_commissions']
);*/
$cellArray = array(
// $job['Job']['id'],
$job['Job']['created'],
$html->link($job['Job']['title'], array('controller'=>'jobs','action'=>'view', $job['Job']['id'])),
$html->link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers','action'=>'view', $job['Enquiry']['customer_id'])),
$job['Job']['customer_order_number'],

View file

@ -14,6 +14,6 @@ echo $paginator->counter(array(
</div>
*/ ?>
<table id="grid" style=""></table>
<table id="grid" style="overflow: hidden;"></table>
<div id="gridpager"></div>

View file

@ -136,4 +136,9 @@ tr.ui-search-toolbar select {margin: 1px 0px 0px 0px}
.ui-searchFilter table td {margin: 0em; padding: 1px;}
.ui-searchFilter table td input, .ui-searchFilter table td select {margin: 0.1em;}
.ui-searchFilter .ui-state-default { cursor: pointer; }
.ui-searchFilter .divider hr {margin: 1px; }
.ui-searchFilter .divider hr {margin: 1px; }
.ui-jqgrid tr.jqgrow td {
white-space: normal !important;
}

View file

@ -3,14 +3,19 @@ jQuery(document).ready(function(){
var lastsel; //used for Double Click Row Selection.
var numColWidth = 100;
jQuery("#grid").jqGrid({
url:'/jobs/build_jobs_json/',
datatype: "json",
mtype: 'GET',
colNames:[
//'id',
'created','Job Number','customer','Customer Ref','supplier_reference','date_order_received',
'date_order_placed_on_principle','date_scheduled_ex_works','date_order_sent_to_customer','domestic_freight_paid_by',
'Job Number','customer','Customer Ref','Supplier Ref','Order Received',
'Order Placed Principle','date_scheduled_ex_works','date_order_sent_to_customer','domestic_freight_paid_by',
'sale_category','shipment_category','comments','company_gross_sales_aud','net_sales_aud','gross_profit_aud','ato_exchange_rate',
'gst','currency_id','gst_amount','gross_commisions','invoiced_amount_inc_gst','net_export_sales_aud',
'gross_profit_exports_aud','gp_percent','gross_australian_sales_foreign_currency','net_australian_sales_foreign_currency',
@ -38,12 +43,6 @@ jQuery(document).ready(function(){
editable:false
},*/
{
name:'created',
index:'created',
width:100,
editable:false
},
{
name:'title',
@ -77,7 +76,7 @@ jQuery(document).ready(function(){
{
name:'date_order_received',
index:'date_order_received',
width:200,
width:100,
editable:true,
sorttype:"date"
},
@ -85,7 +84,7 @@ jQuery(document).ready(function(){
{
name:'date_order_placed_on_principle',
index:'date_order_placed_on_principle',
width:200,
width:150,
editable:true,
sorttype:"date"
},
@ -93,7 +92,7 @@ jQuery(document).ready(function(){
{
name:'date_scheduled_ex_works',
index:'date_scheduled_ex_works',
width:200,
width:130,
editable:true,
sorttype:"date"
},
@ -109,7 +108,7 @@ jQuery(document).ready(function(){
{
name:'domestic_freight_paid_by',
index:'domestic_freight_paid_by',
width:200,
width:100,
editable:true,
edittype:"select",
editoptions:{
@ -120,15 +119,23 @@ jQuery(document).ready(function(){
{
name:'sale_category',
index:'sale_category',
width:50,
editable:true
width:120,
editable:true,
edittype:"select",
editoptions:{
value:"INDENT:INDENT;STOCK:STOCK;COMMISSION:COMMISSION"
}
},
{
name:'shipment_category',
index:'shipment_category',
width:200,
editable:true
width:140,
editable:true,
edittype:"select",
editoptions:{
value:"AUSTRALIA:AUSTRALIA;EXPORT:EXPORT;DIRECT-INTL:DIRECT-INTL;DIRECT-AUST:DIRECT-AUST;NO-SHIP:NO-SHIP"
}
},
{
@ -142,139 +149,139 @@ jQuery(document).ready(function(){
{
name:'company_gross_sales_aud',
index:'company_gross_sales_aud',
width:200,
width:numColWidth,
editable:true
},
{
name:'net_sales_aud',
index:'net_sales_aud',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_profit_aud',
index:'gross_profit_aud',
width:200,
width:numColWidth,
editable:true
},
{
name:'ato_exchange_rate',
index:'ato_exchange_rate',
width:200,
width:numColWidth,
editable:true
},
{
name:'gst',
width:200,
width:numColWidth,
editable:true
},
{
name:'currency_id',
index:'currency_id',
width:200,
width:numColWidth,
editable:true
},
{
name:'gst_amount',
index:'gst_amount',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_commisions',
index:'gross_commisions',
width:200,
width:numColWidth,
editable:true
},
{
name:'invoiced_amount_inc_gst',
index:'invoiced_amount_inc_gst',
width:200,
width:numColWidth,
editable:true
},
{
name:'net_export_sales_aud',
index:'net_export_sales_aud',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_profit_exports_aud',
index:'gross_profit_exports_aud',
width:200,
width:numColWidth,
editable:true
},
{
name:'gp_percent',
index:'gp_percent',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_australian_sales_foreign_currency',
index:'gross_australian_sales_foreign_currency',
width:200,
width:numColWidth,
editable:true
},
{
name:'net_australian_sales_foreign_currency',
index:'net_australian_sales_foreign_currency',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_profit_value_australian_sales_foreign_currency',
index:'gross_profit_value_australian_sales_foreign_currency',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_export_sales_foreign_currency',
index:'gross_export_sales_foreign_currency',
width:200,
editable:true
},
{
name:'net_export_sales_foreign_currency',
index:'net_export_sales_foreign_currency',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_profit_value_after_discount_exports_foreign_currency',
index:'gross_profit_value_after_discount_exports_foreign_currency',
width:200,
width:numColWidth,
editable:true
},
{
name:'gross_commissions',
index:'gross_commissions',
width:200,
width:numColWidth,
editable:true
},
{
name:'net_commissions',
index:'net_commissions',
width:200,
width:numColWidth,
editable:true
},
@ -284,7 +291,7 @@ jQuery(document).ready(function(){
// viewrecords: true,
rowNum: 500,
height: '100%',
height: '700px',
caption:"Jobs",
editurl:"/jobs/ajax_edit",