Set active = false in offer list, after product was removed
1120
protected function processOfferAfterDelete()
    {
        $obOfferList = $this->obElement->offer;
        if ($obOfferList->isEmpty()) {
            return;
        }

        foreach ($obOfferList as $obOffer) {
            $obOffer->active = false;
            $obOffer->save();
        }
    }
1230786
def actually_toggle_deleted t
    if t.has_label? :deleted
      t.remove_label :deleted
      add_or_unhide t.first
      UpdateManager.relay self, :undeleted, t.first
      lambda do
        t.apply_label :deleted
        hide_thread t
        UpdateManager.relay self, :deleted, t.first
      end
    else
      t.apply_label :deleted
      hide_thread t
      UpdateManager.relay self, :deleted, t.first
      lambda do
        t.remove_label :deleted
        add_or_unhide t.first
        UpdateManager.relay self, :undeleted, t.first
      end
    end
  end
735253
@Override
	public void removeByG_A_P(long groupId, boolean active, boolean primary) {
		for (CommerceWarehouse commerceWarehouse : findByG_A_P(groupId, active,
				primary, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWarehouse);
		}
	}
335073
@Override
	public void removeByG_A(long groupId, boolean active) {
		for (CommercePaymentMethodGroupRel commercePaymentMethodGroupRel : findByG_A(
				groupId, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePaymentMethodGroupRel);
		}
	}
46433
def selected_items
      ((m = marked_items).any? ? m : Array(current_item)).reject {|i| %w(. ..).include? i.name}
    end
79579
def _withholdOffbids(self):
        
        limits = self.limits

        # Eliminate offers (but not bids) above 'price_cap'.
        if not limits.has_key('max_offer'):
            limits['max_offer'] = self.priceCap

        # Limit cleared offer prices after locational adjustments.
        if not self.limits.has_key('maxClearedOffer'):
            self.limits['maxClearedOffer'] = self.priceCap

        # Withhold invalid offers/bids.
        for offer in self.offers:
            if round(offer.quantity, 4) <= 0.0:
                logger.info("Withholding non-posistive quantity [%.2f] "
                            "offer." % offer.quantity)
                offer.withheld = True

        for bid in self.bids:
            if round(bid.quantity, 4) <= 0.0:
                logger.info("Withholding non-posistive quantity [%.2f] "
                            "bid." % bid.quantity)
                bid.withheld = True

        # Optionally, withhold offers/bids beyond price limits.
        if limits.has_key("maxOffer"):
            for offer in self.offers:
                if offer.price > limits["maxOffer"]:
                    logger.info("Offer price [%.2f] above limit [%.3f], "
                        "withholding." % (offer.price, limits["maxOffer"]))
                    offer.withheld = True

        if limits.has_key("minBid"):
            for bid in self.bids:
                if bid.price < limits["minBid"]:
                    logger.info("Bid price [%.2f] below limit [%.2f], "
                        "withholding." % (bid.price, limits["minBid"]))
                    bid.withheld = True
599804
def category_changed_cb(self, selection, model):
        
        (model, iter) = selection.get_selected()
        id = 0
        if iter is None:
            self.activity_store.clear()
        else:
            self.prev_selected_activity = None

            id = model[iter][0]
            self.activity_store.load(model[iter][0])

        #start with nothing
        self.get_widget('activity_edit').set_sensitive(False)
        self.get_widget('activity_remove').set_sensitive(False)

        return True
1243751
def unset_value(self):
        
        if self.user_value is not None or self.user_selection:
            self.user_value = self.user_selection = None
            self._rec_invalidate()
69612
function resetSelectedDays () {
                    scope.currentWeeks.forEach(function(week, wIndex){
                        week.forEach(function(day, dIndex){
                            scope.currentWeeks[wIndex][dIndex].isSelected = false;
                        });
                    });
                }
1294654
def refresh_listing():
    """"""
    for program in get_programs():
        if re.match(r'^[a-zA-Z_][a-zA-Z_0-9]*$', program) is not None:
            globals()[program] = partial(_run_program, program)

    globals()["_"] = _underscore_run_program
1073013
function() {
          if(angular.isArray(selectedItemsList)) {
            var ixSmItem = selectedItemsList.indexOf(smItem);
            if(smItem[selectedAttribute]) {
              if(-1 === ixSmItem) {
                selectedItemsList.push(smItem);
              }
            } else {
              if(-1 < ixSmItem) {
                selectedItemsList.splice(ixSmItem, 1);
              }
            }
          }
        }
1144643
function remove( element ) {
    for( var i = 0; i < lists.length; i++ ) {
      var list = lists[i];

      if( list.element == element ) {
        list.destroy();
        lists.splice( i, 1 );
        i--;
      }
    }

    // Stopped refreshing if the last list was removed
    if( lists.length === 0 ) {
      active = false;
    }
  }
1152785
public function ResetDiscounts()
    {
        $this->oActingShopDiscountList = null;
        $this->dPriceAfterDiscount = $this->dPrice;
        $this->dPriceTotalAfterDiscount = $this->dPriceTotal;
        $this->dPriceAfterDiscountWithoutVouchers = $this->dPriceAfterDiscount;
        $this->dPriceTotalAfterDiscountWithoutVouchers = $this->dPriceTotalAfterDiscount;
    }
1200116
def ReplaceOffer(self, offer_link, offer):
        
        CosmosClient.__ValidateResource(offer)
        path = base.GetPathFromLink(offer_link)
        offer_id = base.GetResourceIdOrFullNameFromLink(offer_link)
        return self.Replace(offer, path, 'offers', offer_id, None, None)
615109
function (buttonsList) {
            for (var j = 0; j < buttonsList.length; j++) {
                buttonsList[j].classList.remove('active');
            }
        }
439116
def remove(self, option):
        
        for existing_option in self._options:
            if existing_option[1] == option:
                self._options.remove(existing_option)
                self._refresh_options()
                return True
        return False
1170342
def mark_all_as_active(self, recipient=None):
        
        assert_soft_delete()
        qset = self.deleted()
        if recipient:
            qset = qset.filter(recipient=recipient)

        return qset.update(deleted=False)