-
diff --git src/bp-activity/js/mentions.js src/bp-activity/js/mentions.js
index 3fbdd9d0c..a505a6921 100644
|
|
|
window.bp = window.bp || {};
|
| 178 | 178 | |
| 179 | 179 | params = { 'action': 'bp_get_suggestions', 'term': query, 'type': 'members' }; |
| 180 | 180 | |
| 181 | | if ( $.isNumeric( this.$inputor.data( 'suggestions-group-id' ) ) ) { |
| | 181 | var groupId = this.$inputor.data( 'suggestions-group-id' ); |
| | 182 | if ( ( 'number' === typeof groupId || 'string' === typeof groupId ) && ! isNaN( groupId - parseFloat( groupId ) ) ) { |
| 182 | 183 | params['group-id'] = parseInt( this.$inputor.data( 'suggestions-group-id' ), 10 ); |
| 183 | 184 | } |
| 184 | 185 | |
-
diff --git src/bp-core/js/avatar.js src/bp-core/js/avatar.js
index 938feaeda..44b913307 100644
|
|
|
|
| 1 | | /* global bp, BP_Uploader, _, Backbone */ |
| | 1 | /* global BP_Uploader, _, Backbone */ |
| 2 | 2 | |
| 3 | 3 | window.bp = window.bp || {}; |
| 4 | 4 | |
| 5 | | ( function( exports, $ ) { |
| | 5 | ( function( bp, $ ) { |
| 6 | 6 | |
| 7 | 7 | // Bail if not set. |
| 8 | 8 | if ( typeof BP_Uploader === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 679 | 679 | |
| 680 | 680 | bp.Avatar.start(); |
| 681 | 681 | |
| 682 | | })( bp, jQuery ); |
| | 682 | })( window.bp, jQuery ); |
-
diff --git src/bp-core/js/bp-plupload.js src/bp-core/js/bp-plupload.js
index a8020d597..d73bd8931 100644
|
|
|
|
| 1 | | /* global bp, plupload, BP_Uploader, _, JSON, Backbone */ |
| | 1 | /* global plupload, BP_Uploader, _, JSON, Backbone */ |
| 2 | 2 | |
| 3 | 3 | window.wp = window.wp || {}; |
| 4 | 4 | window.bp = window.bp || {}; |
| 5 | 5 | |
| 6 | | ( function( exports, $ ) { |
| | 6 | ( function( bp, $ ) { |
| 7 | 7 | |
| 8 | 8 | // Bail if not set. |
| 9 | 9 | if ( typeof BP_Uploader === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 85 | 85 | |
| 86 | 86 | if ( uploader.features.dragdrop && ! self.params.browser.mobile ) { |
| 87 | 87 | container.addClass( 'drag-drop' ); |
| 88 | | drop_element.bind( 'dragover.wp-uploader', function() { |
| | 88 | |
| | 89 | drop_element.on( 'dragover.wp-uploader', function() { |
| 89 | 90 | container.addClass( 'drag-over' ); |
| 90 | | } ).bind( 'dragleave.wp-uploader, drop.wp-uploader', function() { |
| | 91 | } ); |
| | 92 | |
| | 93 | drop_element.on( 'dragleave.wp-uploader, drop.wp-uploader', function() { |
| 91 | 94 | container.removeClass( 'drag-over' ); |
| 92 | 95 | } ); |
| 93 | 96 | } else { |
| 94 | 97 | container.removeClass( 'drag-drop' ); |
| 95 | | drop_element.unbind( '.wp-uploader' ); |
| | 98 | drop_element.off( '.wp-uploader' ); |
| 96 | 99 | } |
| 97 | 100 | |
| 98 | 101 | } ); |
| … |
… |
window.bp = window.bp || {};
|
| 416 | 419 | template: bp.template( 'progress-window' ) |
| 417 | 420 | } ); |
| 418 | 421 | |
| 419 | | })( bp, jQuery ); |
| | 422 | })( window.bp, jQuery ); |
-
diff --git src/bp-core/js/confirm.js src/bp-core/js/confirm.js
index 6e223497a..1fd334612 100644
|
|
|
|
| 1 | 1 | /* jshint devel: true */ |
| 2 | 2 | /* global BP_Confirm */ |
| 3 | 3 | |
| 4 | | jQuery( document ).ready( function() { |
| | 4 | jQuery( function() { |
| 5 | 5 | jQuery( '#buddypress' ).on( 'click', 'a.confirm', function() { |
| 6 | 6 | if ( confirm( BP_Confirm.are_you_sure ) ) { |
| 7 | 7 | return true; |
-
diff --git src/bp-core/js/cover-image.js src/bp-core/js/cover-image.js
index 158ccda0d..3c9a7ee92 100644
|
|
|
|
| 1 | | /* global bp, BP_Uploader, _, Backbone */ |
| | 1 | /* global BP_Uploader, _, Backbone */ |
| 2 | 2 | |
| 3 | 3 | window.bp = window.bp || {}; |
| 4 | 4 | |
| 5 | | ( function( exports, $ ) { |
| | 5 | ( function( bp, $ ) { |
| 6 | 6 | |
| 7 | 7 | // Bail if not set. |
| 8 | 8 | if ( typeof BP_Uploader === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 274 | 274 | |
| 275 | 275 | bp.CoverImage.start(); |
| 276 | 276 | |
| 277 | | })( bp, jQuery ); |
| | 277 | })( window.bp, jQuery ); |
-
diff --git src/bp-core/js/vendor/jquery-cookie.js src/bp-core/js/vendor/jquery-cookie.js
index 18172bf60..e752d798f 100644
|
|
|
|
| 52 | 52 | |
| 53 | 53 | function read(s, converter) { |
| 54 | 54 | var value = config.raw ? s : parseCookieValue(s); |
| 55 | | return $.isFunction(converter) ? converter(value) : value; |
| | 55 | return typeof converter === 'function' ? converter(value) : value; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | var config = $.cookie = function(key, value, options) { |
| 59 | 59 | |
| 60 | 60 | // Write. |
| 61 | 61 | |
| 62 | | if (value !== undefined && !$.isFunction(value)) { |
| | 62 | if (value !== undefined && typeof value !== 'function' ) { |
| 63 | 63 | options = $.extend({}, config.defaults, options); |
| 64 | 64 | |
| 65 | 65 | if (typeof options.expires === 'number') { |
| … |
… |
|
| 117 | 117 | return !$.cookie(key); |
| 118 | 118 | }; |
| 119 | 119 | |
| 120 | | })); |
| 121 | | No newline at end of file |
| | 120 | })); |
-
diff --git src/bp-core/js/vendor/jquery-scroll-to.js src/bp-core/js/vendor/jquery-scroll-to.js
index 8fe92b208..999d795f2 100644
|
|
|
|
| 2 | 2 | /* jshint -W065 */ |
| 3 | 3 | |
| 4 | 4 | /*! |
| 5 | | * jQuery.ScrollTo |
| 6 | | * Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com |
| | 5 | * jQuery.scrollTo |
| | 6 | * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler |
| 7 | 7 | * Licensed under MIT |
| 8 | | * http://flesler.blogspot.com/2007/10/jqueryscrollto.html |
| 9 | | * @projectDescription Easy element scrolling using jQuery. |
| | 8 | * https://github.com/flesler/jquery.scrollTo |
| | 9 | * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery |
| 10 | 10 | * @author Ariel Flesler |
| 11 | | * @version 1.4.12 |
| | 11 | * @version 2.1.3 |
| 12 | 12 | */ |
| 13 | | |
| 14 | | (function(factory) { |
| 15 | | // AMD. |
| | 13 | ;(function(factory) { |
| | 14 | 'use strict'; |
| 16 | 15 | if (typeof define === 'function' && define.amd) { |
| | 16 | // AMD |
| 17 | 17 | define(['jquery'], factory); |
| 18 | | // CommonJS. |
| 19 | | } else if (typeof exports === 'object') { |
| 20 | | factory(require('jquery')); |
| 21 | | // Browser globals. |
| | 18 | } else if (typeof module !== 'undefined' && module.exports) { |
| | 19 | // CommonJS |
| | 20 | module.exports = factory(require('jquery')); |
| 22 | 21 | } else { |
| | 22 | // Global |
| 23 | 23 | factory(jQuery); |
| 24 | 24 | } |
| 25 | | }(function($) { |
| | 25 | })(function($) { |
| | 26 | 'use strict'; |
| 26 | 27 | |
| 27 | 28 | var $scrollTo = $.scrollTo = function(target, duration, settings) { |
| 28 | 29 | return $(window).scrollTo(target, duration, settings); |
| 29 | 30 | }; |
| 30 | 31 | |
| 31 | 32 | $scrollTo.defaults = { |
| 32 | | axis: 'xy', |
| 33 | | duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, |
| 34 | | limit: true |
| 35 | | }; |
| 36 | | |
| 37 | | // Returns the element that needs to be animated to scroll the window. |
| 38 | | // Kept for backwards compatibility (specially for localScroll & serialScroll). |
| 39 | | $scrollTo.window = function() { |
| 40 | | return $(window)._scrollable(); |
| | 33 | axis:'xy', |
| | 34 | duration: 0, |
| | 35 | limit:true |
| 41 | 36 | }; |
| 42 | 37 | |
| 43 | | // Hack, hack, hack :) |
| 44 | | // Returns the real elements to scroll (supports window/iframes, documents and regular nodes). |
| 45 | | $.fn._scrollable = function() { |
| 46 | | return this.map(function() { |
| 47 | | var elem = this, |
| 48 | | isWin = !elem.nodeName || $.inArray(elem.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) !== -1; |
| 49 | | |
| 50 | | if (!isWin) { |
| 51 | | return elem; |
| 52 | | } |
| 53 | | |
| 54 | | var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; |
| | 38 | function isWin(elem) { |
| | 39 | return !elem.nodeName || |
| | 40 | $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1; |
| | 41 | } |
| 55 | 42 | |
| 56 | | return /webkit/i.test(navigator.userAgent) || doc.compatMode === 'BackCompat' ? |
| 57 | | doc.body : |
| 58 | | doc.documentElement; |
| 59 | | }); |
| 60 | | }; |
| | 43 | function isFunction(obj) { |
| | 44 | // Brought from jQuery since it's deprecated |
| | 45 | return typeof obj === 'function' |
| | 46 | } |
| 61 | 47 | |
| 62 | 48 | $.fn.scrollTo = function(target, duration, settings) { |
| 63 | 49 | if (typeof duration === 'object') { |
| … |
… |
|
| 65 | 51 | duration = 0; |
| 66 | 52 | } |
| 67 | 53 | if (typeof settings === 'function') { |
| 68 | | settings = {onAfter: settings}; |
| | 54 | settings = { onAfter:settings }; |
| 69 | 55 | } |
| 70 | | |
| 71 | 56 | if (target === 'max') { |
| 72 | 57 | target = 9e9; |
| 73 | 58 | } |
| 74 | 59 | |
| 75 | 60 | settings = $.extend({}, $scrollTo.defaults, settings); |
| 76 | | // Speed is still recognized for backwards compatibility. |
| | 61 | // Speed is still recognized for backwards compatibility |
| 77 | 62 | duration = duration || settings.duration; |
| 78 | | // Make sure the settings are given right. |
| 79 | | settings.queue = settings.queue && settings.axis.length > 1; |
| 80 | | |
| 81 | | // Let's keep the overall duration. |
| 82 | | if (settings.queue) { |
| | 63 | // Make sure the settings are given right |
| | 64 | var queue = settings.queue && settings.axis.length > 1; |
| | 65 | if (queue) { |
| | 66 | // Let's keep the overall duration |
| 83 | 67 | duration /= 2; |
| 84 | 68 | } |
| 85 | | |
| 86 | 69 | settings.offset = both(settings.offset); |
| 87 | 70 | settings.over = both(settings.over); |
| 88 | 71 | |
| 89 | | return this._scrollable().each(function() { |
| | 72 | return this.each(function() { |
| | 73 | // Null target yields nothing, just like jQuery does |
| | 74 | if (target === null) return; |
| 90 | 75 | |
| 91 | | // Null target yields nothing, just like jQuery does. |
| 92 | | if (target === null) { |
| 93 | | return; |
| 94 | | } |
| 95 | | |
| 96 | | var elem = this, |
| 97 | | $elem = $(elem), |
| 98 | | targ = target, toff, attr = {}, |
| 99 | | win = $elem.is('html,body'); |
| | 76 | var win = isWin(this), |
| | 77 | elem = win ? this.contentWindow || window : this, |
| | 78 | $elem = $(elem), |
| | 79 | targ = target, |
| | 80 | attr = {}, |
| | 81 | toff; |
| 100 | 82 | |
| 101 | 83 | switch (typeof targ) { |
| 102 | | // A number will pass the regex. |
| | 84 | // A number will pass the regex |
| 103 | 85 | case 'number': |
| 104 | 86 | case 'string': |
| 105 | 87 | if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { |
| … |
… |
|
| 107 | 89 | // We are done |
| 108 | 90 | break; |
| 109 | 91 | } |
| 110 | | // Relative/Absolute selector, no break! |
| 111 | | targ = win ? $(targ) : $(targ, this); |
| 112 | | if (!targ.length) { |
| 113 | | return; |
| 114 | | } |
| | 92 | // Relative/Absolute selector |
| | 93 | targ = win ? $(targ) : $(targ, elem); |
| 115 | 94 | /* falls through */ |
| 116 | 95 | case 'object': |
| 117 | | // DOMElement / jQuery. |
| | 96 | if (targ.length === 0) return; |
| | 97 | // DOMElement / jQuery |
| 118 | 98 | if (targ.is || targ.style) { |
| 119 | | // Get the real position of the target. |
| | 99 | // Get the real position of the target |
| 120 | 100 | toff = (targ = $(targ)).offset(); |
| 121 | 101 | } |
| 122 | 102 | } |
| 123 | 103 | |
| 124 | | var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; |
| | 104 | var offset = isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; |
| 125 | 105 | |
| 126 | 106 | $.each(settings.axis.split(''), function(i, axis) { |
| 127 | | var Pos = axis === 'x' ? 'Left' : 'Top', |
| 128 | | pos = Pos.toLowerCase(), |
| 129 | | key = 'scroll' + Pos, |
| 130 | | old = elem[key], |
| 131 | | max = $scrollTo.max(elem, axis); |
| | 107 | var Pos = axis === 'x' ? 'Left' : 'Top', |
| | 108 | pos = Pos.toLowerCase(), |
| | 109 | key = 'scroll' + Pos, |
| | 110 | prev = $elem[key](), |
| | 111 | max = $scrollTo.max(elem, axis); |
| 132 | 112 | |
| 133 | | if (toff) { // jQuery / DOMElement. |
| 134 | | attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]); |
| | 113 | if (toff) {// jQuery / DOMElement |
| | 114 | attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]); |
| 135 | 115 | |
| 136 | | // If it's a dom element, reduce the margin. |
| | 116 | // If it's a dom element, reduce the margin |
| 137 | 117 | if (settings.margin) { |
| 138 | | attr[key] -= parseInt(targ.css('margin' + Pos)) || 0; |
| 139 | | attr[key] -= parseInt(targ.css('border' + Pos + 'Width')) || 0; |
| | 118 | attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0; |
| | 119 | attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0; |
| 140 | 120 | } |
| 141 | 121 | |
| 142 | 122 | attr[key] += offset[pos] || 0; |
| 143 | 123 | |
| 144 | | // Scroll to a fraction of its width/height. |
| 145 | 124 | if (settings.over[pos]) { |
| 146 | | attr[key] += targ[axis === 'x' ? 'width' : 'height']() * settings.over[pos]; |
| | 125 | // Scroll to a fraction of its width/height |
| | 126 | attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos]; |
| 147 | 127 | } |
| 148 | 128 | } else { |
| 149 | 129 | var val = targ[pos]; |
| 150 | | // Handle percentage values. |
| | 130 | // Handle percentage values |
| 151 | 131 | attr[key] = val.slice && val.slice(-1) === '%' ? |
| 152 | | parseFloat(val) / 100 * max |
| 153 | | : val; |
| | 132 | parseFloat(val) / 100 * max |
| | 133 | : val; |
| 154 | 134 | } |
| 155 | 135 | |
| 156 | | // Number or 'number'. |
| | 136 | // Number or 'number' |
| 157 | 137 | if (settings.limit && /^\d+$/.test(attr[key])) { |
| 158 | 138 | // Check the limits |
| 159 | 139 | attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); |
| 160 | 140 | } |
| 161 | 141 | |
| 162 | | // Queueing axes. |
| 163 | | if (!i && settings.queue) { |
| 164 | | // Don't waste time animating, if there's no need. |
| 165 | | if (old !== attr[key]) { |
| 166 | | // Intermediate animation. |
| | 142 | // Don't waste time animating, if there's no need. |
| | 143 | if (!i && settings.axis.length > 1) { |
| | 144 | if (prev === attr[key]) { |
| | 145 | // No animation needed |
| | 146 | attr = {}; |
| | 147 | } else if (queue) { |
| | 148 | // Intermediate animation |
| 167 | 149 | animate(settings.onAfterFirst); |
| | 150 | // Don't animate this axis again in the next iteration. |
| | 151 | attr = {}; |
| 168 | 152 | } |
| 169 | | // Don't animate this axis again in the next iteration. |
| 170 | | delete attr[key]; |
| 171 | 153 | } |
| 172 | 154 | }); |
| 173 | 155 | |
| 174 | 156 | animate(settings.onAfter); |
| 175 | 157 | |
| 176 | 158 | function animate(callback) { |
| 177 | | $elem.animate(attr, duration, settings.easing, callback && function() { |
| 178 | | callback.call(this, targ, settings); |
| | 159 | var opts = $.extend({}, settings, { |
| | 160 | // The queue setting conflicts with animate() |
| | 161 | // Force it to always be true |
| | 162 | queue: true, |
| | 163 | duration: duration, |
| | 164 | complete: callback && function() { |
| | 165 | callback.call(elem, targ, settings); |
| | 166 | } |
| 179 | 167 | }); |
| | 168 | $elem.animate(attr, opts); |
| 180 | 169 | } |
| 181 | | |
| 182 | | }).end(); |
| | 170 | }); |
| 183 | 171 | }; |
| 184 | 172 | |
| 185 | 173 | // Max scrolling position, works on quirks mode |
| 186 | 174 | // It only fails (not too badly) on IE, quirks mode. |
| 187 | 175 | $scrollTo.max = function(elem, axis) { |
| 188 | 176 | var Dim = axis === 'x' ? 'Width' : 'Height', |
| 189 | | scroll = 'scroll' + Dim; |
| | 177 | scroll = 'scroll'+Dim; |
| 190 | 178 | |
| 191 | | if (!$(elem).is('html,body')) { |
| | 179 | if (!isWin(elem)) |
| 192 | 180 | return elem[scroll] - $(elem)[Dim.toLowerCase()](); |
| 193 | | } |
| 194 | 181 | |
| 195 | 182 | var size = 'client' + Dim, |
| 196 | | html = elem.ownerDocument.documentElement, |
| 197 | | body = elem.ownerDocument.body; |
| | 183 | doc = elem.ownerDocument || elem.document, |
| | 184 | html = doc.documentElement, |
| | 185 | body = doc.body; |
| 198 | 186 | |
| 199 | 187 | return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]); |
| 200 | 188 | }; |
| 201 | 189 | |
| 202 | 190 | function both(val) { |
| 203 | | return $.isFunction(val) || typeof val === 'object' ? val : {top: val, left: val}; |
| | 191 | return isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val }; |
| 204 | 192 | } |
| 205 | 193 | |
| 206 | | // AMD requirement. |
| | 194 | // Add special hooks so that window scroll properties can be animated |
| | 195 | $.Tween.propHooks.scrollLeft = |
| | 196 | $.Tween.propHooks.scrollTop = { |
| | 197 | get: function(t) { |
| | 198 | return $(t.elem)[t.prop](); |
| | 199 | }, |
| | 200 | set: function(t) { |
| | 201 | var curr = this.get(t); |
| | 202 | // If interrupt is true and user scrolled, stop animating |
| | 203 | if (t.options.interrupt && t._last && t._last !== curr) { |
| | 204 | return $(t.elem).stop(); |
| | 205 | } |
| | 206 | var next = Math.round(t.now); |
| | 207 | // Don't waste CPU |
| | 208 | // Browsers don't render floating point scroll |
| | 209 | if (curr !== next) { |
| | 210 | $(t.elem)[t.prop](next); |
| | 211 | t._last = this.get(t); |
| | 212 | } |
| | 213 | } |
| | 214 | }; |
| | 215 | |
| | 216 | // AMD requirement |
| 207 | 217 | return $scrollTo; |
| 208 | | })); |
| 209 | | No newline at end of file |
| | 218 | }); |
-
diff --git src/bp-core/js/vendor/jquery.atwho.js src/bp-core/js/vendor/jquery.atwho.js
index b0685d2b1..4aeff1dc3 100755
|
|
|
Controller = (function() {
|
| 461 | 461 | |
| 462 | 462 | Controller.arrayToDefaultHash = function(data) { |
| 463 | 463 | var i, item, len, results; |
| 464 | | if (!$.isArray(data)) { |
| | 464 | if (!Array.isArray(data)) { |
| 465 | 465 | return data; |
| 466 | 466 | } |
| 467 | 467 | results = []; |
| … |
… |
TextareaController = (function(superClass) {
|
| 628 | 628 | iframe: this.app.iframe |
| 629 | 629 | }); |
| 630 | 630 | if (!$inputor.is(':focus')) { |
| 631 | | $inputor.focus(); |
| | 631 | $inputor.trigger( 'focus' ); |
| 632 | 632 | } |
| 633 | | return $inputor.change(); |
| | 633 | return $inputor.trigger( 'change' ); |
| 634 | 634 | }; |
| 635 | 635 | |
| 636 | 636 | return TextareaController; |
| … |
… |
View = (function() {
|
| 976 | 976 | }; |
| 977 | 977 | |
| 978 | 978 | View.prototype.visible = function() { |
| 979 | | return $.expr.filters.visible(this.$el[0]); |
| | 979 | return $.expr.pseudos.visible(this.$el[0]); |
| 980 | 980 | }; |
| 981 | 981 | |
| 982 | 982 | View.prototype.highlighted = function() { |
| … |
… |
View = (function() {
|
| 1092 | 1092 | |
| 1093 | 1093 | View.prototype.render = function(list) { |
| 1094 | 1094 | var $li, $ul, i, item, len, li, tpl; |
| 1095 | | if (!($.isArray(list) && list.length > 0)) { |
| | 1095 | if (!(Array.isArray(list) && list.length > 0)) { |
| 1096 | 1096 | this.hide(); |
| 1097 | 1097 | return; |
| 1098 | 1098 | } |
-
diff --git src/bp-core/js/webcam.js src/bp-core/js/webcam.js
index 46e768af5..1280787ca 100644
|
|
|
|
| 1 | | /* global bp, BP_Uploader, _, Backbone */ |
| | 1 | /* global BP_Uploader, _, Backbone */ |
| 2 | 2 | |
| 3 | 3 | window.bp = window.bp || {}; |
| 4 | 4 | |
| 5 | | ( function() { |
| | 5 | ( function( bp ) { |
| 6 | 6 | |
| 7 | 7 | // Bail if not set. |
| 8 | 8 | if ( typeof BP_Uploader === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 317 | 317 | |
| 318 | 318 | bp.WebCam.start(); |
| 319 | 319 | |
| 320 | | })( bp, jQuery ); |
| | 320 | })( window.bp ); |
-
diff --git src/bp-core/js/widget-members.js src/bp-core/js/widget-members.js
index a46273e11..1918fcfd8 100644
|
|
|
|
| 1 | | jQuery(document).ready( function() { |
| | 1 | jQuery( function() { |
| 2 | 2 | member_widget_click_handler(); |
| 3 | 3 | |
| 4 | 4 | // WP 4.5 - Customizer selective refresh support. |
-
diff --git src/bp-templates/bp-legacy/js/buddypress.js src/bp-templates/bp-legacy/js/buddypress.js
index 268b727a2..791f337a6 100644
|
|
|
|
| 1 | 1 | /* jshint undef: false, unused:false */ |
| 2 | | /* @version 3.0.0 */ |
| | 2 | /* @version 1.7.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 3 | 4 | // AJAX Functions |
| 4 | 5 | var jq = jQuery; |
| 5 | 6 | |
| … |
… |
var activity_last_recorded = 0;
|
| 12 | 13 | |
| 13 | 14 | var directoryPreferences = {}; |
| 14 | 15 | |
| 15 | | jq(document).ready( function() { |
| | 16 | jq( function() { |
| 16 | 17 | var activity_oldestpage = 1; |
| 17 | 18 | |
| 18 | 19 | /**** Page Load Actions *******************************************************/ |
| … |
… |
jq(document).ready( function() {
|
| 41 | 42 | easing:'swing' |
| 42 | 43 | } ); |
| 43 | 44 | |
| 44 | | $whats_new.val('').focus().val( $member_nicename ); |
| | 45 | $whats_new.val('').trigger( 'focus' ).val( $member_nicename ); |
| 45 | 46 | } else { |
| 46 | 47 | jq('#whats-new-options').hide(); |
| 47 | 48 | } |
| … |
… |
jq(document).ready( function() {
|
| 133 | 134 | } |
| 134 | 135 | } ); |
| 135 | 136 | |
| 136 | | form.find( '*' ).each( function() { |
| 137 | | if ( jq.nodeName( this, 'textarea' ) || jq.nodeName( this, 'input' ) ) { |
| 138 | | jq(this).prop( 'disabled', true ); |
| | 137 | form.find( '*' ).each( function( i, elem ) { |
| | 138 | if ( elem.nodeName.toLowerCase() === 'textarea' || elem.nodeName.toLowerCase() ==='input' ) { |
| | 139 | jq( elem ).prop( 'disabled', true ); |
| 139 | 140 | } |
| 140 | 141 | } ); |
| 141 | 142 | |
| … |
… |
jq(document).ready( function() {
|
| 184 | 185 | }, inputs ); |
| 185 | 186 | |
| 186 | 187 | jq.post( ajaxurl, post_data, function( response ) { |
| 187 | | form.find( '*' ).each( function() { |
| 188 | | if ( jq.nodeName( this, 'textarea' ) || jq.nodeName( this, 'input' ) ) { |
| 189 | | jq(this).prop( 'disabled', false ); |
| | 188 | form.find( '*' ).each( function( i, elem ) { |
| | 189 | if ( elem.nodeName.toLowerCase() === 'textarea' || elem.nodeName.toLowerCase() ==='input' ) { |
| | 190 | jq( elem ).prop( 'disabled', false ); |
| 190 | 191 | } |
| 191 | | }); |
| | 192 | } ); |
| 192 | 193 | |
| 193 | 194 | /* Check for errors and append if found. */ |
| 194 | 195 | if ( response[0] + response[1] === '-1' ) { |
| … |
… |
jq(document).ready( function() {
|
| 582 | 583 | offset:-100, |
| 583 | 584 | easing:'swing' |
| 584 | 585 | } ); |
| 585 | | jq('#ac-form-' + ids[2] + ' textarea').focus(); |
| | 586 | jq('#ac-form-' + ids[2] + ' textarea').trigger( 'focus' ); |
| 586 | 587 | |
| 587 | 588 | return false; |
| 588 | 589 | } |
| … |
… |
jq(document).ready( function() {
|
| 1124 | 1125 | 'friend_id': friend_id, |
| 1125 | 1126 | 'group_id': jq('#group_id').val() |
| 1126 | 1127 | }, |
| 1127 | | function(response) |
| | 1128 | function() |
| 1128 | 1129 | { |
| 1129 | 1130 | if ( invites_new_template ) { |
| 1130 | 1131 | // With new-style templates, we refresh the |
| … |
… |
jq(document).ready( function() {
|
| 1382 | 1383 | } |
| 1383 | 1384 | |
| 1384 | 1385 | // toggle "Blog Details" block whenever checkbox is checked |
| 1385 | | blog_checked.change(function() { |
| | 1386 | blog_checked.on( 'change', function() { |
| 1386 | 1387 | jq('#blog-details').toggle(); |
| 1387 | 1388 | }); |
| 1388 | 1389 | } |
-
diff --git src/bp-templates/bp-legacy/js/password-verify.js src/bp-templates/bp-legacy/js/password-verify.js
index 14e530c22..58d73c7bd 100644
|
|
|
|
| 1 | 1 | /* jshint undef: false */ |
| 2 | | /* @version 3.0.0 */ |
| | 2 | /* @since 1.7.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 3 | 4 | /* Password Verify */ |
| 4 | 5 | ( function( $ ){ |
| 5 | 6 | function check_pass_strength() { |
| … |
… |
|
| 41 | 42 | } |
| 42 | 43 | |
| 43 | 44 | // Bind check_pass_strength to keyup events in the password fields |
| 44 | | $( document ).ready( function() { |
| 45 | | $( '.password-entry' ).val( '' ).keyup( check_pass_strength ); |
| 46 | | $( '.password-entry-confirm' ).val( '' ).keyup( check_pass_strength ); |
| | 45 | $( function() { |
| | 46 | $( '.password-entry' ).val( '' ).on( 'keyup', check_pass_strength ); |
| | 47 | $( '.password-entry-confirm' ).val( '' ).on( 'keyup', check_pass_strength ); |
| 47 | 48 | }); |
| 48 | 49 | |
| 49 | 50 | } )( jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js
index 4465aeca1..27f242e23 100644
|
|
|
|
| 1 | | /* global bp, BP_Nouveau, _, Backbone */ |
| | 1 | /* global BP_Nouveau, _, Backbone */ |
| 2 | 2 | /* @since 3.0.0 */ |
| 3 | | /* @version 5.0.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 4 | 4 | window.wp = window.wp || {}; |
| 5 | 5 | window.bp = window.bp || {}; |
| 6 | 6 | |
| 7 | | ( function( exports, $ ) { |
| | 7 | ( function( bp, $ ) { |
| 8 | 8 | bp.Nouveau = bp.Nouveau || {}; |
| 9 | 9 | |
| 10 | 10 | // Bail if not set |
| … |
… |
window.bp = window.bp || {};
|
| 785 | 785 | |
| 786 | 786 | bp.Nouveau.Activity.postForm.start(); |
| 787 | 787 | |
| 788 | | } )( bp, jQuery ); |
| | 788 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-activity.js src/bp-templates/bp-nouveau/js/buddypress-activity.js
index 1e6ded9cc..0eab0891a 100644
|
|
|
|
| 1 | 1 | /* jshint browser: true */ |
| 2 | | /* global bp, BP_Nouveau */ |
| | 2 | /* global BP_Nouveau */ |
| 3 | 3 | /* @since 3.0.0 */ |
| 4 | | /* @version 7.0.0 */ |
| | 4 | /* @version 8.0.0 */ |
| 5 | 5 | window.bp = window.bp || {}; |
| 6 | 6 | |
| 7 | | ( function( exports, $ ) { |
| | 7 | ( function( bp, $ ) { |
| 8 | 8 | |
| 9 | 9 | // Bail if not set |
| 10 | 10 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 74 | 74 | |
| 75 | 75 | // Activity actions |
| 76 | 76 | $( '#buddypress [data-bp-list="activity"]' ).on( 'click', '.activity-item', bp.Nouveau, this.activityActions ); |
| 77 | | $( document ).keydown( this.commentFormAction ); |
| | 77 | $( document ).on( 'keydown', this.commentFormAction ); |
| 78 | 78 | }, |
| 79 | 79 | |
| 80 | 80 | /** |
| … |
… |
window.bp = window.bp || {};
|
| 700 | 700 | easing:'swing' |
| 701 | 701 | } ); |
| 702 | 702 | |
| 703 | | $( '#ac-form-' + activity_id + ' textarea' ).focus(); |
| | 703 | $( '#ac-form-' + activity_id + ' textarea' ).trigger( 'focus' ); |
| 704 | 704 | } |
| 705 | 705 | |
| 706 | 706 | // Removing the form |
| … |
… |
window.bp = window.bp || {};
|
| 824 | 824 | return event; |
| 825 | 825 | } |
| 826 | 826 | |
| 827 | | keyCode = ( event.keyCode) ? event.keyCode : event.which; |
| | 827 | keyCode = ( event.keyCode ) ? event.keyCode : event.which; |
| 828 | 828 | |
| 829 | 829 | if ( 27 === keyCode && false === event.ctrlKey ) { |
| 830 | 830 | if ( element.tagName === 'TEXTAREA' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 839 | 839 | // Launch BP Nouveau Activity |
| 840 | 840 | bp.Nouveau.Activity.start(); |
| 841 | 841 | |
| 842 | | } )( bp, jQuery ); |
| | 842 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-group-invites.js src/bp-templates/bp-nouveau/js/buddypress-group-invites.js
index 595f5ee8e..d06896860 100644
|
|
|
|
| 1 | | /* global wp, bp, BP_Nouveau, _, Backbone */ |
| 2 | | /* @version 4.0.0 */ |
| | 1 | /* global wp, BP_Nouveau, _, Backbone */ |
| | 2 | /* @since 3.0.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 3 | 4 | window.wp = window.wp || {}; |
| 4 | 5 | window.bp = window.bp || {}; |
| 5 | 6 | |
| 6 | | ( function( exports, $ ) { |
| | 7 | ( function( bp, $ ) { |
| 7 | 8 | |
| 8 | 9 | // Bail if not set |
| 9 | 10 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 844 | 845 | // Launch BP Nouveau Groups |
| 845 | 846 | bp.Nouveau.GroupInvites.start(); |
| 846 | 847 | |
| 847 | | } )( bp, jQuery ); |
| | 848 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-messages.js src/bp-templates/bp-nouveau/js/buddypress-messages.js
index 44732ceaa..365070564 100644
|
|
|
|
| 1 | | /* global wp, bp, BP_Nouveau, _, Backbone, tinymce, tinyMCE */ |
| | 1 | /* global wp, BP_Nouveau, _, Backbone, tinymce, tinyMCE */ |
| 2 | 2 | /* jshint devel: true */ |
| 3 | 3 | /* @version 3.1.0 */ |
| 4 | 4 | window.wp = window.wp || {}; |
| 5 | 5 | window.bp = window.bp || {}; |
| 6 | 6 | |
| 7 | | ( function( exports, $ ) { |
| | 7 | ( function( bp, $ ) { |
| 8 | 8 | |
| 9 | 9 | // Bail if not set. |
| 10 | 10 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 106 | 106 | return; |
| 107 | 107 | } else { |
| 108 | 108 | // Mentions isn't available, so bail. |
| 109 | | if ( _.isEmpty( exports.mentions ) ) { |
| | 109 | if ( _.isEmpty( bp.mentions ) ) { |
| 110 | 110 | return; |
| 111 | 111 | } |
| 112 | 112 | |
| … |
… |
window.bp = window.bp || {};
|
| 1429 | 1429 | // Launch BP Nouveau Groups. |
| 1430 | 1430 | bp.Nouveau.Messages.start(); |
| 1431 | 1431 | |
| 1432 | | } )( bp, jQuery ); |
| | 1432 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-notifications.js src/bp-templates/bp-nouveau/js/buddypress-notifications.js
index 93395cce4..52452e205 100644
|
|
|
|
| 1 | | /* global bp, BP_Nouveau */ |
| 2 | | /* @version 3.0.0 */ |
| | 1 | /* global BP_Nouveau */ |
| | 2 | /* @since 3.0.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 3 | 4 | window.bp = window.bp || {}; |
| 4 | 5 | |
| 5 | | ( function( exports, $ ) { |
| | 6 | ( function( bp, $ ) { |
| 6 | 7 | |
| 7 | 8 | // Bail if not set. |
| 8 | 9 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 137 | 138 | // Launch BP Nouveau Notifications. |
| 138 | 139 | bp.Nouveau.Notifications.start(); |
| 139 | 140 | |
| 140 | | } )( bp, jQuery ); |
| | 141 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-nouveau.js src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
index 66f45baca..37e74ff66 100644
|
|
|
|
| 1 | | /* global wp, bp, BP_Nouveau, JSON */ |
| | 1 | /* global wp, BP_Nouveau, JSON */ |
| 2 | 2 | /* jshint devel: true */ |
| 3 | 3 | /* jshint browser: true */ |
| 4 | 4 | /* @since 3.0.0 */ |
| 5 | | /* @version 7.0.0 */ |
| | 5 | /* @version 8.0.0 */ |
| 6 | 6 | window.wp = window.wp || {}; |
| 7 | 7 | window.bp = window.bp || {}; |
| 8 | 8 | |
| 9 | | ( function( exports, $ ) { |
| | 9 | ( function( bp, $ ) { |
| 10 | 10 | |
| 11 | 11 | // Bail if not set. |
| 12 | 12 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 824 | 824 | // Launch BP Nouveau. |
| 825 | 825 | bp.Nouveau.start(); |
| 826 | 826 | |
| 827 | | } )( bp, jQuery ); |
| | 827 | } )( window.bp, jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/buddypress-xprofile.js src/bp-templates/bp-nouveau/js/buddypress-xprofile.js
index 829e427d8..de8782613 100644
|
|
|
|
| 1 | | /* global bp, BP_Nouveau */ |
| 2 | | /* @version 3.0.0 */ |
| 3 | | window.bp = window.bp || {}; |
| | 1 | /* global BP_Nouveau */ |
| | 2 | /* @since 3.0.0 */ |
| | 3 | /* @version 8.0.0 */ |
| 4 | 4 | |
| 5 | | ( function( exports, $ ) { |
| | 5 | ( function( $ ) { |
| 6 | 6 | |
| 7 | 7 | // Bail if not set. |
| 8 | 8 | if ( typeof BP_Nouveau === 'undefined' ) { |
| … |
… |
window.bp = window.bp || {};
|
| 45 | 45 | $( '.visibility-toggle-link').attr( 'aria-expanded', 'false' ); |
| 46 | 46 | } ); |
| 47 | 47 | |
| 48 | | $( '#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select' ).change( function() { |
| | 48 | $( '#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select' ).on( 'change', function() { |
| 49 | 49 | var shouldconfirm = true; |
| 50 | 50 | |
| 51 | 51 | $( '#profile-edit-form input:submit, #signup_form input:submit' ).on( 'click', function() { |
| … |
… |
window.bp = window.bp || {};
|
| 76 | 76 | } ); |
| 77 | 77 | } |
| 78 | 78 | }; |
| 79 | | } )( bp, jQuery ); |
| | 79 | } )( jQuery ); |
-
diff --git src/bp-templates/bp-nouveau/js/customizer.js src/bp-templates/bp-nouveau/js/customizer.js
index 073e5b2ed..caddc3f52 100644
|
|
|
|
| 1 | 1 | /* global _ */ |
| | 2 | /* @since 3.0.0 */ |
| 2 | 3 | /* @version 3.0.0 */ |
| 3 | 4 | window.wp = window.wp || {}; |
| 4 | 5 | |
-
diff --git src/bp-templates/bp-nouveau/js/password-verify.js src/bp-templates/bp-nouveau/js/password-verify.js
index db822f16c..03c0e3c69 100644
|
|
|
|
| 2 | 2 | /* Password Verify */ |
| 3 | 3 | /* global pwsL10n */ |
| 4 | 4 | /* @since 3.0.0 */ |
| 5 | | /* @version 5.0.0 */ |
| | 5 | /* @version 8.0.0 */ |
| 6 | 6 | ( function( $ ){ |
| 7 | 7 | /** |
| 8 | 8 | * Function to inform the user about the strength of its password. |
| … |
… |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // Bind check_pass_strength to keyup events in the password fields. |
| 51 | | $( document ).ready( function() { |
| | 51 | $( function() { |
| 52 | 52 | $( '.password-entry' ).val( '' ).keyup( check_pass_strength ); |
| 53 | 53 | $( '.password-entry-confirm' ).val( '' ).keyup( check_pass_strength ); |
| 54 | 54 | |