modified file menu-icons

This commit is contained in:
2024-01-03 21:51:19 +00:00
committed by Gitium
parent 17dad8c76e
commit 6e1c54f7ba
197 changed files with 56047 additions and 2040 deletions

View File

@ -0,0 +1,27 @@
/**
* wp.media.model.MenuIconsItem
*
* @class
* @augments Backbone.Model
*/
var Item = Backbone.Model.extend({
initialize: function() {
this.on( 'change', this.updateValues, this );
},
/**
* Update the values of menu item's settings fields
*
* #fires mi:update
*/
updateValues: function() {
_.each( this.get( '$inputs' ), function( $input, key ) {
$input.val( this.get( key ) );
}, this );
// Trigger the 'mi:update' event to regenerate the icon on the field.
this.get( '$el' ).trigger( 'mi:update' );
}
});
module.exports = Item;