1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00

bug fixes

This commit is contained in:
Hillel Coren 2014-03-10 13:04:15 +02:00
parent 388ca323c8
commit 78be769c8d
4 changed files with 40 additions and 23 deletions

View File

@ -217,7 +217,7 @@
<h4 class="modal-title" id="myModalLabel">Sign up</h4>
</div>
<div style="background-color: #fff; padding-right:20px" id="signUpDiv" onkeyup="validateSignUp()" onkeydown="checkForEnter(event)">
<div style="background-color: #fff; padding-right:20px" id="signUpDiv" onkeyup="validateSignUp()" onclick="validateSignUp()" onkeydown="checkForEnter(event)">
<br/>
{{ Former::open('signup/submit')->addClass('signUpForm') }}
@ -233,10 +233,15 @@
{{ Former::text('new_last_name')->label('Last name') }}
{{ Former::text('new_email')->label('Email') }}
{{ Former::password('new_password')->label('Password') }}
{{ Former::checkbox('terms_checkbox')->label(' ')->text('I agree to the Invoice Ninja <a href="#" target="_blank">Terms of Service</a>') }}
{{ Former::close() }}
<center><div id="errorTaken" style="display:none">&nbsp;<br/>The email address is already regiestered</div></center>
<br/>
</div>
<div style="padding-left:40px;padding-right:40px;display:none;min-height:130px" id="working">
@ -256,7 +261,7 @@
<div class="modal-footer" id="signUpFooter" style="margin-top: 0px">
<button type="button" class="btn btn-default" data-dismiss="modal">Close <i class="glyphicon glyphicon-remove-circle"></i></button>
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()">Save <i class="glyphicon glyphicon-floppy-disk"></i></button>
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>Save <i class="glyphicon glyphicon-floppy-disk"></i></button>
</div>
</div>
</div>
@ -285,7 +290,7 @@
</div>
@endif
@if (App::environment() != ENV_PRODUCTION)
@if ($_SERVER['SERVER_NAME'] != 'www.invoiceninja.com')
<div class="container">Powered by <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
@endif
@ -323,6 +328,13 @@
}
}
});
if (!$('#terms_checkbox').is(':checked')) {
isFormValid = false;
}
$('#saveSignUpButton').prop('disabled', !isFormValid);
return isFormValid;
}

View File

@ -63,16 +63,16 @@
<div class="col-md-4" id="col_2">
<div data-bind="visible: !is_recurring()">
{{ Former::text('invoice_date')->data_bind("datePicker: invoice_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'invoice_date\')"></i>') }}
{{ Former::text('due_date')->data_bind("datePicker: due_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'due_date\')"></i>') }}
</div>
<div data-bind="visible: is_recurring" style="display: none">
{{ Former::select('frequency_id')->label('How often')->options($frequencies)->data_bind("value: frequency_id") }}
{{ Former::text('start_date')->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'start_date\')"></i>') }}
{{ Former::text('end_date')->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'end_date\')"></i>') }}
</div>
@if ($invoice && $invoice->recurring_invoice_id)
<div class="pull-right" style="padding-top: 6px">
@ -138,7 +138,7 @@
<td>
<input onkeyup="onItemChange()" data-bind="value: prettyQty, valueUpdate: 'afterkeydown'" style="text-align: right" class="form-control"//>
</td>
<td style="display:none;vertical-align:middle" data-bind="visible: $root.invoice_item_taxes.show">
<td style="display:none;" data-bind="visible: $root.invoice_item_taxes.show">
<select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select>
</td>
<td style="text-align:right;padding-top:9px !important">
@ -176,9 +176,9 @@
<tr style="display:none" data-bind="visible: $root.invoice_taxes.show">
<td class="hide-border" colspan="3"/>
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
<td style="vertical-align: middle">Tax</td>
<td>Tax</td>
<td style="min-width:120px"><select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select></td>
<td style="vertical-align: middle; text-align: right"><span data-bind="text: totals.taxAmount"/></td>
<td style="text-align: right"><span data-bind="text: totals.taxAmount"/></td>
</tr>
<tr>
<td class="hide-border" colspan="3"/>
@ -579,6 +579,10 @@
return invoice;
}
function toggleDatePicker(field) {
$('#'+field).datepicker('show');
}
/*
function refreshPDF() {
setTimeout(function() {
@ -589,13 +593,15 @@
var isRefreshing = false;
var needsRefresh = false;
function refreshPDF() {
function getPDFString() {
var invoice = createInvoiceModel();
var doc = generatePDF(invoice);
if (!doc) return;
var string = doc.output('datauristring');
return doc.output('datauristring');
}
function refreshPDF() {
if (isFirefox || (isChrome && !isChromium)) {
var string = getPDFString();
$('#theFrame').attr('src', string).show();
} else {
if (isRefreshing) {
@ -603,7 +609,7 @@
return;
}
isRefreshing = true;
var string = getPDFString();
var pdfAsArray = convertDataURIToBinary(string);
PDFJS.getDocument(pdfAsArray).then(function getPdfHelloWorld(pdf) {

View File

@ -60,7 +60,7 @@ min-height: 40px;
table.dataTable { border-radius: 3px; border-collapse: collapse;
/*border-spacing: 0;*/}
table.dataTable thead > tr > th, table.invoice-table thead > tr > th {
background: #e37329 !important;
background-color: #e37329 !important;
color:#fff;
}
th:first-child {
@ -223,7 +223,7 @@ margin-left: 10px !important;
/*new*/
div {
word-break: break-word;
word-break: break-all;
}
div.required > label {

View File

@ -625,7 +625,6 @@ $.fn.datepicker.defaults.todayHighlight = true;
//====================================================================================================================
function GetPdf(invoice,checkMath,report_id){
var layout = {
accountTop: 30,
marginLeft: 50,
@ -1534,7 +1533,7 @@ function displayInvoiceItems(doc, invoice, layout) {
for (var i=0; i<invoice.invoice_items.length; i++) {
var item = invoice.invoice_items[i];
var numLines = doc.splitTextToSize(item.notes, 200).length + 2;
console.log('num lines %s', numLines);
//console.log('num lines %s', numLines);
var y = tableTop + (line * layout.tableRowHeight) + (2 * layout.tablePadding);
var top = y - layout.tablePadding;