updated s5
diff --git a/ui/default/bodybg.gif b/ui/default/bodybg.gif
old mode 100644
new mode 100755
diff --git a/ui/default/framing.css b/ui/default/framing.css
--- a/ui/default/framing.css
+++ b/ui/default/framing.css
@@ -10,7 +10,8 @@ div#header {top: 0; height: 3em; z-index
div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
-div#controls form {text-align: right; width: 100%; margin: 0;}
+div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
+ margin: 0;}
#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
html>body #currentSlide {position: fixed;}
diff --git a/ui/default/iepngfix.htc b/ui/default/iepngfix.htc
--- a/ui/default/iepngfix.htc
+++ b/ui/default/iepngfix.htc
@@ -7,7 +7,7 @@
// Free usage permitted as long as this notice remains intact.
// This must be a path to a blank image. That's all the configuration you need here.
-var blankImg = 'ui/default/blank.gif';
+var blankImg = 'v11rc1/default/blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
diff --git a/ui/default/pretty.css b/ui/default/pretty.css
--- a/ui/default/pretty.css
+++ b/ui/default/pretty.css
@@ -1,6 +1,6 @@
/* Following are the presentation styles -- edit away! */
-body {background: #FFF url(bodybg.gif) -16px 0 no-repeat; color: #000; font-size: 2.25em;}
+body {background: #FFF url(bodybg.gif) -16px 0 no-repeat; color: #000; font-size: 2em;}
:link, :visited {text-decoration: none; color: #00C;}
#controls :active {color: #88A !important;}
#controls :focus {outline: 1px dotted #227;}
@@ -45,14 +45,18 @@ div.long {font-size: 0.75em;}
.slide h3 {font-size: 130%;}
h1 abbr {font-variant: small-caps;}
-div#controls {position: absolute; left: 60%; bottom: 0;
- width: 40%;
+div#controls {position: absolute; left: 50%; bottom: 0;
+ width: 50%;
text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;}
-html>body div#controls {position: fixed; padding: 0; top: auto;}
+html>body div#controls {position: fixed; padding: 0 0 1em 0;
+ top: auto;}
+div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
+ margin: 0; padding: 0;}
#controls #navLinks a {padding: 0; margin: 0 0.5em;
background: #005; border: none; color: #779;
cursor: pointer;}
-#controls #navList #jumplist {background: #DDD; color: #227;}
+#controls #navList {height: 1em;}
+#controls #navList #jumplist {position: absolute; bottom: 0; right: 0; background: #DDD; color: #227;}
#currentSlide {text-align: center; font-size: 0.5em; color: #449;}
diff --git a/ui/default/s5-core.css b/ui/default/s5-core.css
--- a/ui/default/s5-core.css
+++ b/ui/default/s5-core.css
@@ -3,7 +3,7 @@
div#header, div#footer, div#controls, .slide {position: absolute;}
html>body div#header, html>body div#footer,
html>body div#controls, html>body .slide {position: fixed;}
-.handout, .notes {display: none;}
+.handout {display: none;}
.layout {display: block;}
.slide, .hideme, .incremental {visibility: hidden;}
#slide0 {visibility: visible;}
diff --git a/ui/default/slides.js b/ui/default/slides.js
--- a/ui/default/slides.js
+++ b/ui/default/slides.js
@@ -1,4 +1,4 @@
-// S5 v1.2a1 slides.js -- released into the Public Domain
+// S5 v1.1 slides.js -- released into the Public Domain
//
// Please see http://www.meyerweb.com/eric/tools/s5/credits.html for information
// about all the wonderful and talented contributors to this code!
@@ -13,22 +13,7 @@ var s5mode = true;
var defaultView = 'slideshow';
var controlVis = 'visible';
-var s5NotesWindow;
-var s5NotesWindowLoaded = false;
-var previousSlide = 0;
-var presentationStart = new Date();
-var slideStart = new Date();
-
-var countdown = {
- timer: 0,
- state: 'pause',
- start: new Date(),
- end: 0,
- remaining: 0
-};
-
-
-var isIE = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
+var isIE = navigator.appName == 'Microsoft Internet Explorer' ? 1 : 0;
var isOp = navigator.userAgent.indexOf('Opera') > -1 ? 1 : 0;
var isGe = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('Safari') < 1 ? 1 : 0;
@@ -43,7 +28,7 @@ function hasValue(object, value) {
}
function removeClass(object,className) {
- if (!object || !hasClass(object,className)) return;
+ if (!object) return;
object.className = object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'), RegExp.$1+RegExp.$2);
}
@@ -96,8 +81,7 @@ function slideLabel() {
var did = 'slide' + n.toString();
obj.setAttribute('id',did);
-
-// if (isOp) continue; // Opera fix (hallvord)
+ if (isOp) continue;
var otext = '';
var menu = obj.firstChild;
@@ -122,12 +106,9 @@ function currentSlide() {
} else {
cs = document.currentSlide;
}
- cs.innerHTML = '<a id="plink" href="">' +
- '<span id="csHere">' + snum + '<\/span> ' +
+ cs.innerHTML = '<span id="csHere">' + snum + '<\/span> ' +
'<span id="csSep">\/<\/span> ' +
- '<span id="csTotal">' + (smax-1) + '<\/span>' +
- '<\/a>'
- ;
+ '<span id="csTotal">' + (smax-1) + '<\/span>';
if (snum == 0) {
cs.style.visibility = 'hidden';
} else {
@@ -170,17 +151,11 @@ function go(step) {
}
if (incrementals[snum].length > 0 && incpos > 0)
addClass(incrementals[snum][incpos - 1], 'current');
- if (isOp) { //hallvord
- location.hash = nid;
- } else {
- ce.style.visibility = 'hidden';
- ne.style.visibility = 'visible';
- } // /hallvord
+ ce.style.visibility = 'hidden';
+ ne.style.visibility = 'visible';
jl.selectedIndex = snum;
currentSlide();
- loadNote();
- permaLink();
- number = undef;
+ number = 0;
}
function goTo(target) {
@@ -200,7 +175,6 @@ function subgo(step) {
addClass(incrementals[snum][incpos], 'incremental');
addClass(incrementals[snum][incpos - 1],'current');
}
- loadNote();
}
function toggle() {
@@ -296,9 +270,6 @@ function keys(key) {
case 67: // c
showHide('k');
break;
- case 78: // n
- createNotesWindow();
- break;
}
if (key.which < 48 || key.which > 57) {
number = undef;
@@ -318,7 +289,7 @@ function clicker(e) {
target = window.event.srcElement;
e = window.event;
} else target = e.target;
- if (target.href != null || hasValue(target.rel, 'external') || isParentOrSelf(target, 'controls') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object')) return true;
+ if (target.getAttribute('href') != null || hasValue(target.rel, 'external') || isParentOrSelf(target, 'controls') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object')) return true;
if (!e.which || e.which == 1) {
if (!incrementals[snum] || incpos >= incrementals[snum].length) {
go(1);
@@ -400,10 +371,6 @@ function externalLinks() {
}
}
-function permaLink() {
- document.getElementById('plink').href = window.location.pathname + '#slide' + snum;
-}
-
function createControls() {
var controlsDiv = document.getElementById("controls");
if (!controlsDiv) return;
@@ -416,7 +383,6 @@ function createControls() {
}
controlsDiv.innerHTML = '<form action="#" id="controlForm"' + hideDiv + '>' +
'<div id="navLinks">' +
- '<a accesskey="n" id="show-notes" href="javascript:createNotesWindow();" title="Show Notes">≡<\/a>' +
'<a accesskey="t" id="toggle" href="javascript:toggle();">Ø<\/a>' +
'<a accesskey="z" id="prev" href="javascript:go(-1);">«<\/a>' +
'<a accesskey="x" id="next" href="javascript:go(1);">»<\/a>' +
@@ -432,8 +398,8 @@ function createControls() {
function fontScale() { // causes layout problems in FireFox that get fixed if browser's Reload is used; same may be true of other Gecko-based browsers
if (!s5mode) return false;
- var vScale = 48; // both yield 16 (the usual browser default) at 1024x768
- var hScale = 64; // perhaps should auto-calculate based on theme's declared value?
+ var vScale = 22; // both yield 32 (after rounding) at 1024x768
+ var hScale = 32; // perhaps should auto-calculate based on theme's declared value?
if (window.innerHeight) {
var vSize = window.innerHeight;
var hSize = window.innerWidth;
@@ -458,7 +424,7 @@ function fontScale() { // causes layout
function fontSize(value) {
if (!(s5ss = document.getElementById('s5ss'))) {
- if (!document.createStyleSheet) {
+ if (!isIE) {
document.getElementsByTagName('head')[0].appendChild(s5ss = document.createElement('style'));
s5ss.setAttribute('media','screen, projection');
s5ss.setAttribute('id','s5ss');
@@ -467,11 +433,11 @@ function fontSize(value) {
document.s5ss = document.styleSheets[document.styleSheets.length - 1];
}
}
- if (!(document.s5ss && document.s5ss.addRule)) {
+ if (!isIE) {
while (s5ss.lastChild) s5ss.removeChild(s5ss.lastChild);
- s5ss.appendChild(document.createTextNode('html {font-size: ' + value + ' !important;}'));
+ s5ss.appendChild(document.createTextNode('body {font-size: ' + value + ' !important;}'));
} else {
- document.s5ss.addRule('html','font-size: ' + value + ' !important;');
+ document.s5ss.addRule('body','font-size: ' + value + ' !important;');
}
}
@@ -562,203 +528,25 @@ function trap(e) {
return modifierKey || e.which == 0;
}
-function noteLabel() { // Gives notes id's to match parent slides
- var notes = GetElementsWithClassName('div','notes');
- for (var i = 0; i < notes.length; i++) {
- var note = notes[i];
- var id = 'note' + note.parentNode.id.substring(5);
- note.setAttribute('id',id);
- }
- resetElapsedSlide();
- resetRemainingTime();
- window.setInterval('updateElaspedTime()', 1000);
-}
-
-function createNotesWindow() { // creates a window for our notes
- if (!s5NotesWindow || s5NotesWindow.closed) { // Create the window if it doesn't exist
- s5NotesWindowLoaded = false;
- // Note: Safari has a tendency to ignore window options preferring to default to the settings of the parent window, grr.
- s5NotesWindow = window.open('ui/s5-notes.html', 's5NotesWindow', 'top=0,left=0');
- }
- if (s5NotesWindowLoaded) { // Load the current note if the Note HTML has loaded
- loadNote();
- } else { // Keep trying...
- window.setTimeout('createNotesWindow()', 50);
+function startup() {
+ defaultCheck();
+ if (!isOp) createControls();
+ slideLabel();
+ fixLinks();
+ externalLinks();
+ fontScale();
+ if (!isOp) {
+ notOperaFix();
+ incrementals = createIncrementals();
+ slideJump();
+ if (defaultView == 'outline') {
+ toggle();
+ }
+ document.onkeyup = keys;
+ document.onkeypress = trap;
+ document.onclick = clicker;
}
}
-function loadNote() {
-// Loads a note into the note window
- var notes = nextNotes = '<em class="disclaimer">There are no notes for this slide.</em>';
- if (document.getElementById('note' + snum)) {
- notes = document.getElementById('note' + snum).innerHTML;
- }
- if (document.getElementById('note' + (snum + 1))) {
- nextNotes = document.getElementById('note' + (snum + 1)).innerHTML;
- }
-
- var jl = document.getElementById('jumplist');
- var slideTitle = jl.options[jl.selectedIndex].text.replace(/^\d+\s+:\s+/, '') + ((jl.selectedIndex) ? ' (' + jl.selectedIndex + '/' + (smax - 1) + ')' : '');
- if (incrementals[snum].length > 0) {
-// alert('howdy');
- slideTitle += ' <small>[' + incpos + '/' + incrementals[snum].length + ']</small>';
- }
- if (jl.selectedIndex < smax - 1) {
- var nextTitle = jl.options[jl.selectedIndex + 1].text.replace(/^\d+\s+:\s+/, '') + ((jl.selectedIndex + 1) ? ' (' + (jl.selectedIndex + 1) + '/' + (smax - 1) + ')' : '');
- } else {
- var nextTitle = '[end of slide show]';
- }
-
- if (s5NotesWindow && !s5NotesWindow.closed && s5NotesWindow.document) {
- s5NotesWindow.document.getElementById('slide').innerHTML = slideTitle;
- s5NotesWindow.document.getElementById('notes').innerHTML = notes;
- s5NotesWindow.document.getElementById('next').innerHTML = nextTitle;
- s5NotesWindow.document.getElementById('nextnotes').innerHTML = nextNotes;
- }
- resetElapsedSlide();
-}
-
-function minimizeTimer(id) {
- var obj = s5NotesWindow.document.getElementById(id);
- if (hasClass(obj,'collapsed')) {
- removeClass(obj,'collapsed');
- } else {
- addClass(obj,'collapsed');
- }
-}
-
-function resetElapsedTime() {
- presentationStart = new Date();
- slideStart = new Date();
- updateElaspedTime();
-}
-
-function resetElapsedSlide() {
- if (snum != previousSlide) {
- slideStart = new Date();
- previousSlide = snum;
- updateElaspedTime();
- }
-}
-
-function updateElaspedTime() {
- if (!s5NotesWindowLoaded || !s5NotesWindow || s5NotesWindow.closed) return;
- var now = new Date();
- var ep = s5NotesWindow.document.getElementById('elapsed-presentation');
- var es = s5NotesWindow.document.getElementById('elapsed-slide');
- ep.innerHTML = formatTime(now.valueOf() - presentationStart.valueOf());
- es.innerHTML = formatTime(now.valueOf() - slideStart.valueOf());
-}
-
-function resetRemainingTime() {
- if (!s5NotesWindowLoaded || !s5NotesWindow || s5NotesWindow.closed) return;
- var startField = s5NotesWindow.document.getElementById('startFrom');
- startFrom = readTime(startField.value);
- countdown.remaining = startFrom * 60000; // convert to msecs
- countdown.start = new Date().valueOf();
- countdown.end = countdown.start + countdown.remaining;
- var tl = s5NotesWindow.document.getElementById('timeLeft');
- var timeLeft = formatTime(countdown.remaining);
- tl.innerHTML = timeLeft;
-}
-
-function updateRemainingTime() {
- if (!s5NotesWindowLoaded || !s5NotesWindow || s5NotesWindow.closed) return;
- var tl = s5NotesWindow.document.getElementById('timeLeft');
- var now = new Date();
- if (countdown.state == 'run') {
- countdown.remaining = countdown.end - now;
- }
- tl.style.color = '';
- tl.style.backgroundColor = '';
- if (countdown.remaining >= 0) {
- var timeLeft = formatTime(countdown.remaining);
- removeClass(tl,'overtime');
- if (countdown.remaining < 300000) {
- tl.style.color = 'rgb(' + (255-Math.round(countdown.remaining/2000)) + ',0,0)';
- tl.style.backgroundColor = 'rgb(255,255,' + (Math.round(countdown.remaining/2000)) + ')';
- }
- } else {
- var timeLeft = '-' + formatTime(-countdown.remaining);
- addClass(tl,'overtime');
- }
- tl.innerHTML = timeLeft;
-}
-
-function toggleRemainingTime() {
- if (countdown.state == 'pause') countdown.state = 'run'; else countdown.state = 'pause';
- if (countdown.state == 'pause') {
- window.clearInterval(countdown.timer);
- }
- if (countdown.state == 'run') {
- countdown.start = new Date().valueOf();
- countdown.end = countdown.start + countdown.remaining;
- countdown.timer = window.setInterval('updateRemainingTime()', 1000);
- }
-}
-
-function alterRemainingTime(amt) {
- var change = amt * 60000; // convert to msecs
- countdown.end += change;
- countdown.remaining += change;
- updateRemainingTime();
-}
-
-function formatTime(msecs) {
- var time = new Date(msecs);
-
- var hrs = time.getUTCHours() + ((time.getUTCDate() -1) * 24); // I doubt anyone will spend more than 24 hours on a presentation or single slide but just in case...
- hrs = (hrs < 10) ? '0'+hrs : hrs;
- if (hrs == 'NaN' || isNaN(hrs)) hrs = '--';
-
- var min = time.getUTCMinutes();
- min = (min < 10) ? '0'+min : min;
- if (min == 'NaN' || isNaN(min)) min = '--';
-
- var sec = time.getUTCSeconds();
- sec = (sec < 10) ? '0'+sec : sec;
- if (sec == 'NaN' || isNaN(sec)) sec = '--';
-
- return hrs + ':' + min + ':' + sec;
-}
-
-function readTime(val) {
- var sregex = /:/;
- var matches = sregex.exec(val);
- if (matches == null) {
- return val;
- } else {
- var times = val.split(':');
- var hours = parseInt(times[0]);
- var mins = parseInt(times[1]);
- var total = (hours * 60) + mins;
- return total;
- }
-}
-
-function windowChange() {
- fontScale();
-}
-
-function startup() {
- defaultCheck();
- createControls(); // hallvord
- slideLabel();
- incrementals = createIncrementals();
- noteLabel(); // [SI:060104] must follow slideLabel()
- loadNote();
- fixLinks();
- externalLinks();
- fontScale();
- if (!isOp) notOperaFix();
- slideJump();
- if (defaultView == 'outline') {
- toggle();
- }
- document.onkeyup = keys;
- document.onkeypress = trap;
- document.onclick = clicker;
-}
-
window.onload = startup;
-window.onresize = function(){setTimeout('windowChange()',5);}
\ No newline at end of file
+window.onresize = function(){setTimeout('fontScale()', 50);}
\ No newline at end of file