define( function() {
"use strict";
function C_ListColumnDisplay()
{
};
C_ListColumnDisplay.prototype.draw = function( oControlHost )
{
var o = oControlHost.configuration;
this.m_oList = oControlHost.page.getControlByName( ( o ? o.name : "" ) || "List1" );
var el = oControlHost.container;
el.innerHTML =
'' +
'' +
'' +
'';
this.m_txt = el.querySelector( "*[class*='txt']" );
el.querySelector( "*[class*='btnShow']" ).onclick = this.setColumnDisplay.bind( this, true );
el.querySelector( "*[class*='btnHide']" ).onclick = this.setColumnDisplay.bind( this, false );
};
C_ListColumnDisplay.prototype.setColumnDisplay = function( bDisplay )
{
var a = this.m_txt.value.split( "," );
for ( var i = 0; i < a.length; i++ )
{
this.m_oList.setColumnDisplay( parseInt( a[i] ), bDisplay );
}
};
return C_ListColumnDisplay;
});