Do not show deprecation warnings during test runs

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2019-05-09 18:09:06 +02:00
parent 3007c7a19c
commit 3cda6237ef
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
3 changed files with 17 additions and 11 deletions

14
core/js/dist/main.js vendored
View File

@ -826,7 +826,7 @@ function Te(e){return e.toString().split("&").join("&amp;").split("<").join("&lt
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Se=function(e,t){var n=e,i=function(){return console.warn("The ".concat(t," library is deprecated! It will be removed in nextcloud 19.")),n.apply(this,arguments)};return Object.assign(i,n),i},Ce=function(e,t,n){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return n?console.warn("".concat(e," is deprecated: ").concat(n)):console.warn("".concat(e," is deprecated")),t}})};window._=l.a,window.$=u.a,window.autosize=h.a,window.Backbone=f.a,window.Clipboard=g.a,window.ClipboardJS=g.a,window.cssVars=G,window.dav=X.a,window.DOMPurify=$.a,window.Handlebars=te.a,window.jstimezonedetect=ie.a,window.jstz=ie.a,window.jQuery=u.a,window.marked=Se(se.a,"marked"),window.md5=ae.a,window.moment=ce.a,window.OC=ue.a,Ce("oc_appswebroots",ue.a.appswebroots,"use OC.appswebroots instead"),Ce("oc_config",ue.a.config,"use OC.config instead"),Ce("oc_current_user",ue.a.getCurrentUser().uid,"use OC.getCurrentUser().uid instead"),Ce("oc_debug",ue.a.debug,"use OC.debug instead"),Ce("oc_isadmin",ue.a.isUserAdmin(),"use OC.isUserAdmin() instead"),Ce("oc_webroot",ue.a.webroot,"use OC.getRootPath() instead"),Ce("OCDialogs",ue.a.dialogs,"use OC.dialogs instead"),window.OCP=Le,window.OCA=De.a,window.escapeHTML=Se(Te,"escapeHTML"),window.formatDate=Se(function(e){return console.warn("formatDate is deprecated, use OC.Util.formatDate instead"),ue.a.Util.formatDate(e)}
var Se=function(){void 0===window.TESTING&&console.warn.apply(console,arguments)},Ce=function(e,t){var n=e,i=function(){return Se("The ".concat(t," library is deprecated! It will be removed in nextcloud 19.")),n.apply(this,arguments)};return Object.assign(i,n),i},Ee=function(e,t,n){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return Se(n?"".concat(e," is deprecated: ").concat(n):"".concat(e," is deprecated")),t}})};window._=l.a,window.$=u.a,window.autosize=h.a,window.Backbone=f.a,window.Clipboard=g.a,window.ClipboardJS=g.a,window.cssVars=G,window.dav=X.a,window.DOMPurify=$.a,window.Handlebars=te.a,window.jstimezonedetect=ie.a,window.jstz=ie.a,window.jQuery=u.a,window.marked=Ce(se.a,"marked"),window.md5=ae.a,window.moment=ce.a,window.OC=ue.a,Ee("oc_appswebroots",ue.a.appswebroots,"use OC.appswebroots instead"),Ee("oc_config",ue.a.config,"use OC.config instead"),Ee("oc_current_user",ue.a.getCurrentUser().uid,"use OC.getCurrentUser().uid instead"),Ee("oc_debug",ue.a.debug,"use OC.debug instead"),Ee("oc_isadmin",ue.a.isUserAdmin(),"use OC.isUserAdmin() instead"),Ee("oc_webroot",ue.a.webroot,"use OC.getRootPath() instead"),Ee("OCDialogs",ue.a.dialogs,"use OC.dialogs instead"),window.OCP=Le,window.OCA=De.a,window.escapeHTML=Ce(Te,"escapeHTML"),window.formatDate=Ce(function(e){return console.warn("formatDate is deprecated, use OC.Util.formatDate instead"),ue.a.Util.formatDate(e)}
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -846,7 +846,7 @@ var Se=function(e,t){var n=e,i=function(){return console.warn("The ".concat(t,"
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/,"formatDate"),window.getURLParameter=Se(function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||""},"getURLParameter"),window.humanFileSize=Se(Ye.a,"humanFileSize"),window.relative_modified_date=Se(function(e){return console.warn("relative_modified_date is deprecated, use OC.Util.relativeModifiedDate instead"),ue.a.Util.relativeModifiedDate(1e3*e)},"relative_modified_date"),u.a.fn.select2=Se(u.a.fn.select2,"select2"),window.t=l.a.bind(ue.a.L10N.translate,ue.a.L10N),window.n=l.a.bind(ue.a.L10N.translatePlural,ue.a.L10N),
*/,"formatDate"),window.getURLParameter=Ce(function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||""},"getURLParameter"),window.humanFileSize=Ce(Ye.a,"humanFileSize"),window.relative_modified_date=Ce(function(e){return console.warn("relative_modified_date is deprecated, use OC.Util.relativeModifiedDate instead"),ue.a.Util.relativeModifiedDate(1e3*e)},"relative_modified_date"),u.a.fn.select2=Ce(u.a.fn.select2,"select2"),window.t=l.a.bind(ue.a.L10N.translate,ue.a.L10N),window.n=l.a.bind(ue.a.L10N.translatePlural,ue.a.L10N),
/*
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -888,7 +888,7 @@ u.a.fn.avatar=function(e,t,n,i,r,s){var o=function(e){e.imageplaceholder("?"),e.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Ee=i(491);u.a.fn.contactsMenu=function(e,n,i){if(-1!==[0,4,6].indexOf(n)){var r=this;i.append('<div class="menu popovermenu menu-left hidden contactsmenu-popover"> <ul> <li> <a> <span class="icon-loading-small"></span> </a> </li> </ul></div>');var s=i.find("div.contactsmenu-popover");r.click(function(){if(!s.hasClass("hidden"))return s.addClass("hidden"),void s.hide();s.removeClass("hidden"),s.show(),s.hasClass("loaded")||(s.addClass("loaded"),u.a.ajax(ue.a.generateUrl("/contactsmenu/findOne"),{method:"POST",data:{shareType:n,shareWith:e}}).then(function(e){var n;s.find("ul").find("li").addClass("hidden"),(n=e.topAction?[e.topAction].concat(e.actions):[{hyperlink:"#",title:t("core","No action available")}]).forEach(function(e){var t=Ee;s.find("ul").append(t(e))}),n.length},function(e){var n;s.find("ul").find("li").addClass("hidden"),n=404===e.status?t("core","No action available"):t("core","Error fetching contact actions");var i=Ee;s.find("ul").append(i({hyperlink:"#",title:n}))}))}),u()(document).click(function(e){var t=s.has(e.target).length>0,n=r.has(e.target).length>0;r.each(function(){u()(this).is(e.target)&&(n=!0)}),t||n||(s.addClass("hidden"),s.hide())})}},
var He=i(491);u.a.fn.contactsMenu=function(e,n,i){if(-1!==[0,4,6].indexOf(n)){var r=this;i.append('<div class="menu popovermenu menu-left hidden contactsmenu-popover"> <ul> <li> <a> <span class="icon-loading-small"></span> </a> </li> </ul></div>');var s=i.find("div.contactsmenu-popover");r.click(function(){if(!s.hasClass("hidden"))return s.addClass("hidden"),void s.hide();s.removeClass("hidden"),s.show(),s.hasClass("loaded")||(s.addClass("loaded"),u.a.ajax(ue.a.generateUrl("/contactsmenu/findOne"),{method:"POST",data:{shareType:n,shareWith:e}}).then(function(e){var n;s.find("ul").find("li").addClass("hidden"),(n=e.topAction?[e.topAction].concat(e.actions):[{hyperlink:"#",title:t("core","No action available")}]).forEach(function(e){var t=He;s.find("ul").append(t(e))}),n.length},function(e){var n;s.find("ul").find("li").addClass("hidden"),n=404===e.status?t("core","No action available"):t("core","Error fetching contact actions");var i=He;s.find("ul").append(i({hyperlink:"#",title:n}))}))}),u()(document).click(function(e){var t=s.has(e.target).length>0,n=r.has(e.target).length>0;r.each(function(){u()(this).is(e.target)&&(n=!0)}),t||n||(s.addClass("hidden"),s.hide())})}},
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -951,7 +951,7 @@ u.a.fn.filterAttr=function(e,t){return this.filter(function(){return u()(this).a
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
u.a.widget("oc.ocdialog",{options:{width:"auto",height:"auto",closeButton:!0,closeOnEscape:!0,modal:!1},_create:function(){var e=this;this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,height:this.element[0].style.height},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this.$dialog=u()('<div class="oc-dialog" />').attr({tabIndex:-1,role:"dialog"}).insertBefore(this.element),this.$dialog.append(this.element.detach()),this.element.removeAttr("title").addClass("oc-dialog-content").appendTo(this.$dialog),this.$dialog.css({display:"inline-block",position:"fixed"}),this.enterCallback=null,u()(document).on("keydown keyup",function(t){if(t.target===e.$dialog.get(0)||0!==e.$dialog.find(u()(t.target)).length){if(27===t.keyCode&&"keydown"===t.type&&e.options.closeOnEscape)return t.stopImmediatePropagation(),e.close(),!1;if(13===t.keyCode){if(t.stopImmediatePropagation(),null!==e.enterCallback)return e.enterCallback(),t.preventDefault(),!1;if("keyup"===t.type)return t.preventDefault(),!1;if(e.$buttonrow&&0===e.$buttonrow.find(u()(t.target)).length){var n=e.$buttonrow.find("button.primary");n&&!n.prop("disabled")&&n.trigger("click")}else e.$buttonrow&&u()(t.target).trigger("click");return!1}}}),this._setOptions(this.options),this._createOverlay()},_init:function(){this.$dialog.focus(),this._trigger("open")},_setOption:function(e,t){var n=this;switch(e){case"title":if(this.$title)this.$title.text(t);else{var i=u()('<h2 class="oc-dialog-title">'+t+"</h2>");this.$title=i.prependTo(this.$dialog)}this._setSizes();break;case"buttons":if(this.$buttonrow)this.$buttonrow.empty();else{var r=u()('<div class="oc-dialog-buttonrow" />');this.$buttonrow=r.appendTo(this.$dialog)}1===t.length?this.$buttonrow.addClass("onebutton"):2===t.length?this.$buttonrow.addClass("twobuttons"):3===t.length&&this.$buttonrow.addClass("threebuttons"),u.a.each(t,function(e,t){var i=u()("<button>").text(t.text);t.classes&&i.addClass(t.classes),t.defaultButton&&(i.addClass("primary"),n.$defaultButton=i),n.$buttonrow.append(i),i.click(function(){t.click.apply(n.element[0],arguments)})}),this.$buttonrow.find("button").on("focus",function(e){n.$buttonrow.find("button").removeClass("primary"),u()(this).addClass("primary")}),this._setSizes();break;case"style":void 0!==t.buttons&&this.$buttonrow.addClass(t.buttons);break;case"closeButton":if(t){var s=u()('<a class="oc-dialog-close"></a>');this.$dialog.prepend(s),s.on("click",function(){n.close()})}else this.$dialog.find(".oc-dialog-close").remove();break;case"width":this.$dialog.css("width",t);break;case"height":this.$dialog.css("height",t);break;case"close":this.closeCB=t}u.a.Widget.prototype._setOption.apply(this,arguments)},_setOptions:function(e){u.a.Widget.prototype._setOptions.apply(this,arguments)},_setSizes:function(){var e=0;this.$title&&(e+=this.$title.outerHeight(!0)),this.$buttonrow&&(e+=this.$buttonrow.outerHeight(!0)),this.element.css({height:"calc(100% - "+e+"px)"})},_createOverlay:function(){if(this.options.modal){var e=this;this.overlay=u()("<div>").addClass("oc-dialog-dim").appendTo(u()("#content")),this.overlay.on("click keydown keyup",function(t){if(t.target!==e.$dialog.get(0)&&0===e.$dialog.find(u()(t.target)).length)return t.preventDefault(),void t.stopPropagation()})}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(this.overlay.off("click keydown keyup"),this.overlay.remove(),this.overlay=null)},widget:function(){return this.$dialog},setEnterCallback:function(e){this.enterCallback=e},unsetEnterCallback:function(){this.enterCallback=null},close:function(){this._destroyOverlay();var e=this;setTimeout(function(){e._trigger("close",e)},200),e.$dialog.remove(),this.destroy()},destroy:function(){this.$title&&this.$title.remove(),this.$buttonrow&&this.$buttonrow.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),this.element.removeClass("oc-dialog-content").css(this.originalCss).detach().insertBefore(this.$dialog),this.$dialog.remove()}});var He={init:function(e,t,n){this.vars=e,this.options=u.a.extend({},this.options,t),this.elem=n;if("function"==typeof this.options.escapeFunction)for(var i=Object.keys(this.vars),r=0;r<i.length;r++)"string"==typeof this.vars[i[r]]&&(this.vars[i[r]]=this.options.escapeFunction(this.vars[i[r]]));var s=this._build(this.vars);return u()(s)},_build:function(e){var t="text/template"===this.elem.attr("type")?this.elem.html():this.elem.get(0).outerHTML;try{return t.replace(/{([^{}]*)}/g,function(t,n){var i=e[n];return"string"==typeof i||"number"==typeof i?i:t})}catch(e){console.error(e,"data:",t)}},options:{escapeFunction:Te}};function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
u.a.widget("oc.ocdialog",{options:{width:"auto",height:"auto",closeButton:!0,closeOnEscape:!0,modal:!1},_create:function(){var e=this;this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,height:this.element[0].style.height},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this.$dialog=u()('<div class="oc-dialog" />').attr({tabIndex:-1,role:"dialog"}).insertBefore(this.element),this.$dialog.append(this.element.detach()),this.element.removeAttr("title").addClass("oc-dialog-content").appendTo(this.$dialog),this.$dialog.css({display:"inline-block",position:"fixed"}),this.enterCallback=null,u()(document).on("keydown keyup",function(t){if(t.target===e.$dialog.get(0)||0!==e.$dialog.find(u()(t.target)).length){if(27===t.keyCode&&"keydown"===t.type&&e.options.closeOnEscape)return t.stopImmediatePropagation(),e.close(),!1;if(13===t.keyCode){if(t.stopImmediatePropagation(),null!==e.enterCallback)return e.enterCallback(),t.preventDefault(),!1;if("keyup"===t.type)return t.preventDefault(),!1;if(e.$buttonrow&&0===e.$buttonrow.find(u()(t.target)).length){var n=e.$buttonrow.find("button.primary");n&&!n.prop("disabled")&&n.trigger("click")}else e.$buttonrow&&u()(t.target).trigger("click");return!1}}}),this._setOptions(this.options),this._createOverlay()},_init:function(){this.$dialog.focus(),this._trigger("open")},_setOption:function(e,t){var n=this;switch(e){case"title":if(this.$title)this.$title.text(t);else{var i=u()('<h2 class="oc-dialog-title">'+t+"</h2>");this.$title=i.prependTo(this.$dialog)}this._setSizes();break;case"buttons":if(this.$buttonrow)this.$buttonrow.empty();else{var r=u()('<div class="oc-dialog-buttonrow" />');this.$buttonrow=r.appendTo(this.$dialog)}1===t.length?this.$buttonrow.addClass("onebutton"):2===t.length?this.$buttonrow.addClass("twobuttons"):3===t.length&&this.$buttonrow.addClass("threebuttons"),u.a.each(t,function(e,t){var i=u()("<button>").text(t.text);t.classes&&i.addClass(t.classes),t.defaultButton&&(i.addClass("primary"),n.$defaultButton=i),n.$buttonrow.append(i),i.click(function(){t.click.apply(n.element[0],arguments)})}),this.$buttonrow.find("button").on("focus",function(e){n.$buttonrow.find("button").removeClass("primary"),u()(this).addClass("primary")}),this._setSizes();break;case"style":void 0!==t.buttons&&this.$buttonrow.addClass(t.buttons);break;case"closeButton":if(t){var s=u()('<a class="oc-dialog-close"></a>');this.$dialog.prepend(s),s.on("click",function(){n.close()})}else this.$dialog.find(".oc-dialog-close").remove();break;case"width":this.$dialog.css("width",t);break;case"height":this.$dialog.css("height",t);break;case"close":this.closeCB=t}u.a.Widget.prototype._setOption.apply(this,arguments)},_setOptions:function(e){u.a.Widget.prototype._setOptions.apply(this,arguments)},_setSizes:function(){var e=0;this.$title&&(e+=this.$title.outerHeight(!0)),this.$buttonrow&&(e+=this.$buttonrow.outerHeight(!0)),this.element.css({height:"calc(100% - "+e+"px)"})},_createOverlay:function(){if(this.options.modal){var e=this;this.overlay=u()("<div>").addClass("oc-dialog-dim").appendTo(u()("#content")),this.overlay.on("click keydown keyup",function(t){if(t.target!==e.$dialog.get(0)&&0===e.$dialog.find(u()(t.target)).length)return t.preventDefault(),void t.stopPropagation()})}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(this.overlay.off("click keydown keyup"),this.overlay.remove(),this.overlay=null)},widget:function(){return this.$dialog},setEnterCallback:function(e){this.enterCallback=e},unsetEnterCallback:function(){this.enterCallback=null},close:function(){this._destroyOverlay();var e=this;setTimeout(function(){e._trigger("close",e)},200),e.$dialog.remove(),this.destroy()},destroy:function(){this.$title&&this.$title.remove(),this.$buttonrow&&this.$buttonrow.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),this.element.removeClass("oc-dialog-content").css(this.originalCss).detach().insertBefore(this.$dialog),this.$dialog.remove()}});var Pe={init:function(e,t,n){this.vars=e,this.options=u.a.extend({},this.options,t),this.elem=n;if("function"==typeof this.options.escapeFunction)for(var i=Object.keys(this.vars),r=0;r<i.length;r++)"string"==typeof this.vars[i[r]]&&(this.vars[i[r]]=this.options.escapeFunction(this.vars[i[r]]));var s=this._build(this.vars);return u()(s)},_build:function(e){var t="text/template"===this.elem.attr("type")?this.elem.html():this.elem.get(0).outerHTML;try{return t.replace(/{([^{}]*)}/g,function(t,n){var i=e[n];return"string"==typeof i||"number"==typeof i?i:t})}catch(e){console.error(e,"data:",t)}},options:{escapeFunction:Te}};function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -971,7 +971,7 @@ u.a.widget("oc.ocdialog",{options:{width:"auto",height:"auto",closeButton:!0,clo
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/u.a.fn.octemplate=function(e,t){if(e=e||{},this.length)return Object.create(He).init(e,t,this)},String.prototype.toRgb=function(){var e=this.toLowerCase();function t(e,t,n){this.r=e,this.g=t,this.b=n}function n(e,n,i){var r=new Array;r.push(n);for(var s=function(e,t){var n=new Array(3);return n[0]=(t[1].r-t[0].r)/e,n[1]=(t[1].g-t[0].g)/e,n[2]=(t[1].b-t[0].b)/e,n}(e,[n,i]),o=1;o<e;o++){var a=parseInt(n.r+s[0]*o),l=parseInt(n.g+s[1]*o),c=parseInt(n.b+s[2]*o);r.push(new t(a,l,c))}return r}null===e.match(/^([0-9a-f]{4}-?){8}$/)&&(e=md5(e)),e=e.replace(/[^0-9a-f]/g,"");var i=new t(182,70,157),r=new t(221,203,85),s=new t(0,130,201),o=n(6,i,r),a=n(6,r,s),l=n(6,s,i);return o.concat(a).concat(l)[function(e,t){for(var n=0,i=Array(),r=0;r<e.length;r++)i.push(parseInt(e.charAt(r),16)%16);for(var s in i)n+=i[s];return parseInt(parseInt(n)%t)}(e,18)]},u.a.fn.imageplaceholder=function(e,t,n){t=t||e;var i=e.toRgb();this.css("background-color","rgb("+i.r+", "+i.g+", "+i.b+")");var r=this.height()||n||32;this.height(r),this.width(r),this.css("color","#fff"),this.css("font-weight","normal"),this.css("text-align","center"),this.css("line-height",r+"px"),this.css("font-size",.55*r+"px"),null!==e&&e.length&&this.html(t[0].toUpperCase())},u.a.fn.clearimageplaceholder=function(){this.css("background-color",""),this.css("color",""),this.css("font-weight",""),this.css("text-align",""),this.css("line-height",""),this.css("font-size",""),this.html(""),this.removeClass("icon-loading"),this.removeClass("icon-loading-small")},
*/u.a.fn.octemplate=function(e,t){if(e=e||{},this.length)return Object.create(Pe).init(e,t,this)},String.prototype.toRgb=function(){var e=this.toLowerCase();function t(e,t,n){this.r=e,this.g=t,this.b=n}function n(e,n,i){var r=new Array;r.push(n);for(var s=function(e,t){var n=new Array(3);return n[0]=(t[1].r-t[0].r)/e,n[1]=(t[1].g-t[0].g)/e,n[2]=(t[1].b-t[0].b)/e,n}(e,[n,i]),o=1;o<e;o++){var a=parseInt(n.r+s[0]*o),l=parseInt(n.g+s[1]*o),c=parseInt(n.b+s[2]*o);r.push(new t(a,l,c))}return r}null===e.match(/^([0-9a-f]{4}-?){8}$/)&&(e=md5(e)),e=e.replace(/[^0-9a-f]/g,"");var i=new t(182,70,157),r=new t(221,203,85),s=new t(0,130,201),o=n(6,i,r),a=n(6,r,s),l=n(6,s,i);return o.concat(a).concat(l)[function(e,t){for(var n=0,i=Array(),r=0;r<e.length;r++)i.push(parseInt(e.charAt(r),16)%16);for(var s in i)n+=i[s];return parseInt(parseInt(n)%t)}(e,18)]},u.a.fn.imageplaceholder=function(e,t,n){t=t||e;var i=e.toRgb();this.css("background-color","rgb("+i.r+", "+i.g+", "+i.b+")");var r=this.height()||n||32;this.height(r),this.width(r),this.css("color","#fff"),this.css("font-weight","normal"),this.css("text-align","center"),this.css("line-height",r+"px"),this.css("font-size",.55*r+"px"),null!==e&&e.length&&this.html(t[0].toUpperCase())},u.a.fn.clearimageplaceholder=function(){this.css("background-color",""),this.css("color",""),this.css("font-weight",""),this.css("text-align",""),this.css("line-height",""),this.css("font-size",""),this.html(""),this.removeClass("icon-loading"),this.removeClass("icon-loading-small")},
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -1013,7 +1013,7 @@ u.a.fn.selectRange=function(e,t){return this.each(function(){if(this.setSelectio
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
u.a.fn.extend({showPassword:function(e){var t={fn:null,args:{}};t.fn=e;var n=function(e,t){t.val(e.val())},i=function(e,t,i){e.is(":checked")?(n(t,i),i.show(),t.hide()):(n(i,t),i.hide(),t.show())};return this.each(function(){var e=u()(this),r=u()(e.data("typetoggle")),s=function(e){var t=u()(e),n=u()("<input />");return n.attr({type:"text",class:t.attr("class"),style:t.attr("style"),size:t.attr("size"),name:t.attr("name")+"-clone",tabindex:t.attr("tabindex"),autocomplete:"off"}),void 0!==t.attr("placeholder")&&n.attr("placeholder",t.attr("placeholder")),n}(e);s.insertAfter(e),t.fn&&(t.args.input=e,t.args.checkbox=r,t.args.clone=s),r.bind("click",function(){i(r,e,s)}),e.bind("keyup",function(){n(e,s)}),s.bind("keyup",function(){n(s,e),e.trigger("keyup")}),s.bind("blur",function(){e.trigger("focusout")}),i(r,e,s),s.closest("form").submit(function(e){s.prop("type","password")}),t.fn&&t.fn(t.args)})}}),u.a.fn.tipsy=function(e){if(console.warn("Deprecation warning: tipsy is deprecated. Use tooltip instead."),"object"===Pe(e)&&null!==e){var t={placement:"bottom",delay:{show:0,hide:0},trigger:"hover",html:!1,container:"body"};if(e.gravity)switch(e.gravity){case"n":case"nw":case"ne":t.placement="bottom";break;case"s":case"sw":case"se":t.placement="top";break;case"w":t.placement="right";break;case"e":t.placement="left"}e.trigger&&(t.trigger=e.trigger),e.delayIn&&(t.delay.show=e.delayIn),e.delayOut&&(t.delay.hide=e.delayOut),e.html&&(t.html=!0),e.fallback&&(t.title=e.fallback),u.a.fn.tooltip.call(this,"destroy"),u.a.fn.tooltip.call(this,t)}else this.tooltip(e),u.a.fn.tooltip.call(this,e);return this},u.a.ui.autocomplete.prototype._resizeMenu=function(){this.menu.element.outerWidth(this.element.outerWidth())};i(492),i(499);var Oe=i(50);
u.a.fn.extend({showPassword:function(e){var t={fn:null,args:{}};t.fn=e;var n=function(e,t){t.val(e.val())},i=function(e,t,i){e.is(":checked")?(n(t,i),i.show(),t.hide()):(n(i,t),i.hide(),t.show())};return this.each(function(){var e=u()(this),r=u()(e.data("typetoggle")),s=function(e){var t=u()(e),n=u()("<input />");return n.attr({type:"text",class:t.attr("class"),style:t.attr("style"),size:t.attr("size"),name:t.attr("name")+"-clone",tabindex:t.attr("tabindex"),autocomplete:"off"}),void 0!==t.attr("placeholder")&&n.attr("placeholder",t.attr("placeholder")),n}(e);s.insertAfter(e),t.fn&&(t.args.input=e,t.args.checkbox=r,t.args.clone=s),r.bind("click",function(){i(r,e,s)}),e.bind("keyup",function(){n(e,s)}),s.bind("keyup",function(){n(s,e),e.trigger("keyup")}),s.bind("blur",function(){e.trigger("focusout")}),i(r,e,s),s.closest("form").submit(function(e){s.prop("type","password")}),t.fn&&t.fn(t.args)})}}),u.a.fn.tipsy=function(e){if(console.warn("Deprecation warning: tipsy is deprecated. Use tooltip instead."),"object"===Oe(e)&&null!==e){var t={placement:"bottom",delay:{show:0,hide:0},trigger:"hover",html:!1,container:"body"};if(e.gravity)switch(e.gravity){case"n":case"nw":case"ne":t.placement="bottom";break;case"s":case"sw":case"se":t.placement="top";break;case"w":t.placement="right";break;case"e":t.placement="left"}e.trigger&&(t.trigger=e.trigger),e.delayIn&&(t.delay.show=e.delayIn),e.delayOut&&(t.delay.hide=e.delayOut),e.html&&(t.html=!0),e.fallback&&(t.title=e.fallback),u.a.fn.tooltip.call(this,"destroy"),u.a.fn.tooltip.call(this,t)}else this.tooltip(e),u.a.fn.tooltip.call(this,e);return this},u.a.ui.autocomplete.prototype._resizeMenu=function(){this.menu.element.outerWidth(this.element.outerWidth())};i(492),i(499);var Ie=i(50);
/*
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@ -1034,5 +1034,5 @@ u.a.fn.extend({showPassword:function(e){var t={fn:null,args:{}};t.fn=e;var n=fun
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
u()(document).ready(function(){Object(Oe.b)()})}]);
u()(document).ready(function(){Object(Ie.b)()})}]);
//# sourceMappingURL=main.js.map

File diff suppressed because one or more lines are too long

View File

@ -21,6 +21,12 @@
import appswebroots from "./OC/appswebroots";
const warnIfNotTesting = function() {
if (window.TESTING === undefined) {
console.warn.apply(console, arguments)
}
}
/**
*
* @param {Function} func the library to deprecate
@ -29,7 +35,7 @@ import appswebroots from "./OC/appswebroots";
const deprecate = (func, funcName) => {
const oldFunc = func
const newFunc = function() {
console.warn(`The ${funcName} library is deprecated! It will be removed in nextcloud 19.`)
warnIfNotTesting(`The ${funcName} library is deprecated! It will be removed in nextcloud 19.`)
return oldFunc.apply(this, arguments)
}
Object.assign(newFunc, oldFunc)
@ -43,9 +49,9 @@ const setDeprecatedProp = (global, val, msg) => {
Object.defineProperty(window, global, {
get: () => {
if (msg) {
console.warn(`${global} is deprecated: ${msg}`)
warnIfNotTesting(`${global} is deprecated: ${msg}`)
} else {
console.warn(`${global} is deprecated`)
warnIfNotTesting(`${global} is deprecated`)
}
return val
}