Author Topic: toolbar button not being added properly?  (Read 4008 times)

Leo F

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
toolbar button not being added properly?
« on: February 09, 2014, 01:11:28 am »
There is a button in the toolbar in this demo http://paramquery.com/pro/demos/showhide_rows that is added like so:
obj.toolbar = {
        items: [
            { type: 'button', label: 'Hide rows at Random', icon: 'ui-icon-gear', listeners: [{ "click": hideRows } ] }
        ]
    }


I have tried adding a button to my grid:
obj.toolbar = { items: [ { type: 'button', label: 'Save', icon: 'ui-icon-disk', listeners: [{ "click": grid.SaveData }] } ] };

Unfortunately this is what get's added to the toolbar:
<div class="pq-toolbar" style="">
<button class="ui-corner-all " type="button">Save</button>
</div>

Instead of in the demo:
<div class="pq-toolbar" style="">
<button class="ui-corner-all ui-button ui-widget ui-state-default ui-button-text-icon-primary" type="button" role="button" aria-disabled="false">
</div>


What am I doing wrong?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: toolbar button not being added properly?
« Reply #1 on: February 09, 2014, 01:14:19 am »
Are you using bootstrap or other library different from jQueryUI.

you can see the resolution here:

https://github.com/paramquery/grid/issues/42
« Last Edit: February 09, 2014, 01:25:18 am by paramquery »

Leo F

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: toolbar button not being added properly?
« Reply #2 on: February 10, 2014, 01:08:33 am »
Yep. Changing the load order of jquery and bootstrap resolved the issue. Thanks.

Another question, is it possible to change the styles that are applied to the column headers?
The colModel has a cls property, but that only affects the data cells.