Hi,
i'm experiencing 2 problems with latest version:
-
it seems that 2.18 is incompatible with jquery update module, if it's enabled i cannot use mdslider admin interface
-
the images are vertically resized according the window resolution, but in 2.17 doesn't happen
So at the moment i cannot use 2.18 version.
Can you help me?
Hi,
Could you send us your site url, admin account and FTP account ( forum link as well) via email: [email protected]?
We would like to have a check.
The main site has 2.17 version, i tested the 2.18 on a private network.
The main difference in the html code is the style inside the image tag
2.17: style="width:auto; height:420px; left:-40px; top: 0px;"
2.18: style="width:1840; height: auto; left: 0px; top:0px;
I solved the first problem setting in Jquery Update module: Alternate jQuery version for administrative pages -> Default (provided by Drupal)
Thank you for your feedback.
It will help us and other customer a lot :)
And now the second problem:
"the images are vertically resized according the window resolution, but in 2.17 doesn't happen"
File js/md-slider.js
the function is changeImagePosition
2.17
if (height > 0 && panelHeight > 0) {
if (((width / height) > (panelWidth / panelHeight))) {
var left = panelWidth - (panelHeight / height) * width;
$background.css({
width: "auto",
height: panelHeight + "px"
});
if (left < 0) {
$background.css({left: (left / 2) + "px", top: 0});
} else {
$background.css({left: 0, top: 0});
}
} else {
var top = panelHeight - (panelWidth / width) * height;
$background.css({width: panelWidth + "px", height: "auto"});
if (top < 0) {
$background.css({top: (top / 2) + "px", left: 0});
} else {
$background.css({left: 0, top: 0});
}
}
}
2.18
if (height > 0 && panelHeight > 0) {
//if (((width / height) > (panelWidth / panelHeight))) {
// var left = panelWidth - (panelHeight / height) * width;
// $background.css({
// width: "auto",
// height: panelHeight + "px"
// });
// if (left < 0) {
// $background.css({left: (left / 2) + "px", top: 0});
// } else {
// $background.css({left: 0, top: 0});
// }
//} else {
var top = panelHeight - (panelWidth / width) * height;
$background.css({width: panelWidth + "px", height: "auto"});
if (top < 0) {
$background.css({top: (top / 2) + "px", left: 0});
} else {
$background.css({left: 0, top: 0});
}
//}
}
Uncommenting the lines i have no issues.
Why these lines are commented? May i change the file?
I upgraded to 2.18 today and was banging my head against the wall trying to get the "full width" feature to work again, but gave up and went back to 2.17.
I guess I will just ignore Drupal telling me that my modules need upgrading, and hope for the best for version 2.19!
-- DG79
JohnnyGlemoure and Designguy79,
Thank you for your feedback.
We are checking and will reply ASAP.
I also want to report the same issue.
Hi,
We checked and it is our fault, please help us uncomment below lines in 2.18 version:
if (height > 0 && panelHeight > 0) {
//if (((width / height) > (panelWidth / panelHeight))) {
// var left = panelWidth - (panelHeight / height) * width;
// $background.css({
// width: "auto",
// height: panelHeight + "px"
// });
// if (left < 0) {
// $background.css({left: (left / 2) + "px", top: 0});
// } else {
// $background.css({left: 0, top: 0});
// }
//} else {
var top = panelHeight - (panelWidth / width) * height;
$background.css({width: panelWidth + "px", height: "auto"});
if (top < 0) {
$background.css({top: (top / 2) + "px", left: 0});
} else {
$background.css({left: 0, top: 0});
}
//}
}
Ok, thank you.
Now i can use the 2.18 in the production server.
For anyone struggling on how to apply this patch, the following worked for me:
1. Open file js/md-slider.dev.js in a text editor
2. Delete the two slashes on lines 1511 through 1522 and on line 1530
3. Copy the entire contents of the file your clipboard
4. Go to http://jscompress.com and paste the contents
5. Click on "Compress Javascript" and then on "Download .JS" file
6. Delete the file js/md-slider.js
7. Rename the file downloaded from jscompress.com as md-slider.js and move the js folder
Should be good to go!