1 Reply Latest reply on Apr 13, 2017 9:01 AM by fmanniti RSS
    fmanniti Creator

    Expression widget: dynamic expression

    I am using the expression widget because I want to enlarge a gadget to fullscreen;

    The expression is the following

    (function () { const id = widget.jqElement.closest('.mashup-popup').attr('id'); $('#'+id+'_mashup-root').css({'position':'fixed', 'top':'5%', 'left':'0', 'width':'90% !important', 'height':'100% !important'}); })()

    and it is binded to a button.


    Now, I would like to enlarge it with a dynamic width, e.g., the user inserts the width in pixel and gives it as a input for the expression widget.

    Is it possible to bind an expression to the Expression widget?

      • Re: Expression widget: dynamic expression
        fmanniti Creator

        Sorry, I found the answer.

        Configure expression:

        Add parameter called width: STRING

        write this expression

        (function () { const id = widget.jqElement.closest('.mashup-popup').attr('id'); $('#'+id+'_mashup-root').css({'position':'relative', 'width':width, 'height':'490px'}); })()


        bind a input value to width