1
0

Removed preload

This commit is contained in:
3nids 2009-09-26 12:42:54 +02:00
parent b0ad4fa7e7
commit e7c055c21c
8 changed files with 3 additions and 60 deletions

1
last_commit.txt Executable file
View File

@ -0,0 +1 @@
Removed preload

View File

@ -159,8 +159,7 @@
var href = opts.itemArray[opts.itemCurrent + 1].href;
if (href.match(imageRegExp)) {
objNext = new Image();
objNext.src = href;
$("<img>").attr("src", href);
}
}
@ -168,8 +167,7 @@
var href = opts.itemArray[opts.itemCurrent -1].href;
if (href.match(imageRegExp)) {
objNext = new Image();
objNext.src = href;
$("<img>").attr("src", href);
}
}
};

View File

@ -1,10 +0,0 @@
preload_image_object = '';
var img_count = 0;
jQuery.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
{
jQuery("<img>").attr("src", arguments[i]);
}
}

View File

@ -9,17 +9,6 @@
$theme->pagination = new Pagination();
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<script type="text/javascript">
<? for($i=0;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
if(img_count>0){preload_image_object += ', ';}
preload_image_object += '"<?=$child->file_url()?>"';
img_count++;
<? endif ?>
<? endfor ?>
</SCRIPT>
<ul id="gAlbumGrid">
<? if (count($children)): ?>

View File

@ -10,17 +10,6 @@
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<script type="text/javascript">
<? for($i=0;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
if(img_count>0){preload_image_object += ', ';}
preload_image_object += '"<?=$child->file_url()?>"';
img_count++;
<? endif ?>
<? endfor ?>
</SCRIPT>
<ul id="gAlbumGrid">
<? for($i=0;$i<$children_offset;$i++): ?>

View File

@ -15,9 +15,3 @@
</div>
</div>
<script type="text/javascript">
if(img_count>0){preload_image_object += ', ';}
preload_image_object += '"<?=$item->file_url()?>"';
img_count++;
</script>

View File

@ -62,7 +62,6 @@
<?= $theme->script("jquery.localscroll.js") ?>
<?= $theme->script("jquery.easing.js") ?>
<?= $theme->script("jquery.fancybox.js") ?>
<?= $theme->script("jquery.preloadimages.js") ?>
<?= $theme->script("ui.init.js") ?>
<? /* These are page specific, but if we put them before $theme->head() they get combined */ ?>
@ -168,10 +167,5 @@
</div>
</div>
<?= $theme->page_bottom() ?>
<script type="text/javascript">
if (img_count > 0){
eval("$.preloadImages("+preload_image_object+");");
}
</script>
</body>
</html>

View File

@ -6,18 +6,6 @@
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count_true,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
<script type="text/javascript">
<? for($i=0;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<? if ($child->is_photo()): ?>
if(img_count>0){preload_image_object += ', ';}
preload_image_object += '"<?=$child->file_url()?>"';
img_count++;
<? endif ?>
<? endfor ?>
</script>
<div id="gSearchResults">
<h2><?= t("Results for <b>%term</b>", array("term" => $q)) ?></h2>