Sequential has basic functionality. JavaScript needs to be fixed.
This commit is contained in:
27
seq_module.html
Normal file
27
seq_module.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div id='debug' ellpadding=5></div>
|
||||
<table width=800 >
|
||||
<tr><td></td><td style="background-color:grey" id="tt_1" height=10></td>
|
||||
<td style="background-color:grey" id="tt_2"></td>
|
||||
<td style="background-color:grey" id="tt_3"></td>
|
||||
<td style="background-color:grey" id="tt_4"></td>
|
||||
<td style="background-color:grey" id="tt_5"></td>
|
||||
<td style="background-color:grey" id="tt_6"></td>
|
||||
<td style="background-color:grey" id="tt_7"></td>
|
||||
<td style="background-color:grey" id="tt_8"></td>
|
||||
<td style="background-color:grey" id="tt_9"></td>
|
||||
<td style="background-color:grey" id="tt_10"></td><td></td></tr>
|
||||
<tr><td align=center valign=center><div id="prev"><span class="ui-icon ui-icon-circle-triangle-w" onclick="pause();"></span></div></td>
|
||||
<td colspan=10><div id="content">This is content</div></td>
|
||||
<td align=center valign=center><div id="next"><span class="ui-icon ui-icon-circle-triangle-e" onclick="pause();"> </span></div></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div>
|
||||
%for t in items:
|
||||
<div id="vert-${items.index(t)}">
|
||||
${t[1]['content']}
|
||||
</div>
|
||||
%endfor
|
||||
</div>
|
||||
7
seq_module.html~
Normal file
7
seq_module.html~
Normal file
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
% for t in items:
|
||||
<div id="vert-${items.index(t)}">
|
||||
${t[1]['content']}
|
||||
</div>
|
||||
% endfor
|
||||
</div>
|
||||
43
seq_module.js
Normal file
43
seq_module.js
Normal file
@@ -0,0 +1,43 @@
|
||||
var files=["",
|
||||
%for t in items:
|
||||
${t[1]['content']} ,
|
||||
%endfor
|
||||
""
|
||||
];
|
||||
|
||||
var loc;
|
||||
|
||||
function goto(i) {
|
||||
$('#content').html(files[i]);
|
||||
loc=i;
|
||||
}
|
||||
|
||||
function setup_click(i) {
|
||||
$.get(i+'.html', function(data){
|
||||
files[i]=data;
|
||||
})
|
||||
$('#tt_'+i).click(function(eo) { goto(i);});
|
||||
}
|
||||
|
||||
function next() {
|
||||
loc=loc+1;
|
||||
if(loc>10) loc=10;
|
||||
goto(loc);
|
||||
}
|
||||
|
||||
function prev() {
|
||||
loc=loc-1;
|
||||
if(loc<1) loc=1;
|
||||
goto(loc);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var i;
|
||||
for(i=1; i<11; i++) {
|
||||
setup_click(i);
|
||||
}
|
||||
$('#next').click(function(eo) { next();});
|
||||
$('#prev').click(function(eo) { prev();});
|
||||
});
|
||||
|
||||
$('#debug').text('loaded');
|
||||
38
seq_module.js~
Normal file
38
seq_module.js~
Normal file
@@ -0,0 +1,38 @@
|
||||
files=["1.html", "2.html", "3.html", "4.html", "5.html", "6.html", "7.html", "8.html", "9.html", "10.html"];
|
||||
|
||||
var loc;
|
||||
|
||||
function goto(i) {
|
||||
$('#content').html(files[i]);
|
||||
loc=i;
|
||||
}
|
||||
|
||||
function setup_click(i) {
|
||||
$.get(i+'.html', function(data){
|
||||
files[i]=data;
|
||||
})
|
||||
$('#tt_'+i).click(function(eo) { goto(i);});
|
||||
}
|
||||
|
||||
function next() {
|
||||
loc=loc+1;
|
||||
if(loc>10) loc=10;
|
||||
goto(loc);
|
||||
}
|
||||
|
||||
function prev() {
|
||||
loc=loc-1;
|
||||
if(loc<1) loc=1;
|
||||
goto(loc);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var i;
|
||||
for(i=1; i<11; i++) {
|
||||
setup_click(i);
|
||||
}
|
||||
$('#next').click(function(eo) { next();});
|
||||
$('#prev').click(function(eo) { prev();});
|
||||
});
|
||||
|
||||
$('#debug').text('loaded');
|
||||
Reference in New Issue
Block a user