server/core/js/dist/share_backend.js

24 lines
129 KiB
JavaScript
Raw Normal View History

!function(e){var a={};function n(t){if(a[t])return a[t].exports;var l=a[t]={i:t,l:!1,exports:{}};return e[t].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=a,n.d=function(e,a,t){n.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var l in e)n.d(t,l,function(a){return e[a]}.bind(null,l));return t},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="",n(n.s=0)}([function(e,a,n){"use strict";n.r(a);n(1),n(2),n(3),n(4),n(5),n(6),n(7),n(8),n(9)},function(e,a){!function(){OC.Share||(OC.Share={},OC.Share.Types={});var e=OC.Backbone.Model.extend({defaults:{publicUploadEnabled:!1,enforcePasswordForPublicLink:OC.appConfig.core.enforcePasswordForPublicLink,enableLinkPasswordByDefault:OC.appConfig.core.enableLinkPasswordByDefault,isDefaultExpireDateEnforced:!0===OC.appConfig.core.defaultExpireDateEnforced,isDefaultExpireDateEnabled:!0===OC.appConfig.core.defaultExpireDateEnabled,isRemoteShareAllowed:OC.appConfig.core.remoteShareAllowed,isMailShareAllowed:void 0!==OC.appConfig.shareByMailEnabled,defaultExpireDate:OC.appConfig.core.defaultExpireDate,isResharingAllowed:OC.appConfig.core.resharingAllowed,isPasswordForMailSharesRequired:void 0!==OC.appConfig.shareByMail&&OC.appConfig.shareByMail.enforcePasswordProtection,allowGroupSharing:OC.appConfig.core.allowGroupSharing},isPublicUploadEnabled:function(){return"yes"===$("#filestable").data("allow-public-upload")},isShareWithLinkAllowed:function(){return"yes"===$("#allowShareWithLink").val()},getFederatedShareDocLink:function(){return OC.appConfig.core.federatedCloudShareDoc},getDefaultExpirationDateString:function(){var e="";if(this.get("isDefaultExpireDateEnabled")){var a=moment.utc(),n=this.get("defaultExpireDate");a.add(n,"days"),e=a.format("YYYY-MM-DD 00:00:00")}return e}});OC.Share.ShareConfigModel=e}()},function(e,a){function n(e){return(n="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)}var t,l;t=Handlebars.template,(l=OC.Share.Templates=OC.Share.Templates||{}).sharedialoglinkshareview=t({1:function(e,a,n,t,l){var i,s=null!=a?a:e.nullContext||{};return'<ul class="shareWithList">\n'+(null!=(i=n.if.call(s,null!=a?a.nolinkShares:a,{name:"if",hash:{},fn:e.program(2,l,0),inverse:e.noop,data:l,loc:{start:{line:3,column:1},end:{line:17,column:8}}}))?i:"")+(null!=(i=n.each.call(s,null!=a?a.linkShares:a,{name:"each",hash:{},fn:e.program(7,l,0),inverse:e.noop,data:l,loc:{start:{line:18,column:1},end:{line:36,column:10}}}))?i:"")+"</ul>\n"},2:function(e,a,t,l,i){var s,o,r=null!=a?a:e.nullContext||{},c=e.hooks.helperMissing,d=e.escapeExpression;return'\t\t<li data-share-id="'+d("function"===n(o=null!=(o=t.newShareId||(null!=a?a.newShareId:a))?o:c)?o.call(r,{name:"newShareId",hash:{},data:i,loc:{start:{line:4,column:21},end:{line:4,column:35}}}):o)+'">\n\t\t\t<div class="avatar icon-public-white"></div>\n\t\t\t<span class="username">'+d("function"===n(o=null!=(o=t.newShareLabel||(null!=a?a.newShareLabel:a))?o:c)?o.call(r,{name:"newShareLabel",hash:{},data:i,loc:{start:{line:6,column:26},end:{line:6,column:43}}}):o)+'</span>\n\t\t\t<span class="sharingOptionsGroup">\n\t\t\t\t<div class="share-menu">\n\t\t\t\t\t<a href="#" class="icon icon-add new-share has-tooltip '+(null!=(s=t.if.call(r,null!=a?a.showPending:a,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i,loc:{start:{line:9,column:60},end:{line:9,column:92}}}))?s:"")+'" title="'+d("function"===n(o=null!=(o=t.newShareTitle||(null!=a?
/**
* @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
*/
!function(){OC.Share||(OC.Share={}),OC.Share.Social={};var e=OC.Backbone.Model.extend({defaults:{key:null,url:null,name:null,iconClass:null,newWindow:!0}});OC.Share.Social.Model=e;var a=OC.Backbone.Collection.extend({model:OC.Share.Social.Model,comparator:"key"});OC.Share.Social.Collection=new a}()},function(e,a){!function(){OC.Share||(OC.Share={});var e=OC.Backbone.View.extend({id:"shareDialogResharerInfo",tagName:"div",className:"reshare",configModel:void 0,_template:void 0,initialize:function(e){var a=this;if(this.model.on("change:reshare",function(){a.render()}),_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel},render:function(){if(!this.model.hasReshare()||this.model.getReshareOwner()===OC.currentUser)return this.$el.empty(),this;var e=this.template(),a=this.model.getReshareOwnerDisplayname(),n=this.model.getReshareNote(),l="";return l=this.model.getReshareType()===OC.Share.SHARE_TYPE_GROUP?t("core","Shared with you and the group {group} by {owner}",{group:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):this.model.getReshareType()===OC.Share.SHARE_TYPE_CIRCLE?t("core","Shared with you and {circle} by {owner}",{circle:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):this.model.getReshareType()===OC.Share.SHARE_TYPE_ROOM?this.model.get("reshare").share_with_displayname?t("core","Shared with you and the conversation {conversation} by {owner}",{conversation:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):t("core","Shared with you in a conversation by {owner}",{owner:a},void 0,{escape:!1}):t("core","Shared with you by {owner}",{owner:a},void 0,{escape:!1}),this.$el.html(e({reshareOwner:this.model.getReshareOwner(),sharedByText:l,shareNote:n,hasShareNote:""!==n})),this.$el.find(".avatar").each(function(){var e=$(this);e.avatar(e.data("username"),32)}),this.$el.find(".reshare").contactsMenu(this.model.getReshareOwner(),OC.Share.SHARE_TYPE_USER,this.$el),this},template:function(){return OC.Share.Templates.sharedialogresharerinfoview}});OC.Share.ShareDialogResharerInfoView=e}()},function(e,a){!function(){OC.Share||(OC.Share={});var e=t("core","Choose a password for the public link"),a=t("core",'Choose a password for the public link or press the "Enter" key'),n=OC.Backbone.View.extend({id:"shareDialogLinkShare",configModel:void 0,showLink:!0,showPending:!1,hasPasswordChanged:!1,password:"",newShareId:"new-share",events:{"click .share-menu .icon-more":"onToggleMenu","change .hideDownloadCheckbox":"onHideDownloadChange","click input.share-pass-submit":"onPasswordEntered","keyup input.linkPassText":"onPasswordKeyUp","change .showPasswordCheckbox":"onShowPasswordClick","change .passwordByTalkCheckbox":"onPasswordByTalkChange","change .publicEditingCheckbox":"onAllowPublicEditingChange","click .linkText":"onLinkTextClick","click .pop-up":"onPopUpClick","change .publicUploadRadio":"onPublicUploadChange","click .expireDate":"onExpireDateChange","change .datepicker":"onChangeExpirationDate","click .datepicker":"showDatePicker","click .share-add":"showNoteForm","click .share-note-delete":"deleteNote","click .share-note-submit":"updateNote","click .unshare":"onUnshare","click .new-share":"newShare","submit .enforcedPassForm":"enforcedPasswordSet"},initialize:function(e){var a=this;if(this.model.on("change:permissions",function(){a.render()}),this.model.on("change:itemType",function(){a.render()}),this.model.on("change:allowPublicUploadStatus",function(){a.render()}),this.model.on("change:hideFileListStatus",function(){a.render()}),this.model.on("change:linkShares",function(e,n){var t,l=e.previous("linkShares");if(l.length===n.length)for(t=0;t<n.length;t++){if(n[t].id!==l[t].id)return;if(n[t].password!==l[t].password)return void a.render()}}),_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel;var n=new Clipboard(".clipboard-button");n.on("success",function(e){var a=$(e.trigger);a.tooltip("hide").attr("data-original-title",t("core","Copied!")).tooltip("fixTitle").tooltip({placem
//# sourceMappingURL=share_backend.js.map