Skip to main content
1-Visitor
April 13, 2017
Question

Expression widget: dynamic expression

  • April 13, 2017
  • 1 reply
  • 1676 views

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?

    1 reply

    fmanniti1-VisitorAuthor
    1-Visitor
    April 13, 2017

    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