mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 00:15:50 +01:00
Fix file attachement area in Wiki page editing form
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
@(owner: String, repository: String)(textarea: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@(owner: String, repository: String, generateScript: Boolean = true)(textarea: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.util.FileUtil
|
||||
<div class="muted attachable">
|
||||
@textarea
|
||||
<div class="clickable">Attach images or documents by dragging & dropping, or selecting them.</div>
|
||||
</div>
|
||||
@if(generateScript){
|
||||
@defining("(id=\")([\\w\\-]*)(\")".r.findFirstMatchIn(textarea.body).map(_.group(2))){ textareaId =>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -30,3 +31,4 @@ $(function(){
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
@@ -28,11 +28,7 @@
|
||||
@if(style.nonEmpty){ style="@style"}
|
||||
@if(styleClass.nonEmpty){ class="@styleClass" }>@content</textarea>
|
||||
}
|
||||
@if(enableWikiLink){
|
||||
@textarea
|
||||
} else {
|
||||
@helper.html.attached(repository.owner, repository.name)(textarea)
|
||||
}
|
||||
@helper.html.attached(repository.owner, repository.name, enableWikiLink)(textarea)
|
||||
</div>
|
||||
<div class="tab-pane" id="tab@(uid+1)">
|
||||
<div class="markdown-body" id="preview-area@uid">
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
placeholder = "",
|
||||
uid = 1
|
||||
)
|
||||
<div class="clickable">Attach images or documents by dragging & dropping, or selecting them.</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="message">Edit Message</label>
|
||||
|
||||
Reference in New Issue
Block a user