mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
(refs #12) Change the Markdown notation of images.
This commit is contained in:
@@ -273,6 +273,11 @@ trait IssuesControllerBase extends ControllerBase {
|
||||
}
|
||||
})
|
||||
|
||||
get("/:owner/:repository/_attached/:file")(referrersOnly { repository =>
|
||||
println("----" + params("file"))
|
||||
|
||||
})
|
||||
|
||||
val assignedUserName = (key: String) => params.get(key) filter (_.trim != "")
|
||||
val milestoneId: String => Option[Int] = (key: String) => params.get(key).flatMap(_.toIntOpt)
|
||||
|
||||
|
||||
@@ -50,9 +50,11 @@ $(function(){
|
||||
$("div#clickable").dropzone({
|
||||
url: '@path/upload/image/@repository.owner/@repository.name',
|
||||
maxFilesize: 10,
|
||||
previewTemplate: "<div class=\"dz-preview\">\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress>Uploading your images…</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>",
|
||||
previewTemplate: "<div class=\"dz-preview\">\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress>Uploading your images...</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>",
|
||||
success: function(file, id) {
|
||||
$('#content').val($('#content').val() + "\n" + id + "\n" + file.name);
|
||||
var index = file.name.indexOf('.');
|
||||
$('#content').val($('#content').val() +
|
||||
'\n/_attached/' + id + file.name.substring(index) + ')');
|
||||
file.previewElement.remove();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user