[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class JavelinUIExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return 'Javelin UI'; 7 } 8 9 public function getDescription() { 10 return 'Here are some Javelin UI elements that you could use.'; 11 } 12 13 public function renderExample() { 14 $request = $this->getRequest(); 15 $user = $request->getUser(); 16 17 // toggle-class 18 19 $container_id = celerity_generate_unique_node_id(); 20 $button_red_id = celerity_generate_unique_node_id(); 21 $button_blue_id = celerity_generate_unique_node_id(); 22 23 $button_red = javelin_tag( 24 'a', 25 array( 26 'class' => 'button', 27 'sigil' => 'jx-toggle-class', 28 'href' => '#', 29 'id' => $button_red_id, 30 'meta' => array( 31 'map' => array( 32 $container_id => 'jxui-red-border', 33 $button_red_id => 'jxui-active', 34 ), 35 ), 36 ), 37 'Toggle Red Border'); 38 39 $button_blue = javelin_tag( 40 'a', 41 array( 42 'class' => 'button jxui-active', 43 'sigil' => 'jx-toggle-class', 44 'href' => '#', 45 'id' => $button_blue_id, 46 'meta' => array( 47 'state' => true, 48 'map' => array( 49 $container_id => 'jxui-blue-background', 50 $button_blue_id => 'jxui-active', 51 ), 52 ), 53 ), 54 'Toggle Blue Background'); 55 56 $div = phutil_tag( 57 'div', 58 array( 59 'id' => $container_id, 60 'class' => 'jxui-example-container jxui-blue-background', 61 ), 62 array($button_red, $button_blue)); 63 64 return array($div); 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |