1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
| /*!
| * Ext JS Library 4.0
| * Copyright(c) 2006-2011 Sencha Inc.
| * licensing@sencha.com
| * http://www.sencha.com/license
| */
|
| Ext.define('MyDesktop.Notepad', {
| extend: 'Ext.ux.desktop.Module',
|
| requires: [
| 'Ext.form.field.HtmlEditor'
| //'Ext.form.field.TextArea'
| ],
|
| id:'notepad',
|
| init : function(){
| this.launcher = {
| text: 'Notepad',
| iconCls:'notepad'
| }
| },
|
| createWindow : function(){
| var desktop = this.app.getDesktop();
| var win = desktop.getWindow('notepad');
| if(!win){
| win = desktop.createWindow({
| id: 'notepad',
| title:'Notepad',
| width:600,
| height:400,
| iconCls: 'notepad',
| animCollapse:false,
| border: false,
| //defaultFocus: 'notepad-editor', EXTJSIV-1300
|
| // IE has a bug where it will keep the iframe's background visible when the window
| // is set to visibility:hidden. Hiding the window via position offsets instead gets
| // around this bug.
| hideMode: 'offsets',
|
| layout: 'fit',
| items: [
| {
| xtype: 'htmleditor',
| //xtype: 'textarea',
| id: 'notepad-editor',
| value: [
| 'Some <b>rich</b> <span style="color: rgb(255, 0, 0)">text</span> goes <u>here</u><br>',
| 'Give it a try!'
| ].join('')
| }
| ]
| });
| }
| return win;
| }
| });
|
|