Merge branch 'master' of github.com:tlbdk/invoice-ninja

This commit is contained in:
Troels Liebe Bentsen 2014-11-02 18:55:33 +01:00
commit 8ba9dcbed9
7 changed files with 900 additions and 1588 deletions

View File

@ -5,9 +5,37 @@ module.exports = function(grunt) {
concat: { concat: {
options: { options: {
process: function(src, filepath) { process: function(src, filepath) {
// Fix path for image and font resources var basepath = filepath.substring(7, filepath.lastIndexOf('/') + 1);
console.log(filepath);
// Fix relative paths for css files
if(filepath.indexOf('.css', filepath.length - 4) !== -1) { if(filepath.indexOf('.css', filepath.length - 4) !== -1) {
return src.replace(/\.\.\/(images|fonts)\//g, '$1/'); return src.replace(/(url\s*[\("']+)\s*([^'"\)]+)(['"\)]+;?)/gi, function(match, start, url, end, offset, string) {
if(url.indexOf('data:') === 0) {
// Skip data urls
return match;
} else if(url.indexOf('/') === 0) {
// Skip absolute urls
return match;
} else {
return start + basepath + url + end;
}
});
// Fix source maps locations
} else if(filepath.indexOf('.js', filepath.length - 4) !== -1) {
return src.replace(/(\/[*\/][#@]\s*sourceMappingURL=)([^\s]+)/gi, function(match, start, url, offset, string) {
if(url.indexOf('/') === 0) {
// Skip absolute urls
return match;
} else {
return start + basepath + url;
}
});
// Don't do anything for unknown file types // Don't do anything for unknown file types
} else { } else {
return src; return src;

View File

@ -132,7 +132,7 @@ Route::group(array('before' => 'auth'), function()
Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable'));
Route::post('credits/bulk', 'CreditController@bulk'); Route::post('credits/bulk', 'CreditController@bulk');
Route::resource('timesheets', 'TimesheetController'); //Route::resource('timesheets', 'TimesheetController');
}); });
// Route group for API // Route group for API

View File

@ -21,13 +21,13 @@
<center id="designThumbs"> <center id="designThumbs">
<p>&nbsp;</p> <p>&nbsp;</p>
<a href="/images/designs/business.png" data-lightbox="more-designs" data-title="Business"><img src="/images/designs/business_thumb.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="{{ asset('/images/designs/business.png') }}" data-lightbox="more-designs" data-title="Business"><img src="{{ asset('/images/designs/business_thumb.png') }}"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/images/designs/creative.png" data-lightbox="more-designs" data-title="Creative"><img src="/images/designs/creative_thumb.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="{{ asset('/images/designs/creative.png') }}" data-lightbox="more-designs" data-title="Creative"><img src="{{ asset('/images/designs/creative_thumb.png') }}"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/images/designs/elegant.png" data-lightbox="more-designs" data-title="Elegant"><img src="/images/designs/elegant_thumb.png"/></a> <a href="{{ asset('/images/designs/elegant.png') }}" data-lightbox="more-designs" data-title="Elegant"><img src="{{ asset('/images/designs/elegant_thumb.png') }}"/></a>
<p>&nbsp;</p> <p>&nbsp;</p>
<a href="/images/designs/hipster.png" data-lightbox="more-designs" data-title="Hipster"><img src="/images/designs/hipster_thumb.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="{{ asset('/images/designs/hipster.png') }}" data-lightbox="more-designs" data-title="Hipster"><img src="{{ asset('/images/designs/hipster_thumb.png') }}"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/images/designs/playful.png" data-lightbox="more-designs" data-title="Playful"><img src="/images/designs/playful_thumb.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="{{ asset('/images/designs/playful.png') }}" data-lightbox="more-designs" data-title="Playful"><img src="{{ asset('/images/designs/playful_thumb.png') }}"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/images/designs/photo.png" data-lightbox="more-designs" data-title="Photo"><img src="/images/designs/photo_thumb.png"/></a> <a href="{{ asset('/images/designs/photo.png') }}" data-lightbox="more-designs" data-title="Photo"><img src="{{ asset('/images/designs/photo_thumb.png') }}"/></a>
<p>&nbsp;</p> <p>&nbsp;</p>
</center> </center>

View File

@ -10,24 +10,25 @@
<li>{{ link_to('timesheets', trans('texts.timesheets')) }}</li> <li>{{ link_to('timesheets', trans('texts.timesheets')) }}</li>
<li class='active'>{{ 1 }}</li> <li class='active'>{{ 1 }}</li>
</ol> </ol>
<div id="timesheet_table" style="height: 300px; overflow: auto"> <div id="timesheet_table" style="height: 800px; overflow: auto">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var table = $("#timesheet_table"); var table = $("#timesheet_table");
table.handsontable({ table.handsontable({
colHeaders: ['','Date', 'From', 'To', 'Hours', 'Owner', 'Project', 'Code', 'Tags' ], colHeaders: false,//['','Date', 'From', 'To', 'Hours', 'Desciption', 'Owner', 'Project', 'Code', 'Tags' ],
startRows: 6, startRows: 6,
startCols: 4, startCols: 4,
//minSpareRows: 1, minSpareRows: 1,
stretchH: 'last', stretchH: 'last',
colWidths: [25, 97, 50, 50, 50, 150, 150, 150, 150], colWidths: [25, 97, 50, 50, 50, 400, 150, 150, 50,50],
columns: [ columns: [
{ data: "selected", type: 'checkbox' }, { data: "selected", type: 'checkbox' },
{ data: "date", type: 'date', dateFormat: 'yy-mm-dd' }, { data: "date", type: 'date', dateFormat: 'yy-mm-dd' },
{ data: "from" }, { data: "from" },
{ data: "to" }, { data: "to" },
{ data: "hours", type: 'numeric', format: '0.00' }, { data: "hours", type: 'numeric', format: '0.00' },
{ data: "summary" },
{ data: "owner" }, { data: "owner" },
{ data: "project", type: 'dropdown', source: ["Hobby", "Large Development"], strict: true }, { data: "project", type: 'dropdown', source: ["Hobby", "Large Development"], strict: true },
{ data: "code", type: 'dropdown', source: ["DAMCO", "MYDAMCO", "SAXO", "STUDIE"], strict: true }, { data: "code", type: 'dropdown', source: ["DAMCO", "MYDAMCO", "SAXO", "STUDIE"], strict: true },
@ -45,22 +46,15 @@
var data = [ var data = [
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut vitae aliquet risus. Etiam posuere urna dictum ipsum imperdiet ullamcorper. Integer suscipit arcu sed iaculis tristique', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', summary: 'Suspendisse tellus nunc, vehicula eget purus eu, tempor volutpat ligula. ', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', summary: 'Quisque id facilisis tellus. Curabitur diam ante, venenatis sit amet lectus vitae, viverra bibendum lectus.', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', summary: 'Do some stuff', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', summary: 'Morbi commodo tellus justo, id elementum est blandit sit amet.', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', summary: 'Do some stuff', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', summary: 'Do some stuff', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', summary: 'Mauris elementum mi non tincidunt facilisisin', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'}, { selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', summary: 'Redo inital load as the CDC cleanup task is failing and it might be due to DDL changes that the CDC service did not handle', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
]; ];
table.handsontable("loadData", data); table.handsontable("loadData", data);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long