Put revert action where it should be
This commit is contained in:
@@ -403,6 +403,10 @@ a:hover, a:visited {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.compare #compare-content {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.compare .data {
|
||||
border: 1px solid #ddd;
|
||||
margin-top: 1em;
|
||||
@@ -432,7 +436,8 @@ a:hover, a:visited {
|
||||
color: #999;
|
||||
padding: 0 0 0 0.5em;
|
||||
}
|
||||
|
||||
|
||||
.compare #compare-content ul.actions li,
|
||||
.compare #footer ul.actions li {
|
||||
margin-left: 0;
|
||||
margin-right: 0.6em;
|
||||
|
||||
@@ -72,6 +72,15 @@ $(document).ready(function() {
|
||||
$(this).submit();
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#gollum-revert-form').length &&
|
||||
$('.gollum-revert-button').length ) {
|
||||
$('a.gollum-revert-button').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#gollum-revert-form').submit();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var nodeSelector = {
|
||||
|
||||
@@ -2,21 +2,11 @@
|
||||
<div id="head">
|
||||
<h1>History for <strong>{{path}}</strong></h1>
|
||||
|
||||
<form name="gollum-revert" action="/revert/{{escaped_name}}/{{before}}/{{after}}" method="post">
|
||||
<div id="gollum-editor">
|
||||
<ul class="actions">
|
||||
<li class="minibutton"><a href="/history/{{escaped_name}}"
|
||||
class="action-page-history">Back to Page History</a></li>
|
||||
{{#show_revert}}
|
||||
<li class="minibutton">
|
||||
<input type="submit" id="gollum-editor-submit" value="Revert" title="Save current changes">
|
||||
</li>
|
||||
{{/show_revert}}
|
||||
</ul>
|
||||
{{>searchbar}}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ul class="actions">
|
||||
<li class="minibutton"><a href="/history/{{escaped_name}}"
|
||||
class="action-page-history">Back to Page History</a></li>
|
||||
</ul>
|
||||
{{>searchbar}}
|
||||
</div>
|
||||
|
||||
{{#message}}
|
||||
@@ -24,6 +14,17 @@
|
||||
{{/message}}
|
||||
|
||||
<div id="compare-content">
|
||||
|
||||
{{#show_revert}}
|
||||
<ul class="actions">
|
||||
<li class="minibutton">
|
||||
<form name="gollum-revert" action="/revert/{{escaped_name}}/{{before}}/{{after}}" method="post" id="gollum-revert-form">
|
||||
<a href="#" class="gollum-revert-button">Revert Changes</a>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
{{/show_revert}}
|
||||
|
||||
<div class="data highlight">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
{{#lines}}
|
||||
@@ -40,8 +41,11 @@
|
||||
</div>
|
||||
<div id="footer">
|
||||
<ul class="actions">
|
||||
<li class="minibutton"><a href="/history/{{escaped_name}}"
|
||||
class="action-page-history">Back to Page History</a></li>
|
||||
{{#show_revert}}
|
||||
<li class="minibutton">
|
||||
<a href="#" class="gollum-revert-button">Revert Changes</a>
|
||||
</li>
|
||||
{{/show_revert}}
|
||||
<li class="minibutton"><a href="#">Back to Top</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{{/versions}}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user