Ignore:
Timestamp:
Oct 7, 2010, 8:04:43 PM (14 years ago)
Author:
grum
Message:

Admin interface + Gallery integration finished

Location:
extensions/GMaps/admin
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/admin/gmaps_maps.tpl

    r7054 r7125  
    11{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"}
    32{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    43{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"}
     
    5756        );
    5857
    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;
    6876          }
    6977        }
    7078      );
    7179
     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      );
    7294
    7395      $("#iBDMapWidthSlider").slider(
     
    326348     * @param String tabsheet : id of the tabsheet to display
    327349     */
    328     this.displayProp = function (tabsheet)
     350    this.displayTab = function (tabsheet)
    329351    {
    330352      switch(tabsheet)
     
    368390      properties.id=id;
    369391      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      // <<
    371397
    372398      $('#iDialogEdit')
     
    458484      if(items=='')
    459485      {
    460         $('#iBDMapId').val('');
     486        tmp={
     487          sizeMode:'A',
     488          displayTYpe:'IC'
     489        }
    461490        $('#iBDName').val('');
     491        $('#iBDDisplayTypeIC').attr('checked', true);
     492        $('#iBDSizeModeA').attr('checked', true);
    462493        $('#iBDMapWidthSliderValue').val('470');
    463494        $('#iBDMapHeightSliderValue').val('210');
     
    486517
    487518        $('#iBDNumId').val(tmp.id);
    488         $('#iBDMapId').val(tmp.mapId);
    489519        $('#iBDName').val(tmp.name);
     520        $('#iBDDisplayType'+tmp.displayType).attr('checked', true);
     521        $('#iBDSizeMode'+tmp.sizeMode).attr('checked', true);
    490522        $('#iBDMapWidthSliderValue').val(tmp.width);
    491523        $('#iBDMapHeightSliderValue').val(tmp.height);
     
    507539      }
    508540
     541      $('#iBDDisplayType'+tmp.displayType+', #iBDSizeMode'+tmp.sizeMode).change();
    509542      changeSize($('#iBDMapWidthSliderValue').val(), 'iBDMapWidthSlider');
    510543      changeSize($('#iBDMapHeightSliderValue').val(), 'iBDMapHeightSlider');
     
    558591      ok=true;
    559592
    560       if(checkIdValidity($('#iBDMapId').val())==false)
    561       {
    562         $('#iBDMapId').addClass('error');
    563         alert('{/literal}{"gmaps_invalidId"|@translate}{literal}');
    564         ok=false;
    565       }
    566 
    567593      return(ok);
    568594    }
     
    578604      // build datas
    579605      datas = {
    580         mapId:$('#iBDMapId').val(),
    581606        name:$('#iBDName').val(),
     607        displayType:$('[name=fBDDisplayType]:checked').val(),
     608        sizeMode:$('[name=fBDSizeMode]:checked').val(),
    582609        width:$('#iBDMapWidthSliderValue').val(),
    583610        height:$('#iBDMapHeightSliderValue').val(),
     
    652679<table id='iHeaderListMaps' class="littlefont">
    653680  <tr>
    654     <th style="width:150px;">{'gmaps_id'|@translate}</th>
    655681    <th>{'gmaps_name'|@translate}</th>
     682    <th style="width:150px;">{'gmaps_displayType'|@translate}</th>
    656683    <th style="width:90px;">{'gmaps_dimensions'|@translate}</th>
    657684    <th style="width:90px;">{'gmaps_zoomLevel'|@translate}</th>
     
    685712        <table class='formtable'>
    686713          <tr>
    687             <td>{'gmaps_id'|@translate}</td>
    688             <td>
    689               <input type='text' id='iBDMapId' maxlength=12 size=12 value=''>
     714            <td>{'gmaps_name'|@translate}</td>
     715            <td>
     716              <input type='text' id='iBDName' maxlength=80 size=60 value=''>
    690717            </td>
    691718          </tr>
    692719
    693720          <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'>&nbsp;{'gmaps_displayTypeIC'|@translate}</label><br>
     724              <label><input type='radio' id='iBDDisplayTypeIP' name='fBDDisplayType' value='IP'>&nbsp;{'gmaps_displayTypeIP'|@translate}</label><br>
     725              <label><input type='radio' id='iBDDisplayTypeMP' name='fBDDisplayType' value='MP'>&nbsp;{'gmaps_displayTypeMP'|@translate}</label>
     726            </td>
     727          </tr>
     728
    699729        </table>
    700730      </div>
    701731
    702732      <div id='iTabDimensions' style='display:none;'>
     733
    703734        <table class="formtable">
    704735          <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">&nbsp;{'gmaps_interface_dimensions_a'|@translate}</label><br>
     739              <label><input type="radio" id="iBDSizeModeF" name="fBDSizeMode" value="F">&nbsp;{'gmaps_interface_dimensions_f'|@translate}</label>
     740            </td>
     741          </tr>
     742
     743          <tr id='iBDMapWidthSliderRow'>
     744            <td>&nbsp;</td>
     745            <td style='padding-left:30px;'>{'gmaps_width'|@translate}</td>
    706746            <td>
    707747              <input type="hidden" id="iBDMapWidthSliderValue" value="">
     
    712752            </td>
    713753          </tr>
    714           <tr>
    715             <td>{'gmaps_height'|@translate}</td>
     754          <tr id='iBDMapHeightSliderRow'>
     755            <td>&nbsp;</td>
     756            <td style='padding-left:30px;'>{'gmaps_height'|@translate}</td>
    716757            <td>
    717758              <input type="hidden" id="iBDMapHeightSliderValue" value="">
     
    775816      <div id='iTabZoomLevel' style='display:none;'>
    776817        <table class='formtable'>
    777           <tr>
     818          <tr id='iBDZoomLevelRow'>
    778819            <td>{'gmaps_zoomLevel'|@translate}</td>
    779820            <td>
  • extensions/GMaps/admin/gmaps_maps_iListMaps.tpl

    r7054 r7125  
    22  {foreach from=$datas item=data}
    33  <tr>
    4     <td style="width:150px;">{$data.mapId}</td>
    54    <td>{$data.name}</td>
     5    <th style="width:150px;">{$data.displayType}</th>
    66    <th style="width:90px;">{$data.dimensions}</th>
    77    <th style="width:90px;">{$data.zoomLevel}</th>
Note: See TracChangeset for help on using the changeset viewer.