diff --git a/core/js/dist/main.js b/core/js/dist/main.js index 41846f2795..1fa5e33fdc 100644 --- a/core/js/dist/main.js +++ b/core/js/dist/main.js @@ -826,7 +826,7 @@ function Te(e){return e.toString().split("&").join("&").split("<").join("< * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -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 * @@ -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 . - */,"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 * @@ -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 . */ -var Ee=i(491);u.a.fn.contactsMenu=function(e,n,i){if(-1!==[0,4,6].indexOf(n)){var r=this;i.append('');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('');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 * @@ -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 . */ -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()('
').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()('

'+t+"

");this.$title=i.prependTo(this.$dialog)}this._setSizes();break;case"buttons":if(this.$buttonrow)this.$buttonrow.empty();else{var r=u()('
');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()("