protected void Page_Load(object sender, EventArgs e) { Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.meseditorcontainer.js")); Page.RegisterInlineScript("ASC.TMTalk.meseditorContainer.init('talkTextareaContainer', '" + GetMeseditorStyle() + "');"); cfg = new TalkConfiguration(); talkHistoryButton.Visible = cfg.EnabledHistory; talkMassendButton.Visible = cfg.EnabledMassend; talkConferenceButton.Visible = cfg.EnabledConferences; }
protected void Page_Load(object sender, EventArgs e) { Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.meseditorcontainer", WebPath.GetPath("addons/talk/js/talk.meseditorcontainer.js")); cfg = new TalkConfiguration(); talkHistoryButton.Visible = cfg.EnabledHistory; talkMassendButton.Visible = cfg.EnabledMassend; talkConferenceButton.Visible = cfg.EnabledConferences; }
private string GetJidServerPartOfJid() { var config = new TalkConfiguration(); string tenantDomain = CoreContext.TenantManager.GetCurrentTenant().TenantDomain; if (config.ReplaceDomain && tenantDomain != null && tenantDomain.EndsWith(config.ReplaceToDomain)) { int place = tenantDomain.LastIndexOf(config.ReplaceToDomain); if (place >= 0) { return(tenantDomain.Remove(place, config.ReplaceToDomain.Length).Insert(place, config.ReplaceFromDomain)); } } return(tenantDomain); }
protected override IEnumerable <KeyValuePair <string, object> > GetClientVariables(HttpContext context) { var config = new TalkConfiguration(); return(new List <KeyValuePair <string, object> >(2) { RegisterObject(new { Icons = new { addonIcon16 = WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID), addonIcon32 = WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID), addonIcon48 = WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID), addonIcon128 = WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID), iconNewMessage = WebImageSupplier.GetAbsoluteWebPath("icon-new-message.ico", TalkAddon.AddonID) } }), RegisterObject(new { Config = new { validSymbols = config.ValidSymbols ?? "", historyLength = config.HistoryLength ?? "", boshUri = config.BoshUri, jabberAccount = GetJabberAccount(), resourcePriority = config.ResourcePriority, clientInactivity = config.ClientInactivity, addonID = TalkAddon.AddonID, enabledMassend = config.EnabledMassend.ToString().ToLower(), enabledConferences = config.EnabledConferences.ToString().ToLower(), requestTransportType = config.RequestTransportType ?? string.Empty, fileTransportType = config.FileTransportType ?? string.Empty, maxUploadSize = SetupInfo.MaxImageUploadSize, sounds = WebPath.GetPath("/addons/talk/swf/sounds.swf"), soundsHtml = new List <string>() { WebPath.GetPath("/addons/talk/swf/startupsound.mp3"), WebPath.GetPath("/addons/talk/swf/incmsgsound.mp3"), WebPath.GetPath("/addons/talk/swf/letupsound.mp3"), WebPath.GetPath("/addons/talk/swf/sndmsgsound.mp3"), WebPath.GetPath("/addons/talk/swf/statussound.mp3") }, fullText = FactoryIndexer <JabberWrapper> .CanSearchByContent() } }) }); }