use strict

This commit is contained in:
Max Lynch
2013-10-15 14:59:26 -05:00
parent 1f2f539ae1
commit 1828379217
17 changed files with 43 additions and 18 deletions

View File

@ -1002,6 +1002,7 @@ address {
position: relative; position: relative;
display: block; display: block;
margin-bottom: -1px; margin-bottom: -1px;
z-index: 2;
background-color: white; background-color: white;
border: 1px solid #dddddd; } border: 1px solid #dddddd; }
.list-item:last-child { .list-item:last-child {

View File

@ -1674,6 +1674,7 @@
position: relative; position: relative;
display: block; display: block;
margin-bottom: -1px; margin-bottom: -1px;
z-index: 2;
background-color: white; background-color: white;
border: 1px solid #dddddd; } border: 1px solid #dddddd; }
.ionic .list-item:last-child { .ionic .list-item:last-child {

1
dist/css/ionic.css vendored
View File

@ -2089,6 +2089,7 @@ address {
position: relative; position: relative;
display: block; display: block;
margin-bottom: -1px; margin-bottom: -1px;
z-index: 2;
background-color: white; background-color: white;
border: 1px solid #dddddd; } border: 1px solid #dddddd; }
.list-item:last-child { .list-item:last-child {

27
dist/js/ionic.js vendored
View File

@ -1758,6 +1758,7 @@ window.ionic = {
})(window.ionic); })(window.ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
/** /**
* An ActionSheet is the slide up menu popularized on iOS. * An ActionSheet is the slide up menu popularized on iOS.
* *
@ -1784,8 +1785,8 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Checkbox = function(opts) { ionic.views.Checkbox = function(opts) {
this.el = opts.el; this.el = opts.el;
@ -1810,8 +1811,8 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.HeaderBar = function(opts) { ionic.views.HeaderBar = function(opts) {
this.el = opts.el; this.el = opts.el;
@ -1840,6 +1841,7 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
var DragOp = function() {}; var DragOp = function() {};
DragOp.prototype = { DragOp.prototype = {
start: function(e) { start: function(e) {
@ -1857,7 +1859,7 @@ window.ionic = {
SlideDrag.prototype = new DragOp(); SlideDrag.prototype = new DragOp();
SlideDrag.prototype.start = function(e) { SlideDrag.prototype.start = function(e) {
var content; var content, buttons, offsetX, buttonsWidth;
if(e.target.classList.contains('list-item-content')) { if(e.target.classList.contains('list-item-content')) {
content = e.target; content = e.target;
@ -1874,7 +1876,7 @@ window.ionic = {
content.classList.remove('list-item-sliding'); content.classList.remove('list-item-sliding');
// Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start) // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)
var offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0;
// Grab the buttons // Grab the buttons
buttons = content.parentNode.querySelector('.list-item-buttons'); buttons = content.parentNode.querySelector('.list-item-buttons');
@ -1892,7 +1894,7 @@ window.ionic = {
}; };
SlideDrag.prototype.drag = function(e) { SlideDrag.prototype.drag = function(e) {
var _this = this; var _this = this, buttonsWidth;
window.requestAnimationFrame(function() { window.requestAnimationFrame(function() {
// We really aren't dragging // We really aren't dragging
@ -1910,6 +1912,7 @@ window.ionic = {
} }
if(_this._isDragging) { if(_this._isDragging) {
buttonsWidth = _this._currentDrag.buttonsWidth;
// Grab the new X point, capping it at zero // Grab the new X point, capping it at zero
var newX = Math.min(0, _this._currentDrag.startOffsetX + e.gesture.deltaX); var newX = Math.min(0, _this._currentDrag.startOffsetX + e.gesture.deltaX);
@ -2164,6 +2167,7 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Modal = function(opts) { ionic.views.Modal = function(opts) {
this.el = opts.el; this.el = opts.el;
}; };
@ -2180,6 +2184,7 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.NavBar = function(opts) { ionic.views.NavBar = function(opts) {
this.el = opts.el; this.el = opts.el;
@ -2233,8 +2238,8 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.SideMenu = function(opts) { ionic.views.SideMenu = function(opts) {
this.el = opts.el; this.el = opts.el;
@ -2260,6 +2265,7 @@ window.ionic = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.TabBarItem = function(el) { ionic.views.TabBarItem = function(el) {
this.el = el; this.el = el;
@ -2461,8 +2467,8 @@ ionic.views.TabBar.prototype = {
})(window.ionic); })(window.ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Toggle = function(opts) { ionic.views.Toggle = function(opts) {
this.el = opts.el; this.el = opts.el;
@ -2539,6 +2545,7 @@ ionic.views.TabBar.prototype = {
})(ionic); })(ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
/** /**
* The NavController makes it easy to have a stack * The NavController makes it easy to have a stack
@ -2697,6 +2704,7 @@ ionic.controllers.NavController.prototype = {
* Adapted from Backbone.js * Adapted from Backbone.js
*/ */
(function(ionic) { (function(ionic) {
'use strict';
var optionalParam = /\((.*?)\)/g; var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g; var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g; var splatParam = /\*\w+/g;
@ -2711,7 +2719,7 @@ ionic.controllers.NavController.prototype = {
// Cached regex for removing a trailing slash. // Cached regex for removing a trailing slash.
var trailingSlash = /\/$/; var trailingSlash = /\/$/;
RouteViewController = function(options) { ionic.controllers.RouteViewController = function(options) {
this.options = options; this.options = options;
this.root = this.options.root || '/'; this.root = this.options.root || '/';
@ -2725,7 +2733,7 @@ ionic.controllers.NavController.prototype = {
this.history = window.history; this.history = window.history;
}; };
RouteViewController.prototype = { ionic.controllers.RouteViewController.prototype = {
when: function(route, callback) { when: function(route, callback) {
var _this = this; var _this = this;
@ -3202,6 +3210,7 @@ ionic.controllers.TabBarController.prototype = {
})(window.ionic); })(window.ionic);
; ;
(function(ionic) { (function(ionic) {
'use strict';
ionic.ViewController = function(options) { ionic.ViewController = function(options) {
this.init(); this.init();
}; };

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
/** /**
* The NavController makes it easy to have a stack * The NavController makes it easy to have a stack

View File

@ -2,6 +2,7 @@
* Adapted from Backbone.js * Adapted from Backbone.js
*/ */
(function(ionic) { (function(ionic) {
'use strict';
var optionalParam = /\((.*?)\)/g; var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g; var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g; var splatParam = /\*\w+/g;
@ -16,7 +17,7 @@
// Cached regex for removing a trailing slash. // Cached regex for removing a trailing slash.
var trailingSlash = /\/$/; var trailingSlash = /\/$/;
RouteViewController = function(options) { ionic.controllers.RouteViewController = function(options) {
this.options = options; this.options = options;
this.root = this.options.root || '/'; this.root = this.options.root || '/';
@ -30,7 +31,7 @@
this.history = window.history; this.history = window.history;
}; };
RouteViewController.prototype = { ionic.controllers.RouteViewController.prototype = {
when: function(route, callback) { when: function(route, callback) {
var _this = this; var _this = this;

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.ViewController = function(options) { ionic.ViewController = function(options) {
this.init(); this.init();
}; };

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
/** /**
* An ActionSheet is the slide up menu popularized on iOS. * An ActionSheet is the slide up menu popularized on iOS.
* *

View File

@ -1,5 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Checkbox = function(opts) { ionic.views.Checkbox = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -1,5 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.HeaderBar = function(opts) { ionic.views.HeaderBar = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
var DragOp = function() {}; var DragOp = function() {};
DragOp.prototype = { DragOp.prototype = {
start: function(e) { start: function(e) {
@ -16,7 +17,7 @@
SlideDrag.prototype = new DragOp(); SlideDrag.prototype = new DragOp();
SlideDrag.prototype.start = function(e) { SlideDrag.prototype.start = function(e) {
var content; var content, buttons, offsetX, buttonsWidth;
if(e.target.classList.contains('list-item-content')) { if(e.target.classList.contains('list-item-content')) {
content = e.target; content = e.target;
@ -33,7 +34,7 @@
content.classList.remove('list-item-sliding'); content.classList.remove('list-item-sliding');
// Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start) // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)
var offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0; offsetX = parseFloat(content.style.webkitTransform.replace('translate3d(', '').split(',')[0]) || 0;
// Grab the buttons // Grab the buttons
buttons = content.parentNode.querySelector('.list-item-buttons'); buttons = content.parentNode.querySelector('.list-item-buttons');
@ -51,7 +52,7 @@
}; };
SlideDrag.prototype.drag = function(e) { SlideDrag.prototype.drag = function(e) {
var _this = this; var _this = this, buttonsWidth;
window.requestAnimationFrame(function() { window.requestAnimationFrame(function() {
// We really aren't dragging // We really aren't dragging
@ -69,6 +70,7 @@
} }
if(_this._isDragging) { if(_this._isDragging) {
buttonsWidth = _this._currentDrag.buttonsWidth;
// Grab the new X point, capping it at zero // Grab the new X point, capping it at zero
var newX = Math.min(0, _this._currentDrag.startOffsetX + e.gesture.deltaX); var newX = Math.min(0, _this._currentDrag.startOffsetX + e.gesture.deltaX);

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Modal = function(opts) { ionic.views.Modal = function(opts) {
this.el = opts.el; this.el = opts.el;
}; };

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.NavBar = function(opts) { ionic.views.NavBar = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -1,5 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.SideMenu = function(opts) { ionic.views.SideMenu = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -1,4 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.TabBarItem = function(el) { ionic.views.TabBarItem = function(el) {
this.el = el; this.el = el;

View File

@ -1,5 +1,5 @@
(function(ionic) { (function(ionic) {
'use strict';
ionic.views.Toggle = function(opts) { ionic.views.Toggle = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -21,6 +21,10 @@
// Place the border on the list items and negative margin up for better styling // Place the border on the list items and negative margin up for better styling
margin-bottom: -1px; margin-bottom: -1px;
// Make sure the borders and stuff don't get hidden
// by children
z-index: 2;
background-color: $list-default-background; background-color: $list-default-background;
border: $list-item-border; border: $list-item-border;