20 ) $maxLength = 20; $pickListJSON = json_encode ( $pickList ); $js = << ') .attr( 'tabIndex', -1 ) .attr( 'title', 'Show All Items' ) .button({ icons: { primary: 'ui-icon-triangle-1-s' }, text: false }) .removeClass( 'ui-corner-all' ) .addClass( 'ui-corner-right ui-button-icon' ) .insertAfter ( $("$tag") ) .click(function() { if ( isOpen ) { $('$tag').autocomplete('close'); } else { $('$tag').autocomplete('search','').focus(); } }); }); JS; return JS::libraryWithDependancies ( JS::JQUERY_UI ) . $html . JS::javaScript ( $js ); } public static function popupWrapper ( $msg, $timeout=1500, $title='' ) { $id = Invocation::next(); if ( $title == '' ) $title = 'Message:'; if ( $timeout < 0 ) { $timeoutJS = <<$msg' ) .dialog({ $timeoutJS hide: 'fade', position: { at: "top+200" } }); }); JS; return JS::libraryWithDependancies ( JS::JQUERY_UI ) . JS::javaScript ( $js ); } private static $styleTableInvocations = 0; public static function styleTable ( $selector ) { if ( self::$styleTableInvocations == 0 ) { self::$styleTableInvocations ++; $js = << 'Click here to refresh now.', 'class' => $css ] ) . ' in ' . Tag::hTag( 'span', [ 'id' => "countDownText{$id}", 'class' => $css ] ) . $numOfSeconds . Tag::_hTag( 'span' ) . ' seconds ' . Tag::hRef("javascript:stopCount{$id}()", 'Stop', [ 'id' => "stop{$id}", 'title' => 'Click here to stop the timer.', 'class' => $css ] ) . Tag::hRef("javascript:countDown{$id}()", 'Start', [ 'id' => "start{$id}", 'title' => 'Click here to start the timer.', 'class' => $css ] ) . '
' . Tag::div( [ 'id' => "reload{$id}", 'class' => $css ] ) . call_user_func( $callBack ) . Tag::_div(); return JS::library ( JS::JQUERY ) . JS::javaScript( $js ) . $html; } }