Fixed some small CSS / JS problems.

This commit is contained in:
James Cole 2015-04-28 20:17:31 +02:00
parent bbab370b1e
commit b2db79cc10
3 changed files with 26 additions and 17 deletions

View File

@ -21,16 +21,6 @@ interface JournalRepositoryInterface
*/
public function first();
/**
*
* Get the account_id, which is the asset account that paid for the transaction.
*
* @param TransactionJournal $journal
*
* @return int
*/
public function getAssetAccount(TransactionJournal $journal);
/**
* @param TransactionType $dbType
*

View File

@ -10,18 +10,37 @@ $(function () {
{
helper: fixHelper,
stop: stopSorting,
handle: '.handle'
handle: '.handle',
start: function (event, ui) {
// Build a placeholder cell that spans all the cells in the row
var cellCount = 0;
$('td, th', ui.helper).each(function () {
// For each TD or TH try and get it's colspan attribute, and add that or 1 to the total
var colspan = 1;
var colspanAttr = $(this).attr('colspan');
if (colspanAttr > 1) {
colspan = colspanAttr;
}
cellCount += colspan;
});
// Add the placeholder UI - note that this is the item's content, so TD rather than TR
ui.placeholder.html('<td colspan="' + cellCount + '">&nbsp;</td>');
}
}
);
});
// Return a helper with preserved width of cells
var fixHelper = function (e, ui) {
ui.children().each(function () {
$(this).width($(this).width());
var fixHelper = function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function (index) {
// Set helper cell sizes to match the original sizes
$(this).width($originals.eq(index).width());
});
return ui;
};
return $helper;
}
function addMoney(e) {
var pigID = parseInt($(e.target).data('id'));

View File

@ -6,7 +6,7 @@
<i class="fa fa-fw fa-bars handle"></i>
<i class="loadSpin"></i>
</td>
<td style="width:80px;">
<td style="width:100px;">
<div class="btn-group btn-group-xs">
<a href="{{route('piggy-banks.edit',$piggyBank->id)}}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
<a href="{{route('piggy-banks.delete',$piggyBank->id)}}" class="btn btn-default btn-xs"><i class="fa fa-trash fa-fw"></i></a>