Minor fixes

This commit is contained in:
Hillel Coren 2015-09-04 10:20:30 +03:00
parent e2626051dc
commit 79aa5bad92
13 changed files with 99 additions and 24 deletions

View File

@ -55,7 +55,7 @@ class TaskController extends BaseController
->addColumn('client_name', function ($model) { return $model->client_public_id ? link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)) : ''; });
}
return $table->addColumn('created_at', function($model) { return Task::calcStartTime($model); })
return $table->addColumn('created_at', function($model) { return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model)); })
->addColumn('time_log', function($model) { return gmdate('H:i:s', Task::calcDuration($model)); })
->addColumn('description', function($model) { return $model->description; })
->addColumn('invoice_number', function($model) { return self::getStatusLabel($model); })

View File

@ -337,7 +337,7 @@ if (!defined('CONTACT_EMAIL')) {
define('DEFAULT_LANGUAGE', 1); // English
define('DEFAULT_DATE_FORMAT', 'M j, Y');
define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy');
define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a');
define('DEFAULT_DATETIME_FORMAT', 'F j, Y g:i a');
define('DEFAULT_DATETIME_MOMENT_FORMAT', 'MMM D, YYYY h:mm:ss a');
define('DEFAULT_QUERY_CACHE', 120); // minutes
define('DEFAULT_LOCALE', 'en');

View File

@ -2409,6 +2409,10 @@ textarea.form-control {
min-height: 40px;
}
/*tables*/
table.data-table td {
height: 38px !important;
}
table.dataTable { border-radius: 3px; border-collapse: collapse;
/*border-spacing: 0;*/}
table.dataTable thead > tr > th, table.invoice-table thead > tr > th {

View File

@ -59,6 +59,10 @@ textarea.form-control {
min-height: 40px;
}
/*tables*/
table.data-table td {
height: 38px !important;
}
table.dataTable { border-radius: 3px; border-collapse: collapse;
/*border-spacing: 0;*/}
table.dataTable thead > tr > th, table.invoice-table thead > tr > th {

View File

@ -31616,6 +31616,7 @@ NINJA.decodeJavascript = function(invoice, javascript)
'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22,
'invoiceLineItems': NINJA.invoiceLines(invoice),
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
'quantityWidth': NINJA.quantityWidth(invoice),
'clientDetails': NINJA.clientDetails(invoice),
'notesAndTerms': NINJA.notesAndTerms(invoice),
'subtotals': NINJA.subtotals(invoice),
@ -31632,9 +31633,15 @@ NINJA.decodeJavascript = function(invoice, javascript)
}
for (var key in json) {
// remove trailing commas for these fields
if (['quantityWidth'].indexOf(key) >= 0) {
var regExp = new RegExp('"\\$'+key+'",', 'g');
val = json[key];
} else {
var regExp = new RegExp('"\\$'+key+'"', 'g');
var val = JSON.stringify(json[key]);
val = doubleDollarSign(val);
}
javascript = javascript.replace(regExp, val);
}
@ -31709,12 +31716,17 @@ NINJA.notesAndTerms = function(invoice)
NINJA.invoiceColumns = function(invoice)
{
if (invoice.account.hide_quantity == '1') {
return ["15%", "*", "10%", "15%"];
return ["15%", "*", "15%", "15%"];
} else {
return ["15%", "*", "10%", "auto", "15%"];
return ["15%", "*", "14%", "14%", "14%"];
}
}
NINJA.quantityWidth = function(invoice)
{
return invoice.account.hide_quantity == '1' ? '' : '"12%", ';
}
NINJA.invoiceLines = function(invoice) {
var total = 0;
var shownItem = false;

View File

@ -91,6 +91,7 @@ NINJA.decodeJavascript = function(invoice, javascript)
'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22,
'invoiceLineItems': NINJA.invoiceLines(invoice),
'invoiceLineItemColumns': NINJA.invoiceColumns(invoice),
'quantityWidth': NINJA.quantityWidth(invoice),
'clientDetails': NINJA.clientDetails(invoice),
'notesAndTerms': NINJA.notesAndTerms(invoice),
'subtotals': NINJA.subtotals(invoice),
@ -107,9 +108,15 @@ NINJA.decodeJavascript = function(invoice, javascript)
}
for (var key in json) {
// remove trailing commas for these fields
if (['quantityWidth'].indexOf(key) >= 0) {
var regExp = new RegExp('"\\$'+key+'",', 'g');
val = json[key];
} else {
var regExp = new RegExp('"\\$'+key+'"', 'g');
var val = JSON.stringify(json[key]);
val = doubleDollarSign(val);
}
javascript = javascript.replace(regExp, val);
}
@ -184,12 +191,17 @@ NINJA.notesAndTerms = function(invoice)
NINJA.invoiceColumns = function(invoice)
{
if (invoice.account.hide_quantity == '1') {
return ["15%", "*", "10%", "15%"];
return ["15%", "*", "15%", "15%"];
} else {
return ["15%", "*", "10%", "auto", "15%"];
return ["15%", "*", "14%", "14%", "14%"];
}
}
NINJA.quantityWidth = function(invoice)
{
return invoice.account.hide_quantity == '1' ? '' : '"12%", ';
}
NINJA.invoiceLines = function(invoice) {
var total = 0;
var shownItem = false;

View File

@ -715,7 +715,7 @@ return array(
'update_address' => 'Adresse Aktualisieren',
'update_address_help' => 'Kundenadresse mit den gemachten Angaben aktualisieren',
'times' => 'Zeiten',
'set_now' => 'Auf <em>Jetzt</em> setzen',
'set_now' => 'Auf Jetzt setzen',
'dark_mode' => 'Dunkler Modus',
'dark_mode_help' => 'Weißer Text auf schwarzem Hintergrund anzeigen',
'add_to_invoice' => 'Zur Rechnung :invoice hinzufügen',

View File

@ -41,7 +41,7 @@ return array(
'tax' => 'Tax',
'item' => 'Item',
'description' => 'Description',
'unit_cost' => 'Cost',
'unit_cost' => 'Unit Cost',
'quantity' => 'Quantity',
'line_total' => 'Line Total',
'subtotal' => 'Subtotal',
@ -715,7 +715,7 @@ return array(
'update_address' => 'Update Address',
'update_address_help' => 'Update client\'s address with provided details',
'times' => 'Times',
'set_now' => 'Set to <em>now</em>',
'set_now' => 'Set to now',
'dark_mode' => 'Dark Mode',
'dark_mode_help' => 'Show white text on black background',
'add_to_invoice' => 'Add to invoice :invoice',

View File

@ -41,7 +41,13 @@
<label for="simple-time" class="control-label col-lg-4 col-sm-4">
</label>
<div class="col-lg-8 col-sm-8" style="padding-top: 10px">
<p>{{ $task->getStartTime() }} {{ $timezone }}<p/>
<p>{{ $task->getStartTime() }} -
@if (Auth::user()->account->timezone_id)
{{ $timezone }}
@else
{!! link_to('/company/details?focus=timezone_id', $timezone, ['target' => '_blank']) !!}
@endif
<p/>
@if ($task->hasPreviousDuration())
{{ trans('texts.duration') . ': ' . gmdate('H:i:s', $task->getDuration()) }}<br/>

View File

@ -44,7 +44,7 @@
"style": "invoiceLineItemsTable",
"table": {
"headerRows": 1,
"widths": "$invoiceLineItemColumns",
"widths": ["15%", "*", "12%", "$quantityWidth", "22%"],
"body": "$invoiceLineItems"
},
"layout": {
@ -163,6 +163,16 @@
"fontSize": 12,
"bold": true
},
"costTableHeader": {
"alignment": "right"
},
"qtyTableHeader": {
"alignment": "right"
},
"lineTotalTableHeader": {
"alignment": "right",
"margin": [0, 0, 40, 0]
},
"productKey": {
"color": "$primaryColor:#36a498",
"margin": [40,0,0,0],

View File

@ -150,6 +150,15 @@
"bold": true,
"fontSize": "$fontSizeLarger"
},
"costTableHeader": {
"alignment": "right"
},
"qtyTableHeader": {
"alignment": "right"
},
"lineTotalTableHeader": {
"alignment": "right"
},
"invoiceLineItemsTable": {
"margin": [0, 16, 0, 16]
},

View File

@ -177,6 +177,15 @@
"color": "#FFFFFF",
"fontSize": "$fontSizeLargest"
},
"costTableHeader": {
"alignment": "right"
},
"qtyTableHeader": {
"alignment": "right"
},
"lineTotalTableHeader": {
"alignment": "right"
},
"balanceDueLabel": {
"fontSize": "$fontSizeLargest",
"color":"#FFFFFF",

View File

@ -110,6 +110,15 @@
"tableHeader": {
"bold": true
},
"costTableHeader": {
"alignment": "right"
},
"qtyTableHeader": {
"alignment": "right"
},
"lineTotalTableHeader": {
"alignment": "right"
},
"invoiceLineItemsTable": {
"margin": [0, 16, 0, 16]
},