mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
#647 - Tweak forum JS with poll plugin
Hide JS when poll is not active in forums
This commit is contained in:
@@ -2,14 +2,26 @@
|
|||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
// Moc - temporary solution until a global/common clone method is created which replaces duplicateHTML()
|
// #647 - temporary solution until a global/common clone method is created which replaces duplicateHTML()
|
||||||
e107::js("footer-inline", "
|
if(!e107::isInstalled('poll'))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(e107::getPlugPref('forum', 'poll') != '255')
|
||||||
|
{
|
||||||
|
$poll_active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(e_CURRENT_PLUGIN == "forum" && e107::isInstalled('poll') && $poll_active)
|
||||||
|
{
|
||||||
|
e107::js("footer-inline", "
|
||||||
|
|
||||||
|
$('#addoption').click(function () {
|
||||||
|
$('#poll_answer').clone().appendTo('#pollsection').find('input[type=text]').val('');
|
||||||
|
});
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
$('#addoption').click(function () {
|
|
||||||
|
|
||||||
$('#poll_answer').clone().appendTo('#pollsection').find('input[type=text]').val('');
|
|
||||||
|
|
||||||
});
|
|
||||||
");
|
|
||||||
|
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user