PluginProbe ʕ •ᴥ•ʔ
Menu Icons by Themeisle – Add Icons to Navigation Menus / trunk
Menu Icons by Themeisle – Add Icons to Navigation Menus vtrunk
trunk 0.1.0 0.1.1 0.1.2 0.1.3 0.1.4 0.1.5 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.11.2 0.11.3 0.11.4 0.11.5 0.12.0 0.12.1 0.12.10 0.12.11 0.12.12 0.12.2 0.12.3 0.12.4 0.12.5 0.12.6 0.12.7 0.12.8 0.12.9 0.13.0 0.13.1 0.13.10 0.13.11 0.13.12 0.13.13 0.13.14 0.13.15 0.13.16 0.13.17 0.13.18 0.13.19 0.13.2 0.13.20 0.13.21 0.13.22 0.13.23 0.13.3 0.13.4 0.13.5 0.13.6 0.13.7 0.13.8 0.13.9 0.2.0 0.2.1 0.2.2 0.2.3 0.3.0 0.3.1 0.3.2 0.4.0 0.5.0 0.5.1 0.6.0 0.7.0 0.8.0 0.8.1 0.9.0 0.9.2
menu-icons / js / src / media / views / frame.js
menu-icons / js / src / media / views Last commit date
frame.js 6 years ago item-preview.js 8 years ago item-setting-field.js 8 years ago item-settings.js 8 years ago sidebar.js 8 years ago
frame.js
47 lines
1 /**
2 * wp.media.view.MediaFrame.MenuIcons
3 *
4 * @class
5 * @augments wp.media.view.MediaFrame.IconPicker
6 * @augments wp.media.view.MediaFrame.Select
7 * @augments wp.media.view.MediaFrame
8 * @augments wp.media.view.Frame
9 * @augments wp.media.View
10 * @augments wp.Backbone.View
11 * @augments Backbone.View
12 */
13
14 var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
15 initialize: function() {
16 this.menuItems = new Backbone.Collection([], {
17 model: wp.media.model.MenuIconsItem
18 });
19
20 wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply( this, arguments );
21 if(this.setMenuTabPanelAriaAttributes){
22 this.off( 'open', this.setMenuTabPanelAriaAttributes, this );
23 // Set the router ARIA tab panel attributes when the modal opens.
24 this.off( 'open', this.setRouterTabPanelAriaAttributes, this );
25
26 // Update the menu ARIA tab panel attributes when the content updates.
27 this.off( 'content:render', this.setMenuTabPanelAriaAttributes, this );
28 // Update the router ARIA tab panel attributes when the content updates.
29 this.off( 'content:render', this.setRouterTabPanelAriaAttributes, this );
30 }
31 this.listenTo( this.target, 'change', this.miUpdateItemProps );
32 this.on( 'select', this.miClearTarget, this );
33 },
34
35 miUpdateItemProps: function( props ) {
36 var model = this.menuItems.get( props.id );
37
38 model.set( props.changed );
39 },
40
41 miClearTarget: function() {
42 this.target.clear({ silent: true });
43 }
44 });
45
46 module.exports = MenuIcons;
47