Welcome to mirror list, hosted at ThFree Co, Russian Federation.

app.min.js « js - github.com/nextcloud/ocsms.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8cd4466a72d152dd96c46a736d6158f6b8720d2 (plain)
1
var Sms={selectedConversation:null,unreadCountCurrentConv:0,unreadCountNotifStep:12,lastContactListMsgDate:0,originalTitle:document.title,photoVersion:1,_winRegexp:/(.*)\/ocsms.*/,generateURL:function(e){var t=this._winRegexp.exec(window.location.href);return 2!==t.length&&console.log("A very bad error happened when parsing window location"),t[1]+"/ocsms"+e},selectConversation:function(e){"undefined"!==e&&null!=e&&(null!=this.selectedConversation&&this.selectedConversation.parent().removeClass("selected"),this.selectedConversation=e,this.selectedConversation.parent().addClass("selected"),this.selectedConversation.css("font-weight","normal"),this.selectedConversation.html(this.selectedConversation.attr("mailbox-label")))}},ContactRenderer={generateColor:function(e){if(void 0===e)return"";if("function"==typeof e.toHsl){var t=e.toHsl();return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}var n=md5(e).substring(0,4),o=parseInt("ffff",16);return"hsl("+parseInt(n,16)/o*256+", 90%, 65%)"},generateFirstCharacter:function(e){return"string"!=typeof e?"?":"+"===e.charAt(0)?"#":e.charAt(0)}};$.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.href);return null==t?null:t[1]||0},Vue.filter("firstCharacter",ContactRenderer.generateFirstCharacter);const Dialog=Vue.extend({template:"#modal-template"});Vue.directive("confirm",{bind(e,t,n){const o=t.value[1],r=t.value[0];e.handleClick=(e=>{const t={doYes:function(){o(),t.show=!1},show:!0,bodyMessage:r};let n=new Dialog({data:t}).$mount();document.getElementById("app").appendChild(n.$el)}),e.addEventListener("click",e.handleClick)},unbind(e){e.removeEventListener("click",e.handleClick)}}),jQuery,OC,window.onfocus=function(){Sms.unreadCountCurrentConv=0,document.title=Sms.originalTitle};