Ticket #5208: create-minified-scripts.patch
File create-minified-scripts.patch, 6.3 KB (added by , 11 years ago) |
---|
-
new file src/bp-core/js/confirm.min.js
diff --git src/bp-core/js/confirm.min.js src/bp-core/js/confirm.min.js new file mode 100644 index 0000000..bd0af34
- + 1 /* jshint devel: true *//* global BP_Confirm */jQuery(document).ready(function(){jQuery("a.confirm").click(function(){return confirm(BP_Confirm.are_you_sure)?!0:!1})}); 2 No newline at end of file -
new file src/bp-core/js/jquery-cookie.min.js
diff --git src/bp-core/js/jquery-cookie.min.js src/bp-core/js/jquery-cookie.min.js new file mode 100644 index 0000000..a2f599b
- + 1 /* jshint undef: false *//*! 2 * jQuery Cookie Plugin v1.4.1 3 * https://github.com/carhartl/jquery-cookie 4 * 5 * Copyright 2013 Klaus Hartl 6 * Released under the MIT license 7 */(function(e){typeof define=="function"&&define.amd?define(["jquery"],e):typeof exports=="object"?e(require("jquery")):e(jQuery)})(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{e=decodeURIComponent(e.replace(t," "));return u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={};e.removeCookie=function(t,n){if(e.cookie(t)===undefined)return!1;e.cookie(t,"",e.extend({},n,{expires:-1}));return!e.cookie(t)}}); 8 No newline at end of file -
new file src/bp-core/js/jquery-query.min.js
diff --git src/bp-core/js/jquery-query.min.js src/bp-core/js/jquery-query.min.js new file mode 100644 index 0000000..cb76723
- + 1 /* jshint unused: false */function bp_get_querystring(e){var t=location.search.split(e+"=")[1];return t?decodeURIComponent(t.split("&")[0]):null}; 2 No newline at end of file -
new file src/bp-core/js/jquery-scroll-to.min.js
diff --git src/bp-core/js/jquery-scroll-to.min.js src/bp-core/js/jquery-scroll-to.min.js new file mode 100644 index 0000000..a42be78
- + 1 /* jshint undef: false *//* jshint -W065 *//*! 2 * jQuery.ScrollTo 3 * Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 4 * Licensed under MIT 5 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 6 * @projectDescription Easy element scrolling using jQuery. 7 * @author Ariel Flesler 8 * @version 1.4.12 9 */(function(e){typeof define=="function"&&define.amd?define(["jquery"],e):typeof exports=="object"?e(require("jquery")):e(jQuery)})(function(e){function n(t){return e.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=e.scrollTo=function(t,n,r){return e(window).scrollTo(t,n,r)};t.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0};t.window=function(){return e(window)._scrollable()};e.fn._scrollable=function(){return this.map(function(){var t=this,n=!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!==-1;if(!n)return t;var r=(t.contentWindow||t).document||t.ownerDocument||t;return/webkit/i.test(navigator.userAgent)||r.compatMode==="BackCompat"?r.body:r.documentElement})};e.fn.scrollTo=function(r,i,s){if(typeof i=="object"){s=i;i=0}typeof s=="function"&&(s={onAfter:s});r==="max"&&(r=9e9);s=e.extend({},t.defaults,s);i=i||s.duration;s.queue=s.queue&&s.axis.length>1;s.queue&&(i/=2);s.offset=n(s.offset);s.over=n(s.over);return this._scrollable().each(function(){function p(e){u.animate(l,i,s.easing,e&&function(){e.call(this,a,s)})}if(r===null)return;var o=this,u=e(o),a=r,f,l={},c=u.is("html,body");switch(typeof a){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(a)){a=n(a);break}a=c?e(a):e(a,this);if(!a.length)return;case"object":if(a.is||a.style)f=(a=e(a)).offset()}var h=e.isFunction(s.offset)&&s.offset(o,a)||s.offset;e.each(s.axis.split(""),function(e,n){var r=n==="x"?"Left":"Top",i=r.toLowerCase(),d="scroll"+r,v=o[d],m=t.max(o,n);if(f){l[d]=f[i]+(c?0:v-u.offset()[i]);if(s.margin){l[d]-=parseInt(a.css("margin"+r))||0;l[d]-=parseInt(a.css("border"+r+"Width"))||0}l[d]+=h[i]||0;s.over[i]&&(l[d]+=a[n==="x"?"width":"height"]()*s.over[i])}else{var g=a[i];l[d]=g.slice&&g.slice(-1)==="%"?parseFloat(g)/100*m:g}s.limit&&/^\d+$/.test(l[d])&&(l[d]=l[d]<=0?0:Math.min(l[d],m));if(!e&&s.queue){v!==l[d]&&p(s.onAfterFirst);delete l[d]}});p(s.onAfter)}).end()};t.max=function(t,n){var r=n==="x"?"Width":"Height",i="scroll"+r;if(!e(t).is("html,body"))return t[i]-e(t)[r.toLowerCase()]();var s="client"+r,o=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(o[i],u[i])-Math.min(o[s],u[s])};return t}); 10 No newline at end of file -
new file src/bp-core/js/widget-members.min.js
diff --git src/bp-core/js/widget-members.min.js src/bp-core/js/widget-members.min.js new file mode 100644 index 0000000..54b9bf3
- + 1 function member_wiget_response(e){e=e.substr(0,e.length-1);e=e.split("[[SPLIT]]");e[0]!=="-1"?jQuery(".widget ul#members-list").fadeOut(200,function(){jQuery(".widget ul#members-list").html(e[1]);jQuery(".widget ul#members-list").fadeIn(200)}):jQuery(".widget ul#members-list").fadeOut(200,function(){var t="<p>"+e[1]+"</p>";jQuery(".widget ul#members-list").html(t);jQuery(".widget ul#members-list").fadeIn(200)})}jQuery(document).ready(function(){jQuery(".widget div#members-list-options a").on("click",function(){var e=this;jQuery(e).addClass("loading");jQuery(".widget div#members-list-options a").removeClass("selected");jQuery(this).addClass("selected");jQuery.post(ajaxurl,{action:"widget_members",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce-members").val(),"max-members":jQuery("input#members_widget_max").val(),filter:jQuery(this).attr("id")},function(t){jQuery(e).removeClass("loading");member_wiget_response(t)});return!1})}); 2 No newline at end of file