Changeset 445 for trunk/Common


Ignore:
Timestamp:
Oct 15, 2012, 6:41:56 PM (13 years ago)
Author:
chronos
Message:
  • Přidáno: Tabulky pro správu úkolů. Úkoly jsou řazeny hierarchicky do skupin.
  • Opraveno: Zobrazení typu výčet a nastavení typu čas na aktuální pokud je hodnota prázdná.
Location:
trunk/Common
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Error.php

    r443 r445  
    33class ErrorHandler extends Module
    44{
     5  var $Encoding;
     6   
     7  function __construct()
     8  {
     9    $this->Encoding = 'utf-8';
     10  }
     11 
    512  function Init()
    613  {
     
    3138  if(($UserErrors & $Number))
    3239  {
    33     $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber.' in '.$FileName."\n";
     40    $Error = '# '.$Date."\n";
    3441    $Backtrace = debug_backtrace();
    35     $Backtrace[0]['function'] = '';
     42    $Backtrace[0]['function'] = $Message;
    3643    $Backtrace[0]['args'] = '';
    37     $Backtrace[0]['file'] = '';
    38     $Backtrace[0]['line'] = '';
     44    $Backtrace[0]['file'] = $FileName;
     45    $Backtrace[0]['line'] = $LineNumber;
    3946    //$First = array_shift($Backtrace);
    40     //print_r($First);
     47    //print_r($Backtrace);
    4148   
    4249    //array_unshift($Backtrace, $First);
     
    7077            echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n".
    7178      '<meta http-equiv="Content-Language" content="cs">'."\n".
    72       '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body>'."\n".
     79      '<meta http-equiv="Content-Type" content="text/html; charset='.$this->Encoding.'"></head><body>'."\n".
    7380      'Došlo k vnitřní chybě!<br/> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br/><br/>');
    7481          echo('<pre>'.$Error.'</pre><br/>');                   // V případě ladění chybu i zobraz
  • trunk/Common/Forms.php

    r442 r445  
    168168    $Values = array();
    169169    foreach($this->Definition['Items'] as $Index => $Item)
     170    if(!array_key_exists($Item['Type'], $FormTypes) or
     171    (array_key_exists($Item['Type'], $FormTypes) and ($FormTypes[$Item['Type']]['Type'] != 'ManyToOne')))
    170172    {
    171173      //if(array_key_exists($Context.$Index, $_POST))
  • trunk/Common/Types/Date.php

    r442 r445  
    1111    global $MonthNames;
    1212
    13     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     13    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    1414    $Parts = getdate($Item['Value']);
    1515
     
    2222    global $MonthNames;
    2323   
    24     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     24    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    2525    $Parts = getdate($Item['Value']);
    2626
  • trunk/Common/Types/DateTime.php

    r442 r445  
    1111    global $MonthNames;
    1212   
    13     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     13    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    1414    $Parts = getdate($Item['Value']);
    1515    $Output = $Parts['mday'].'.'.$Parts['mon'].'.'.$Parts['year'].' '.
     
    2222    global $MonthNames;
    2323
    24     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     24    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    2525    $Parts = getdate($Item['Value']);
    2626
  • trunk/Common/Types/Enumeration.php

    r435 r445  
    1818    $Type = $this->System->Type->GetTypeDefinition($Item['Type']);
    1919    $Output = '<select name="'.$Item['Name'].'">';
    20     foreach($Type['Parameters'] as $Index => $StateName)
     20    foreach($Type['Parameters']['States'] as $Index => $StateName)
    2121    {
    2222      if($Item['Value'] == $Index) $Selected = ' selected="1"'; else $Selected = '';
  • trunk/Common/Types/Time.php

    r442 r445  
    99  function OnView($Item)
    1010  {
    11     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     11    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    1212    $TimeParts = getdate($Item['Value']);
    1313
     
    1818  function OnEdit($Item)
    1919  {
    20     if(strtolower($Item['Value']) == 'now') $Item['Value'] = time();
     20    if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time();
    2121    $TimeParts = getdate($Item['Value']);
    2222
Note: See TracChangeset for help on using the changeset viewer.