basic refactoring

This commit is contained in:
Daniel Seifert 2012-12-21 10:17:54 +00:00
bovenliggende dadcafeb15
commit 76fdad3d44
7 gewijzigde bestanden met toevoegingen van 45 en 27 verwijderingen

Bestand weergeven

@ -20,7 +20,6 @@
class d3_cfg_googleanalytics_licence extends d3_cfg_mod_licence
{
protected $_sModId = 'd3_googleanalytics';
protected $_hasLicence = FALSE;

Bestand weergeven

@ -20,14 +20,13 @@
class d3_cfg_googleanalytics_list extends d3_cfg_mod_list
{
protected $_blD3ShowLangSwitch = TRUE;
public function render()
{
parent::render();
$this->_aViewData["default_edit"] = "d3_cfg_googleanalytics_main";
$this->addTplParam("default_edit", "d3_cfg_googleanalytics_main");
return $this->_sThisTemplate;
}

Bestand weergeven

@ -21,7 +21,6 @@
class d3_cfg_googleanalytics_main extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_googleanalytics_main.tpl';
protected $_sModId = 'd3_googleanalytics';
public function checkD3Log()

Bestand weergeven

@ -3,19 +3,18 @@
class d3_oxcmp_utils_googleAnalytics extends d3_oxcmp_utils_googleAnalytics_parent
{
private $_sModId = 'd3_googleanalytics';
private $_oSet;
public function render()
{
$ret = parent::render();
// load module config
$this->_oSet = oxNew('d3_cfg_mod');
$this->_oSet->Load($this->_oSet->getModOxid($this->_sModId), true);
$this->_oParent->addTplParam('blD3GoogleAnalyticsActive', $this->_oSet->getFieldData('oxactive'));
$this->_oParent->addTplParam('oD3GASettings', $this->_oSet);
$this->_oSet = d3_cfg_mod::get($this->_sModId);
$this->getParent()->addTplParam('blD3GoogleAnalyticsActive', $this->_oSet->getFieldData('oxactive'));
$this->getParent()->addTplParam('oD3GASettings', $this->_oSet);
return $ret;
}

Bestand weergeven

@ -1,5 +1,23 @@
<?php
/**
* This module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For further informations, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxidmodule.com
* @link http://www.shopmodule.com
* @copyright (C) D3 Data Development
*/
class d3_oxorder_googleanalytics extends d3_oxorder_googleanalytics_parent
{
public function getPayment()
@ -15,8 +33,9 @@ class d3_oxorder_googleanalytics extends d3_oxorder_googleanalytics_parent
public function d3getVoucherSerieList()
{
$sSelect = "SELECT oxvoucherserieid FROM oxvouchers WHERE oxorderid = ".oxDb::getDb()->quote($this->getId());
$aVoucherIds = oxDb::getDb()->getArray($sSelect);
$sSelect =
"SELECT oxvoucherserieid FROM oxvouchers WHERE oxorderid = " . oxDb::getDb()->quote($this->getId());
$aVoucherIds = (array) oxDb::getDb()->getArray($sSelect);
$aVoucherSerieList = array();
foreach ($aVoucherIds as $aVoucherId)

Bestand weergeven

@ -1,7 +1,5 @@
[{include file="headitem.tpl" title="D3_GOOGLEANALYTICS_CFG_TITLE"|oxmultilangassign}]
<link rel="stylesheet" type="text/css" href="[{$oViewConf->getResourceUrl() }]d3_mod_cfg.css">
<script type="text/javascript">
<!--
[{ if $updatelist == 1}]
@ -89,8 +87,6 @@ function _groupExp(el) {
td.edittext {
white-space: normal;
}
div.box{background: white url([{$oView->getBGLogoUrl()}]) no-repeat bottom right;}
-->
</style>
@ -116,14 +112,20 @@ function _groupExp(el) {
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{ $oxid }]">
<table border="0" width="98%">
<tr>
<td valign="top" class="edittext">
<tr>
<td valign="top" class="edittext">
[{if $oView->getValueStatus() == 'error'}]
<hr>
<b>[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}]</b><br>
<input type="submit" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_BTN"}]">
<hr>
<b>[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}]</b>
<br>
<br>
<span class="d3modcfg_btn fixed icon status_attention">
<input type="submit" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_BTN"}]">
<span></span>
</span>
</form>
</div>
[{else}]
<div class="groupExp">
@ -281,9 +283,13 @@ function _groupExp(el) {
</table>
[{/if}]
</td>
</tr>
</table>
[{include file="bottomitem.tpl"}]
[{assign var="incpath" value=$oViewConf->getModulePath('d3modcfg_lib')|cat:"views/admin/tpl/d3_cfg_mod_inc.tpl"}]
[{include file=$incpath}]
<script type="text/javascript">
if (parent.parent) {

Bestand weergeven

@ -1,7 +1,5 @@
[{include file="headitem.tpl" title="D3_GOOGLEANALYTICS_CFG_TITLE"|oxmultilangassign}]
<link rel="stylesheet" type="text/css" href="[{$oViewConf->getResourceUrl() }]d3_mod_cfg.css">
<script type="text/javascript">
<!--
[{ if $updatelist == 1}]
@ -89,8 +87,6 @@
td.edittext {
white-space: normal;
}
div.box{background: white url([{$oView->getBGLogoUrl()}]) no-repeat bottom right;}
-->
</style>
@ -132,6 +128,7 @@
<span></span>
</span>
</form>
</div>
[{else}]
<div class="groupExp">