developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #784: 784-jForms-help-messages-should-work-without-javascript.diff

File 784-jForms-help-messages-should-work-without-javascript.diff, 2.8 KB (added by Julien, 11 years ago)
  • build/manifests/jelix-www.mn

     
    88  jacl2.css
    99cd lib/jelix-www/design/jforms/
    1010  calendar.gif
     11  help.png
    1112cd lib/jelix-www/design/images
    1213  logo_jelix_moyen.png
    1314  fond-bandeau.png
  • lib/jelix-www/design/jform.css

     
    33 *
    44 */
    55
    6 .jforms-help {}
     6.jforms-help {
     7position:relative;
     8padding-left:18px;
     9background:url(jforms/help.png) 2px center no-repeat;
     10cursor:help;
     11}
     12.jforms-help span{
     13display:none;
     14}
     15.jforms-help:hover span{
     16display:block;
     17position:absolute;
     18left:20px;
     19top:20px;
     20z-index:1000;
     21background-color:#fff;
     22width:250px;
     23color:#444;
     24border:1px solid #999;
     25font-size:0.9em;
     26padding:5px;
     27}
    728.jforms-label {}
    829.jforms-value {}
    930.jforms-readonly { color:#aaa; }
  • lib/jelix/plugins/jforms/html/html.jformsbuilder.php

     
    837837    }
    838838
    839839    protected function outputHelp($ctrl) {
    840         if ($ctrl->help) {
    841             if($ctrl->type == 'checkboxes' || ($ctrl->type == 'listbox' && $ctrl->multiple)){
    842                 $name=$ctrl->ref.'[]';
    843             }else{
    844                 $name=$ctrl->ref;
    845             }
    846             echo '<span class="jforms-help"><a href="javascript:jFormsJQ.showHelp(\''. $this->_name.'\',\''.$name.'\')">?</a></span>';
    847         }
     840        if ($ctrl->help)
     841            echo '<span class="jforms-help"><span>'.htmlspecialchars($ctrl->help).'</span></span>';
    848842    }
    849843}
  • lib/jelix/plugins/jforms/htmllight/htmllight.jformsbuilder.php

     
    822822    }
    823823
    824824    protected function outputHelp($ctrl) {
    825         if ($ctrl->help) {
    826             if($ctrl->type == 'checkboxes' || ($ctrl->type == 'listbox' && $ctrl->multiple)){
    827                 $name=$ctrl->ref.'[]';
    828             }else{
    829                 $name=$ctrl->ref;
    830             }
    831             echo '<span class="jforms-help"><a href="javascript:jForms.showHelp(\''. $this->_name.'\',\''.$name.'\')">?</a></span>';
    832         }
     825        if ($ctrl->help)
     826            echo '<span class="jforms-help"><span>'.htmlspecialchars($ctrl->help).'</span></span>';
    833827    }
    834828}