Skip to content
Browse files

added some dummy code to a TabPanel

  • Loading branch information...
1 parent 28d85a7 commit 2082bc170c177d6197f0442062e483e6ee28b2b3 @cristi23 committed Apr 8, 2012
View
23 src/Rainbow/WIDEBundle/Resources/public/js/WIDE/view/IDE.js
@@ -9,6 +9,12 @@ Ext.define('WIDE.view.IDE', {
initComponent:function () {
var me = this;
+ var CodeEditor = Ext.create('Ext.tab.Panel', {
+ activeTab:0,
+ region:'center',
+ split:true
+ });
+
var ProjectExplorer = Ext.create('Ext.tree.Panel', {
width:200,
autoScroll:true,
@@ -23,25 +29,22 @@ Ext.define('WIDE.view.IDE', {
},
listeners:{
itemdblclick:function (view, record, item, index, e, eOpts) {
- if (record.raw.leaf)
- CodeEditor.add({
+ if (record.raw.leaf) {
+ var component = CodeEditor.add({
title:record.raw.text,
- html:'some text goes here',
+ html:'<span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> main(String[] args) {<br/>&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span class="string">"Hello world!"</span>);<br/>}',
closable:true
- }).show();
+ });
+ console.log(component);
+ component.show();
+ }
},
itemcontextmenu:function (view, record, item, index, e, eOpts) {
e.stopEvent();
}
}
});
- var CodeEditor = Ext.create('Ext.tab.Panel', {
- activeTab:0,
- region:'center',
- split:true
- });
-
Ext.applyIf(me, {
items:[
CodeEditor,
View
4 src/Rainbow/WIDEBundle/Resources/views/FrontEnd/index.html.twig
@@ -7,4 +7,8 @@
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{{ asset('bundles/rainbowwide/lib/ext-js/resources/css/ext-all.css')}}"/>
+<style type="text/css">
+ .keyword {color: #00f}
+ .string {color: #f00}
+</style>
{% endblock %}

0 comments on commit 2082bc1

Please sign in to comment.
Something went wrong with that request. Please try again.