f(g)GiftshopController.updateComposerButtonText(e);};GiftshopController.updateComposerButtonText=function(a){Arbiter.inform(GiftsMall.SET_PURCHASE_BUTTON,{buttonText:a?_tx("Cadeau geven"):_tx("Cadeau kopen")});};GiftshopController.enablePurchaseButton=function(a){Arbiter.inform(GiftsMall.SET_PURCHASE_BUTTON,{enable:a});};GiftshopController.set_item_category=function(e){if(!e){GiftshopController.log('selected category 0');}else GiftshopController.log('selected category '+e);var b=GiftshopController.getCurrentSettingByKey('tag_id');var a='giftshop_top_tag_'+(b?b:'');var d='giftshop_top_tag_'+(e?e:'');var c='giftshop_top_tag_';};GiftshopController.reset_item_category=GiftshopController.set_item_category.bind(null,null);GiftshopController.search_addtag=function(b,a,c){GiftshopController.findgifts_by_tag(b,a,c.i);};GiftshopController.findgifts_by_tag=function(b,a,c){this.enablePurchaseButton(false);GiftshopController.set_item_category(c);GiftshopController.setCurrentSettingByKey('tag_id',c);GiftStoreManager.getInstance().updatePager();};GiftshopController.search_removetag=function(b,a,c){GiftshopController.reset_item_category();GiftshopController.setCurrentSettingByKey('tag_id',null);GiftStoreManager.getInstance().updatePager();};GiftshopController.skuPrices={};GiftshopController.addSkuPrices=function(a){copy_properties(GiftshopController.skuPrices,a);};GiftshopController.getSkuPrice=function(a){return GiftshopController.skuPrices[a];};GiftshopController.setAutoExpandedMode=function(a){GiftshopController.isAutoExpanded=a;};GiftshopController.getAutoExpandedMode=function(){return GiftshopController.isAutoExpanded;};GiftshopController.setHasInteracted=function(a){GiftshopController.hasInteracted=a;};GiftshopController.getHasInteracted=function(){return GiftshopController.hasInteracted;};GiftshopController.composer=null;GiftshopController.getComposer=function(){return GiftshopController.composer||null;};GiftshopController.fallBackStatusUpdate=function(){var a=GiftshopController.getComposer();if(a)a.reset(true,false,false).post();};GiftshopController.focusMessageInput=function(){var a=GiftshopController.getComposer();if(a){var b=a.focusInput();}else $('message').focus();};GiftshopController.initOrder=function(l,k,d,e,i){i=true;var f;var a;var g=GiftStoreManager.getInstance();if(!g)return;var b=g.getAppOrderInfo();copy_properties(k,b.order_info);a=b.api_key;if(!a){if(GiftshopController.getAutoExpandedMode()){GiftshopController.fallBackStatusUpdate();}else GiftshopController.log('gsh:select-gift '+k.sku);return;}var h=(a==GiftshopController.giftsApiKey)&&!GiftshopController.getSkuPrice(k.sku);if(!l){GiftshopController.log('gsh:select-receiver '+k.sku);f=_tx("Kies een ontvanger voor je cadeau.");DOMScroll.scrollTo(new Vector2(0,0,'document'),false);}else if(!k.message&&!i){GiftshopController.log('gsh:include-message '+k.sku);new Dialog().setTitle(_tx("Schrijf een bericht")).setBody(_tx("Wil je degene die je een cadeau heeft gegeven een bericht sturen?")).setButtons([Dialog.newButton('Yes',_tx("Schrijf een bericht"),null,GiftshopController.focusMessageInput),Dialog.newButton('No',_tx("Toch verzenden"),'inputaux',function(){GiftshopController.initOrder(l,k,d,e,true);})]).show();return;}else if(k.message.length>GiftshopController.maxMessageLength){GiftshopController.log('gsh:message-too-long '+k.sku);var j=k.message.length-GiftshopController.maxMessageLength;f=_tx("Je bericht is {number} tekens te lang.",{number:j});}if(f){ErrorDialog.show(_tx("Fout"),f);return;}k.source=k.source||'';k.ref=k.ref||URI.getRequestURI().getQueryData().ref||'';if(h){var c=new AsyncRequest('/ajax/giftshop/free_gifts.php').setData({order_info:JSON.stringify(k),receiver:l,back_url:d});if(e)c.setContextData(e,'application_'+a);new Dialog().setAsync(c).show();return;}GiftshopController.enablePurchaseButton(false);GiftCredits.getPrompt(null,l,k,d,GiftshopController.enablePurchaseButton.curry(true),GiftCredits.PLACE_GIFTSHOP,a,e);};GiftshopController.onclickSubmit=function(event){var b=Form.serialize($('giftshop_form'));b.message=Input.getValue($('message'));var c=b.receiver;delete b['receiver'];var a=URI.getRequestURI().removeQueryData(['ref']).toString();GiftshopController.initOrder(c,b,a);event&&event.kill();};GiftshopController.updateNumCredits=function(a,b){if(ge('giftshop_num_credits_balance_holder'))DOM.setContent($('giftshop_num_credits_balance_holder'),a);if(ge('giftshop_num_credits_holder'))DOM.setContent($('giftshop_num_credits_holder'),b);};function gift_recipient_onfound(a){if(!a){$('receiver').value='';$('recipient_pic').style.backgroundImage='';$('recipient_pic').style.height='0px';$('recipient_pic').style.width='0px';}else{$('receiver').value=a.i;$('recipient_pic').style.backgroundImage='url('+a.it+')';$('recipient_pic').style.height='50px';$('recipient_pic').style.width='50px';}return true;}copy_properties(GiftStoreManager,{_instance:null,getAndUpdateInstance:function(c,d,b,e,a){if(!this._instance)this._instance=new GiftStoreManager(c,d,b,e);this._instance.update(e);return this._instance;},getInstance:function(){return this._instance;}});function GiftStoreManager(b,c,a,d){this.embedded_store=$(b);onleaveRegister(bind(this,function(){DOM.remove(this.embedded_store);delete GiftStoreManager._instance;}),true);this.pageOffset=c;this.perPage=a;this.totalPages=d;this.prevSelect=null;this.initialize();this.initPager();this.addGiftListeners();}GiftStoreManager.prototype.updatePager=function(){this.pager.setOffset(0);this.changePage(0);};GiftStoreManager.prototype.initialize=function(b,a,c){this.giftsGrid=DOM.find(this.embedded_store,'div#gifts_grid');this.storeFooter=DOM.find(this.embedded_store,'div#store_footer');};GiftStoreManager.prototype.update=function(a){this.totalPages=a||this.totalPages;this.pager.setTotal(this.totalPages);};GiftStoreManager.prototype.initPager=function(){this.pager=new UIPager(this.totalPages,1,this.pageOffset,this.changePage.bind(this));this.pagerspan=DOM.find(this.embedded_store,'div#giftstore_pager');this.pagerspan.appendChild(this.pager.getRoot());this.pager.setSummaryTextHandler(this.getSummaryText.bind(this));};GiftStoreManager.prototype.getSummaryText=function(a,c,b){return _tx("Pagina {current} van {total}",{current:a+1,total:c});};GiftStoreManager.prototype.setTotalPages=function(a){GiftStoreManager.getInstance().totalPages=a;GiftStoreManager.getInstance().pager.setTotal(a);};GiftStoreManager.prototype.addGiftListeners=function(){var a=DOM.scry(this.giftsGrid,'div.gift_outer.instock');for(var b=0;bthis.totalPages)return;var a=this.perPage*b;GiftshopController.log('changed to page starting at '+a+' with '+this.perPage+' per page');var d=function(e){this.setTotalPages(e.total_pages);DOM.replace(this.giftsGrid,HTML(e.gifts_grid));this.giftsGrid=DOM.find(this.embedded_store,'div#gifts_grid');this.addGiftListeners();}.bind(this);var c=GiftshopController.getCachedPage(a,this.perPage);if(c){d(c);return;}DOM.empty(this.giftsGrid);CSS.addClass(this.giftsGrid,'gifts_loading');this.paginate(a,this.perPage,d);};GiftStoreManager.prototype.paginate=function(d,c,a){var b={start:d,per_page:c};copy_properties(b,GiftshopController.getCurrentSettings());new AsyncRequest().setURI('/ajax/giftshop/browse.php').setData(b).setHandler(function(f){var e=f.getPayload();if(a)a(e);GiftshopController.setCachedPage(d,c,e);}).send();};GiftStoreManager.prototype.giftOnClick=function(a,event){var b=a.getAttribute('sku');GiftshopController.updateComposerButtonText(GiftshopController.getSkuPrice(b)==0);if(this.prevSelect!=a){GiftshopController.log('selected SKU '+b);if(this.prevSelect)GiftshopController.changeGiftOuterClass(this.prevSelect,'gift_outer');}GiftshopController.changeGiftOuterClass(a,'gift_outer_onclick');this.prevSelect=a;this.setAppOrderInfo(GiftshopController.giftsApiKey,{sku:b},true);event&&event.kill();};GiftStoreManager.prototype.resetSku=function(){if(this.prevSelect)GiftshopController.changeGiftOuterClass(this.prevSelect,'gift_outer');this.prevSelect=null;};GiftStoreManager.prototype.giftOnMouseOver=function(a,event){if(this.prevSelect!=a)GiftshopController.changeGiftOuterClass(a,'gift_outer_onmouseover');event.kill();};GiftshopController.changeGiftOuterClass=function(d,b){var c={gift_outer:0,gift_outer_onmouseover:0,gift_outer_onclick:0};c[b]=1;for(var a in c)if(!c[a]){CSS.removeClass(d,a);}else CSS.addClass(d,a);};GiftStoreManager.prototype.giftOnMouseOut=function(a,event){if(this.prevSelect!=a)GiftshopController.changeGiftOuterClass(a,'gift_outer');event.kill();};GiftStoreManager.prototype.getAppOrderInfo=function(){return {api_key:this.appOrderApiKey||null,order_info:this.appOrderInfo||{}};};GiftStoreManager.prototype.setAppOrderInfo=function(a,b,c){if(!a)return;if(b){this.appOrderApiKey=a;this.appOrderInfo=b;}if(c!==null)GiftshopController.enablePurchaseButton(c);};GiftStoreManager.prototype.clearAppOrderInfo=function(){this.appOrderApiKey=null;this.appOrderInfo={};};GiftshopController.forcePublicPrivacy=function(d){if(ge('delivery_info')&&ge('platform_gift_privacy_txt')){var a=$('delivery_info');var b=$('platform_gift_privacy_txt');if(d){hide(a);show(b);var c=$('gift_privacy_type_0');c.checked=true;}else{show(a);hide(b);}}};GiftshopController.resetForm=function(){$('message').value='';$('gift_privacy_type_0').checked=true;!($('friend_selector').typeahead)&&$('friend_selector').focus();$('friend_selector').typeahead.clear();$('friend_selector').typeahead.blur();gift_recipient_onfound();GiftStoreManager.getInstance().resetSku();};GiftshopController.option_select_tag=function(a,c,b){GiftshopController.findgifts_by_tag(0,b,Form.getSelectValue(a));};GiftshopController.log=function(a){var c='\001';var d=Math.floor((new Date()).getTime()/1000);var b=[d,GiftshopController.user,a].join(c);scribe_log('giftshop',b);}; var FBPay={registerServiceForIFrame:function(){if(!FBPay._rpcServer){var a={submitOrder:{asyncMethod:FBPay.onSubmitOrderRequest},updateGiftshopOrder:{asyncMethod:FBPay.onUpdateGiftshopOrderRequest},submitGiftshopOrder:{asyncMethod:FBPay.onSubmitGiftshopOrderRequest}};FBPay._rpcServer=new FB.XdComm.XdRpcServer('PaymentsServer',a);}},onSubmitOrderRequest:function(d,e,k){var c=d.app_id;var i=d.order_info;var j=d.receiver;var h=d.next_url;var b=d.api_key;var g=(d.credits_purchase?'buy_credits':'buy_item');var f=null;if(d.dev_purchase_params&&d.dev_purchase_params.shortcut=='offer'&&d.dev_purchase_params.offer_type=='dealspot'){f=d.dev_purchase_params;}else f={oscif:d.oscif,shortcut:d.shortcut,deal_id:d.deal_id,product_id:d.product_id,geo:d.geo};var a={logging_data:{purchase_type:d.purchase_type}};GiftCredits.getPrompt(c,j,i,h,e,null,b,null,g,f,a);},onUpdateGiftshopOrderRequest:function(a,b,f){var c=a.order_info||null;var d=null;a.price!==undefined&&(d=a.price);var e=null;a.ready!==undefined&&(e=a.ready);GiftStoreManager.getInstance().setAppOrderInfo(a.api_key,c,e);},onSubmitGiftshopOrderRequest:function(){var a=GiftshopController.getComposer();if(a){a.getData();}else GiftshopController.onclickSubmit();}};Hoi, ik ben Eveline style=bold color=FFFF00 speed=30 publish.local=true spacing=22 addOn=resource\:/resources/addons/textTail/textTail.addon size=x-large $-->
This file is not intended to be viewed directly using a web browser. To create a viewable file, use the Preview in Browser or Publish to Yahoo! Web Hosting commands from within Yahoo! SiteBuilder.