protected function _addJsCss() { parent::_addJsCss(); $oModule = BxDolModule::getInstance($this->MODULE); $oModule->_oTemplate->addJs('main.js'); $oModule->_oTemplate->addCss(array('main-media-tablet.css', 'main-media-desktop.css')); }
/** * add js file for AJAX form submission */ protected function _addJsCss() { parent::_addJsCss(); $this->_oTemplate->addJs('jquery.form.min.js'); $oForm = new BxTemplFormView(array()); $oForm->addCssJs(); }
public function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->_oModule = BxDolModule::getInstance($this->MODULE); $this->_sManageType = 'administration'; $this->_sParamsDivider = '#-#'; }
public function __construct($aOptions, $oTemplate = false) { $this->_oModule = BxDolModule::getInstance($this->MODULE); if (!$oTemplate) { $oTemplate = $this->_oModule->_oTemplate; } parent::__construct($aOptions, $oTemplate); $this->_sManageType = BX_DOL_MANAGE_TOOLS_ADMINISTRATION; $this->_sParamsDivider = '#-#'; $this->_sDefaultSortingOrder = 'DESC'; }
protected function _getCellActions($mixedValue, $sKey, $aField, $aRow) { if (preg_match('/^(\\w{2})\\.countries\\.nerd\\.dk\\.$/', $aRow['zonedomain'], $aMatches)) { $aRow['active'] = 1; return parent::_getCellActions($mixedValue, $sKey, $aField, $aRow); } return parent::_getCellDefault('', $sKey, $aField, $aRow); }
protected function _getCellTo($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(long2ip($mixedValue), $sKey, $aField, $aRow); }
protected function _getActionAddFriend($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { if ($this->_bOwner || $aRow['id'] == bx_get_logged_profile_id()) { return ''; } bx_import('BxDolConnection'); $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections); if ($oConn->isConnected($aRow['id'], bx_get_logged_profile_id()) || $oConn->isConnected(bx_get_logged_profile_id(), $aRow['id'])) { return ''; } return parent::_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow); }
protected function _getCellDate($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(bx_time_js($mixedValue), $sKey, $aField, $aRow); }
protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(bx_time_js($mixedValue, BX_FORMAT_DATE), $sKey, $aField, $aRow); }
protected function _getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $this->_aOptions['source'] = array(); $sCurrency = $this->_oModule->_oConfig->getCurrencyCode(); $iNextPayment = $this->_aAccount['paid']; $aPayment = $this->_oModule->_oDb->getPaymentHistory(array('type' => 'account_id_last', 'value' => $this->_aAccount['id'])); if (!empty($aPayment) && is_array($aPayment)) { $this->_aOptions['source'][] = array('id' => 'last', 'title' => '_bx_sites_grid_overview_txt_payment_last', 'type' => '_bx_sites_txt_payment_type_' . $aPayment['type'], 'transaction' => $aPayment['transaction'], 'when' => bx_time_js($aPayment['when']), 'amount' => number_format($aPayment['amount'], 2) . ' ' . $sCurrency); } if (!empty($iNextPayment)) { $aAmount = 0; $fAmountTrial = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_TRIAL); $fAmountRegular = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_REGULAR); switch ($this->_aAccount['status']) { case BX_SITES_ACCOUNT_STATUS_PENDING: $aAmount = $fAmountTrial != 0 ? $fAmountTrial : $fAmountRegular; break; case BX_SITES_ACCOUNT_STATUS_TRIAL: $aAmount = $fAmountRegular; break; case BX_SITES_ACCOUNT_STATUS_ACTIVE: $aAmount = $fAmountRegular; break; } $this->_aOptions['source'][] = array('id' => 'next', 'title' => '_bx_sites_grid_overview_txt_payment_next', 'type' => '', 'transaction' => '', 'when' => bx_time_js($iNextPayment), 'amount' => number_format($aAmount, 2) . ' ' . $sCurrency); } return parent::_getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }
public function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate ? $oTemplate : BxDolStudioTemplate::getInstance()); $this->oDb = null; $this->sParamsDivider = BX_DOL_STUDIO_GRID_PARAMS_DIVIDER; }
/** * custom column header look for 'Status' field */ protected function _getCellHeaderStatus($sKey, $aField) { $s = parent::_getCellHeaderDefault($sKey, $aField); return preg_replace('/<th(.*?)>(.*?)<\\/th>/', '<th$1><img src="' . BxDolTemplate::getInstance()->getIconUrl('sys_fl_kg.gif') . '"></th>', $s); }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { if (empty($this->_iProfileId)) { return array(); } $this->_aOptions['source'] .= $this->_oModule->_oDb->prepare(" AND `owner_id`=?", $this->_iProfileId); return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }