Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Coding standards: listview JS and CSS - whitespace and brackets on sa…
Browse files Browse the repository at this point in the history
…me line.
  • Loading branch information
jaspermdegroot committed Jul 12, 2012
1 parent fe32646 commit c8fffb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions css/structure/jquery.mobile.listview.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.ui-li-divider .ui-btn-text, .ui-li-static .ui-btn-text { font-size: 16px; }
.ui-li-divider .ui-mini .ui-btn-text, .ui-li-static .ui-mini .ui-btn-text { font-size: inherit; }
.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; }
Expand Down Expand Up @@ -48,7 +48,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; }
Expand Down
11 changes: 4 additions & 7 deletions js/jquery.mobile.listview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -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;
Expand All @@ -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" ) );
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8fffb7

Please sign in to comment.