mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 01:10:04 +02:00
ios alert now keyboard :(
This commit is contained in:
parent
015a17d015
commit
8144565211
5 changed files with 108 additions and 96 deletions
|
@ -288,28 +288,6 @@ 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.die();
|
||||
$('#commandTextField').focus();
|
||||
}
|
||||
});
|
||||
|
||||
var ConfirmCancelTerminal = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
|
@ -321,7 +299,6 @@ var ConfirmCancelTerminal = Backbone.View.extend({
|
|||
options.modalAlert
|
||||
));
|
||||
|
||||
|
||||
var buttonDefer = Q.defer();
|
||||
this.buttonDefer = buttonDefer;
|
||||
this.confirmCancel = new ConfirmCancelView({
|
||||
|
@ -387,6 +364,23 @@ var ConfirmCancelTerminal = Backbone.View.extend({
|
|||
}
|
||||
});
|
||||
|
||||
var iOSKeyboardView = ConfirmCancelTerminal.extend({
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
options.modalAlert = {
|
||||
markdowns: [
|
||||
'## iOS device',
|
||||
'',
|
||||
"On iOS, javascript can't bring up the software keyboard so unfortunately ",
|
||||
"there's no way for you to enter commands :-/ Try visiting the site on desktop ",
|
||||
"to get the full experience, or submit a pull request if you have an idea on how ",
|
||||
"to integrate user input on iOS"
|
||||
]
|
||||
};
|
||||
ConfirmCancelTerminal.prototype.initialize.apply(this, [options]);
|
||||
}
|
||||
});
|
||||
|
||||
var NextLevelConfirm = ConfirmCancelTerminal.extend({
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue