1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-03-23 17:49:14 +02:00
parent c4665f84f0
commit 3bbb156124
6 changed files with 18 additions and 23 deletions

View File

@ -456,7 +456,7 @@
if (isStorageSupported()) {
@if (Auth::check() && !Auth::user()->registered)
localStorage.setItem('guest_key', '{{ Auth::user()->password }}');
@endif
@endif
}
@if (!Auth::check() || !Auth::user()->registered)

View File

@ -74,7 +74,7 @@
<div class="col-md-3 center-block">
<a href="#">
<div class="cta">
<h2 onclick="getStarted()">Invoice Now <span>+</span></h2>
<h2 onclick="return getStarted()">Invoice Now <span>+</span></h2>
</div>
</a>
</div>

View File

@ -53,18 +53,6 @@ var contactForm = {
}
};
function isStorageSupported() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
function getStarted() {
$('#startForm').submit();
}
</script>
<section class="hero4" data-speed="2" data-type="background">
@ -139,7 +127,7 @@ function getStarted() {
<div class="col-md-3 center-block">
<a href="#">
<div class="cta">
<h2 onclick="getStarted()">Invoice Now <span>+</span></h2>
<h2 onclick="return getStarted()">Invoice Now <span>+</span></h2>
</div>
</a>
</div>

View File

@ -27,22 +27,31 @@
<script>
$(document).ready(function () {
$(document).ready(function () {
if (isStorageSupported()) {
$('[name="guest_key"]').val(localStorage.getItem('guest_key'));
}
});
function isStorageSupported() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
if ('localStorage' in window && window['localStorage'] !== null) {
var storage = window.localStorage;
} else {
return false;
}
var testKey = 'test';
try {
storage.setItem(testKey, '1');
storage.removeItem(testKey);
return true;
} catch (error) {
return false;
}
}
function getStarted() {
$('#startForm').submit();
return false;
}
</script>

View File

@ -27,7 +27,7 @@
<div class="col-md-3 center-block">
<a href="#">
<div class="cta">
<h2 id="startButton" onclick="getStarted()">Invoice Now <span>+</span></h2>
<h2 id="startButton" onclick="return getStarted()">Invoice Now <span>+</span></h2>
</div>
</a>
</div>
@ -102,7 +102,7 @@
<div class="col-md-3 center-block">
<a href="#">
<div class="cta">
<h2 onclick="getStarted()">Invoice Now <span>+</span></h2>
<h2 onclick="return getStarted()">Invoice Now <span>+</span></h2>
</div>
</a>
</div>

View File

@ -793,8 +793,6 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
function GetReportTemplate2(doc, invoice, layout, checkMath)
{
var GlobalY=0;//Y position of line at current page