mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
#937 - Solution proposal
This commit is contained in:
parent
1723d9b0fc
commit
aa8f51713f
3 changed files with 22 additions and 3 deletions
|
@ -129,17 +129,25 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
positive: function() {
|
positive: function() {
|
||||||
if (this.demonstrated || !this.hasControl) {
|
if (!this.hasControl) {
|
||||||
// don't do anything if we are demonstrating, and if
|
// don't do anything if we are demonstrating, and if
|
||||||
// we receive a meta nav event and we aren't listening,
|
// we receive a meta nav event and we aren't listening,
|
||||||
// then don't do anything either
|
// then don't do anything either
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// already demonstrated, let's reset demonstration
|
||||||
|
if(this.demonstrated) {
|
||||||
|
this.reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.demonstrated = true;
|
this.demonstrated = true;
|
||||||
this.demonstrate();
|
this.demonstrate();
|
||||||
},
|
},
|
||||||
|
|
||||||
demonstrate: function() {
|
demonstrate: function() {
|
||||||
|
this.releaseControl();
|
||||||
this.$el.toggleClass('demonstrating', true);
|
this.$el.toggleClass('demonstrating', true);
|
||||||
|
|
||||||
var whenDone = Q.defer();
|
var whenDone = Q.defer();
|
||||||
|
@ -147,7 +155,7 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
whenDone.promise.then(function() {
|
whenDone.promise.then(function() {
|
||||||
this.$el.toggleClass('demonstrating', false);
|
this.$el.toggleClass('demonstrating', false);
|
||||||
this.$el.toggleClass('demonstrated', true);
|
this.$el.toggleClass('demonstrated', true);
|
||||||
this.releaseControl();
|
this.takeControl();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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,11 @@ div.gitDemonstrationView {
|
||||||
}
|
}
|
||||||
|
|
||||||
.gitDemonstrationView.demonstrated p.uiButton {
|
.gitDemonstrationView.demonstrated p.uiButton {
|
||||||
opacity: 0.4;
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gitDemonstrationView.demonstrated p.uiButton[target="reset"] {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LeftRightView */
|
/* LeftRightView */
|
||||||
|
|
|
@ -155,6 +155,9 @@
|
||||||
-->
|
-->
|
||||||
<%= command.replace(' --aboveAll', '') %>
|
<%= command.replace(' --aboveAll', '') %>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="uiButton uiButtonPink transitionOpacity" target="reset">
|
||||||
|
Reset
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="afterText transitionOpacity">
|
<div class="afterText transitionOpacity">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue