Commit dd7ca4d4 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic
Browse files

Bug 1779600: removing slideshow.js

This js file was loaded when calling
 function get_instance_javascript() in
 artefact/file/blocktype/gallery/lib.php

The line that included that file was removed when adding bootstrap
There are no calls to the only function defined in slideshow.js,
I think is safe to remove the file.

behatnotneeded

Change-Id: Iddcc6419a06cfccebdd3d243680ee653fd5cae2d
parent 5e78f440
// Should we delete this? We have changed the mark up to use
// bootstrap carousel classes
function Slideshow(id, count) {
var self = this;
this.id = '#slideshow' + id;
this.count = count - 1;
this.current = 0;
this.change = function(to) {
if (to == this.current || to < 0 || to > this.count) {
return false;
}
if ($j("#description_" + id + "_" + this.current)) {
$j("#description_" + id + "_" + this.current).css('display', 'none');
}
$j(this.id).height($j(this.id + " img:eq(" + this.current + ")").height() + 10);
$j(this.id + " img:eq(" + this.current + ")").fadeOut(500, function() {
var extraheight = 0;
self.current = to;
if ($j("#description_" + id + "_" + self.current)) {
$j("#description_" + id + "_" + self.current).css('display','block');
extraheight = $j("#description_" + id + "_" + self.current).height();
}
$j(self.id).height($j(self.id + " img:eq(" + self.current + ")").height() + extraheight + 10);
$j(self.id + " img:eq(" + self.current + ")").fadeIn(500);
});
$j(this.id + ' td.control span').removeClass('disabled');
if (to == 0) {
$j(this.id + ' td.control span.prev').addClass('disabled');
$j(this.id + ' td.control span.first').addClass('disabled');
}
else if (to == this.count) {
$j(this.id + ' td.control span.next').addClass('disabled');
$j(this.id + ' td.control span.last').addClass('disabled');
}
return false;
}
$j(this.id + ' td.control span.next').click(function() {return self.change(self.current + 1);});
$j(this.id + ' td.control span.prev').click(function() {return self.change(self.current - 1);});
$j(this.id + ' td.control span.first').click(function() {return self.change(0);});
$j(this.id + ' td.control span.last').click(function() {return self.change(self.count);});
$j(this.id + " img").hide();
$j(this.id + " img:eq(" + this.current + ")").show();
if (this.current < this.count) {
$j(this.id + ' td.control span.next').removeClass('disabled');
$j(this.id + ' td.control span.last').removeClass('disabled');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment