Serenity: Lookup search dialog

Created on 15 Jul 2016  路  2Comments  路  Source: serenity-is/Serenity

Hi,

I wanted to place a search button next to a field, much like "InPlaceAdd", so that it pop's up a Search Dialog.
Then, when the user selects a row and click "OK" the field (or fields) would be filled with some data.

Could this be achieved?

Thanks

Most helpful comment

You can add some like this in dialog.ts. See also issue https://github.com/volkanceylan/Serenity/issues/829

            var fieldEditor: JQuery = this.form.YourField.element.closest(".editor");
            fieldEditor.addClass("has-inplace-button");
            $('<a><b/></a>')
                .addClass('inplace-button')
                .addClass('inplace-create edit')
                .attr('title', 'Details')
                .insertAfter(fieldEditor)
                .click(() => { .... }
            );

All 2 comments

Yes anything can be achieved but not with a few words here. You may look at source of how inplace add works.

You can add some like this in dialog.ts. See also issue https://github.com/volkanceylan/Serenity/issues/829

            var fieldEditor: JQuery = this.form.YourField.element.closest(".editor");
            fieldEditor.addClass("has-inplace-button");
            $('<a><b/></a>')
                .addClass('inplace-button')
                .addClass('inplace-create edit')
                .attr('title', 'Details')
                .insertAfter(fieldEditor)
                .click(() => { .... }
            );
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahsansolution picture ahsansolution  路  3Comments

Amitloh picture Amitloh  路  3Comments

stixoffire picture stixoffire  路  3Comments

gfo2007 picture gfo2007  路  3Comments

dkontod picture dkontod  路  3Comments