From 74f612657575b959bca5bf3ff0205ec922034fe2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 14 Feb 2016 23:47:33 +0200 Subject: [PATCH 01/12] Updated readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0e2ce989ff04..d9f7f05a2bbc 100644 --- a/readme.md +++ b/readme.md @@ -55,7 +55,7 @@ There are two options: * [Feature Roadmap](https://trello.com/b/63BbiVVe/) ### Pull Requests -We're using the [git-flow](http://nvie.com/posts/a-successful-git-branching-model/) model of branching and releasing, **please create pull requests against the develop branch**. +We're using the [Git-Flow](http://nvie.com/posts/a-successful-git-branching-model/) model of branching and releasing, **please create pull requests against the develop branch**. ### Contributors * [Troels Liebe Bentsen](https://github.com/tlbdk) From da83776aa9a1d5216faa83efb0c62a7c6e72504d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 15 Feb 2016 10:43:40 +0200 Subject: [PATCH 02/12] Fixed new header/footer settings --- public/built.js | 4 ++-- public/js/pdf.pdfmake.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/built.js b/public/built.js index 417e368dcb15..4566f5eeb0e0 100644 --- a/public/built.js +++ b/public/built.js @@ -30967,11 +30967,11 @@ function GetPdfMake(invoice, javascript, callback) { if (invoice.is_pro) { if (key === 'header') { return function(page, pages) { - return page === 1 || account.all_pages_header ? val : ''; + return page === 1 || invoice.account.all_pages_header == '1' ? val : ''; } } else if (key === 'footer') { return function(page, pages) { - return page === pages || account.all_pages_footer ? val : ''; + return page === pages || invoice.account.all_pages_footer == '1' ? val : ''; } } } diff --git a/public/js/pdf.pdfmake.js b/public/js/pdf.pdfmake.js index 64eb33811baf..58ddd24d2db7 100644 --- a/public/js/pdf.pdfmake.js +++ b/public/js/pdf.pdfmake.js @@ -58,11 +58,11 @@ function GetPdfMake(invoice, javascript, callback) { if (invoice.is_pro) { if (key === 'header') { return function(page, pages) { - return page === 1 || account.all_pages_header ? val : ''; + return page === 1 || invoice.account.all_pages_header == '1' ? val : ''; } } else if (key === 'footer') { return function(page, pages) { - return page === pages || account.all_pages_footer ? val : ''; + return page === pages || invoice.account.all_pages_footer == '1' ? val : ''; } } } From 3520c0fa79284aa89534424e2566fca927d072ea Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 15 Feb 2016 19:39:26 +0200 Subject: [PATCH 03/12] Added custom invoice text fields to transformer --- app/Ninja/Transformers/InvoiceTransformer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Ninja/Transformers/InvoiceTransformer.php b/app/Ninja/Transformers/InvoiceTransformer.php index d673c87e95f9..171491995cbe 100644 --- a/app/Ninja/Transformers/InvoiceTransformer.php +++ b/app/Ninja/Transformers/InvoiceTransformer.php @@ -89,6 +89,8 @@ class InvoiceTransformer extends EntityTransformer 'custom_taxes2' => (bool) $invoice->custom_taxes2, 'has_expenses' => (bool) $invoice->has_expenses, 'quote_invoice_id' => (int) $invoice->quote_invoice_id, + 'custom_text_value1' => $invoice->custom_text_value1, + 'custom_text_value2' => $invoice->custom_text_value2, ]; } } From 4012bd39ed843391154346a84a82d3994ea67aeb Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 15 Feb 2016 19:39:54 +0200 Subject: [PATCH 04/12] Removed CSS break-word --- public/css/built.css | 4 ---- public/css/style.css | 4 ---- 2 files changed, 8 deletions(-) diff --git a/public/css/built.css b/public/css/built.css index a93d1f86a77c..5a511b0f1f1b 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -2626,10 +2626,6 @@ border-radius: 3px; /*new*/ -div { - word-break: break-word; -} - div.input-group { word-break: normal; } diff --git a/public/css/style.css b/public/css/style.css index 78c44f781fe2..e469e9418d83 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -275,10 +275,6 @@ border-radius: 3px; /*new*/ -div { - word-break: break-word; -} - div.input-group { word-break: normal; } From 7c3406d9e5d6e5b0534434b7c1085c9cba8ffa2c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 15 Feb 2016 19:58:18 +0200 Subject: [PATCH 05/12] Fix for #703 --- app/Models/Account.php | 4 +++ resources/views/header.blade.php | 62 +++++++++++++++++++------------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index cca359734ee0..876804bf42a7 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -726,6 +726,10 @@ class Account extends Eloquent public function isTrial() { + if (!Utils::isNinjaProd()) { + return false; + } + if ($this->pro_plan_paid && $this->pro_plan_paid != '0000-00-00') { return false; } diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index 5b7ff15ba803..74d293ed4232 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -258,20 +258,12 @@ localStorage.setItem('auth_provider', provider); } - $(function() { - window.setTimeout(function() { - $(".alert-hide").fadeOut(); - }, 3000); - - $('#search').blur(function(){ - $('#search').css('width', '110px'); - $('ul.navbar-right').show(); - }); - - $('#search').focus(function(){ - $('#search').css('width', '224px'); - $('ul.navbar-right').hide(); - if (!window.hasOwnProperty('searchData')) { + function showSearch() { + $('#search-form').show(); + $('#navbar-options').hide(); + if (window.hasOwnProperty('searchData')) { + $('#search').focus(); + } else { trackEvent('/activity', '/search'); $.get('{{ URL::route('getSearchData') }}', function(data) { window.searchData = true; @@ -291,11 +283,25 @@ $('#search').typeahead(datasets).on('typeahead:selected', function(element, datum, name) { var type = name == 'Contacts' ? 'clients' : name.toLowerCase(); window.location = '{{ URL::to('/') }}' + '/' + type + '/' + datum.public_id; - }).focus().typeahead('setQuery', $('#search').val()); + }).focus().typeahead('setQuery', $('#search').val()); }); - } - }); + } + } + function hideSearch() { + $('#search').typeahead('setQuery', ''); + $('#search-form').hide(); + $('#navbar-options').show(); + } + + $(function() { + window.setTimeout(function() { + $(".alert-hide").fadeOut(); + }, 3000); + + $('#search').blur(function(){ + hideSearch(); + }); if (isStorageSupported()) { @if (Auth::check() && !Auth::user()->registered) @@ -378,18 +384,19 @@ {!! HTML::menu_link('payment') !!} +