diff --git a/Gruntfile.js b/Gruntfile.js index f17526e33f59..43dc8abe82c0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,9 +5,37 @@ module.exports = function(grunt) { concat: { options: { 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) { - 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 } else { return src; diff --git a/app/routes.php b/app/routes.php index 629c864c43bf..7ae11a28b412 100755 --- a/app/routes.php +++ b/app/routes.php @@ -132,7 +132,7 @@ Route::group(array('before' => 'auth'), function() Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); Route::post('credits/bulk', 'CreditController@bulk'); - Route::resource('timesheets', 'TimesheetController'); + //Route::resource('timesheets', 'TimesheetController'); }); // Route group for API diff --git a/app/views/invoices/pdf.blade.php b/app/views/invoices/pdf.blade.php index d711b1a964d2..c0e08a7214cd 100644 --- a/app/views/invoices/pdf.blade.php +++ b/app/views/invoices/pdf.blade.php @@ -21,13 +21,13 @@

 

-      -      - +      +      +

 

-      -      - +      +      +

 

diff --git a/app/views/timesheets/edit.blade.php b/app/views/timesheets/edit.blade.php index 10b73857cab7..34755559fee0 100644 --- a/app/views/timesheets/edit.blade.php +++ b/app/views/timesheets/edit.blade.php @@ -10,24 +10,25 @@
  • {{ link_to('timesheets', trans('texts.timesheets')) }}
  • {{ 1 }}
  • -
    +