svn: /web/doc-editor/trunk/js/ux/ Ext.ux.CodeMirror.js

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sat, 19 Dec 2009 09:36:19 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292316

Log:
Migration ExtJs 3.0

Changed paths:
    U   web/doc-editor/trunk/js/ux/Ext.ux.CodeMirror.js

Modified: web/doc-editor/trunk/js/ux/Ext.ux.CodeMirror.js
===================================================================
--- web/doc-editor/trunk/js/ux/Ext.ux.CodeMirror.js	2009-12-19 08:36:48 UTC (rev 292315)
+++ web/doc-editor/trunk/js/ux/Ext.ux.CodeMirror.js	2009-12-19 09:36:19 UTC (rev 292316)
@@ -1,11 +1,10 @@
-Ext.ux.CodeMirror = Ext.extend(Ext.form.TextArea, {
+Ext.ux.CodeMirror = Ext.extend(Ext.BoxComponent, {

     readOnly: (this.readOnly) ? this.readOnly : false,
     mirror: false,
     width: 'auto',
     height: 'auto',
     value: (this.value) ? this.value : "",
-    hideLabel: true,
     autoResize: true,
     obj: false,
     initialised: false,
@@ -48,7 +47,8 @@
     },

     resize: function() {
-      this.mirror.frame.style.height = this.ownerCt.lastSize.height - 79 +"px";
+      this.mirror.frame.style.height = this.ownerCt.lastSize.height - 85 +"px";
+      this.mirror.frame.style.width  = this.ownerCt.lastSize.width  - 35 +"px";
     },

     onInit: function() {
@@ -74,13 +74,7 @@
     monitorScroll: function(e, obj) {
       obj.fireEvent('cmscroll',e.target.body.scrollTop, this);
     },
-/*
-    monitorKey : function(keyCode, charCode) {
-      // Must handle the onChange Event
-      this.fireEvent('cmchange',keyCode, charCode, this);

-    },
-*/
     afterRender: function() {
      this.mirror = new CodeMirror(CodeMirror.replace(Ext.get(this.id).dom), {
        textWrapping: false,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.