Modify default lookup buttons (dropdown buttons)

Please note that features shown here will be published in April 2020.

See also:

Default dropdown style

Modified dropdown style

The next screenshot shows a modifed icon + text “Edit” for the view-button and an additional “user”-icon + text “New partner” for the add-button of a dropdown.

(1) Change default icon

See here: Beautify default lookup buttons

new AppGiniField("partner_id").dropdown().fix("pencil", "plus")

(2) Add additional icon and text

var field = new AppGiniField("partner_id");
var dropdown = field.dropdown();
dropdown.fix("pencil", "plus");
dropdown.getAddButton().appendIcon("user").appendText(" New partner");
dropdown.getViewButton().appendText(" Edit);

Alternative version of the same code above using “chaining” technique:

var field = new AppGiniField("partner_id")
      .dropdown() // returns the dropdown-handler for this field
        .fix("pencil", "plus")
        .getAddButton() // returns the add-button handler
          .appendText(" New partner")
          .getParent() // returns the dropdown handler
        .getViewButton() // returns the view-button handler
          .appendText(" Edit")
          .getParent() // returns the dropdown-handler
      .getParent(); // returns the field-handler

See also