Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Jonathan Frederic
- Thu, 16 Jan 2014 10:55:58
Show More
IPython/html/widgets/string/__init__.py
0
created
644
+1
0
IPython/html/widgets/string/model.js
0
created
644
+2
0
IPython/html/widgets/string/view_textarea.js
0
created
644
+35
0
@@
-0,0
+1,35
b''
1
var TextareaView = IPython . WidgetView . extend ({
2
3
// Called when view is rendered.
4
render : function (){
5
this . $el
6
. html ( '' )
7
. addClass ( this . model . comm . comm_id );
8
this . $textbox = $ ( '<textarea />' )
9
. attr ( 'rows' , 5 )
10
. appendTo ( this . $el );
11
this . update (); // Set defaults.
12
},
13
14
// Handles: Backend -> Frontend Sync
15
// Frontent -> Frontend Sync
16
update : function (){
17
if ( ! this . user_invoked_update ) {
18
this . $textbox . val ( this . model . get ( 'value' ));
19
}
20
},
21
22
events : { "keyup textarea" : "handleChanging" ,
23
"paste textarea" : "handleChanging" ,
24
"cut textarea" : "handleChanging" },
25
26
// Handles and validates user input.
27
handleChanging : function ( e ) {
28
this . user_invoked_update = true ;
29
this . model . set ( 'value' , e . target . value );
30
this . model . apply ( this );
31
this . user_invoked_update = false ;
32
},
33
});
34
35
IPython . notebook . widget_manager . register_widget_view ( 'TextareaView' , TextareaView );
IPython/html/widgets/string/view_textbox.js
0
created
644
+35
0
@@
-0,0
+1,35
b''
1
var TextboxView = IPython . WidgetView . extend ({
2
3
// Called when view is rendered.
4
render : function (){
5
this . $el
6
. html ( '' )
7
. addClass ( this . model . comm . comm_id );
8
this . $textbox = $ ( '<input type="text" />' )
9
. addClass ( 'input' )
10
. appendTo ( this . $el );
11
this . update (); // Set defaults.
12
},
13
14
// Handles: Backend -> Frontend Sync
15
// Frontent -> Frontend Sync
16
update : function (){
17
if ( ! this . user_invoked_update ) {
18
this . $textbox . val ( this . model . get ( 'value' ));
19
}
20
},
21
22
events : { "keyup input" : "handleChanging" ,
23
"paste input" : "handleChanging" ,
24
"cut input" : "handleChanging" },
25
26
// Handles and validates user input.
27
handleChanging : function ( e ) {
28
this . user_invoked_update = true ;
29
this . model . set ( 'value' , e . target . value );
30
this . model . apply ( this );
31
this . user_invoked_update = false ;
32
},
33
});
34
35
IPython . notebook . widget_manager . register_widget_view ( 'TextboxView' , TextboxView );
IPython/html/widgets/string/widget.py
0
created
644
+14
0
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages