Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 54

Thread: Ext.LinkButton A button class which renders an <a> element.

  1. #11
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    I added the CSS rules I use here to the first post,.

  2. #12
    Ext JS Premium Member smokeman's Avatar
    Join Date
    Jul 2007
    Posts
    475
    Vote Rating
    2
      0  

    Default

    Quote Originally Posted by Animal View Post
    I am using that class. Nothing like that happens.

    Below, I am hovering the mouse over the "Labels" button which is a link to the generation of a PDF for the current consignment:
    I compared the 2, and the only differences, are the template, and the onClick function....
    something in there didn't like my config, which is just a standard toolbar in a tabpanel...
    just FYI for the next person that comes along...

  3. #13
    Ext JS Premium Member smokeman's Avatar
    Join Date
    Jul 2007
    Posts
    475
    Vote Rating
    2
      0  

    Default

    Quote Originally Posted by Animal View Post
    I added the CSS rules I use here to the first post,.
    thanks animal!
    great extension!!

  4. #14
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    260
    Vote Rating
    4
      0  

    Default

    I've the same problem as smokeman regardless of whether I pass an absolute url or a relative to the href attr.

  5. #15
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    If you have a problem. Show code, show screenshots, show the DOM structure, describe your problem. A one line post won't get you anything.

  6. #16
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    260
    Vote Rating
    4
      0  

    Default

    This is a simplified version of my code showing the problem:

    Code:
    var tb_locations = new Ext.Toolbar({
                    items:[{
                        xtype:'linkbutton',
                        text:'add',
                        href:'/location/add''
                    }]
            });
    
    var panel_locations = new Ext.grid.GridPanel({
                title:'Locations',
                iconCls:'icon-location',
                collapsible:false,
                tbar:tb_locations,
                renderTo:'main'
            });
    That's the generated html:

    HTML Code:
    <a class="x-btn-text" target="" style="display: block;" href="x-btn-small x-btn-icon-small-left" id="ext-gen34">add</a>
    I've already checked the return value of getHref which is correct.
    I assume the template vars are shifted due to multiple classes.
    This is with ExtJS 3.0.3.

  7. #17
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    I just tried it. The latest code from post #1.

    And after fixing the unterminated string literal that your code has, it works fine, and creates

    Code:
    <a class=" x-btn-text" target="" style="display: block;" href="/location/add" id="ext-gen29">add</a>

  8. #18
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    260
    Vote Rating
    4
      0  

    Default

    That was a copy'n'paste error, my code works fine in firebug.
    Did you use ExtJS 3.0.3 as well?
    Setting iconCls doesn't work either for me (icon-add in my example below).

    That's the generated dom when using a simple button:
    HTML Code:
    <table style="width: auto;" id="ext-comp-1004" class="x-btn  x-btn-text-icon" cellspacing="0"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i>&nbsp;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-ml"><i>&nbsp;</i></td><td class="x-btn-mc"><em class="" unselectable="on"><button id="ext-gen34" class="x-btn-text icon-add" type="button">add</button></em></td><td class="x-btn-mr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-bl"><i>&nbsp;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&nbsp;</i></td></tr></tbody></table>
    And that when i change xtype to linkbutton:

    HTML Code:
    <table style="width: auto;" id="ext-comp-1004" class="x-btn  x-btn-text-icon " cellspacing="0"><tbody class="button"><tr><td class="x-btn-tl"><i>&nbsp;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-ml"><i>&nbsp;</i></td><td class="x-btn-mc"><em class="icon-add" unselectable="on"><a id="ext-gen34" href="x-btn-small%20x-btn-icon-small-left" style="display: block;" target="" class="x-btn-text">add</a></em></td><td class="x-btn-mr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-bl"><i>&nbsp;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&nbsp;</i></td></tr></tbody></table>

  9. #19
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    Must be a difference in the Array that getTemplateArgs returns - checkit.

    IMNSHO, it should return an Object like FormLayout uses, not an Array. Indices can change, names don't.

  10. #20
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    260
    Vote Rating
    4
      0  

    Default

    When i alert myself with the return value I get this on page load for the add button:

    Code:
    add,button,icon-add, x-btn-text-icon,x-btn-small x-btn-icon-small-left,,http://myserver/location/add,
    Where can I find infos about what the order and content should be?

Page 2 of 6 FirstFirst 1234 ... LastLast

Posting Permissions

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