converted image picker to blade-based component

Also updated some other JS translations
This commit is contained in:
Dan Brown
2016-12-24 15:21:19 +00:00
parent 242dc21876
commit 05316c90ba
15 changed files with 120 additions and 97 deletions

View File

@ -117,7 +117,7 @@ class AttachmentController extends Controller
}
$attachment = $this->attachmentService->updateFile($attachment, $request->all());
return $attachment;
return $this->jsonSuccess($attachment, trans('entities.attachments_updated_success'));
}
/**

View File

@ -117,6 +117,17 @@ abstract class Controller extends BaseController
return true;
}
/**
* Send a json respons with a message attached as a header.
* @param $data
* @param string $successMessage
* @return $this
*/
protected function jsonSuccess($data, $successMessage = "")
{
return response()->json($data)->header('message-success', $successMessage);
}
/**
* Send back a json error message.
* @param string $messageText