CA Service Management

 View Only
  • 1.  How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted Apr 28, 2016 03:44 PM

    Hello, Community!

     

    I am requesting some help for a little problem that I cannot solve.

     

    Through Employee function, the Log Table (Alg) doesn't wrap the line. I have tried every parameter of PDM_FMT but the line doesn't break, forcing the user to use the horizontal bar to read the entire information.

     

     

    Below following the part of the original code of detail_cr form (lines 40 and 76 presents the field):

                   <table width=90% summary="$args.ref_num - Linha 4 dos detalhes da chamado - Histórico" cellpadding=1 cellspacing=5>
                             <tr>
                                  <TH ALIGN=left VALIGN=baseline CLASS=detailro scope=col>Contato</TH>
                                  <TH ALIGN=left VALIGN=baseline CLASS=detailro scope=col>Data</TH>
                                  <TH ALIGN=left VALIGN=baseline CLASS=detailro scope=col>Tipo</TH>
                                  <TH ALIGN=left VALIGN=baseline CLASS=detailro scope=col>Resumo</TH>
                             </tr>
    <!-- SDT 8275 Different list source depending if login user can see internal logs -->
    <PDM_IF $prop.view_internal == 0>
    <PDM_LIST SOURCE=args.act_log>
                             <tr>
                                  <td CLASS=detailro ALIGN=left VALIGN=top>
    <PDM_FMT WIDTH=20>$args.act_log.analyst.combo_name</PDM_FMT>
                                  </TD>
                                  <TD CLASS=detailro ALIGN=left VALIGN=top>
                                       <script>
                                            date_to_string('$args.act_log.time_stamp_INT_DATE', 1);
                                       </script>
                                  </TD>
    <SCRIPT>
    if ( "$args.act_log.type.code" == "SBLIVELOG")
    {
        var alghtml = "<TD NOWRAP VALIGN=TOP class=detailro>";
        alghtml += "$args.act_log.type.sym</TD>\n";
        document.writeln(alghtml);
    }
    else if (("$args.act_log.type.code" == "KTSOLN" || "$args.act_log.type.code" == "KTREJECT") &&
        "$args.act_log.session" != "")
    {
        var alghtml = "<TD NOWRAP VALIGN=TOP class=detailro>";
        alghtml += "<A TITLE='Clique para exibir o documento de conhecimento ${$args.act_log.session:}' HREF=\"javascript:popup_window('','SHOW_DETAIL', 0, 0, 'directories=no,location=no,menubar=no,status=no,topsplash=no,menubar=no','PERSID=KD:$args.act_log.session', 'HTMPL=kt_document_view.htmpl', 'opener=simple', 'open_mode=2', 'reload=1', 'SOLUTION_OF=" + nx_escape('$args.persistent_id') + "', 'disable_solution_survey=true', 'TICKET_FACTORY=cr', 'SOLUTION_OF_ID=$args.id')\">\n";
        alghtml += "$args.act_log.type.sym</A></TD>\n";
        document.writeln(alghtml);
    }
    else
    {
        document.writeln("<TD CLASS=detailro ALIGN=left VALIGN=top>$args.act_log.type.sym</TD>");
    }
    document.write("<TD CLASS=detailro ALIGN=left VALIGN=top>");
    document.write(nx_unescape('<PDM_FMT JUSTIFY=LINE ESC_STYLE=JS2>$args.act_log.description</PDM_FMT>'));
    document.writeln("</td>");
    </SCRIPT>
                             </tr>
    </PDM_LIST>
    <PDM_ELSE> <!-- See all logs -->
    <PDM_LIST SOURCE=args.act_log_all>
                             <tr>
                                  <TD CLASS=detailro ALIGN=left VALIGN=top>
    <PDM_FMT WIDTH=20>$args.act_log_all.analyst.combo_name</PDM_FMT>
                                  </TD>
                                  <TD CLASS=detailro ALIGN=left VALIGN=top>
                                       <script>
                                            date_to_string('$args.act_log_all.time_stamp_INT_DATE', 1);
                                       </script>
                                  </TD>
    <SCRIPT>
    if ( "$args.act_log_all.type.code" == "SBLIVELOG")
    {
        var alghtml = "<TD NOWRAP VALIGN=TOP class=detailro>";
        alghtml += "$args.act_log_all.type.sym</TD>\n";
        document.writeln(alghtml);
    }
    else if (("$args.act_log_all.type.code" == "KTSOLN" || "$args.act_log_all.type.code" == "KTREJECT") &&
        "$args.act_log_all.session" != "")
    {
        var alghtml = "<TD NOWRAP VALIGN=TOP class=detailro>";
        alghtml += "<A TITLE='Clique para exibir o documento de conhecimento ${$args.act_log_all.session:}' HREF=\"javascript:popup_window('','SHOW_DETAIL', 0, 0, 'directories=no,location=no,menubar=no,status=no,topsplash=no,menubar=no','PERSID=KD:$args.act_log_all.session', 'HTMPL=kt_document_view.htmpl', 'opener=search_tools', 'open_mode=2', 'reload=1', 'SOLUTION_OF=" + nx_escape('$args.persistent_id') + "', 'disable_solution_survey=true', 'TICKET_FACTORY=cr', 'SOLUTION_OF_ID=$args.id')\">\n";
        alghtml += "$args.act_log_all.type.sym</A></TD>\n";
        document.writeln(alghtml);
    }
    else
    {
        document.writeln("<TD CLASS=detailro ALIGN=left VALIGN=top>$args.act_log_all.type.sym</TD>");
    }
    document.write("<TD CLASS=detailro ALIGN=left VALIGN=top>");
    document.write(nx_unescape('<PDM_FMT JUSTIFY=LINE ESC_STYLE=JS2>$args.act_log_all.description</PDM_FMT>'));
    document.writeln("</td>");
    </SCRIPT>
                             </tr>
    </PDM_LIST>
    </PDM_IF>
    

     

    Is there any parameter or any function to break this line?

    Thanks in advance.

     

     



  • 2.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted Apr 29, 2016 12:05 AM

    hi,

    this behaviour should be configured via CSS settings, firstly try to remove "NOWRAP" word from <TD> tag

    regards,

    cdtj



  • 3.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted Apr 29, 2016 10:30 AM

    Hello CDTJ,

    I removed all NOWRAP parameter but it doesn't work. As you said maybe I must modify the css file, but what file? Where? Do you know?



  • 4.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted May 04, 2016 05:05 AM

    have checked in my env, detailro class have white-space: nowrap attribute.

    You can add this code to <td> tag: style="white-space: normal;":

    <td valign=top class="detailro" style="white-space: normal;">



  • 5.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted May 13, 2016 09:05 AM

    Thanks, but unfortunately it did not work.

     

    I tried this syntax as below but the field was blank (line 75). Did I do something wrong?

     

    document.write("<TD VALIGN=top class="detailro" style="white-space: normal;">");

    document.write(nx_unescape('<PDM_FMT JUSTIFY=LINE ESC_STYLE=JS2>$args.act_log.description</PDM_FMT>'));

    document.writeln("</td>");

     

     



  • 6.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?
    Best Answer

    Posted May 14, 2016 04:27 AM

    Yeah you need to unescape quotes or use single quoute:

     

    document.write("<TD VALIGN=top class=\"detailro\" style=\"white-space: normal;\">");

    or

    document.write('<TD VALIGN=top class="detailro" style="white-space: normal;">');

     

    Regards,

    cdtj



  • 7.  Re: How to break (wrap) lines of Alg table in employee form detail_cr?

    Posted May 16, 2016 09:06 AM

    Fantastic! It's working!

    You're the master. Thank you so much for the help.