Changeset 157 for trunk


Ignore:
Timestamp:
03/12/2006 07:16:30 PM (6 years ago)
Author:
cirrus
Message:

Add: Links on nodes in google earth do not display the google map.
Bugfix: foreach array bug in search_suggest.
Changes: Javascript changes on the search_suggest page.
Add: Onkeydown javascript on the search input box.
Bugfix: Header sending location changed.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/main.php

    r145 r157  
    5656                $this->html->head->add_title($lang['site_title']); 
    5757                $this->html->head->add_meta("text/html; charset=".$lang['charset'], "", "Content-Type"); 
     58                header("Content-Type: text/html; charset=".$lang['charset']); 
    5859                 
    5960                $this->html->body->tpl['center'] = $this->center->output(); 
     
    6364                if ($this->message->show) $this->html->body->tpl['message'] = $this->message->output(); 
    6465                 
    65                 header("Content-Type: text/html; charset=".$lang['charset']); 
    6666                return $this->html->output(); 
    6767        } 
  • trunk/includes/pages/gearth/gearth_download.php

    r146 r157  
    7272                                } 
    7373                                if ($value['total_clients'] != 0) $xml2 .= $lang['clients'].": ".$value['total_clients']."<br />"; 
    74                                 //if ($value['total_client_on_ap'] != 0) $xml2 .= "Client on: ".$value['total_client_on_ap']." Access Point(s)<br />"; 
    75                                 $xml2 .= "<a href=\"".$vars['site']['url'].makelink(array("page" => "nodes", "node" => $value['id']))."\">".$lang['node_page']."</a><br />"; 
     74                                $xml2 .= "<a href=\"".$vars['site']['url'].makelink(array("page" => "nodes", "node" => $value['id'], "show_map" => "no"))."\">".$lang['node_page']."</a><br />"; 
    7675                                $xml2 .= "</description>"; 
    7776                                $xml2 .= "<name>".htmlspecialchars($value['nodes__name'], ENT_COMPAT, $lang['charset'])."</name>\n"; 
  • trunk/includes/pages/search/search_suggest.php

    r154 r157  
    4444                                                                                'nodes.id ASC', 
    4545                                                                                $this->limit); 
    46                         foreach ($this->tpl['nodes_search'] as $key => $value) { 
     46                        foreach ((array)$this->tpl['nodes_search'] as $key => $value) { 
    4747                                $this->tpl['nodes_search'][$key]['href'] = makelink(array("page" => "nodes", "node" => $this->tpl['nodes_search'][$key]['id'])); 
    4848                        } 
  • trunk/templates/basic/includes/main_menu.tpl

    r156 r157  
    8282                                                                                </tr> 
    8383                                                                                <tr> 
    84                                                                                         <td>                     
     84                                                                                        <td> 
    8585                                                                                                <div> 
    86                                                                                                 <input type="text" id="q" name="q" autocomplete="off" onfocus="hover('',this.value);" onkeyup="hover(event.keyCode,this.value);"  onblur="setTimeout('hideSearch()',500); hov=0;" /> 
     86                                                                                                <input type="text" id="q" name="q" autocomplete="off" onkeydown="if(hov!=-1) this.value = origval;" onfocus="hover('',this.value);" onkeyup="hover(event.keyCode,this.value);"  onblur="setTimeout('hideSearch()',500); hov=0;" /> 
    8787                                                                                                </div> 
    8888                                                                                                <div align="left" id="searchResult" name="searchResult" style="font-family:Arial; font-size:12px; background-color: white; border:#000000 dashed 1px; padding:0px; display: none; position: absolute; width: 150px;"></div> 
  • trunk/templates/basic/includes/pages/search/search_suggest_js.tpl

    r155 r157  
    5757                        document.getElementById('searchResult').style.display = 'block'; 
    5858                        // Write the contents of this URL to the searchResult layer 
    59                         if (req.responseText == '') 
    60                         searchResult.style.display = 'none'; 
     59                        if (origval == null) { 
     60                                document.getElementById('searchResult').style.display = 'none'; 
     61                        } 
    6162                        else 
    62                         getObject("searchResult").innerHTML = req.responseText; 
     63                                getObject("searchResult").innerHTML = req.responseText; 
    6364                } 
    6465        } 
     
    8283function hover(ev,val) { 
    8384        test = document.getElementById('searchResult').getElementsByTagName('tr'); 
    84  
     85        if(document.getElementById('q').value == "") origval = null; 
    8586        if(ev == 38 && hov != -1){ 
     87                if(document.getElementById('searchResult').style.display == 'none') 
     88                        document.getElementById('searchResult').style.display = 'block'; 
    8689                hov--; 
    8790                if(hov<0) { 
     
    98101                        } 
    99102                } 
     103                document.getElementById('q').select(); 
    100104        } 
    101105        else if(ev == 40) { 
     106                if(document.getElementById('searchResult').style.display == 'none') 
     107                        document.getElementById('searchResult').style.display = 'block'; 
    102108                hov++; 
    103109                if(hov==test.length) hov=test.length-1; 
     
    112118                        } 
    113119                } 
     120                document.getElementById('q').select(); 
    114121        } 
    115122        else if(ev == 13 && hov != -1) { 
    116123                document.getElementById('searchResult').style.display = 'none'; 
     124        } 
     125        else if(ev == 27) { 
     126                document.getElementById('searchResult').style.display = 'none'; 
     127                document.getElementById('q').select(); 
    117128        } 
    118129        else if(ev == "mouse") { 
Note: See TracChangeset for help on using the changeset viewer.