This commit is contained in:
Peter Cottle 2013-03-15 22:03:43 -07:00
parent e081c47e31
commit 68223505ce
11 changed files with 150 additions and 7 deletions

View file

@ -5940,9 +5940,12 @@ if (require('../util').isBrowser()) {
* and simply pipes commands to the main events system * and simply pipes commands to the main events system
**/ **/
function CommandUI() { function CommandUI() {
var Views = require('../views');
var Collections = require('../models/collections'); var Collections = require('../models/collections');
var CommandViews = require('../views/commandViews'); var CommandViews = require('../views/commandViews');
//new Views.HelperBar();
this.commandCollection = new Collections.CommandCollection(); this.commandCollection = new Collections.CommandCollection();
this.commandBuffer = new Collections.CommandBuffer({ this.commandBuffer = new Collections.CommandBuffer({
collection: this.commandCollection collection: this.commandCollection
@ -10073,6 +10076,34 @@ var LevelToolbar = BaseView.extend({
} }
}); });
var HelperBar = BaseView.extend({
tagName: 'div',
className: 'helperBar',
template: _.template($('#helper-bar-template').html()),
events: {
'click div': 'onClick'
},
onClick: function(ev) {
},
initialize: function(options) {
options = options || {};
this.destination = $('body');
var items = [{
text: '??',
id: 'main'
}];
this.JSON = {
items: items
};
this.render();
}
});
var CanvasTerminalHolder = BaseView.extend({ var CanvasTerminalHolder = BaseView.extend({
tagName: 'div', tagName: 'div',
className: 'canvasTerminalHolder box flex1', className: 'canvasTerminalHolder box flex1',
@ -10140,6 +10171,7 @@ exports.LeftRightView = LeftRightView;
exports.ZoomAlertWindow = ZoomAlertWindow; exports.ZoomAlertWindow = ZoomAlertWindow;
exports.ConfirmCancelTerminal = ConfirmCancelTerminal; exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
exports.WindowSizeAlertWindow = WindowSizeAlertWindow; exports.WindowSizeAlertWindow = WindowSizeAlertWindow;
exports.HelperBar = HelperBar;
exports.CanvasTerminalHolder = CanvasTerminalHolder; exports.CanvasTerminalHolder = CanvasTerminalHolder;
exports.LevelToolbar = LevelToolbar; exports.LevelToolbar = LevelToolbar;
@ -13413,7 +13445,6 @@ var LevelBuilder = Level.extend({
die: function() { die: function() {
this.hideStart(); this.hideStart();
LevelBuilder.__super__.die.apply(this, arguments); LevelBuilder.__super__.die.apply(this, arguments);
delete this.startVis; delete this.startVis;
@ -20336,9 +20367,12 @@ if (require('../util').isBrowser()) {
* and simply pipes commands to the main events system * and simply pipes commands to the main events system
**/ **/
function CommandUI() { function CommandUI() {
var Views = require('../views');
var Collections = require('../models/collections'); var Collections = require('../models/collections');
var CommandViews = require('../views/commandViews'); var CommandViews = require('../views/commandViews');
//new Views.HelperBar();
this.commandCollection = new Collections.CommandCollection(); this.commandCollection = new Collections.CommandCollection();
this.commandBuffer = new Collections.CommandBuffer({ this.commandBuffer = new Collections.CommandBuffer({
collection: this.commandCollection collection: this.commandCollection
@ -24198,7 +24232,6 @@ var LevelBuilder = Level.extend({
die: function() { die: function() {
this.hideStart(); this.hideStart();
LevelBuilder.__super__.die.apply(this, arguments); LevelBuilder.__super__.die.apply(this, arguments);
delete this.startVis; delete this.startVis;
@ -27927,6 +27960,34 @@ var LevelToolbar = BaseView.extend({
} }
}); });
var HelperBar = BaseView.extend({
tagName: 'div',
className: 'helperBar',
template: _.template($('#helper-bar-template').html()),
events: {
'click div': 'onClick'
},
onClick: function(ev) {
},
initialize: function(options) {
options = options || {};
this.destination = $('body');
var items = [{
text: '??',
id: 'main'
}];
this.JSON = {
items: items
};
this.render();
}
});
var CanvasTerminalHolder = BaseView.extend({ var CanvasTerminalHolder = BaseView.extend({
tagName: 'div', tagName: 'div',
className: 'canvasTerminalHolder box flex1', className: 'canvasTerminalHolder box flex1',
@ -27994,6 +28055,7 @@ exports.LeftRightView = LeftRightView;
exports.ZoomAlertWindow = ZoomAlertWindow; exports.ZoomAlertWindow = ZoomAlertWindow;
exports.ConfirmCancelTerminal = ConfirmCancelTerminal; exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
exports.WindowSizeAlertWindow = WindowSizeAlertWindow; exports.WindowSizeAlertWindow = WindowSizeAlertWindow;
exports.HelperBar = HelperBar;
exports.CanvasTerminalHolder = CanvasTerminalHolder; exports.CanvasTerminalHolder = CanvasTerminalHolder;
exports.LevelToolbar = LevelToolbar; exports.LevelToolbar = LevelToolbar;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
build/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -515,6 +515,21 @@ li.rebaseEntry,
padding: 0 5px; padding: 0 5px;
} }
.helperBar {
position: fixed;
bottom: 0px;
right: 0px;
background: #424242;
padding: 4px 10px;
border-radius: 5px 0 0 0;
border: 2px solid #EFEDEE;
border-bottom: 0;
border-right: 0;
box-shadow: -1px -1px 5px rgba(0,0,0,0.3);
cursor: pointer;
font-weight: bold;
}
#commandLineBar, #commandLineBar,
.terminal-window .inside { .terminal-window .inside {
border-top: 0; border-top: 0;

View file

@ -13,7 +13,7 @@
<meta property="og:image" content="http://pcottle.github.com/learnGitBranching/assets/learnGitBranching.png"/> <meta property="og:image" content="http://pcottle.github.com/learnGitBranching/assets/learnGitBranching.png"/>
<meta property="og:description" content="A interactive Git visualization tool to educate and challenge!"/> <meta property="og:description" content="A interactive Git visualization tool to educate and challenge!"/>
<link rel="stylesheet" href="build/main.5fc7ddb9.css" type="text/css" charset="utf-8"> <link rel="stylesheet" href="build/main.02d13d1b.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8"> <link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8">
</head> </head>
<body> <body>
@ -105,6 +105,16 @@
</div> </div>
</script> </script>
<script type="text/html" id="helper-bar-template">
<div class="helperBar">
<% for(var i = 0; i < items.length; i++) { %>
<a data-id="wtf">
<%= items[i].text %>
</a>
<% } %>
</div>
</script>
<script type="text/html" id="level-toolbar-template"> <script type="text/html" id="level-toolbar-template">
<div class="toolbar level-toolbar box vertical center transitionAll hidden"> <div class="toolbar level-toolbar box vertical center transitionAll hidden">
<div> <div>
@ -412,7 +422,7 @@
For a much easier time perusing the source, see the individual files at: For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching https://github.com/pcottle/learnGitBranching
--> -->
<script src="build/bundle.min.9b2f4bfd.js"></script> <script src="build/bundle.min.99df78c8.js"></script>
<!-- The advantage of github pages: super-easy, simple, slick static hostic. <!-- The advantage of github pages: super-easy, simple, slick static hostic.
The downside? No raw logs to parse for analytics, so I have to include The downside? No raw logs to parse for analytics, so I have to include

View file

@ -164,9 +164,12 @@ if (require('../util').isBrowser()) {
* and simply pipes commands to the main events system * and simply pipes commands to the main events system
**/ **/
function CommandUI() { function CommandUI() {
var Views = require('../views');
var Collections = require('../models/collections'); var Collections = require('../models/collections');
var CommandViews = require('../views/commandViews'); var CommandViews = require('../views/commandViews');
//new Views.HelperBar();
this.commandCollection = new Collections.CommandCollection(); this.commandCollection = new Collections.CommandCollection();
this.commandBuffer = new Collections.CommandBuffer({ this.commandBuffer = new Collections.CommandBuffer({
collection: this.commandCollection collection: this.commandCollection

View file

@ -357,7 +357,6 @@ var LevelBuilder = Level.extend({
die: function() { die: function() {
this.hideStart(); this.hideStart();
LevelBuilder.__super__.die.apply(this, arguments); LevelBuilder.__super__.die.apply(this, arguments);
delete this.startVis; delete this.startVis;

View file

@ -570,6 +570,34 @@ var LevelToolbar = BaseView.extend({
} }
}); });
var HelperBar = BaseView.extend({
tagName: 'div',
className: 'helperBar',
template: _.template($('#helper-bar-template').html()),
events: {
'click div': 'onClick'
},
onClick: function(ev) {
},
initialize: function(options) {
options = options || {};
this.destination = $('body');
var items = [{
text: '??',
id: 'main'
}];
this.JSON = {
items: items
};
this.render();
}
});
var CanvasTerminalHolder = BaseView.extend({ var CanvasTerminalHolder = BaseView.extend({
tagName: 'div', tagName: 'div',
className: 'canvasTerminalHolder box flex1', className: 'canvasTerminalHolder box flex1',
@ -637,6 +665,7 @@ exports.LeftRightView = LeftRightView;
exports.ZoomAlertWindow = ZoomAlertWindow; exports.ZoomAlertWindow = ZoomAlertWindow;
exports.ConfirmCancelTerminal = ConfirmCancelTerminal; exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
exports.WindowSizeAlertWindow = WindowSizeAlertWindow; exports.WindowSizeAlertWindow = WindowSizeAlertWindow;
exports.HelperBar = HelperBar;
exports.CanvasTerminalHolder = CanvasTerminalHolder; exports.CanvasTerminalHolder = CanvasTerminalHolder;
exports.LevelToolbar = LevelToolbar; exports.LevelToolbar = LevelToolbar;

View file

@ -515,6 +515,21 @@ li.rebaseEntry,
padding: 0 5px; padding: 0 5px;
} }
.helperBar {
position: fixed;
bottom: 0px;
right: 0px;
background: #424242;
padding: 4px 10px;
border-radius: 5px 0 0 0;
border: 2px solid #EFEDEE;
border-bottom: 0;
border-right: 0;
box-shadow: -1px -1px 5px rgba(0,0,0,0.3);
cursor: pointer;
font-weight: bold;
}
#commandLineBar, #commandLineBar,
.terminal-window .inside { .terminal-window .inside {
border-top: 0; border-top: 0;

View file

@ -105,6 +105,16 @@
</div> </div>
</script> </script>
<script type="text/html" id="helper-bar-template">
<div class="helperBar">
<% for(var i = 0; i < items.length; i++) { %>
<a data-id="wtf">
<%= items[i].text %>
</a>
<% } %>
</div>
</script>
<script type="text/html" id="level-toolbar-template"> <script type="text/html" id="level-toolbar-template">
<div class="toolbar level-toolbar box vertical center transitionAll hidden"> <div class="toolbar level-toolbar box vertical center transitionAll hidden">
<div> <div>