List item updates

This commit is contained in:
Max Lynch
2013-11-04 21:24:28 -06:00
parent 7f4147ea06
commit 11e0e478d1
7 changed files with 65 additions and 51 deletions

View File

@ -182,7 +182,7 @@ sub {
fieldset { fieldset {
margin: 0 2px; margin: 0 2px;
padding: 0.35em 0.625em 0.75em; 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. * 1. Correct `color` not being inherited in IE 8/9.
@ -1465,11 +1465,13 @@ button.item-button-right:after {
* "edit mode" * "edit mode"
*/ */
.list-editing .item-content { .list-editing .item-content {
margin-right: 30px; margin-right: 50px;
margin-left: 30px; } margin-left: 50px; }
.list-editing .item-edit { .list-editing .item-edit {
left: 0px; left: 0px;
opacity: 1; } opacity: 1; }
.list-editing .item-edit i {
left: 5px; }
.list-header { .list-header {
margin-top: 20px; margin-top: 20px;
@ -1721,7 +1723,7 @@ input[type="file"] {
line-height: 34px; } line-height: 34px; }
select { select {
border: 1px solid #ccc; border: 1px solid #cccccc;
background-color: white; } background-color: white; }
select[multiple], select[multiple],
@ -1793,7 +1795,7 @@ input[type="checkbox"][readonly] {
right: 20px; right: 20px;
transition: 0.2s ease; transition: 0.2s ease;
transition-property: left, right; transition-property: left, right;
transition-delay: 0s, .05s; } transition-delay: 0s, 0.05s; }
.toggle :checked + .track { .toggle :checked + .track {
/* When the toggle is "on" */ /* When the toggle is "on" */
@ -1808,7 +1810,7 @@ input[type="checkbox"][readonly] {
right: 0; right: 0;
left: 20px; left: 20px;
-webkit-transform: none; -webkit-transform: none;
transition-delay: .05s, 0s; } transition-delay: 0.05s, 0s; }
.item-radio { .item-radio {
padding: 0; } padding: 0; }
@ -2093,7 +2095,7 @@ input[type="range"] {
.button.button-icon:active, .button.button-icon.active { .button.button-icon:active, .button.button-icon.active {
background: none; background: none;
box-shadow: none; box-shadow: none;
text-shadow: 0px 0px 10px #fff; } text-shadow: 0px 0px 10px white; }
.button.block, .button.button-full { .button.block, .button.button-full {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; } margin-bottom: 10px; }
@ -2437,9 +2439,9 @@ a.button {
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ion-loading:before { .ion-loading:before {
content: "\e144"; } content: "\e144"; }
@ -2452,9 +2454,9 @@ a.button {
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ion-refreshing:before { .ion-refreshing:before {
content: "\e144"; } content: "\e144"; }

View File

@ -210,7 +210,7 @@
transform: rotate(360deg); } } transform: rotate(360deg); } }
} }
.ionic .ion { .ionic .ion {
font-family: 'Ionicons' !important; font-family: "Ionicons" !important;
speak: none !important; speak: none !important;
font-style: normal !important; font-style: normal !important;
font-weight: normal !important; font-weight: normal !important;
@ -1192,7 +1192,7 @@
.ionic fieldset { .ionic fieldset {
margin: 0 2px; margin: 0 2px;
padding: 0.35em 0.625em 0.75em; padding: 0.35em 0.625em 0.75em;
border: 1px solid #c0c0c0; } border: 1px solid silver; }
.ionic legend { .ionic legend {
padding: 0; padding: 0;
/* 2 */ /* 2 */
@ -2311,11 +2311,13 @@
padding-bottom: 1px; padding-bottom: 1px;
padding-left: 0; } padding-left: 0; }
.ionic .list-editing .item-content { .ionic .list-editing .item-content {
margin-right: 30px; margin-right: 50px;
margin-left: 30px; } margin-left: 50px; }
.ionic .list-editing .item-edit { .ionic .list-editing .item-edit {
left: 0px; left: 0px;
opacity: 1; } opacity: 1; }
.ionic .list-editing .item-edit i {
left: 5px; }
.ionic .list-header { .ionic .list-header {
margin-top: 20px; margin-top: 20px;
padding: 5px 15px; padding: 5px 15px;
@ -2538,7 +2540,7 @@
.ionic input[type="file"] { .ionic input[type="file"] {
line-height: 34px; } line-height: 34px; }
.ionic select { .ionic select {
border: 1px solid #ccc; border: 1px solid #cccccc;
background-color: white; } background-color: white; }
.ionic select[multiple], .ionic select[multiple],
.ionic select[size] { .ionic select[size] {
@ -2587,7 +2589,7 @@
border-radius: 50%; border-radius: 50%;
background: white; background: white;
content: ' '; content: ' ';
transition: background-color .1s ease-in-out; } transition: background-color 0.1s ease-in-out; }
.ionic .checkbox input:after { .ionic .checkbox input:after {
position: absolute; position: absolute;
top: 34%; top: 34%;
@ -2600,7 +2602,7 @@
border-right: 0; border-right: 0;
content: ' '; content: ' ';
opacity: 0; opacity: 0;
transition: opacity .05s ease-in-out; transition: opacity 0.05s ease-in-out;
-webkit-transform: rotate(-45deg); -webkit-transform: rotate(-45deg);
transform: rotate(-45deg); } transform: rotate(-45deg); }
.ionic .checkbox input:checked:before { .ionic .checkbox input:checked:before {
@ -2952,7 +2954,7 @@
.ionic .button.button-icon:active, .ionic .button.button-icon.active { .ionic .button.button-icon:active, .ionic .button.button-icon.active {
background: none; background: none;
box-shadow: none; box-shadow: none;
text-shadow: 0px 0px 10px #fff; } text-shadow: 0px 0px 10px white; }
.ionic .button.block, .ionic .button.button-full { .ionic .button.block, .ionic .button.button-full {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; } margin-bottom: 10px; }
@ -3202,9 +3204,9 @@
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ionic .ion-loading:before { .ionic .ion-loading:before {
content: "\e144"; } content: "\e144"; }
.ionic .ion-refreshing { .ionic .ion-refreshing {
@ -3216,9 +3218,9 @@
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ionic .ion-refreshing:before { .ionic .ion-refreshing:before {
content: "\e144"; } content: "\e144"; }
.ionic .hidden, .ionic .hidden,

30
dist/css/ionic.css vendored
View File

@ -7,7 +7,7 @@
font-style: normal; } font-style: normal; }
.ion { .ion {
font-family: 'Ionicons' !important; font-family: "Ionicons" !important;
speak: none !important; speak: none !important;
font-style: normal !important; font-style: normal !important;
font-weight: normal !important; font-weight: normal !important;
@ -1521,7 +1521,7 @@ sub {
fieldset { fieldset {
margin: 0 2px; margin: 0 2px;
padding: 0.35em 0.625em 0.75em; 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. * 1. Correct `color` not being inherited in IE 8/9.
@ -2868,11 +2868,13 @@ button.item-button-right:after {
* "edit mode" * "edit mode"
*/ */
.list-editing .item-content { .list-editing .item-content {
margin-right: 30px; margin-right: 50px;
margin-left: 30px; } margin-left: 50px; }
.list-editing .item-edit { .list-editing .item-edit {
left: 0px; left: 0px;
opacity: 1; } opacity: 1; }
.list-editing .item-edit i {
left: 5px; }
.list-header { .list-header {
margin-top: 20px; margin-top: 20px;
@ -3124,7 +3126,7 @@ input[type="file"] {
line-height: 34px; } line-height: 34px; }
select { select {
border: 1px solid #ccc; border: 1px solid #cccccc;
background-color: white; } background-color: white; }
select[multiple], select[multiple],
@ -3179,7 +3181,7 @@ input[type="checkbox"][readonly] {
border-radius: 50%; border-radius: 50%;
background: white; background: white;
content: ' '; content: ' ';
transition: background-color .1s ease-in-out; } transition: background-color 0.1s ease-in-out; }
/* the checkmark within the box */ /* the checkmark within the box */
.checkbox input:after { .checkbox input:after {
@ -3194,7 +3196,7 @@ input[type="checkbox"][readonly] {
border-right: 0; border-right: 0;
content: ' '; content: ' ';
opacity: 0; opacity: 0;
transition: opacity .05s ease-in-out; transition: opacity 0.05s ease-in-out;
-webkit-transform: rotate(-45deg); -webkit-transform: rotate(-45deg);
transform: rotate(-45deg); } transform: rotate(-45deg); }
@ -3574,7 +3576,7 @@ input[type="range"] {
.button.button-icon:active, .button.button-icon.active { .button.button-icon:active, .button.button-icon.active {
background: none; background: none;
box-shadow: none; box-shadow: none;
text-shadow: 0px 0px 10px #fff; } text-shadow: 0px 0px 10px white; }
.button.block, .button.button-full { .button.block, .button.button-full {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; } margin-bottom: 10px; }
@ -4096,9 +4098,9 @@ a.button {
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ion-loading:before { .ion-loading:before {
content: "\e144"; } content: "\e144"; }
@ -4111,9 +4113,9 @@ a.button {
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-animation: spin .75s linear infinite; -webkit-animation: spin 0.75s linear infinite;
-moz-animation: spin .75s linear infinite; -moz-animation: spin 0.75s linear infinite;
animation: spin .75s linear infinite; } animation: spin 0.75s linear infinite; }
.ion-refreshing:before { .ion-refreshing:before {
content: "\e144"; } content: "\e144"; }

View File

@ -411,6 +411,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
buttons: '=', buttons: '=',
}, },
template: '<a href="#" class="item item-slider">\ template: '<a href="#" class="item item-slider">\
<div class="item-edit" ng-if="canDelete && isEditing">\
<button class="button button-icon" ng-click="onDelete()"><i ng-class="deleteIcon"></i></button>\
</div>\
<div class="item-content slide-left" ng-transclude>\ <div class="item-content slide-left" ng-transclude>\
</div>\ </div>\
<div class="item-options" ng-if="canSwipe && !isEditing">\ <div class="item-options" ng-if="canSwipe && !isEditing">\

View File

@ -19,6 +19,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
buttons: '=', buttons: '=',
}, },
template: '<a href="#" class="item item-slider">\ template: '<a href="#" class="item item-slider">\
<div class="item-edit" ng-if="canDelete && isEditing">\
<button class="button button-icon" ng-click="onDelete()"><i ng-class="deleteIcon"></i></button>\
</div>\
<div class="item-content slide-left" ng-transclude>\ <div class="item-content slide-left" ng-transclude>\
</div>\ </div>\
<div class="item-options" ng-if="canSwipe && !isEditing">\ <div class="item-options" ng-if="canSwipe && !isEditing">\

View File

@ -63,17 +63,16 @@
<body> <body>
<content ng-controller="TestCtrl" class="reveal-animation"> <content ng-controller="TestCtrl" class="reveal-animation">
<list is-editing="isEditingItems" on-refresh-holding="almostRefreshing()" on-refresh-opening="almostRefreshProjects(ratio)" on-refresh="refreshProjects()" animation="my-repeat-animation" delete-icon="icon-minus-circled" reorder-icon="icon-navicon"> <list is-editing="isEditingItems" on-refresh-holding="almostRefreshing()" on-refresh-opening="almostRefreshProjects(ratio)" on-refresh="refreshProjects()" animation="my-repeat-animation" delete-icon="ion ion-minus-circled" reorder-icon="icon-navicon">
<list-refresher> <list-refresher>
<spinner ratio="refreshRatio.ratio"></spinner>
</list-refresher> </list-refresher>
<list-item ng-repeat="item in items" <list-item ng-repeat="item in items"
buttons="item.buttons" buttons="item.buttons"
can-delete="true" can-delete="true"
can-reorder="true" can-reorder="true"
can-swipe="true" can-swipe="true"
on-delete="deleteProject(project)" on-delete="deleteProject(project)"
on-select="selectProject(project)"> on-select="selectProject(project)">
{{item.text}} {{item.text}}
<i class="{{item.icon}}"></i> <i class="{{item.icon}}"></i>
</list-item> </list-item>

View File

@ -17,12 +17,15 @@
*/ */
.list-editing { .list-editing {
.item-content { .item-content {
margin-right: 30px; margin-right: 50px;
margin-left: 30px; margin-left: 50px;
} }
.item-edit { .item-edit {
left: 0px; left: 0px;
opacity: 1; opacity: 1;
i {
left: 5px;
}
} }
} }