Results 1 to 3 of 3

Thread: Change the UI of an Ext.toast()?

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Location
    Portugal
    Posts
    7

    Default Change the UI of an Ext.toast()?

    Hi all, and thanks in advance

    Has anyone been able to chage the UI of an Ext.toast()?
    I've been trying and with no success...

    I have this code on classic/sass/var/all.scss
    Code:
    @include extjs-panel-ui(
            $ui: 'warn-framed',
            $ui-header-background-color: red,
            $ui-border-color: red,
            $ui-header-border-color: red,
            $ui-body-border-color: red,
            $ui-border-width: 5px,
            $ui-border-radius: 5px,
            $ui-header-color: white
    );
    And i call toast just like this:
    Code:
            Ext.toast({
                title: 'Title',
                html: 'Text line 1 </br><strong> text line 2 </strong>',
                align: 't',
                iconCls: Ext.Msg.WARNING,
                ui: 'warn',
                frame: true
            }, 3000);
    After sencha app build no matter what i do, the toast does not get styled...
    Could anyone help with this issue please?

    Thank you for your time!
    CrazyMenConnected

  2. #2
    Sencha Premium User NoahK17's Avatar
    Join Date
    Apr 2008
    Location
    Atlanta, GA
    Posts
    538

    Default

    Same issue. I'll post here if this ever gets solved.
    Noah
    Front-End Developer
    Norfolk Southern

  3. #3
    Sencha Premium User NoahK17's Avatar
    Join Date
    Apr 2008
    Location
    Atlanta, GA
    Posts
    538

    Default

    It looks like there's a bug in applying an UI to a Toast, but there's an override solution you can use: https://fiddle.sencha.com/#fiddle/1q8m

    You'll want to override the show() method in Ext.Toast and manually set the UI or Cls directly. See the fiddle above for an example. Good luck!
    Noah
    Front-End Developer
    Norfolk Southern

Similar Threads

  1. 6.2.1 classic: Ext.window.Toast change log not reflected in docs/sources
    By fabricio.object in forum Sencha Documentation
    Replies: 3
    Last Post: 9 Jan 2017, 9:17 PM
  2. [FIXED] Ext 6.2 - toast position is different then in ext 6.0
    By zgrzybek in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 3 Jan 2017, 1:07 PM
  3. Ext.ux.Toast equivalent?
    By daiei27 in forum Ext: Q&A
    Replies: 2
    Last Post: 8 Sep 2011, 1:09 PM
  4. Window toast
    By sk205 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Feb 2009, 8:42 AM
  5. Ext.ux.Toast IE7.0 problem
    By emredagli in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 Feb 2009, 1:09 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •