Guest User

Untitled

a guest
Jun 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AquaCoSy.productDisplayController = SC.ObjectController.create(
  2. /** @scope AquaCoSy.productDisplayController.prototype */ {
  3.  
  4.   offerSelectedProduct: null,
  5.   offerSelectedProductBinding: 'AquaCoSy.offerListController.selectedProduct',
  6.   basketSelectedProduct: null,
  7.   basketSelectedProductBinding: 'AquaCoSy.basketListController.selectedProduct',
  8.  
  9.   selectedProductDidChange: function() {
  10.     console.log('selectedProduct did Change');
  11.     console.log(this.get('selectedProduct'));
  12.   }.observes('selectedProduct'),
  13.  
  14.   selectedProduct: function() {
  15.     return SC.empty(this.get('basketSelectedProduct')) ? this.get('offerSelectedProduct') : this.get('basketSelectedProduct');
  16.   }.property('offerSelectedProduct', 'basketSelectedProduct').cacheable(),
  17.  
  18.   isVisible: function() {
  19.     return !(SC.empty(this.get('selectedProduct')));
  20.   }.property('selectedProduct').cacheable(),
  21.  
  22. ...
Add Comment
Please, Sign In to add comment