Ignore:
Timestamp:
Dec 8, 2010, 8:43:12 PM (13 years ago)
Author:
rvelices
Message:

rv_gmaps - got rid of prototype

Location:
extensions/rv_gmaps/trunk
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/changelog.txt

    r8029 r8039  
    112.1.c
    2 - do not use prototype anymore on the picture page (still using on map page)
     2- do not use prototype anymore (replaced by jQuery + jQuery nyromodal)
    33
    442.1.b
  • extensions/rv_gmaps/trunk/template/data_handler.js

    r6651 r8039  
    33{
    44        this._map = map;
    5         this.options = Object.extend(
     5        this.options = jQuery.fn.extend(
    66                {
    77                        icon: G_DEFAULT_ICON,
     
    9393                        {
    9494                                marker = new google.maps.Marker( cluster.position, {title:  theTitle, icon: this.options.icon } );
    95                                 google.maps.Event.addListener( marker, "click", this._onMarkerClick.bind(this, marker) );
    96                                 google.maps.Event.addListener( marker, "dblclick", this._onMarkerDblClick.bind(this, marker) );
     95                                google.maps.Event.addListener( marker, "click", pwgBind(this, this._onMarkerClick, marker) );
     96                                google.maps.Event.addListener( marker, "dblclick", pwgBind(this, this._onMarkerDblClick, marker) );
    9797                                this._map.addOverlay( marker );
    9898                        }
     
    188188        this._timerBindPictureNavigation = null;
    189189        if (marker.pwg.images.length>1)
    190                 this._timerBindPictureNavigation = setTimeout( this._onTimeoutBindPictureNavigation.bind(this, marker), 250 );
     190                this._timerBindPictureNavigation = setTimeout( pwgBind(this, this._onTimeoutBindPictureNavigation, marker), 250 );
    191191},
    192192
     
    233233                var elt = document.getElementById( this._navHtmlIds[i] );
    234234                if (elt)
    235                         google.maps.Event.addDomListener(elt, "click", this._onPictureNavigate.bind(this, marker, i) );
     235                        google.maps.Event.addDomListener(elt, "click", pwgBind(this, this._onPictureNavigate, marker, i) );
    236236        }
    237237},
     
    270270PwgDataHandler.blowupUrl = function(theUrl)
    271271{
    272         var win = new Window({
    273                 title: document.title,
     272        jQuery.fx.off = true;
     273        jQuery.nyroModalManual( {
    274274                url: theUrl,
    275                 classname: "alphacube",
    276                 left: 0, top: 0,
    277                 width:"640", height:"480",
    278                 minimizable: false,
    279                 maximizable: false,
    280                 draggable: false,
    281                 resizable: false,
    282                 destroyOnClose: true,
    283                 hideEffect: Element.hide,
    284                 showEffectOptions: {duration:1.5}
     275                forceType: 'iframe',
     276                width: 1920
    285277        });
    286 
    287         win.setConstraint(true, {top:20, left:20, bottom:30, right:20} );
    288         win.maximize();
    289         win.showCenter(true, 20, 20);
    290278        return false;
    291279}
  • extensions/rv_gmaps/trunk/template/data_loader.js

    r6651 r8039  
    22{
    33        this._map = map;
    4         this.options = Object.extend(
     4        this.options = jQuery.fn.extend(
    55                {
    66                        reload_data_timeout: 1800,
     
    6262{
    6363        this.clearTimerReloadData();
    64         this._timerReloadData = setTimeout(  this._onTimeoutLoadData.bind(this), this.options.reload_data_timeout );
     64        this._timerReloadData = setTimeout(  pwgBind(this, this._onTimeoutLoadData), this.options.reload_data_timeout );
    6565},
    6666
     
    146146        try {
    147147                google.maps.Event.trigger( this, "dataloading" );
    148                 GDownloadUrl(url, this._onDataReceived.bind(this) );
     148                GDownloadUrl(url, pwgBind(this, this._onDataReceived) );
    149149        }
    150150        catch (e) {
  • extensions/rv_gmaps/trunk/template/map.tpl

    r6651 r8039  
    2020
    2121<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
     22
     23<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js" type="text/javascript"></script>
     24<script type="text/javascript">jQuery.noConflict();</script>
     25<script src="{$PLUGIN_ROOT_URL}/template/nyroModal/jquery.nyroModal-1.6.2.js" type="text/javascript"></script>
     26<link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css">
     27
    2228<script src="{$PLUGIN_ROOT_URL}/template/data_loader.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    2329<script src="{$PLUGIN_ROOT_URL}/template/data_handler.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    2430<script src="{$PLUGIN_ROOT_URL}/template/page_linker.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    2531
    26 {* <script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/prototype.js" type="text/javascript"></script> *}
    27 <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script>
    28 <link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/default.css" rel="stylesheet" type="text/css" />
    29 <link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/alphacube.css" rel="stylesheet" type="text/css" />
     32<script src="{$ROOT_URL}themes/default/js/scripts.js" type="text/javascript"></script>
    3033
    3134<script type="text/javascript">{literal}
     
    9194
    9295        map.pwgDataHandler = new PwgDataHandler(map, {icon: pwgMarkerIcon, show_all_img_src: "{/literal}{$PLUGIN_ROOT_URL}{literal}/icons/pic_s.gif" } );
    93         google.maps.Event.addListener(map.pwgDataLoader, "dataloaded", map.pwgDataHandler.handle.bind(map.pwgDataHandler) );
     96        google.maps.Event.addListener(map.pwgDataLoader, "dataloaded", pwgBind(map.pwgDataHandler, map.pwgDataHandler.handle) );
    9497
    9598        map.pwgDataLoader.start( "{/literal}{$U_MAP_DATA}{literal}" );
     
    181184
    182185  fmt1: function () {
    183                 var args = $A(arguments);
    184                 var str = args.shift();
     186                var str = arguments[0];
    185187                str = this.get(str);
    186                 str = str.replace( '%s', "#\{0\}" ).replace( '%d', "#\{0\}" );
    187                 return new Template(str).evaluate( args );
     188                str = str.replace( '%s', "%" ).replace( '%d', "%" ).replace('%', arguments[1]);
     189                return str;
     190               
    188191        }
    189192}
     
    222225
    223226<div id="map"> </div>
    224 <script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/window.js" type="text/javascript" defer="defer"></script>
    225227</body>
    226228</html>
Note: See TracChangeset for help on using the changeset viewer.