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