mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-25 21:24:36 +02:00
merge main
This commit is contained in:
commit
ef8c2a86fd
3 changed files with 21 additions and 2 deletions
|
@ -20,7 +20,8 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
template: _.template($('#git-demonstration-view').html()),
|
template: _.template($('#git-demonstration-view').html()),
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click div.command > p.uiButton': 'positive'
|
'click div.command > p.uiButton:not([target="reset"])': 'positive',
|
||||||
|
'click div.command > p.uiButton[target="reset"]': 'onResetButtonClick',
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
|
@ -59,6 +60,7 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
this.navEvents = Object.assign({}, Backbone.Events);
|
this.navEvents = Object.assign({}, Backbone.Events);
|
||||||
this.navEvents.on('positive', this.positive, this);
|
this.navEvents.on('positive', this.positive, this);
|
||||||
this.navEvents.on('negative', this.negative, this);
|
this.navEvents.on('negative', this.negative, this);
|
||||||
|
this.navEvents.on('onResetButtonClick', this.onResetButtonClick, this);
|
||||||
this.keyboardListener = new KeyboardListener({
|
this.keyboardListener = new KeyboardListener({
|
||||||
events: this.navEvents,
|
events: this.navEvents,
|
||||||
aliasMap: {
|
aliasMap: {
|
||||||
|
@ -139,6 +141,11 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
this.demonstrate();
|
this.demonstrate();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onResetButtonClick: function() {
|
||||||
|
this.takeControl();
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
|
||||||
demonstrate: function() {
|
demonstrate: function() {
|
||||||
this.$el.toggleClass('demonstrating', true);
|
this.$el.toggleClass('demonstrating', true);
|
||||||
|
|
||||||
|
|
|
@ -1146,6 +1146,10 @@ div.gitDemonstrationView {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gitDemonstrationView p.uiButton[target="reset"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.gitDemonstrationView.demonstrated div.afterText {
|
.gitDemonstrationView.demonstrated div.afterText {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -1155,7 +1159,12 @@ div.gitDemonstrationView {
|
||||||
}
|
}
|
||||||
|
|
||||||
.gitDemonstrationView.demonstrated p.uiButton {
|
.gitDemonstrationView.demonstrated p.uiButton {
|
||||||
opacity: 0.4;
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gitDemonstrationView.demonstrated p.uiButton[target="reset"] {
|
||||||
|
display: block;
|
||||||
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LeftRightView */
|
/* LeftRightView */
|
||||||
|
|
|
@ -155,6 +155,9 @@
|
||||||
-->
|
-->
|
||||||
<%= command.replace(' --aboveAll', '') %>
|
<%= command.replace(' --aboveAll', '') %>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="uiButton uiButtonPink transitionOpacity" target="reset">
|
||||||
|
(Reset Animation)
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="afterText transitionOpacity">
|
<div class="afterText transitionOpacity">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue