Changeset 7125 for extensions/GMaps/admin
- Timestamp:
- Oct 7, 2010, 8:04:43 PM (14 years ago)
- Location:
- extensions/GMaps/admin
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/admin/gmaps_maps.tpl
r7054 r7125 1 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js"}3 2 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"} 4 3 {known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"} … … 57 56 ); 58 57 59 $('#iBDMapId').bind('keyup focusout', function (event) 60 { 61 if(!checkIdValidity($(this).val())) 62 { 63 $(this).addClass('error'); 64 } 65 else 66 { 67 $(this).removeClass('error'); 58 $('#iBDDisplayTypeIC, #iBDDisplayTypeIP, #iBDDisplayTypeMP').bind('change', 59 function () 60 { 61 switch($(this).val()) 62 { 63 case 'IC': 64 $('#iBDZoomLevelRow').hide(); 65 $('[name=fBDSizeMode]').attr('disabled', false); 66 break; 67 case 'IP': 68 $('#iBDZoomLevelRow').show(); 69 $('[name=fBDSizeMode]').attr('disabled', false); 70 break; 71 case 'MP': 72 $('#iBDZoomLevelRow').show(); 73 $('#iBDSizeModeF').attr('checked', true).change(); 74 $('[name=fBDSizeMode]').attr('disabled', true); 75 break; 68 76 } 69 77 } 70 78 ); 71 79 80 $('#iBDSizeModeA, #iBDSizeModeF').bind('change', 81 function () 82 { 83 switch($(this).val()) 84 { 85 case 'A': 86 $('#iBDMapWidthSliderRow, #iBDMapHeightSliderRow').hide(); 87 break; 88 case 'F': 89 $('#iBDMapWidthSliderRow, #iBDMapHeightSliderRow').show(); 90 break; 91 } 92 } 93 ); 72 94 73 95 $("#iBDMapWidthSlider").slider( … … 326 348 * @param String tabsheet : id of the tabsheet to display 327 349 */ 328 this.display Prop= function (tabsheet)350 this.displayTab = function (tabsheet) 329 351 { 330 352 switch(tabsheet) … … 368 390 properties.id=id; 369 391 updateDialog(''); 370 this.displayProp('general'); 392 this.displayTab('general'); 393 // >> because li items don't have id... :-( 394 $('#itab2 li').removeClass('selected_tab').addClass('normal_tab'); 395 $('#itab2 li:first').addClass('selected_tab'); 396 // << 371 397 372 398 $('#iDialogEdit') … … 458 484 if(items=='') 459 485 { 460 $('#iBDMapId').val(''); 486 tmp={ 487 sizeMode:'A', 488 displayTYpe:'IC' 489 } 461 490 $('#iBDName').val(''); 491 $('#iBDDisplayTypeIC').attr('checked', true); 492 $('#iBDSizeModeA').attr('checked', true); 462 493 $('#iBDMapWidthSliderValue').val('470'); 463 494 $('#iBDMapHeightSliderValue').val('210'); … … 486 517 487 518 $('#iBDNumId').val(tmp.id); 488 $('#iBDMapId').val(tmp.mapId);489 519 $('#iBDName').val(tmp.name); 520 $('#iBDDisplayType'+tmp.displayType).attr('checked', true); 521 $('#iBDSizeMode'+tmp.sizeMode).attr('checked', true); 490 522 $('#iBDMapWidthSliderValue').val(tmp.width); 491 523 $('#iBDMapHeightSliderValue').val(tmp.height); … … 507 539 } 508 540 541 $('#iBDDisplayType'+tmp.displayType+', #iBDSizeMode'+tmp.sizeMode).change(); 509 542 changeSize($('#iBDMapWidthSliderValue').val(), 'iBDMapWidthSlider'); 510 543 changeSize($('#iBDMapHeightSliderValue').val(), 'iBDMapHeightSlider'); … … 558 591 ok=true; 559 592 560 if(checkIdValidity($('#iBDMapId').val())==false)561 {562 $('#iBDMapId').addClass('error');563 alert('{/literal}{"gmaps_invalidId"|@translate}{literal}');564 ok=false;565 }566 567 593 return(ok); 568 594 } … … 578 604 // build datas 579 605 datas = { 580 mapId:$('#iBDMapId').val(),581 606 name:$('#iBDName').val(), 607 displayType:$('[name=fBDDisplayType]:checked').val(), 608 sizeMode:$('[name=fBDSizeMode]:checked').val(), 582 609 width:$('#iBDMapWidthSliderValue').val(), 583 610 height:$('#iBDMapHeightSliderValue').val(), … … 652 679 <table id='iHeaderListMaps' class="littlefont"> 653 680 <tr> 654 <th style="width:150px;">{'gmaps_id'|@translate}</th>655 681 <th>{'gmaps_name'|@translate}</th> 682 <th style="width:150px;">{'gmaps_displayType'|@translate}</th> 656 683 <th style="width:90px;">{'gmaps_dimensions'|@translate}</th> 657 684 <th style="width:90px;">{'gmaps_zoomLevel'|@translate}</th> … … 685 712 <table class='formtable'> 686 713 <tr> 687 <td>{'gmaps_ id'|@translate}</td>688 <td> 689 <input type='text' id='iBD MapId' maxlength=12 size=12value=''>714 <td>{'gmaps_name'|@translate}</td> 715 <td> 716 <input type='text' id='iBDName' maxlength=80 size=60 value=''> 690 717 </td> 691 718 </tr> 692 719 693 720 <tr> 694 <td>{'gmaps_name'|@translate}</td> 695 <td> 696 <input type='text' id='iBDName' maxlength=80 size=60 value=''> 697 </td> 698 </tr> 721 <td>{'gmaps_displayType'|@translate}</td> 722 <td> 723 <label><input type='radio' id='iBDDisplayTypeIC' name='fBDDisplayType' value='IC'> {'gmaps_displayTypeIC'|@translate}</label><br> 724 <label><input type='radio' id='iBDDisplayTypeIP' name='fBDDisplayType' value='IP'> {'gmaps_displayTypeIP'|@translate}</label><br> 725 <label><input type='radio' id='iBDDisplayTypeMP' name='fBDDisplayType' value='MP'> {'gmaps_displayTypeMP'|@translate}</label> 726 </td> 727 </tr> 728 699 729 </table> 700 730 </div> 701 731 702 732 <div id='iTabDimensions' style='display:none;'> 733 703 734 <table class="formtable"> 704 735 <tr> 705 <td>{'gmaps_width'|@translate}</td> 736 <td>{'gmaps_map_dimensions_are'|@translate}</td> 737 <td colspan="3"> 738 <label><input type="radio" id="iBDSizeModeA" name="fBDSizeMode" value="A"> {'gmaps_interface_dimensions_a'|@translate}</label><br> 739 <label><input type="radio" id="iBDSizeModeF" name="fBDSizeMode" value="F"> {'gmaps_interface_dimensions_f'|@translate}</label> 740 </td> 741 </tr> 742 743 <tr id='iBDMapWidthSliderRow'> 744 <td> </td> 745 <td style='padding-left:30px;'>{'gmaps_width'|@translate}</td> 706 746 <td> 707 747 <input type="hidden" id="iBDMapWidthSliderValue" value=""> … … 712 752 </td> 713 753 </tr> 714 <tr> 715 <td>{'gmaps_height'|@translate}</td> 754 <tr id='iBDMapHeightSliderRow'> 755 <td> </td> 756 <td style='padding-left:30px;'>{'gmaps_height'|@translate}</td> 716 757 <td> 717 758 <input type="hidden" id="iBDMapHeightSliderValue" value=""> … … 775 816 <div id='iTabZoomLevel' style='display:none;'> 776 817 <table class='formtable'> 777 <tr >818 <tr id='iBDZoomLevelRow'> 778 819 <td>{'gmaps_zoomLevel'|@translate}</td> 779 820 <td> -
extensions/GMaps/admin/gmaps_maps_iListMaps.tpl
r7054 r7125 2 2 {foreach from=$datas item=data} 3 3 <tr> 4 <td style="width:150px;">{$data.mapId}</td>5 4 <td>{$data.name}</td> 5 <th style="width:150px;">{$data.displayType}</th> 6 6 <th style="width:90px;">{$data.dimensions}</th> 7 7 <th style="width:90px;">{$data.zoomLevel}</th>
Note: See TracChangeset
for help on using the changeset viewer.