Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (9 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Map/Map.php

    r721 r738  
    1515    if(count($this->System->PathItems) > 1)
    1616    {
    17       if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition()); 
     17      if($this->System->PathItems[1] == 'show-position') return($this->ShowPosition());
    1818      else return(PAGE_NOT_FOUND);
    1919    } else return($this->ShowMain());
    2020  }
    21  
     21
    2222  function ShowPosition()
    2323  {
     
    3737    } else return('Položka nenalezena');
    3838  }
    39  
     39
    4040  function ShowMain()
    4141  {
     
    4949    var tinyIcon;
    5050
    51     function initialize() 
    52     {
    53       if (GBrowserIsCompatible()) 
     51    function initialize()
     52    {
     53      if (GBrowserIsCompatible())
    5454      {
    5555        map = new GMap2(document.getElementById("map_canvas"));
     
    5858        map.setUIToDefault();
    5959        map.addControl(new GOverviewMapControl(new GSize(128, 96)));
    60        
     60
    6161
    6262// Create our "tiny" marker icon
     
    6868tinyIcon.iconAnchor = new GPoint(5, 5);
    6969tinyIcon.infoWindowAnchor = new GPoint(5, 1);
    70    
    71         toggleLabel(\'NetworkLinks\');
    72         toggleLabel(\'NetworkDevices\');';
    73    
    74             $Output .= '   
    75        }     
    76     }
    77    
    78 function toggleLabel(id) 
    79 {
    80         var ele = document.getElementById(id);
    81         ele.checked = !ele.checked;
    82         ele.onclick( );
    83 }
    84 
    85     function UpdateNetworkLinks() 
    86     {
    87             if ((document.getElementById("NetworkLinks")).checked == true)
    88       {
    89                     NetworkLinks = [';
     70
     71  toggleLabel(\'NetworkLinks\');
     72  toggleLabel(\'NetworkDevices\');';
     73
     74      $Output .= '
     75       }
     76    }
     77
     78function toggleLabel(id)
     79{
     80  var ele = document.getElementById(id);
     81  ele.checked = !ele.checked;
     82  ele.onclick( );
     83}
     84
     85    function UpdateNetworkLinks()
     86    {
     87      if ((document.getElementById("NetworkLinks")).checked == true)
     88      {
     89        NetworkLinks = [';
    9090    $DbResult = $this->Database->query('SELECT * FROM NetworkLink WHERE Interface1 <> 0 AND Interface2 <> 0');
    9191    while($Link = $DbResult->fetch_assoc())
     
    114114                }
    115115
    116         } else { //checkbox turned off
    117                 for (var i in NetworkLinks)
    118     {
    119                         map.removeOverlay(NetworkLinks[i]);
    120                         NetworkLinks[i] = null;
    121                 }
    122         }
    123 }
    124 
    125 function toggleLabel(id) 
    126 {
    127         var ele = document.getElementById(id);
    128         ele.checked = !ele.checked;
    129         ele.onclick( );
    130 }
    131 
    132     function UpdateNetworkDevices() 
    133     {
    134             if ((document.getElementById("NetworkDevices")).checked == true)
    135       {
    136                     NetworkDevices = [';
     116  } else { //checkbox turned off
     117    for (var i in NetworkLinks)
     118    {
     119      map.removeOverlay(NetworkLinks[i]);
     120      NetworkLinks[i] = null;
     121    }
     122  }
     123}
     124
     125function toggleLabel(id)
     126{
     127  var ele = document.getElementById(id);
     128  ele.checked = !ele.checked;
     129  ele.onclick( );
     130}
     131
     132    function UpdateNetworkDevices()
     133    {
     134      if ((document.getElementById("NetworkDevices")).checked == true)
     135      {
     136        NetworkDevices = [';
    137137
    138138    $DbResult = $this->Database->query('SELECT GROUP_CONCAT(NetworkDevice.Name SEPARATOR ",") AS Name, '.
     
    153153                }
    154154
    155         } else { //checkbox turned off
    156                 for (var i in NetworkDevices)
    157     {
    158                         map.removeOverlay(NetworkDevices[i]);
    159                         NetworkDevices[i] = null;
    160                 }
    161         }       
     155  } else { //checkbox turned off
     156    for (var i in NetworkDevices)
     157    {
     158      map.removeOverlay(NetworkDevices[i]);
     159      NetworkDevices[i] = null;
     160    }
     161  }
    162162}
    163163
     
    165165    $Output .= '<table style="margin-left: auto; margin-right: auto; width: 100%; height: 80%;">
    166166                  <tr>
    167                     <td style="width: 80%; height: 100%;"> 
     167                    <td style="width: 80%; height: 100%;">
    168168    <div id="map_canvas" style="width: 100%; height: 100%;"></div></td>
    169169    <td style="width: 20%">
     
    208208    $this->SupportedModels = array();
    209209  }
    210  
     210
    211211  function DoStart()
    212212  {
     
    225225    ));
    226226    $this->System->FormManager->RegisterFormType('TMapPosition', array(
    227         'Type' => 'Reference',
    228         'Table' => 'MapPosition',
    229         'Id' => 'Id',
    230         'Name' => 'Name',
    231         'Filter' => '1',
     227      'Type' => 'Reference',
     228      'Table' => 'MapPosition',
     229      'Id' => 'Id',
     230      'Name' => 'Name',
     231      'Filter' => '1',
    232232    ));
    233    
    234   } 
    235 }
     233
     234  }
     235}
Note: See TracChangeset for help on using the changeset viewer.