mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38: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.deferred = options.deferred || Q.defer();
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
confirm: options.confirm || intl.str('confirm-button'),
|
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();
|
this.render();
|
||||||
|
|
|
@ -142,7 +142,8 @@ var InteractiveRebaseView = ContainedBase.extend({
|
||||||
// finally get our buttons
|
// finally get our buttons
|
||||||
new ConfirmCancelView({
|
new ConfirmCancelView({
|
||||||
destination: this.$('.confirmCancel'),
|
destination: this.$('.confirmCancel'),
|
||||||
deferred: deferred
|
deferred: deferred,
|
||||||
|
disableCancelButton: !!this.options.aboveAll,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -326,9 +326,13 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="confirm-cancel-template">
|
<script type="text/html" id="confirm-cancel-template">
|
||||||
|
<% if (disableCancelButton) { %>
|
||||||
|
<span></span>
|
||||||
|
<% } else { %>
|
||||||
<button class="noStyle box cancelButton uiButton uiButtonRed">
|
<button class="noStyle box cancelButton uiButton uiButtonRed">
|
||||||
<%= cancel %>
|
<%= cancel %>
|
||||||
</button>
|
</button>
|
||||||
|
<% } %>
|
||||||
<button class="noStyle box confirmButton uiButton uiButtonYellow">
|
<button class="noStyle box confirmButton uiButton uiButtonYellow">
|
||||||
<%= confirm %>
|
<%= confirm %>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue