HomeHelpTrac

Changeset 14011 for trunk/administration


Ignore:
Timestamp:
05/18/10 05:05:03 (2 years ago)
Author:
Anton Lesnikov
Message:

Ticket #2019

Location:
trunk/administration
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/js/memb_levels.js

    r12171 r14011  
    3333                closeOnOuterClick: false 
    3434            }); 
    35             $('#adm-mlevels-holder > #adm-mlevels-action').addWebForms(); 
     35 
     36            $(document).addWebForms(); 
     37            $("input[type='datetime']", document).each(function() { 
     38                $(this).dynDateTime({ 
     39                    ifFormat: '%Y-%m-%d %H:%M:%S', 
     40                    showsTime: true, 
     41                    position_css: 'fixed' 
     42                }); 
     43            }); 
    3644        }, 
    3745        'json' 
  • trunk/administration/memb_levels.php

    r13886 r14011  
    7474    $sQuery .= !empty($_POST['allowedCnt']) ? ", `AllowedCount`='" . $_POST['allowedCnt'] . "'" : ""; 
    7575    $sQuery .= !empty($_POST['period']) ? ", `AllowedPeriodLen`='" . $_POST['period'] . "'" : "";         
    76     $sQuery .= !empty($_POST['dateStart']) ? ", `AllowedPeriodStart`=FROM_UNIXTIME(" . d2i($_POST['dateStart']) . ")" : ""; 
    77     $sQuery .= !empty($_POST['dateEnd']) ? ", `AllowedPeriodEnd`=FROM_UNIXTIME(" . d2i($_POST['dateEnd']) . ")" : ""; 
     76    $sQuery .= !empty($_POST['dateStart']) ? ", `AllowedPeriodStart`=FROM_UNIXTIME(" . strtotime($_POST['dateStart']) . ")" : ""; 
     77    $sQuery .= !empty($_POST['dateEnd']) ? ", `AllowedPeriodEnd`=FROM_UNIXTIME(" . strtotime($_POST['dateEnd']) . ")" : ""; 
    7878    $aResult = $GLOBALS['MySQL']->query($sQuery) > 0 ? array('code' => 0, 'message' => MsgBox(_t('_adm_txt_mlevels_action_saved'))) : array('code' => 1, 'message' => MsgBox(_t('_adm_txt_mlevels_action_cannot_save'))); 
    7979 
     
    363363                'caption' => _t('_adm_txt_mlevels_actions_avail_start'), 
    364364                'info' => _t('_adm_txt_mlevels_actions_avail_desc'), 
    365                 'value' => isset($aAction['AllowedPeriodStart']) ? (int)$aAction['AllowedPeriodStart'] : "", 
     365                'value' => isset($aAction['AllowedPeriodStart']) ? $aAction['AllowedPeriodStart'] : "", 
    366366                'display' => 'filterDate', 
    367367            ), 
     
    371371                'caption' => _t('_adm_txt_mlevels_actions_avail_end'), 
    372372                'info' => _t('_adm_txt_mlevels_actions_avail_desc'), 
    373                 'value' => isset($aAction['AllowedPeriodEnd']) ? (int)$aAction['AllowedPeriodEnd'] : "", 
     373                'value' => isset($aAction['AllowedPeriodEnd']) ? $aAction['AllowedPeriodEnd'] : "", 
    374374                'display' => 'filterDate', 
    375375            ),  
     
    472472    return true; 
    473473} 
    474 function d2i($sDate) { 
    475     $iResult = 0; 
    476      
    477     $aMatch = array(); 
    478     if(preg_match('#(\d+)/(\d+)/(\d+)#', $sDate, $aMatch)) { 
    479         $iDay   = $aMatch[1]; 
    480         $iMonth = $aMatch[2]; 
    481         $iYear  = $aMatch[3];         
    482         $iResult = mktime (0, 0, 0, $iMonth, $iDay, $iYear); 
    483         $iResult = $iResult > 0 ? $iResult : 0; 
    484     } 
    485  
    486     return $iResult; 
    487 } 
    488  
    489474?> 
  • trunk/administration/templates/base/css/memb_levels.css

    r10570 r14011  
    3232 
    3333/*--- 'Manage Action' section ---*/ 
     34div.calendar { 
     35    z-index: 9999; 
     36} 
    3437div#adm-mlevels-action{ 
    3538    width: 562px;     
     
    5255    display: none; 
    5356} 
     57div.ui-datepicker { 
     58    z-index: 9999; 
     59} 
Note: See TracChangeset for help on using the changeset viewer.