How to use the catalog.cart.isfull function in catalog

To help you get started, we’ve selected a few catalog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / geoportal-server / geoportal / www / gpt / form / Cart.js View on Github external
_setCount: function(responseObject) {
    if ((typeof(responseObject) != "undefined") && (responseObject != null)) {
      var oCart = responseObject.cart;
      if ((typeof(oCart) != "undefined") && (oCart != null)) {
        this.approximateSize = oCart.size;
        var bFull = (this.approximateSize >= this.maxItems);
        var sTip = this.i18n["catalog.cart.check.tip"];
        var sFullTip = this.i18n["catalog.cart.isfull"];
        sFullTip = sFullTip.replace("{0}",""+this.maxItems);
        dojo.query(".gptCartCheckControl").forEach(function(item) {
          dojo.query(".gptCartCheckBox",item).forEach(function(item2) {
            if (bFull) {
              if (item2.checked) {
                item.title = sTip;
                item2.style.visibility = "visible";
              } else {
                item.title = sFullTip;
                item2.style.visibility = "hidden";
              }
            } else {
              item.title = sTip;
              item2.style.visibility = "visible";
            }
          });
github Esri / geoportal-server / geoportal / www / gpt / form / Cart.js View on Github external
elChk.className = "gptCartCheckBox";
    if (dojo.isIE <= 8) {
      if (bChecked) {
        elChk = document.createElement(
          "<input checked="\&quot;checked\&quot;/" type="\&quot;checkbox\&quot;">");
      } else {
        elChk.type = "checkbox";
      }
    } else {
      elChk.type = "checkbox";
      if (bChecked) elChk.checked = true;
    }
    connectCheck(elChk);
    if (!bChecked &amp;&amp; bFull) {
      elChk.style.visibility = "hidden";
      sTip = this.i18n["catalog.cart.isfull"];
      sTip = sTip.replace("{0}",""+this.maxItems);
    } else {
      elChk.style.visibility = "visible";
    }
    
    var elSpan = document.createElement("span");
    elSpan.className = "gptCartCheckControl";
    elSpan.title = sTip;
    dojo.style(elSpan,{
      paddingTop: "5px",
      paddingRight: "2px",
      marginRight: "10px",
      border: "1px solid #808080"
     });
    elSpan.appendChild(elChk);