public function start($attributes = array()) { $attributes['toolbar'] = false; $attributes['north'] = false; $attributes['south'] = false; $attributes['west'] = false; parent::start($attributes); }
* create a tools object, which has an item that intanciate the layout selector */ $toolsA = new afExtjsTools(); switch ($layoutType) { case ExtJsPortalStatePeer::TYPE_NORMAL: $toolsA->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,portal', 'source' => "\n\t\tvar layouts=[[100],[50,50],[25,75],[75,25],[33,33,33],[50,25,25],[25,50,25],[25,25,25,25],[40,20,20,20]]; \n\t\tvar menu=new Ext.menu.Menu({items:[\n\t\t\t\t\t\t\t\t\t{text: 'Layout Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tportal.showLayoutSelector(target,'Layout Selector',layouts);\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_tile_horizontal.png' \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Widget Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tportal.showWidgetSelector(target,'Widget Selector');\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_side_boxes.png'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Reset to Default', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tnew Portals().reset(target,portal);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_lightning.png'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t ]});\n\t\tmenu.showAt(e.getXY());"))); break; case ExtJsPortalStatePeer::TYPE_TABBED: /** * newTabPortalWidgets are used for newly created tabs on portal page */ $newTabPortalWidgets = array(array('title' => 'Some widgets', 'widgets' => array('/loganalysis/logSearch', '/appliance_system/editEmail'))); $toolsA->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,panel', 'source' => "\n\t\tvar layouts=[[100],[50,50],[25,75],[75,25],[33,33,33],[50,25,25],[25,50,25],[25,25,25,25],[40,20,20,20]];\n\t\tvar tabpanel=panel.items.items[0];\n\t\tvar menu=new Ext.menu.Menu({items:[\n\t\t\t\t\t\t\t\t\t{text: 'Layout Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\ttabpanel.getActiveTab().items.items[0].showLayoutSelector(target,'Layout Selector for '+tabpanel.getActiveTab().title,layouts);\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_tile_horizontal.png' \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Widget Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\ttabpanel.getActiveTab().items.items[0].showWidgetSelector(target,'Widget Selector for '+tabpanel.getActiveTab().title);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_side_boxes.png'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Add New Tab', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tvar newTabPortalWidgets=" . json_encode($newTabPortalWidgets) . ";\n\t\t\t\t\t\t\t\t\t\t\tnew Portals().createNewTab(target,tabpanel,newTabPortalWidgets);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_add.png'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Remove Tab', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tnew Portals().removeTab(target,tabpanel);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_delete.png'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Change Title', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tnew Portals().changeTitle(target,tabpanel);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_edit.png'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Reset to Default', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tnew Portals().reset(target,tabpanel.getActiveTab().items.items[0]);\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_lightning.png'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t ]});\n\t\tmenu.showAt(e.getXY());"))); break; } $layout = new afExtjsPortalLayout(array('id' => 'center_panel', 'tools' => $toolsA, 'idxml' => $idXml, 'layoutType' => $layoutType)); //$layout->setExtjsVersion(3); $html = '<b>Lorem ipsum dolor sit amet</b>, consectetur adipiscing elit. Ut est neque, feugiat venenatis elementum a, tincidunt non massa. Cras sagittis, augue nec porttitor scelerisque, elit lorem ornare massa, eu euismod odio massa vitae justo. Mauris erat nunc, luctus tincidunt lacinia ac, sagittis id risus. Mauris ut quam nisl. Mauris tortor eros, tincidunt sit amet fringilla lacinia, faucibus vel augue. Sed dolor felis, faucibus nec elementum at, cursus in magna. Nam erat nibh, auctor fermentum convallis id, ornare vitae urna. Ut placerat elementum felis. Donec quis libero mauris, vitae vehicula mauris. Donec sit amet urna id justo tempus aliquam. Duis aliquam gravida dictum. Nullam ac nibh eros. Donec lacinia risus id velit congue sed placerat nibh fringilla. Vivamus condimentum varius lacus et facilisis. Curabitur sed tellus sit amet diam dictum ornare. Donec dui lacus, vehicula sit amet semper a, auctor sed sem. Nam pulvinar iaculis libero sed varius. Quisque volutpat posuere sapien quis condimentum.'; $layout->setTitle('Dashboard'); $tools = new afExtjsTools(); $tools->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,panel', 'source' => "console.log(panel);"))); $tools->addItem(array('id' => 'close', 'handler' => array('parameters' => 'e,target,panel', 'source' => "panel.ownerCt.remove(panel, true);"))); /** * GRID TREE */ /** * USE: * pager = true/false => activate/disable pagination * stateful = true/false => activate/disable state restore from cookies */ $grid = new afExtjsGrid(array('idxml' => 'interface/somegrid', 'autoHeight' => true, 'root_title' => 'Companies', 'tree' => true, 'pager' => false, 'select' => true, 'portal' => true));
<script type="text/javascript" src="http://extra.amcharts.com/public/swfobject.js"></script> <script type="text/javascript"> var so = new SWFObject("http://extra.amcharts.com/public/amline.swf", "amline", "333", "200", "8"); so.addParam("wmode","transparent"); so.addVariable("path", "amline/"); so.addVariable("chart_settings", encodeURIComponent("<settings><font>Tahoma</font><hide_bullets_count>18</hide_bullets_count><background><alpha>90</alpha><border_alpha>10</border_alpha></background><plot_area><margins><left>50</left><right>40</right><bottom>65</bottom></margins></plot_area><grid><x><alpha>10</alpha><approx_count>9</approx_count></x><y_left><alpha>10</alpha></y_left></grid><axes><x><width>1</width><color>0D8ECF</color></x><y_left><width>1</width><color>0D8ECF</color></y_left></axes><indicator><color>0D8ECF</color><x_balloon_text_color>FFFFFF</x_balloon_text_color><line_alpha>50</line_alpha><selection_color>0D8ECF</selection_color><selection_alpha>20</selection_alpha></indicator><zoom_out_button><text_color_hover>FF0F00</text_color_hover></zoom_out_button><help><button><color>FCD202</color><text_color>000000</text_color><text_color_hover>FF0F00</text_color_hover></button><balloon><text><![CDATA[Click on the graph to turn on/off value baloon <br/><br/>Click on legend key to show/hide graph<br/><br/>Mark the area you wish to enlarge]]></text><color>FCD202</color><text_color>000000</text_color></balloon></help><graphs><graph gid='0'><title>Anomaly</title><color>0D8ECF</color><color_hover>FF0F00</color_hover><selected>0</selected></graph><graph gid='1'><title>Smoothed</title><color>B0DE09</color><color_hover>FF0F00</color_hover><line_width>2</line_width><fill_alpha>30</fill_alpha><bullet>round</bullet></graph></graphs><labels><label lid='0'><text><![CDATA[<b>Temperature anomaly</b>]]></text><y>25</y><text_size>13</text_size><align>center</align></label></labels></settings>")); so.addVariable("chart_data", encodeURIComponent("<chart><series><value xid='0'>1850</value><value xid='1'>1851</value><value xid='2'>1852</value><value xid='3'>1853</value><value xid='4'>1854</value><value xid='5'>1855</value><value xid='6'>1856</value><value xid='7'>1857</value><value xid='8'>1858</value></series><graphs><graph gid='0'><value xid='0'>-0.447</value><value xid='1'>-0.292</value><value xid='2'>-0.294</value><value xid='3'>-0.336</value><value xid='4'>-0.308</value><value xid='5'>-0.323</value><value xid='6'>-0.405</value><value xid='7'>-0.502</value><value xid='8'>-0.512</value></graph></graphs></chart>")); </script> <?php $layout = new afExtjsPortalLayout(array('id' => 'center_panel', 'title' => 'Dashboard')); $tools = new afExtjsTools(); $tools->addItem(array('id' => 'gear', 'handler' => array('source' => "Ext.Msg.alert('Message', 'The Settings tool was clicked.');"))); $tools->addItem(array('id' => 'close', 'handler' => array('parameters' => 'e,target,panel', 'source' => "panel.ownerCt.remove(panel, true);"))); $column1 = $layout->startColumn(); $column1->addItem(array('title' => 'Panel 1', 'tools' => $tools, 'html' => '<div id="amchart"></div>')); $layout->addInitMethodSource("so.write('amchart');"); $layout->endColumn($column1); $column2 = $layout->startColumn(); $column2->addItem(array('title' => 'Panel 2', 'tools' => $tools, 'html' => '<div id="amchart2"></div>')); $layout->addInitMethodSource("so.write('amchart2');"); $layout->endColumn($column2); $column3 = $layout->startColumn(); $column3->addItem(array('title' => 'Panel 3', 'tools' => $tools, 'html' => '<div id="amchart3"></div>')); $layout->addInitMethodSource("so.write('amchart3');"); $layout->endColumn($column3); $layout->end();
$portalColumns = $extjsPortalStateObj->getColumns(); $portalColumnsSize = $extjsPortalStateObj->getColumnsSize(); /** * create a tools object, which has an item that intanciate the layout selector */ $toolsA = new afExtjsTools(); $toolsA = new afExtjsTools(); switch ($layoutType) { case ExtJsPortalStatePeer::TYPE_NORMAL: $toolsA->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,portal', 'source' => "\n\t\tvar layouts=[[100],[50,50],[25,75],[75,25],[33,33,33],[50,25,25],[25,50,25],[25,25,25,25],[40,20,20,20]]; \n\t\tvar menu=new Ext.menu.Menu([\n\t\t\t\t\t\t\t\t\t{text: 'Layout Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tportal.showLayoutSelector(target,'Layout Selector',layouts);\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_tile_horizontal.png' \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Widget Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\tportal.showWidgetSelector(target,'Widget Selector');\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_side_boxes.png'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t ]);\n\t\tmenu.showAt(e.getXY());"))); break; case ExtJsPortalStatePeer::TYPE_TABBED: $toolsA->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,panel', 'source' => "\n\t\tvar layouts=[[100],[50,50],[25,75],[75,25],[33,33,33],[50,25,25],[25,50,25],[25,25,25,25],[40,20,20,20]];\n\t\tvar tabpanel=panel.items.items[0];\n\t\tvar menu=new Ext.menu.Menu([\n\t\t\t\t\t\t\t\t\t{text: 'Layout Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\ttabpanel.getActiveTab().items.items[0].showLayoutSelector(target,'Layout Selector for '+tabpanel.getActiveTab().title,layouts);\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_tile_horizontal.png' \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{text: 'Widget Selector', handler:function(){\n\t\t\t\t\t\t\t\t\t\t\ttabpanel.getActiveTab().items.items[0].showWidgetSelector(target,'Widget Selector for '+tabpanel.getActiveTab().title);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},icon: '/images/famfamfam/application_side_boxes.png'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t ]);\n\t\tmenu.showAt(e.getXY());"))); break; } $layout = new afExtjsPortalLayout(array('id' => 'center_panel', 'tools' => $toolsA, 'idxml' => $idXml, 'layoutType' => $layoutType, 'portalLayoutType' => $portalLayoutType, 'portalWidgets' => array(array('title' => 'Some widgets', 'widgets' => array('/loganalysis/logSearch', '/appliance_system/editEmail'))))); $html = '<b>Lorem ipsum dolor sit amet</b>, consectetur adipiscing elit. Ut est neque, feugiat venenatis elementum a, tincidunt non massa. Cras sagittis, augue nec porttitor scelerisque, elit lorem ornare massa, eu euismod odio massa vitae justo. Mauris erat nunc, luctus tincidunt lacinia ac, sagittis id risus. Mauris ut quam nisl. Mauris tortor eros, tincidunt sit amet fringilla lacinia, faucibus vel augue. Sed dolor felis, faucibus nec elementum at, cursus in magna. Nam erat nibh, auctor fermentum convallis id, ornare vitae urna. Ut placerat elementum felis. Donec quis libero mauris, vitae vehicula mauris. Donec sit amet urna id justo tempus aliquam. Duis aliquam gravida dictum. Nullam ac nibh eros. Donec lacinia risus id velit congue sed placerat nibh fringilla. Vivamus condimentum varius lacus et facilisis. Curabitur sed tellus sit amet diam dictum ornare. Donec dui lacus, vehicula sit amet semper a, auctor sed sem. Nam pulvinar iaculis libero sed varius. Quisque volutpat posuere sapien quis condimentum.'; $layout->setTitle('Dashboard'); $tools = new afExtjsTools(); $tools->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,panel', 'source' => "console.log(panel);"))); $tools->addItem(array('id' => 'close', 'handler' => array('parameters' => 'e,target,panel', 'source' => "panel.ownerCt.remove(panel, true);"))); /** * GRID TREE */ /** * USE: * pager = true/false => activate/disable pagination * stateful = true/false => activate/disable state restore from cookies */ $grid = new afExtjsGrid(array('idxml' => 'interface/somegrid', 'autoHeight' => true, 'root_title' => 'Companies', 'tree' => true, 'pager' => false, 'select' => true, 'portal' => true)); $grid->addHelp($html);
<?php $layout = new afExtjsPortalLayout(array('id' => 'center_panel')); $html = '<b>Lorem ipsum dolor sit amet</b>, consectetur adipiscing elit. Ut est neque, feugiat venenatis elementum a, tincidunt non massa. Cras sagittis, augue nec porttitor scelerisque, elit lorem ornare massa, eu euismod odio massa vitae justo. Mauris erat nunc, luctus tincidunt lacinia ac, sagittis id risus. Mauris ut quam nisl. Mauris tortor eros, tincidunt sit amet fringilla lacinia, faucibus vel augue. Sed dolor felis, faucibus nec elementum at, cursus in magna. Nam erat nibh, auctor fermentum convallis id, ornare vitae urna. Ut placerat elementum felis. Donec quis libero mauris, vitae vehicula mauris. Donec sit amet urna id justo tempus aliquam. Duis aliquam gravida dictum. Nullam ac nibh eros. Donec lacinia risus id velit congue sed placerat nibh fringilla. Vivamus condimentum varius lacus et facilisis. Curabitur sed tellus sit amet diam dictum ornare. Donec dui lacus, vehicula sit amet semper a, auctor sed sem. Nam pulvinar iaculis libero sed varius. Quisque volutpat posuere sapien quis condimentum.'; //if(sfContext::getInstance()->getUser()->getProfile()->getWidgetHelpIsEnabled()) //{ $layout->addHelp('<b>help text on top of everything</b>'); //} $layout->setTitle('Dashboard'); $tools = new afExtjsTools(); $tools->addItem(array('id' => 'gear', 'handler' => array('parameters' => 'e,target,panel', 'source' => "console.log(panel);"))); $tools->addItem(array('id' => 'close', 'handler' => array('parameters' => 'e,target,panel', 'source' => "panel.ownerCt.remove(panel, true);"))); $column1 = $layout->startColumn(array('columnWidth' => '0.98')); /** * A GRID IN THE COLUMN */ $grid = new afExtjsGrid(array('autoHeight' => true, 'clearGrouping' => false, 'title' => 'Grid', 'tools' => $tools)); /** * columns */ $grid->addColumn(array('name' => 'company', 'label' => 'Company', 'sort' => 'ASC', 'id' => true, 'width' => 40, 'sortable' => true)); $grid->addColumn(array('name' => 'industry', 'label' => 'Industry', 'groupField' => true, 'width' => 20, 'sortable' => true)); /** * proxy */ $grid->setProxy(array('url' => '/interface/jsonactions', 'limit' => 3)); /** * row actions */ $actions = $grid->startRowActions(); /**