예제 #1
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) : "";
        }
예제 #2
0
        private void InitCommentsView(IFeedStorage storage, FeedNS.Feed feed)
        {
            IList<CommentInfo> comments = BuildCommentsList(storage.GetFeedComments(feed.Id));

            //AppendChildsComments(ref comments, storage.GetFeedComments(feed.Id));

            ConfigureComments(commentList, feed);
            commentList.Items = comments;
            commentList.CommentsCountTitle = GetCommentsCount(comments).ToString(CultureInfo.CurrentCulture);
            commentList.TotalCount = GetCommentsCount(comments);
        }