|
|
|
@ -63,8 +63,14 @@ define([
|
|
|
|
|
var append2 = '.cp div#modal #content .slide-frame ';
|
|
|
|
|
return css.replace(/(\n*)([^\n}]+)\s*\{/g, '$1' + append + '$2,' + append2 + '$2 {');
|
|
|
|
|
};
|
|
|
|
|
var draw = Slide.draw = function (i) {
|
|
|
|
|
|
|
|
|
|
var goTo = Slide.goTo = function (i) {
|
|
|
|
|
i = i || 0;
|
|
|
|
|
$content.find('.slide-container').first().css('margin-left', -(i*100)+'%');
|
|
|
|
|
updateFontSize();
|
|
|
|
|
change(Slide.lastIndex, Slide.index);
|
|
|
|
|
};
|
|
|
|
|
var draw = Slide.draw = function (i) {
|
|
|
|
|
if (typeof(Slide.content) !== 'string') { return; }
|
|
|
|
|
|
|
|
|
|
var c = Slide.content;
|
|
|
|
@ -95,9 +101,7 @@ define([
|
|
|
|
|
//$content.find('.' + slideClass).hide();
|
|
|
|
|
//$content.find('.' + slideClass + ':eq( ' + i + ' )').show();
|
|
|
|
|
//$content.css('margin-left', -(i*100)+'vw');
|
|
|
|
|
$content.find('.slide-container').first().css('margin-left', -(i*100)+'%');
|
|
|
|
|
updateFontSize();
|
|
|
|
|
change(Slide.lastIndex, Slide.index);
|
|
|
|
|
goTo(i);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Slide.updateOptions = function () {
|
|
|
|
@ -162,7 +166,7 @@ define([
|
|
|
|
|
Slide.lastIndex = Slide.index;
|
|
|
|
|
|
|
|
|
|
var i = Slide.index = Math.max(0, Slide.index - 1);
|
|
|
|
|
Slide.draw(i);
|
|
|
|
|
Slide.goTo(i);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Slide.right = function () {
|
|
|
|
@ -170,7 +174,7 @@ define([
|
|
|
|
|
Slide.lastIndex = Slide.index;
|
|
|
|
|
|
|
|
|
|
var i = Slide.index = Math.min(getNumberOfSlides() -1, Slide.index + 1);
|
|
|
|
|
Slide.draw(i);
|
|
|
|
|
Slide.goTo(i);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Slide.first = function () {
|
|
|
|
@ -178,7 +182,7 @@ define([
|
|
|
|
|
Slide.lastIndex = Slide.index;
|
|
|
|
|
|
|
|
|
|
var i = Slide.index = 0;
|
|
|
|
|
Slide.draw(i);
|
|
|
|
|
Slide.goTo(i);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Slide.last = function () {
|
|
|
|
@ -186,7 +190,7 @@ define([
|
|
|
|
|
Slide.lastIndex = Slide.index;
|
|
|
|
|
|
|
|
|
|
var i = Slide.index = getNumberOfSlides() - 1;
|
|
|
|
|
Slide.draw(i);
|
|
|
|
|
Slide.goTo(i);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var addEvent = function () {
|
|
|
|
|