Name ad-hoc attributes with data- prefix
This commit is contained in:
parent
d04c094543
commit
cb549b4995
|
@ -34,7 +34,7 @@ var dir = '$dir';
|
|||
<tr><th>Length:</th><td>[clock format $len -format %T]</td></tr>
|
||||
<tr><th>Size:</th><td>[pretty_size [$ts size]] ([$ts get definition])</td></tr>
|
||||
<tr><th>Bookmarks<br><span class=footnote>(enter in seconds)</span></th><td>
|
||||
<input id=bookmarks size=80 maxlength=255 init=\"[$ts bookmarks]\"
|
||||
<input id=bookmarks size=80 maxlength=255 data-init=\"[$ts bookmarks]\"
|
||||
value=\"\" />
|
||||
<button id=update>Update</button>
|
||||
<br>
|
||||
|
@ -61,7 +61,7 @@ loop v $start $limit $incr {
|
|||
}
|
||||
puts "</tr><tr>"
|
||||
foreach v $times {
|
||||
puts "<td><img class=bmp src=/img/generating.png pos=$v></td>"
|
||||
puts "<td><img class=bmp src=/img/generating.png data-pos=$v></td>"
|
||||
}
|
||||
puts "
|
||||
</tr></table>
|
||||
|
|
|
@ -141,7 +141,7 @@ sortmarks()
|
|||
|
||||
$(function() {
|
||||
|
||||
$('#bookmarks').val($('#bookmarks').attr('init'));
|
||||
$('#bookmarks').val($('#bookmarks').attr('data-init'));
|
||||
draw_slider();
|
||||
$('#curbmk').html(toTimeStr(curval));
|
||||
|
||||
|
@ -211,9 +211,9 @@ $('#genthumbs').button({icons: {primary: "ui-icon-zoomin"}, disabled: false})
|
|||
.button('option', 'icon', 'ui-icon-refresh');
|
||||
$('img.bmp').each(function(i) {
|
||||
if (start === undefined) {
|
||||
start = $(this).attr('pos') | 0;
|
||||
start = $(this).attr('data-pos') | 0;
|
||||
} else {
|
||||
last = $(this).attr('pos') | 0;
|
||||
last = $(this).attr('data-pos') | 0;
|
||||
}
|
||||
incr++;
|
||||
});
|
||||
|
@ -229,7 +229,7 @@ $('#genthumbs').button({icons: {primary: "ui-icon-zoomin"}, disabled: false})
|
|||
$('#thumbs').show();
|
||||
$('img.bmp').each(function(i) {
|
||||
/* cast to "int" */
|
||||
var pos = $(this).attr('pos')|0;
|
||||
var pos = $(this).attr('data-pos')|0;
|
||||
$(this).attr('src',
|
||||
'/browse/thumbnail/fetch.jim?' +
|
||||
'file=' + encodeURIComponent(file) +
|
||||
|
|
Loading…
Reference in New Issue