-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,339 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?php | ||
/** | ||
* @package JJ_Shoutbox | ||
* @copyright Copyright (C) 2011 - 2015 JoomJunk. All rights reserved. | ||
* @license GPL v3.0 or later http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
|
||
|
||
defined('JPATH_PLATFORM') or die; | ||
|
||
/** | ||
* Form Field to hide public and private keys fields if maths question is selected | ||
* | ||
* @package JJ_Shoutbox | ||
* @since 3.0.0 | ||
*/ | ||
class ShoutboxFormFieldFade extends JFormField | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $type = 'fade'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
protected function getLabel() | ||
{ | ||
$doc = JFactory::getDocument(); | ||
$app = JFactory::getApplication(); | ||
|
||
// Import jQuery | ||
if (version_compare(JVERSION, '3.0.0', 'ge')) | ||
{ | ||
JHtml::_('jquery.framework'); | ||
} | ||
else | ||
{ | ||
if (!$app->get('jquery')) | ||
{ | ||
$app->set('jquery', true); | ||
$doc->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'); | ||
JHtml::_('script', 'mod_shoutbox/jquery-conflict.js', false, true); | ||
} | ||
} | ||
|
||
if (version_compare(JVERSION, '3.0.0', 'ge')) | ||
{ | ||
$parent = '.control-group'; | ||
} | ||
else | ||
{ | ||
$parent = 'li'; | ||
} | ||
|
||
|
||
$js = ' | ||
jQuery(document).ready(function($) { | ||
var select = $("#jform_params_securitytype"); | ||
var public = $("#jform_params_recaptcha_public-lbl").parents("' . $parent . '"); | ||
var private = $("#jform_params_recaptcha_private-lbl").parents("' . $parent . '"); | ||
if( select.val() == 0 || select.val() == 2 ) { | ||
public.hide(); | ||
private.hide(); | ||
} | ||
select.on("change", function() { | ||
var value = this.value; | ||
if( value == 0 || value == 2 ) { | ||
public.fadeOut(); | ||
private.fadeOut(); | ||
} | ||
else { | ||
public.fadeIn(); | ||
private.fadeIn(); | ||
} | ||
}); | ||
}); | ||
'; | ||
|
||
$doc->addScriptDeclaration($js); | ||
|
||
if (version_compare(JVERSION, '3.0.0', 'ge')) | ||
{ | ||
return '<hr>'; | ||
} | ||
|
||
return ''; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
protected function getInput() | ||
{ | ||
return; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html><body bgcolor="#FFFFFF"></body></html> | ||
<!DOCTYPE html><title></title> |
Oops, something went wrong.