From cc40017b1a294e92fad109e3f9f327b01b2c356b Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Fri, 11 Oct 2013 14:26:16 -0500 Subject: [PATCH] List syncing --- dist/css/ionic-ios7.css | 18 +++++++++++++++--- dist/css/ionic.css | 18 +++++++++++++++--- dist/js/ionic-angular.js | 11 ++++++++--- example/toderp2/index.html | 15 +++++---------- js/ext/angular/src/directive/ionicList.js | 10 +++++++--- js/ext/angular/src/directive/ionicToggle.js | 1 + js/ext/angular/test/list.html | 7 +++++++ scss/ionic/_listview.scss | 18 ++++++++++++++++-- 8 files changed, 74 insertions(+), 24 deletions(-) diff --git a/dist/css/ionic-ios7.css b/dist/css/ionic-ios7.css index a7732791bb..5474efb988 100644 --- a/dist/css/ionic-ios7.css +++ b/dist/css/ionic-ios7.css @@ -1078,7 +1078,8 @@ a.list-item { * "edit mode" */ .list-editing .list-item-content { - margin-left: 30px; } + margin-left: 30px; + margin-right: 30px; } .list-editing .list-item-edit { left: 0px; opacity: 1; } @@ -1091,7 +1092,7 @@ a.list-item { .list-item-content { position: relative; background-color: #fff; - z-index: 1; + z-index: 2; padding: 15px 15px; -webkit-transition: margin-left 0.2s ease-in-out, left 0.2s ease-in-out; } .list-item-content > i:last-child { @@ -1124,13 +1125,24 @@ a.list-item { color: #ef4e3a; font-size: 24px; } +.list-item-drag { + position: absolute; + z-index: 0; + right: 0; + top: 0; + height: 100%; } + .list-item-drag .button { + height: 100%; + border-radius: 0; + border: none; } + /** * The hidden right-side buttons that can be exposed under a list item * with dragging. */ .list-item-buttons { position: absolute; - z-index: 0; + z-index: 1; right: 0; top: 0; height: 100%; } diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 6b1b7e3d59..655ea213e8 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -2165,7 +2165,8 @@ a.list-item { * "edit mode" */ .list-editing .list-item-content { - margin-left: 30px; } + margin-left: 30px; + margin-right: 30px; } .list-editing .list-item-edit { left: 0px; opacity: 1; } @@ -2178,7 +2179,7 @@ a.list-item { .list-item-content { position: relative; background-color: #fff; - z-index: 1; + z-index: 2; padding: 15px 15px; -webkit-transition: margin-left 0.2s ease-in-out, left 0.2s ease-in-out; } .list-item-content > i:last-child { @@ -2211,13 +2212,24 @@ a.list-item { color: #ef4e3a; font-size: 24px; } +.list-item-drag { + position: absolute; + z-index: 0; + right: 0; + top: 0; + height: 100%; } + .list-item-drag .button { + height: 100%; + border-radius: 0; + border: none; } + /** * The hidden right-side buttons that can be exposed under a list item * with dragging. */ .list-item-buttons { position: absolute; - z-index: 0; + z-index: 1; right: 0; top: 0; height: 100%; } diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index c02714da2f..e6399d9079 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -190,12 +190,15 @@ angular.module('ionic.ui.list', ['ionic.service', 'ngAnimate']) replace: true, transclude: true, template: '
  • ' + - '
    ' + + '
    ' + ' ' + '
    ' + '
    ' + '
    ' + - '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + ' ' + '
    ' + '
  • ', @@ -222,7 +225,8 @@ angular.module('ionic.ui.list', ['ionic.service', 'ngAnimate']) isEditing: '=', items: '=', animation: '@', - deleteIcon: '@' + deleteIcon: '@', + reorderIcon: '@' }, template: '