/* default is 4:3 */
-@page { margin: 0pt 0pt 0pt 0pt; }
-:root.sws-print body {
- width: 297mm;
- overflow:auto;
- padding: 0pt 0pt 0pt 0pt;
- margin: 0pt 0pt 0pt 0pt;
+/* Common */
+body {
+ margin: 0 0;
+ padding: 0 0;
+}
+.sws-active-slide {
+ display: block;
+}
+.sws-active-object {
+ visibility: visible;
+}
+.sws-canvas {
+ display: block;
}
-:root.sws-print .sws-canvas {
- position: relative;
+.sws-title {
+ vertical-align:middle;
+}
+.sws-inner-canvas {
+ /* white-space: nowrap;*/
+}
+.sws-content {
+ margin: 0vh;
+ padding: 0vh;
display:inline-block;
- height: 210mm;
- page-break-after: auto;
- padding: 0pt 0pt 0pt 0pt;
- margin: 0pt 0pt 0pt 0pt;
- overflow: hidden;
+ width: 100%;
+ vertical-align: middle;
+ max-height: 100%;
+ overflow:hidden;
+}
+.sws-vertical-align {
+ display:inline-block;
+ height: 33%;
+ width: 0%;
+ vertical-align:text-bottom;
}
-.sws-canvas :last {
- page-break-after: avoid;
+
+body > h1, body > h2, body > h3 {
+ display: none;
+}
+/* Display Mode */
+/****************************************/
+
+:root.sws-display .sws-inactive-object {
+ visibility: hidden;
+}
+
+:root.sws-display body {
+ background: black;
}
:root.sws-display .sws-canvas {
width:133.3vh;
height:100vh;
}
+:root.sws-display .sws-inner-canvas {
+ display:inline-block;
+}
+/* display mode */
+/* Aspect is 4/3, 16/9, 16/10 (default is 4/3) */
:root.sws-aspect-4-3 .sws-canvas {
width:133.3vh;
height:100vh;
-
}
+
:root.sws-aspect-16-9 .sws-canvas {
width:177.7vh;
height:100vh;
height:100vh;
}
-
:root.sws-display .sws-canvas {
position: relative;
margin-left: auto;
margin-bottom: 0vh;
}
-.sws-active-slide {
- display: block;
-}
-
:root.sws-display .sws-inactive-slide {
display: none;
}
-:root.sws-print .sws-inactive-slide {
- opacity: 1;
+
+/* Print Mode */
+/* ****************************************** */
+
+@page { margin: 0pt 0pt 0pt 0pt; }
+
+:root.sws-print body {
+ background: white;
}
-.sws-active-object {
- visibility: visible;
+:root.sws-print body {
+ width: 297mm;
+ overflow:auto;
+ padding: 0pt 0pt 0pt 0pt;
+ margin: 0pt 0pt 0pt 0pt;
+
+}
+
+:root.sws-print .sws-canvas {
+ position: relative;
+ display:inline-block;
+ width: 297mm;
+ height: 210mm;
+ page-break-after: auto;
+ padding: 0pt 0pt 0pt 0pt;
+ margin: 0pt 0pt 0pt 0pt;
+ overflow: hidden;
}
+:root.sws-print .sws-canvas:last {
+ page-break-after: avoid;
+}
-@media screen {
- .sws-inactive-object {
- visibility: hidden;
- }
+
+
+:root.sws-print .sws-inactive-slide {
+ opacity: 1;
+ display: inline-block;
}
+
+p { width: 100%; }
+
.sws-header, .sws-title, .sws-inner-canvas, .sws-footer {
position: absolute;
width: 100%;
- display:inline-block;
padding: 0vh;
margin: 0vh;
border: 0vh;
}
-.sws-title {
- vertical-align:middle;
-}
-.sws-inner-canvas {
- /* white-space: nowrap;*/
-}
-.sws-content {
- margin: 0vh;
- padding: 0vh;
- display:inline-block;
- width: 100%;
- vertical-align: middle;
- max-height: 100%;
- overflow:hidden;
-}
-.sws-vertical-align {
- display:inline-block;
- height: 33%;
- width: 0%;
- vertical-align:text-bottom;
+
+:root.sws-print .sws-inner-canvas {
+ display:block;
}
-body > h1, body > h2, body > h3 {
- display: none;
-}
+
+/* Control Panel */
+/*****************************************/
+
+
@font-face {
font-family: 'entypo';
self.objectActivate = function (o) {
if (!(o.hasClass("sws-active-object"))){
o.removeClass("sws-inactive-object").addClass("sws-active-object");
- o.css({'visibility':'visible'});
+ o.css('visibility','visible');
return true;
};
return false;
var self = this;
self.objectDeactivateFadeOut = function (o) {
- o.animate({'opacity': '0.1'}, 200,
+ o.animate({'opacity': '0'}, 200,
function () { SWS.Templates.objectDeactivate(o)});
};
self.slideChangeHorizontalFlip = function (from, to){
var f = SWS.Presentation.getSlide(from);
var t = SWS.Presentation.getSlide(to);
- f.animate({ 'left': '50%', 'width': '0pt', 'opacity':'0.2' }, 150,
+ f.animate({ 'left': '50%', 'width': '0pt', 'opacity':'0' }, 150,
function () {
SWS.Templates.slideDeactivate(f);
f.css({'left':'0%', 'width': '100%'});
- t.css({ 'left': '50%', 'width': '0pt','opacity':'0.3' });
+ t.css({ 'left': '50%', 'width': '0pt','opacity':'0' });
SWS.Templates.slideActivate(t);
t.animate({'left':'0%', 'width': '100%','opacity':'1'});
});
self.slideChangeFadeOutIn = function (from, to) {
var f = SWS.Presentation.getSlide(from);
var t = SWS.Presentation.getSlide(to);
- f.animate({ 'opacity': '0.4'}, 150,
+ f.animate({ 'opacity': '0'}, 150,
function () { SWS.Templates.slideDeactivate(f);
SWS.Templates.slideActivate(t);
- t.css('opacity', '0.5');
+ t.css('opacity', '0');
t.animate({ 'opacity': '1'}, 150);
});
};
t.css('opacity', '1');
SWS.Templates.slideActivate(t);
f.animate({ 'left': '-100%' }, 250, function () { SWS.Templates.slideDeactivate(f);
- f.css('opacity', '0.6');
+ f.css('opacity', '0');
t.animate({ 'left': '0%' }, 250);
});
} else {
t.css('left', '-100%');
SWS.Templates.slideActivate(t);
f.animate({ 'left': '100%' }, 250, function () { SWS.Templates.slideDeactivate(f);
- f.css('opacity', '0.7');
+ f.css('opacity', '0');
});
t.css('opacity', '1');
t.animate({ 'left': '0%' }, 250);
var loop;
loop = function () {
if (steps >= 0) {
+ //Crazy workaround for chromium
+ ($("link.sws-theme[rel='stylesheet']")[0]).disabled = false;
$(".sws-canvas").find("*").addBack().promise().done(function() {
var percent = ((total_steps - steps) / total_steps) * 100;
$("#sws-percent-progress").text(Math.round(percent));
- console.log ("Step: " + steps);
SWS.Config['sws-slide-change'] = SWS.Templates.slideChange;
self.refresh();
- $($(".sws-canvas")[self.getCurrentSlide()]).css( { 'opacity': 1 });
+ $($(".sws-canvas")[self.getCurrentSlide()]).css('opacity', 1 );
self.next();
steps--;
loop();
} else {
$("#sws-percent-progress").text(100);
progress.remove();
- window.print();
}
};
loop();
};
/* Forces redrawing the page without reloading */
- self.redraw = function () {
- $("body").hide();
- $("body").show();
+ self.redraw = function (f) {
+ if (SWS.Utils.isUndefined(f))
+ $("body").hide().show(400, function () {
+ $("body").css("display","block");
+ if (!SWS.Utils.isUndefined(f))
+ f();
+ });
};
-
self.changeAspect = function() {
$("html").removeClass("sws-aspect-4-3")
.removeClass("sws-aspect-16-9")
self.redraw();
};
+ self.getCurrentTheme = function () {
+ var l = $("link.sws-theme[rel='stylesheet']")[0];
+ console.log(l);
+ if (l) {
+ return l.title;
+ } else
+ return ""
+ };
self.changeTheme = function (name) {
var theme_name;
theme_name = $("#sws-theme-select").val()
else
theme_name = name;
+// if (self.getCurrentTheme() == theme_name) {
+ // return;
+ // };
_current_theme = theme_name;
$("link.sws-theme").each (function (i) {
- var e = $(this);
- var title = e.attr("title");
+ var e = this;
+ var title = e.title;
if (title == theme_name) {
- e[0].rel = "stylesheet";
- e[0].disabled = false;
- e[0].media="all";
-
+ e.rel = "stylesheet";
+ e.disabled = false;
+ e.media="all";
} else {
- e[0].rel = "alternate stylesheet";
- e[0].disabled = true;
- e[0].media="all";
+ e.rel = "alternate stylesheet";
+ e.disabled = true;
+ e.media="all";
};
});
self.redraw();
+
};
self.openPrint = function () {
- window.open("?mode=print&theme=" + _current_theme);
+ window.open ("?mode=print&theme=" + self.getCurrentTheme());
}
var _fullscreen_icon_on = "";
var _fullscreen_icon_off = "";
self.changeTheme(passed_theme);
if (SWS.Utils.getParameterByName("mode") == "print") {
- self.printMode();
+ self.printMode();
}
- else
+ else
self.refresh();
-
_initialized = true;
-
};
};