remove not neccessary controller extension and new template because of patch use

This commit is contained in:
Daniel Seifert 2020-02-25 09:49:40 +01:00
parent 3c88871a36
commit 11447ef248
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
4 changed files with 0 additions and 168 deletions

View File

@ -1,120 +0,0 @@
[{include file="popups/headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript">
initAoc = function()
{
YAHOO.oxid.container1 = new YAHOO.oxid.aoc( 'container1',
[ [{foreach from=$oxajax.container1 item=aItem key=iKey}]
[{$sSep}][{strip}]{ key:'_[{$iKey}]', ident: [{if $aItem.4}]true[{else}]false[{/if}]
[{if !$aItem.4}],
label: '[{oxmultilang ident="GENERAL_AJAX_SORT_"|cat:$aItem.0|oxupper}]',
visible: [{if $aItem.2}]true[{else}]false[{/if}]
[{/if}]}
[{/strip}]
[{assign var="sSep" value=","}]
[{/foreach}] ],
'[{$oViewConf->getAjaxLink()}]cmpid=container1&container=article_attribute&synchoxid=[{$oxid}]'
);
[{assign var="sSep" value=""}]
YAHOO.oxid.container2 = new YAHOO.oxid.aoc( 'container2',
[ [{foreach from=$oxajax.container2 item=aItem key=iKey}]
[{$sSep}][{strip}]{ key:'_[{$iKey}]', ident: [{if $aItem.4}]true[{else}]false[{/if}]
[{if !$aItem.4}],
label: '[{oxmultilang ident="GENERAL_AJAX_SORT_"|cat:$aItem.0|oxupper}]',
visible: [{if $aItem.2}]true[{else}]false[{/if}],
formatter: YAHOO.oxid.aoc.custFormatter
[{/if}]}
[{/strip}]
[{assign var="sSep" value=","}]
[{/foreach}] ],
'[{$oViewConf->getAjaxLink()}]cmpid=container2&container=article_attribute&oxid=[{$oxid}]'
)
YAHOO.oxid.container1.getDropAction = function()
{
return 'fnc=addattr';
}
YAHOO.oxid.container2.getDropAction = function()
{
return 'fnc=removeattr';
}
YAHOO.oxid.container2.subscribe( "rowClickEvent", function( oParam )
{
var aSelRows= YAHOO.oxid.container2.getSelectedRows();
if ( aSelRows.length ) {
oParam = YAHOO.oxid.container2.getRecord(aSelRows[0]);
$('_attrname').innerHTML = oParam._oData._0;
$('attr_value').value = oParam._oData._2;
$('attr_oxid').value = oParam._oData._3;
$('o2attr_oxid').value = oParam._oData._1; [{*** d3 completed ***}]
$D.setStyle( $('arrt_conf'), 'visibility', '' );
} else {
$D.setStyle( $('arrt_conf'), 'visibility', 'hidden' );
}
})
YAHOO.oxid.container2.subscribe( "dataReturnEvent", function()
{
$D.setStyle( $('arrt_conf'), 'visibility', 'hidden' );
})
YAHOO.oxid.container2.onSave = function()
{
YAHOO.oxid.container1.getDataSource().flushCache();
YAHOO.oxid.container1.getPage( 0 );
YAHOO.oxid.container2.getDataSource().flushCache();
YAHOO.oxid.container2.getPage( 0 );
}
YAHOO.oxid.container2.onFailure = function() { /* currently does nothing */ }
YAHOO.oxid.container2.saveAttribute = function()
{
var callback = {
success: YAHOO.oxid.container2.onSave,
failure: YAHOO.oxid.container2.onFailure,
scope: YAHOO.oxid.container2
};
YAHOO.util.Connect.asyncRequest( 'GET', '[{$oViewConf->getAjaxLink()}]&cmpid=container2&container=article_attribute&fnc=saveAttributeValue&oxid=[{$oxid}]&attr_value=' + encodeURIComponent( $('attr_value').value ) + '&attr_oxid=' + encodeURIComponent( $('attr_oxid').value ) + '&o2attr_oxid=' + encodeURIComponent( $('o2attr_oxid').value ), callback ); [{*** d3 completed***}]
}
// subscribint event listeners on buttons
$E.addListener( $('saveBtn'), "click", YAHOO.oxid.container2.saveAttribute, $('saveBtn') );
}
$E.onDOMReady( initAoc );
</script>
<table width="100%">
<colgroup>
<col span="2" width="40%" />
<col width="20%" />
</colgroup>
<tr class="edittext">
<td colspan="3">[{oxmultilang ident="GENERAL_AJAX_DESCRIPTION"}]<br>[{oxmultilang ident="GENERAL_FILTERING"}]<br /><br /></td>
</tr>
<tr class="edittext">
<td align="center" valign="top"><b>[{oxmultilang ident="ARTICLE_ATTRIBUTE_NOATTRIBUTE"}]</b></td>
<td align="center" valign="top"><b>[{oxmultilang ident="ARTICLE_ATTRIBUTE_ITEMSATTRIBUTE"}]</b></td>
<td align="center" valign="top">[{oxmultilang ident="ARTICLE_ATTRIBUTE_SELECTONEATTR"}]</td>
</tr>
<tr>
<td valign="top" id="container1"></td>
<td valign="top" id="container2"></td>
<td valign="top" align="center" class="edittext" id="arrt_conf" style="visibility:hidden">
<br><br>
<b id="_attrname">[{$attr_name}]</b>:<br><br>
<input id="o2attr_oxid" type="hidden"> [{*** d3 completed ***}]
<input id="attr_oxid" type="hidden">
<input id="attr_value" class="editinput" type="text"><br><br>
<input id="saveBtn" type="button" class="edittext" value="[{oxmultilang ident="ARTICLE_ATTRIBUTE_SAVE"}]">
</td>
</tr>
<tr>
<td class="oxid-aoc-actions"><input type="button" value="[{oxmultilang ident="GENERAL_AJAX_ASSIGNALL"}]" id="container1_btn"></td>
<td class="oxid-aoc-actions"><input type="button" value="[{oxmultilang ident="GENERAL_AJAX_UNASSIGNALL"}]" id="container2_btn"></td>
<td></td>
</tr>
</table>
</body>
</html>

View File

@ -17,12 +17,9 @@
namespace D3\Modules\AttributeMultiValues\Application\Controllers\Admin {
use OxidEsales\Eshop\Application\Controller\Admin\ArticleAttribute;
use OxidEsales\Eshop\Application\Controller\Admin\ArticleAttributeAjax;
class d3_article_attribute_ajax_multivalues_parent extends ArticleAttributeAjax {}
class d3_article_attribute_multivalues_parent extends ArticleAttribute {}
}
namespace D3\Modules\AttributeMultiValues\Application\Model {

View File

@ -1,39 +0,0 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright <EFBFBD> D<EFBFBD> Data Development, Thomas Dartsch
* @author D<EFBFBD> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Modules\AttributeMultiValues\Application\Controllers\Admin;
class d3_article_attribute_multivalues extends d3_article_attribute_multivalues_parent
{
/**
* Collects article attributes and selection lists, passes them to Smarty engine,
* returns name of template file "article_attribute.tpl".
*
* @return string
*/
public function render()
{
$sTplName = parent::render();
$iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
if ($iAoc == 1) {
$sTplName = "d3_article_attribute_multivalues.tpl";
}
return $sTplName;
}
}

View File

@ -14,9 +14,7 @@
*/
use D3\Modules\AttributeMultiValues\Application\Controllers\Admin\d3_article_attribute_ajax_multivalues;
use D3\Modules\AttributeMultiValues\Application\Controllers\Admin\d3_article_attribute_multivalues;
use D3\Modules\AttributeMultiValues\Application\Model\d3_oxattributelist_multivalues;
use OxidEsales\Eshop\Application\Controller\Admin\ArticleAttribute;
use OxidEsales\Eshop\Application\Controller\Admin\ArticleAttributeAjax;
use OxidEsales\Eshop\Application\Model\AttributeList;
@ -37,10 +35,6 @@ $aModule = array(
'url' => 'http://www.oxidmodule.com/',
'extend' => [
ArticleAttributeAjax::class => d3_article_attribute_ajax_multivalues::class,
ArticleAttribute::class => d3_article_attribute_multivalues::class,
AttributeList::class => d3_oxattributelist_multivalues::class,
],
'templates' => [
'd3_article_attribute_multivalues.tpl' => 'd3/d3multiattributevalues/Application/views/admin/tpl/d3_article_attribute_multivalues.tpl',
]
);