- Timestamp:
- Feb 14, 2010, 9:42:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/blocks/block_common.php
r512 r513 72 72 } 73 73 $output = _MB_XP2_CATS_SELECT ."<br />\n"; 74 $output .= ' <select name="categorie" '.$size.' multiple="multiple" onclick="CatSelect()">' ."\n";74 $output .= ' <select name="categorie" id="cat_sel" '.$size.' multiple="multiple" onclick="CatSelect()">' ."\n"; 75 75 $output .= $option; 76 76 $output .= '</select>'; 77 // $output .= "<input type='hidden' name='$option_name' value='$value' />\n"; 78 $output .= ' ' . _MB_XP2_CATS_DIRECT_SELECT . " <input type='text' name='$option_name' value='$value' /><br />\n"; 77 $output .= ' ' . _MB_XP2_CATS_DIRECT_SELECT . " <input type='text' name='$option_name' id='cat_csv' value='$value' /><br />\n"; 79 78 $output .= ' 80 79 <script type="text/javascript"> 81 80 function CatSelect(){ 82 81 var idx=new Array(); 83 var sel =document.forms["blockform"].elements["categorie"].options;82 var sel = document.getElementById("cat_sel").options; 84 83 for(var i=0, n=0; i<sel.length; i++){ 85 84 if(sel[i].selected){ idx[n++]=sel[i].value; } 86 85 } 87 86 if(idx.length>0){ 88 document. forms["blockform"].elements["' .$option_name . '"].value = idx;87 document.getElementById("cat_csv").value = idx; 89 88 } 90 89 } … … 123 122 124 123 $output = _MB_XP2_COM_TYPE . "<br />\n"; 125 $output .= "<input type='hidden' name='$option_name' value='$value' />\n";126 $output .= ' <select name="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n";124 $output .= "<input type='hidden' name='$option_name' id='com_hidden' value='$value' />\n"; 125 $output .= ' <select name="com_type" id="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n"; 127 126 $output .= $option; 128 127 $output .= '</select><br />'; … … 131 130 function ComTypeSelect(){ 132 131 var idx=new Array(); 133 var sel=document. forms["blockform"].elements["com_type"].options;132 var sel=document.getElementById("com_type").options; 134 133 for(var i=0, n=0; i<sel.length; i++){ 135 134 if(sel[i].selected){ idx[n++]=sel[i].value; } 136 135 } 137 136 if(idx.length>0){ 138 document.forms["blockform"].elements["' .$option_name . '"].value = idx;137 document.getElementById("com_hidden").value = idx; 139 138 } 140 139 } … … 166 165 167 166 $output = _MB_XP2_THISTEMPLATE . "\n"; 168 $output .= '<input type="hidden" size="50" name="' . $option_name . '" value="' . $value .'"/>' . "\n";169 $output .= ' <select name="template_type" onclick="Template_Make()">' ."\n";167 $output .= '<input type="hidden" size="50" name="' . $option_name . '" id="template_hide" value="' . $value .'"/>' . "\n"; 168 $output .= ' <select name="template_type" id="template_type" onclick="Template_Make()">' ."\n"; 170 169 switch ($temp_type){ 171 170 case 'db': … … 180 179 $output .= '</select>'; 181 180 $output .= '<b>:'.$mydirname . '_</b>'; 182 $output .= '<input type="text" size="30" name="none_prefix_file" value="'. $none_prefix_filename. '" onChange="Template_Make()"/><b>.html</b><br />';181 $output .= '<input type="text" size="30" name="none_prefix_file" id="none_prefix_file" value="'. $none_prefix_filename. '" onChange="Template_Make()"/><b>.html</b><br />'; 183 182 $output .= ' 184 183 <script type="text/javascript"> 185 184 function Template_Make(){ 186 var type_element = document.getElement sByName("template_type").item(0);187 var name_element = document.getElement sByName("none_prefix_file").item(0);188 var real_element = document.getElement sByName("' .$option_name . '").item(0);185 var type_element = document.getElementById("template_type"); 186 var name_element = document.getElementById("none_prefix_file"); 187 var real_element = document.getElementById("template_hide"); 189 188 190 189 var file_name = "' . $mydirname . '_" + name_element.value + ".html";
Note: See TracChangeset
for help on using the changeset viewer.