Changeset 10551


Ignore:
Timestamp:
Apr 21, 2011, 11:16:43 PM (9 years ago)
Author:
grum
Message:

bug:2148 - compatibility with piwigo 2.2
bug:2062 - compatibility with IE7

Location:
extensions/GMaps
Files:
3 added
3 deleted
17 edited

Legend:

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

    r7479 r10551  
    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 {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.packed.js"}
    5 {known_script id="gpc.ui.categorySelector" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/ui.categorySelector.packed.js"}
    6 {known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
     1{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     2{combine_script  id="jquery.ui.sortable" path="themes/default/js/ui/minified/jquery.ui.sortable.min.js"}
     3{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
     4{combine_script  id="gpc.ui.iconSelector" path="plugins/GrumPluginClasses/js/ui.iconSelector.min.js" require="jquery"}
     5{combine_script  id="gpc.ui.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.min.js" require="jquery"}
     6{combine_script  id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
    77
    88{literal}
  • extensions/GMaps/admin/gmaps_config.tpl

    r7309 r10551  
    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.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"}
     1{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     2{combine_script  id="jquery.ui.slider" path="themes/default/js/ui/minified/jquery.ui.slider.min.js"}
    33
    44<h2>{'gmaps_config'|@translate}</h2>
  • extensions/GMaps/admin/gmaps_kmlfiles.tpl

    r7132 r10551  
    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 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
     1{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     2{combine_script  id="jquery.ui.sortable" path="themes/default/js/ui/minified/jquery.ui.sortable.min.js"}
     3{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
    44
    55{literal}
  • extensions/GMaps/admin/gmaps_maps.tpl

    r7309 r10551  
    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.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    3 {known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"}
    4 {known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
     1{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     2{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
     3{combine_script  id="jquery.ui.slider" path="themes/default/js/ui/minified/jquery.ui.slider.min.js"}
     4{combine_script  id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
    55
    66<!--
  • extensions/GMaps/gmaps_ajax.php

    r7616 r10551  
    1919 */
    2020
     21  // in this case, PHPWG_ROOT_PATH must be declared as an absolute path...
    2122  define('PHPWG_ROOT_PATH',dirname(dirname(dirname(__FILE__))).'/');
    2223
     
    871872        }
    872873
    873         $file=GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file;
     874        $file=GPCCore::getPiwigoSystemPath().PWG_LOCAL_DIR.self::KML_DIRECTORY.$file;
    874875
    875876        if(file_exists($file)) unlink($file);
     
    877878        {
    878879          $currentInfo=$this->ajax_gmaps_admin_kmlFilesGetFile($id, false);
    879           if(file_exists(self::KML_DIRECTORY.$currentInfo['file'])) unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$currentInfo['file']);
     880          if(file_exists(GPCCore::getPiwigoSystemPath().PWG_LOCAL_DIR.self::KML_DIRECTORY.$currentInfo['file'])) unlink(GPCCore::getPiwigoSystemPath().PWG_LOCAL_DIR.self::KML_DIRECTORY.$currentInfo['file']);
    880881        }
    881882
     
    10081009      if($result)
    10091010      {
    1010         if($file!='' and file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file))
    1011         {
    1012           unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file);
     1011        if($file!='' and file_exists(GPCCore::getPiwigoSystemPath().PWG_LOCAL_DIR.self::KML_DIRECTORY.$file))
     1012        {
     1013          unlink(GPCCore::getPiwigoSystemPath().PWG_LOCAL_DIR.self::KML_DIRECTORY.$file);
    10131014        }
    10141015        return('ok');
  • extensions/GMaps/gmaps_install.class.inc.php

    r7619 r10551  
    4242    public function install()
    4343    {
    44       if(!file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY))
     44      if(!file_exists(GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY))
    4545      {
    46         mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true);
     46        mkdir(GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY, 0755, true);
    4747      }
    4848
     
    123123    public function uninstall()
    124124    {
    125       GPCCore::rmDir(dirname(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY));
     125      GPCCore::rmDir(dirname(GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY));
    126126      $this->deleteConfig();
    127127      $this->tablef->drop();
     
    176176    private function updateFrom_010000()
    177177    {
    178       if(!file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY))
    179           mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true);
     178      if(!file_exists(GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY))
     179          mkdir(GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY, 0755, true);
    180180
    181181      $directory=scandir(GMAPS_PATH.'kml/');
     
    185185        if(preg_match('/.*(?:\.kml|\.kmz)$/i', $file))
    186186        {
    187           rename(GMAPS_PATH.'kml/'.$file, GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file);
     187          rename(GMAPS_PATH.'kml/'.$file, GPCCore::getPiwigoSystemPath()."/".PWG_LOCAL_DIR.self::KML_DIRECTORY.$file);
    188188        }
    189189      }
  • extensions/GMaps/gmaps_pip.class.inc.php

    r7616 r10551  
    126126      }
    127127
    128       GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.packed.js");
     128      GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.min.js");
    129129      GPCCore::addHeaderJS("maps.google.com/api", "http://maps.google.com/maps/api/js?sensor=false");
    130       GPCCore::addHeaderJS("gmaps.markup", "plugins/GMaps/js/gmapsMarkup.packed.js");
     130      GPCCore::addHeaderJS("gmaps.markup", "plugins/GMaps/js/gmapsMarkup".GPCCore::getMinified().".js", array('jquery'));
    131131
    132132      $desc = preg_replace(
     
    156156            while($row=pwg_db_fetch_assoc($result))
    157157            {
    158               $mapParam['kmlUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.$row['file'];
     158              $mapParam['kmlUrl']=$_SERVER['SCRIPT_URI'].PWG_LOCAL_DIR.self::KML_DIRECTORY.$row['file'];
    159159            }
    160160          }
     
    192192              geolocated:".($nb>0?'true':'false').",
    193193              kmlZoom:".($mapParam['kmlZoom']=='y'?'true':'false').",
    194               allowBubble:".($mapParam['allowBubble']=='y'?'true':'false').",
     194              allowBubble:".($mapParam['allowBubble']=='y'?'true':'false')."
    195195            }
    196196          ";
     
    204204            categoryId:".$page['category']['id'].",
    205205            maps:
    206             [".implode(',', $scripts)."],
     206            [".implode(',', $scripts)."]
    207207          };
    208208        </script>", false);
     
    263263                markers:[],
    264264                fitToBounds:true,
    265                 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false').",
     265                zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
    266266              }";
    267267
     
    310310    maps:
    311311    [".implode(',', $scripts)."],
    312     popupAutomaticSize:".$this->config['popupAutomaticSize'].",
     312    popupAutomaticSize:".$this->config['popupAutomaticSize']."
    313313  };
    314314</script>", false);
     
    496496      {
    497497        latitude:'".$this->picture['coords']['lat']."',
    498         longitude:'".$this->picture['coords']['lng']."',
     498        longitude:'".$this->picture['coords']['lng']."'
    499499      },
    500500      maps:
  • extensions/GMaps/gmaps_root.class.inc.php

    r7676 r10551  
    1818  class GMaps_root extends CommonPlugin
    1919  {
    20     const KML_DIRECTORY='/local/plugins/GMaps/kml/';
     20    const KML_DIRECTORY='plugins/GMaps/kml/';
    2121    const ID_MODE_CATEGORY = 'C';
    2222    const ID_MODE_MAP='M';
     
    274274        {
    275275          // if an kml file id is given, apply the url of the file (needs to give the complete URI for google)
    276           if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.rawurlencode($row['kmlFileUrlId']);
     276          if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=$_SERVER['SCRIPT_URI'].PWG_LOCAL_DIR.self::KML_DIRECTORY.rawurlencode($row['kmlFileUrlId']);
    277277
    278278          if($row['displayType']!='MP' and $mode==self::ID_MODE_CATEGORY)
  • extensions/GMaps/gmaps_version.inc.php

    r7676 r10551  
    1515  if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1616
    17   define('GMAPS_VERSION',  '1.2.4');
    18   define('GMAPS_VERSION2', '01.02.04');
    19   define('GMAPS_GPC_NEEDED', '3.3.2');
    20   define('GMAPS_AMD_NEEDED', '0.5.2'); //advanced metadata plugin is needed
     17  define('GMAPS_VERSION',  '1.3.0');
     18  define('GMAPS_VERSION2', '01.03.00');
     19  define('GMAPS_GPC_NEEDED', '3.5.0');
     20  define('GMAPS_AMD_NEEDED', '0.6.0'); //advanced metadata plugin is needed
    2121?>
  • extensions/GMaps/js/gmapsCategory.js

    r7616 r10551  
    22 * -----------------------------------------------------------------------------
    33 * file: gmapsCategory.js
    4  * file version: 1.2.0
    5  * date: 2010-11-04
     4 * file version: 1.2.1
     5 * date: 2011-04-21
    66 */
    77
     
    1111  { w:32, h:32, x:15, y:31 }, // s02
    1212  { w:32, h:32, x:10, y:31 }, // s03
    13   { w:30, h:40, x:4, y:39 }, // s04
     13  { w:30, h:40, x:4, y:39 } // s04
    1414];
    1515
     
    3939          style:properties.mapTypeControl
    4040        },
    41       markerTitle:'',
     41      markerTitle:''
    4242    }
    4343  );
     
    452452        {
    453453          autoOpen:false,
    454           width:'auto',
     454          width:$('#'+gmaps.maps[i].id).width(),
    455455          height:'auto',
    456456          modal: true,
  • extensions/GMaps/js/gmapsMarkup.js

    r7616 r10551  
    22 * -----------------------------------------------------------------------------
    33 * file: gmapsMarkup.js
    4  * file version: 1.1.0
    5  * date: 2010-11-04
     4 * file version: 1.1.1
     5 * date: 2011-04-13
    66 */
    77
     
    1111      { w:32, h:32, x:15, y:31 }, // s02
    1212      { w:32, h:32, x:10, y:31 }, // s03
    13       { w:30, h:40, x:4, y:39 }, // s04
     13      { w:30, h:40, x:4, y:39 } // s04
    1414    ];
    1515
     
    4444                style:properties.mapTypeControl
    4545              },
    46             markerTitle:'',
     46            markerTitle:''
    4747          }
    4848        );
     
    134134      height:map.height,
    135135      distanceTreshold:20,
    136       loadIndex:map.gmapsIndex,
     136      loadIndex:map.gmapsIndex
    137137    };
    138138
  • extensions/GMaps/js/gmapsPicture.js

    r7500 r10551  
    22 * -----------------------------------------------------------------------------
    33 * file: gmapsPicture.js
    4  * file version: 1.1.0
    5  * date: 2010-10-20
     4 * file version: 1.1.1
     5 * date: 2011-04-21
    66 */
    77
     
    1616      { w:32, h:32, x:15, y:31 }, // s02
    1717      { w:32, h:32, x:10, y:31 }, // s03
    18       { w:30, h:40, x:4, y:39 }, // s04
     18      { w:30, h:40, x:4, y:39 } // s04
    1919    ];
    2020
     
    3737                    style:properties.mapTypeControl
    3838                  },
    39                 markerTitle:'',
     39                markerTitle:''
    4040              }
    4141            ),
     
    181181        {
    182182          autoOpen:false,
    183           width:'auto',
     183          width:$('#iGMapsIcon').width(),
    184184          height:'auto',
    185185          modal: true,
  • extensions/GMaps/main.inc.php

    r7676 r10551  
    22/*
    33Plugin Name: GMaps
    4 Version: 1.2.4
     4Version: 1.3.0
    55Description: Display and manage (google) maps
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454
     
    9191|         |            |   . MySQL 5.1 incompatibility
    9292|         |            |
     93| 1.3.0   | 2011-04-13 | * mantis bug:2148
     94|         |            |   . compatibility with piwigo 2.2
     95|         |            |
     96|         |            | * mantis bug:2062
     97|         |            |   . With IE7, comma is not accepted at the end of a JS
     98|         |            |     object
     99|         |            |
    93100|         |            |
    94101|         |            |
  • extensions/GMaps/templates/gmaps_category.tpl

    r7308 r10551  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
    3 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    4 {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.packed.js"}
     1{combine_script id="jquery" path="themes/default/js/jquery.min.js"}
     2{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     3{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
     4{combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
     5{combine_script id="gmaps.category" path="plugins/GMaps/js/gmapsCategory.min.js" require="jquery.ui"}
    66
    77{foreach from=$maps item=map}
  • extensions/GMaps/templates/gmaps_dialog_area_choose.tpl

    r7308 r10551  
    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.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    3 {known_script id="maps.google.com/api" src="http://maps.google.com/maps/api/js?sensor=false"}
     1{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     2{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
     3{combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
    44
    55
  • extensions/GMaps/templates/gmaps_picture_icon.tpl

    r7308 r10551  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
    2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
    3 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    4 {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.packed.js"}
     1{combine_script id="jquery" path="themes/default/js/jquery.min.js"}
     2{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
     3{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
     4{combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
     5{combine_script id="gmaps.picture" path="plugins/GMaps/js/gmapsPicture.min.js" require="jquery.ui"}
    66
    77<div id='iGMapsIconContent' style='display:none;'>
  • extensions/GMaps/templates/gmaps_picture_meta.tpl

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