cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Expression widget: dynamic expression

fmanniti
10-Marble

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?

1 REPLY 1

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

Announcements


Top Tags