Edit File by line
/home/barbar84/www/wp-inclu.../js
File: wp-backbone.js
/**
[0] Fix | Delete
* @output wp-includes/js/wp-backbone.js
[1] Fix | Delete
*/
[2] Fix | Delete
[3] Fix | Delete
/** @namespace wp */
[4] Fix | Delete
window.wp = window.wp || {};
[5] Fix | Delete
[6] Fix | Delete
(function ($) {
[7] Fix | Delete
/**
[8] Fix | Delete
* Create the WordPress Backbone namespace.
[9] Fix | Delete
*
[10] Fix | Delete
* @namespace wp.Backbone
[11] Fix | Delete
*/
[12] Fix | Delete
wp.Backbone = {};
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* A backbone subview manager.
[16] Fix | Delete
*
[17] Fix | Delete
* @since 3.5.0
[18] Fix | Delete
* @since 3.6.0 Moved wp.media.Views to wp.Backbone.Subviews.
[19] Fix | Delete
*
[20] Fix | Delete
* @memberOf wp.Backbone
[21] Fix | Delete
*
[22] Fix | Delete
* @class
[23] Fix | Delete
*
[24] Fix | Delete
* @param {wp.Backbone.View} view The main view.
[25] Fix | Delete
* @param {Array|Object} views The subviews for the main view.
[26] Fix | Delete
*/
[27] Fix | Delete
wp.Backbone.Subviews = function( view, views ) {
[28] Fix | Delete
this.view = view;
[29] Fix | Delete
this._views = _.isArray( views ) ? { '': views } : views || {};
[30] Fix | Delete
};
[31] Fix | Delete
[32] Fix | Delete
wp.Backbone.Subviews.extend = Backbone.Model.extend;
[33] Fix | Delete
[34] Fix | Delete
_.extend( wp.Backbone.Subviews.prototype, {
[35] Fix | Delete
/**
[36] Fix | Delete
* Fetches all of the subviews.
[37] Fix | Delete
*
[38] Fix | Delete
* @since 3.5.0
[39] Fix | Delete
*
[40] Fix | Delete
* @return {Array} All the subviews.
[41] Fix | Delete
*/
[42] Fix | Delete
all: function() {
[43] Fix | Delete
return _.flatten( _.values( this._views ) );
[44] Fix | Delete
},
[45] Fix | Delete
[46] Fix | Delete
/**
[47] Fix | Delete
* Fetches all subviews that match a given `selector`.
[48] Fix | Delete
*
[49] Fix | Delete
* If no `selector` is provided, it will grab all subviews attached
[50] Fix | Delete
* to the view's root.
[51] Fix | Delete
*
[52] Fix | Delete
* @since 3.5.0
[53] Fix | Delete
*
[54] Fix | Delete
* @param {string} selector A jQuery selector.
[55] Fix | Delete
*
[56] Fix | Delete
* @return {Array} All the subviews that match the selector.
[57] Fix | Delete
*/
[58] Fix | Delete
get: function( selector ) {
[59] Fix | Delete
selector = selector || '';
[60] Fix | Delete
return this._views[ selector ];
[61] Fix | Delete
},
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Fetches the first subview that matches a given `selector`.
[65] Fix | Delete
*
[66] Fix | Delete
* If no `selector` is provided, it will grab the first subview attached to the
[67] Fix | Delete
* view's root.
[68] Fix | Delete
*
[69] Fix | Delete
* Useful when a selector only has one subview at a time.
[70] Fix | Delete
*
[71] Fix | Delete
* @since 3.5.0
[72] Fix | Delete
*
[73] Fix | Delete
* @param {string} selector A jQuery selector.
[74] Fix | Delete
*
[75] Fix | Delete
* @return {Backbone.View} The view.
[76] Fix | Delete
*/
[77] Fix | Delete
first: function( selector ) {
[78] Fix | Delete
var views = this.get( selector );
[79] Fix | Delete
return views && views.length ? views[0] : null;
[80] Fix | Delete
},
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* Registers subview(s).
[84] Fix | Delete
*
[85] Fix | Delete
* Registers any number of `views` to a `selector`.
[86] Fix | Delete
*
[87] Fix | Delete
* When no `selector` is provided, the root selector (the empty string)
[88] Fix | Delete
* is used. `views` accepts a `Backbone.View` instance or an array of
[89] Fix | Delete
* `Backbone.View` instances.
[90] Fix | Delete
*
[91] Fix | Delete
* ---
[92] Fix | Delete
*
[93] Fix | Delete
* Accepts an `options` object, which has a significant effect on the
[94] Fix | Delete
* resulting behavior.
[95] Fix | Delete
*
[96] Fix | Delete
* `options.silent` - *boolean, `false`*
[97] Fix | Delete
* If `options.silent` is true, no DOM modifications will be made.
[98] Fix | Delete
*
[99] Fix | Delete
* `options.add` - *boolean, `false`*
[100] Fix | Delete
* Use `Views.add()` as a shortcut for setting `options.add` to true.
[101] Fix | Delete
*
[102] Fix | Delete
* By default, the provided `views` will replace any existing views
[103] Fix | Delete
* associated with the selector. If `options.add` is true, the provided
[104] Fix | Delete
* `views` will be added to the existing views.
[105] Fix | Delete
*
[106] Fix | Delete
* `options.at` - *integer, `undefined`*
[107] Fix | Delete
* When adding, to insert `views` at a specific index, use `options.at`.
[108] Fix | Delete
* By default, `views` are added to the end of the array.
[109] Fix | Delete
*
[110] Fix | Delete
* @since 3.5.0
[111] Fix | Delete
*
[112] Fix | Delete
* @param {string} selector A jQuery selector.
[113] Fix | Delete
* @param {Array|Object} views The subviews for the main view.
[114] Fix | Delete
* @param {Object} options Options for call. If `options.silent` is true,
[115] Fix | Delete
* no DOM modifications will be made. Use
[116] Fix | Delete
* `Views.add()` as a shortcut for setting
[117] Fix | Delete
* `options.add` to true. If `options.add` is
[118] Fix | Delete
* true, the provided `views` will be added to
[119] Fix | Delete
* the existing views. When adding, to insert
[120] Fix | Delete
* `views` at a specific index, use `options.at`.
[121] Fix | Delete
*
[122] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[123] Fix | Delete
*/
[124] Fix | Delete
set: function( selector, views, options ) {
[125] Fix | Delete
var existing, next;
[126] Fix | Delete
[127] Fix | Delete
if ( ! _.isString( selector ) ) {
[128] Fix | Delete
options = views;
[129] Fix | Delete
views = selector;
[130] Fix | Delete
selector = '';
[131] Fix | Delete
}
[132] Fix | Delete
[133] Fix | Delete
options = options || {};
[134] Fix | Delete
views = _.isArray( views ) ? views : [ views ];
[135] Fix | Delete
existing = this.get( selector );
[136] Fix | Delete
next = views;
[137] Fix | Delete
[138] Fix | Delete
if ( existing ) {
[139] Fix | Delete
if ( options.add ) {
[140] Fix | Delete
if ( _.isUndefined( options.at ) ) {
[141] Fix | Delete
next = existing.concat( views );
[142] Fix | Delete
} else {
[143] Fix | Delete
next = existing;
[144] Fix | Delete
next.splice.apply( next, [ options.at, 0 ].concat( views ) );
[145] Fix | Delete
}
[146] Fix | Delete
} else {
[147] Fix | Delete
_.each( next, function( view ) {
[148] Fix | Delete
view.__detach = true;
[149] Fix | Delete
});
[150] Fix | Delete
[151] Fix | Delete
_.each( existing, function( view ) {
[152] Fix | Delete
if ( view.__detach )
[153] Fix | Delete
view.$el.detach();
[154] Fix | Delete
else
[155] Fix | Delete
view.remove();
[156] Fix | Delete
});
[157] Fix | Delete
[158] Fix | Delete
_.each( next, function( view ) {
[159] Fix | Delete
delete view.__detach;
[160] Fix | Delete
});
[161] Fix | Delete
}
[162] Fix | Delete
}
[163] Fix | Delete
[164] Fix | Delete
this._views[ selector ] = next;
[165] Fix | Delete
[166] Fix | Delete
_.each( views, function( subview ) {
[167] Fix | Delete
var constructor = subview.Views || wp.Backbone.Subviews,
[168] Fix | Delete
subviews = subview.views = subview.views || new constructor( subview );
[169] Fix | Delete
subviews.parent = this.view;
[170] Fix | Delete
subviews.selector = selector;
[171] Fix | Delete
}, this );
[172] Fix | Delete
[173] Fix | Delete
if ( ! options.silent )
[174] Fix | Delete
this._attach( selector, views, _.extend({ ready: this._isReady() }, options ) );
[175] Fix | Delete
[176] Fix | Delete
return this;
[177] Fix | Delete
},
[178] Fix | Delete
[179] Fix | Delete
/**
[180] Fix | Delete
* Add subview(s) to existing subviews.
[181] Fix | Delete
*
[182] Fix | Delete
* An alias to `Views.set()`, which defaults `options.add` to true.
[183] Fix | Delete
*
[184] Fix | Delete
* Adds any number of `views` to a `selector`.
[185] Fix | Delete
*
[186] Fix | Delete
* When no `selector` is provided, the root selector (the empty string)
[187] Fix | Delete
* is used. `views` accepts a `Backbone.View` instance or an array of
[188] Fix | Delete
* `Backbone.View` instances.
[189] Fix | Delete
*
[190] Fix | Delete
* Uses `Views.set()` when setting `options.add` to `false`.
[191] Fix | Delete
*
[192] Fix | Delete
* Accepts an `options` object. By default, provided `views` will be
[193] Fix | Delete
* inserted at the end of the array of existing views. To insert
[194] Fix | Delete
* `views` at a specific index, use `options.at`. If `options.silent`
[195] Fix | Delete
* is true, no DOM modifications will be made.
[196] Fix | Delete
*
[197] Fix | Delete
* For more information on the `options` object, see `Views.set()`.
[198] Fix | Delete
*
[199] Fix | Delete
* @since 3.5.0
[200] Fix | Delete
*
[201] Fix | Delete
* @param {string} selector A jQuery selector.
[202] Fix | Delete
* @param {Array|Object} views The subviews for the main view.
[203] Fix | Delete
* @param {Object} options Options for call. To insert `views` at a
[204] Fix | Delete
* specific index, use `options.at`. If
[205] Fix | Delete
* `options.silent` is true, no DOM modifications
[206] Fix | Delete
* will be made.
[207] Fix | Delete
*
[208] Fix | Delete
* @return {wp.Backbone.Subviews} The current subviews instance.
[209] Fix | Delete
*/
[210] Fix | Delete
add: function( selector, views, options ) {
[211] Fix | Delete
if ( ! _.isString( selector ) ) {
[212] Fix | Delete
options = views;
[213] Fix | Delete
views = selector;
[214] Fix | Delete
selector = '';
[215] Fix | Delete
}
[216] Fix | Delete
[217] Fix | Delete
return this.set( selector, views, _.extend({ add: true }, options ) );
[218] Fix | Delete
},
[219] Fix | Delete
[220] Fix | Delete
/**
[221] Fix | Delete
* Removes an added subview.
[222] Fix | Delete
*
[223] Fix | Delete
* Stops tracking `views` registered to a `selector`. If no `views` are
[224] Fix | Delete
* set, then all of the `selector`'s subviews will be unregistered and
[225] Fix | Delete
* removed.
[226] Fix | Delete
*
[227] Fix | Delete
* Accepts an `options` object. If `options.silent` is set, `remove`
[228] Fix | Delete
* will *not* be triggered on the unregistered views.
[229] Fix | Delete
*
[230] Fix | Delete
* @since 3.5.0
[231] Fix | Delete
*
[232] Fix | Delete
* @param {string} selector A jQuery selector.
[233] Fix | Delete
* @param {Array|Object} views The subviews for the main view.
[234] Fix | Delete
* @param {Object} options Options for call. If `options.silent` is set,
[235] Fix | Delete
* `remove` will *not* be triggered on the
[236] Fix | Delete
* unregistered views.
[237] Fix | Delete
*
[238] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[239] Fix | Delete
*/
[240] Fix | Delete
unset: function( selector, views, options ) {
[241] Fix | Delete
var existing;
[242] Fix | Delete
[243] Fix | Delete
if ( ! _.isString( selector ) ) {
[244] Fix | Delete
options = views;
[245] Fix | Delete
views = selector;
[246] Fix | Delete
selector = '';
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
views = views || [];
[250] Fix | Delete
[251] Fix | Delete
if ( existing = this.get( selector ) ) {
[252] Fix | Delete
views = _.isArray( views ) ? views : [ views ];
[253] Fix | Delete
this._views[ selector ] = views.length ? _.difference( existing, views ) : [];
[254] Fix | Delete
}
[255] Fix | Delete
[256] Fix | Delete
if ( ! options || ! options.silent )
[257] Fix | Delete
_.invoke( views, 'remove' );
[258] Fix | Delete
[259] Fix | Delete
return this;
[260] Fix | Delete
},
[261] Fix | Delete
[262] Fix | Delete
/**
[263] Fix | Delete
* Detaches all subviews.
[264] Fix | Delete
*
[265] Fix | Delete
* Helps to preserve all subview events when re-rendering the master
[266] Fix | Delete
* view. Used in conjunction with `Views.render()`.
[267] Fix | Delete
*
[268] Fix | Delete
* @since 3.5.0
[269] Fix | Delete
*
[270] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[271] Fix | Delete
*/
[272] Fix | Delete
detach: function() {
[273] Fix | Delete
$( _.pluck( this.all(), 'el' ) ).detach();
[274] Fix | Delete
return this;
[275] Fix | Delete
},
[276] Fix | Delete
[277] Fix | Delete
/**
[278] Fix | Delete
* Renders all subviews.
[279] Fix | Delete
*
[280] Fix | Delete
* Used in conjunction with `Views.detach()`.
[281] Fix | Delete
*
[282] Fix | Delete
* @since 3.5.0
[283] Fix | Delete
*
[284] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[285] Fix | Delete
*/
[286] Fix | Delete
render: function() {
[287] Fix | Delete
var options = {
[288] Fix | Delete
ready: this._isReady()
[289] Fix | Delete
};
[290] Fix | Delete
[291] Fix | Delete
_.each( this._views, function( views, selector ) {
[292] Fix | Delete
this._attach( selector, views, options );
[293] Fix | Delete
}, this );
[294] Fix | Delete
[295] Fix | Delete
this.rendered = true;
[296] Fix | Delete
return this;
[297] Fix | Delete
},
[298] Fix | Delete
[299] Fix | Delete
/**
[300] Fix | Delete
* Removes all subviews.
[301] Fix | Delete
*
[302] Fix | Delete
* Triggers the `remove()` method on all subviews. Detaches the master
[303] Fix | Delete
* view from its parent. Resets the internals of the views manager.
[304] Fix | Delete
*
[305] Fix | Delete
* Accepts an `options` object. If `options.silent` is set, `unset`
[306] Fix | Delete
* will *not* be triggered on the master view's parent.
[307] Fix | Delete
*
[308] Fix | Delete
* @since 3.6.0
[309] Fix | Delete
*
[310] Fix | Delete
* @param {Object} options Options for call.
[311] Fix | Delete
* @param {boolean} options.silent If true, `unset` wil *not* be triggered on
[312] Fix | Delete
* the master views' parent.
[313] Fix | Delete
*
[314] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[315] Fix | Delete
*/
[316] Fix | Delete
remove: function( options ) {
[317] Fix | Delete
if ( ! options || ! options.silent ) {
[318] Fix | Delete
if ( this.parent && this.parent.views )
[319] Fix | Delete
this.parent.views.unset( this.selector, this.view, { silent: true });
[320] Fix | Delete
delete this.parent;
[321] Fix | Delete
delete this.selector;
[322] Fix | Delete
}
[323] Fix | Delete
[324] Fix | Delete
_.invoke( this.all(), 'remove' );
[325] Fix | Delete
this._views = [];
[326] Fix | Delete
return this;
[327] Fix | Delete
},
[328] Fix | Delete
[329] Fix | Delete
/**
[330] Fix | Delete
* Replaces a selector's subviews
[331] Fix | Delete
*
[332] Fix | Delete
* By default, sets the `$target` selector's html to the subview `els`.
[333] Fix | Delete
*
[334] Fix | Delete
* Can be overridden in subclasses.
[335] Fix | Delete
*
[336] Fix | Delete
* @since 3.5.0
[337] Fix | Delete
*
[338] Fix | Delete
* @param {string} $target Selector where to put the elements.
[339] Fix | Delete
* @param {*} els HTML or elements to put into the selector's HTML.
[340] Fix | Delete
*
[341] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[342] Fix | Delete
*/
[343] Fix | Delete
replace: function( $target, els ) {
[344] Fix | Delete
$target.html( els );
[345] Fix | Delete
return this;
[346] Fix | Delete
},
[347] Fix | Delete
[348] Fix | Delete
/**
[349] Fix | Delete
* Insert subviews into a selector.
[350] Fix | Delete
*
[351] Fix | Delete
* By default, appends the subview `els` to the end of the `$target`
[352] Fix | Delete
* selector. If `options.at` is set, inserts the subview `els` at the
[353] Fix | Delete
* provided index.
[354] Fix | Delete
*
[355] Fix | Delete
* Can be overridden in subclasses.
[356] Fix | Delete
*
[357] Fix | Delete
* @since 3.5.0
[358] Fix | Delete
*
[359] Fix | Delete
* @param {string} $target Selector where to put the elements.
[360] Fix | Delete
* @param {*} els HTML or elements to put at the end of the
[361] Fix | Delete
* $target.
[362] Fix | Delete
* @param {?Object} options Options for call.
[363] Fix | Delete
* @param {?number} options.at At which index to put the elements.
[364] Fix | Delete
*
[365] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[366] Fix | Delete
*/
[367] Fix | Delete
insert: function( $target, els, options ) {
[368] Fix | Delete
var at = options && options.at,
[369] Fix | Delete
$children;
[370] Fix | Delete
[371] Fix | Delete
if ( _.isNumber( at ) && ($children = $target.children()).length > at )
[372] Fix | Delete
$children.eq( at ).before( els );
[373] Fix | Delete
else
[374] Fix | Delete
$target.append( els );
[375] Fix | Delete
[376] Fix | Delete
return this;
[377] Fix | Delete
},
[378] Fix | Delete
[379] Fix | Delete
/**
[380] Fix | Delete
* Triggers the ready event.
[381] Fix | Delete
*
[382] Fix | Delete
* Only use this method if you know what you're doing. For performance reasons,
[383] Fix | Delete
* this method does not check if the view is actually attached to the DOM. It's
[384] Fix | Delete
* taking your word for it.
[385] Fix | Delete
*
[386] Fix | Delete
* Fires the ready event on the current view and all attached subviews.
[387] Fix | Delete
*
[388] Fix | Delete
* @since 3.5.0
[389] Fix | Delete
*/
[390] Fix | Delete
ready: function() {
[391] Fix | Delete
this.view.trigger('ready');
[392] Fix | Delete
[393] Fix | Delete
// Find all attached subviews, and call ready on them.
[394] Fix | Delete
_.chain( this.all() ).map( function( view ) {
[395] Fix | Delete
return view.views;
[396] Fix | Delete
}).flatten().where({ attached: true }).invoke('ready');
[397] Fix | Delete
},
[398] Fix | Delete
/**
[399] Fix | Delete
* Attaches a series of views to a selector. Internal.
[400] Fix | Delete
*
[401] Fix | Delete
* Checks to see if a matching selector exists, renders the views,
[402] Fix | Delete
* performs the proper DOM operation, and then checks if the view is
[403] Fix | Delete
* attached to the document.
[404] Fix | Delete
*
[405] Fix | Delete
* @since 3.5.0
[406] Fix | Delete
*
[407] Fix | Delete
* @private
[408] Fix | Delete
*
[409] Fix | Delete
* @param {string} selector A jQuery selector.
[410] Fix | Delete
* @param {Array|Object} views The subviews for the main view.
[411] Fix | Delete
* @param {Object} options Options for call.
[412] Fix | Delete
* @param {boolean} options.add If true the provided views will be added.
[413] Fix | Delete
*
[414] Fix | Delete
* @return {wp.Backbone.Subviews} The current Subviews instance.
[415] Fix | Delete
*/
[416] Fix | Delete
_attach: function( selector, views, options ) {
[417] Fix | Delete
var $selector = selector ? this.view.$( selector ) : this.view.$el,
[418] Fix | Delete
managers;
[419] Fix | Delete
[420] Fix | Delete
// Check if we found a location to attach the views.
[421] Fix | Delete
if ( ! $selector.length )
[422] Fix | Delete
return this;
[423] Fix | Delete
[424] Fix | Delete
managers = _.chain( views ).pluck('views').flatten().value();
[425] Fix | Delete
[426] Fix | Delete
// Render the views if necessary.
[427] Fix | Delete
_.each( managers, function( manager ) {
[428] Fix | Delete
if ( manager.rendered )
[429] Fix | Delete
return;
[430] Fix | Delete
[431] Fix | Delete
manager.view.render();
[432] Fix | Delete
manager.rendered = true;
[433] Fix | Delete
}, this );
[434] Fix | Delete
[435] Fix | Delete
// Insert or replace the views.
[436] Fix | Delete
this[ options.add ? 'insert' : 'replace' ]( $selector, _.pluck( views, 'el' ), options );
[437] Fix | Delete
[438] Fix | Delete
/*
[439] Fix | Delete
* Set attached and trigger ready if the current view is already
[440] Fix | Delete
* attached to the DOM.
[441] Fix | Delete
*/
[442] Fix | Delete
_.each( managers, function( manager ) {
[443] Fix | Delete
manager.attached = true;
[444] Fix | Delete
[445] Fix | Delete
if ( options.ready )
[446] Fix | Delete
manager.ready();
[447] Fix | Delete
}, this );
[448] Fix | Delete
[449] Fix | Delete
return this;
[450] Fix | Delete
},
[451] Fix | Delete
[452] Fix | Delete
/**
[453] Fix | Delete
* Determines whether or not the current view is in the DOM.
[454] Fix | Delete
*
[455] Fix | Delete
* @since 3.5.0
[456] Fix | Delete
*
[457] Fix | Delete
* @private
[458] Fix | Delete
*
[459] Fix | Delete
* @return {boolean} Whether or not the current view is in the DOM.
[460] Fix | Delete
*/
[461] Fix | Delete
_isReady: function() {
[462] Fix | Delete
var node = this.view.el;
[463] Fix | Delete
while ( node ) {
[464] Fix | Delete
if ( node === document.body )
[465] Fix | Delete
return true;
[466] Fix | Delete
node = node.parentNode;
[467] Fix | Delete
}
[468] Fix | Delete
[469] Fix | Delete
return false;
[470] Fix | Delete
}
[471] Fix | Delete
});
[472] Fix | Delete
[473] Fix | Delete
wp.Backbone.View = Backbone.View.extend({
[474] Fix | Delete
[475] Fix | Delete
// The constructor for the `Views` manager.
[476] Fix | Delete
Subviews: wp.Backbone.Subviews,
[477] Fix | Delete
[478] Fix | Delete
/**
[479] Fix | Delete
* The base view class.
[480] Fix | Delete
*
[481] Fix | Delete
* This extends the backbone view to have a build-in way to use subviews. This
[482] Fix | Delete
* makes it easier to have nested views.
[483] Fix | Delete
*
[484] Fix | Delete
* @since 3.5.0
[485] Fix | Delete
* @since 3.6.0 Moved wp.media.View to wp.Backbone.View
[486] Fix | Delete
*
[487] Fix | Delete
* @constructs
[488] Fix | Delete
* @augments Backbone.View
[489] Fix | Delete
*
[490] Fix | Delete
* @memberOf wp.Backbone
[491] Fix | Delete
*
[492] Fix | Delete
*
[493] Fix | Delete
* @param {Object} options The options for this view.
[494] Fix | Delete
*/
[495] Fix | Delete
constructor: function( options ) {
[496] Fix | Delete
this.views = new this.Subviews( this, this.views );
[497] Fix | Delete
this.on( 'ready', this.ready, this );
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function