From 66979e11fe37f7febf6e29a2ad117d9eb2437e09 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Sun, 1 Sep 2013 17:00:05 -0500 Subject: [PATCH] Added basic toderp --- dist/ionic.css | 23 ++++++----- example/angular/index.html | 22 +++++------ example/angular/menu.js | 39 +++++++++++++++++++ example/angular/panel.js | 0 example/angular/test/menu.unit.js | 5 +++ example/tab-bars.html | 13 ++++++- example/toderp/app.css | 0 example/toderp/app.js | 43 ++++++++++++++++++++ example/toderp/index.html | 56 +++++++++++++++++++++++++++ js/controllers/ionic-leftrightmenu.js | 29 +++++++++----- js/controllers/ionic-tabcontroller.js | 19 +++++++++ js/ionic-viewcontroller.js | 13 +++++++ scss/ionic/structure/_base.scss | 23 +++++------ scss/ionic/structure/_menu.scss | 2 + 14 files changed, 244 insertions(+), 43 deletions(-) create mode 100644 example/angular/menu.js create mode 100644 example/angular/panel.js create mode 100644 example/angular/test/menu.unit.js create mode 100644 example/toderp/app.css create mode 100644 example/toderp/app.js create mode 100644 example/toderp/index.html create mode 100644 js/controllers/ionic-tabcontroller.js create mode 100644 js/ionic-viewcontroller.js diff --git a/dist/ionic.css b/dist/ionic.css index 77571f0660..81f4e10e8b 100644 --- a/dist/ionic.css +++ b/dist/ionic.css @@ -23,19 +23,27 @@ ul { margin: 0; padding: 0; } -main { +.page, .full-section { position: fixed; top: 0; right: 0; bottom: 0; left: 0; - overflow: auto; + z-index: 1; width: 100%; - -webkit-overflow-scrolling: touch; } + height: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; + background-color: #fff; } + +.content { + position: absolute; + width: 100%; + height: 100%; } /* Hack to force all relatively and absolutely positioned elements still render while scrolling Note: This is a bug for "-webkit-overflow-scrolling: touch" (via ratchet) */ -main > * { +.content > *, .content-padded > * { -webkit-transform: translateZ(0px); transform: translateZ(0px); } @@ -46,12 +54,6 @@ main > * { position: fixed; z-index: 1; } -.full-section { - position: fixed; - z-index: 1; - width: 100%; - height: 100%; } - .rounded { border-radius: 5px; } @@ -1059,6 +1061,7 @@ a.list-item { top: 0; bottom: 0; z-index: 0; + background-color: #fff; overflow-y: scroll; -webkit-overflow-scrolling: touch; } diff --git a/example/angular/index.html b/example/angular/index.html index f145663558..6a11b04f8c 100644 --- a/example/angular/index.html +++ b/example/angular/index.html @@ -11,17 +11,17 @@ - - - - -
-

Customers

-
- -
-
-
+ + + + + + + + + + + diff --git a/example/angular/menu.js b/example/angular/menu.js new file mode 100644 index 0000000000..9f9bf0ec0f --- /dev/null +++ b/example/angular/menu.js @@ -0,0 +1,39 @@ +angular.module('ionic.menu', []) + +.controller('LeftRightMenuController', ['$scope', '$element', +function LeftRightMenuCtrl($scope, $element) { + var ctrl = ion.controllers.LeftRightMenuViewController; +}]) + +.directive('ionicLeftRightMenu', function() { + return { + restrict: 'EA', + scope: true, + transclude: true, + controller: 'LeftRightMenuController', + compile: function(elm, attrs, transclude) { + return function(scope, element, attrs, menuCtrl) { + console.log('Compile'); + }; + }, + link: function(scope) { + console.log('link'); + } + } +}) + +.directive('ionicMenu', function() { + return { + restrict: 'EA', + controller: '', + compile: function(elm, attrs, transclude) { + return function(scope, element, attrs, menuCtrl) { + console.log('Compile'); + }; + }, + link: function(scope) { + console.log('link'); + } + } +}); + diff --git a/example/angular/panel.js b/example/angular/panel.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/example/angular/test/menu.unit.js b/example/angular/test/menu.unit.js new file mode 100644 index 0000000000..c78143c235 --- /dev/null +++ b/example/angular/test/menu.unit.js @@ -0,0 +1,5 @@ +describe('Menu directive', function() { + + it('Adds a menu class to the panel element', function() { + }); +}); diff --git a/example/tab-bars.html b/example/tab-bars.html index 00ca7666cf..ffdf4e71c9 100644 --- a/example/tab-bars.html +++ b/example/tab-bars.html @@ -22,7 +22,7 @@