 BigApi.ObjectController.BlocRss = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this.buildSliding()}, buildSliding:function() { var canal_header = this.mainContainer.down('.rss_canal_header'); if(canal_header) this.canal_sliding = new BigApi.Graphic.SlidingContainer(canal_header.up(), { onEvent:'click', classNames: { toggle:'rss_canal_header', toggleActive:'rss_canal_header_active', content:'rss_canal_content' } }); var canal_content = this.mainContainer.down('.rss_canal_items'); if(canal_content) { this.items_sliding = new BigApi.Graphic.SlidingContainer(canal_content, { onEvent:'click', classNames: { toggle:'rss_item_header', toggleActive:'rss_item_header_active', content:'rss_item_content' } })} }, onTemplateChanged:function() { if(this.canal_sliding) this.canal_sliding.dispose(); if(this.items_sliding) this.items_sliding.dispose(); this.buildSliding()}, dispose:function($super) { $super(); if(this.canal_sliding) this.canal_sliding.dispose(); if(this.items_sliding) this.items_sliding.dispose()} }); BigApi.ObjectController.TreeMenu = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._bindMenuItemsEvents(); this.addObserver(document, 'BigApiObjectTreeMenu:Action', this._onBigApiObjectTreeMenuAction.bindAsEventListener(this))}, _onBigApiObjectTreeMenuAction:function(event) { if(event.memo.controller != this) { this._onClickMenuItem(null)} }, _bindMenuItemsEvents:function() { this.currentDepthsItems = $A(); this.mainContainer.select('.menu_item').each(function(item) { var depth = this._findItemDepth(item); if (depth >= 0) { if (item.hasClassName('menu_depth' + depth + '_item_over')) { this.currentDepthsItems[depth] = item} } this.addObserver(item,'click', this._onClickMenuItem.bind(this, item))}.bind(this))}, _onClickMenuItem:function(item) { if(item) { var depth = this._findItemDepth(item); if(this.currentDepthsItems[depth]) this.currentDepthsItems[depth].removeClassName('menu_depth'+depth+'_item_over'); this.currentDepthsItems[depth] = item; item.addClassName('menu_depth'+depth+'_item_over'); document.fire('BigApiObjectTreeMenu:Action', {action:'item_selected', item:item, controller:this})} else { this.currentDepthsItems.each(function(item, depth){ item.removeClassName('menu_depth'+depth+'_item_over')}); this.currentDepthsItems = $A()} }, _findItemDepth:function(item) { var depthclass = item.classNames().grep(/menu_depth([0-9]+)_item/).first(); var depth = -1; if(depthclass) { var results =/depth([0-9]+)/.exec(depthclass); if(results) { depth = parseInt(results[1])} } return depth}, onTemplateChanged:function() { this._bindMenuItemsEvents()}, dispose:function($super) { $super()} }); BigApi.ObjectController.ContainerDocumentVisitor = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.footerWrap = this.getBodyContainer().down('.ContainerDocument_footer_wrap'); if(this.footerWrap) { this.updateFooterPos(); this.addObserver(window, 'resize', this.updateFooterPos.bind(this)); this.addObserver(document, 'BigApi.Document:ContentChanged', function(){setTimeout(this.updateFooterPos.bind(this), 500)}.bind(this))} }, updateFooterPos:function() { footerElement = this.footerWrap; var containerHeight = this.getWindowHeight(); var contentHeight= this.mainContainer.offsetHeight; var footerHeight = footerElement.getHeight(); if(!this.baseFooterYOffset) this.baseFooterYOffset = footerElement.positionedOffset()[1]; var footerTop = footerElement.style.top ? parseInt(footerElement.style.top) : 0; var footerYOffset = footerElement.positionedOffset()[1]-footerTop; if (containerHeight-(contentHeight)>=0) { footerElement.style.position='relative'; footerElement.style.top= (containerHeight-(footerYOffset+footerHeight))+'px'} else { footerElement.style.position='static'} }, getWindowHeight:function() { var windowHeight=0; if (typeof(window.innerHeight)=='number') { windowHeight=window.innerHeight} else { if (document.documentElement&& document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight} else { if (document.body&&document.body.clientHeight) { windowHeight=document.body.clientHeight} } } return windowHeight} }); BigApi.ObjectController.TreeContextZoneVisitor = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.elements = {}; this.inputs = {}; this.contextDatas = BigApi.Context.Pool.getCurrentContextDatas(); this.elements.container = this.mainContainer.down('div'); this.addObserver(document, 'BigApi.Context:onUpdateContext', this._onUpdateContext.bindAsEventListener(this))}, _refreshContent:function() { BigApi.ObjectController.ZonesPool.unregisterZoneControllers(this.displayContainerId); new Ajax.Request('ajax/BigApiObjectTreeContextZoneVisitor', { parameters:{ displayContainerId:this.displayContainerId }, onSuccess:this._refreshContentSuccess.bind(this) })}, _refreshContentSuccess:function(transport) { var object = BigApi.Utils.ajaxJsonEval(transport); var jsFiles = []; $A(object.objects).each(function(elem) { if(elem.linkedFiles && elem.linkedFiles.css) { elem.linkedFiles.css.each(function(file) { BigApi.Loader.requireDynamicCssFile(file)})} if(elem.linkedFiles && elem.linkedFiles.js) { elem.linkedFiles.js.each(function(file) { jsFiles.push(file)})} }); this.elements.container.update(object.content); if (!BigApi.Browser.IE || BigApi.Browser.IEVersion > 6) { this.elements.container.hide(); new Effect.Appear(this.elements.container, { duration: 0.5 })} if (window.Shadowbox) { Shadowbox.clearCache(); Shadowbox.setup()} var js_sync_loader = null; var js_sync_loader = new BigApi.Loader.JsSyncLoader({onLoadedHandler:this._onJsFilesLoaded.bind(this, object)}); $A(jsFiles).each(function(file){ js_sync_loader.addFile(file)}); js_sync_loader.process()}, _onJsFilesLoaded:function(object) { $A(object.objects).each(function(elem) { if(elem.linkedJsExpr) { var result = eval(elem.linkedJsExpr)} }.bind(this)); document.fire('BigApi.Document:ContentChanged')}, dispose:function($super) { BigApi.ObjectController.ZonesPool.unregisterZoneControllers(this.displayContainerId); $super()}, _onUpdateContext:function(event) { lastParams = event.memo.lastParams; newParams = event.memo.newParams; this.contextDatas = newParams; this._refreshContent()} }); BigApi.ObjectController.ContainerPageVisitor = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); var sup_container = $$('body')[0]; if(sup_container) sup_container.addClassName(this.getTemplateClass()+'_supbody')}, dispose:function($super) { $super(); var sup_container = $$('body')[0]; if(sup_container) sup_container.removeClassName(this.getTemplateClass()+'_supbody')} }); BigApi.ObjectController.BlocBoutiquePanierMenu = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.addObserver(document, 'BigApi.BoutiquePanier:ContentChanged', this._onBigApiBoutiquePanierContentChanged.bindAsEventListener(this))}, _onBigApiBoutiquePanierContentChanged:function() { new Ajax.Request('ajax/BigApiObjectBlocBoutiquePanierMenu', { parameters: { displayContainerId:this.displayContainerId }, onSuccess:function(transport) { var result = BigApi.Utils.ajaxJsonEval(transport); if(content = this.mainContainer.down('.panier_content')) { content.update(result.content)} }.bind(this) })} }); BigApi.ObjectController.TreeMenuBottom = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._bindDepth0Events(); this.addObserver(document, 'BigApiObjectTreeMenu:Action', this._onBigApiObjectTreeMenuAction.bindAsEventListener(this))}, _onBigApiObjectTreeMenuAction:function(event) { if(event.memo.controller != this) { this._onClickDepth0Button(null)} }, _bindDepth0Events:function() { this.currentDepth0Item = null; this.currentDepth0Item = this.mainContainer.down('.depth0_item_over'); this.mainContainer.select('.depth0_item').each(function(item) { this.addObserver(item,'click', this._onClickDepth0Button.bind(this, item))}.bind(this))}, _onClickDepth0Button:function(item) { if(this.currentDepth0Item == item) return; if(this.currentDepth0Item) this.currentDepth0Item.removeClassName('depth0_item_over'); this.currentDepth0Item = item; if(item) { this.currentDepth0Item.addClassName('depth0_item_over'); document.fire('BigApiObjectTreeMenu:Action', {action:'item_selected', item:item, controller:this})} }, onTemplateChanged:function() { this._bindDepth0Events()}, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocBoutiqueCommandeEtape3AddPromo = Class.create(BigApi.ObjectController.IBasicForm, { _onSuccessActions:function(obj) { BigApi.Context.Loader.updateContext()} }); BigApi.ObjectController.BlocClientInfos = Class.create(BigApi.ObjectController.IBasicForm, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options)}, _postValidateFields:function() { var errors = []; var fields = this.form.getInputs('password'); if(fields.length) { if(fields[0].value != fields[1].value) { if(fields[0].value != '') errors.push({input:fields[0], message:'Les mots de passe ne correspondent pas'}); if(fields[1].value != '') errors.push({input:fields[1], message:'Les mots de passe ne correspondent pas'})} } fields = this.form.getInputs('text', 'BlocClientInfos[Fields][Client][Email]'); if(fields.length) { if(fields[0].value != '' && !BigApi.ValueValidation.isEmail(fields[0].value)) { errors.push({input:fields[0], message:'L\'adresse email saisie n\'est pas valide'})} } return errors}, _onSuccessActions:function(obj) { var action = this.lastSubmitParams.actionOnSuccess ? this.lastSubmitParams.actionOnSuccess : obj.actionOnSuccess; if(action == 'nextStep') { BigApi.Context.Loader.updateContext(null, {"client_infos_livraison":""})} else { BigApi.Context.Loader.updateContext(null, {"client_infos":""})} } }); BigApi.ObjectController.TreeMenuHorizontal = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._bindDepth0Events(); this.addObserver(document, 'BigApiObjectTreeMenu:Action', this._onBigApiObjectTreeMenuAction.bindAsEventListener(this))}, _onBigApiObjectTreeMenuAction:function(event) { if(event.memo.controller != this) { this._onClickDepth0Button(null)} }, _bindDepth0Events:function() { this.currentDepth0Item = null; this.currentDepth0Item = this.mainContainer.down('.depth0_item_over'); this.mainContainer.select('.depth0_item').each(function(item) { this.addObserver(item,'click', this._onClickDepth0Button.bind(this, item))}.bind(this))}, _onClickDepth0Button:function(item) { if(this.currentDepth0Item == item) return; if(this.currentDepth0Item) this.currentDepth0Item.removeClassName('depth0_item_over'); this.currentDepth0Item = item; if(item) { this.currentDepth0Item.addClassName('depth0_item_over'); document.fire('BigApiObjectTreeMenu:Action', {action:'item_selected', item:item, controller:this})} }, onTemplateChanged:function() { this._bindDepth0Events()}, dispose:function($super) { $super()} }); BigApi.ObjectController.TreeMenuTop = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._bindDepth0Events(); this.addObserver(document, 'BigApiObjectTreeMenu:Action', this._onBigApiObjectTreeMenuAction.bindAsEventListener(this))}, _onBigApiObjectTreeMenuAction:function(event) { if(event.memo.controller != this) { this._onClickDepth0Button(null)} }, _bindDepth0Events:function() { this.currentDepth0Item = null; this.currentDepth0Item = this.mainContainer.down('.depth0_item_over'); this.mainContainer.select('.depth0_item').each(function(item) { this.addObserver(item,'click', this._onClickDepth0Button.bind(this, item))}.bind(this))}, _onClickDepth0Button:function(item) { if(this.currentDepth0Item == item) return; if(this.currentDepth0Item) this.currentDepth0Item.removeClassName('depth0_item_over'); this.currentDepth0Item = item; if(item) { this.currentDepth0Item.addClassName('depth0_item_over'); document.fire('BigApiObjectTreeMenu:Action', {action:'item_selected', item:item, controller:this})} }, onTemplateChanged:function() { this._bindDepth0Events()}, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocBoutiqueCommandeEtape1 = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this.content = this.mainContainer.down('.content'); this.form = this.mainContainer.down('form'); this.addObserver(document, 'BlocBoutiqueCommandeEtape1:Action', this._onBoutiqueCommandeEtape1Action.bindAsEventListener(this)); this.addObserver(document, 'BlocBoutiqueCommandeEtape1:Submit', this._onSubmit.bindAsEventListener(this)); if(this.form) this.addObserver(this.form, 'submit', this._onSubmit.bindAsEventListener(this))}, _onBoutiqueCommandeEtape1Action:function(event) { new Ajax.Request('ajax/BigApiObjectBlocBoutiqueCommandeEtape1Action',{ parameters:Object.extend(event.memo,{display_container_id:this.mainContainer.id}), onSuccess:this._onBoutiquePanierActionSuccess.bind(this, null) })}, _onSubmit:function(event) { Event.stop(event); new Ajax.Request('ajax/BigApiObjectBlocBoutiqueCommandeEtape1Form', { parameters:Object.extend({display_container_id:this.mainContainer.id}, this.form.serialize(true)), onSuccess:this._onBoutiquePanierActionSuccess.bind(this, event.memo) }) }, _onBoutiquePanierActionSuccess:function(event_memo,transport) { var datas = BigApi.Utils.ajaxJsonEval(transport); if(datas.changed) { this.content.update(datas.content); document.fire('BigApi.BoutiquePanier:ContentChanged', {})} if(event_memo && BigApi.Context) BigApi.Context.Loader.updateContext(null, event_memo)}, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocBoutiqueRechercheRapide = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.form = this.mainContainer.down('form'); if(this.form) this.addObserver(this.form, 'submit', this._onFormSubmit.bindAsEventListener(this))}, _onFormSubmit:function(event) { Event.stop(event); var input = this.form.getInputs('text')[0]; if(input && input.value != '') { BigApi.Context.Loader.updateContext(null, {recherche:input.value}); input.value = ''} return false}, _onFormSubmitSuccess:function(transport) { }, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocBoutiqueProduitAccueil = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._buildSliding()}, _buildSliding:function() { var items = this.mainContainer.down('.items'); if(items) { this.items_sliding = new BigApi.Graphic.SlidingContainer(items, { onEvent:'click', duration : 0.6, classNames: { toggle:'items_header', toggleActive:'items_header_active', content:'items_content' } })} }, onTemplateChanged:function() { if(this.items_sliding) this.items_sliding.dispose(); this._buildSliding()}, dispose:function($super) { $super(); if(this.items_sliding) this.items_sliding.dispose()} }); BigApi.ObjectController.BlocBoutiqueCommandeEtape3 = Class.create(BigApi.ObjectController.IBasicForm, { _onSuccessActions:function(obj) { if(obj.actionOnSuccess == 'previousStep') { BigApi.Context.Loader.updateContext(null, {'commande_etape_2':''})} else BigApi.Context.Loader.updateContext(null, {'commande_etape_4':''})} }); BigApi.ObjectController.BlocClientInfosLivraison = Class.create(BigApi.ObjectController.IBasicForm, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.options.ignoreFieldsPreValidation = true}, _onSuccessActions:function(obj) { this._successDisplay(obj); var action = obj.actionOnSuccess; if(action == 'previousStep') { BigApi.Context.Loader.updateContext(null, {"client_infos":""})} else if(action == 'reload') { window.setTimeout("window.location.reload(true);", 2500)} else if(action == 'reload_commande_etape_2') { window.setTimeout("window.location.reload(true);", 2500)} else BigApi.Context.Loader.updateContext(null, {"client_infos":""})} }); BigApi.ObjectController.BlocBoutiqueProduitReferences = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this.form = this.mainContainer.down('form'); if(this.form) this.addObserver(this.form, 'submit', this._onFormSubmit.bindAsEventListener(this))}, _onFormSubmit:function(event) { Event.stop(event); new Ajax.Request('ajax/BigApiObjectBlocBoutiqueProduitReferences',{ parameters:this.form.serialize(true), onSuccess:this._onFormSubmitSuccess.bind(this) }); return false}, _onFormSubmitSuccess:function(transport) { document.fire('BigApi.BoutiquePanier:ContentChanged', {}); BigApi.Context.Loader.updateContext()}, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocBoutiqueCommandeEtape2ClientConnexion = Class.create(BigApi.ObjectController.IBasicForm, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options)}, _onSuccessActions:function(obj) { if(obj.actionOnSuccess == 'reload') { window.location.reload(true)} } }); BigApi.ObjectController.BlocBoutiqueCommandeEtape2ClientInfos = Class.create(BigApi.ObjectController.IBasicForm, { _onSuccessActions:function(obj) { if(obj.actionOnSuccess == 'previousStep') { BigApi.Context.Loader.updateContext(null, {'commande_etape_1':''})} else BigApi.Context.Loader.updateContext(null, {'commande_etape_3':''})} }); BigApi.ObjectController.BlocBoutiqueCommandeEtape1AddRef = Class.create(BigApi.ObjectController.IBasicForm, { _onSuccessActions:function(obj) { BigApi.Context.Loader.updateContext()} }); BigApi.ObjectController.TreeMenuSliding = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); this.items = $A(); this.slidings = $A(); this._buildSliding(0); this.bindEvents()}, _buildSliding:function(depth, parentElement) { var header; if(depth == 0) header = this.mainContainer.down('.depth0_item').up(); else if(parentElement) { header = parentElement.next('.depth'+(depth-1).toString()+'_subcontent')} depths = depth.toString(); if(header) { if(!this.slidings[depth]) this.slidings[depth] = $A(); this.slidings[depth].push(new BigApi.Graphic.SlidingContainer(header, { onEvent:'click', onEventCustom:'BigApiObjectTreeMenu:Click', classNames: { toggle:'depth'+depths+'_item', toggleActive:'depth'+depths+'_item_over', content:'depth'+depths+'_subcontent' } })); header.select('.depth'+depths+'_item').each(function(item) { this._buildSliding(depth+1, item)}.bind(this))} else { this.addObserver(parentElement, 'click', this._onClickButton.bind(this, depth-1, parentElement))} }, _onBigApiObjectTreeMenuAction:function(event) { if(event.memo && event.memo.controller != this) { } }, _onBigApiObjectTreeMenuSimulateClick:function(event) { if(event && event.memo) { if(event.memo.method == 'href' && event.memo.catchString) { var found = null; this.items.each(function(item){ if(item.element.href.indexOf(event.memo.catchString) != -1) found = item}); if(found) { found.element.fire('BigApiObjectTreeMenu:Click'); if(found.element.onclick) found.element.onclick()} } } }, bindEvents:function() { this.items = $A(); this.addObserver(document, 'BigApiObjectTreeMenu:Action', this._onBigApiObjectTreeMenuAction.bindAsEventListener(this)); this.addObserver(document, 'BigApiObjectTreeMenu:SimulateClick', this._onBigApiObjectTreeMenuSimulateClick.bindAsEventListener(this)); this.currentSelectedItems = {}; for(var i = 0; i < 4; i++) { var key = 'depth'+i.toString(); this.mainContainer.select('.'+key+'_item').each(function(item) { this.items.push({element:item, depth:i})}.bind(this)); if(elem = this.mainContainer.down('.'+key+'_item_over')) { this.currentSelectedItems[i.toString()] = elem} } }, _onClickButton:function(depth, item) { if (item != this.currentSelectedItems[depth.toString()]) { for(var i = this.slidings.length-1; i >= depth; i--) { if(this.slidings[i]) this.slidings[i].each(function(sliding){ if(depth != i || !sliding.hasButton(item)) sliding.closeAll()})} $H(this.currentSelectedItems).each(function(pair) { if(parseInt(pair.key) >= depth) pair.value.removeClassName('depth'+pair.key+'_item_over')})} item.addClassName('depth'+depth.toString()+'_item_over'); this.currentSelectedItems[depth.toString()] = item; document.fire('BigApiObjectTreeMenu:Action', {action:'item_selected', item:item, controller:this})}, onTemplateChanged:function() { for(var i = 0; i < this.slidings.length; i++) { this.slidings[i].each(function(sliding){ sliding.closeAll()})} this._buildSliding()}, dispose:function($super) { for(var i = 0; i < this.slidings.length; i++) { this.slidings[i].each(function(sliding){ sliding.closeAll()})} $super()} }); BigApi.ObjectController.BlocClientConnexion = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId, options); if(this.mainContainer.down('.not_logged')) this._processNonLogged(); else this._processLogged()}, _processNonLogged:function() { this.form = this.mainContainer.down('form'); this.error_container = null; if(this.form) this.addObserver(this.form, 'submit', this._onSubmit.bindAsEventListener(this))}, _processLogged:function() { this.addObserver(document, 'BigApiObjectBlocClientConnexion:Logout', this.logout.bind(this))}, logout:function() { new Ajax.Request('ajax/BigApiObjectBlocClientConnexionAction', { parameters: { action:'logout' }, onSuccess:this._onLogoutSuccess.bind(this) })}, _onLogoutSuccess:function(transport) { var obj = BigApi.Utils.ajaxJsonEval(transport); if (obj.success) window.location.reload(true)}, _onSubmit:function(event) { Event.stop(event); var inputs = this.form.getElements(); var error_messages = $A(); inputs.each(function(input) { if(input.type != 'submit' && input.type != 'button') { var has_error = false; if(input.value == '') { error_messages.clear(); error_messages.push('Un ou plusieurs champs obligatoires n\'ont pas été renseignés'); input.addClassName('error'); has_error = true} if(!has_error) input.removeClassName('error')} }); if (error_messages.size()) this._errorsDisplay(error_messages); else { this._errorsDisplay(null); new Ajax.Request('ajax/BigApiObjectBlocClientConnexionAction', { parameters:Object.extend(this.form.serialize(true), {action:'login'}), onSuccess:this._onSubmitSuccess.bind(this) }) } }, _onSubmitSuccess:function(transport) { var obj = BigApi.Utils.ajaxJsonEval(transport); if (obj.success) window.location.reload(true); else { this.form.getInputs('password')[0].value = ''; this._errorsDisplay($A(obj.errors))} }, _errorsDisplay:function(messages) { if(messages) { var concat = ''; messages.each(function(message) { concat += message}.bind(this)); alert(concat)} }, dispose:function($super) { $super()} }); BigApi.ObjectController.BlocPresentationSliding = Class.create(BigApi.ObjectController.IBasic, { initialize:function($super, displayContainerId, options) { $super(displayContainerId); this._buildSliding()}, _buildSliding:function() { var items = this.mainContainer.down('.items'); if(items) { this.items_sliding = new BigApi.Graphic.SlidingContainer(items, { onEvent:'click', duration : 0.6, headersBeforeContent:false, classNames: { toggle:'item_header', toggleActive:'item_header_active', content:'item_content' }, randomOpen:true, randomOpenDelay:0.5 })} }, onTemplateChanged:function() { if(this.items_sliding) this.items_sliding.dispose(); this._buildSliding()}, dispose:function($super) { $super(); if(this.items_sliding) this.items_sliding.dispose()} }); 