fixes #8, support for slideshow duration
This commit is contained in:
parent
5ed2ff0c97
commit
4047609e23
@ -82,6 +82,9 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
$group->input("appletouchicon")
|
$group->input("appletouchicon")
|
||||||
->label(t("URL (or relative path) to your apple-touch-icon.png"))
|
->label(t("URL (or relative path) to your apple-touch-icon.png"))
|
||||||
->value(module::get_var("gallery", "appletouchicon_url"));
|
->value(module::get_var("gallery", "appletouchicon_url"));
|
||||||
|
$group->input("slideshow_time")
|
||||||
|
->label(t("Slideshow timeout (in ms)"))
|
||||||
|
->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000"));
|
||||||
|
|
||||||
/* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
/* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||||
|
|
||||||
@ -218,7 +221,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
|
|
||||||
protected function reset_theme() {
|
protected function reset_theme() {
|
||||||
// Default core theme settings
|
// Default core theme settings
|
||||||
module::set_var("gallery", "page_size", 9);
|
module::set_var("gallery", "page_size", 50);
|
||||||
module::set_var("gallery", "resize_size", 640);
|
module::set_var("gallery", "resize_size", 640);
|
||||||
module::set_var("gallery", "thumb_size", 200);
|
module::set_var("gallery", "thumb_size", 200);
|
||||||
module::set_var("gallery", "header_text", "");
|
module::set_var("gallery", "header_text", "");
|
||||||
@ -290,6 +293,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
|
|||||||
module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value);
|
module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value);
|
||||||
|
|
||||||
$this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value);
|
$this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value);
|
||||||
|
$this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != "5000", filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000))));
|
||||||
|
|
||||||
// * Advanced Options - General ******************************************
|
// * Advanced Options - General ******************************************
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ var hideHoverV = null;
|
|||||||
var hovering = false;
|
var hovering = false;
|
||||||
var maxSize;
|
var maxSize;
|
||||||
var mosaicEffect = "";
|
var mosaicEffect = "";
|
||||||
|
var slideshowTimeout = 5000;
|
||||||
|
|
||||||
function thumbPadding() {
|
function thumbPadding() {
|
||||||
var size, width, margin;
|
var size, width, margin;
|
||||||
@ -317,7 +318,7 @@ function togglePlayPause() {
|
|||||||
if (slideShow === null) {
|
if (slideShow === null) {
|
||||||
$('#play_detail').hide();
|
$('#play_detail').hide();
|
||||||
$('#pause_detail').show();
|
$('#pause_detail').show();
|
||||||
slideShow = setTimeout("slideShowUpdate()", 5000);
|
slideShow = setTimeout("slideShowUpdate()", slideshowTimeout);
|
||||||
} else { //We are playing
|
} else { //We are playing
|
||||||
$('#pause_detail').hide();
|
$('#pause_detail').hide();
|
||||||
$('#play_detail').show();
|
$('#play_detail').show();
|
||||||
@ -343,7 +344,7 @@ function slideShowUpdate() {
|
|||||||
slideShowId = 0;
|
slideShowId = 0;
|
||||||
}
|
}
|
||||||
swatchImg(slideShowId);
|
swatchImg(slideShowId);
|
||||||
slideShow = setTimeout("slideShowUpdate()", 5000);
|
slideShow = setTimeout("slideShowUpdate()", slideshowTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchMode(mode) {
|
function switchMode(mode) {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<? /* Placeholder for infromation in mosaic view. */ ?>
|
<? /* Placeholder for infromation in mosaic view. */ ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
|
slideshowTimeout = <?=module::get_var("th_pear4gallery3", "slideshow_time", "5000")?>;
|
||||||
mosaicEffect = "<?
|
mosaicEffect = "<?
|
||||||
$mosaic_effect = module::get_var("th_pear4gallery3", "mosaic_effect", "blind");
|
$mosaic_effect = module::get_var("th_pear4gallery3", "mosaic_effect", "blind");
|
||||||
if ($mosaic_effect == "none") print "";
|
if ($mosaic_effect == "none") print "";
|
||||||
|
Reference in New Issue
Block a user