Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/010.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  d3Extjs  >  demos/010.php  >  Download  
File: demos/010.php
Role: Example script
Content type: text/plain
Description: working example
Class: d3Extjs
Generate JavaScript code to access ExtJS library
Author: By
Last change:
Date: 2013-01-18 09:05
Size: 2,372 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>ExtJS Layout Examples</title>
  <link rel="stylesheet" type="text/css" href="http://docs.sencha.com/ext-js/4-1/resources/css/app-b0e40cf7e8fb751f924fb29f733d5bae.css" />
  <script type="text/javascript" src="http://docs.sencha.com/ext-js/4-1/extjs/ext-all.js"></script>
  <script type="text/javascript">
<?php 


include_once '../d3.classes.inc.php';
include_once 
'../extjs.class.inc.php';

/*
  
var containerPanel = Ext.create('Ext.panel.Panel', {
    renderTo: Ext.getBody(),
    width: 400,
    height: 200,
    title: 'Container Panel',
    layout: 'column',
    suspendLayout: true // Suspend automatic layouts while we do several different things that could trigger a layout on their own
});
// Add a couple of child items.  We could add these both at the same time by passing an array to add(),
// but lets pretend we needed to add them separately for some reason.
containerPanel.add({
    xtype: 'panel',
    title: 'Child Panel 1',
    height: 100,
    columnWidth: 0.5
});
containerPanel.add({
    xtype: 'panel',
    title: 'Child Panel 2',
    height: 100,
    columnWidth: 0.5
});
// Turn the suspendLayout flag off.
containerPanel.suspendLayout = false;
// Trigger a layout.
containerPanel.doLayout();
 
 */

ext()->create('Ext.panel.Panel'o3(array(
  
"renderTo" => ext()->getBody(),
  
"width" => 400"height" => 200,
  
"title" => "Container Panel",
  
"layout" => "column",
  
"suspendLayout" => true
)))  ->createVar("containerPanel")
    ->
toStack("panel");

stack()->panel->get()->add(o3(array(
  
"xtype" => "panel""title" => "child panel 1""height" => 100"columnWidth" => 0.5
)))->colon()->toStack();
stack()->line();
stack()->panel->get()->add(o3(array(
  
"xtype" => "panel""title" => "child panel 2""height" => 100"columnWidth" => 0.5
)))->colon()->toStack();
stack()->line();

stack()->panel->get()->suspendLayout(extjs::property)->assignValue(false)->toStack(null,true);
stack()->line();

stack()->panel->get()->doLayout()->colon()->toStack();
stack()->line();

echo 
ext()->onReady(f3()->add(stack()))->colon()->toStack();


?>

  </script>
</head>
<body>
</body>
</html>