mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merging the Limesurvey 1.91+ branch of queXS in to the trunk
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
class dFunctionHide implements dFunctionInterface
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function run($args)
|
||||
{
|
||||
|
||||
$funcName=array_shift($args);
|
||||
try
|
||||
{
|
||||
$func = dTexts::loadFunction($funcName);
|
||||
$newStr = $func->run($args);
|
||||
if(strtolower($newStr)=='true'){
|
||||
$id=time().rand(0,100);
|
||||
$hideJS=<<<EOF
|
||||
<div id="hide_$id" style="display:none;"/>
|
||||
<script type="text/javascript">
|
||||
var elem = $('#hide_$id').parent();
|
||||
if(elem.is("li")){
|
||||
elem.css('display','none');
|
||||
}else{
|
||||
elem = elem.parent();
|
||||
if(elem.is("li")){
|
||||
elem.css('display','none');
|
||||
}else{
|
||||
elem = elem.parent();
|
||||
if(elem.is("li")){
|
||||
elem.css('display','none');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
EOF;
|
||||
return $hideJS;
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user