private void InitEmptyScreenControls()
        {
            tasksEmptyScreen.ImgSrc   = WebImageSupplier.GetAbsoluteWebPath("empty_screen_tasks.png", ProductEntryPoint.ID);
            tasksEmptyScreen.Header   = CRMTaskResource.EmptyContentTasksHeader;
            tasksEmptyScreen.Describe = String.Format(CRMTaskResource.EmptyContentTasksDescribe,
                                                      //types
                                                      "<span class='hintCategories baseLinkAction' >", "</span>");

            var buttonHtml = String.Format(
                "<a class='linkAddMediumText baseLinkAction' onclick='ASC.CRM.TaskActionView.showTaskPanel(0, {0}, \"{1}\", {2});'>{3}</a>",
                CurrentContact == null ? 0 : CurrentContact.ID,
                CurrentEntityType == EntityType.Any ? String.Empty : CurrentEntityType.ToString().ToLower(),
                EntityID,
                EntityID == 0 && CurrentContact == null ? CRMTaskResource.CreateFirstTask : CRMTaskResource.CreateTask);

            if (!MobileVer && EntityID == 0 && CurrentContact == null)
            {
                buttonHtml += String.Format(@"<br/><a class='crm-importLink' href='tasks.aspx?action=import'>{0}</a>",
                                            CRMTaskResource.ImportTasks);
            }

            tasksEmptyScreen.ButtonHTML = buttonHtml;


            emptyContentForTasksFilter.ImgSrc     = WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png", ProductEntryPoint.ID);
            emptyContentForTasksFilter.Header     = CRMTaskResource.EmptyContentTasksFilterHeader;
            emptyContentForTasksFilter.Describe   = CRMTaskResource.EmptyContentTasksFilterDescribe;
            emptyContentForTasksFilter.ButtonHTML = String.Format(
                @"<a class='crm-clearFilterButton' href='javascript:void(0);'
                                                        onclick='ASC.CRM.ListTaskView.advansedFilter.advansedFilter(null);'>
                                                            {0}
                                            </a>",
                CRMCommonResource.ClearFilter);
        }
Beispiel #2
0
        private void RegisterScript()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(@"ASC.CRM.ListTaskView.init({0},""{1}"",{2},{3},""{4}"",{5},{6},""{7}"",""{8}"", ""{9}"");",
                            CurrentContact != null ? CurrentContact.ID : 0,
                            CurrentEntityType.ToString().ToLower(),
                            EntityID,
                            Global.VisiblePageCount,
                            CookieKeyForPagination,
                            (int)HistoryCategorySystem.TaskClosed,
                            (int)ContactSelectorTypeEnum.All,
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_tasks.png", ProductEntryPoint.ID),
                            WebImageSupplier.GetAbsoluteWebPath("empty_screen_filter.png"),
                            ExportErrorCookieKey
                            );

            Page.RegisterInlineScript(sb.ToString());
        }