Пример #1
0
        public string GetNotificationImageUrl(string imageFileName)
        {
            if (string.IsNullOrEmpty(NotificationImagePath))
            {
                return
                    (CommonLinkUtility.GetFullAbsolutePath(
                         WebImageSupplier.GetAbsoluteWebPath("notification/" + imageFileName)));
            }

            return(NotificationImagePath.TrimEnd('/') + "/" + imageFileName);
        }
Пример #2
0
 public string GetAbsoluteCompanyLogoPath()
 {
     if (_isDefault)
     {
         return(WebImageSupplier.GetAbsoluteWebPath("logo.png"));
     }
     else
     {
         var store = StorageFactory.GetStorage(TenantProvider.CurrentTenantID.ToString(), "logo");
         return(store.GetUri(_companyLogoFileName ?? "").ToString());
     }
 }
Пример #3
0
 private void InitEmptyScreenForFilter()
 {
     emptyContentForDealsFilter.ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png", ProductEntryPoint.ID);
     emptyContentForDealsFilter.Header     = CRMDealResource.EmptyContentDealsFilterHeader;
     emptyContentForDealsFilter.Describe   = CRMDealResource.EmptyContentDealsFilterDescribe;
     emptyContentForDealsFilter.ButtonHTML = String.Format(
         @"<a class='crm-clearFilterButton' href='javascript:void(0);'
                                                 onclick='ASC.CRM.ListDealView.advansedFilter.advansedFilter(null);'>
                                                     {0}
                                           </a>",
         CRMCommonResource.ClearFilter);
 }
        public TaskCategoryBaseDto Convert(ListItem source, TaskCategoryBaseDto destination, ResolutionContext context)
        {
            if (destination != null)
            {
                throw new NotImplementedException();
            }

            return(new TaskCategoryDto(source)
            {
                ImagePath = _webImageSupplier.GetAbsoluteWebPath(source.AdditionalParams, ProductEntryPoint.ID)
            });
        }
Пример #5
0
        private void InitTags()
        {
            ServiceHelper.SetPagination();

            IList <Tag> tags;

            switch (sortUtil.SortBy)
            {
            case SortByEnum.Name:
                tags = ServiceHelper.GetTagsSortedByName();
                break;

            case SortByEnum.Popularity:
                tags = ServiceHelper.GetMostPopularTags();
                break;

            default:
                tags = ServiceHelper.GetMostRecentTags();
                break;
            }

            if (tags == null || tags.Count == 0)
            {
                var emptyScreenControl = new EmptyScreenControl
                {
                    ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("bookmarks_icon.png", BookmarkingSettings.ModuleId),
                    Header     = BookmarkingUCResource.EmptyScreenTagsCaption,
                    Describe   = BookmarkingUCResource.EmptyScreenText,
                    ButtonHTML = String.Format("<a class='linkAddMediumText' href='CreateBookmark.aspx'>{0}</a>", BookmarkingUCResource.EmptyScreenLink)
                };

                TagsContainer.Controls.Add(emptyScreenControl);
                TagsSortingPanel.Visible = false;
                return;
            }
            var i = 0;

            var bookmarks = ServiceHelper.GetMostPopularBookmarksByTag(tags);

            foreach (var tag in tags)
            {
                using (var c = LoadControl(BookmarkUserControlPath.TagInfoUserControlPath) as TagInfoUserControl)
                {
                    c.Tag          = tag;
                    c.BookmarkList = GetBookmarksByTag(bookmarks, tag);
                    c.IsOdd        = i++ % 2 == 0;
                    TagsContainer.Controls.Add(c);
                }
            }
            SetBookmarkingPagination();
        }
Пример #6
0
        private string GetLogo(ISearchHandlerEx sh, IWebItem module)
        {
            if (sh.GetType().Equals(typeof(EmployeeSearchHendler)))
            {
                return(WebImageSupplier.GetAbsoluteWebPath("employee.png"));
            }

            if (module != null)
            {
                return(module.GetIconAbsoluteURL());
            }

            return(WebImageSupplier.GetAbsoluteWebPath(sh.Logo.ImageFileName, sh.Logo.PartID));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            EmployeeSiteNavigator.HeaderCSSClass = "studioSideBoxActionsHeader";
            EmployeeSiteNavigator.BodyCSSClass   = "studioSideBoxNavigationBody";
            EmployeeSiteNavigator.ImageURL       = WebImageSupplier.GetAbsoluteWebPath("home.png");
            EmployeeSiteNavigator.Title          = CustomNamingPeople.Substitute <Resources.Resource>("Departments");

            _productID = CommonLinkUtility.GetProductID();
            if (!Page.IsPostBack)
            {
                categoryTree.ShowExpandCollapse = false;
                FillTree();
            }
        }
Пример #8
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Page.RegisterBodyScripts(ResolveUrl,
                                     "~/products/people/js/peoplemanager.js",
                                     "~/products/people/js/filterHandler.js",
                                     "~/products/people/js/navigatorHandler.js",
                                     "~/products/people/js/peopleController.js");

            Page.RegisterInlineScript(String.Format(" emptyScreenPeopleFilter = '{0}'; ",
                                                    WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png")),
                                      onReady: false);
        }
Пример #9
0
        private void RenderProjectsWidget()
        {
            var projectsWidget = (ProjectsWidget)LoadControl(PathProvider.GetControlVirtualPath("ProjectsWidget.ascx"));

            widgetTabControl.WidgetCollection.Add(new Widget(ProjectsWidget.WidgetId,
                                                             projectsWidget,
                                                             ProjectResource.ProjectsAndTasks,
                                                             string.Empty)
            {
                ImageURL             = WebImageSupplier.GetAbsoluteWebPath("my_projects.png", ProductEntryPoint.ID),
                SettingsProviderType = typeof(ProjectsWidgetSettingsProvider),
                Position             = new Point(0, 0)
            });
        }
Пример #10
0
        protected override void OnLoad(EventArgs e)
        {
            IsMobile = MobileDetector.IsMobile;
            PageLoad();
            InitScript();

            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            DocServiceApiUrl += (DocServiceApiUrl.Contains("?") ? "&" : "?") + "ver=" + ClientSettings.ResetCacheKey;

            if (_configuration != null && !string.IsNullOrEmpty(_configuration.DocumentType))
            {
                Favicon = WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/" + _configuration.DocumentType + ".ico");
            }
        }
Пример #11
0
        protected string GetChatBannerPath()
        {
            var lng       = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.ToLower();
            var cult      = string.Empty;
            var cultArray = new[] { "de", "es", "fr", "it", "lv", "ru" };

            if (cultArray.Contains(lng))
            {
                cult = "_" + lng;
            }
            var imgName = "support/live_support_banner" + cult + ".png";

            return(WebImageSupplier.GetAbsoluteWebPath(imgName));
        }
Пример #12
0
        public static EmptyScreenControl RenderEmptyScreenForFilter(string headerText, string description)
        {
            var emptyScreenControlFilter = new EmptyScreenControl
            {
                ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png"),
                Header     = headerText,
                Describe   = description,
                ID         = "emptyScreenForFilter",
                ButtonHTML = String.Format("<a class='baseLinkAction clearFilterButton'>{0}</a>",
                                           ProjectsFilterResource.ClearFilter)
            };

            return(emptyScreenControlFilter);
        }
Пример #13
0
        private void RegisterScript()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(@"ASC.CRM.ListCasesView.init({0},""{1}"",{2},""{3}"",""{4}"");",
                            Global.VisiblePageCount,
                            CookieKeyForPagination,
                            CRMSecurity.IsAdmin.ToString().ToLower(),
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_cases.png", ProductEntryPoint.ID),
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png")
                            );

            Page.RegisterInlineScript(sb.ToString());
        }
 public static string GetThumbnailUrl(string Url, BookmarkingThumbnailSize size)
 {
     try
     {
         var uri      = new Uri(Url);
         var imageUrl = ThumbnailHelper.Instance.GetThumbnailUrl(HttpUtility.UrlEncode(uri.OriginalString), size);
         return(!String.IsNullOrEmpty(imageUrl)
                    ? imageUrl
                    : WebImageSupplier.GetAbsoluteWebPath(BookmarkingRequestConstants.NoImageAvailable, BookmarkingSettings.ModuleId));
     }
     catch (Exception)
     {
         return(WebImageSupplier.GetAbsoluteWebPath(BookmarkingRequestConstants.NoImageAvailable, BookmarkingSettings.ModuleId));
     }
 }
Пример #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!CoreContext.Configuration.Personal)
     {
         Response.Redirect(CommonLinkUtility.GetDefault());
     }
     Master.DisabledSidePanel = true;
     Master.TopStudioPanel.DisableProductNavigation = true;
     Master.TopStudioPanel.DisableSettings          = true;
     Master.TopStudioPanel.DisableSearch            = true;
     Master.TopStudioPanel.TopLogo = WebImageSupplier.GetAbsoluteWebPath("personal_logo/logo_personal_terms.png");
     Master.TopStudioPanel.DisableLoginPersonal = true;
     PersonalFooterHolder.Controls.Add(LoadControl(PersonalFooter.Location));
     Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/skins/personal.less"));
 }
Пример #16
0
        protected void InitControls()
        {
            var searchHandler = (BaseSearchHandlerEx)(SearchHandlerManager.GetHandlersExForProduct(ProductEntryPoint.ID)).Find(sh => sh is SearchHandler);

            if (String.IsNullOrEmpty(Request[UrlConstant.ProjectID]))
            {
                searchHandler.AbsoluteSearchURL = (VirtualPathUtility.ToAbsolute(PathProvider.BaseVirtualPath + "/search.aspx"));
            }
            else
            {
                searchHandler.AbsoluteSearchURL = (VirtualPathUtility.ToAbsolute(PathProvider.BaseVirtualPath + "/search.aspx") + "?prjID=" + Request[UrlConstant.ProjectID]);
            }

            _aboutContainer.ImageURL     = WebImageSupplier.GetAbsoluteWebPath("navigation.png");
            _aboutContainer.Title        = ProjectsCommonResource.About;
            _aboutContainer.BodyCSSClass = "studioSideBoxBodyAbout";
            _aboutContainer.Visible      = false;

            RenderHeader();

            var bottomNavigator = new BottomNavigator();

            _bottomNavigatorPlaceHolder.Controls.Add(bottomNavigator);

            var onlineUsersControl = (OnlineUsers)LoadControl(OnlineUsers.Location);

            onlineUsersControl.ProductId = ProductEntryPoint.ID;
            phOnlineUsers.Controls.Add(onlineUsersControl);


            if (Page.GetType() == typeof(Dashboard) && HaveProjects())
            {
                _commonContainer.Visible = false;
            }

            //RSS
            //all interested projects
            //
            InterestedProjectsFeedControl.ContainerId = GetUserInterestedProjects();
            if (RequestContext.IsInConcreteProject())
            {
                //this project feed
                //
                ConcreteProjectFeedControl.Visible     = true;
                ConcreteProjectFeedControl.ContainerId = RequestContext.GetCurrentProjectId().ToString();
                ConcreteProjectFeedControl.Title       = RequestContext.GetCurrentProject().HtmlTitle.HtmlEncode();
            }
        }
        public static void CommentsConfigure(CommentsList commentList)
        {
            commentList.DisableCtrlEnter = (SetupInfo.WorkMode == WorkMode.Promo);

            commentList.PID                    = CommonLinkUtility.GetProductID().ToString();
            commentList.InactiveMessage        = Resources.Resource.CommentRemovedMessage;
            commentList.UserProfileUrlResolver = user => CommonLinkUtility.GetUserProfile(user);
            commentList.UserPageLinkWithParam  = VirtualPathUtility.ToAbsolute("~/userprofile.aspx") + "?" + CommonLinkUtility.GetProductParamsPair(new Guid(commentList.PID)) + "&uid";
            commentList.AddCommentLink         = Resources.Resource.AddNewCommentButton;

            commentList.SaveButton = Resources.Resource.PublishButton;
            commentList.BehaviorID = "_commentObj";

            commentList.PreviewButton     = Resources.Resource.PreviewButton;
            commentList.HidePrevuewButton = Resources.Resource.CloseButton;
            commentList.CancelButton      = Resources.Resource.CancelButton;
            commentList.InactiveMessage   = Resources.Resource.CommentWasRemoved;

            commentList.RemoveCommentLink   = Resources.Resource.DeleteButton;
            commentList.ResponseCommentLink = Resources.Resource.AnswerButton;
            commentList.EditCommentLink     = Resources.Resource.EditButton;

            commentList.FCKBasePath = FCKEditorBasePath;

            commentList.CommentsTitle = Resources.Resource.Comments;

            commentList.ConfirmRemoveCommentMessage = Resources.Resource.ConfirmRemoveCommentMessage;

            commentList.AdditionalSubmitText = "<span class=\"textMediumDescribe\" style=\"margin-left:5px;\">" + Resources.Resource.OrPress + "</span> <span class=\"textBase\">" + Resources.Resource.CtrlEnterKeys + "</span>";

            commentList.FCKEditorAreaCss = WebSkin.GetUserSkin().BaseCSSFileAbsoluteWebPath;

            commentList.LoaderImage       = WebImageSupplier.GetAbsoluteWebPath("ajax_progress_loader.gif");
            commentList.CommentSendingMsg = Resources.Resource.PleaseWaitMessage;


            commentList.OnEditedCommentJS   = "FCKCommentsController.EditCommentHandler";
            commentList.OnCanceledCommentJS = "FCKCommentsController.CancelCommentHandler";
            commentList.OnRemovedCommentJS  = "FCKCommentsController.RemoveCommentHandler";

            try
            {
                AjaxPro.Utility.RegisterTypeForAjax(typeof(CommonControlsConfigurer));
            }
            catch
            {
            }
        }
Пример #18
0
        private void ExecPeopleView()
        {
            ContactsTab.TabAnchorName = "contacts";
            var people = Global.DaoFactory.GetContactDao().GetContacts(Global.DaoFactory.GetDealDao().GetMembers(TargetDeal.ID));

            //ContactsTab.TabName = people.Count > 0 ? String.Format("{0} ({1})", CRMDealResource.PeopleInDeal, people.Count) : CRMDealResource.PeopleInDeal;
            ContactsTab.TabName = CRMDealResource.PeopleInDeal;
            //init ListContactView
            var listContactView = (ListContactView)LoadControl(ListContactView.Location);

            listContactView.IsSimpleView = true;
            listContactView.EntityID     = TargetDeal.ID;
            listContactView.EntityType   = EntityType.Opportunity;
            _phContactsView.Controls.Add(listContactView);

            //init ContactSelector
            var selector = (ContactSelector)LoadControl(ContactSelector.Location);

            selector.CurrentType      = ContactSelector.SelectorType.All;
            selector.SelectedContacts = people;
            if (TargetDeal.ContactID != 0)
            {
                selector.ExcludedArrayIDs = new List <int> {
                    TargetDeal.ContactID
                }
            }
            ;
            selector.ShowOnlySelectorContent = true;
            selector.ShowNewCompanyContent   = true;
            selector.ShowNewContactContent   = true;
            selector.ID = "dealContactSelector";
            selector.DescriptionText = CRMCommonResource.FindContactByName;
            phContactSelector.Controls.Add(selector);

            //init EmptyScreen
            var emptyParticipantScreenControl = new EmptyScreenControl
            {
                ID         = "emptyDealParticipantPanel",
                ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("empty_screen_opportunity_participants.png", ProductEntryPoint.ID),
                Header     = CRMDealResource.EmptyPeopleInDealContent,
                Describe   = CRMDealResource.EmptyPeopleInDealDescript,
                ButtonHTML = String.Format(@"
                                                            <a class='linkAddMediumText baseLinkAction' onclick='javascript:jq(""#dealParticipantPanel"").show();jq(""#emptyDealParticipantPanel"").hide();'>{0}</a>",
                                           CRMCommonResource.AddParticipant)
            };

            _phEmptyPeopleView.Controls.Add(emptyParticipantScreenControl);
        }
Пример #19
0
        private void RenderNavigationPanel()
        {
            var navigationPanel = (NavigationPanel)LoadControl(NavigationPanel.Location);

            if (CoreContext.UserManager.IsUserInGroup(SecurityContext.CurrentAccount.ID, Constants.GroupAdmin.ID))
            {
                navigationPanel.addButton(SettingsResource.Settings,
                                          WebImageSupplier.GetAbsoluteWebPath("32-Projects-import.png", ProductEntryPoint.ID),
                                          "settings.aspx", 2);
            }
            navigationPanel.addButton(ProjectsCommonResource.CustomizeWidgets,
                                      WebImageSupplier.GetAbsoluteWebPath("btn_managewidgets.png"),
                                      "javascript:projectsDashboard.ShowSettings('400px', '-200px')", 4);

            navigationPanelPlaceHolder.Controls.Add(navigationPanel);
        }
Пример #20
0
        public string GetAbsoluteCompanyLogoPath()
        {
            if (_isDefault)
            {
                var logoName =
                    CoreContext.Configuration.YourDocs
                        ? "logoyd"
                        : "logo";

                return(WebImageSupplier.GetAbsoluteWebPath("logo/" + logoName + ".png"));
            }

            var store = StorageFactory.GetStorage(TenantProvider.CurrentTenantID.ToString(), "logo");

            return(store.GetUri(_companyLogoFileName ?? "").ToString());
        }
Пример #21
0
 private static string GetDefaultPhotoAbsoluteWebPath(Size size)
 {
     if (size == BigFotoSize)
     {
         return(WebImageSupplier.GetAbsoluteWebPath(_defaultBigAvatar));
     }
     if (size == SmallFotoSize)
     {
         return(WebImageSupplier.GetAbsoluteWebPath(_defaultSmallAvatar));
     }
     if (size == MediumFotoSize)
     {
         return(WebImageSupplier.GetAbsoluteWebPath(_defaultMediumAvatar));
     }
     return(GetDefaultPhotoAbsoluteWebPath());
 }
Пример #22
0
        private void RegisterScript()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(@"ASC.CRM.ListDealView.init(0,{0},""{1}"",""{2}"",{3},{4},""{5}"",""{6}"");",
                            Global.VisiblePageCount,
                            CookieKeyForPagination,
                            System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator,
                            CRMSecurity.IsAdmin.ToString().ToLower(),
                            (int)ContactSelectorTypeEnum.All,
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_deals.png", ProductEntryPoint.ID),
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png")
                            );

            Page.RegisterInlineScript(sb.ToString());
        }
Пример #23
0
        private void RegisterScript()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(@"ASC.CRM.HistoryView.init({0},""{1}"",{2},{3},""{4}"",""{5}"",""{6}"", {7});",
                            TargetContactID,
                            TargetEntityType.ToString().ToLower(),
                            TargetEntityID,
                            Global.EntryCountOnPage,
                            TenantUtil.DateTimeNow().ToShortDateString(),
                            DateTimeExtension.DateMaskForJQuery,
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png"),
                            ASC.CRM.Core.CRMSecurity.IsAdmin.ToString().ToLower());

            Page.RegisterInlineScript(sb.ToString());
        }
Пример #24
0
        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()
                    }
                })
            });
        }
Пример #25
0
        public static void SetTagsCloud(ControlCollection c, string label, TagCloud tagCloud)
        {
            if (tagCloud.Items == null || tagCloud.Items.Count == 0)
            {
                return;
            }
            var ServiceHelper = BookmarkingServiceHelper.GetCurrentInstanse();

            var tagsCloudContainer = new SideContainer()
            {
                Title    = label,
                ImageURL = WebImageSupplier.GetAbsoluteWebPath("tag_32.png", BookmarkingConst.BookmarkingId)
            };

            tagsCloudContainer.Controls.Add(tagCloud);
            c.Add(tagsCloudContainer);
        }
        public string GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum type, bool general)
        {
            var partnerLogoPath = GetPartnerStorageLogoPath(type, general);

            if (!string.IsNullOrEmpty(partnerLogoPath))
            {
                return(partnerLogoPath);
            }

            return(type switch
            {
                WhiteLabelLogoTypeEnum.LightSmall => general?WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/light_small_general.svg") : WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/light_small.svg"),
                    WhiteLabelLogoTypeEnum.Dark => general?WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/dark_general.png") : WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/dark.png"),
                        WhiteLabelLogoTypeEnum.DocsEditor => general?WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/editor_logo_general.png") : WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/editor_logo.png"),
                            WhiteLabelLogoTypeEnum.Favicon => general?WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/favicon_general.ico") : WebImageSupplier.GetAbsoluteWebPath("onlyoffice_logo/favicon.ico"),
                                _ => "",
            });
Пример #27
0
        protected override void OnLoad(EventArgs e)
        {
            IsMobile = MobileDetector.IsMobile;
            PageLoad();
            InitScript();

            Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
            Response.AppendHeader("Pragma", "no-cache");
            Response.AppendHeader("Expires", "0");

            DocServiceApiUrl += (DocServiceApiUrl.Contains("?") ? "&" : "?") + "ver=" + HttpUtility.UrlEncode(ClientSettings.ResetCacheKey + ResetCacheKey);

            if (_configuration != null && !string.IsNullOrEmpty(_configuration.DocumentType))
            {
                Favicon = WebImageSupplier.GetAbsoluteWebPath("logo/" + _configuration.DocumentType + ".ico");
            }
        }
        public static void DataUserSelectorListView(BasePage page, String ObjId, Dictionary <Guid, String> SelectedUsers)
        {
            var ids   = SelectedUsers != null && SelectedUsers.Count > 0 ? SelectedUsers.Select(i => i.Key).ToArray() : new List <Guid>().ToArray();
            var names = SelectedUsers != null && SelectedUsers.Count > 0 ? SelectedUsers.Select(i => i.Value).ToArray() : new List <string>().ToArray();

            page.RegisterInlineScript(String.Format(" SelectedUsers{0} = {1}; ",
                                                    ObjId,
                                                    JsonConvert.SerializeObject(
                                                        new
            {
                IDs            = ids,
                Names          = names,
                DeleteImgSrc   = WebImageSupplier.GetAbsoluteWebPath("remove_12.png", ProductEntryPoint.ID),
                DeleteImgTitle = CRMCommonResource.DeleteUser,
                CurrentUserID  = SecurityContext.CurrentAccount.ID
            })), onReady: false);
        }
Пример #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userInfo = CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID);
            IsAdmin  = userInfo.IsAdmin();
            Actions  = new AllowedActions(userInfo);

            var quota = TenantExtra.GetTenantQuota();

            IsFreeTariff = quota.Free && !quota.Open;

            _confirmationDeleteDepartmentPanel.Options.IsPopup = true;
            _resendInviteDialog.Options.IsPopup     = true;
            _changeStatusDialog.Options.IsPopup     = true;
            _changeTypeDialog.Options.IsPopup       = true;
            _deleteUsersDialog.Options.IsPopup      = true;
            _deleteProfileContainer.Options.IsPopup = true;

            var emptyContentForPeopleFilter = new EmptyScreenControl
            {
                ID         = "emptyContentForPeopleFilter",
                ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png"),
                Header     = PeopleResource.NotFoundTitle,
                Describe   = PeopleResource.NotFoundDescription,
                ButtonHTML = String.Format(@"<a class='clearFilterButton link dotline' href='javascript:void(0);' 
                                            onclick='ASC.People.PeopleController.resetAllFilters();'>{0}</a>",
                                           PeopleResource.ClearButton),
                CssClass = "display-none"
            };

            emptyScreen.Controls.Add(emptyContentForPeopleFilter);


            var controlEmailChange = (UserEmailChange)LoadControl(UserEmailChange.Location);

            controlEmailChange.UserInfo = userInfo;
            userEmailChange.Controls.Add(controlEmailChange);

            loaderHolder.Controls.Add(LoadControl(LoaderPage.Location));
            userConfirmationDelete.Controls.Add(LoadControl(ConfirmationDeleteUser.Location));

            if (Actions.AllowEdit)
            {
                userPwdChange.Controls.Add(LoadControl(PwdTool.Location));
            }
            Title = HeaderStringHelper.GetPageTitle(PeopleResource.ProductName);
        }
Пример #30
0
        private static String GetDefaultPhoto(Size photoSize)
        {
            const int contacе_id = -1;

            var defaultPhotoUri = FromCache(contacе_id, photoSize);

            if (!String.IsNullOrEmpty(defaultPhotoUri))
            {
                return(defaultPhotoUri);
            }

            defaultPhotoUri = WebImageSupplier.GetAbsoluteWebPath(String.Format("empty_people_logo_{0}_{1}.png", photoSize.Height, photoSize.Width), WebItemManager.MailProductID);

            ToCache(contacе_id, defaultPhotoUri, photoSize);

            return(defaultPhotoUri);
        }