mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 01:25:01 +02:00
Fixed: proper usage of default values in JS.
This commit is contained in:
@@ -366,9 +366,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'title' => LAN_GALLERY_ADMIN_70,
|
'title' => LAN_GALLERY_ADMIN_70,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_hook' => array(
|
'pp_hook' => array(
|
||||||
@@ -406,9 +403,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'title' => LAN_GALLERY_ADMIN_35,
|
'title' => LAN_GALLERY_ADMIN_35,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 0,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_opacity' => array(
|
'pp_opacity' => array(
|
||||||
@@ -425,9 +419,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'title' => LAN_GALLERY_ADMIN_38,
|
'title' => LAN_GALLERY_ADMIN_38,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_allow_resize' => array(
|
'pp_allow_resize' => array(
|
||||||
@@ -435,9 +426,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_40,
|
'help' => LAN_GALLERY_ADMIN_40,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_default_width' => array(
|
'pp_default_width' => array(
|
||||||
@@ -499,9 +487,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_49,
|
'help' => LAN_GALLERY_ADMIN_49,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 0,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_wmode' => array(
|
'pp_wmode' => array(
|
||||||
@@ -518,9 +503,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'title' => LAN_GALLERY_ADMIN_52,
|
'title' => LAN_GALLERY_ADMIN_52,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_modal' => array(
|
'pp_modal' => array(
|
||||||
@@ -528,9 +510,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_54,
|
'help' => LAN_GALLERY_ADMIN_54,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 0,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_deeplinking' => array(
|
'pp_deeplinking' => array(
|
||||||
@@ -538,9 +517,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_56,
|
'help' => LAN_GALLERY_ADMIN_56,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 0,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_overlay_gallery' => array(
|
'pp_overlay_gallery' => array(
|
||||||
@@ -548,9 +524,6 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_58,
|
'help' => LAN_GALLERY_ADMIN_58,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_keyboard_shortcuts' => array(
|
'pp_keyboard_shortcuts' => array(
|
||||||
@@ -558,18 +531,12 @@ class gallery_cat_admin_ui extends e_admin_ui
|
|||||||
'help' => LAN_GALLERY_ADMIN_60,
|
'help' => LAN_GALLERY_ADMIN_60,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
'pp_ie6_fallback' => array(
|
'pp_ie6_fallback' => array(
|
||||||
'title' => LAN_GALLERY_ADMIN_61,
|
'title' => LAN_GALLERY_ADMIN_61,
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'data' => 'int',
|
'data' => 'int',
|
||||||
'writeParms' => array(
|
|
||||||
'default' => 1,
|
|
||||||
),
|
|
||||||
'tab' => 2,
|
'tab' => 2,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@@ -50,15 +50,15 @@ function gallery_load_prettyphoto()
|
|||||||
'overlay_gallery' => (bool) varset($plugPref['pp_overlay_gallery'], true),
|
'overlay_gallery' => (bool) varset($plugPref['pp_overlay_gallery'], true),
|
||||||
'keyboard_shortcuts' => (bool) varset($plugPref['pp_keyboard_shortcuts'], true),
|
'keyboard_shortcuts' => (bool) varset($plugPref['pp_keyboard_shortcuts'], true),
|
||||||
'ie6_fallback' => (bool) varset($plugPref['pp_ie6_fallback'], true),
|
'ie6_fallback' => (bool) varset($plugPref['pp_ie6_fallback'], true),
|
||||||
'markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['markup']),
|
'markup' => $template['prettyphoto']['markup'],
|
||||||
'gallery_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['gallery_markup']),
|
'gallery_markup' => $template['prettyphoto']['gallery_markup'],
|
||||||
'image_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['image_markup']),
|
'image_markup' => $template['prettyphoto']['image_markup'],
|
||||||
'flash_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['flash_markup']),
|
'flash_markup' => $template['prettyphoto']['flash_markup'],
|
||||||
'quicktime_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['quicktime_markup']),
|
'quicktime_markup' => $template['prettyphoto']['quicktime_markup'],
|
||||||
'iframe_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['iframe_markup']),
|
'iframe_markup' => $template['prettyphoto']['iframe_markup'],
|
||||||
'inline_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['inline_markup']),
|
'inline_markup' => $template['prettyphoto']['inline_markup'],
|
||||||
'custom_markup' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['custom_markup']),
|
'custom_markup' => $template['prettyphoto']['custom_markup'],
|
||||||
'social_tools' => str_replace(array("\r", "\n", "\t"), '', $template['prettyphoto']['social_tools']),
|
'social_tools' => $template['prettyphoto']['social_tools'],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -14,47 +14,44 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
var pPhoto = settings.gallery.prettyphoto || {};
|
var pPhoto = settings.gallery.prettyphoto || {};
|
||||||
var pPhook = pPhoto.hook || 'data-gal';
|
var pPhook = pPhoto.hook || 'data-gal';
|
||||||
|
|
||||||
$(context).find("a[" + pPhook + "^='prettyPhoto']").once('gallery-prettyPhoto').each(function ()
|
$(context).find("a[" + pPhook + "^='prettyPhoto']").once('gallery-prettyPhoto').prettyPhoto(
|
||||||
{
|
{
|
||||||
$(this).prettyPhoto(
|
hook: pPhook,
|
||||||
|
animation_speed: pPhoto.animation_speed || 'fast', // fast/slow/normal
|
||||||
|
slideshow: pPhoto.slideshow || 5000, // false OR interval time in ms
|
||||||
|
autoplay_slideshow: pPhoto.autoplay_slideshow || false, // true/false
|
||||||
|
opacity: pPhoto.opacity || 0.80, // Value between 0 and 1
|
||||||
|
show_title: pPhoto.show_title || false, // true/false
|
||||||
|
allow_resize: pPhoto.allow_resize || false, // Resize the photos bigger than viewport. true/false
|
||||||
|
default_width: pPhoto.default_width || 500,
|
||||||
|
default_height: pPhoto.default_height || 344,
|
||||||
|
counter_separator_label: pPhoto.counter_separator_label || '/', // The separator for the gallery counter 1 "of" 2
|
||||||
|
theme: pPhoto.theme || 'pp_default', // light_rounded / dark_rounded / light_square / dark_square / facebook
|
||||||
|
horizontal_padding: pPhoto.horizontal_padding || 20, // The padding on each side of the picture
|
||||||
|
hideflash: pPhoto.hideflash || false, // Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto
|
||||||
|
wmode: pPhoto.wmode || 'opaque', // Set the flash wmode attribute
|
||||||
|
autoplay: pPhoto.autoplay || false, // Automatically start videos: true/false
|
||||||
|
modal: pPhoto.modal || false, // If set to true, only the close button will close the window
|
||||||
|
deeplinking: pPhoto.deeplinking || false, // Allow prettyPhoto to update the url to enable deeplinking.
|
||||||
|
overlay_gallery: pPhoto.overlay_gallery || false, // If set to true, a gallery will overlay the fullscreen image on mouse over
|
||||||
|
keyboard_shortcuts: pPhoto.keyboard_shortcuts || false, // Set to false if you open forms inside prettyPhoto
|
||||||
|
ie6_fallback: pPhoto.ie6_fallback || false, // true/false
|
||||||
|
markup: decodeURIComponent(pPhoto.markup) || null,
|
||||||
|
gallery_markup: decodeURIComponent(pPhoto.gallery_markup) || null,
|
||||||
|
image_markup: decodeURIComponent(pPhoto.image_markup) || null,
|
||||||
|
flash_markup: pPhoto.flash_markup || null,
|
||||||
|
quicktime_markup: pPhoto.quicktime_markup || null,
|
||||||
|
iframe_markup: pPhoto.iframe_markup || null,
|
||||||
|
inline_markup: pPhoto.inline_markup || null,
|
||||||
|
custom_markup: pPhoto.custom_markup || null,
|
||||||
|
social_tools: decodeURIComponent(pPhoto.social_tools) || null,
|
||||||
|
changepicturecallback: function ()
|
||||||
{
|
{
|
||||||
hook: pPhook,
|
var $ppContent = $(".pp_content");
|
||||||
animation_speed: pPhoto.animation_speed || 'fast', // fast/slow/normal
|
$ppContent.css("height", $ppContent.height() + jQuery(".download-btn").outerHeight() + 10);
|
||||||
slideshow: pPhoto.slideshow || 5000, // false OR interval time in ms
|
|
||||||
autoplay_slideshow: pPhoto.autoplay_slideshow || false, // true/false
|
|
||||||
opacity: pPhoto.opacity || 0.80, // Value between 0 and 1
|
|
||||||
show_title: pPhoto.show_title || true, // true/false
|
|
||||||
allow_resize: pPhoto.allow_resize || true, // Resize the photos bigger than viewport. true/false
|
|
||||||
default_width: pPhoto.default_width || 500,
|
|
||||||
default_height: pPhoto.default_height || 344,
|
|
||||||
counter_separator_label: pPhoto.counter_separator_label || '/', // The separator for the gallery counter 1 "of" 2
|
|
||||||
theme: pPhoto.theme || 'pp_default', // light_rounded / dark_rounded / light_square / dark_square / facebook
|
|
||||||
horizontal_padding: pPhoto.horizontal_padding || 20, // The padding on each side of the picture
|
|
||||||
hideflash: pPhoto.hideflash || false, // Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto
|
|
||||||
wmode: pPhoto.wmode || 'opaque', // Set the flash wmode attribute
|
|
||||||
autoplay: pPhoto.autoplay || true, // Automatically start videos: true/false
|
|
||||||
modal: pPhoto.modal || false, // If set to true, only the close button will close the window
|
|
||||||
deeplinking: pPhoto.deeplinking || false, // Allow prettyPhoto to update the url to enable deeplinking.
|
|
||||||
overlay_gallery: pPhoto.overlay_gallery || true, // If set to true, a gallery will overlay the fullscreen image on mouse over
|
|
||||||
keyboard_shortcuts: pPhoto.keyboard_shortcuts || true, // Set to false if you open forms inside prettyPhoto
|
|
||||||
ie6_fallback: pPhoto.ie6_fallback || true, // true/false
|
|
||||||
markup: pPhoto.markup || null,
|
|
||||||
gallery_markup: pPhoto.gallery_markup || null,
|
|
||||||
image_markup: pPhoto.image_markup || null,
|
|
||||||
flash_markup: pPhoto.flash_markup || null,
|
|
||||||
quicktime_markup: pPhoto.quicktime_markup || null,
|
|
||||||
iframe_markup: pPhoto.iframe_markup || null,
|
|
||||||
inline_markup: pPhoto.inline_markup || null,
|
|
||||||
custom_markup: pPhoto.custom_markup || null,
|
|
||||||
social_tools: pPhoto.social_tools || null,
|
|
||||||
changepicturecallback: function ()
|
|
||||||
{
|
|
||||||
var $ppContent = $(".pp_content");
|
|
||||||
$ppContent.css("height", $ppContent.height() + jQuery(".download-btn").outerHeight() + 10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
<pref name="pp_autoplay">1</pref>
|
<pref name="pp_autoplay">1</pref>
|
||||||
<pref name="pp_modal">0</pref>
|
<pref name="pp_modal">0</pref>
|
||||||
<pref name="pp_deeplinking">0</pref>
|
<pref name="pp_deeplinking">0</pref>
|
||||||
<pref name="pp_overlay_gallery">1</pref>
|
<pref name="pp_overlay_gallery">0</pref>
|
||||||
<pref name="pp_keyboard_shortcuts">1</pref>
|
<pref name="pp_keyboard_shortcuts">1</pref>
|
||||||
<pref name="pp_ie6_fallback">1</pref>
|
<pref name="pp_ie6_fallback">1</pref>
|
||||||
</pluginPrefs>
|
</pluginPrefs>
|
||||||
|
Reference in New Issue
Block a user