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

stixoffire picture stixoffire  路  3Comments

john20xdoe picture john20xdoe  路  3Comments

ga5tan picture ga5tan  路  3Comments

dudeman972 picture dudeman972  路  3Comments

StefanTheiner picture StefanTheiner  路  3Comments