Changeset 7176 for extensions/GMaps


Ignore:
Timestamp:
Oct 13, 2010, 5:25:09 PM (10 years ago)
Author:
grum
Message:

Packing js files +using GPC 3.3.0 categorySelector

Location:
extensions/GMaps
Files:
2 added
8 edited

Legend:

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

    r7147 r7176  
    22{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js"}
    33{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    4 {known_script id="gpc.ui.iconSelector" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/ui.iconSelector.js"}
     4{known_script id="gpc.ui.iconSelector" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/ui.iconSelector.packed.js"}
     5{known_script id="gpc.ui.categorySelector" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/ui.categorySelector.packed.js"}
    56{known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
    67
     
    3334            dialogClass: 'gcBgTabSheet gcBorder',
    3435            title: '{/literal}{"gmaps_manage_assoc"|@translate}{literal}',
     36            open: function () {
     37                $('#iBDAssocCatId').categorySelector('listMaxHeight', $('#iDialogEdit').height()-$('#iBDAssocCatId').position().top-$('#iBDAssocCatId').height());
     38              },
     39
    3540            buttons:
    3641              {
     
    4853          }
    4954        );
     55
     56      $('#iBDAssocCatId').categorySelector(
     57        {
     58          listMaxWidth:600,
     59          listMaxHeight:500,
     60          displayStatus:true,
     61          levelIndent:20,
     62          userMode:'admin',
     63          load: function (event) { $(this).categorySelector('expand', ':all+0'); }
     64        }
     65      );
    5066
    5167      $('#iBDAssocIcon').iconSelector(
     
    252268      if(items=='')
    253269      {
    254         $('#iBDAssocCatId').val(0);
     270        $('#iBDAssocCatId').categorySelector('value', ':first');
    255271        $('#iBDAssocMapId').val($('#iBDAssocMapId option:first').val());
    256272        $('#iBDAssocApplySubCat').val('y');
     
    265281        tmp=$.parseJSON(items);
    266282
    267         $('#iBDAssocCatId').val(tmp.categoryId);
     283        $('#iBDAssocCatId').categorySelector('value', tmp.categoryId).categorySelector('expand', tmp.categoryId+'+');
    268284        $('#iBDAssocMapId').val(tmp.mapId);
    269285        $('#iBDAssocApplySubCat').val(tmp.applySubCat);
     
    342358      // build datas
    343359      datas = {
    344         categoryId:$('#iBDAssocCatId').val(),
     360        categoryId:$('#iBDAssocCatId').categorySelector('value'),
    345361        mapId:$('#iBDAssocMapId').val(),
    346362        applySubCat:$('#iBDAssocApplySubCat').val(),
     
    464480            <td>{'gmaps_category'|@translate}</td>
    465481            <td>
    466               <select id='iBDAssocCatId'>
    467                   {foreach from=$datas.cats item=cat}
    468                     <option value='{$cat.id}' style='padding-left:{$cat.level*12}px;font-size:{$cat.level*-4+130}%;'>{$cat.name}</option>
    469                   {/foreach}
    470               </select>
     482              <div id='iBDAssocCatId'></div>
    471483            </td>
    472484          </tr>
     
    499511            <td>{'gmaps_map_icon'|@translate}</td>
    500512            <td>
    501               <div id='iBDAssocIcon' class="{$themeconf.name}"></div>
     513              <div id='iBDAssocIcon'></div>
    502514              <p id='iBDKmlIconWarning' class='helps' style="width:520px;padding-right:20px;">{'gmaps_icon_info'|@translate}</p>
    503515            </td>
     
    508520            <td>{'gmaps_map_marker'|@translate}</td>
    509521            <td>
    510               <div id='iBDAssocMarker' class="{$themeconf.name}"></div>
     522              <div id='iBDAssocMarker'></div>
    511523            </td>
    512524          </tr>
  • extensions/GMaps/gmaps.css

    r7147 r7176  
    1414#iListAssoc.clear table tr:hover,
    1515#iListKml.clear table tr:hover { cursor:pointer; color: #D54E21; background:#dbe8f3; }
     16
     17#iBDAssocCatId {
     18  width:560px;
     19}
    1620
    1721div.addMap { text-align:left; }
  • extensions/GMaps/gmaps_aip.class.inc.php

    r7139 r7176  
    215215  {
    216216    global $template;
     217
     218    GPCCore::addHeaderCSS('iconSelector', 'plugins/GrumPluginClasses/css/iconSelector_'.$template->get_themeconf('name').'.css');
     219    GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
    217220
    218221    $template->set_filename('body_page',
  • extensions/GMaps/js/gmapsCategory.js

    r7141 r7176  
    1 
    2 var currentMapLoad;
    3 var markerImgProp = [
     1/**
     2 * -----------------------------------------------------------------------------
     3 * file: gmapsCategory.js
     4 * file version: 1.0.0
     5 * date: 2010-10-10
     6 */
     7
     8var currentMapLoad,
     9    markerImgProp = [
    410  null,
    511  { w:32, h:32, x:15, y:31 }, // s01
     
    9197    height:$(map.getDiv()).height(),
    9298    distanceTreshold:20
    93   }
     99  };
    94100
    95101  currentMapLoad=map;
  • extensions/GMaps/js/gmapsPicture.js

    r7141 r7176  
     1/**
     2 * -----------------------------------------------------------------------------
     3 * file: gmapsPicture.js
     4 * file version: 1.0.0
     5 * date: 2010-10-10
     6 */
     7
    18
    29var viewportInitialized = {
     
    1522function applyMap(properties)
    1623{
    17   var latlng=new google.maps.LatLng(gmaps.coords.latitude, gmaps.coords.longitude);
    18 
    19   var map = new google.maps.Map($("#"+properties.id).get(0),
    20     {
    21       mapTypeId: properties.mapType,
    22       zoom: properties.zoomLevel,
    23       center:latlng,
    24       navigationControl: (properties.navigationControl==-1)?false:true,
    25       scrollwheel: (properties.navigationControl==-1)?false:true,
    26       scaleControl: (properties.scaleControl=='n')?false:true,
    27       mapTypeControl:(properties.mapTypeControl==-1)?false:true,
    28       mapTypeControlOptions:
    29         {
    30           style:properties.mapTypeControl
    31         },
    32       markerTitle:'',
    33     }
    34   );
    35 
    36 
    37   var marker = new google.maps.Marker(
    38     {
    39       position:latlng,
    40       map: map,
    41       title:properties.markerTitle
    42     }
    43   );
     24  var latlng=new google.maps.LatLng(gmaps.coords.latitude, gmaps.coords.longitude),
     25      map = new google.maps.Map($("#"+properties.id).get(0),
     26              {
     27                mapTypeId: properties.mapType,
     28                zoom: properties.zoomLevel,
     29                center:latlng,
     30                navigationControl: (properties.navigationControl==-1)?false:true,
     31                scrollwheel: (properties.navigationControl==-1)?false:true,
     32                scaleControl: (properties.scaleControl=='n')?false:true,
     33                mapTypeControl:(properties.mapTypeControl==-1)?false:true,
     34                mapTypeControlOptions:
     35                  {
     36                    style:properties.mapTypeControl
     37                  },
     38                markerTitle:'',
     39              }
     40            ),
     41      marker = new google.maps.Marker(
     42                  {
     43                    position:latlng,
     44                    map: map,
     45                    title:properties.markerTitle
     46                  }
     47                );
    4448
    4549
  • extensions/GMaps/templates/gmaps_category.tpl

    r7128 r7176  
    33{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    44{known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
    5 {known_script id="gmaps.category" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsCategory.js"}
     5{known_script id="gmaps.category" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsCategory.packed.js"}
    66
    77{foreach from=$maps item=map}
  • extensions/GMaps/templates/gmaps_picture_icon.tpl

    r7128 r7176  
    33{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    44{known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
    5 {known_script id="gmaps.picture" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsPicture.js"}
     5{known_script id="gmaps.picture" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsPicture.packed.js"}
    66
    77<div id='iGMapsIconContent' style='display:none;'>
  • extensions/GMaps/templates/gmaps_picture_meta.tpl

    r7125 r7176  
    11{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
    22{known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
    3 {known_script id="gmaps.picture" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsPicture.js"}
     3{known_script id="gmaps.picture" src=$ROOT_URL|@cat:"plugins/GMaps/js/gmapsPicture.packed.js"}
    44
    55<div id='iGMapContent' style='text-align:center;'>
Note: See TracChangeset for help on using the changeset viewer.