Grunt updated with concat and jshint

Also added initial platform detection thing.
This commit is contained in:
Max Lynch
2013-09-23 09:55:11 -05:00
parent 7dfa86f732
commit e59ddfc529
5 changed files with 81 additions and 10 deletions

View File

@ -5,14 +5,16 @@ function initalize() {
document.removeEventListener( "DOMContentLoaded", initalize, false );
window.removeEventListener( "load", initalize, false );
/*
// trigger that the DOM is ready
ion.trigger("ready");
ionic.trigger("ready");
// trigger that the start page is in view
ion.trigger("pageview");
ionic.trigger("pageview");
// trigger that the webapp has been initalized
ion.trigger("initalized");
ionic.trigger("initalized");
*/
}
// When the DOM is ready, initalize the webapp

26
js/platform.js Normal file
View File

@ -0,0 +1,26 @@
(function(ionic) {
ionic.Platform = {
PLATFORM_CLASS_MAP: {
'ios7': 'ios7'
},
annotate: function() {
var platform = this._checkPlatforms();
platform && document.body.classList.add('platform-' + platform);
},
_checkPlatforms: function() {
if(this.isIOS7()) {
return 'ios7';
}
},
isIOS7: function() {
if(!window.device) {
return false;
}
return parseFloat(window.device.version) >= 7.0;
}
}
ionic.Platform.annotate();
})(ionic = window.ionic || {});

View File

@ -3,7 +3,7 @@
this.init();
};
ion.ViewController.prototype = {
ionic.ViewController.prototype = {
// Initialize this view controller
init: function() {
},