I want to create a full-width slider with a background image, such as this one: http://demo.symphonythemes.com/drupal7/velocity/
Here's what I'm doing:
1. In the editor, I go to my slide and press [Settings].
2. I press [Choose image] and upload a large (wide) image. It then appears in the Slide setting window.
3. I press save.
4. If I press [Settings] again the image appears now under the [Choose thumbnail] button. This does not seem correct.
The image does not appear on the slide at this point. It does not appear in the slideshow either, but if I hover over the bullets I can see the image I uploaded as a thumbnail.
Is this a bug or am I doing something wrong?
PS: In the javascript console I get this error on loading the Edit screen:
Resource interpreted as Image but transferred with MIME type text/html: "www.myweb.com/admin/structure/md-slider/1/undefined". (md-slider-panel.js?n7sbxh:7)
Okay, I tried my dev skills. I found and fixed the bug. It was in the file md-slider-panel.js.
Hint: e(".slide-choose-image-link, .slide-choose-thumbnail-link") is a big no no. Better split it up.
Hello Steven,
I have the same problem. How do you exactly fix it ? (my dev skylls aren't high...)
Sure. In md-slider-panel.js you need to replace the following string
e(".slide-choose-image-link, .slide-choose-thumbnail-link").live("click",function(){var t=e(this);Drupal.media.popups.mediaBrowser(function(n){var r=n[0];Drupal.settings.select_image=r;e("#slide-thumbnail").val(r.fid);e("img",t.next()).attr("src",r.url);t.next().show()})});
by this:
e(".slide-choose-image-link").live("click",function(){
var t=e(this);
Drupal.media.popups.mediaBrowser(function(n){
var r=n[0];
Drupal.settings.select_image=r;
e("#slide-backgroundimage").val(r.fid);
e("img",t.next()).attr("src",r.url);
t.next().show()
})
});
e(".slide-choose-thumbnail-link").live("click",function(){
var t=e(this);
Drupal.media.popups.mediaBrowser(function(n){
var r=n[0];
Drupal.settings.select_image=r;
e("#slide-thumbnail").val(r.fid);
e("img",t.next()).attr("src",r.url);
t.next().show()
})
});
Steven, nice work! Your code saved me.
Devs, this was also a major problem for me in version 2.12. The main images were not being set properly through "settings". I suggest you add this fix ASAP as most people aren't going to be able to go in and change the code themselves.
Thank you Steven, you save me too :)
Agree with rabbdavis. A patch must be release.