Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.overview.css"));

            Title = HeaderStringHelper.GetPageTitle(TalkResource.ProductName);
            Master.DisabledSidePanel = true;

            cfg = new TalkConfiguration();
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.overview.css"));

            Title = HeaderStringHelper.GetPageTitle(TalkResource.ProductName);
            Master.DisabledSidePanel = true;

            cfg = new TalkConfiguration();
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.RegisterStyle("~/addons/talk/css/default/talk.overview.css");

            Title = HeaderStringHelper.GetPageTitle(TalkResource.ProductName);
            Master.DisabledSidePanel = true;

            cfg = new TalkConfiguration();

            HelpLink = CommonLinkUtility.GetHelpLink();
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var isEnabledTalk = ConfigurationManagerExtension.AppSettings["web.talk"] ?? "false";

            if (isEnabledTalk != "true")
            {
                Response.Redirect(CommonLinkUtility.GetDefault());
            }

            Page.RegisterStyle("~/addons/talk/css/default/talk.overview.css");

            Title = HeaderStringHelper.GetPageTitle(TalkResource.ProductName);
            Master.DisabledSidePanel = true;

            cfg = new TalkConfiguration();

            HelpLink = CommonLinkUtility.GetHelpLink();
        }
Esempio n. 5
0
		protected void Page_Load(object sender, EventArgs e)
		{
      //верхняя навигационная панель
      var topNavPanel = (TopNavigationPanel)LoadControl(TopNavigationPanel.Location);

      topNavPanel.CustomTitle = Resources.TalkResource.ProductName;
      topNavPanel.CustomTitleURL = VirtualPathUtility.ToAbsolute("~/addons/talk/default.aspx");
      topNavPanel.CustomTitleIconURL = WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID);
      topNavPanel.DisableSearch = true;

      _topNavigatorPlaceHolder.Controls.Add(topNavPanel);

      //нижняя панель
      BottomNavigator bottomNavigator = new BottomNavigator();
      _bottomNavigatorPlaceHolder.Controls.Add(bottomNavigator);

      Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.overview", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.overview.css") + "\" />", false);

			Title = HeaderStringHelper.GetPageTitle(Resources.TalkResource.ProductName, null, null);
			((IStudioMaster)this.Master).DisabledSidePanel = true;

			cfg = new TalkConfiguration();
		}
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //верхняя навигационная панель
            var topNavPanel = (TopNavigationPanel)LoadControl(TopNavigationPanel.Location);

            topNavPanel.CustomTitle        = Resources.TalkResource.ProductName;
            topNavPanel.CustomTitleURL     = VirtualPathUtility.ToAbsolute("~/addons/talk/default.aspx");
            topNavPanel.CustomTitleIconURL = WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID);
            topNavPanel.DisableSearch      = true;

            _topNavigatorPlaceHolder.Controls.Add(topNavPanel);

            //нижняя панель
            BottomNavigator bottomNavigator = new BottomNavigator();

            _bottomNavigatorPlaceHolder.Controls.Add(bottomNavigator);

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.overview", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.overview.css") + "\" />", false);

            Title = HeaderStringHelper.GetPageTitle(Resources.TalkResource.ProductName, null, null);
            ((IStudioMaster)this.Master).DisabledSidePanel = true;

            cfg = new TalkConfiguration();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _cfg = new TalkConfiguration();

            Utility.RegisterTypeForAjax(GetType());

            Master.DisabledSidePanel      = true;
            Master.DisabledTopStudioPanel = true;
            Page.RegisterBodyScripts("~/addons/talk/js/gears.init.js");
            Page.RegisterBodyScripts("~/addons/talk/js/gears.init.js");
            Page.RegisterBodyScripts("~/addons/talk/js/iscroll.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.customevents.js");
            Page.RegisterBodyScripts("~/js/third-party/jquery/jquery.notification.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.common.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.navigationitem.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.msmanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.mucmanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.roomsmanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.contactsmanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.messagesmanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.connectiomanager.js");
            Page.RegisterBodyScripts("~/addons/talk/js/talk.default.js");

            Page.RegisterStyle("~/addons/talk/css/default/talk.style.css");
            var virtPath = "~/addons/talk/css/default/talk.style." + CultureInfo.CurrentCulture.Name.ToLower() + ".css";

            if (File.Exists(Server.MapPath(virtPath)))
            {
                Page.RegisterStyle(virtPath);
            }
            Page.RegisterStyle("~/addons/talk/css/default/talk.text-overflow.css");


            switch (_cfg.RequestTransportType.ToLower())
            {
            case "flash":
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/plugins/strophe.flxhr.js");

                Page.RegisterBodyScripts("~/addons/talk/js/jlib/flxhr/checkplayer.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/flxhr/flensed.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/flxhr/flxhr.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/flxhr/swfobject.js");

                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/base64.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/md5.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/core.js");

                break;

            default:
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/base64.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/md5.js");
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/strophe/core.js");

                Page.RegisterBodyScripts("~/addons/talk/js/jlib/flxhr/swfobject.js");
                break;
            }

            var jsResources = new StringBuilder();

            jsResources.Append("window.ASC=window.ASC||{};");
            jsResources.Append("window.ASC.TMTalk=window.ASC.TMTalk||{};");
            jsResources.Append("window.ASC.TMTalk.Resources={};");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles={}" + ';');
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.offline='" + EscapeJsString(TalkResource.StatusOffline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.online='" + EscapeJsString(TalkResource.StatusOnline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.away='" + EscapeJsString(TalkResource.StatusAway) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.xa='" + EscapeJsString(TalkResource.StatusNA) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon16='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon48='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon128='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconNewMessage='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("icon-new-message.ico", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconTeamlabOffice32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("icon-teamlab-office32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.productName='" + EscapeJsString(TalkResource.ProductName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.updateFlashPlayerUrl='" + EscapeJsString(TalkResource.UpdateFlashPlayerUrl) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.selectUserBookmarkTitle='" + EscapeJsString(TalkResource.SelectUserBookmarkTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.defaultConferenceSubjectTemplate='" + EscapeJsString(TalkResource.DefaultConferenceSubjectTemplate) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelNewMessage='" + EscapeJsString(TalkResource.LabelNewMessage) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelRecvInvite='" + EscapeJsString(TalkResource.LabelRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.titleRecvInvite='" + EscapeJsString(TalkResource.TitleRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientConnecting='" + EscapeJsString(TalkResource.HintClientConnecting) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientDisconnected='" + EscapeJsString(TalkResource.HintClientDisconnected) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintEmotions='" + EscapeJsString(TalkResource.HintEmotions) + "',");
            jsResources.Append("window.ASC.TMTalk.Resources.hintFlastPlayerIncorrect='" + EscapeJsString(TalkResource.HintFlastPlayerIncorrect) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintGroups='" + EscapeJsString(TalkResource.HintGroups) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintNoFlashPlayer='" + EscapeJsString(TalkResource.HintNoFlashPlayer) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintOfflineContacts='" + EscapeJsString(TalkResource.HintOfflineContacts) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSounds='" + EscapeJsString(TalkResource.HintSounds) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintUpdateHrefText='" + EscapeJsString(TalkResource.HintUpdateHrefText) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSelectContact='" + EscapeJsString(TalkResource.HintSelectContact) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendInvite='" + EscapeJsString(TalkResource.HintSendInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintPossibleClientConflict='" + EscapeJsString(TalkResource.HintPossibleClientConflict) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintCreateShortcutDialog='" + EscapeJsString(TalkResource.HintCreateShortcutDialog) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.sendFileMessage='" + EscapeJsString(string.Format(TalkResource.SendFileMessage, "{0}<br/>", "{1}")) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.mailingsGroupName='" + EscapeJsString(TalkResource.MailingsGroupName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.conferenceGroupName='" + EscapeJsString(TalkResource.ConferenceGroupName) + "';");

            Page.RegisterInlineScript(jsResources.ToString(), true, false);

            jsResources = new StringBuilder();

            jsResources.Append("TMTalk.init();");
            jsResources.Append("ASC.TMTalk.properties.init(\"2.0\");");
            jsResources.Append("ASC.TMTalk.iconManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.notifications.init(\"{0}\", \"{1}\");", GetUserPhotoHandlerPath(), GetNotificationHandlerPath());
            jsResources.AppendFormat("ASC.TMTalk.msManager.init(\"{0}\");", GetValidSymbols());
            jsResources.AppendFormat("ASC.TMTalk.mucManager.init(\"{0}\");", GetValidSymbols());
            jsResources.Append("ASC.TMTalk.roomsManager.init();");
            jsResources.Append("ASC.TMTalk.contactsManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.messagesManager.init(\"{0}\", \"{1}\", \"{2}\", \"{3}\");", GetShortDateFormat(), GetFullDateFormat(), GetMonthNames(), GetHistoryLength());
            jsResources.AppendFormat("ASC.TMTalk.connectionManager.init(\"{0}\", \"{1}\", \"{2}\", \"{3}\");", GetBoshUri(), GetJabberAccount(), GetResourcePriority(), GetInactivity());
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"addonID\", \"{0}\");", TalkAddon.AddonID);
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"enabledMassend\", \"{0}\");", GetMassendState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"enabledConferences\", \"{0}\");", GetConferenceState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"requestTransportType\", \"{0}\");", GetRequestTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"fileTransportType\", \"{0}\");", GetFileTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"maxUploadSize\",\"{0}\");", SetupInfo.MaxImageUploadSize);
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"maxUploadSizeError\", \"{0}\");", FileSizeComment.FileImageSizeExceptionString);
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"sounds\", \"{0}\");", WebPath.GetPath("/addons/talk/swf/sounds.swf"));
            jsResources.AppendFormat("ASC.TMTalk.properties.item(\"expressInstall\", \"{0}\");", WebPath.GetPath("/addons/talk/swf/expressinstall.swf"));

            Page.RegisterInlineScript(jsResources.ToString(), onReady: false);

            try
            {
                Page.Title = TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName();
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(TalkResource.DefaultContactTitle);
            }
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _cfg = new TalkConfiguration();

            Utility.RegisterTypeForAjax(GetType());

            Master.DisabledSidePanel      = true;
            Master.DisabledTopStudioPanel = true;

            Page
            .RegisterBodyScripts("~/addons/talk/js/gears.init.js",
                                 "~/addons/talk/js/gears.init.js",
                                 "~/addons/talk/js/iscroll.js",
                                 "~/addons/talk/js/talk.customevents.js",
                                 "~/js/third-party/jquery/jquery.notification.js",
                                 "~/js/third-party/moment.min.js",
                                 "~/js/third-party/moment-timezone.min.js",
                                 "~/js/third-party/firebase.js",
                                 "~/js/third-party/firebase-app.js",
                                 "~/js/third-party/firebase-auth.js",
                                 "~/js/third-party/firebase-database.js",
                                 "~/js/third-party/firebase-messaging.js",
                                 "~/addons/talk/js/talk.common.js",
                                 "~/addons/talk/js/talk.navigationitem.js",
                                 "~/addons/talk/js/talk.msmanager.js",
                                 "~/addons/talk/js/talk.mucmanager.js",
                                 "~/addons/talk/js/talk.roomsmanager.js",
                                 "~/addons/talk/js/talk.contactsmanager.js",
                                 "~/addons/talk/js/talk.messagesmanager.js",
                                 "~/addons/talk/js/talk.connectiomanager.js",
                                 "~/addons/talk/js/talk.default.js",
                                 "~/addons/talk/js/talk.init.js")
            .RegisterStyle("~/addons/talk/css/default/talk.style.css");

            var virtPath = "~/addons/talk/css/default/talk.style." + CultureInfo.CurrentCulture.Name.ToLower() + ".css";

            if (File.Exists(Server.MapPath(virtPath)))
            {
                Page.RegisterStyle(virtPath);
            }
            Page.RegisterStyle("~/addons/talk/css/default/talk.text-overflow.css");


            switch (_cfg.RequestTransportType.ToLower())
            {
            case "flash":
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/plugins/strophe.flxhr.js",

                                         "~/addons/talk/js/jlib/flxhr/checkplayer.js",
                                         "~/addons/talk/js/jlib/flxhr/flensed.js",
                                         "~/addons/talk/js/jlib/flxhr/flxhr.js",
                                         "~/addons/talk/js/jlib/flxhr/swfobject.js",

                                         "~/addons/talk/js/jlib/strophe/base64.js",
                                         "~/addons/talk/js/jlib/strophe/md5.js",
                                         "~/addons/talk/js/jlib/strophe/core.js");

                break;

            default:
                Page.RegisterBodyScripts(
                    "~/addons/talk/js/jlib/strophe/base64.js",
                    "~/addons/talk/js/jlib/strophe/md5.js",
                    "~/addons/talk/js/jlib/strophe/core.js",

                    "~/addons/talk/js/jlib/flxhr/swfobject.js");
                break;
            }

            Master.AddClientScript(new TalkClientScript(), new TalkClientScriptLocalization());

            try
            {
                Page.Title = TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName(false);
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(TalkResource.DefaultContactTitle);
            }
            try
            {
                Page.RegisterInlineScript("ASC.TMTalk.notifications.initialiseFirebase(" + GetFirebaseConfig() + ");");
            }
            catch (Exception) {}
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cfg = new TalkConfiguration();

            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());

            ((IStudioMaster)this.Master).DisabledSidePanel = true;

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "gears.init", WebPath.GetPath("addons/talk/js/gears.init.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "iscroll", WebPath.GetPath("addons/talk/js/iscroll.js"));
            if (cfg.EnabledFirebugLite)
            {
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "firebug.lite", "https://getfirebug.com/firebug-lite.js");
            }

            var culture = CultureInfo.CurrentCulture;

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.style.css") + "\" />", false);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.location-style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.style" + "." + culture.Name.ToLower() + ".css") + "\" />", false);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.text-overflow", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + VirtualPathUtility.ToAbsolute("~/addons/talk/css/" + WebSkin.DefaultSkin.FolderName + "/talk.text-overflow.css") + "\" />", false);

            StringBuilder jsResources = new StringBuilder();

            jsResources.Append("window.ASC=window.ASC||{};");
            jsResources.Append("window.ASC.TMTalk=window.ASC.TMTalk||{};");
            jsResources.Append("window.ASC.TMTalk.Resources={};");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles={}" + ';');
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.offline='" + EscapeJsString(Talk.Resources.TalkResource.StatusOffline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.online='" + EscapeJsString(Talk.Resources.TalkResource.StatusOnline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.away='" + EscapeJsString(Talk.Resources.TalkResource.StatusAway) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.xa='" + EscapeJsString(Talk.Resources.TalkResource.StatusNA) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon16='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon48='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon128='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconNewMessage='" + EscapeJsString(WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/imagescss/icon-new-message.ico")) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.productName='" + EscapeJsString(Talk.Resources.TalkResource.ProductName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.updateFlashPlayerUrl='" + EscapeJsString(Talk.Resources.TalkResource.UpdateFlashPlayerUrl) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.selectUserBookmarkTitle='" + EscapeJsString(Talk.Resources.TalkResource.SelectUserBookmarkTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.defaultConferenceSubjectTemplate='" + EscapeJsString(Talk.Resources.TalkResource.DefaultConferenceSubjectTemplate) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelNewMessage='" + EscapeJsString(Talk.Resources.TalkResource.LabelNewMessage) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelRecvInvite='" + EscapeJsString(Talk.Resources.TalkResource.LabelRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.titleRecvInvite='" + EscapeJsString(Talk.Resources.TalkResource.TitleRecvInvite) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintChangeState='" + EscapeJsString(Talk.Resources.TalkResource.HintChangeState) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientConnecting='" + EscapeJsString(Talk.Resources.TalkResource.HintClientConnecting) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientDisconnected='" + EscapeJsString(Talk.Resources.TalkResource.HintClientDisconnected) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintCtrlEnterSender='" + EscapeJsString(Talk.Resources.TalkResource.HintCtrlEnterSender) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintDisableSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintDisableSounds) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintEmotions='" + EscapeJsString(Talk.Resources.TalkResource.HintEmotions) + "',");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintEnableSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintEnableSounds) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintEnterSender='" + EscapeJsString(Talk.Resources.TalkResource.HintEnterSender) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintFlastPlayerIncorrect='" + EscapeJsString(Talk.Resources.TalkResource.HintFlastPlayerIncorrect) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintHideGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintHideGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintHideOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintHideOfflineContacts) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintNoFlashPlayer='" + EscapeJsString(Talk.Resources.TalkResource.HintNoFlashPlayer) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintOfflineContacts) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintSendAddition='" + EscapeJsString(Talk.Resources.TalkResource.HintSendAddition) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendFile='" + EscapeJsString(Talk.Resources.TalkResource.HintSendFile) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintSendMessage='" + EscapeJsString(Talk.Resources.TalkResource.HintSendMessage) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintShowGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowLeftTab='" + EscapeJsString(Talk.Resources.TalkResource.HintShowLeftTab) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintShowOfflineContacts) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowRightTab='" + EscapeJsString(Talk.Resources.TalkResource.HintShowRightTab) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintSounds) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintToggleSender='" + EscapeJsString(Talk.Resources.TalkResource.HintToggleSender) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintUpdateHrefText='" + EscapeJsString(Talk.Resources.TalkResource.HintUpdateHrefText) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSelectContact='" + EscapeJsString(Talk.Resources.TalkResource.HintSelectContact) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendInvite='" + EscapeJsString(Talk.Resources.TalkResource.HintSendInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintPossibleClientConflict='" + EscapeJsString(Talk.Resources.TalkResource.HintPossibleClientConflict) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintCreateShortcutDialog='" + EscapeJsString(Talk.Resources.TalkResource.HintCreateShortcutDialog) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.sendFileMessage='" + EscapeJsString(string.Format(Talk.Resources.TalkResource.SendFileMessage, "{0}<br/>", "{1}")) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.noneGroupTitle='" + EscapeJsString(Talk.Resources.TalkResource.NoneGroupTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.mailingsGroupName='" + EscapeJsString(Talk.Resources.TalkResource.MailingsGroupName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.conferenceGroupName='" + EscapeJsString(Talk.Resources.TalkResource.ConferenceGroupName) + "';");
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.resources", jsResources.ToString(), true);

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.customevents", WebPath.GetPath("addons/talk/js/talk.customevents.js"));

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.common", WebPath.GetPath("addons/talk/js/talk.common.js"));

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.navigationitem", WebPath.GetPath("addons/talk/js/talk.navigationitem.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.msmanager", WebPath.GetPath("addons/talk/js/talk.msmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.mucmanager", WebPath.GetPath("addons/talk/js/talk.mucmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.roomsmanager", WebPath.GetPath("addons/talk/js/talk.roomsmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.contactsmanager", WebPath.GetPath("addons/talk/js/talk.contactsmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.messagesmanager", WebPath.GetPath("addons/talk/js/talk.messagesmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.connectionmanager", WebPath.GetPath("addons/talk/js/talk.connectiomanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.default", WebPath.GetPath("addons/talk/js/talk.default.js"));

            switch (cfg.RequestTransportType.ToLower())
            {
            case "flash":
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.checkplayer", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/checkplayer.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.flensed", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flensed.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.flxhr", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flxhr.js"));

                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.base64", WebPath.GetPath("addons/talk/js/jlib/strophe/base64.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.md5", WebPath.GetPath("addons/talk/js/jlib/strophe/md5.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.core", WebPath.GetPath("addons/talk/js/jlib/strophe/core.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.strophe.flxhr", WebPath.GetPath("addons/talk/js/jlib/plugins/strophe.flxhr.js"));

                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.swfobject", WebPath.GetPath("addons/talk/js/jlib/flxhr/swfobject.js"));
                break;

            default:
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.base64", WebPath.GetPath("addons/talk/js/jlib/strophe/base64.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.md5", WebPath.GetPath("addons/talk/js/jlib/strophe/md5.js"));
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.core", WebPath.GetPath("addons/talk/js/jlib/strophe/core.js"));

                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.swfobject", WebPath.GetPath("addons/talk/js/jlib/flxhr/swfobject.js"));
                break;
            }

            try
            {
                Page.Title = Resources.TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName();
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = Resources.TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(Resources.TalkResource.DefaultContactTitle, null, null);
            }
        }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cfg = new TalkConfiguration();

            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());

            ((IStudioMaster) this.Master).DisabledSidePanel = true;

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "gears.init", WebPath.GetPath("addons/talk/js/gears.init.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "iscroll", WebPath.GetPath("addons/talk/js/iscroll.js"));
            if (cfg.EnabledFirebugLite)
            {
                Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "firebug.lite", "https://getfirebug.com/firebug-lite.js");
            }

            var culture = CultureInfo.CurrentCulture;

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.style.css") + "\" />", false);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.location-style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/talk.style" + "." + culture.Name.ToLower() + ".css") + "\" />", false);
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.text-overflow", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + VirtualPathUtility.ToAbsolute("~/addons/talk/css/" + WebSkin.DefaultSkin.FolderName + "/talk.text-overflow.css") + "\" />", false);

            StringBuilder jsResources = new StringBuilder();
            jsResources.Append("window.ASC=window.ASC||{};");
            jsResources.Append("window.ASC.TMTalk=window.ASC.TMTalk||{};");
            jsResources.Append("window.ASC.TMTalk.Resources={};");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles={}" + ';');
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.offline='" + EscapeJsString(Talk.Resources.TalkResource.StatusOffline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.online='" + EscapeJsString(Talk.Resources.TalkResource.StatusOnline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.away='" + EscapeJsString(Talk.Resources.TalkResource.StatusAway) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.xa='" + EscapeJsString(Talk.Resources.TalkResource.StatusNA) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon16='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon48='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon128='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconNewMessage='" + EscapeJsString(WebSkin.GetUserSkin().GetAbsoluteWebPath("addons/talk/css/<theme_folder>/imagescss/icon-new-message.ico")) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.productName='" + EscapeJsString(Talk.Resources.TalkResource.ProductName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.updateFlashPlayerUrl='" + EscapeJsString(Talk.Resources.TalkResource.UpdateFlashPlayerUrl) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.selectUserBookmarkTitle='" + EscapeJsString(Talk.Resources.TalkResource.SelectUserBookmarkTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.defaultConferenceSubjectTemplate='" + EscapeJsString(Talk.Resources.TalkResource.DefaultConferenceSubjectTemplate) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelNewMessage='" + EscapeJsString(Talk.Resources.TalkResource.LabelNewMessage) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelRecvInvite='" + EscapeJsString(Talk.Resources.TalkResource.LabelRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.titleRecvInvite='" + EscapeJsString(Talk.Resources.TalkResource.TitleRecvInvite) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintChangeState='" + EscapeJsString(Talk.Resources.TalkResource.HintChangeState) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientConnecting='" + EscapeJsString(Talk.Resources.TalkResource.HintClientConnecting) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientDisconnected='" + EscapeJsString(Talk.Resources.TalkResource.HintClientDisconnected) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintCtrlEnterSender='" + EscapeJsString(Talk.Resources.TalkResource.HintCtrlEnterSender) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintDisableSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintDisableSounds) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintEmotions='" + EscapeJsString(Talk.Resources.TalkResource.HintEmotions) + "',");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintEnableSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintEnableSounds) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintEnterSender='" + EscapeJsString(Talk.Resources.TalkResource.HintEnterSender) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintFlastPlayerIncorrect='" + EscapeJsString(Talk.Resources.TalkResource.HintFlastPlayerIncorrect) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintHideGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintHideGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintHideOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintHideOfflineContacts) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintNoFlashPlayer='" + EscapeJsString(Talk.Resources.TalkResource.HintNoFlashPlayer) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintOfflineContacts) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintSendAddition='" + EscapeJsString(Talk.Resources.TalkResource.HintSendAddition) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendFile='" + EscapeJsString(Talk.Resources.TalkResource.HintSendFile) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintSendMessage='" + EscapeJsString(Talk.Resources.TalkResource.HintSendMessage) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowGroups='" + EscapeJsString(Talk.Resources.TalkResource.HintShowGroups) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowLeftTab='" + EscapeJsString(Talk.Resources.TalkResource.HintShowLeftTab) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowOfflineContacts='" + EscapeJsString(Talk.Resources.TalkResource.HintShowOfflineContacts) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintShowRightTab='" + EscapeJsString(Talk.Resources.TalkResource.HintShowRightTab) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSounds='" + EscapeJsString(Talk.Resources.TalkResource.HintSounds) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.hintToggleSender='" + EscapeJsString(Talk.Resources.TalkResource.HintToggleSender) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintUpdateHrefText='" + EscapeJsString(Talk.Resources.TalkResource.HintUpdateHrefText) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSelectContact='" + EscapeJsString(Talk.Resources.TalkResource.HintSelectContact) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendInvite='" + EscapeJsString(Talk.Resources.TalkResource.HintSendInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintPossibleClientConflict='" + EscapeJsString(Talk.Resources.TalkResource.HintPossibleClientConflict) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintCreateShortcutDialog='" + EscapeJsString(Talk.Resources.TalkResource.HintCreateShortcutDialog) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.sendFileMessage='" + EscapeJsString(string.Format(Talk.Resources.TalkResource.SendFileMessage, "{0}<br/>", "{1}")) + "';");
            // jsResources.Append("window.ASC.TMTalk.Resources.noneGroupTitle='" + EscapeJsString(Talk.Resources.TalkResource.NoneGroupTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.mailingsGroupName='" + EscapeJsString(Talk.Resources.TalkResource.MailingsGroupName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.conferenceGroupName='" + EscapeJsString(Talk.Resources.TalkResource.ConferenceGroupName) + "';");
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "talk.resources", jsResources.ToString(), true);

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.customevents", WebPath.GetPath("addons/talk/js/talk.customevents.js"));

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.common", WebPath.GetPath("addons/talk/js/talk.common.js"));

            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.navigationitem", WebPath.GetPath("addons/talk/js/talk.navigationitem.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.msmanager", WebPath.GetPath("addons/talk/js/talk.msmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.mucmanager", WebPath.GetPath("addons/talk/js/talk.mucmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.roomsmanager", WebPath.GetPath("addons/talk/js/talk.roomsmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.contactsmanager", WebPath.GetPath("addons/talk/js/talk.contactsmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.messagesmanager", WebPath.GetPath("addons/talk/js/talk.messagesmanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.connectionmanager", WebPath.GetPath("addons/talk/js/talk.connectiomanager.js"));
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.default", WebPath.GetPath("addons/talk/js/talk.default.js"));

            switch (cfg.RequestTransportType.ToLower())
            {
                case "flash":
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.checkplayer", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/checkplayer.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.flensed", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flensed.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.flxhr", VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flxhr.js"));

                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.base64", WebPath.GetPath("addons/talk/js/jlib/strophe/base64.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.md5", WebPath.GetPath("addons/talk/js/jlib/strophe/md5.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.core", WebPath.GetPath("addons/talk/js/jlib/strophe/core.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.strophe.flxhr", WebPath.GetPath("addons/talk/js/jlib/plugins/strophe.flxhr.js"));

                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.swfobject", WebPath.GetPath("addons/talk/js/jlib/flxhr/swfobject.js"));
                    break;
                default:
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.base64", WebPath.GetPath("addons/talk/js/jlib/strophe/base64.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.md5", WebPath.GetPath("addons/talk/js/jlib/strophe/md5.js"));
                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.core", WebPath.GetPath("addons/talk/js/jlib/strophe/core.js"));

                    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "talk.lib.swfobject", WebPath.GetPath("addons/talk/js/jlib/flxhr/swfobject.js"));
                    break;
            }

            try
            {
                Page.Title = Resources.TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName();
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = Resources.TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(Resources.TalkResource.DefaultContactTitle, null, null);
            }
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var thirdPartyChat = ConfigurationManagerExtension.AppSettings["web.third-party-chat-url"];
            var isEnabledTalk  = ConfigurationManagerExtension.AppSettings["web.talk"] ?? "false";

            if (!String.IsNullOrEmpty(thirdPartyChat))
            {
                if (CoreContext.Configuration.CustomMode)
                {
                    Response.Redirect(thirdPartyChat + "?ask_key=" + HttpUtility.UrlEncode(CookiesManager.GetCookies(CookiesType.AuthKey)), true);
                }
                Response.Redirect(thirdPartyChat, true);
            }

            if (isEnabledTalk != "true")
            {
                Response.Redirect(CommonLinkUtility.GetDefault());
            }

            _cfg = new TalkConfiguration();

            Utility.RegisterTypeForAjax(GetType());

            Master.DisabledSidePanel      = true;
            Master.DisabledTopStudioPanel = true;

            Page
            .RegisterBodyScripts("~/addons/talk/js/gears.init.js",
                                 "~/addons/talk/js/gears.init.js",
                                 "~/addons/talk/js/iscroll.js",
                                 "~/addons/talk/js/talk.customevents.js",
                                 "~/js/third-party/jquery/jquery.notification.js",
                                 "~/js/third-party/moment.min.js",
                                 "~/js/third-party/moment-timezone.min.js",
                                 "~/addons/talk/js/talk.common.js",
                                 "~/addons/talk/js/talk.navigationitem.js",
                                 "~/addons/talk/js/talk.msmanager.js",
                                 "~/addons/talk/js/talk.mucmanager.js",
                                 "~/addons/talk/js/talk.roomsmanager.js",
                                 "~/addons/talk/js/talk.contactsmanager.js",
                                 "~/addons/talk/js/talk.messagesmanager.js",
                                 "~/addons/talk/js/talk.connectiomanager.js",
                                 "~/addons/talk/js/talk.default.js",
                                 "~/addons/talk/js/talk.init.js")
            .RegisterStyle("~/addons/talk/css/default/talk.style.css");
            if (Request.Browser != null && Request.Browser.Browser != "IE" && Request.Browser.Browser != "InternetExplorer")
            {
                Page
                .RegisterBodyScripts("~/js/third-party/firebase.js",
                                     "~/js/third-party/firebase-app.js",
                                     "~/js/third-party/firebase-auth.js",
                                     "~/js/third-party/firebase-database.js",
                                     "~/js/third-party/firebase-messaging.js");
            }

            var virtPath = "~/addons/talk/css/default/talk.style." + CultureInfo.CurrentCulture.Name.ToLower() + ".css";

            if (File.Exists(Server.MapPath(virtPath)))
            {
                Page.RegisterStyle(virtPath);
            }
            Page.RegisterStyle("~/addons/talk/css/default/talk.text-overflow.css");


            switch (_cfg.RequestTransportType.ToLower())
            {
            case "flash":
                Page.RegisterBodyScripts("~/addons/talk/js/jlib/plugins/strophe.flxhr.js",

                                         "~/addons/talk/js/jlib/flxhr/checkplayer.js",
                                         "~/addons/talk/js/jlib/flxhr/flensed.js",
                                         "~/addons/talk/js/jlib/flxhr/flxhr.js",
                                         "~/addons/talk/js/jlib/flxhr/swfobject.js",

                                         "~/js/third-party/xregexp.js",

                                         "~/addons/talk/js/jlib/strophe/base64.js",
                                         "~/addons/talk/js/jlib/strophe/md5.js",
                                         "~/addons/talk/js/jlib/strophe/core.js");

                break;

            default:
                Page.RegisterBodyScripts(
                    "~/addons/talk/js/jlib/strophe/base64.js",
                    "~/addons/talk/js/jlib/strophe/md5.js",
                    "~/addons/talk/js/jlib/strophe/core.js",
                    "~/js/third-party/xregexp.js",
                    "~/addons/talk/js/jlib/flxhr/swfobject.js");
                break;
            }

            Master.AddClientScript(new TalkClientScript(), new TalkClientScriptLocalization());

            try
            {
                Page.Title = TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName(false);
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(TalkResource.DefaultContactTitle);
            }
            try
            {
                Page.RegisterInlineScript("ASC.TMTalk.notifications && ASC.TMTalk.notifications.initialiseFirebase(" + GetFirebaseConfig() + ");");
            }
            catch (Exception) {}
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _cfg = new TalkConfiguration();

            AjaxPro.Utility.RegisterTypeForAjax(GetType());

            Master.DisabledSidePanel      = true;
            Master.DisabledTopStudioPanel = true;

            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/gears.init.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/iscroll.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.customevents.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.common.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.navigationitem.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.msmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.mucmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.roomsmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.contactsmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.messagesmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.connectiomanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.default.js"));

            //if (cfg.EnabledFirebugLite)
            //{
            //    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "firebug.lite", "https://getfirebug.com/firebug-lite.js");
            //}

            var culture = CultureInfo.CurrentCulture;

            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.style.css"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.style" + "." + culture.Name.ToLower() + ".css"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.text-overflow.css"));


            switch (_cfg.RequestTransportType.ToLower())
            {
            case "flash":
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/plugins/strophe.flxhr.js"));

                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/checkplayer.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flensed.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flxhr.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/swfobject.js"));

                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/base64.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/md5.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/core.js"));

                break;

            default:
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/base64.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/md5.js"));
                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/core.js"));

                Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/swfobject.js"));
                break;
            }

            var jsResources = new StringBuilder();

            jsResources.Append("window.ASC=window.ASC||{};");
            jsResources.Append("window.ASC.TMTalk=window.ASC.TMTalk||{};");
            jsResources.Append("window.ASC.TMTalk.Resources={};");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles={}" + ';');
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.offline='" + EscapeJsString(TalkResource.StatusOffline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.online='" + EscapeJsString(TalkResource.StatusOnline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.away='" + EscapeJsString(TalkResource.StatusAway) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.xa='" + EscapeJsString(TalkResource.StatusNA) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon16='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon48='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon128='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconNewMessage='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("icon-new-message.ico", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.productName='" + EscapeJsString(TalkResource.ProductName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.updateFlashPlayerUrl='" + EscapeJsString(TalkResource.UpdateFlashPlayerUrl) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.selectUserBookmarkTitle='" + EscapeJsString(TalkResource.SelectUserBookmarkTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.defaultConferenceSubjectTemplate='" + EscapeJsString(TalkResource.DefaultConferenceSubjectTemplate) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelNewMessage='" + EscapeJsString(TalkResource.LabelNewMessage) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelRecvInvite='" + EscapeJsString(TalkResource.LabelRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.titleRecvInvite='" + EscapeJsString(TalkResource.TitleRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientConnecting='" + EscapeJsString(TalkResource.HintClientConnecting) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientDisconnected='" + EscapeJsString(TalkResource.HintClientDisconnected) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintEmotions='" + EscapeJsString(TalkResource.HintEmotions) + "',");
            jsResources.Append("window.ASC.TMTalk.Resources.hintFlastPlayerIncorrect='" + EscapeJsString(TalkResource.HintFlastPlayerIncorrect) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintGroups='" + EscapeJsString(TalkResource.HintGroups) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintNoFlashPlayer='" + EscapeJsString(TalkResource.HintNoFlashPlayer) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintOfflineContacts='" + EscapeJsString(TalkResource.HintOfflineContacts) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendFile='" + EscapeJsString(TalkResource.HintSendFile) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSounds='" + EscapeJsString(TalkResource.HintSounds) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintUpdateHrefText='" + EscapeJsString(TalkResource.HintUpdateHrefText) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSelectContact='" + EscapeJsString(TalkResource.HintSelectContact) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendInvite='" + EscapeJsString(TalkResource.HintSendInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintPossibleClientConflict='" + EscapeJsString(TalkResource.HintPossibleClientConflict) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintCreateShortcutDialog='" + EscapeJsString(TalkResource.HintCreateShortcutDialog) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.sendFileMessage='" + EscapeJsString(string.Format(TalkResource.SendFileMessage, "{0}<br/>", "{1}")) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.mailingsGroupName='" + EscapeJsString(TalkResource.MailingsGroupName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.conferenceGroupName='" + EscapeJsString(TalkResource.ConferenceGroupName) + "';");

            Page.RegisterInlineScript(jsResources.ToString(), true, false);

            jsResources = new StringBuilder();

            jsResources.Append("TMTalk.init('ajaxupload.ashx?type=ASC.Web.Talk.UploadFileHanler,ASC.Web.Talk');");
            jsResources.Append("ASC.TMTalk.properties.init('2.0');");
            jsResources.Append("ASC.TMTalk.iconManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.notifications.init('{0}', '{1}');", GetUserPhotoHandlerPath(), GetNotificationHandlerPath());
            jsResources.AppendFormat("ASC.TMTalk.msManager.init('{0}');", GetValidSymbols());
            jsResources.AppendFormat("ASC.TMTalk.mucManager.init('{0}');", GetValidSymbols());
            jsResources.Append("ASC.TMTalk.roomsManager.init();");
            jsResources.Append("ASC.TMTalk.contactsManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.messagesManager.init('{0}', '{1}', '{2}', '{3}');", GetShortDateFormat(), GetFullDateFormat(), GetMonthNames(), GetHistoryLength());
            jsResources.AppendFormat("ASC.TMTalk.connectionManager.init('{0}', '{1}', '{2}', '{3}');", GetBoshUri(), GetJabberAccount(), GetResourcePriority(), GetInactivity());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('addonID', '{0}');", TalkAddon.AddonID);
            jsResources.AppendFormat("ASC.TMTalk.properties.item('enabledMassend', '{0}');", GetMassendState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('enabledConferences', '{0}');", GetConferenceState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('requestTransportType', '{0}');", GetRequestTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('fileTransportType', '{0}');", GetFileTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('maxUploadSize', '{0}');", SetupInfo.MaxImageUploadSize);
            jsResources.AppendFormat("ASC.TMTalk.properties.item('sounds', '{0}');", VirtualPathUtility.ToAbsolute("~/addons/talk/swf/sounds.swf"));
            jsResources.AppendFormat("ASC.TMTalk.properties.item('expressInstall', '{0}');", VirtualPathUtility.ToAbsolute("~/addons/talk/swf/expressinstall.swf"));

            Page.RegisterInlineScript(jsResources.ToString());

            try
            {
                Page.Title = TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName();
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(TalkResource.DefaultContactTitle);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _cfg = new TalkConfiguration();

            AjaxPro.Utility.RegisterTypeForAjax(GetType());

            Master.DisabledSidePanel = true;
            Master.DisabledTopStudioPanel = true;

            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/gears.init.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/iscroll.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.customevents.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.common.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.navigationitem.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.msmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.mucmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.roomsmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.contactsmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.messagesmanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.connectiomanager.js"));
            Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/talk.default.js"));

            //if (cfg.EnabledFirebugLite)
            //{
            //    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "firebug.lite", "https://getfirebug.com/firebug-lite.js");
            //}

            var culture = CultureInfo.CurrentCulture;

            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.style.css"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.style" + "." + culture.Name.ToLower() + ".css"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/addons/talk/css/default/talk.text-overflow.css"));


            switch (_cfg.RequestTransportType.ToLower())
            {
                case "flash":
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/plugins/strophe.flxhr.js"));

                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/checkplayer.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flensed.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/flxhr.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/swfobject.js"));

                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/base64.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/md5.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/core.js"));

                    break;
                default:
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/base64.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/md5.js"));
                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/strophe/core.js"));

                    Page.RegisterBodyScripts(VirtualPathUtility.ToAbsolute("~/addons/talk/js/jlib/flxhr/swfobject.js"));
                    break;
            }

            var jsResources = new StringBuilder();
            jsResources.Append("window.ASC=window.ASC||{};");
            jsResources.Append("window.ASC.TMTalk=window.ASC.TMTalk||{};");
            jsResources.Append("window.ASC.TMTalk.Resources={};");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles={}" + ';');
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.offline='" + EscapeJsString(TalkResource.StatusOffline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.online='" + EscapeJsString(TalkResource.StatusOnline) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.away='" + EscapeJsString(TalkResource.StatusAway) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.statusTitles.xa='" + EscapeJsString(TalkResource.StatusNA) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("product_logo.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon16='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk16.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon32='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk32.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon48='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk48.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.addonIcon128='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("talk128.png", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.iconNewMessage='" + EscapeJsString(WebImageSupplier.GetAbsoluteWebPath("icon-new-message.ico", TalkAddon.AddonID)) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.productName='" + EscapeJsString(TalkResource.ProductName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.updateFlashPlayerUrl='" + EscapeJsString(TalkResource.UpdateFlashPlayerUrl) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.selectUserBookmarkTitle='" + EscapeJsString(TalkResource.SelectUserBookmarkTitle) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.defaultConferenceSubjectTemplate='" + EscapeJsString(TalkResource.DefaultConferenceSubjectTemplate) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelNewMessage='" + EscapeJsString(TalkResource.LabelNewMessage) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.labelRecvInvite='" + EscapeJsString(TalkResource.LabelRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.titleRecvInvite='" + EscapeJsString(TalkResource.TitleRecvInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientConnecting='" + EscapeJsString(TalkResource.HintClientConnecting) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintClientDisconnected='" + EscapeJsString(TalkResource.HintClientDisconnected) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintEmotions='" + EscapeJsString(TalkResource.HintEmotions) + "',");
            jsResources.Append("window.ASC.TMTalk.Resources.hintFlastPlayerIncorrect='" + EscapeJsString(TalkResource.HintFlastPlayerIncorrect) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintGroups='" + EscapeJsString(TalkResource.HintGroups) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintNoFlashPlayer='" + EscapeJsString(TalkResource.HintNoFlashPlayer) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintOfflineContacts='" + EscapeJsString(TalkResource.HintOfflineContacts) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendFile='" + EscapeJsString(TalkResource.HintSendFile) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSounds='" + EscapeJsString(TalkResource.HintSounds) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintUpdateHrefText='" + EscapeJsString(TalkResource.HintUpdateHrefText) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSelectContact='" + EscapeJsString(TalkResource.HintSelectContact) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintSendInvite='" + EscapeJsString(TalkResource.HintSendInvite) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintPossibleClientConflict='" + EscapeJsString(TalkResource.HintPossibleClientConflict) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.hintCreateShortcutDialog='" + EscapeJsString(TalkResource.HintCreateShortcutDialog) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.sendFileMessage='" + EscapeJsString(string.Format(TalkResource.SendFileMessage, "{0}<br/>", "{1}")) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.mailingsGroupName='" + EscapeJsString(TalkResource.MailingsGroupName) + "';");
            jsResources.Append("window.ASC.TMTalk.Resources.conferenceGroupName='" + EscapeJsString(TalkResource.ConferenceGroupName) + "';");

            Page.RegisterInlineScript(jsResources.ToString(), true, false);

            jsResources = new StringBuilder();

            jsResources.Append("TMTalk.init('ajaxupload.ashx?type=ASC.Web.Talk.UploadFileHanler,ASC.Web.Talk');");
            jsResources.Append("ASC.TMTalk.properties.init('2.0');");
            jsResources.Append("ASC.TMTalk.iconManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.notifications.init('{0}', '{1}');", GetUserPhotoHandlerPath(), GetNotificationHandlerPath());
            jsResources.AppendFormat("ASC.TMTalk.msManager.init('{0}');", GetValidSymbols());
            jsResources.AppendFormat("ASC.TMTalk.mucManager.init('{0}');", GetValidSymbols());
            jsResources.Append("ASC.TMTalk.roomsManager.init();");
            jsResources.Append("ASC.TMTalk.contactsManager.init();");
            jsResources.AppendFormat("ASC.TMTalk.messagesManager.init('{0}', '{1}', '{2}', '{3}');", GetShortDateFormat(), GetFullDateFormat(), GetMonthNames(), GetHistoryLength());
            jsResources.AppendFormat("ASC.TMTalk.connectionManager.init('{0}', '{1}', '{2}', '{3}');", GetBoshUri(), GetJabberAccount(), GetResourcePriority(), GetInactivity());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('addonID', '{0}');", TalkAddon.AddonID);
            jsResources.AppendFormat("ASC.TMTalk.properties.item('enabledMassend', '{0}');", GetMassendState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('enabledConferences', '{0}');", GetConferenceState());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('requestTransportType', '{0}');", GetRequestTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('fileTransportType', '{0}');", GetFileTransportType());
            jsResources.AppendFormat("ASC.TMTalk.properties.item('maxUploadSize', '{0}');", SetupInfo.MaxImageUploadSize);
            jsResources.AppendFormat("ASC.TMTalk.properties.item('sounds', '{0}');", VirtualPathUtility.ToAbsolute("~/addons/talk/swf/sounds.swf"));
            jsResources.AppendFormat("ASC.TMTalk.properties.item('expressInstall', '{0}');", VirtualPathUtility.ToAbsolute("~/addons/talk/swf/expressinstall.swf"));

            Page.RegisterInlineScript(jsResources.ToString());

            try
            {
                Page.Title = TalkResource.ProductName + " - " + CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID).DisplayUserName();
            }
            catch (System.Security.SecurityException)
            {
                Page.Title = TalkResource.ProductName + " - " + HeaderStringHelper.GetPageTitle(TalkResource.DefaultContactTitle);
            }
        }