Fix styles in file editing form in the repository viewer

This commit is contained in:
Naoki Takezoe
2015-12-21 15:14:21 +09:00
parent 117655b011
commit 407e926abe

View File

@@ -23,7 +23,7 @@
<tr>
<th>
<div class="pull-right">
<select id="wrap" class="input-medium" style="margin-bottom: 0px; height: 26px; padding: 0px;">
<select id="wrap" class="form-control" style="margin-bottom: 0px; height: 26px; padding: 0px;">
<optgroup label="Line Wrap Mode">
<option value="false">No wrap</option>
<option value="true">Soft wrap</option>
@@ -44,21 +44,21 @@
</tr>
</table>
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
<div class="box issue-comment-box">
<div class="box-content">
<div class="panel panel-default issue-comment-box">
<div class="panel-body">
<div>
<strong>Commit changes</strong>
</div>
<div>
<input type="text" name="message" style="width: 98%;"/>
<div class="form-group">
<input type="text" name="message" class="form-control"/>
</div>
<div style="text-align: right;">
@if(fileName.isEmpty){
<a href="@url(repository)/tree/@encodeRefName(branch)/@{pathList.mkString("/")}" class="btn btn-danger">Cancel</a>
<a href="@url(repository)/tree/@encodeRefName(branch)/@{pathList.mkString("/")}" class="btn btn-lg btn-danger">Cancel</a>
} else {
<a href="@url(repository)/blob/@encodeRefName(branch)/@{(pathList ++ Seq(fileName.get)).mkString("/")}" class="btn btn-danger">Cancel</a>
<a href="@url(repository)/blob/@encodeRefName(branch)/@{(pathList ++ Seq(fileName.get)).mkString("/")}" class="btn btn-lg btn-danger">Cancel</a>
}
<input type="submit" id="commit" class="btn btn-success" value="Commit changes" disabled="true"/>
<input type="submit" id="commit" class="btn btn-lg btn-success" value="Commit changes" disabled="true"/>
<input type="hidden" id="charset" name="charset" value="@content.charset"/>
<input type="hidden" id="lineSeparator" name="lineSeparator" value="@content.lineSeparator"/>
<input type="hidden" id="content" name="content" value=""/>
@@ -114,11 +114,15 @@ $(function(){
$('#btn-code').click(function(){
$('#editor').show();
$('#preview').hide();
$('#btn-code').appendClass('active');
$('#btn-preview').removeClass('active');
});
$('#btn-preview').click(function(){
$('#editor').hide();
$('#preview').show()
$('#preview').show();
$('#btn-code').removeClass('active');
$('#btn-preview').appendClass('active');
@if(fileName.map(isRenderable _).getOrElse(false)) {
// update preview