mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update now playing page
This commit is contained in:
parent
878eac1535
commit
19f8c11c38
100 changed files with 45182 additions and 417 deletions
79
dashboard-ui/bower_components/jquery/src/wrap.js
vendored
Normal file
79
dashboard-ui/bower_components/jquery/src/wrap.js
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
define([
|
||||
"./core",
|
||||
"./core/init",
|
||||
"./manipulation", // clone
|
||||
"./traversing" // parent, contents
|
||||
], function( jQuery ) {
|
||||
|
||||
jQuery.fn.extend({
|
||||
wrapAll: function( html ) {
|
||||
var wrap;
|
||||
|
||||
if ( jQuery.isFunction( html ) ) {
|
||||
return this.each(function( i ) {
|
||||
jQuery( this ).wrapAll( html.call(this, i) );
|
||||
});
|
||||
}
|
||||
|
||||
if ( this[ 0 ] ) {
|
||||
|
||||
// The elements to wrap the target around
|
||||
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
||||
|
||||
if ( this[ 0 ].parentNode ) {
|
||||
wrap.insertBefore( this[ 0 ] );
|
||||
}
|
||||
|
||||
wrap.map(function() {
|
||||
var elem = this;
|
||||
|
||||
while ( elem.firstElementChild ) {
|
||||
elem = elem.firstElementChild;
|
||||
}
|
||||
|
||||
return elem;
|
||||
}).append( this );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
wrapInner: function( html ) {
|
||||
if ( jQuery.isFunction( html ) ) {
|
||||
return this.each(function( i ) {
|
||||
jQuery( this ).wrapInner( html.call(this, i) );
|
||||
});
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
var self = jQuery( this ),
|
||||
contents = self.contents();
|
||||
|
||||
if ( contents.length ) {
|
||||
contents.wrapAll( html );
|
||||
|
||||
} else {
|
||||
self.append( html );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
wrap: function( html ) {
|
||||
var isFunction = jQuery.isFunction( html );
|
||||
|
||||
return this.each(function( i ) {
|
||||
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
|
||||
});
|
||||
},
|
||||
|
||||
unwrap: function() {
|
||||
return this.parent().each(function() {
|
||||
if ( !jQuery.nodeName( this, "body" ) ) {
|
||||
jQuery( this ).replaceWith( this.childNodes );
|
||||
}
|
||||
}).end();
|
||||
}
|
||||
});
|
||||
|
||||
return jQuery;
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue