Hi,
The following piece of code has some strange behaviour:
As you can see, we get the initialisation values from the dom object that is initialised as follows:
This works fine, but for some reason, the height of the opened windows is always 100% of the viewport, even though the loaded content is much less in height.
When in stead of getting the url from the link data-attribute, I pass the link directly in the javascript code, we have no problem whatsoever, and the windows resizes to the actual height of the loaded content.
Any idea?
The following piece of code has some strange behaviour:
$(
'.fx-modal-ajax'
).livequery(
function
() {
$(
this
)
.removeClass(
'fx-modal-ajax'
)
.click(
function
(e) {
e.preventDefault();
var
modalTitle = $(
this
).attr(
'data-modal-title'
);
var
modalUrl = $(
this
).attr(
'data-modal-url'
);
var
modalWidth = $(
this
).attr(
'data-modal-width'
);
$(
'<div></div>'
)
.kendoWindow({
width: modalWidth,
title: modalTitle,
content: modalUrl,
modal:
true
})
.data(
"kendoWindow"
)
.center()
.open();
});
});
<
a
class
=
"fx-modal-ajax"
data-modal-width
=
"750px"
data-modal-url
=
"'index.php?_c=productaccountrefill&_a=ajaxquickrefill"
data-modal-title
=
"Add credit to your account"
href
=
"#"
>Add credit</
a
>
This works fine, but for some reason, the height of the opened windows is always 100% of the viewport, even though the loaded content is much less in height.
When in stead of getting the url from the link data-attribute, I pass the link directly in the javascript code, we have no problem whatsoever, and the windows resizes to the actual height of the loaded content.
Any idea?