Browse files

Coding standards: listview JS and CSS - whitespace and brackets on sa…

…me line.
  • Loading branch information...
1 parent c4627d8 commit 19586e34b7fadbf0dcc6ef48fab66d86f43bbb0f @jaspermdegroot jaspermdegroot committed Jul 12, 2012
Showing with 6 additions and 9 deletions.
  1. +2 −2 css/structure/jquery.mobile.listview.css
  2. +4 −7 js/widgets/listview.js
View
4 css/structure/jquery.mobile.listview.css
@@ -7,7 +7,7 @@
.ui-li-static { background-image: none; }
.ui-li-divider { padding: .5em 15px; font-size: 14px; font-weight: bold; }
.ui-li-divider { counter-reset: listnumbering; }
-ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; }
+ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal; counter-increment: listnumbering; content: counter(listnumbering) ". "; }
ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */
.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; }
.ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; }
@@ -46,7 +46,7 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; }
.ui-listview-filter-inset { margin: -15px -5px -15px -5px; background: transparent; }
-.ui-li.ui-screen-hidden{display:none;}
+.ui-li.ui-screen-hidden{ display:none; }
/* Odd iPad positioning issue. */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.ui-li .ui-btn-text { overflow: visible; }
View
11 js/widgets/listview.js
@@ -112,8 +112,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
// the nodeName from the element every time to ensure we have
// a match. Note that this function lives here for now, but may
// be moved into $.mobile if other components need a similar method.
- _findFirstElementByTagName: function( ele, nextProp, lcName, ucName )
- {
+ _findFirstElementByTagName: function( ele, nextProp, lcName, ucName ) {
var dict = {};
dict[ lcName ] = dict[ ucName ] = true;
while ( ele ) {
@@ -124,8 +123,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
}
return null;
},
- _getChildrenByTagName: function( ele, lcName, ucName )
- {
+ _getChildrenByTagName: function( ele, lcName, ucName ) {
var results = [],
dict = {};
dict[ lcName ] = dict[ ucName ] = true;
@@ -139,8 +137,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
return $( results );
},
- _addThumbClasses: function( containers )
- {
+ _addThumbClasses: function( containers ) {
var i, img, len = containers.length;
for ( i = 0; i < len; i++ ) {
img = $( this._findFirstElementByTagName( containers[ i ].firstChild, "nextSibling", "img", "IMG" ) );
@@ -252,7 +249,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
countParent = item.is( ".ui-li-static:first" ) ? item : item.find( ".ui-link-inherit" );
countParent.addClass( "ui-li-jsnumbering" )
- .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
+ .prepend( "<span class='ui-li-dec'>" + ( counter++ ) + ". </span>" );
}
// Instead of setting item class directly on the list item and its

0 comments on commit 19586e3

Please sign in to comment.