예제 #1
0
        private static void ConfigureComments(CommentsList commentList)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.BehaviorID = "_commentsWikiObj";
            commentList.IsShowAddCommentBtn = CommunitySecurity.CheckPermissions(Common.Constants.Action_AddComment);
            commentList.ModuleName = "wiki";
            commentList.FckDomainName = "wiki_comments";
            commentList.ObjectID = "wiki_page";
        }
예제 #2
0
        private static void ConfigureComments(CommentsList commentList, FeedNS.Feed feed)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.BehaviorID    = "_commentsObj";
            commentList.FckDomainName = "news_comments";
            commentList.ModuleName    = "news";

            commentList.ObjectID = feed != null?feed.Id.ToString(CultureInfo.CurrentCulture) : "";
        }
예제 #3
0
        private static void ConfigureComments(CommentsList commentList, int totalCount, Post postToUpdate)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.IsShowAddCommentBtn = CommunitySecurity.CheckPermissions(postToUpdate, Constants.Action_AddComment);
            commentList.FckDomainName       = commentList.ObjectID = postToUpdate != null?postToUpdate.ID.ToString() : "";

            commentList.BehaviorID    = "commentsObj";
            commentList.ModuleName    = "blogs";
            commentList.FckDomainName = "blogs_comments";

            commentList.TotalCount = totalCount;
        }
        private void ConfigureComments(CommentsList commentList)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            // add comments permission check
            commentList.IsShowAddCommentBtn = BookmarkingPermissionsCheck.PermissionCheckCreateComment();

            commentList.BehaviorID    = "commentsObj";
            commentList.ModuleName    = "bookmarks";
            commentList.FckDomainName = "bookmarking_comments";
            commentList.TotalCount    = BookmarkComments.Count;
            commentList.ShowCaption   = false;
            commentList.ObjectID      = BookmarkID.ToString();
        }
예제 #5
0
        private static void ConfigureComments(CommentsList commentList, FeedNS.Feed feed)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);
            commentList.Simple        = false;
            commentList.BehaviorID    = "_commentsObj";
            commentList.FckDomainName = "news_comments";

            commentList.JavaScriptAddCommentFunctionName        = "Default.AddComment";
            commentList.JavaScriptPreviewCommentFunctionName    = "Default.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "Default.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "Default.UpdateComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "Default.LoadCommentText";

            commentList.ObjectID = feed != null?feed.Id.ToString(CultureInfo.CurrentCulture) : "";
        }
        private void ConfigureComments(CommentsList commentList, ProjectEntity taskToUpdate)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);
            var commentsCount = Page.EngineFactory.CommentEngine.Count(taskToUpdate);

            commentList.IsShowAddCommentBtn = ProjectSecurity.CanCreateComment(taskToUpdate);

            commentList.ObjectID = taskToUpdate != null?taskToUpdate.ID.ToString(CultureInfo.InvariantCulture) : "";

            commentList.BehaviorID         = "commentsObj";
            commentList.ModuleName         = "projects_" + typeof(T).Name;
            commentList.FckDomainName      = "projects_comments";
            commentList.OnRemovedCommentJS = "ASC.Projects.Common.removeComment";
            commentList.TotalCount         = commentsCount;
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var discussionFilesControl = (Attachments)LoadControl(Attachments.Location);

            discussionFilesControl.EmptyScreenVisible = false;
            discussionFilesControl.ModuleName         = "projects";
            phAttachmentsControl.Controls.Add(discussionFilesControl);

            CommonControlsConfigurer.CommentsConfigure(commonComments);
            commonComments.ObjectID           = "common";
            commonComments.ShowCaption        = false;
            commonComments.BehaviorID         = "commentsObj";
            commonComments.FckDomainName      = "projects_comments";
            commonComments.OnRemovedCommentJS = "ASC.Projects.Common.removeComment";
            commonComments.InitJS             = false;
        }
예제 #8
0
        private static void ConfigureComments(CommentsList commentList, string pageName)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.Simple     = false;
            commentList.BehaviorID = "_commentsWikiObj";

            commentList.IsShowAddCommentBtn = CommunitySecurity.CheckPermissions(Common.Constants.Action_AddComment);

            commentList.JavaScriptAddCommentFunctionName        = "_Default.AddComment";
            commentList.JavaScriptPreviewCommentFunctionName    = "_Default.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "_Default.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "_Default.UpdateComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "_Default.LoadCommentText";
            commentList.FckDomainName = "wiki_comments";

            commentList.ObjectID = pageName.HtmlEncode();
        }
예제 #9
0
        private static void ConfigureComments(CommentsList commentList, int totalCount, Post postToUpdate)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.IsShowAddCommentBtn = CommunitySecurity.CheckPermissions(postToUpdate, Constants.Action_AddComment);
            commentList.CommentsCountTitle  = totalCount > 0 ? totalCount.ToString() : "";
            commentList.FckDomainName       = commentList.ObjectID = postToUpdate != null?postToUpdate.ID.ToString() : "";

            commentList.Simple     = false;
            commentList.BehaviorID = "commentsObj";
            commentList.JavaScriptAddCommentFunctionName        = "ViewBlog.AddComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "ViewBlog.LoadCommentBBCode";
            commentList.JavaScriptPreviewCommentFunctionName    = "ViewBlog.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "ViewBlog.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "ViewBlog.UpdateComment";
            commentList.FckDomainName = "blogs_comments";

            commentList.TotalCount = totalCount;
        }
예제 #10
0
        private void ConfigureComments(CommentsList commentList)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            // add comments permission check
            commentList.IsShowAddCommentBtn = BookmarkingPermissionsCheck.PermissionCheckCreateComment();
            commentList.CommentsCountTitle  = BookmarkComments.Count.ToString();
            commentList.Simple     = false;
            commentList.BehaviorID = "commentsObj";
            commentList.JavaScriptAddCommentFunctionName        = "CommentsUserControl.AddComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "CommentsUserControl.LoadCommentBBCode";
            commentList.JavaScriptPreviewCommentFunctionName    = "CommentsUserControl.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "CommentsUserControl.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "CommentsUserControl.UpdateComment";
            commentList.FckDomainName = "bookmarking_comments";
            commentList.TotalCount    = BookmarkComments.Count;
            commentList.ShowCaption   = false;
            commentList.ObjectID      = BookmarkID.ToString();
        }
        private static void ConfigureComments(CommentsList commentList, Message messageToUpdate)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.IsShowAddCommentBtn = ProjectSecurity.CanCreateComment();
            commentList.CommentsCountTitle  = messageToUpdate != null
                ? Global.EngineFactory.GetCommentEngine().Count(messageToUpdate).ToString(CultureInfo.InvariantCulture) : "";

            commentList.ObjectID = messageToUpdate != null
                ? messageToUpdate.ID.ToString(CultureInfo.InvariantCulture) : "";

            commentList.Simple     = false;
            commentList.BehaviorID = "commentsObj";
            commentList.JavaScriptAddCommentFunctionName        = "AjaxPro.DiscussionDetails.AddComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "AjaxPro.DiscussionDetails.LoadCommentBBCode";
            commentList.JavaScriptPreviewCommentFunctionName    = "AjaxPro.DiscussionDetails.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "AjaxPro.DiscussionDetails.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "AjaxPro.DiscussionDetails.UpdateComment";
            commentList.FckDomainName = "projects_comments";
            commentList.TotalCount    = messageToUpdate != null?Global.EngineFactory.GetCommentEngine().Count(messageToUpdate) : 0;
        }
예제 #12
0
        private static void ConfigureComments(CommentsList commentList, Task taskToUpdate)
        {
            var commentsCount = Global.EngineFactory.GetCommentEngine().Count(taskToUpdate);

            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.IsShowAddCommentBtn = ProjectSecurity.CanCreateComment();

            commentList.CommentsCountTitle = commentsCount != 0 ? commentsCount.ToString() : "";

            commentList.ObjectID = taskToUpdate != null?taskToUpdate.ID.ToString() : "";

            commentList.Simple     = false;
            commentList.BehaviorID = "commentsObj";
            commentList.JavaScriptAddCommentFunctionName        = "AjaxPro.TaskDescriptionView.AddComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "AjaxPro.TaskDescriptionView.LoadCommentBBCode";
            commentList.JavaScriptPreviewCommentFunctionName    = "AjaxPro.TaskDescriptionView.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "AjaxPro.TaskDescriptionView.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "AjaxPro.TaskDescriptionView.UpdateComment";
            commentList.FckDomainName = "projects_comments";

            commentList.TotalCount = commentsCount;
        }
예제 #13
0
        private static void ConfigureCommentsList(CommentsList commentList, AlbumItem image)
        {
            CommonControlsConfigurer.CommentsConfigure(commentList);

            commentList.IsShowAddCommentBtn = CommunitySecurity.CheckPermissions(PhotoConst.Action_AddComment);
            commentList.Simple = Core.Mobile.MobileDetector.IsRequestMatchesMobile(HttpContext.Current);

            var count = image != null ? image.CommentsCount : 0;

            commentList.CommentsCountTitle = count.ToString();

            commentList.ObjectID = image != null?image.Id.ToString() : "";

            commentList.BehaviorID = "commentsObj";
            commentList.TotalCount = count;

            commentList.JavaScriptAddCommentFunctionName        = "PhotoDetails.AddComment";
            commentList.JavaScriptLoadBBcodeCommentFunctionName = "PhotoDetails.LoadCommentText";
            commentList.JavaScriptPreviewCommentFunctionName    = "PhotoDetails.GetPreview";
            commentList.JavaScriptRemoveCommentFunctionName     = "PhotoDetails.RemoveComment";
            commentList.JavaScriptUpdateCommentFunctionName     = "PhotoDetails.UpdateComment";
            commentList.FckDomainName = "photomanager_comments";
        }