1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    6
    Answers
    1
    Vote Rating
    0
    runner is on a distinguished road

      0  

    Default Answered: Replace badgeCls help

    Answered: Replace badgeCls help


    I have a form button that uses a unique badgeCls. I want the badgeCls to switch to senchas standard 'x-badge' under certain conditions.

    Tried the following without success:

    Code:
    Ext.getCmp('myButton').badgeElement.replaceCls("x-badge", "checkmark");
    Any ideas on how to switch to a different badge css class?

    Thanks in advance.

  2. I had the same problem too. I never found a clean way to do it, but here it is. If someone has a cleaner solution please post it.

    So I was using the badge to show errors and warning. When there are only warnings I change the badge to yellow. Here is how I did that.

    Code:
    app.views.sCartMessages.setBadge(wrnmsg.count);
    app.views.sCartMessages.addCls('yellow');
    The CSS
    HTML Code:
    .yellow .x-badge {
       background-color: #ffff00 !important;
        background-image:-webkit-gradient(
          linear,
          50% 0%,
          50% 100%,
          color-stop(0%, #FFFF00),
          color-stop(50%, #E5E500),
          color-stop(51%, #E5E500),
          color-stop(100%, #FFFF19)) !important;
       color:#000;
    }

  3. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Answers
    5
    Vote Rating
    0
    sissonb is on a distinguished road

      0  

    Default


    I had the same problem too. I never found a clean way to do it, but here it is. If someone has a cleaner solution please post it.

    So I was using the badge to show errors and warning. When there are only warnings I change the badge to yellow. Here is how I did that.

    Code:
    app.views.sCartMessages.setBadge(wrnmsg.count);
    app.views.sCartMessages.addCls('yellow');
    The CSS
    HTML Code:
    .yellow .x-badge {
       background-color: #ffff00 !important;
        background-image:-webkit-gradient(
          linear,
          50% 0%,
          50% 100%,
          color-stop(0%, #FFFF00),
          color-stop(50%, #E5E500),
          color-stop(51%, #E5E500),
          color-stop(100%, #FFFF19)) !important;
       color:#000;
    }
    Last edited by sissonb; 15 Dec 2011 at 2:48 PM. Reason: clean css

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."