golden hour
/var/www/nanshen/wp-includes/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
admin-bar.js
10.88 KB
Del
OK
admin-bar.min.js
6.61 KB
Del
OK
autosave.js
15.78 KB
Del
OK
autosave.min.js
5.23 KB
Del
OK
backbone.min.js
18.59 KB
Del
OK
colorpicker.js
28.4 KB
Del
OK
colorpicker.min.js
16.14 KB
Del
OK
comment-reply.js
1.2 KB
Del
OK
comment-reply.min.js
755 B
Del
OK
crop
-
Del
OK
customize-base.js
15.25 KB
Del
OK
customize-base.min.js
6.45 KB
Del
OK
customize-loader.js
4.18 KB
Del
OK
customize-loader.min.js
2.48 KB
Del
OK
customize-models.js
5.74 KB
Del
OK
customize-models.min.js
3.36 KB
Del
OK
customize-preview-widgets.js
3.64 KB
Del
OK
customize-preview-widgets.min.js
1.74 KB
Del
OK
customize-preview.js
3.48 KB
Del
OK
customize-preview.min.js
1.82 KB
Del
OK
customize-views.js
5.34 KB
Del
OK
customize-views.min.js
2.88 KB
Del
OK
heartbeat.js
18.52 KB
Del
OK
heartbeat.min.js
4.75 KB
Del
OK
hoverIntent.js
4.82 KB
Del
OK
hoverIntent.min.js
1.06 KB
Del
OK
imgareaselect
-
Del
OK
jcrop
-
Del
OK
jquery
-
Del
OK
json2.js
17 KB
Del
OK
json2.min.js
2.87 KB
Del
OK
masonry.min.js
30.31 KB
Del
OK
mce-view.js
17 KB
Del
OK
mce-view.min.js
7.01 KB
Del
OK
media-audiovideo.js
21.93 KB
Del
OK
media-audiovideo.min.js
11.92 KB
Del
OK
media-editor.js
27.87 KB
Del
OK
media-editor.min.js
9.46 KB
Del
OK
media-models.js
34.55 KB
Del
OK
media-models.min.js
11.46 KB
Del
OK
media-views.js
157.75 KB
Del
OK
media-views.min.js
78.25 KB
Del
OK
mediaelement
-
Del
OK
plupload
-
Del
OK
quicktags.js
18.61 KB
Del
OK
quicktags.min.js
8.83 KB
Del
OK
shortcode.js
10.21 KB
Del
OK
shortcode.min.js
2.49 KB
Del
OK
swfobject.js
9.99 KB
Del
OK
swfupload
-
Del
OK
thickbox
-
Del
OK
tinymce
-
Del
OK
tw-sack.js
4.85 KB
Del
OK
tw-sack.min.js
3.19 KB
Del
OK
underscore.min.js
13.98 KB
Del
OK
utils.js
3.98 KB
Del
OK
utils.min.js
1.67 KB
Del
OK
wp-ajax-response.js
3.04 KB
Del
OK
wp-ajax-response.min.js
2 KB
Del
OK
wp-auth-check.js
3.01 KB
Del
OK
wp-auth-check.min.js
1.61 KB
Del
OK
wp-backbone.js
10.17 KB
Del
OK
wp-backbone.min.js
2.93 KB
Del
OK
wp-list-revisions.js
914 B
Del
OK
wp-list-revisions.min.js
562 B
Del
OK
wp-lists.js
10.91 KB
Del
OK
wp-lists.min.js
7.13 KB
Del
OK
wp-pointer.js
6.45 KB
Del
OK
wp-pointer.min.js
3.53 KB
Del
OK
wp-util.js
3.08 KB
Del
OK
wp-util.min.js
977 B
Del
OK
wpdialog.js
435 B
Del
OK
wpdialog.min.js
237 B
Del
OK
wplink.js
14.66 KB
Del
OK
wplink.min.js
8.06 KB
Del
OK
zxcvbn-async.js
502 B
Del
OK
zxcvbn-async.min.js
317 B
Del
OK
zxcvbn.min.js
682.35 KB
Del
OK
Edit: 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. * * @constructor * @augments wp.Backbone.View */ api.HeaderTool.CurrentView = wp.Backbone.View.extend({ 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.setPlaceholder(); this.setButtons(); return this; }, getHeight: function() { var image = this.$el.find('img'), saved, height, headerImageData; if (image.length) { this.$el.find('.inner').hide(); } else { this.$el.find('.inner').show(); return 40; } saved = this.model.get('savedHeight'); height = image.height() || saved; // happens at ready if (!height) { headerImageData = api.get().header_image_data; if (headerImageData && headerImageData.width && headerImageData.height) { // hardcoded container width height = 260 / headerImageData.width * headerImageData.height; } else { // fallback for when no image is set height = 40; } } return height; }, setPlaceholder: function(_height) { var height = _height || this.getHeight(); this.model.set('savedHeight', height); this.$el .add(this.$el.find('.placeholder')) .height(height); }, setButtons: function() { var elements = $('#customize-control-header_image .actions .remove'); if (this.model.get('choice')) { elements.show(); } else { elements.hide(); } } }); /** * 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. * * @constructor * @augments wp.Backbone.View */ api.HeaderTool.ChoiceView = wp.Backbone.View.extend({ 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 }); }, getHeight: api.HeaderTool.CurrentView.prototype.getHeight, setPlaceholder: api.HeaderTool.CurrentView.prototype.setPlaceholder, 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. * * @constructor * @augments wp.Backbone.View */ api.HeaderTool.ChoiceListView = wp.Backbone.View.extend({ 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. * * @constructor * @augments wp.Backbone.View */ api.HeaderTool.CombinedList = wp.Backbone.View.extend({ 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, _ );
Save