Редактор файлов и навигация
Текущая папка: //wp-includes/js
Содержимое
.. назад
[FILE]
admin-bar.js
[FILE]
admin-bar.min.js
[FILE]
api-request.js
[FILE]
api-request.min.js
[FILE]
autosave.js
[FILE]
autosave.min.js
[FILE]
backbone.js
[FILE]
backbone.min.js
[FILE]
clipboard.js
[FILE]
clipboard.min.js
[DIR]
codemirror
[FILE]
colorpicker.js
[FILE]
colorpicker.min.js
[FILE]
comment-reply.js
[FILE]
comment-reply.min.js
[DIR]
crop
[FILE]
customize-base.js
[FILE]
customize-base.min.js
[FILE]
customize-loader.js
[FILE]
customize-loader.min.js
[FILE]
customize-models.js
[FILE]
customize-models.min.js
[FILE]
customize-preview-nav-menus.js
[FILE]
customize-preview-nav-menus.min.js
[FILE]
customize-preview-widgets.js
[FILE]
customize-preview-widgets.min.js
[FILE]
customize-preview.js
[FILE]
customize-preview.min.js
[FILE]
customize-selective-refresh.js
[FILE]
customize-selective-refresh.min.js
[FILE]
customize-views.js
[FILE]
customize-views.min.js
[DIR]
dist
[FILE]
heartbeat.js
[FILE]
heartbeat.min.js
[FILE]
hoverIntent.js
[FILE]
hoverIntent.min.js
[FILE]
hoverintent-js.min.js
[FILE]
imagesloaded.min.js
[DIR]
imgareaselect
[DIR]
jcrop
[DIR]
jquery
[FILE]
json2.js
[FILE]
json2.min.js
[FILE]
masonry.min.js
[FILE]
mce-view.js
[FILE]
mce-view.min.js
[FILE]
media-audiovideo.js
[FILE]
media-audiovideo.min.js
[FILE]
media-editor.js
[FILE]
media-editor.min.js
[FILE]
media-grid.js
[FILE]
media-grid.min.js
[FILE]
media-models.js
[FILE]
media-models.min.js
[FILE]
media-views.js
[FILE]
media-views.min.js
[DIR]
mediaelement
[DIR]
plupload
[FILE]
quicktags.js
[FILE]
quicktags.min.js
[FILE]
shortcode.js
[FILE]
shortcode.min.js
[FILE]
swfobject.js
[FILE]
swfobject.min.js
[DIR]
swfupload
[DIR]
thickbox
[DIR]
tinymce
[FILE]
tw-sack.js
[FILE]
tw-sack.min.js
[FILE]
twemoji.js
[FILE]
twemoji.min.js
[FILE]
underscore.js
[FILE]
underscore.min.js
[FILE]
utils.js
[FILE]
utils.min.js
[FILE]
wp-ajax-response.js
[FILE]
wp-ajax-response.min.js
[FILE]
wp-api.js
[FILE]
wp-api.min.js
[FILE]
wp-auth-check.js
[FILE]
wp-auth-check.min.js
[FILE]
wp-backbone.js
[FILE]
wp-backbone.min.js
[FILE]
wp-custom-header.js
[FILE]
wp-custom-header.min.js
[FILE]
wp-embed-template.js
[FILE]
wp-embed-template.min.js
[FILE]
wp-embed.js
[FILE]
wp-embed.min.js
[FILE]
wp-emoji-loader.js
[FILE]
wp-emoji-loader.min.js
[FILE]
wp-emoji-release.min.js
[FILE]
wp-emoji.js
[FILE]
wp-emoji.min.js
[FILE]
wp-list-revisions.js
[FILE]
wp-list-revisions.min.js
[FILE]
wp-lists.js
[FILE]
wp-lists.min.js
[FILE]
wp-pointer.js
[FILE]
wp-pointer.min.js
[FILE]
wp-sanitize.js
[FILE]
wp-sanitize.min.js
[FILE]
wp-util.js
[FILE]
wp-util.min.js
[FILE]
wpdialog.js
[FILE]
wpdialog.min.js
[FILE]
wplink.js
[FILE]
wplink.min.js
[FILE]
zxcvbn-async.js
[FILE]
zxcvbn-async.min.js
[FILE]
zxcvbn.min.js
Редактирование: customize-views.js
/** * @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, _ );
Сохранить
Переименовать файл
Переименовать
Изменить права доступа
Текущие права:
0644
(644)
Изменить права
Удалить файл
Удалить файл