mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
attempt at ios keyboard
This commit is contained in:
parent
785e37b93b
commit
0e20ae0aa2
3 changed files with 129 additions and 6 deletions
|
@ -6391,6 +6391,16 @@ var init = function() {
|
||||||
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent)) {
|
||||||
|
alert(1);
|
||||||
|
var Views = require('../views');
|
||||||
|
setTimeout(function() {
|
||||||
|
eventBaton.trigger('commandSubmitted', 'iOS keyboardPop');
|
||||||
|
}, 600);
|
||||||
|
setTimeout(function() {
|
||||||
|
new Views.iOSKeyboardView();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(init);
|
$(document).ready(init);
|
||||||
|
@ -9789,11 +9799,15 @@ var ModalView = Backbone.View.extend({
|
||||||
|
|
||||||
var ModalTerminal = ContainedBase.extend({
|
var ModalTerminal = ContainedBase.extend({
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
className: 'box flex1',
|
className: 'modalTerminal box flex1',
|
||||||
template: _.template($('#terminal-window-template').html()),
|
template: _.template($('#terminal-window-template').html()),
|
||||||
|
events: {
|
||||||
|
'click div.inside': 'onClick'
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
this.navEvents = options.events || _.clone(Backbone.Events);
|
||||||
|
|
||||||
this.container = new ModalView();
|
this.container = new ModalView();
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
|
@ -9803,6 +9817,10 @@ var ModalTerminal = ContainedBase.extend({
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onClick: function() {
|
||||||
|
this.navEvents.trigger('click');
|
||||||
|
},
|
||||||
|
|
||||||
getInsideElement: function() {
|
getInsideElement: function() {
|
||||||
return this.$('.inside');
|
return this.$('.inside');
|
||||||
}
|
}
|
||||||
|
@ -9845,11 +9863,32 @@ var ModalAlert = ContainedBase.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var iOSKeyboardView = Backbone.View.extend({
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
this.deferred = options.deferred || Q.defer();
|
||||||
|
|
||||||
|
this.modalAlert = new ModalAlert({
|
||||||
|
markdowns: [
|
||||||
|
'## iOS device',
|
||||||
|
'',
|
||||||
|
'On iOS, user input is needed to bring up the keyboard. Click ',
|
||||||
|
'on this window to bring up the keyboard so you can type commands'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
this.modalAlert.container.navEvents.on('click', this.clicked, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
clicked: function() {
|
||||||
|
this.modalAlert.close();
|
||||||
|
$('#commandTextField').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var ConfirmCancelTerminal = Backbone.View.extend({
|
var ConfirmCancelTerminal = Backbone.View.extend({
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
|
|
||||||
this.deferred = options.deferred || Q.defer();
|
this.deferred = options.deferred || Q.defer();
|
||||||
this.modalAlert = new ModalAlert(_.extend(
|
this.modalAlert = new ModalAlert(_.extend(
|
||||||
{},
|
{},
|
||||||
|
@ -10132,6 +10171,8 @@ exports.CanvasTerminalHolder = CanvasTerminalHolder;
|
||||||
exports.LevelToolbar = LevelToolbar;
|
exports.LevelToolbar = LevelToolbar;
|
||||||
exports.NextLevelConfirm = NextLevelConfirm;
|
exports.NextLevelConfirm = NextLevelConfirm;
|
||||||
|
|
||||||
|
exports.iOSKeyboardView = iOSKeyboardView;
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16669,6 +16710,16 @@ var init = function() {
|
||||||
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent)) {
|
||||||
|
alert(1);
|
||||||
|
var Views = require('../views');
|
||||||
|
setTimeout(function() {
|
||||||
|
eventBaton.trigger('commandSubmitted', 'iOS keyboardPop');
|
||||||
|
}, 600);
|
||||||
|
setTimeout(function() {
|
||||||
|
new Views.iOSKeyboardView();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(init);
|
$(document).ready(init);
|
||||||
|
@ -21561,11 +21612,15 @@ var ModalView = Backbone.View.extend({
|
||||||
|
|
||||||
var ModalTerminal = ContainedBase.extend({
|
var ModalTerminal = ContainedBase.extend({
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
className: 'box flex1',
|
className: 'modalTerminal box flex1',
|
||||||
template: _.template($('#terminal-window-template').html()),
|
template: _.template($('#terminal-window-template').html()),
|
||||||
|
events: {
|
||||||
|
'click div.inside': 'onClick'
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
this.navEvents = options.events || _.clone(Backbone.Events);
|
||||||
|
|
||||||
this.container = new ModalView();
|
this.container = new ModalView();
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
|
@ -21575,6 +21630,10 @@ var ModalTerminal = ContainedBase.extend({
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onClick: function() {
|
||||||
|
this.navEvents.trigger('click');
|
||||||
|
},
|
||||||
|
|
||||||
getInsideElement: function() {
|
getInsideElement: function() {
|
||||||
return this.$('.inside');
|
return this.$('.inside');
|
||||||
}
|
}
|
||||||
|
@ -21617,11 +21676,32 @@ var ModalAlert = ContainedBase.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var iOSKeyboardView = Backbone.View.extend({
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
this.deferred = options.deferred || Q.defer();
|
||||||
|
|
||||||
|
this.modalAlert = new ModalAlert({
|
||||||
|
markdowns: [
|
||||||
|
'## iOS device',
|
||||||
|
'',
|
||||||
|
'On iOS, user input is needed to bring up the keyboard. Click ',
|
||||||
|
'on this window to bring up the keyboard so you can type commands'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
this.modalAlert.container.navEvents.on('click', this.clicked, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
clicked: function() {
|
||||||
|
this.modalAlert.close();
|
||||||
|
$('#commandTextField').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var ConfirmCancelTerminal = Backbone.View.extend({
|
var ConfirmCancelTerminal = Backbone.View.extend({
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
|
|
||||||
this.deferred = options.deferred || Q.defer();
|
this.deferred = options.deferred || Q.defer();
|
||||||
this.modalAlert = new ModalAlert(_.extend(
|
this.modalAlert = new ModalAlert(_.extend(
|
||||||
{},
|
{},
|
||||||
|
@ -21904,6 +21984,8 @@ exports.CanvasTerminalHolder = CanvasTerminalHolder;
|
||||||
exports.LevelToolbar = LevelToolbar;
|
exports.LevelToolbar = LevelToolbar;
|
||||||
exports.NextLevelConfirm = NextLevelConfirm;
|
exports.NextLevelConfirm = NextLevelConfirm;
|
||||||
|
|
||||||
|
exports.iOSKeyboardView = iOSKeyboardView;
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
require("/src/js/views/index.js");
|
require("/src/js/views/index.js");
|
||||||
|
|
|
@ -117,6 +117,16 @@ var init = function() {
|
||||||
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
eventBaton.trigger('commandSubmitted', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase -i HEAD~2; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent)) {
|
||||||
|
alert(1);
|
||||||
|
var Views = require('../views');
|
||||||
|
setTimeout(function() {
|
||||||
|
eventBaton.trigger('commandSubmitted', 'iOS keyboardPop');
|
||||||
|
}, 600);
|
||||||
|
setTimeout(function() {
|
||||||
|
new Views.iOSKeyboardView();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(init);
|
$(document).ready(init);
|
||||||
|
|
|
@ -224,11 +224,15 @@ var ModalView = Backbone.View.extend({
|
||||||
|
|
||||||
var ModalTerminal = ContainedBase.extend({
|
var ModalTerminal = ContainedBase.extend({
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
className: 'box flex1',
|
className: 'modalTerminal box flex1',
|
||||||
template: _.template($('#terminal-window-template').html()),
|
template: _.template($('#terminal-window-template').html()),
|
||||||
|
events: {
|
||||||
|
'click div.inside': 'onClick'
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
this.navEvents = options.events || _.clone(Backbone.Events);
|
||||||
|
|
||||||
this.container = new ModalView();
|
this.container = new ModalView();
|
||||||
this.JSON = {
|
this.JSON = {
|
||||||
|
@ -238,6 +242,10 @@ var ModalTerminal = ContainedBase.extend({
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onClick: function() {
|
||||||
|
this.navEvents.trigger('click');
|
||||||
|
},
|
||||||
|
|
||||||
getInsideElement: function() {
|
getInsideElement: function() {
|
||||||
return this.$('.inside');
|
return this.$('.inside');
|
||||||
}
|
}
|
||||||
|
@ -280,11 +288,32 @@ var ModalAlert = ContainedBase.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var iOSKeyboardView = Backbone.View.extend({
|
||||||
|
initialize: function(options) {
|
||||||
|
options = options || {};
|
||||||
|
this.deferred = options.deferred || Q.defer();
|
||||||
|
|
||||||
|
this.modalAlert = new ModalAlert({
|
||||||
|
markdowns: [
|
||||||
|
'## iOS device',
|
||||||
|
'',
|
||||||
|
'On iOS, user input is needed to bring up the keyboard. Click ',
|
||||||
|
'on this window to bring up the keyboard so you can type commands'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
this.modalAlert.container.navEvents.on('click', this.clicked, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
clicked: function() {
|
||||||
|
this.modalAlert.close();
|
||||||
|
$('#commandTextField').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var ConfirmCancelTerminal = Backbone.View.extend({
|
var ConfirmCancelTerminal = Backbone.View.extend({
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
|
|
||||||
this.deferred = options.deferred || Q.defer();
|
this.deferred = options.deferred || Q.defer();
|
||||||
this.modalAlert = new ModalAlert(_.extend(
|
this.modalAlert = new ModalAlert(_.extend(
|
||||||
{},
|
{},
|
||||||
|
@ -567,3 +596,5 @@ exports.CanvasTerminalHolder = CanvasTerminalHolder;
|
||||||
exports.LevelToolbar = LevelToolbar;
|
exports.LevelToolbar = LevelToolbar;
|
||||||
exports.NextLevelConfirm = NextLevelConfirm;
|
exports.NextLevelConfirm = NextLevelConfirm;
|
||||||
|
|
||||||
|
exports.iOSKeyboardView = iOSKeyboardView;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue