예제 #1
0
        private string GetGetBareHtml4Table()
        {
            string html = @"
        <div id='cont_@ebsid@' class='fs-grid-cont' style='height:@_height@px;'>
            <div class='rc-tbl-thead-cont'>
                <table class='table table-bordered fs-tblhead'>
                    <thead>
                        <tr>
                        <th class='slno rc-slno' style='width:50px'><span class='grid-col-title'>#</span></th>
                        <th class='grid-col-title rc-stage'><span class='grid-col-title'>Stage</span></th>
                        <th class='grid-col-title rc-status'><span class='grid-col-title'>Status</span></th>
                        <th class='grid-col-title rc-by'><span class='grid-col-title'>Reviewed by/At</span></th>
                        <th class='grid-col-title rc-remarks'><span class='grid-col-title'>Remarks</span></th>
                        ".Replace("@_height@", this.Height.ToString());

            html += @"
                        </tr>
                    </thead>
                </table>
            </div>
            <div class='rc-tbl-tbody-cont'>
                <table id='tbl_@ebsid@' class='table table-bordered fs-tbl'>
                    <tbody>";
            List <EbReviewStage> _FormStages = JsonConvert.DeserializeObject <List <EbReviewStage> >(JsonConvert.SerializeObject(FormStages));
            //_FormStages.Reverse();
            int    i = 0;
            string FormStageTrHtml = string.Empty;

            foreach (EbReviewStage FormStage in _FormStages)
            {
                EbReviewStage _FormStage    = (FormStage as EbReviewStage);
                EbReviewStage _FormStage_RS = (FormStages[i++] as EbReviewStage);

                string _html = string.Concat(@"
                        <tr name='", _FormStage.Name, "' stage-ebsid='", _FormStage.EbSid, "' rowid='@rowid@' style ='@bg@'>",
                                             "<td class='row-no-td rc-slno'>@slno@</td>",
                                             "<td class='row-no-td rc-stage' col='stage'><span class='fstd-div'>", _FormStage.Name, "</span></td>",
                                             @"<td class='row-no-td rc-status' col='status' class='fs-ctrl-td'><div class='fstd-div'>", @"
                                <select class='selectpicker'>");

                foreach (EbReviewAction stageAction in _FormStage_RS.StageActions)
                {
                    string stageActionName = stageAction.Name;
                    _html += ("<option value='" + stageAction.EbSid + "'>" + stageAction.Name + "</option>");
                }
                _html += @"
                                </select></div>
                            </td>
                            <td class='fs-ctrl-td rc-by' col='review-dtls'>
                                <div class='fstd-div'>
                                    <div class='fs-user-cont'>
                                        <div class='fs-dp' @dpstyle@></div>
                                        <div class='fs-udtls-cont'>
                                            <span class='fs-uname'> @uname@ </span>
                                            <span class='fs-time'> @time@ </span>
                                        </div>
                                    </div>
                                </div>
                            </td>
                            <td class='fs-ctrl-td rc-remarks' col='remarks'><div class='fstd-div'> <textarea class='fs-textarea' style ='@bg@ @bgimg@'>@comment@</textarea> </div></td>
                        </tr>";

                _FormStage_RS.Html = _html;
            }

            html += @"
                    </tbody>
                </table>
            </div>
            <div class='fs-submit-cont'><div class='btn btn-success fs-submit'>Execute Review <i class='fa fa-check-square-o' aria-hidden='true'></i></div></div>
        </div>";

            return(html);
        }
예제 #2
0
        //public override string GetToolHtml()
        //{
        //    return @"<div eb-type='@toolName' class='tool'><i class='fa fa-stack-exchange'></i>  Review control </div>".Replace("@toolName", this.GetType().Name.Substring(2));
        //}


        public override string GetBareHtml()
        {
            if (this.RenderAsTable)
            {
                return(GetGetBareHtml4Table());
            }

            string html = @"
<div id='cont_@ebsid@' class='fs-grid-cont rc-cmt' style='height:@_height@px;'>
    <div class='rc-msg-box'>
".Replace("@_height@", (this.Height + 74).ToString());
            List <EbReviewStage> _FormStages = JsonConvert.DeserializeObject <List <EbReviewStage> >(JsonConvert.SerializeObject(FormStages));
            //_FormStages.Reverse();
            int    i = 0;
            string FormStageTrHtml = string.Empty;

            foreach (EbReviewStage FormStage in _FormStages)
            {
                EbReviewStage _FormStage    = (FormStage as EbReviewStage);
                EbReviewStage _FormStage_RS = (FormStages[i++] as EbReviewStage);

                string _html = string.Concat(@"
                                            <div class='message' rowid='@rowid@' name='", _FormStage.Name, @"' stage-ebsid='", _FormStage.EbSid, @"' rowid='@rowid@'>
                                               <div class='fs-dp' @dpstyle@></div>
                                               <div class='bubble'>
                                                  <div class='msg-head'>", _FormStage.Name, @" @action@</div>
                                                  <div class='msg-comment'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@comment@</div>
                                                  <span class='msg-uname'>@uname@</span>
                                                  <div class='corner'></div>
                                                  <span data-toggle='tooltip' title data-original-title='@timeTitle@'>@time@</span>
                                               </div>
                                            </div>");

                string _DDhtml = "<select class='selectpicker' data-container='body'>";

                foreach (EbReviewAction stageAction in _FormStage_RS.StageActions)
                {
                    string stageActionName = stageAction.Name;
                    _DDhtml += ("<option value='" + stageAction.EbSid + "'>" + stageAction.Name + "</option>");
                }
                _DDhtml += "</select>";

                _FormStage_RS.Html   = _html;
                _FormStage_RS.DDHtml = _DDhtml;
            }

            html += @"
    </div>
    <div class='rc-inp-cont'>
        <div class='rc-inp-head'></div>
        <div class='rc-action-dp-wrap'></div>
        <div class='rc-action-dd-wrap'></div>
        <textarea id='chatSend' placeholder='Add remark' class='rc-txtarea'></textarea>
        <div class='rc-send-btn-wrap'>
        <div class='fs-submit-cont'>
            <div class='btn btn-success fs-submit'>Execute Review <i class='fa fa-check-square-o' aria-hidden='true'></i></div></div>
        </div>
    </div>
</div>";

            return(html);
        }