1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-18 23:42:25 +02:00

bug fixes

This commit is contained in:
Hillel Coren 2013-12-17 15:14:47 +02:00
parent 6660a7540b
commit 2b4245a64f
7 changed files with 25 additions and 50 deletions

0
LICENSE Executable file → Normal file
View File

2
README.md Executable file → Normal file
View File

@ -56,5 +56,5 @@ Configure config/database.php and then initialize the database
* [webpatser/laravel-countries](https://github.com/webpatser/laravel-countries) - Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries
* [briannesbitt/Carbon](https://github.com/briannesbitt/Carbon) - A simple API extension for DateTime with PHP 5.3+
* [thomaspark/bootswatch](https://github.com/thomaspark/bootswatch) - Themes for Bootstrap
* [mozilla/pdf.js)](https://github.com/mozilla/pdf.js) - PDF Reader in JavaScript
* [mozilla/pdf.js](https://github.com/mozilla/pdf.js) - PDF Reader in JavaScript
* [nnnick/Chart.js](https://github.com/nnnick/Chart.js) - Simple HTML5 Charts using the <canvas> tag

0
app/libraries/entity.php Executable file → Normal file
View File

0
app/models/Invitation.php Executable file → Normal file
View File

View File

@ -16,6 +16,9 @@
//dd(new DateTime());
//Event::fire('user.signup');
include(app_path().'/libraries/utils.php'); // TODO_FIX
include(app_path().'/handlers/UserEventHandler.php'); // TODO_FIX
Route::get('/send_emails', function() {
Artisan::call('ninja:send-invoices');
});

View File

@ -279,11 +279,10 @@
$input.combobox();
$('.client_select input.form-control').on('change', function(e) {
var clientId = parseInt($('input[name=client]').val(), 10);
//$('#modalLink').text(clientId ? 'Edit client details' : 'Create new client');
if (clientId > 0) {
ko.mapping.fromJS(clientMap[clientId], model.client.mapping, model.client);
if (clientId > 0) {
model.loadClient(clientMap[clientId]);
} else {
model.client.public_id(0);
model.client.public_id(0); // TODO_FIX
}
}).trigger('change');
@ -293,14 +292,18 @@
//$('[name="client_combobox"]').focus();
@endif
/*
$('#myModal').on('hidden.bs.modal', function () {
$('#popup_client_name').val('');
if (model.clientBackup) {
console.log("Loading backup");
//console.log(model.clientBackup);
model.loadClient(model.clientBackup);
refreshPDF();
}
})
*/
$('#myModal').on('shown.bs.modal', function () {
$('#name').focus();
$('#name').focus();
})
$('#actionDropDown > button:first').click(function() {
@ -311,7 +314,7 @@
applyComboboxListeners();
refreshPDF();
});
});
function applyComboboxListeners() {
var value;
@ -457,6 +460,11 @@
}
}
self.loadClient = function(client) {
//console.log(client);
ko.mapping.fromJS(client, model.client.mapping, model.client);
}
self.wrapped_terms = ko.computed({
read: function() {
return this.terms();
@ -474,6 +482,9 @@
});
self.showClientForm = function() {
self.clientBackup = ko.mapping.toJS(self.client);
console.log(self.clientBackup);
if (self.client.public_id() == 0) {
$('#myModal input').val('');
$('#myModal #country_id').val('');
@ -501,7 +512,7 @@
$('.client_select input.form-control').focus();
refreshPDF();
model.clientBackup = false;
$('#myModal').modal('hide');
}

View File

@ -1,39 +0,0 @@
@extends('header')
@section('head')
@parent
<script src="{{ asset('js/chart.js') }}" type="text/javascript"></script>
@stop
@section('content')
<center style="padding-top: 40px">
<canvas id="monthly-reports" width="800" height="300"></canvas>
</center>
<script type="text/javascript">
var ctx = document.getElementById('monthly-reports').getContext('2d');
var chart = {
labels: {{ json_encode($dates)}},
datasets: [{
data: {{ json_encode($totals) }},
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
}]
}
var options = {
scaleOverride: true,
scaleSteps: 10,
scaleStepWidth: {{ $scaleStepWidth }},
scaleStartValue: 0,
scaleLabel : "<%=formatMoney(value)%>",
};
new Chart(ctx).Bar(chart, options);
</script>
@stop