better mobile alert

This commit is contained in:
Peter Cottle 2013-10-26 14:56:15 -07:00
parent 1e152858a2
commit fee6bf48af
2 changed files with 7 additions and 6 deletions

View file

@ -125,6 +125,12 @@ var initDemo = function(sandbox) {
// being the smart programmer I am (not), I dont include a true value on demo, so // being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here // I have to check if the key exists here
var commands; var commands;
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', 'mobile alert');
});
}
if (params.hasOwnProperty('demo')) { if (params.hasOwnProperty('demo')) {
commands = [ commands = [
"git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;", "git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;",
@ -193,11 +199,6 @@ var initDemo = function(sandbox) {
}); });
} }
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', 'mobile alert');
});
}
}; };
if (require('../util').isBrowser()) { if (require('../util').isBrowser()) {

View file

@ -371,7 +371,7 @@ exports.strings = {
}, },
'mobile-alert': { 'mobile-alert': {
'__desc__': 'When someone comes to the site on a mobile device, they can not input commands so this is a nasty alert to tell them', '__desc__': 'When someone comes to the site on a mobile device, they can not input commands so this is a nasty alert to tell them',
'en_US': 'Can\'t bring up the keyboard on mobile / tablet :( try visiting on desktop! :D', 'en_US': 'LGB cant receive input on mobile, its worth it to visit on desktop! :D",
'zh_CN': '无法在移动设备/平板上调出键盘 :( 请试试桌面版 :D', 'zh_CN': '无法在移动设备/平板上调出键盘 :( 请试试桌面版 :D',
'fr_FR': 'Impossible de faire apparaître le clavier sur mobile / tablette :( Essayez de passer sur un ordinateur de bureau :D' 'fr_FR': 'Impossible de faire apparaître le clavier sur mobile / tablette :( Essayez de passer sur un ordinateur de bureau :D'
}, },