Changeset 193


Ignore:
Timestamp:
03/05/2009 12:49:51 AM (3 years ago)
Author:
cirrus
Message:

Added code needed for MacOSX widget (will be added later).
Removed unused variables in gmap javascript.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/pages/search/search_suggest.php

    r163 r193  
    3232                global $db, $vars; 
    3333                $q = get('q'); 
     34                $widget = get('widget'); 
     35                if(isset($widget) && $widget =="true") { 
     36                        $this->tpl['widget'] = "1"; 
     37                        $this->tpl['url'] = $vars['site']['url']; 
     38                        $this->limit = 5; 
     39                } else { 
     40                        $this->tpl['widget'] = "0"; 
     41                } 
    3442                $i = 0; 
    3543 
  • trunk/templates/basic/includes/pages/gmap/gmap_js.tpl

    r178 r193  
    262262 
    263263function makeMarkers(nodes, icon_image, icon_zoom) { 
    264         var markers_t = Array(); 
    265264        var bounds = map.getBounds(); 
    266265        for (var i = 0; i < nodes.length; i++) { 
     
    306305                        } 
    307306                        var marker = createMarker(point, html, icon); 
    308                         markers_t.push(marker); 
    309307                        markers[node_id] = true; 
    310308                        map.addOverlay(marker); 
  • trunk/templates/basic/includes/pages/search/search_suggest.tpl

    r154 r193  
    2323{if $ip_search} 
    2424        {section name=ip loop=$ip_search} 
    25         <tr onclick="window.location.href='{$ip_search[ip].href}'" onmouseover="hover('mouse',this)" style="width: 100%"> 
     25        <tr {if $widget=="0"}onclick="window.location.href='{$ip_search[ip].href}'" onmouseover="hover('mouse',this)"{else}onclick="open_url('{$url}{$ip_search[ip].href}');" onmouseover="this.style.background='orange';" onmouseout="this.style.background='transparent';" style="cursor: pointer;"{/if} style="width: 100%"> 
    2626                <td>{$ip_search[ip].ip_start}</td> 
    2727                <td align="right">(#{$ip_search[ip].id})</td> 
     
    3434{elseif $dns_search} 
    3535        {section name=zone loop=$dns_search} 
    36         <tr onclick="window.location.href='{$dns_search[zone].href}'" onmouseover="hover('mouse',this)" style="width: 100%"> 
     36        <tr {if $widget=="0"}onclick="window.location.href='{$dns_search[zone].href}'" onmouseover="hover('mouse',this)"{else}onclick="open_url('{$url}{$dns_search[zone].href}');" onmouseover="this.style.background='orange';" onmouseout="this.style.background='transparent';" style="cursor: pointer;"{/if} style="width: 100%"> 
    3737                <td>{$dns_search[zone].name}</td> 
    3838                <td align="right">(#{$dns_search[zone].id})</td> 
     
    4545{else} 
    4646        {section name=node loop=$nodes_search} 
    47         <tr onclick="window.location.href='{$nodes_search[node].href}'" onmouseover="hover('mouse',this)" style="width: 100%"> 
     47        <tr {if $widget=="0"}onclick="window.location.href='{$nodes_search[node].href}'" onmouseover="hover('mouse',this)"{else}onclick="open_url('{$url}{$nodes_search[node].href}');" onmouseover="this.style.background='orange';" onmouseout="this.style.background='transparent';" style="cursor: pointer;"{/if} style="width: 100%"> 
    4848                <td>{$nodes_search[node].name}</td> 
    4949                <td align="right">(#{$nodes_search[node].id})</td> 
Note: See TracChangeset for help on using the changeset viewer.