diff --git a/.gitignore b/.gitignore
index 4f688793b45c..517c11cf5b8e 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/app/config/staging
+/public/logo
/bootstrap/compiled.php
/vendor
composer.phar
diff --git a/README.md b/README.md
index e84c2f08a7f9..8543564af897 100644
--- a/README.md
+++ b/README.md
@@ -55,4 +55,5 @@ Configure config/database.php and then initialize the database
* [Intervention/image](https://github.com/Intervention/image) - PHP Image Manipulation
* [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
\ No newline at end of file
+* [thomaspark/bootswatch](https://github.com/thomaspark/bootswatch) - Themes for Bootstrap
+* [mozilla/pdf.js)](https://github.com/mozilla/pdf.js) - PDF Reader in JavaScript
\ No newline at end of file
diff --git a/app/views/clients/show.blade.php b/app/views/clients/show.blade.php
index a6dd573cc005..f1577c77ef91 100755
--- a/app/views/clients/show.blade.php
+++ b/app/views/clients/show.blade.php
@@ -20,7 +20,7 @@
)
)
, array('id'=>'actionDropDown'))->split(); }}
- {{ Button::primary_link(URL::to('invoices/create/' . $client->id), 'Create Invoice') }}
+ {{ Button::primary_link(URL::to('invoices/create/' . $client->public_id), 'Create Invoice') }}
{{ Former::close() }}
diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php
index 2ee9b1c06a1a..44adbd676908 100755
--- a/app/views/invoices/edit.blade.php
+++ b/app/views/invoices/edit.blade.php
@@ -153,7 +153,7 @@
-
+
@@ -262,7 +262,7 @@
//enableHoverClick($('.combobox-container input.form-control'), $('.combobox-container input[name=client]'), '{{ URL::to('clients') }}');
@if ($client)
- $('input#invoice_number').focus();
+ $('#invoice_number').focus();
@else
//$('[name="client_combobox"]').focus();
@endif
@@ -386,21 +386,6 @@
}
- var BASE64_MARKER = ';base64,';
- function convertDataURIToBinary(dataURI) {
- var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
- var base64 = dataURI.substring(base64Index);
- var raw = window.atob(base64);
- var rawLength = raw.length;
- var array = new Uint8Array(new ArrayBuffer(rawLength));
-
- for(i = 0; i < rawLength; i++) {
- array[i] = raw.charCodeAt(i);
- }
- return array;
- }
-
-
function _refreshPDF() {
var invoice = createInvoiceModel();
var doc = generatePDF(invoice);
@@ -421,8 +406,7 @@
page.render({canvasContext: context, viewport: viewport});
});
- });
-
+ });
//$('iframe').attr('src', string);
}
@@ -430,7 +414,7 @@
function onDownloadClick() {
var invoice = createInvoiceModel();
var doc = generatePDF(invoice);
- doc.save('Invoice-' + $('#number').val() + '.pdf');
+ doc.save('Invoice-' + $('#invoice_number').val() + '.pdf');
}
function onEmailClick() {
@@ -460,13 +444,12 @@
$('select#client').combobox('setSelected');
$('input[name=client]').val('-1');
$('.client_select input.form-control').val(name);
- $('.client_select').addClass('combobox-selected');
+ $('.client_select .combobox-container').addClass('combobox-selected');
$('#nameError').css( "display", "none" );
$('#modalLink').text('Edit client details');
$('#myModal').modal('hide');
- $('.client_select input.form-control').focus();
- //$('[name="client_combobox"]').focus();
+ $('.client_select input.form-control').focus();
refreshPDF();
}
diff --git a/app/views/invoices/view.blade.php b/app/views/invoices/view.blade.php
index a9e255a0460d..9426a927d32f 100755
--- a/app/views/invoices/view.blade.php
+++ b/app/views/invoices/view.blade.php
@@ -1,18 +1,29 @@
@extends('header')
+@section('head')
+ @parent
+
+
+
+@stop
+
@section('content')
- @if ($invoice->client->account->isGatewayConfigured())
- {{ Button::primary_link(URL::to('payment/' . $invitation->invitation_key), 'Pay Now', array('class' => 'btn-lg pull-right')) }}
-
- @endif
+
+ {{ Button::normal('Download PDF', array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}
+ @if ($invoice->client->account->isGatewayConfigured())
+ {{ Button::primary_link(URL::to('payment/' . $invitation->invitation_key), 'Pay Now', array('class' => 'btn-lg pull-right')) }}
+ @endif
+
+
+
+
+
-
-
@stop
\ No newline at end of file
diff --git a/public/js/bootstrap-combobox.js b/public/js/bootstrap-combobox.js
index f8cd79d32987..928d795abb8e 100755
--- a/public/js/bootstrap-combobox.js
+++ b/public/js/bootstrap-combobox.js
@@ -233,6 +233,10 @@
this.lookup();
}
}
+
+ this.$element.trigger('change');
+ this.$target.trigger('change');
+ this.$source.trigger('change');
}
, clearElement: function () {
diff --git a/public/js/pdf_viewer.worker.js b/public/js/pdf_viewer.worker.js
index 74716c61ba48..88c439d8dfb3 100755
--- a/public/js/pdf_viewer.worker.js
+++ b/public/js/pdf_viewer.worker.js
@@ -187,7 +187,7 @@ var log = (function() {
// disabled, which is important to devs but not end users.
function info(msg) {
if (verbosity >= INFOS) {
- log('Info: ' + msg);
+ //log('Info: ' + msg);
PDFJS.LogManager.notify('info', msg);
}
}
@@ -195,7 +195,7 @@ function info(msg) {
// Non-fatal warnings that should trigger the fallback UI.
function warn(msg) {
if (verbosity >= WARNINGS) {
- log('Warning: ' + msg);
+ //log('Warning: ' + msg);
PDFJS.LogManager.notify('warn', msg);
}
}
@@ -34845,8 +34845,8 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
// Pre compile the pdf page and fetch the fonts/images.
page.getOperatorList(handler).then(function(operatorList) {
- log('page=%d - getOperatorList: time=%dms, len=%d', pageNum,
- Date.now() - start, operatorList.fnArray.length);
+ //log('page=%d - getOperatorList: time=%dms, len=%d', pageNum,
+ // Date.now() - start, operatorList.fnArray.length);
}, function(e) {
diff --git a/public/js/script.js b/public/js/script.js
index 388b0c46792d..35eb0ee55580 100755
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -438,4 +438,19 @@ function setComboboxValue($combobox, id, name) {
} else {
$combobox.find('.combobox-container').removeClass('combobox-selected');
}
+}
+
+
+var BASE64_MARKER = ';base64,';
+function convertDataURIToBinary(dataURI) {
+ var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
+ var base64 = dataURI.substring(base64Index);
+ var raw = window.atob(base64);
+ var rawLength = raw.length;
+ var array = new Uint8Array(new ArrayBuffer(rawLength));
+
+ for(i = 0; i < rawLength; i++) {
+ array[i] = raw.charCodeAt(i);
+ }
+ return array;
}
\ No newline at end of file