Updated version

This commit is contained in:
Hillel Coren 2015-10-16 08:32:02 +03:00
parent 1ab154aba9
commit c24b2f352d
24 changed files with 90 additions and 107 deletions

View File

@ -490,7 +490,7 @@ class AccountController extends BaseController
}
$labels = [];
foreach (['item', 'description', 'unit_cost', 'quantity'] as $field) {
foreach (['item', 'description', 'unit_cost', 'quantity', 'line_total'] as $field) {
$labels[$field] = trim(Input::get("labels_{$field}"));
}
$account->invoice_labels = json_encode($labels);

View File

@ -391,7 +391,7 @@ if (!defined('CONTACT_EMAIL')) {
define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com');
define('NINJA_VERSION', '2.4.2');
define('NINJA_VERSION', '2.4.3');
define('NINJA_DATE', '2000-01-01');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');

View File

@ -26,8 +26,8 @@ class Account extends Eloquent
];
public static $advancedSettings = [
ACCOUNT_INVOICE_DESIGN,
ACCOUNT_INVOICE_SETTINGS,
ACCOUNT_INVOICE_DESIGN,
ACCOUNT_TEMPLATES_AND_REMINDERS,
ACCOUNT_CHARTS_AND_REPORTS,
ACCOUNT_DATA_VISUALIZATIONS,

View File

@ -822,4 +822,9 @@
'gateways' => 'Payment Gateways',
'recurring_too_soon' => 'Det er for tidligt at generere den næste faktura, it\'s scheduled for :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -822,5 +822,10 @@ return array(
'gateways' => 'Payment Gateways',
'recurring_too_soon' => 'Es ist zu früh, um die nächste wiederkehrende Rechnung zu erstellen, it\'s scheduled for :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -789,7 +789,7 @@ return array(
'referral_program' => 'Referral Program',
'referral_code' => 'Referral Code',
'last_sent_on' => 'Sent last: :date',
'last_sent_on' => 'Sent Last: :date',
'page_expire' => 'This page will expire soon, :click_here to keep working',
'upcoming_quotes' => 'Upcoming Quotes',
@ -822,7 +822,7 @@ return array(
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send next: :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',

View File

@ -800,5 +800,10 @@ return array(
'gateways' => 'Payment Gateways',
'recurring_too_soon' => 'Es my pronto para crear la siguiente factura recurrente, it\'s scheduled for :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -821,4 +821,9 @@ return array(
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -814,5 +814,10 @@ return array(
'gateways' => 'Payment Gateways',
'recurring_too_soon' => 'Il est trop tôt pour créer la prochaine facture récurrente, it\'s scheduled for :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -815,5 +815,10 @@ return array(
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -816,5 +816,10 @@ return array(
'basic_settings' => 'Basic Settings',
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -823,6 +823,11 @@ return array(
'basic_settings' => 'Basic Settings',
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -821,5 +821,10 @@ return array(
'basic_settings' => 'Basic Settings',
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -816,5 +816,10 @@ return array(
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'recurring_too_soon' => 'Het is te vroeg om de volgende wederkerende factuur aan te maken, it\'s scheduled for :date',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -816,5 +816,10 @@ return array(
'basic_settings' => 'Basic Settings',
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -819,5 +819,10 @@ return array(
'basic_settings' => 'Basic Settings',
'pro' => 'Pro',
'gateways' => 'Payment Gateways',
'next_send_on' => 'Send Next: :date',
'no_longer_running' => 'This invoice is not scheduled to run',
'general_settings' => 'General Settings',
'customize' => 'Customize',
);

View File

@ -153,16 +153,14 @@
<div class="pull-right">
{!! Button::normal(trans('texts.help'))->withAttributes(['onclick' => 'showHelp()'])->appendIcon(Icon::create('question-sign')) !!}
{!! Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/settings/invoice_design'))->appendIcon(Icon::create('remove-circle')) !!}
@if (Auth::user()->isPro())
{!! Button::success(trans('texts.save'))->withAttributes(['onclick' => 'submitForm()'])->appendIcon(Icon::create('floppy-disk')) !!}
@endif
{!! Button::success(trans('texts.save'))->withAttributes(['onclick' => 'submitForm()'])->appendIcon(Icon::create('floppy-disk'))->withAttributes(['class' => 'save-button']) !!}
</div>
</div>
<script>
@if (!Auth::user()->isPro())
$(function() {
$('form.warn-on-exit input').prop('disabled', true);
$('form.warn-on-exit input, .save-button').prop('disabled', true);
});
@endif

View File

@ -40,8 +40,8 @@
NINJA.secondaryColor = $('#secondary_color').val();
NINJA.fontSize = parseInt($('#font_size').val());
var fields = ['item', 'description', 'unit_cost', 'quantity'];
invoiceLabels.old = {};
var fields = ['item', 'description', 'unit_cost', 'quantity', 'line_total'];
invoiceLabels.old = {};
for (var i=0; i<fields.length; i++) {
var field = fields[i];
var val = $('#labels_' + field).val();
@ -51,9 +51,9 @@
if (val) {
invoiceLabels[field] = val;
}
}
}
generatePDF(invoice, getDesignJavascript(), true, cb);
generatePDF(invoice, getDesignJavascript(), true, cb);
}
$(function() {
@ -124,6 +124,7 @@
{!! Former::text('labels_description')->label(trans('texts.description')) !!}
{!! Former::text('labels_unit_cost')->label(trans('texts.unit_cost')) !!}
{!! Former::text('labels_quantity')->label(trans('texts.quantity')) !!}
{!! Former::text('labels_line_total')->label(trans('texts.line_total')) !!}
</div>
@ -141,17 +142,17 @@
</div>
@if (Auth::user()->isPro())
<br/>
{!! Former::actions(
Button::primary(trans('texts.customize'))->large()->asLinkTo(URL::to('/settings/customize_design')),
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))
) !!}
<br/>
@else
<br/>
{!! Former::actions(
Button::primary(trans('texts.customize'))->large()->asLinkTo(URL::to('/settings/customize_design')),
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['class' => 'save-button'])
) !!}
<br/>
@if (!Auth::user()->isPro())
<script>
$(function() {
$('form.warn-on-exit input').prop('disabled', true);
$('form.warn-on-exit input, .save-button').prop('disabled', true);
});
</script>
@endif

View File

@ -10,7 +10,7 @@
.input-group-addon div.checkbox {
display: inline;
}
span.input-group-addon {
.tab-content span.input-group-addon {
padding-right: 30px;
}
</style>
@ -147,12 +147,6 @@
<center>
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
</center>
@else
<script>
$(function() {
$('form.warn-on-exit input').prop('disabled', true);
});
</script>
@endif

View File

@ -1,72 +0,0 @@
@extends('header')
@section('content')
@parent
@include('accounts.nav', ['selected' => ACCOUNT_API_TOKENS, 'advanced' => true])
{!! Former::open('tokens/delete')->addClass('user-form') !!}
<div style="display:none">
{!! Former::text('tokenPublicId') !!}
</div>
{!! Former::close() !!}
<div class="pull-right">
{!! Button::normal(trans('texts.documentation'))->asLinkTo(NINJA_WEB_URL.'/knowledgebase/api-documentation/')->withAttributes(['target' => '_blank'])->appendIcon(Icon::create('info-sign')) !!}
@if (Utils::isNinja())
{!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
@endif
@if (Utils::isPro())
{!! Button::primary(trans('texts.add_token'))->asLinkTo(URL::to('/tokens/create'))->appendIcon(Icon::create('plus-sign')) !!}
@endif
</div>
<!--
<label for="trashed" style="font-weight:normal; margin-left: 10px;">
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
{!! Session::get('show_trash:token') ? 'checked' : ''!!}/> {!! trans('texts.show_deleted_tokens')!!}
</label>
-->
{!! Datatable::table()
->addColumn(
trans('texts.name'),
trans('texts.token'),
trans('texts.action'))
->setUrl(url('api/tokens/'))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('bAutoWidth', false)
->setOptions('aoColumns', [[ "sWidth"=> "40%" ], [ "sWidth"=> "40%" ], ["sWidth"=> "20%"]])
->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[2]]])
->render('datatable') !!}
<script>
window.onDatatableReady = function() {
$('tbody tr').mouseover(function() {
$(this).closest('tr').find('.tr-action').css('visibility','visible');
}).mouseout(function() {
$dropdown = $(this).closest('tr').find('.tr-action');
if (!$dropdown.hasClass('open')) {
$dropdown.css('visibility','hidden');
}
});
}
function setTrashVisible() {
var checked = $('#trashed').is(':checked');
window.location = '{!! URL::to('view_archive/token') !!}' + (checked ? '/true' : '/false');
}
function deleteToken(id) {
if (!confirm("{!! trans('texts.are_you_sure') !!}")) {
return;
}
$('#tokenPublicId').val(id);
$('form.user-form').submit();
}
</script>
@stop

View File

@ -441,7 +441,7 @@
@foreach (\App\Models\Account::$basicSettings as $setting)
<li>{!! link_to('settings/' . $setting, uctrans("texts.{$setting}")) !!}</li>
@endforeach
<li><a href="{{ url('settings/' . ACCOUNT_INVOICE_DESIGN) }}">{!! uctrans('texts.advanced_settings') . Utils::getProLabel(ACCOUNT_ADVANCED_SETTINGS) !!}</a></li>
<li><a href="{{ url('settings/' . ACCOUNT_INVOICE_SETTINGS) }}">{!! uctrans('texts.advanced_settings') . Utils::getProLabel(ACCOUNT_ADVANCED_SETTINGS) !!}</a></li>
</ul>
</li>
</ul>

View File

@ -119,7 +119,8 @@
{!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!} &nbsp;
@endif
@if ($invoice->is_recurring && $invoice->getNextSendDate())
{!! trans('texts.next_send_on', ['date' => '<span data-bind="tooltip: {title: \''.$invoice->getPrettySchedule().'\', html: true}">'.$account->formatDate($invoice->getNextSendDate()).'</span>']) !!}
{!! trans('texts.next_send_on', ['date' => '<span data-bind="tooltip: {title: \''.$invoice->getPrettySchedule().'\', html: true}">'.$account->formatDate($invoice->getNextSendDate()).
'<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!}
@endif
</div>
@endif

View File

@ -137,7 +137,7 @@
.endAngle(2 * Math.PI);
var diameter = 900,
var diameter = 800,
format = d3.format(",d");
//color = d3.scale.category10();
@ -171,7 +171,7 @@
data = bubble.nodes(data).filter(function(d) {
return !d.children && d.displayTotal && d.displayName;
});
});
var selection = svg.selectAll(".node")
.data(data, function(d) { return d.displayName; });

View File

@ -41,15 +41,16 @@ class InvoiceDesignCest
//$I->executeJS('$("#secondary_color + .sp-replacer .sp-preview-inner").attr("style", "background-color: rgb(254,0,50);")');
$I->executeJS('$(".sp-container:nth-child(2) .sp-choose").click()');
/*
$I->fillField(['name' => 'labels_item'], $this->faker->text(6));
$I->fillField(['name' => 'labels_description'], $this->faker->text(12));
$I->fillField(['name' => 'labels_unit_cost'], $this->faker->text(12));
$I->fillField(['name' => 'labels_quantity'], $this->faker->text(8));
$I->uncheckOption('#hide_quantity');
$I->checkOption('#hide_paid_to_date');
*/
$I->click('Save');
$I->wait(3);