Changeset 12372

Show
Ignore:
Timestamp:
09/19/07 00:44:21 (1 year ago)
Author:
flack
Message:

some more XHMTL validation fixes for onxxx attributes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager/widget_contactchooser.php

    r3972 r12372  
    22/** 
    33 * @package midcom.helper.datamanager 
    4  * @author The Midgard Project, http://www.midgard-project.org  
     4 * @author The Midgard Project, http://www.midgard-project.org 
    55 * @version $Id$ 
    66 * @copyright The Midgard Project, http://www.midgard-project.org 
     
    1616 
    1717class midcom_helper_datamanager_widget_contactchooser extends midcom_helper_datamanager_widget { 
    18      
     18 
    1919    /** 
    20      * URL to the OpenPSA Contacts installation's FOAF search interface.  
     20     * URL to the OpenPSA Contacts installation's FOAF search interface. 
    2121     * For example https://openpsa.example.net/contacts/search/foaf/ 
    22      *  
     22     * 
    2323     * @var string 
    2424     */ 
    2525    var $contacts_url; 
    26      
     26 
    2727    /** 
    2828     * Whether this is a multiple select or not 
     
    3030     */ 
    3131    var $_multiple = false; 
    32      
     32 
    3333    /** 
    3434     * Whether to look up DBE parameters of persons 
     
    3939    function _constructor (&$datamanager, $field, $defaultvalue) { 
    4040            parent::_constructor ($datamanager, $field, $defaultvalue); 
    41          
     41 
    4242        if (!array_key_exists('widget_contactchooser_contacts_url', $this->_field)) 
    4343        { 
     
    4646            $this->_field['widget_contactchooser_contacts_url'] = $this->_find_contacts_url(); 
    4747        } 
    48          
     48 
    4949        if (array_key_exists('datatype', $this->_field)) 
    5050        { 
     
    5454            } 
    5555        } 
    56              
     56 
    5757        $this->contacts_url = $this->_field['widget_contactchooser_contacts_url']; 
    58              
     58 
    5959        // This component uses Ajax, include the handler javascripts 
    60         $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.helpers/messages.js");         
     60        $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.helpers/messages.js"); 
    6161        $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.helpers/ajaxutils.js"); 
    6262        $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/midcom.helper.datamanager/contactchooser_ajax.js"); 
     
    7575    } 
    7676 
    77     function _read_formdata ()  
     77    function _read_formdata () 
    7878    { 
    7979        debug_push_class(__CLASS__, __FUNCTION__); 
     
    8989 
    9090        // Read form data only if we have submitted 
    91         if (array_key_exists("midcom_helper_datamanager_submit", $_POST))  
     91        if (array_key_exists("midcom_helper_datamanager_submit", $_POST)) 
    9292        { 
    9393            //Reset multiple selection array (since we only get information about checked boxes) 
     
    129129        else 
    130130        { 
    131             echo "<li>{$person->lastname}, {$person->firstname}</li>\n";   
    132         } 
    133     } 
    134  
    135     function draw_view()  
     131            echo "<li>{$person->lastname}, {$person->firstname}</li>\n"; 
     132        } 
     133    } 
     134 
     135    function draw_view() 
    136136    { 
    137137        if (!$this->_value) { 
     
    142142        //Do we have IDs or GUIDs as values. 
    143143        $idtype = $this->_datatype2identifier(); 
    144          
     144 
    145145        if ($this->_multiple) 
    146146        { 
     
    163163        echo "</div>\n"; 
    164164    } 
    165      
     165 
    166166    function draw_widget () { 
    167167        echo '<script type="text/javascript" language="text/javascript" src="'.MIDCOM_STATIC_URL . '/org.openpsa.helpers/ajaxutils.js"></script>'; 
     
    171171        echo '<div class="widget_contactchooser">'; 
    172172        // This should be hidden unless there are selected results, then made visible using JS 
    173         echo "<ul class=\"widget_contactchooser_selected hidden\" id=\"widget_contactchooser_selected_{$this->_fieldname}\">\n";         
     173        echo "<ul class=\"widget_contactchooser_selected hidden\" id=\"widget_contactchooser_selected_{$this->_fieldname}\">\n"; 
    174174        if ($this->_value) 
    175175        { 
     
    202202            { 
    203203                $person = new midcom_baseclasses_database_person($this->_value); 
    204                 /*  
     204                /* 
    205205                echo "<li><input type='checkbox' checked='checked' name='{$this->_fieldname}[{$this->_value}]' id='widget_contactchooser_{$this->_fieldname}' />"; 
    206206                echo "<label for=\"widget_contactchooser_{$this->_fieldname}\">{$person->rname}</label></li>\n"; 
     
    216216        //Check datatype, set return mode 
    217217        $modeString = $this->_datatype2identifier(); 
    218          
     218 
    219219        //Check multiple, set action mode 
    220220        if ($this->_multiple) 
     
    226226            $modeString .= ', single'; 
    227227        } 
    228          
     228 
    229229        echo "<input type='hidden' id='{$this->_fieldname}_ajaxWidgetMode' value='{$modeString}' />\n"; 
    230230        echo "<input type='hidden' id='{$this->_fieldname}_ajaxUrl' value='{$this->contacts_url}' />\n"; 
     
    232232        // TODO: Support Safari <input type="search" /> 
    233233        // http://weblogs.mozillazine.org/hyatt/archives/2004_07.html#005890 
    234         echo "<input type='text' autocomplete='off' class='ajax_editable' id='{$this->_fieldname}' onFocus='ooAjaxFocus(this);' onBlur='ooAjaxBlur_noSave(this);' onKeyUp='ooAjaxChange(this);' />\n"; 
    235          
     234        echo "<input type='text' autocomplete='off' class='ajax_editable' id='{$this->_fieldname}' onfocus='ooAjaxFocus(this);' onblur='ooAjaxBlur_noSave(this);' onkeyup='ooAjaxChange(this);' />\n"; 
     235 
    236236        // Here we place the search results, hidden by default 
    237237        echo "<ul class=\"widget_contactchooser_resultset\" style=\"display: none;\" id=\"widget_contactchooser_resultset_{$this->_fieldname}\"></ul>\n"; 
    238238        echo '</div>'; 
    239          
    240     } 
    241      
     239 
     240    } 
     241 
    242242    function _datatype2identifier() 
    243243    { 
     
    253253                return 'guid'; 
    254254            break; 
    255         }     
    256     } 
    257      
     255        } 
     256    } 
     257 
    258258} 
    259259 
  • trunk/midcom/org.openpsa.contacts/style/show-group-persons-item.php

    r5048 r12372  
    1515        <input id=\"editable_title_{$data['person']->guid}_ajaxDefault\" value=\"".$data['l10n']->get('<title>')."\" type=\"hidden\" /> 
    1616        <input id=\"editable_title_{$data['person']->guid}_ajaxUrl\" value=\"{$node[MIDCOM_NAV_FULLURL]}group/{$data['group']->guid}/update_member_title/\" type=\"hidden\" /> 
    17         <input id=\"editable_title_{$data['person']->guid}\" name=\"member_title[{$data['member']->id}]\" class=\"ajax_editable\" style=\"width: 80%;\" onFocus=\"ooAjaxFocus(this)\" onBlur=\"ooAjaxBlur(this)\" value=\"{$data['member_title']}\" /> 
     17        <input id=\"editable_title_{$data['person']->guid}\" name=\"member_title[{$data['member']->id}]\" class=\"ajax_editable\" style=\"width: 80%;\" onfocus=\"ooAjaxFocus(this)\" onblur=\"ooAjaxBlur(this)\" value=\"{$data['member_title']}\" /> 
    1818        </li>\n"; 
    1919} 
  • trunk/midcom/org.openpsa.contacts/style/show-person-groups-item.php

    r5048 r12372  
    1010    $view_title_form = "<input id=\"editable_title_{$group_guid}_ajaxDefault\" value=\"".$data['l10n']->get('<title>')."\" type=\"hidden\" />\n"; 
    1111    $view_title_form .= "<input id=\"editable_title_{$group_guid}_ajaxUrl\" value=\"{$node[MIDCOM_NAV_FULLURL]}group/{$group_guid}/update_member_title/\" type=\"hidden\" />\n"; 
    12     $view_title_form .= "<input id=\"editable_title_{$group_guid}\" name=\"member_title[{$data['member']->id}]\" class=\"ajax_editable\" style=\"width: 80%;\" onFocus=\"ooAjaxFocus(this)\" onBlur=\"ooAjaxBlur(this)\" value=\"{$data['member_title']}\" />\n"; 
     12    $view_title_form .= "<input id=\"editable_title_{$group_guid}\" name=\"member_title[{$data['member']->id}]\" class=\"ajax_editable\" style=\"width: 80%;\" onfocus=\"ooAjaxFocus(this)\" onblur=\"ooAjaxBlur(this)\" value=\"{$data['member_title']}\" />\n"; 
    1313} 
    1414else