Ignore:
Timestamp:
Oct 9, 2010, 9:55:26 PM (14 years ago)
Author:
grum
Message:

add marker style management + minor bugs fixed

File:
1 edited

Legend:

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

    r7132 r7139  
    2828            autoOpen:false,
    2929            width:800,
    30             height:450,
     30            height:465,
    3131            modal: true,
    3232            dialogClass: 'gcBgTabSheet gcBorder',
     
    5050      $('#iBDAssocMapId').bind('change', changeMapDisplayType);
    5151      $('[name=fBDAssocKmlFile]').bind('change', changeKmlFileSource);
     52      $('#iBDAssocIcon').bind('change', changeIcon);
     53      $('#iBDAssocMarker').bind('change', changeMarker);
    5254
    5355      loadList();
     56    }
     57
     58    /**
     59     * called when the icon is changed
     60     */
     61    var changeIcon = function ()
     62    {
     63      $('#iBDAssocIcon').attr('style', $('#iBDAssocIcon option:selected').attr('style')).blur();
     64    }
     65
     66    /**
     67     * called when the marker is changed
     68     */
     69    var changeMarker = function ()
     70    {
     71      $('#iBDAssocMarker').attr('style', $('#iBDAssocMarker option:selected').attr('style')).blur();
    5472    }
    5573
     
    225243        $('#iBDAssocKmlFileUrl').val('');
    226244        $('#iBDAssocIcon').val($('#iBDAssocIcon option:first').val());
     245        $('#iBDAssocMarker').val($('#iBDAssocMarker option:first').val());
    227246        $('#iBDAssocTitle').val('');
    228247      }
     
    249268        $('#iBDAssocKmlFileUrl').val(tmp.kmlFileUrl);
    250269        $('#iBDAssocIcon').val(tmp.icon);
     270        $('#iBDAssocMarker').val(tmp.marker);
    251271        $('#iBDAssocTitle').val(tmp.title);
    252272      }
     
    254274      changeMapDisplayType();
    255275      changeKmlFileSource();
     276      changeIcon();
     277      changeMarker();
    256278    }
    257279
     
    313335        kmlFileUrl:($('#iBDAssocKmlSelect').attr('checked'))?'':$('#iBDAssocKmlFileUrl').val(),
    314336        icon:$('#iBDAssocIcon').val(),
     337        marker:$('#iBDAssocMarker').val(),
    315338        title:$('#iBDAssocTitle').val(),
    316339      }
     
    430453              <select id='iBDAssocCatId'>
    431454                  {foreach from=$datas.cats item=cat}
    432                     <option value='{$cat.id}'>{$cat.name}</option>
     455                    <option value='{$cat.id}' style='padding-left:{$cat.level*12}px;font-size:{$cat.level*-4+130}%;'>{$cat.name}</option>
    433456                  {/foreach}
    434457              </select>
     
    465488              <select id='iBDAssocIcon'>
    466489                  {foreach from=$datas.icons item=icon}
    467                     <option class='{$icon.type}' value='{$icon.file}'>{$icon.file}</option>
     490                    <option style='background-image:url(plugins/GMaps/img/{$icon.file});' value='{$icon.file}'></option>
    468491                  {/foreach}
    469492              </select>
    470             </td>
    471           </tr>
     493              <p id='iBDKmlIconWarning' class='helps' style="width:520px;padding-right:20px;">{'gmaps_icon_info'|@translate}</p>
     494            </td>
     495          </tr>
     496
     497
     498          <tr>
     499            <td>{'gmaps_map_marker'|@translate}</td>
     500            <td>
     501              <select id='iBDAssocMarker'>
     502                  {foreach from=$datas.markers item=marker}
     503                    <option style='background-image:url(plugins/GMaps/img/{$marker.file});' value='{$marker.file}'></option>
     504                  {/foreach}
     505              </select>
     506            </td>
     507          </tr>
     508
    472509
    473510          <tr>
Note: See TracChangeset for help on using the changeset viewer.