コード例 #1
0
 public static ResponseCollection Comment(
     this ResponseCollection res,
     Context context,
     SiteSettings ss,
     Column column,
     Comments comments,
     int deleteCommentId)
 {
     comments
     .Where(o => context.Forms.Exists("Comment" + o.CommentId))
     .ForEach(comment =>
              res.ReplaceAll(
                  Selector(comment.CommentId),
                  new HtmlBuilder().Comment(
                      context: context,
                      ss: ss,
                      column: column,
                      comment: comment,
                      readOnly: false)));
     if (deleteCommentId != 0)
     {
         res
         .Remove(Selector(deleteCommentId))
         .Focus("#Comments");
     }
     return(res);
 }
コード例 #2
0
 public static ResponseCollection Comment(
     this ResponseCollection res,
     SiteSettings ss,
     Column column,
     Comments comments,
     int deleteCommentId)
 {
     comments
     .Where(o => Forms.Exists("Comment" + o.CommentId))
     .ForEach(comment =>
              res.ReplaceAll(
                  Selector(comment.CommentId),
                  new HtmlBuilder().Comment(
                      ss: ss,
                      column: column,
                      comment: comment,
                      verType: Versions.VerTypes.Latest)));
     if (deleteCommentId != 0)
     {
         res
         .Remove(Selector(deleteCommentId))
         .Focus("#Comments");
     }
     return(res);
 }
コード例 #3
0
        private static ResponseCollection ViewFilters(
            this ResponseCollection res, Context context, SiteSettings ss, View view)
        {
            switch (context.Forms.ControlId())
            {
            case "ViewSelector":
            case "ReduceViewFilters":
            case "ExpandViewFilters":
                return(res.ReplaceAll("#ViewFilters", new HtmlBuilder()
                                      .ViewFilters(context: context, ss: ss, view: view))
                       .ReplaceAll("#ShowHistoryField",
                                   new HtmlBuilder().FieldCheckBox(
                                       fieldId: "ShowHistoryField",
                                       fieldCss: "field-auto-thin",
                                       controlId: "ViewFilters_ShowHistory",
                                       controlCss: " auto-postback",
                                       method: "post",
                                       _checked: view.ShowHistory == true,
                                       labelText: Displays.ShowHistory(context: context),
                                       _using: ss.HistoryOnGrid == true)));

            default:
                return(res);
            }
        }
コード例 #4
0
        private static ResponseCollection ViewFilters(
            this ResponseCollection res, Context context, SiteSettings ss, View view)
        {
            switch (context.Forms.ControlId())
            {
            case "ViewSelector":
            case "ReduceViewFilters":
            case "ExpandViewFilters":
                return(res.ReplaceAll("#ViewFilters", new HtmlBuilder()
                                      .ViewFilters(context: context, ss: ss, view: view)));

            default:
                return(res);
            }
        }