mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Bug fixes
This commit is contained in:
parent
b95e7445c9
commit
7273e39f1e
@ -144,7 +144,7 @@ class InvoiceRepository extends BaseRepository
|
||||
if ((isset($data['set_default_terms']) && $data['set_default_terms'])
|
||||
|| (isset($data['set_default_footer']) && $data['set_default_footer'])) {
|
||||
if (isset($data['set_default_terms']) && $data['set_default_terms']) {
|
||||
$account->{"{$entityType}_terms"} = trim($data['terms']);
|
||||
$account->{"{$invoice->getEntityType()}_terms"} = trim($data['terms']);
|
||||
}
|
||||
if (isset($data['set_default_footer']) && $data['set_default_footer']) {
|
||||
$account->invoice_footer = trim($data['invoice_footer']);
|
||||
|
@ -31571,6 +31571,16 @@ function truncate(string, length){
|
||||
return string;
|
||||
}
|
||||
};
|
||||
|
||||
function actionListHandler() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('display', 'inline-block');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'none');
|
||||
}).mouseout(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('display', 'none');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'inline-block');
|
||||
});
|
||||
}
|
||||
var NINJA = NINJA || {};
|
||||
|
||||
NINJA.TEMPLATES = {
|
||||
|
@ -1693,3 +1693,13 @@ function truncate(string, length){
|
||||
return string;
|
||||
}
|
||||
};
|
||||
|
||||
function actionListHandler() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('display', 'inline-block');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'none');
|
||||
}).mouseout(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('display', 'none');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'inline-block');
|
||||
});
|
||||
}
|
@ -911,6 +911,7 @@ return array(
|
||||
|
||||
'before' => 'Before',
|
||||
'after' => 'After',
|
||||
|
||||
'reset_terms_help' => 'Reset to the default account terms',
|
||||
'reset_footer_help' => 'Reset to the default account footer',
|
||||
|
||||
);
|
||||
|
@ -37,21 +37,14 @@
|
||||
->render('datatable') !!}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
||||
}).mouseout(function() {
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('visibility','hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.onDatatableReady = actionListHandler;
|
||||
|
||||
function setTrashVisible() {
|
||||
var checked = $('#trashed').is(':checked');
|
||||
window.location = '{!! URL::to('view_archive/token') !!}' + (checked ? '/true' : '/false');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
@ -27,16 +27,7 @@
|
||||
->render('datatable') !!}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
||||
}).mouseout(function() {
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('visibility','hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
window.onDatatableReady = actionListHandler;
|
||||
</script>
|
||||
|
||||
@stop
|
@ -42,16 +42,7 @@
|
||||
->render('datatable') !!}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
||||
}).mouseout(function() {
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('visibility','hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
window.onDatatableReady = actionListHandler;
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -65,16 +65,7 @@
|
||||
->render('datatable') !!}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
||||
}).mouseout(function() {
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('visibility','hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
window.onDatatableReady = actionListHandler;
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -34,16 +34,8 @@
|
||||
->render('datatable') !!}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('visibility','visible');
|
||||
}).mouseout(function() {
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('visibility','hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.onDatatableReady = actionListHandler;
|
||||
|
||||
function setTrashVisible() {
|
||||
var checked = $('#trashed').is(':checked');
|
||||
|
@ -251,7 +251,9 @@
|
||||
<label>
|
||||
<input name="set_default_terms" type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>'.trans('texts.save_as_default_terms').'
|
||||
</label>
|
||||
<div class="pull-right"><a href="#" onclick="return resetTerms()">' . trans("texts.reset_terms") . '</a></div>
|
||||
<div class="pull-right" data-bind="visible: showResetTerms()">
|
||||
<a href="#" onclick="return resetTerms()" title="'. trans('texts.reset_terms_help') .'">' . trans("texts.reset_terms") . '</a>
|
||||
</div>
|
||||
</div>') !!}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="footer">
|
||||
@ -261,7 +263,9 @@
|
||||
<label>
|
||||
<input name="set_default_footer" type="checkbox" style="width: 24px" data-bind="checked: set_default_footer"/>'.trans('texts.save_as_default_footer').'
|
||||
</label>
|
||||
<div class="pull-right"><a href="#" onclick="return resetFooter()">' . trans("texts.reset_footer") . '</a></div>
|
||||
<div class="pull-right" data-bind="visible: showResetFooter()">
|
||||
<a href="#" onclick="return resetFooter()" title="'. trans('texts.reset_footer_help') .'">' . trans("texts.reset_footer") . '</a>
|
||||
</div>
|
||||
</div>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -514,6 +514,14 @@ function InvoiceModel(data) {
|
||||
self.onDragged = function(item) {
|
||||
refreshPDF(true);
|
||||
}
|
||||
|
||||
self.showResetTerms = function() {
|
||||
return self.default_terms() && self.terms() != self.default_terms();
|
||||
}
|
||||
|
||||
self.showResetFooter = function() {
|
||||
return self.default_footer() && self.invoice_footer() != self.default_footer();
|
||||
}
|
||||
}
|
||||
|
||||
function ClientModel(data) {
|
||||
|
@ -134,20 +134,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('tbody tr').mouseover(function() {
|
||||
$(this).closest('tr').find('.tr-action').css('display', 'inline-block');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'none');
|
||||
}).mouseout(function() {
|
||||
//$(this).closest('tr').find('.tr-action').css('display', 'none');
|
||||
|
||||
$dropdown = $(this).closest('tr').find('.tr-action');
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.css('display', 'none');
|
||||
$(this).closest('tr').find('.tr-status').css('display', 'inline-block');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
actionListHandler();
|
||||
}
|
||||
|
||||
$('.archive, .invoice').prop('disabled', true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user