Commit 509b8949 authored by lucha's avatar lucha
Browse files

[auto] plugin: buddypress 3.2.0

parent 23745cb8
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?e(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],e):e(a.moment)}(this,function(a){"use strict";function e(a){var e=a;return e=-1!==a.indexOf("jaj")?e.slice(0,-3)+"leS":-1!==a.indexOf("jar")?e.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?e.slice(0,-3)+"nem":e+" pIq"}function j(a){var e=a;return e=-1!==a.indexOf("jaj")?e.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?e.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?e.slice(0,-3)+"ben":e+" ret"}function r(a,e,j,r){var n=t(a);switch(j){case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}function t(a){var e=Math.floor(a%1e3/100),j=Math.floor(a%100/10),r=a%10,t="";return e>0&&(t+=n[e]+"vatlh"),j>0&&(t+=(""!==t?" ":"")+n[j]+"maH"),r>0&&(t+=(""!==t?" ":"")+n[r]),""===t?"pagh":t}var n="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");return a.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:e,past:j,s:"puS lup",m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})});
\ No newline at end of file
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?e(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],e):e(a.moment)}(this,function(a){"use strict";function e(a,e,r,t){var n=j(a);switch(r){case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}function j(a){var e=Math.floor(a%1e3/100),j=Math.floor(a%100/10),t=a%10,n="";return e>0&&(n+=r[e]+"vatlh"),j>0&&(n+=(""!==n?" ":"")+r[j]+"maH"),t>0&&(n+=(""!==n?" ":"")+r[t]),""===n?"pagh":n}var r="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");return a.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(a){var e=a;return e=-1!==a.indexOf("jaj")?e.slice(0,-3)+"leS":-1!==a.indexOf("jar")?e.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?e.slice(0,-3)+"nem":e+" pIq"},past:function(a){var e=a;return e=-1!==a.indexOf("jaj")?e.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?e.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?e.slice(0,-3)+"ben":e+" ret"},s:"puS lup",m:"wa’ tup",mm:e,h:"wa’ rep",hh:e,d:"wa’ jaj",dd:e,M:"wa’ jar",MM:e,y:"wa’ DIS",yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})});
\ No newline at end of file
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?_(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],_):_(e.moment)}(this,function(e){"use strict";function _(e,_){var t=e.split("_");return _%10==1&&_%100!=11?t[0]:_%10>=2&&_%10<=4&&(_%100<10||_%100>=20)?t[1]:t[2]}function t(e,t,n){var s={mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+_(s[n],+e)}function n(e,_){return{nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")}[/(\[[ВвУу]\]) ?dddd/.test(_)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(_)?"genitive":"nominative"][e.day()]}function s(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}return e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:n,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:s("[Сьогодні "),nextDay:s("[Завтра "),lastDay:s("[Вчора "),nextWeek:s("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return s("[Минулої] dddd [").call(this);case 1:case 2:case 4:return s("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,_,t){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,_){switch(_){case"M":case"d":case"DDD":case"w":case"W":return e+"";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})});
\ No newline at end of file
!function(e,_){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?_(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],_):_(e.moment)}(this,function(e){"use strict";function _(e,_){var t=e.split("_");return _%10==1&&_%100!=11?t[0]:_%10>=2&&_%10<=4&&(_%100<10||_%100>=20)?t[1]:t[2]}function t(e,t,n){var s={mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+_(s[n],+e)}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}return e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,_){return{nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")}[/(\[[ВвУу]\]) ?dddd/.test(_)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(_)?"genitive":"nominative"][e.day()]},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,_,t){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,_){switch(_){case"M":case"d":case"DDD":case"w":case"W":return e+"";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})});
\ No newline at end of file
window.bp=window.bp||{},function(){"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.WebCam={start:function(){this.params={video:null,videoStream:null,capture_enable:!1,capture:null,canvas:null,warning:null,flipped:!1},bp.Avatar.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},setView:function(e){if("camera"===e){var a=new bp.Views.WebCamAvatar({model:new Backbone.Model({user_media:!1})});this.params.flipped=!1,bp.Avatar.views.add({id:"camera",view:a}),a.inject(".bp-avatar")}else _.isNull(this.params.video)||(this.stop(),this.removeWarning())},removeView:function(){var e;_.isUndefined(bp.Avatar.views.get("camera"))||((e=bp.Avatar.views.get("camera")).get("view").remove(),bp.Avatar.views.remove({id:"camera",view:e}))},gotStream:function(e){var a=bp.WebCam.params.video;bp.WebCam.params.videoStream=e,bp.WebCam.displayWarning("loaded"),a.onerror=function(){bp.WebCam.displayWarning("videoerror"),a&&bp.WebCam.stop()},e.onended=bp.WebCam.noStream(),"srcObject"in a?a.srcObject=e:a.src=window.URL.createObjectURL(e),a.onloadedmetadata=function(){a.play()},bp.WebCam.params.capture_enable=!0},stop:function(){bp.WebCam.params.capture_enable=!1,bp.WebCam.params.videoStream&&(bp.WebCam.params.videoStream.stop?bp.WebCam.params.videoStream.stop():bp.WebCam.params.videoStream.msStop&&bp.WebCam.params.videoStream.msStop(),bp.WebCam.params.videoStream.onended=null,bp.WebCam.params.videoStream=null),bp.WebCam.params.video&&(bp.WebCam.params.video.onerror=null,bp.WebCam.params.video.pause(),bp.WebCam.params.video.mozSrcObject&&(bp.WebCam.params.video.mozSrcObject=null),bp.WebCam.params.video.src="")},noStream:function(){_.isNull(bp.WebCam.params.videoStream)&&(bp.WebCam.displayWarning("noaccess"),bp.WebCam.removeView())},setAvatar:function(e){e.get("url")||bp.WebCam.displayWarning("nocapture"),bp.WebCam.removeView(),bp.Avatar.setAvatar(e)},removeWarning:function(){_.isNull(this.params.warning)||this.params.warning.remove()},displayWarning:function(e){this.removeWarning(),this.params.warning=new bp.Views.uploaderWarning({value:BP_Uploader.strings.camera_warnings[e]}),this.params.warning.inject(".bp-avatar-status")}},bp.Views.WebCamAvatar=bp.View.extend({tagName:"div",id:"bp-webcam-avatar",template:bp.template("bp-avatar-webcam"),events:{"click .avatar-webcam-capture":"captureStream","click .avatar-webcam-save":"saveCapture"},initialize:function(){var e;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,void 0!==navigator.getUserMedia&&(e=_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),{user_media:!0,w:BP_Uploader.settings.crop.full_w,h:BP_Uploader.settings.crop.full_h,x:0,y:0,type:"camera"}),this.model.set(e)),this.on("ready",this.useStream,this)},useStream:function(){this.model.get("user_media")&&(this.options.video=new bp.Views.WebCamVideo,this.options.canvas=new bp.Views.WebCamCanvas,this.$el.find("#avatar-to-crop").append(this.options.video.el),this.$el.find("#avatar-crop-pane").append(this.options.canvas.el),bp.WebCam.params.video=this.options.video.el,bp.WebCam.params.canvas=this.options.canvas.el,bp.WebCam.displayWarning("requesting"),void 0===navigator.mediaDevices.getUserMedia?navigator.getUserMedia({audio:!1,video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(bp.WebCam.gotStream,bp.WebCam.noStream).catch(function(){bp.WebCam.displayWarning("errormsg")}))},captureStream:function(e){var a,t;e.preventDefault(),bp.WebCam.params.capture_enable?this.model.get("h")>this.options.video.el.videoHeight||this.model.get("w")>this.options.video.el.videoWidth?bp.WebCam.displayWarning("videoerror"):(t=this.options.video.el.videoHeight,a=(this.options.video.el.videoWidth-t)/2,bp.WebCam.params.flipped||(this.options.canvas.el.getContext("2d").translate(this.model.get("w"),0),this.options.canvas.el.getContext("2d").scale(-1,1),bp.WebCam.params.flipped=!0),this.options.canvas.el.getContext("2d").drawImage(this.options.video.el,a,0,t,t,0,0,this.model.get("w"),this.model.get("h")),bp.WebCam.params.capture=this.options.canvas.el.toDataURL("image/png"),this.model.set("url",bp.WebCam.params.capture),bp.WebCam.displayWarning("ready")):bp.WebCam.displayWarning("loading")},saveCapture:function(e){e.preventDefault(),bp.WebCam.params.capture?(bp.WebCam.stop(),bp.WebCam.setAvatar(this.model)):bp.WebCam.displayWarning("nocapture")}}),bp.Views.WebCamVideo=bp.View.extend({tagName:"video",id:"bp-webcam-video",attributes:{autoplay:"autoplay"}}),bp.Views.WebCamCanvas=bp.View.extend({tagName:"canvas",id:"bp-webcam-canvas",attributes:{width:150,height:150},initialize:function(){_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(this.el.attributes.width.value=BP_Uploader.settings.crop.full_w,this.el.attributes.height.value=BP_Uploader.settings.crop.full_h)}}),bp.WebCam.start())}(bp,jQuery);
\ No newline at end of file
window.bp=window.bp||{},bp,jQuery,"undefined"!=typeof BP_Uploader&&(bp.Models=bp.Models||{},bp.Collections=bp.Collections||{},bp.Views=bp.Views||{},bp.WebCam={start:function(){this.params={video:null,videoStream:null,capture_enable:!1,capture:null,canvas:null,warning:null,flipped:!1},bp.Avatar.nav.on("bp-avatar-view:changed",_.bind(this.setView,this))},setView:function(e){if("camera"===e){var a=new bp.Views.WebCamAvatar({model:new Backbone.Model({user_media:!1})});this.params.flipped=!1,bp.Avatar.views.add({id:"camera",view:a}),a.inject(".bp-avatar")}else _.isNull(this.params.video)||(this.stop(),this.removeWarning())},removeView:function(){var e;_.isUndefined(bp.Avatar.views.get("camera"))||((e=bp.Avatar.views.get("camera")).get("view").remove(),bp.Avatar.views.remove({id:"camera",view:e}))},gotStream:function(e){var a=bp.WebCam.params.video;bp.WebCam.params.videoStream=e,bp.WebCam.displayWarning("loaded"),a.onerror=function(){bp.WebCam.displayWarning("videoerror"),a&&bp.WebCam.stop()},e.onended=bp.WebCam.noStream(),"srcObject"in a?a.srcObject=e:a.src=window.URL.createObjectURL(e),a.onloadedmetadata=function(){a.play()},bp.WebCam.params.capture_enable=!0},stop:function(){bp.WebCam.params.capture_enable=!1,bp.WebCam.params.videoStream&&(bp.WebCam.params.videoStream.stop?bp.WebCam.params.videoStream.stop():bp.WebCam.params.videoStream.msStop&&bp.WebCam.params.videoStream.msStop(),bp.WebCam.params.videoStream.onended=null,bp.WebCam.params.videoStream=null),bp.WebCam.params.video&&(bp.WebCam.params.video.onerror=null,bp.WebCam.params.video.pause(),bp.WebCam.params.video.mozSrcObject&&(bp.WebCam.params.video.mozSrcObject=null),bp.WebCam.params.video.src="")},noStream:function(){_.isNull(bp.WebCam.params.videoStream)&&(bp.WebCam.displayWarning("noaccess"),bp.WebCam.removeView())},setAvatar:function(e){e.get("url")||bp.WebCam.displayWarning("nocapture"),bp.WebCam.removeView(),bp.Avatar.setAvatar(e)},removeWarning:function(){_.isNull(this.params.warning)||this.params.warning.remove()},displayWarning:function(e){this.removeWarning(),this.params.warning=new bp.Views.uploaderWarning({value:BP_Uploader.strings.camera_warnings[e]}),this.params.warning.inject(".bp-avatar-status")}},bp.Views.WebCamAvatar=bp.View.extend({tagName:"div",id:"bp-webcam-avatar",template:bp.template("bp-avatar-webcam"),events:{"click .avatar-webcam-capture":"captureStream","click .avatar-webcam-save":"saveCapture"},initialize:function(){var e;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,void 0!==navigator.getUserMedia&&(e=_.extend(_.pick(BP_Uploader.settings.defaults.multipart_params.bp_params,"object","item_id","nonces"),{user_media:!0,w:BP_Uploader.settings.crop.full_w,h:BP_Uploader.settings.crop.full_h,x:0,y:0,type:"camera"}),this.model.set(e)),this.on("ready",this.useStream,this)},useStream:function(){this.model.get("user_media")&&(this.options.video=new bp.Views.WebCamVideo,this.options.canvas=new bp.Views.WebCamCanvas,this.$el.find("#avatar-to-crop").append(this.options.video.el),this.$el.find("#avatar-crop-pane").append(this.options.canvas.el),bp.WebCam.params.video=this.options.video.el,bp.WebCam.params.canvas=this.options.canvas.el,bp.WebCam.displayWarning("requesting"),void 0===navigator.mediaDevices.getUserMedia?navigator.getUserMedia({audio:!1,video:!0},bp.WebCam.gotStream,bp.WebCam.noStream):navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(bp.WebCam.gotStream,bp.WebCam.noStream).catch(function(){bp.WebCam.displayWarning("errormsg")}))},captureStream:function(e){var a,t;e.preventDefault(),bp.WebCam.params.capture_enable?this.model.get("h")>this.options.video.el.videoHeight||this.model.get("w")>this.options.video.el.videoWidth?bp.WebCam.displayWarning("videoerror"):(t=this.options.video.el.videoHeight,a=(this.options.video.el.videoWidth-t)/2,bp.WebCam.params.flipped||(this.options.canvas.el.getContext("2d").translate(this.model.get("w"),0),this.options.canvas.el.getContext("2d").scale(-1,1),bp.WebCam.params.flipped=!0),this.options.canvas.el.getContext("2d").drawImage(this.options.video.el,a,0,t,t,0,0,this.model.get("w"),this.model.get("h")),bp.WebCam.params.capture=this.options.canvas.el.toDataURL("image/png"),this.model.set("url",bp.WebCam.params.capture),bp.WebCam.displayWarning("ready")):bp.WebCam.displayWarning("loading")},saveCapture:function(e){e.preventDefault(),bp.WebCam.params.capture?(bp.WebCam.stop(),bp.WebCam.setAvatar(this.model)):bp.WebCam.displayWarning("nocapture")}}),bp.Views.WebCamVideo=bp.View.extend({tagName:"video",id:"bp-webcam-video",attributes:{autoplay:"autoplay"}}),bp.Views.WebCamCanvas=bp.View.extend({tagName:"canvas",id:"bp-webcam-canvas",attributes:{width:150,height:150},initialize:function(){_.isUndefined(BP_Uploader.settings.crop.full_h)||_.isUndefined(BP_Uploader.settings.crop.full_w)||(this.el.attributes.width.value=BP_Uploader.settings.crop.full_w,this.el.attributes.height.value=BP_Uploader.settings.crop.full_h)}}),bp.WebCam.start());
\ No newline at end of file
......@@ -409,3 +409,15 @@ function bp_friends_delete_activity_on_user_delete( $user_id = 0 ) {
) );
}
add_action( 'friends_remove_data', 'bp_friends_delete_activity_on_user_delete' );
/**
* Remove friendship activity item when a friendship is deleted.
*
* @since 3.2.0
*
* @param int $friendship_id ID of the friendship.
*/
function bp_friends_delete_activity_on_friendship_delete( $friendship_id ) {
friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_created', 'user_id' => 0 ) );
}
add_action( 'friends_friendship_deleted', 'bp_friends_delete_activity_on_friendship_delete' );
......@@ -115,9 +115,6 @@ function friends_remove_friend( $initiator_userid, $friend_userid ) {
*/
do_action( 'friends_before_friendship_delete', $friendship_id, $initiator_userid, $friend_userid );
// Remove the activity stream items about the friendship id.
friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_created', 'user_id' => 0 ) );
/**
* Fires before the friendship connection is removed.
*
......
!function(e){function n(n,o){e("#bp-groups-new-members-list").append('<li data-login="'+o.item.value+'"><a href="#" class="bp-groups-remove-new-member">x</a> '+o.item.label+"</li>")}var o="undefined"!=typeof group_id?"&group_id="+group_id:"";e(document).ready(function(){window.warn_on_leave=!1,e(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+o,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){e(this).addClass("open")},close:function(){e(this).removeClass("open"),e(this).val("")},select:function(e,o){n(e,o)}}),e("#bp-groups-new-members").prop("placeholder",BP_Group_Admin.add_member_placeholder),e("#bp_group_add_members").on("click",".bp-groups-remove-new-member",function(n){n.preventDefault(),e(n.target.parentNode).remove()}),e(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=!0}),e("input#save").on("click",function(){var n=[];e("#bp-groups-new-members-list li").each(function(){n.push(e(this).data("login"))}),n.length&&e("#bp-groups-new-members").val("").val(n.join(", ")),window.warn_on_leave=!1}),window.onbeforeunload=function(){if(window.warn_on_leave)return BP_Group_Admin.warn_on_leave}})}(jQuery);
\ No newline at end of file
!function(e){function n(n,o){e("#bp-groups-new-members-list").append('<li data-login="'+o.item.value+'"><a href="#" class="bp-groups-remove-new-member">x</a> '+o.item.label+"</li>")}var o="undefined"!=typeof group_id?"&group_id="+group_id:"";e(document).ready(function(){window.warn_on_leave=!1,e(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+o,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){e(this).addClass("open")},close:function(){e(this).removeClass("open"),e(this).val("")},select:function(e,o){n(0,o)}}),e("#bp-groups-new-members").prop("placeholder",BP_Group_Admin.add_member_placeholder),e("#bp_group_add_members").on("click",".bp-groups-remove-new-member",function(n){n.preventDefault(),e(n.target.parentNode).remove()}),e(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=!0}),e("input#save").on("click",function(){var n=[];e("#bp-groups-new-members-list li").each(function(){n.push(e(this).data("login"))}),n.length&&e("#bp-groups-new-members").val("").val(n.join(", ")),window.warn_on_leave=!1}),window.onbeforeunload=function(){if(window.warn_on_leave)return BP_Group_Admin.warn_on_leave}})}(jQuery);
\ No newline at end of file
......@@ -15,7 +15,7 @@
* Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
* Author: The BuddyPress Community
* Author URI: https://buddypress.org/
* Version: 3.1.0
* Version: 3.2.0
* Text Domain: buddypress
* Domain Path: /bp-languages/
* License: GPLv2 or later (license.txt)
......
......@@ -52,7 +52,7 @@ function bp_members_admin_bar_my_account_menu() {
// Create the main 'My Account' menu.
$wp_admin_bar->add_menu( array(
'id' => 'bp-login',
'title' => __( 'Log in', 'buddypress' ),
'title' => __( 'Log In', 'buddypress' ),
'href' => wp_login_url( bp_get_requested_url() )
) );
......
......@@ -1511,8 +1511,23 @@ function bp_legacy_theme_ajax_joinleave_group() {
if ( ! $group = groups_get_group( $group_id ) )
return;
if ( ! groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
if ( bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) ) ) {
// Client doesn't distinguish between different request types, so we infer from user status.
if ( groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
$request_type = 'leave_group';
} elseif ( groups_check_user_has_invite( bp_loggedin_user_id(), $group->id ) ) {
$request_type = 'accept_invite';
} elseif ( 'private' === $group->status ) {
$request_type = 'request_membership';
} else {
$request_type = 'join_group';
}
switch ( $request_type ) {
case 'join_group' :
if ( ! bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) ) ) {
esc_html_e( 'Error joining group', 'buddypress' );
}
check_ajax_referer( 'groups_join_group' );
if ( ! groups_join_group( $group->id ) ) {
......@@ -1520,42 +1535,43 @@ function bp_legacy_theme_ajax_joinleave_group() {
} else {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button leave-group" rel="leave" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
}
break;
} elseif ( bp_current_user_can( 'groups_request_membership', array( 'group_id' => $group->id ) ) ) {
// If the user has already been invited, then this is
// an Accept Invitation button.
if ( groups_check_user_has_invite( bp_loggedin_user_id(), $group->id ) ) {
check_ajax_referer( 'groups_accept_invite' );
case 'accept_invite' :
if ( ! bp_current_user_can( 'groups_request_membership', array( 'group_id' => $group->id ) ) ) {
esc_html_e( 'Error accepting invitation', 'buddypress' );
}
if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) {
_e( 'Error requesting membership', 'buddypress' );
} else {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button leave-group" rel="leave" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
}
check_ajax_referer( 'groups_accept_invite' );
// Otherwise, it's a Request Membership button.
if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) {
_e( 'Error requesting membership', 'buddypress' );
} else {
check_ajax_referer( 'groups_request_membership' );
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button leave-group" rel="leave" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
}
break;
if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
_e( 'Error requesting membership', 'buddypress' );
} else {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button disabled pending membership-requested" rel="membership-requested" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Request Sent', 'buddypress' ) . '</a>';
}
case 'request_membership' :
check_ajax_referer( 'groups_request_membership' );
if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
_e( 'Error requesting membership', 'buddypress' );
} else {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button disabled pending membership-requested" rel="membership-requested" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Request Sent', 'buddypress' ) . '</a>';
}
}
break;
} else {
check_ajax_referer( 'groups_leave_group' );
if ( ! groups_leave_group( $group->id ) ) {
_e( 'Error leaving group', 'buddypress' );
} elseif ( bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) ) ) {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button join-group" rel="join" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
} elseif ( bp_current_user_can( 'groups_request_membership', array( 'group_id' => $group->id ) ) ) {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button request-membership" rel="join" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
}
case 'leave_group' :
check_ajax_referer( 'groups_leave_group' );
if ( ! groups_leave_group( $group->id ) ) {
_e( 'Error leaving group', 'buddypress' );
} elseif ( 'public' === $group->status ) {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button join-group" rel="join" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
} else {
echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button request-membership" rel="join" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
}
break;
}
exit;
......
......@@ -3,7 +3,7 @@
This is the BuddyPress companion stylesheet for
the WordPress twentyseventeen theme.
@version 3.0.0
@version 3.2.0
This sheet supports the primary BuddyPress styles in buddypress.css
......@@ -1938,6 +1938,7 @@ body.colors-light #buddypress div#invite-list {
#buddypress div.message-search form,
#buddypress li.groups-members-search form {
border: 1px solid rgba(190, 190, 190, 0.6);
position: relative;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
......
......@@ -3,7 +3,7 @@
This is the BuddyPress companion stylesheet for
the WordPress twentyseventeen theme.
@version 3.0.0
@version 3.2.0
This sheet supports the primary BuddyPress styles in buddypress.css
......@@ -1938,6 +1938,7 @@ body.colors-light #buddypress div#invite-list {
#buddypress div.message-search form,
#buddypress li.groups-members-search form {
border: 1px solid rgba(190, 190, 190, 0.6);
position: relative;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
......
......@@ -242,7 +242,7 @@ $link-action: #c82b2b;
This is the BuddyPress companion stylesheet for
the WordPress twentyseventeen theme.
@version 3.0.0
@version 3.2.0
This sheet supports the primary BuddyPress styles in buddypress.css
......@@ -2860,6 +2860,7 @@ body.colors-light {
form { // *sigh* only to bludgeon over specified rules
border: 1px solid rgba($border-color, 0.6);
position: relative;
@include border-radius(2px);
overflow: hidden;
......
......@@ -11,6 +11,8 @@ var newest_activities = '';
var activity_last_recorded = 0;
jq(document).ready( function() {
var activity_oldestpage = 1;
/**** Page Load Actions *******************************************************/
/* Activity filter and scope set */
......@@ -257,12 +259,6 @@ jq(document).ready( function() {
return false;
}
/* Reset the page */
jq.cookie( 'bp-activity-oldestpage', 1, {
path: '/',
secure: ( 'https:' === window.location.protocol )
} );
/* Activity Stream Tabs */
scope = target.attr('id').substr( 9, target.attr('id').length );
filter = jq('#activity-filter-select select').val();
......@@ -438,14 +434,7 @@ jq(document).ready( function() {
jq('#buddypress li.load-more').addClass('loading');
if ( ! jq.cookie('bp-activity-oldestpage') ) {
jq.cookie('bp-activity-oldestpage', 1, {
path: '/',
secure: ( 'https:' === window.location.protocol )
} );
}
oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
oldest_page = activity_oldestpage + 1;
just_posted = [];
jq('.activity-list li.just-posted').each( function(){
......@@ -469,10 +458,7 @@ jq(document).ready( function() {
function(response)
{
jq('#buddypress li.load-more').removeClass('loading');
jq.cookie( 'bp-activity-oldestpage', oldest_page, {
path: '/',
secure: ( 'https:' === window.location.protocol )
} );
activity_oldestpage = oldest_page;
jq('#buddypress ul.activity-list').append(response.contents);
target.parent().hide();
......@@ -1857,10 +1843,6 @@ function bp_activity_request(scope, filter) {
secure: ( 'https:' === window.location.protocol )
} );
}
jq.cookie( 'bp-activity-oldestpage', 1, {
path: '/',
secure: ( 'https:' === window.location.protocol )
} );
/* Remove selected and loading classes from tabs */
jq('.item-list-tabs li').each( function() {
......
......@@ -409,18 +409,9 @@ class BP_Nouveau extends BP_Theme_Compat {
public function localize_scripts() {
$params = array(
'ajaxurl' => bp_core_ajax_url(),
'accepted' => __( 'Accepted', 'buddypress' ),
'close' => __( 'Close', 'buddypress' ),
'comments' => __( 'comments', 'buddypress' ),
'leave_group_confirm' => __( 'Are you sure you want to leave this group?', 'buddypress' ),
'confirm' => __( 'Are you sure?', 'buddypress' ),
'my_favs' => __( 'My Favorites', 'buddypress' ),
'rejected' => __( 'Rejected', 'buddypress' ),
'show_all' => __( 'Show all', 'buddypress' ),
'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
'show_x_comments' => __( 'Show all %d comments', 'buddypress' ),
'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ),
'view' => __( 'View', 'buddypress' ),
'object_nav_parent' => '#buddypress',
);
......
......@@ -93,16 +93,7 @@
<script type="text/html" id="tmpl-bp-messages-filters">
<li class="user-messages-search" role="search" data-bp-search="{{data.box}}">
<div class="bp-search messages-search">
<form action="" method="get" id="user_messages_search_form" class="bp-messages-search-form" data-bp-search="messages">
<label for="user_messages_search" class="bp-screen-reader-text">
<?php _e( 'Search Messages', 'buddypress' ); ?>
</label>
<input type="search" id="user_messages_search" placeholder="<?php echo esc_attr_x( 'Search', 'search placeholder text', 'buddypress' ); ?>"/>
<button type="submit" id="user_messages_search_submit">
<span class="dashicons dashicons-search" aria-hidden="true"></span>
<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span>
</button>
</form>
<?php bp_nouveau_message_search_form(); ?>
</div>
</li>
<li class="user-messages-bulk-actions"></li>
......
<?php
/**
* BP Nouveau Messages search form template.
*
* @since 3.2.0
* @version 3.2.0
*/
?>
<form action="" method="get" id="user_messages_search_form" class="bp-messages-search-form" data-bp-search="messages">
<label for="user_messages_search" class="bp-screen-reader-text">
<?php _e( 'Search Messages', 'buddypress' ); ?>
</label>
<input type="search" id="user_messages_search" placeholder="<?php echo esc_attr_x( 'Search', 'search placeholder text', 'buddypress' ); ?>"/>
<button type="submit" id="user_messages_search_submit">
<span class="dashicons dashicons-search" aria-hidden="true"></span>
<span class="bp-screen-reader-text"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span>
</button>
</form>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment