@@ 439-449 (lines=11) @@ | ||
436 | * @param string $value |
|
437 | * @param boolean $immediatly delayed if false |
|
438 | */ |
|
439 | public function _attr($element='this', $attributeName, $value="", $immediatly=false) { |
|
440 | $element=$this->_prep_element($element); |
|
441 | if (isset($value)) { |
|
442 | $value=$this->_prep_value($value); |
|
443 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
|
444 | } else |
|
445 | $str="$({$element}).attr(\"$attributeName\");"; |
|
446 | if ($immediatly) |
|
447 | $this->jquery_code_for_compile[]=$str; |
|
448 | return $str; |
|
449 | } |
|
450 | ||
451 | /** |
|
452 | * Execute a generic jQuery call with a value. |
|
@@ 458-468 (lines=11) @@ | ||
455 | * @param string $param |
|
456 | * @param boolean $immediatly delayed if false |
|
457 | */ |
|
458 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
459 | $element=$this->_prep_element($element); |
|
460 | if (isset($param)) { |
|
461 | $param=$this->_prep_value($param); |
|
462 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
463 | } else |
|
464 | $str="$({$element}).{$jQueryCall}();"; |
|
465 | if ($immediatly) |
|
466 | $this->jquery_code_for_compile[]=$str; |
|
467 | return $str; |
|
468 | } |
|
469 | /** |
|
470 | * Execute a generic jQuery call with 2 elements. |
|
471 | * @param string $jQueryCall |
|
@@ 535-548 (lines=14) @@ | ||
532 | * @param boolean $immediatly delayed if false |
|
533 | * @return string |
|
534 | */ |
|
535 | public function _fadeIn($element='this', $speed='', $callback='', $immediatly=false) { |
|
536 | $element=$this->_prep_element($element); |
|
537 | $speed=$this->_validate_speed($speed); |
|
538 | ||
539 | if ($callback!='') { |
|
540 | $callback=", function(){\n{$callback}\n}"; |
|
541 | } |
|
542 | ||
543 | $str="$({$element}).fadeIn({$speed}{$callback});"; |
|
544 | ||
545 | if ($immediatly) |
|
546 | $this->jquery_code_for_compile[]=$str; |
|
547 | return $str; |
|
548 | } |
|
549 | ||
550 | // -------------------------------------------------------------------- |
|
551 | ||
@@ 561-574 (lines=14) @@ | ||
558 | * @param boolean $immediatly delayed if false |
|
559 | * @return string |
|
560 | */ |
|
561 | public function _fadeOut($element='this', $speed='', $callback='', $immediatly=false) { |
|
562 | $element=$this->_prep_element($element); |
|
563 | $speed=$this->_validate_speed($speed); |
|
564 | ||
565 | if ($callback!='') { |
|
566 | $callback=", function(){\n{$callback}\n}"; |
|
567 | } |
|
568 | ||
569 | $str="$({$element}).fadeOut({$speed}{$callback});"; |
|
570 | ||
571 | if ($immediatly) |
|
572 | $this->jquery_code_for_compile[]=$str; |
|
573 | return $str; |
|
574 | } |
|
575 | ||
576 | // -------------------------------------------------------------------- |
|
577 | ||
@@ 587-600 (lines=14) @@ | ||
584 | * @param boolean $immediatly delayed if false |
|
585 | * @return string |
|
586 | */ |
|
587 | public function _hide($element='this', $speed='', $callback='', $immediatly=false) { |
|
588 | $element=$this->_prep_element($element); |
|
589 | $speed=$this->_validate_speed($speed); |
|
590 | ||
591 | if ($callback!='') { |
|
592 | $callback=", function(){\n{$callback}\n}"; |
|
593 | } |
|
594 | ||
595 | $str="$({$element}).hide({$speed}{$callback});"; |
|
596 | ||
597 | if ($immediatly) |
|
598 | $this->jquery_code_for_compile[]=$str; |
|
599 | return $str; |
|
600 | } |
|
601 | ||
602 | // -------------------------------------------------------------------- |
|
603 | ||
@@ 615-628 (lines=14) @@ | ||
612 | * @param boolean $immediatly delayed if false |
|
613 | * @return string |
|
614 | */ |
|
615 | public function _slideUp($element='this', $speed='', $callback='', $immediatly=false) { |
|
616 | $element=$this->_prep_element($element); |
|
617 | $speed=$this->_validate_speed($speed); |
|
618 | ||
619 | if ($callback!='') { |
|
620 | $callback=", function(){\n{$callback}\n}"; |
|
621 | } |
|
622 | ||
623 | $str="$({$element}).slideUp({$speed}{$callback});"; |
|
624 | ||
625 | if ($immediatly) |
|
626 | $this->jquery_code_for_compile[]=$str; |
|
627 | return $str; |
|
628 | } |
|
629 | ||
630 | // -------------------------------------------------------------------- |
|
631 | ||
@@ 641-654 (lines=14) @@ | ||
638 | * @param boolean $immediatly delayed if false |
|
639 | * @return string |
|
640 | */ |
|
641 | public function _slideDown($element='this', $speed='', $callback='', $immediatly=false) { |
|
642 | $element=$this->_prep_element($element); |
|
643 | $speed=$this->_validate_speed($speed); |
|
644 | ||
645 | if ($callback!='') { |
|
646 | $callback=", function(){\n{$callback}\n}"; |
|
647 | } |
|
648 | ||
649 | $str="$({$element}).slideDown({$speed}{$callback});"; |
|
650 | ||
651 | if ($immediatly) |
|
652 | $this->jquery_code_for_compile[]=$str; |
|
653 | return $str; |
|
654 | } |
|
655 | ||
656 | // -------------------------------------------------------------------- |
|
657 | ||
@@ 667-680 (lines=14) @@ | ||
664 | * @param boolean $immediatly delayed if false |
|
665 | * @return string |
|
666 | */ |
|
667 | public function _slideToggle($element='this', $speed='', $callback='', $immediatly=false) { |
|
668 | $element=$this->_prep_element($element); |
|
669 | $speed=$this->_validate_speed($speed); |
|
670 | ||
671 | if ($callback!='') { |
|
672 | $callback=", function(){\n{$callback}\n}"; |
|
673 | } |
|
674 | ||
675 | $str="$({$element}).slideToggle({$speed}{$callback});"; |
|
676 | ||
677 | if ($immediatly) |
|
678 | $this->jquery_code_for_compile[]=$str; |
|
679 | return $str; |
|
680 | } |
|
681 | ||
682 | // -------------------------------------------------------------------- |
|
683 | ||
@@ 728-741 (lines=14) @@ | ||
725 | * @param boolean $immediatly delayed if false |
|
726 | * @return string |
|
727 | */ |
|
728 | public function _show($element='this', $speed='', $callback='', $immediatly=false) { |
|
729 | $element=$this->_prep_element($element); |
|
730 | $speed=$this->_validate_speed($speed); |
|
731 | ||
732 | if ($callback!='') { |
|
733 | $callback=", function(){\n{$callback}\n}"; |
|
734 | } |
|
735 | ||
736 | $str="$({$element}).show({$speed}{$callback});"; |
|
737 | ||
738 | if ($immediatly) |
|
739 | $this->jquery_code_for_compile[]=$str; |
|
740 | return $str; |
|
741 | } |
|
742 | ||
743 | /** |
|
744 | * Places a condition |