diff --git a/Gruntfile.js b/Gruntfile.js index 80713331ea..8acd645672 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,11 +18,7 @@ module.exports = function(grunt) { 'js/utils/**/*.js', // Views - 'js/views/navBarView.js', - 'js/views/headerBarView.js', - 'js/views/sideMenuView.js', - 'js/views/tabBarView.js', - 'js/views/toggleView.js', + 'js/views/**/*.js', // Controllers 'js/controllers/**/*.js' diff --git a/dist/ionic-angular.js b/dist/ionic-angular.js index c00254fc18..281308452e 100644 --- a/dist/ionic-angular.js +++ b/dist/ionic-angular.js @@ -2,6 +2,44 @@ angular.module('ionic.ui', ['ionic.ui.content', 'ionic.ui.tabs', 'ionic.ui.nav', ; ; ; +angular.module('ionic.service.modal', ['ionic.service']) + + +.factory('Modal', ['$rootScope', '$document', '$compile', 'TemplateLoader', function($rootScope, $document, $compile, TemplateLoader) { + return { + /** + * Load a modal with the given template string. + * + * A new isolated scope will be created for the + * modal and the new element will be appended into the body. + */ + fromTemplate: function(templateString) { + // Create a new isolated scope for the modal + var scope = $rootScope.$new(true); + + // Compile the template + var element = $compile(templateString)(scope); + $document[0].body.appendChild(element[0]); + + return new ionic.views.Modal({el: element[0] }); + }, + fromTemplateUrl: function(url, cb) { + TemplateLoader.load(url).then(function(templateString) { + // Create a new isolated scope for the modal + var scope = $rootScope.$new(true); + + // Compile the template + var element = $compile(templateString)(scope); + $document[0].body.appendChild(element[0]); + + var modal = new ionic.views.Modal({ el: element[0] }); + + cb(modal); + }); + } + }; +}]); +; angular.module('ionic.service', []) .factory('TemplateLoader', ['$q', '$http', '$templateCache', function($q, $http, $templateCache) { diff --git a/dist/ionic-ios7.css b/dist/ionic-ios7.css index c406e2f928..1b6ee1182b 100644 --- a/dist/ionic-ios7.css +++ b/dist/ionic-ios7.css @@ -2271,21 +2271,21 @@ a.button { transition: transform .25s ease-in-out, opacity 1ms .25s; } */ -.slide-in-up.enter { - -webkit-transition: -webkit-transform 0.4s, opacity 0.4s; - transition: transform 0.4s, opacity 0.4s; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - -webkit-transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1); } -.slide-in-up.enter-active { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); } -.slide-in-up.leave { - -webkit-transition: -webkit-transform 0.25s, opacity 0.25s; - transition: transform 0.25s, opacity 0.25s; } -.slide-in-up.leave-active { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); } +@-webkit-keyframes slide-in-up { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); } + + 100% { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + +.slide-in-up.active { + animation: slide-in-up 0.5s; + -webkit-animation: slide-in-up 0.5s; + -webkit-animation-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1); } @keyframes fadein { from { diff --git a/dist/ionic.css b/dist/ionic.css index 6fc43c4e7b..5d6d7f9233 100644 --- a/dist/ionic.css +++ b/dist/ionic.css @@ -2323,21 +2323,21 @@ a.button { transition: transform .25s ease-in-out, opacity 1ms .25s; } */ -.slide-in-up.enter { - -webkit-transition: -webkit-transform 0.4s, opacity 0.4s; - transition: transform 0.4s, opacity 0.4s; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - -webkit-transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1); } -.slide-in-up.enter-active { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); } -.slide-in-up.leave { - -webkit-transition: -webkit-transform 0.25s, opacity 0.25s; - transition: transform 0.25s, opacity 0.25s; } -.slide-in-up.leave-active { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); } +@-webkit-keyframes slide-in-up { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); } + + 100% { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + +.slide-in-up.active { + animation: slide-in-up 0.5s; + -webkit-animation: slide-in-up 0.5s; + -webkit-animation-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1); } @keyframes fadein { from { diff --git a/dist/ionic.js b/dist/ionic.js index e6b946073b..28a441f154 100644 --- a/dist/ionic.js +++ b/dist/ionic.js @@ -1731,6 +1731,51 @@ window.ionic = { })(window.ionic); ; +(function(ionic) { + + ionic.views.HeaderBar = function(opts) { + this.el = opts.el; + + this._titleEl = this.el.querySelector('.title'); + }; + + ionic.views.HeaderBar.prototype = { + resizeTitle: function() { + var e, j, i, + title, + titleWidth, + children = this.el.children; + + for(i = 0, j = children.length; i < j; i++) { + e = children[i]; + if(/h\d/.test(e.nodeName.toLowerCase())) { + title = e; + } + } + + titleWidth = title.offsetWidth; + } + }; + +})(ionic); +; +(function(ionic) { + ionic.views.Modal = function(opts) { + this.el = opts.el; + }; + + ionic.views.Modal.prototype = { + show: function() { + this.el.classList.add('active'); + }, + hide: function() { + this.el.classList.remove('active'); + } + }; + +})(ionic); +; + (function(ionic) { ionic.views.NavBar = function(opts) { @@ -1786,35 +1831,6 @@ window.ionic = { })(ionic); ; -(function(ionic) { - - ionic.views.HeaderBar = function(opts) { - this.el = opts.el; - - this._titleEl = this.el.querySelector('.title'); - }; - - ionic.views.HeaderBar.prototype = { - resizeTitle: function() { - var e, j, i, - title, - titleWidth, - children = this.el.children; - - for(i = 0, j = children.length; i < j; i++) { - e = children[i]; - if(/h\d/.test(e.nodeName.toLowerCase())) { - title = e; - } - } - - titleWidth = title.offsetWidth; - } - }; - -})(ionic); -; - (function(ionic) { ionic.views.SideMenu = function(opts) { diff --git a/example/toderp2/css/app.css b/example/toderp2/css/app.css index 354864c96b..a58e0010ec 100644 --- a/example/toderp2/css/app.css +++ b/example/toderp2/css/app.css @@ -28,7 +28,7 @@ #splash-view, #signup-view { background: url('../img/splash.png') no-repeat transparent; - background-size: contain; + background-size: cover; } #signup-bottom { diff --git a/example/toderp2/index.html b/example/toderp2/index.html index da057db3af..9653be8cfc 100644 --- a/example/toderp2/index.html +++ b/example/toderp2/index.html @@ -38,7 +38,6 @@ @@ -52,26 +51,26 @@
- +
Unable to signup, please try again.

Already have an account?

- +
@@ -79,8 +78,12 @@