DISPLAY MESSAGE box width

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

DISPLAY MESSAGE box width

Post by Rennur »

It seems the DISPLAY MESSAGE box width is hardcoded @ 280px.
Is there a way to remove the CSS width parameter or set it to auto ?

I can't find the corresponding CSS class in Aware IM to do this.
Attachments
msgbox.png
msgbox.png (156.41 KiB) Viewed 7362 times
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: DISPLAY MESSAGE box width

Post by Jaymer »

because I don't really know JS, it takes me a while.

I've spent about 90 minutes on this.
You can't find CSS cause its calculated on the fly in JS.
I can find where it calcs top and left to center it on the screen, but not the size.
No ref to 280px, so I'm not sure where 280 comes from.

If you edit an object in a popup window, the exact same code that produces THAT editable form in a popup window
is the same code from "Display Message".
Whatever you call it (dialog, popup, alert, etc.), its coming from a function in KENDO.ALL.MIN.JS

When its a Form, its obviously passing Width/Height info - the DispMsg is somehow making it 280, and doing a calc to center it on the screen.

still hunting.... I'll get it
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: DISPLAY MESSAGE box width

Post by Jaymer »

pretty sure this function calculates the dimensions of every window opening in Kendo.

Code: Select all

            _dimensions: function() {
                var e, t, n = this.wrapper, o = this.options, r = o.width, s = o.height, a = o.maxHeight, l = ["minWidth", "minHeight", "maxWidth", "maxHeight"];
                for (this.title(o.title),
                e = 0; e < l.length; e++)
                    t = o[l[e]] || "",
                    t != 1 / 0 && n.css(l[e], t);
                a != 1 / 0 && this.element.css("maxHeight", a),
                n.width(r ? isNaN(r) && ("" + r).indexOf("px") < 0 ? r : i(r, o.minWidth, o.maxWidth) : ""),
                n.height(s ? isNaN(s) && ("" + s).indexOf("px") < 0 ? s : i(s, o.minHeight, o.maxHeight) : ""),
                o.visible || n.hide()
            },
but I literally don't understand the syntax of stuff like this:
n.width(r ? isNaN(r) && ("" + r).indexOf("px") < 0 ? r : i(r, o.minWidth, o.maxWidth) : ""),

Need help of a JS person (sent msg to John Talbott)
jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BLOMASKY
Posts: 1472
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

In an ideal world Jaymer (or maybe 8.2??)

Post by BLOMASKY »

A DISPLAY MESSAGE should have the following options:
1) Title to display
2) Icon to display
3) Style for both the title and the body.


Bruce
UnionSystems
Posts: 197
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

Re: DISPLAY MESSAGE box width

Post by UnionSystems »

I do the following to control width of DISPLAY MESSAGE and pretty up with HTML. Seems to get me a result without mucking up other screens.

NOTES
SystemSettings.DQ is assigned a "
border:solid 1px transparent; hides a black line that appears if you only have width

Code: Select all

DISPLAY QUESTION '

<style>#aw-msgbox, .k-window-titlebar{width:750px;border:solid 1px transparent;}</style>

<h1><i class='+SystemSettings.DQ+'fa fa-exclamation-triangle'+SystemSettings.DQ+' style='+SystemSettings.DQ+'font-size: 1.3em!important;'+SystemSettings.DQ+'></i> Updating CSS, Javascript and SQL</h1>

<p><br>Carefully read messages that are displayed for errors!</p>

<p>Click <b>Yes</b> to execute now</p>'
which results in
DISPLAY MESSAGE
DISPLAY MESSAGE
Screen Shot 2018-06-30 at 7.15.32 am.png (57.85 KiB) Viewed 7327 times
BLACK LINE that appears without border:solid 1px transparent
BLACK LINE that appears without border:solid 1px transparent
Screen Shot 2018-06-30 at 7.25.36 am.png (24.65 KiB) Viewed 7327 times
AWS Linux, Windows Server, AIM 8.4 & 8.6
Post Reply