You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
If you remove the first or last item from an already displayed inset list and run the refresh() function, the corners on the list don't get applied to the new first or last element. My workaround is below...
// If we're creating the element, we update it regardless
if ( !create && item.hasClass( "ui-li" ) ) {
//continue; // REMOVE
} else { // ADDED this else statement
var itemTheme = item.jqmData("theme") || o.theme;
var a = item.children( "a" );
if ( a.length ) {
var icon = item.jqmData("icon");
item
.buttonMarkup({
wrapperEls: "div",
shadow: false,
corners: false,
iconpos: "right",
icon: a.length > 1 || icon === false ? false : icon || "arrow-r",
theme: itemTheme
});
a.first().addClass( "ui-link-inherit" );
if ( a.length > 1 ) {
itemClass += " ui-li-has-alt";
var last = a.last(),
splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
last
.appendTo(item)
.attr( "title", last.text() )
.addClass( "ui-li-link-alt" )
.empty()
.buttonMarkup({
shadow: false,
corners: false,
theme: itemTheme,
icon: false,
iconpos: false
})
.find( ".ui-btn-inner" )
.append( $( "<span>" ).buttonMarkup({
shadow: true,
corners: true,
theme: splittheme,
iconpos: "notext",
icon: listspliticon || last.jqmData( "icon" ) || o.splitIcon
} ) );
}
} else if ( item.jqmData( "role" ) === "list-divider" ) {
itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
item.attr( "role", "heading" );
//reset counter when a divider heading is encountered
if ( counter ) {
counter = 1;
}
} else {
itemClass += " ui-li-static ui-body-" + itemTheme;
}
}
This way, the following if/then/else section to redo the corners will execute for each element.
The text was updated successfully, but these errors were encountered:
If you remove the first or last item from an already displayed inset list and run the refresh() function, the corners on the list don't get applied to the new first or last element. My workaround is below...
This way, the following if/then/else section to redo the corners will execute for each element.
The text was updated successfully, but these errors were encountered: