mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
multiveiw work
This commit is contained in:
parent
4eeedfc137
commit
cb0a492da6
6 changed files with 185 additions and 8 deletions
114
build/bundle.js
114
build/bundle.js
|
@ -13681,6 +13681,68 @@ HeadlessGit.prototype.sendCommand = function(value) {
|
||||||
exports.HeadlessGit = HeadlessGit;
|
exports.HeadlessGit = HeadlessGit;
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
require.define("/src/js/views/multiView.js",function(require,module,exports,__dirname,__filename,process,global){var GitError = require('../util/errors').GitError;
|
||||||
|
var _ = require('underscore');
|
||||||
|
var Q = require('q');
|
||||||
|
// horrible hack to get localStorage Backbone plugin
|
||||||
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
|
var ModalTerminal = require('../views').ModalTerminal;
|
||||||
|
var ContainedBase = require('../views').ContainedBase;
|
||||||
|
var ConfirmCancelView = require('../views').ConfirmCancelView;
|
||||||
|
var LeftRightView = require('../views').LeftRightView;
|
||||||
|
var ModalAlert = require('../views').ModalAlert;
|
||||||
|
|
||||||
|
var MultiView = Backbone.View.extend({
|
||||||
|
tagName: 'div',
|
||||||
|
className: 'multiView',
|
||||||
|
typeToConstructor: {
|
||||||
|
ModalAlert: ModalAlert
|
||||||
|
},
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (!options.childViews) {
|
||||||
|
options.childViews = [{
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Woah wtf!!'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Im second'
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
this.childViewJSONs = options.childViews;
|
||||||
|
this.childViews = [];
|
||||||
|
this.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
createChildView: function(viewJSON) {
|
||||||
|
var type = viewJSON.type;
|
||||||
|
if (!this.typeToConstructor[type]) {
|
||||||
|
throw new Error('wut');
|
||||||
|
}
|
||||||
|
var view = new this.typeToConstructor[type](viewJSON.options);
|
||||||
|
this.childViews.push(view);
|
||||||
|
view.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
// go through each and render... show the first
|
||||||
|
_.each(this.childViewJSONs, function(childView) {
|
||||||
|
this.createChildView(childView);
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.MultiView = MultiView;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
require.define("/src/js/app/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
require.define("/src/js/app/index.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
||||||
|
@ -16167,7 +16229,8 @@ var toGlobalize = {
|
||||||
HeadLess: require('../git/headless'),
|
HeadLess: require('../git/headless'),
|
||||||
Q: { Q: require('q') },
|
Q: { Q: require('q') },
|
||||||
RebaseView: require('../views/rebaseView'),
|
RebaseView: require('../views/rebaseView'),
|
||||||
Views: require('../views')
|
Views: require('../views'),
|
||||||
|
MultiView: require('../views/multiView')
|
||||||
};
|
};
|
||||||
|
|
||||||
_.each(toGlobalize, function(module) {
|
_.each(toGlobalize, function(module) {
|
||||||
|
@ -16858,18 +16921,63 @@ require("/src/js/views/index.js");
|
||||||
|
|
||||||
require.define("/src/js/views/multiView.js",function(require,module,exports,__dirname,__filename,process,global){var GitError = require('../util/errors').GitError;
|
require.define("/src/js/views/multiView.js",function(require,module,exports,__dirname,__filename,process,global){var GitError = require('../util/errors').GitError;
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var Backbone = require('backbone');
|
|
||||||
var Q = require('q');
|
var Q = require('q');
|
||||||
|
// horrible hack to get localStorage Backbone plugin
|
||||||
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
var ModalTerminal = require('../views').ModalTerminal;
|
var ModalTerminal = require('../views').ModalTerminal;
|
||||||
var ContainedBase = require('../views').ContainedBase;
|
var ContainedBase = require('../views').ContainedBase;
|
||||||
var ConfirmCancelView = require('../views').ConfirmCancelView;
|
var ConfirmCancelView = require('../views').ConfirmCancelView;
|
||||||
var LeftRightView = require('../views').LeftRightView;
|
var LeftRightView = require('../views').LeftRightView;
|
||||||
|
var ModalAlert = require('../views').ModalAlert;
|
||||||
|
|
||||||
var MultiView = Backbone.View.extend({
|
var MultiView = Backbone.View.extend({
|
||||||
|
tagName: 'div',
|
||||||
|
className: 'multiView',
|
||||||
|
typeToConstructor: {
|
||||||
|
ModalAlert: ModalAlert
|
||||||
|
},
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (!options.childViews) {
|
||||||
|
options.childViews = [{
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Woah wtf!!'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Im second'
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
this.childViewJSONs = options.childViews;
|
||||||
|
this.childViews = [];
|
||||||
|
this.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
createChildView: function(viewJSON) {
|
||||||
|
var type = viewJSON.type;
|
||||||
|
if (!this.typeToConstructor[type]) {
|
||||||
|
throw new Error('wut');
|
||||||
|
}
|
||||||
|
var view = new this.typeToConstructor[type](viewJSON.options);
|
||||||
|
this.childViews.push(view);
|
||||||
|
view.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
// go through each and render... show the first
|
||||||
|
_.each(this.childViewJSONs, function(childView) {
|
||||||
|
this.createChildView(childView);
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.MultiView = MultiView;
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
});
|
});
|
||||||
require("/src/js/views/multiView.js");
|
require("/src/js/views/multiView.js");
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
<div class="box flex1">
|
<div class="box flex1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="terminal-window-holder box flex3 vertical">
|
<div class="terminal-window-holder box flex3 vertical transitionTransform">
|
||||||
<div class="toolbar box vertical">
|
<div class="toolbar box vertical">
|
||||||
<div class="controls box horizontal">
|
<div class="controls box horizontal">
|
||||||
<div class="box flex1">
|
<div class="box flex1">
|
||||||
|
|
|
@ -14,7 +14,8 @@ var toGlobalize = {
|
||||||
HeadLess: require('../git/headless'),
|
HeadLess: require('../git/headless'),
|
||||||
Q: { Q: require('q') },
|
Q: { Q: require('q') },
|
||||||
RebaseView: require('../views/rebaseView'),
|
RebaseView: require('../views/rebaseView'),
|
||||||
Views: require('../views')
|
Views: require('../views'),
|
||||||
|
MultiView: require('../views/multiView')
|
||||||
};
|
};
|
||||||
|
|
||||||
_.each(toGlobalize, function(module) {
|
_.each(toGlobalize, function(module) {
|
||||||
|
|
|
@ -1,14 +1,59 @@
|
||||||
var GitError = require('../util/errors').GitError;
|
var GitError = require('../util/errors').GitError;
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var Backbone = require('backbone');
|
|
||||||
var Q = require('q');
|
var Q = require('q');
|
||||||
|
// horrible hack to get localStorage Backbone plugin
|
||||||
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
var ModalTerminal = require('../views').ModalTerminal;
|
var ModalTerminal = require('../views').ModalTerminal;
|
||||||
var ContainedBase = require('../views').ContainedBase;
|
var ContainedBase = require('../views').ContainedBase;
|
||||||
var ConfirmCancelView = require('../views').ConfirmCancelView;
|
var ConfirmCancelView = require('../views').ConfirmCancelView;
|
||||||
var LeftRightView = require('../views').LeftRightView;
|
var LeftRightView = require('../views').LeftRightView;
|
||||||
|
var ModalAlert = require('../views').ModalAlert;
|
||||||
|
|
||||||
var MultiView = Backbone.View.extend({
|
var MultiView = Backbone.View.extend({
|
||||||
|
tagName: 'div',
|
||||||
|
className: 'multiView',
|
||||||
|
typeToConstructor: {
|
||||||
|
ModalAlert: ModalAlert
|
||||||
|
},
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (!options.childViews) {
|
||||||
|
options.childViews = [{
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Woah wtf!!'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'ModalAlert',
|
||||||
|
options: {
|
||||||
|
markdown: 'Im second'
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
this.childViewJSONs = options.childViews;
|
||||||
|
this.childViews = [];
|
||||||
|
this.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
createChildView: function(viewJSON) {
|
||||||
|
var type = viewJSON.type;
|
||||||
|
if (!this.typeToConstructor[type]) {
|
||||||
|
throw new Error('wut');
|
||||||
|
}
|
||||||
|
var view = new this.typeToConstructor[type](viewJSON.options);
|
||||||
|
this.childViews.push(view);
|
||||||
|
view.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
// go through each and render... show the first
|
||||||
|
_.each(this.childViewJSONs, function(childView) {
|
||||||
|
this.createChildView(childView);
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.MultiView = MultiView;
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ body {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
-webkit-perspective: 800;
|
||||||
|
-webkit-perspective-origin: 50% 225px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
@ -66,6 +68,14 @@ body,
|
||||||
transition: background 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
transition: background 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.transitionTransform {
|
||||||
|
-webkit-transition: -webkit-transform 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
-moz-transition: -moz-transform 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
-ms-transition: -ms-transform 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
-o-transition: -o-transform 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
transition: transform 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
}
|
||||||
|
|
||||||
.transitionOpacity {
|
.transitionOpacity {
|
||||||
-webkit-transition: opacity 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
-webkit-transition: opacity 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
-moz-transition: opacity 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
-moz-transition: opacity 700ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
@ -407,6 +417,7 @@ li.rebaseEntry.notPicked {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
-webkit-transform-style: preserve-3d;
|
||||||
|
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
-webkit-box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.9);
|
-webkit-box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.9);
|
||||||
|
|
14
todo.txt
14
todo.txt
|
@ -4,11 +4,23 @@ Big things:
|
||||||
|
|
||||||
Big Graphic things:
|
Big Graphic things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
[ ] promise-based dialogs
|
[.] multiViews with multiple terminals...
|
||||||
|
[ ] 3d transition between terminals (reveal.JS hakim)
|
||||||
|
|
||||||
Medium things:
|
Medium things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Views
|
||||||
|
=========
|
||||||
|
[ ] allow views to have optional "with" view that gets appended afterwards
|
||||||
|
[ ] multiview makes all these arrow views which fire events
|
||||||
|
[ ] debounce the forward and back methods
|
||||||
|
[ ] there! that should be good enough
|
||||||
|
|
||||||
|
Commands
|
||||||
|
========
|
||||||
|
[ ] refactor some kind of
|
||||||
|
|
||||||
Small things to implement:
|
Small things to implement:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue