mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
Resolves #1058 -- dont show cancel button when in teaching mode
This commit is contained in:
parent
e040e787ba
commit
0bec45844c
3 changed files with 11 additions and 5 deletions
|
@ -140,7 +140,8 @@ var ConfirmCancelView = ResolveRejectBase.extend({
|
|||
this.deferred = options.deferred || Q.defer();
|
||||
this.JSON = {
|
||||
confirm: options.confirm || intl.str('confirm-button'),
|
||||
cancel: options.cancel || intl.str('cancel-button')
|
||||
cancel: options.cancel || intl.str('cancel-button'),
|
||||
disableCancelButton: !!options.disableCancelButton,
|
||||
};
|
||||
|
||||
this.render();
|
||||
|
|
|
@ -142,7 +142,8 @@ var InteractiveRebaseView = ContainedBase.extend({
|
|||
// finally get our buttons
|
||||
new ConfirmCancelView({
|
||||
destination: this.$('.confirmCancel'),
|
||||
deferred: deferred
|
||||
deferred: deferred,
|
||||
disableCancelButton: !!this.options.aboveAll,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -326,9 +326,13 @@
|
|||
</script>
|
||||
|
||||
<script type="text/html" id="confirm-cancel-template">
|
||||
<% if (disableCancelButton) { %>
|
||||
<span></span>
|
||||
<% } else { %>
|
||||
<button class="noStyle box cancelButton uiButton uiButtonRed">
|
||||
<%= cancel %>
|
||||
</button>
|
||||
<% } %>
|
||||
<button class="noStyle box confirmButton uiButton uiButtonYellow">
|
||||
<%= confirm %>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue