/home/u523506497/domains/mymelon.in/public_html/info/wp-includes/js UP
/**
* @output wp-includes/js/customize-views.js
*/
(function( $, wp, _ ) {
if ( ! wp || ! wp.customize ) { return; }
var api = wp.customize;
/**
* wp.customize.HeaderTool.CurrentView
*
* Displays the currently selected header image, or a placeholder in lack
* thereof.
*
* Instantiate with model wp.customize.HeaderTool.currentHeader.
*
* @memberOf wp.customize.HeaderTool
* @alias wp.customize.HeaderTool.CurrentView
*
* @constructor
* @augments wp.Backbone.View
*/
api.HeaderTool.CurrentView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CurrentView.prototype */{
template: wp.template('header-current'),
initialize: function() {
this.listenTo(this.model, 'change', this.render);
this.render();
},
render: function() {
this.$el.html(this.template(this.model.toJSON()));
this.setButtons();
return this;
},
setButtons: function() {
var elements = $('#customize-control-header_image .actions .remove');
var addButton = $('#customize-control-header_image .actions .new');
if (this.model.get('choice')) {
elements.show();
addButton.removeClass('upload-button');
} else {
elements.hide();
addButton.addClass('upload-button');
}
}
});
/**
* wp.customize.HeaderTool.ChoiceView
*
* Represents a choosable header image, be it user-uploaded,
* theme-suggested or a special Randomize choice.
*
* Takes a wp.customize.HeaderTool.ImageModel.
*
* Manually changes model wp.customize.HeaderTool.currentHeader via the
* `select` method.
*
* @memberOf wp.customize.HeaderTool
* @alias wp.customize.HeaderTool.ChoiceView
*
* @constructor
* @augments wp.Backbone.View
*/
api.HeaderTool.ChoiceView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceView.prototype */{
template: wp.template('header-choice'),
className: 'header-view',
events: {
'click .choice,.random': 'select',
'click .close': 'removeImage'
},
initialize: function() {
var properties = [
this.model.get('header').url,
this.model.get('choice')
];
this.listenTo(this.model, 'change:selected', this.toggleSelected);
if (_.contains(properties, api.get().header_image)) {
api.HeaderTool.currentHeader.set(this.extendedModel());
}
},
render: function() {
this.$el.html(this.template(this.extendedModel()));
this.toggleSelected();
return this;
},
toggleSelected: function() {
this.$el.toggleClass('selected', this.model.get('selected'));
},
extendedModel: function() {
var c = this.model.get('collection');
return _.extend(this.model.toJSON(), {
type: c.type
});
},
select: function() {
this.preventJump();
this.model.save();
api.HeaderTool.currentHeader.set(this.extendedModel());
},
preventJump: function() {
var container = $('.wp-full-overlay-sidebar-content'),
scroll = container.scrollTop();
_.defer(function() {
container.scrollTop(scroll);
});
},
removeImage: function(e) {
e.stopPropagation();
this.model.destroy();
this.remove();
}
});
/**
* wp.customize.HeaderTool.ChoiceListView
*
* A container for ChoiceViews. These choices should be of one same type:
* user-uploaded headers or theme-defined ones.
*
* Takes a wp.customize.HeaderTool.ChoiceList.
*
* @memberOf wp.customize.HeaderTool
* @alias wp.customize.HeaderTool.ChoiceListView
*
* @constructor
* @augments wp.Backbone.View
*/
api.HeaderTool.ChoiceListView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceListView.prototype */{
initialize: function() {
this.listenTo(this.collection, 'add', this.addOne);
this.listenTo(this.collection, 'remove', this.render);
this.listenTo(this.collection, 'sort', this.render);
this.listenTo(this.collection, 'change', this.toggleList);
this.render();
},
render: function() {
this.$el.empty();
this.collection.each(this.addOne, this);
this.toggleList();
},
addOne: function(choice) {
var view;
choice.set({ collection: this.collection });
view = new api.HeaderTool.ChoiceView({ model: choice });
this.$el.append(view.render().el);
},
toggleList: function() {
var title = this.$el.parents().prev('.customize-control-title'),
randomButton = this.$el.find('.random').parent();
if (this.collection.shouldHideTitle()) {
title.add(randomButton).hide();
} else {
title.add(randomButton).show();
}
}
});
/**
* wp.customize.HeaderTool.CombinedList
*
* Aggregates wp.customize.HeaderTool.ChoiceList collections (or any
* Backbone object, really) and acts as a bus to feed them events.
*
* @memberOf wp.customize.HeaderTool
* @alias wp.customize.HeaderTool.CombinedList
*
* @constructor
* @augments wp.Backbone.View
*/
api.HeaderTool.CombinedList = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CombinedList.prototype */{
initialize: function(collections) {
this.collections = collections;
this.on('all', this.propagate, this);
},
propagate: function(event, arg) {
_.each(this.collections, function(collection) {
collection.trigger(event, arg);
});
}
});
})( jQuery, window.wp, _ );
| admin-bar.js | 10549 | V |
| admin-bar.min.js | 3487 | V |
| api-request.js | 3324 | V |
| api-request.min.js | 1023 | V |
| autosave.js | 22476 | V |
| autosave.min.js | 5807 | V |
| backbone.js | 80436 | V |
| backbone.min.js | 24314 | V |
| clipboard.js | 26807 | V |
| clipboard.min.js | 9009 | V |
| codemirror | - | |
| colorpicker.js | 29083 | V |
| colorpicker.min.js | 16498 | V |
| comment-reply.js | 12383 | V |
| comment-reply.min.js | 2950 | V |
| crop | - | |
| customize-base.js | 25822 | V |
| customize-base.min.js | 7852 | V |
| customize-loader.js | 7903 | V |
| customize-loader.min.js | 3551 | V |
| customize-models.js | 6821 | V |
| customize-models.min.js | 3681 | V |
| customize-preview-nav-menus.js | 15024 | V |
| customize-preview-nav-menus.min.js | 5033 | V |
| customize-preview-widgets.js | 23253 | V |
| customize-preview-widgets.min.js | 7820 | V |
| customize-preview.js | 28597 | V |
| customize-preview.min.js | 11011 | V |
| customize-selective-refresh.js | 33335 | V |
| customize-selective-refresh.min.js | 10693 | V |
| customize-views.js | 5222 | V |
| customize-views.min.js | 2567 | V |
| dist | - | |
| heartbeat.js | 24052 | V |
| heartbeat.min.js | 5947 | V |
| hoverIntent.js | 7225 | V |
| hoverIntent.min.js | 1499 | V |
| hoverintent-js.min.js | 1718 | V |
| imagesloaded.min.js | 5520 | V |
| imgareaselect | - | |
| jcrop | - | |
| jquery | - | |
| json2.js | 31 | V |
| json2.min.js | 35 | V |
| masonry.min.js | 24138 | V |
| mce-view.js | 25849 | V |
| mce-view.min.js | 9770 | V |
| media-audiovideo.js | 24717 | V |
| media-audiovideo.min.js | 12049 | V |
| media-editor.js | 29460 | V |
| media-editor.min.js | 11092 | V |
| media-grid.js | 27752 | V |
| media-grid.min.js | 13686 | V |
| media-models.js | 44085 | V |
| media-models.min.js | 13338 | V |
| media-views.js | 273089 | V |
| media-views.min.js | 110741 | V |
| mediaelement | - | |
| plupload | - | |
| quicktags.js | 22601 | V |
| quicktags.min.js | 11132 | V |
| shortcode.js | 10758 | V |
| shortcode.min.js | 2643 | V |
| swfobject.js | 0 | V |
| swfobject.min.js | 35 | V |
| swfupload | - | |
| thickbox | - | |
| tinymce | - | |
| tw-sack.js | 4970 | V |
| tw-sack.min.js | 3288 | V |
| twemoji.js | 37180 | V |
| twemoji.min.js | 19848 | V |
| underscore.js | 68873 | V |
| underscore.min.js | 19012 | V |
| utils.js | 4665 | V |
| utils.min.js | 1864 | V |
| wp-ajax-response.js | 3903 | V |
| wp-ajax-response.min.js | 2571 | V |
| wp-api.js | 46994 | V |
| wp-api.min.js | 14682 | V |
| wp-auth-check.js | 4444 | V |
| wp-auth-check.min.js | 1689 | V |
| wp-backbone.js | 15241 | V |
| wp-backbone.min.js | 3039 | V |
| wp-custom-header.js | 10465 | V |
| wp-custom-header.min.js | 4442 | V |
| wp-embed-template.js | 6779 | V |
| wp-embed-template.min.js | 3174 | V |
| wp-embed.js | 3214 | V |
| wp-embed.min.js | 1251 | V |
| wp-emoji-loader.js | 13357 | V |
| wp-emoji-loader.min.js | 2977 | V |
| wp-emoji-release.min.js | 22752 | V |
| wp-emoji.js | 8792 | V |
| wp-emoji.min.js | 2855 | V |
| wp-list-revisions.js | 970 | V |
| wp-list-revisions.min.js | 597 | V |
| wp-lists.js | 25315 | V |
| wp-lists.min.js | 7521 | V |
| wp-pointer.js | 10233 | V |
| wp-pointer.min.js | 3621 | V |
| wp-sanitize.js | 1622 | V |
| wp-sanitize.min.js | 402 | V |
| wp-tooltip.js | 1846 | V |
| wp-tooltip.min.js | 643 | V |
| wp-util.js | 4689 | V |
| wp-util.min.js | 1431 | V |
| wpdialog.js | 569 | V |
| wpdialog.min.js | 281 | V |
| wplink.js | 21240 | V |
| wplink.min.js | 11317 | V |
| zxcvbn-async.js | 821 | V |
| zxcvbn-async.min.js | 351 | V |
| zxcvbn.min.js | 822237 | V |