Changeset 7132 for extensions/GMaps/admin/gmaps_category_maps.tpl
- Timestamp:
- Oct 9, 2010, 12:28:05 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/admin/gmaps_category_maps.tpl
r7125 r7132 49 49 50 50 $('#iBDAssocMapId').bind('change', changeMapDisplayType); 51 $('[name=fBDAssocKmlFile]').bind('change', changeKmlFileSource); 51 52 52 53 loadList(); 53 54 } 55 56 /** 57 * called when the source of kml file changed 58 */ 59 var changeKmlFileSource = function () 60 { 61 switch($('[name=fBDAssocKmlFile]:checked').val()) 62 { 63 case 'N': 64 $('#iBDAssocKmlFileId').css('display', 'none'); 65 $('#iBDAssocKmlFileUrl').css('display', 'none'); 66 $('#iBDKmlWarning').css('display', 'none'); 67 break; 68 case 'S': 69 $('#iBDAssocKmlFileId').css('display', 'block'); 70 $('#iBDAssocKmlFileUrl').css('display', 'none'); 71 $('#iBDKmlWarning').css('display', 'block'); 72 break; 73 case 'U': 74 $('#iBDAssocKmlFileId').css('display', 'none'); 75 $('#iBDAssocKmlFileUrl').css('display', 'block'); 76 $('#iBDKmlWarning').css('display', 'block'); 77 break; 78 } 54 79 } 55 80 … … 196 221 $('#iBDAssocMapId').val($('#iBDAssocMapId option:first').val()); 197 222 $('#iBDAssocApplySubCat').val('y'); 223 $('#iBDAssocKmlNone').attr('checked', true); 224 $('#iBDAssocKmlFileId').val($('#iBDAssocKmlFileId option:first').val()); 198 225 $('#iBDAssocKmlFileUrl').val(''); 199 $('#iBDAssocIcon').val($('#iBDAssocIcon option: visible:first').val());226 $('#iBDAssocIcon').val($('#iBDAssocIcon option:first').val()); 200 227 $('#iBDAssocTitle').val(''); 201 228 } … … 207 234 $('#iBDAssocMapId').val(tmp.mapId); 208 235 $('#iBDAssocApplySubCat').val(tmp.applySubCat); 236 if(tmp.kmlFileId>0) 237 { 238 $('#iBDAssocKmlSelect').attr('checked', true); 239 } 240 else if(tmp.kmlFileUrl!='') 241 { 242 $('#iBDAssocKmlUrl').attr('checked', true); 243 } 244 else 245 { 246 $('#iBDAssocKmlNone').attr('checked', true); 247 } 248 $('#iBDAssocKmlFileId').val(tmp.kmlFileId); 209 249 $('#iBDAssocKmlFileUrl').val(tmp.kmlFileUrl); 210 250 $('#iBDAssocIcon').val(tmp.icon); … … 213 253 214 254 changeMapDisplayType(); 255 changeKmlFileSource(); 215 256 } 216 257 … … 269 310 mapId:$('#iBDAssocMapId').val(), 270 311 applySubCat:$('#iBDAssocApplySubCat').val(), 271 kmlFileUrl:$('#iBDAssocKmlFileUrl').val(), 312 kmlFileId:($('#iBDAssocKmlSelect').attr('checked'))?$('#iBDAssocKmlFileId').val():0, 313 kmlFileUrl:($('#iBDAssocKmlSelect').attr('checked'))?'':$('#iBDAssocKmlFileUrl').val(), 272 314 icon:$('#iBDAssocIcon').val(), 273 315 title:$('#iBDAssocTitle').val(), … … 339 381 <th>{'gmaps_category'|@translate}</th> 340 382 <th style="width:90px;">{'gmaps_apply_subcat'|@translate}</th> 341 <th style="width: 90px;">{'gmaps_mapType'|@translate}</th>342 <th style="width:35 6px;">{'gmaps_map'|@translate}</th>343 <th style="width: 90px;">{'gmaps_map_kmlfile'|@translate}</th>383 <th style="width:150px;">{'gmaps_mapType'|@translate}</th> 384 <th style="width:350px;">{'gmaps_map'|@translate}</th> 385 <th style="width:220px;">{'gmaps_map_associate_kmlfile'|@translate}</th> 344 386 <th width="40px"> </th> 345 387 </tr> … … 432 474 <td>{'gmaps_map_associate_kmlfile'|@translate}</td> 433 475 <td> 434 <input type="text" id="iBDAssocKmlFileUrl" maxlength='255' size='55' value=""> 476 <label><input type="radio" id='iBDAssocKmlNone' name="fBDAssocKmlFile" value="N"> {'gmaps_kml_file_none'|@translate}</label><br> 477 <label><input type="radio" id='iBDAssocKmlSelect' name="fBDAssocKmlFile" value="S"> {'gmaps_kml_file_selected'|@translate}</label><br> 478 <select style="margin-left:20px;margin-bottom:10px;" id="iBDAssocKmlFileId"> 479 {foreach from=$datas.kmlFiles item=file} 480 <option value='{$file.id}'>{$file.name}</option> 481 {/foreach} 482 </select> 483 484 <label><input type="radio" id='iBDAssocKmlUrl' name="fBDAssocKmlFile" value="U"> {'gmaps_kml_file_url'|@translate}</label><br> 485 <input style="margin-left:20px;" type="text" id="iBDAssocKmlFileUrl" maxlength='255' size='55' value=""><br> 486 <p id='iBDKmlWarning' class='helps' style="width:520px;padding-right:20px;">{'gmaps_kml_file_access'|@translate}</p> 487 435 488 </td> 436 489 </tr>
Note: See TracChangeset
for help on using the changeset viewer.