From 0823b58d8e2b9180f2bd3f19c4e6956dd2e31747 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 27 Sep 2013 10:42:19 -0500 Subject: [PATCH] reorder HeaderBar after NavBar in grunt --- Gruntfile.js | 5 ++- dist/ionic-ios7.css | 19 ++++---- dist/ionic-simple.js | 14 ++---- dist/ionic.css | 15 ++++--- dist/ionic.js | 100 +++++++++++++++++++++--------------------- dist/ionicIcons.css | 17 +++---- js/views/headerBar.js | 44 ++++++++++--------- 7 files changed, 109 insertions(+), 105 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9cf80ee086..b1fe8f1436 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,7 +16,10 @@ module.exports = function(grunt) { 'js/gestures.js', 'js/animate.js', 'js/viewController.js', - 'js/views/**/*.js', + 'js/views/navBar.js', + 'js/views/headerBar.js', + 'js/views/tabBar.js', + 'js/views/sideMenu.js', 'js/controllers/**/*.js', 'js/tapPolyfill.js' ], diff --git a/dist/ionic-ios7.css b/dist/ionic-ios7.css index 9e9bd1182f..03ea645f72 100644 --- a/dist/ionic-ios7.css +++ b/dist/ionic-ios7.css @@ -1,3 +1,4 @@ +@charset "UTF-8"; /** * Adapted from normalize.css and some reset.css. We don't care even one * bit about old IE, so we don't need any hacks for that in here. @@ -181,7 +182,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -1770,7 +1771,7 @@ select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { - outline: thin dotted #333; + outline: thin dotted #333333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } @@ -1857,7 +1858,7 @@ input[type="checkbox"][readonly] { right: 20px; transition: 0.2s ease; transition-property: left, right; - transition-delay: 0s, .05s; } + transition-delay: 0s, 0.05s; } .toggle :checked + .track { /* When the toggle is "on" */ @@ -1872,7 +1873,7 @@ input[type="checkbox"][readonly] { right: 0; left: 20px; -webkit-transform: none; - transition-delay: .05s, 0s; } + transition-delay: 0.05s, 0s; } /* hide a radio button's icon by default */ .radio-item [class^="icon-"], @@ -2048,7 +2049,7 @@ input[type="checkbox"][readonly] { border: none; background: none; } .button.button-icon:active, .button.button-icon.active { - text-shadow: 0px 0px 10px #fff; + text-shadow: 0px 0px 10px white; box-shadow: none; background: none; } @@ -2237,8 +2238,8 @@ a.button { } */ .slide-in-up.enter { - -webkit-transition: -webkit-transform .4s, opacity .4s; - transition: transform .4s, opacity .4s; + -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); } @@ -2246,8 +2247,8 @@ a.button { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .slide-in-up.leave { - -webkit-transition: -webkit-transform .25s, opacity .25s; - transition: transform .25s, opacity .25s; } + -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); } diff --git a/dist/ionic-simple.js b/dist/ionic-simple.js index d6caa7e374..d30a560bfb 100644 --- a/dist/ionic-simple.js +++ b/dist/ionic-simple.js @@ -1,10 +1,10 @@ (function(window, document, ionic) { - ionic.simple = { - - + ionic.Components = {}; + ionic.registerComponent = function(name, className) { + this.Components[name] = className; }; function initalize() { @@ -30,13 +30,7 @@ (function(window, document, ionic) { function initalize() { - - ionic.on("swipe", swipe, document.body) - - } - - function swipe(e) { - alert(e.target.tagName) + ionic.registerComponent("toggle", "toggle"); } ionic.on("domready", initalize); diff --git a/dist/ionic.css b/dist/ionic.css index 87f2df7e26..cb1491359f 100644 --- a/dist/ionic.css +++ b/dist/ionic.css @@ -1,3 +1,4 @@ +@charset "UTF-8"; /** * Adapted from normalize.css and some reset.css. We don't care even one * bit about old IE, so we don't need any hacks for that in here. @@ -181,7 +182,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -1770,7 +1771,7 @@ select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { - outline: thin dotted #333; + outline: thin dotted #333333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } @@ -2035,7 +2036,7 @@ input[type="checkbox"][readonly] { border: none; background: none; } .button.button-icon:active, .button.button-icon.active { - text-shadow: 0px 0px 10px #fff; + text-shadow: 0px 0px 10px white; box-shadow: none; background: none; } @@ -2224,8 +2225,8 @@ a.button { } */ .slide-in-up.enter { - -webkit-transition: -webkit-transform .4s, opacity .4s; - transition: transform .4s, opacity .4s; + -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); } @@ -2233,8 +2234,8 @@ a.button { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .slide-in-up.leave { - -webkit-transition: -webkit-transform .25s, opacity .25s; - transition: transform .25s, opacity .25s; } + -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); } diff --git a/dist/ionic.js b/dist/ionic.js index 4531729b6d..336429a386 100644 --- a/dist/ionic.js +++ b/dist/ionic.js @@ -1668,34 +1668,6 @@ window.ionic = { })(window.ionic); ;(function(ionic) { -ionic.views.HeaderBar = function(opts) { - this.el = opts.el; - - this._titleEl = this.el.querySelector('.title'); -}; - -ionic.views.NavBar.prototype = { - resizeTitle: function() { - var e; - var j; - var children = this.el.children; - - var title; - var titleWidth; - - for(var i = 0; j = children.length; i < j; i++) { - e = children[i]; - if(/h\d/.test(e.nodeName.toLowerCase())) { - title = e; - } - } - - titleWidth = title.offsetWidth; - } -}; -})(window.ionic); -;(function(ionic) { - ionic.views.NavBar = function(opts) { this.el = opts.el; @@ -1738,29 +1710,34 @@ ionic.views.NavBar.prototype = { })(window.ionic); ;(function(ionic) { -ionic.views = ionic.views || {}; + ionic.views.HeaderBar = function(opts) { + this.el = opts.el; -ionic.views.SideMenu = function(opts) { - this.el = opts.el; - this.width = opts.width; - this.isEnabled = opts.isEnabled || true; -}; + this._titleEl = this.el.querySelector('.title'); + }; -ionic.views.SideMenu.prototype = { - getFullWidth: function() { - return this.width; - }, - setIsEnabled: function(isEnabled) { - this.isEnabled = isEnabled; - }, - bringUp: function() { - this.el.style.zIndex = 0; - }, - pushDown: function() { - this.el.style.zIndex = -1; - } -}; -})(window.ionic); + ionic.views.NavBar.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.TabBarItem = function(el) { @@ -1964,6 +1941,31 @@ ionic.views.TabBar.prototype = { })(window.ionic); ;(function(ionic) { +ionic.views = ionic.views || {}; + +ionic.views.SideMenu = function(opts) { + this.el = opts.el; + this.width = opts.width; + this.isEnabled = opts.isEnabled || true; +}; + +ionic.views.SideMenu.prototype = { + getFullWidth: function() { + return this.width; + }, + setIsEnabled: function(isEnabled) { + this.isEnabled = isEnabled; + }, + bringUp: function() { + this.el.style.zIndex = 0; + }, + pushDown: function() { + this.el.style.zIndex = -1; + } +}; +})(window.ionic); +;(function(ionic) { + ionic.controllers.NavController = function(opts) { var _this = this; diff --git a/dist/ionicIcons.css b/dist/ionicIcons.css index 6de4d354eb..747e666619 100644 --- a/dist/ionicIcons.css +++ b/dist/ionicIcons.css @@ -68,7 +68,8 @@ you can use the generic selector below, but it's slower: .icon-contact-filled:before { content: "\e009"; } -;/** +;@charset "UTF-8"; +/** * Adapted from normalize.css and some reset.css. We don't care even one * bit about old IE, so we don't need any hacks for that in here. * @@ -251,7 +252,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -1840,7 +1841,7 @@ select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { - outline: thin dotted #333; + outline: thin dotted #333333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } @@ -2105,7 +2106,7 @@ input[type="checkbox"][readonly] { border: none; background: none; } .button.button-icon:active, .button.button-icon.active { - text-shadow: 0px 0px 10px #fff; + text-shadow: 0px 0px 10px white; box-shadow: none; background: none; } @@ -2294,8 +2295,8 @@ a.button { } */ .slide-in-up.enter { - -webkit-transition: -webkit-transform .4s, opacity .4s; - transition: transform .4s, opacity .4s; + -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); } @@ -2303,8 +2304,8 @@ a.button { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .slide-in-up.leave { - -webkit-transition: -webkit-transform .25s, opacity .25s; - transition: transform .25s, opacity .25s; } + -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); } diff --git a/js/views/headerBar.js b/js/views/headerBar.js index 0a8a79ab53..1b2e3d9144 100644 --- a/js/views/headerBar.js +++ b/js/views/headerBar.js @@ -1,28 +1,30 @@ (function(ionic) { -ionic.views.HeaderBar = function(opts) { - this.el = opts.el; + ionic.views.HeaderBar = function(opts) { + this.el = opts.el; - this._titleEl = this.el.querySelector('.title'); -}; + this._titleEl = this.el.querySelector('.title'); + }; -ionic.views.NavBar.prototype = { - resizeTitle: function() { - var e; - var j; - var children = this.el.children; + ionic.views.NavBar.prototype = { + resizeTitle: function() { + var + e, + j, + i, + title, + titleWidth, + children = this.el.children; - var title; - var titleWidth; - - for(var i = 0; j = children.length; i < j; i++) { - e = children[i]; - if(/h\d/.test(e.nodeName.toLowerCase())) { - title = e; + for(i = 0, j = children.length; i < j; i++) { + e = children[i]; + if(/h\d/.test(e.nodeName.toLowerCase())) { + title = e; + } } - } - titleWidth = title.offsetWidth; - } -}; -})(window.ionic); + titleWidth = title.offsetWidth; + } + }; + +})(ionic);