Fix Wiki font style of Wiki editing form

This commit is contained in:
Naoki Takezoe
2015-06-27 19:41:48 +09:00
parent a23ce92676
commit 6f3f3eaa99
6 changed files with 54 additions and 6 deletions

View File

@@ -5,6 +5,7 @@
enableTaskList: Boolean,
hasWritePermission: Boolean,
style: String = "",
styleClass: String = "",
placeholder: String = "Leave a comment",
elastic: Boolean = false,
uid: Long = new java.util.Date().getTime())(implicit context: gitbucket.core.controller.Context)
@@ -20,7 +21,9 @@
<div class="tab-pane active" id="tab@uid">
<span id="error-content" class="error"></span>
@textarea = {
<textarea id="content@uid" name="content"@if(style.nonEmpty){ style="@style"} placeholder="@placeholder">@content</textarea>
<textarea id="content@uid" name="content" placeholder="@placeholder"
@if(style.nonEmpty){ style="@style"}
@if(styleClass.nonEmpty){ class="@styleClass" }>@content</textarea>
}
@if(enableWikiLink){
@textarea

View File

@@ -10,7 +10,16 @@
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
<div class="box issue-comment-box">
<div class="box-content">
@helper.html.preview(repository, "", false, true, true, hasWritePermission, "width: 635px; height: 100px; max-height: 150px;", elastic = true)
@helper.html.preview(
repository = repository,
content = "",
enableWikiLink = false,
enableRefsLink = true,
enableTaskList = true,
hasWritePermission = hasWritePermission,
style = "width: 635px; height: 100px; max-height: 150px;",
elastic = true
)
</div>
</div>
<div class="pull-right">

View File

@@ -57,7 +57,16 @@
</div>
</div>
<hr>
@helper.html.preview(repository, "", false, true, true, hasWritePermission, "width: 565px; height: 200px; max-height: 250px;", elastic = true)
@helper.html.preview(
repository = repository,
content = "",
enableWikiLink = false,
enableRefsLink = true,
enableTaskList = true,
hasWritePermission = hasWritePermission,
style = "width: 565px; height: 200px; max-height: 250px;",
elastic = true
)
</div>
</div>
<div class="pull-right">

View File

@@ -59,7 +59,15 @@
<div style="width: 600px; border-right: 1px solid #d4d4d4;">
<span class="error" id="error-title"></span>
<input type="text" name="title" style="width: 580px" placeholder="Title"/>
@helper.html.preview(repository, "", false, true, true, hasWritePermission, "width: 580px; height: 200px;")
@helper.html.preview(
repository = repository,
content = "",
enableWikiLink = false,
enableRefsLink = true,
enableTaskList = true,
hasWritePermission = hasWritePermission,
style = "width: 580px; height: 200px;"
)
<input type="hidden" name="targetUserName" value="@originRepository.owner"/>
<input type="hidden" name="targetBranch" value="@originId"/>
<input type="hidden" name="requestUserName" value="@forkedRepository.owner"/>

View File

@@ -15,7 +15,16 @@
}
<div class="box issue-comment-box">
<div class="box-content">
@helper.html.preview(repository, "", false, true, true, hasWritePermission, "width: 635px; height: 100px; max-height: 150px;", elastic = true)
@helper.html.preview(
repository = repository,
content = "",
enableWikiLink = false,
enableRefsLink = true,
enableTaskList = true,
hasWritePermission = hasWritePermission,
style = "width: 635px; height: 100px; max-height: 150px;",
elastic = true
)
</div>
@if(fileName.isDefined){
<div class="pull-right" style="margin-top: 10px;">

View File

@@ -22,7 +22,17 @@
<form action="@url(repository)/wiki/@if(page.isEmpty){_new} else {_edit}" method="POST" validate="true">
<span id="error-pageName" class="error"></span>
<input type="text" name="pageName" value="@pageName" style="width: 850px; font-weight: bold;" placeholder="Input a page name."/>
@helper.html.preview(repository, page.map(_.content).getOrElse(""), true, false, false, false, "width: 850px; height: 400px;", "")
@helper.html.preview(
repository = repository,
content = page.map(_.content).getOrElse(""),
enableWikiLink = true,
enableRefsLink = false,
enableTaskList = false,
hasWritePermission = false,
style = "width: 850px; height: 400px;",
styleClass = "monospace",
placeholder = ""
)
<input type="text" name="message" value="" style="width: 850px;" placeholder="Write a small message here explaining this change. (Optional)"/>
<input type="hidden" name="currentPageName" value="@pageName"/>
<input type="hidden" name="id" value="@page.map(_.id)"/>