@@ -63,11 +63,13 @@ Class.create("CommentsPanel", {
63
63
// Warning, method is called statically, there is no "this"
64
64
loadInfoPanel : function ( container , node ) {
65
65
66
+ console . log ( container , container . down ( "textarea" ) , container . down ( "textarea.comments_textarea" ) ) ;
67
+
66
68
container . down ( "#comments_container" ) ;
67
- container . down ( "textarea" ) . observe ( "focus" , function ( ) {
69
+ container . down ( "textarea.comments_textarea " ) . observe ( "focus" , function ( ) {
68
70
pydio . UI . disableAllKeyBindings ( ) ;
69
71
} ) ;
70
- container . down ( "textarea" ) . observe ( "blur" , function ( ) {
72
+ container . down ( "textarea.comments_textarea " ) . observe ( "blur" , function ( ) {
71
73
pydio . UI . enableAllKeyBindings ( ) ;
72
74
} ) ;
73
75
@@ -120,19 +122,19 @@ Class.create("CommentsPanel", {
120
122
121
123
var submitComment = function ( ) {
122
124
123
- if ( ! container . down ( 'textarea' ) . getValue ( ) ) {
125
+ if ( ! container . down ( 'textarea.comments_textarea ' ) . getValue ( ) ) {
124
126
return ;
125
127
}
126
128
var conn = new Connexion ( ) ;
127
129
conn . setParameters ( {
128
130
file : node . getPath ( ) ,
129
131
get_action : "post_comment" ,
130
- content : container . down ( 'textarea' ) . getValue ( )
132
+ content : container . down ( 'textarea.comments_textarea ' ) . getValue ( )
131
133
} ) ;
132
134
conn . setMethod ( 'POST' ) ;
133
135
conn . onComplete = function ( transport ) {
134
136
CommentsPanel . prototype . commentObjectToDOM ( $H ( transport . responseJSON ) , container , node ) ;
135
- container . down ( 'textarea' ) . setValue ( "" ) ;
137
+ container . down ( 'textarea.comments_textarea ' ) . setValue ( "" ) ;
136
138
CommentsPanel . prototype . refreshScroller ( container ) ;
137
139
$ ( "comments_container" ) . scrollTop = 10000 ;
138
140
} ;
@@ -145,7 +147,7 @@ Class.create("CommentsPanel", {
145
147
submitComment ( ) ;
146
148
} ) ;
147
149
148
- container . down ( 'textarea' ) . observe ( "keydown" , function ( e ) {
150
+ container . down ( 'textarea.comments_textarea ' ) . observe ( "keydown" , function ( e ) {
149
151
if ( e . keyCode == Event . KEY_RETURN && e . ctrlKey ) {
150
152
submitComment ( ) ;
151
153
return false ;
0 commit comments