Changeset - 7eb8544cefbe
[Not reviewed]
Mads Kiilerich - 11 years ago 2014-07-03 01:03:28
madski@unity3d.com
rhodecode.js: initialize CodeMirror.fromTextArea with autofocus set
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -955,25 +955,26 @@ var fileBrowserListeners = function(curr
 
        });
 
    $node_filter.keyup(function(e){
 
            clearTimeout(filterTimeout);
 
            filterTimeout = setTimeout(updateFilter(e),600);
 
        });
 
};
 

	
 

	
 
var initCodeMirror = function(textarea_id, resetUrl){
 
    var myCodeMirror = CodeMirror.fromTextArea($('#' + textarea_id)[0], {
 
            mode: "null",
 
            lineNumbers: true,
 
            indentUnit: 4
 
            indentUnit: 4,
 
            autofocus: true,
 
        });
 
    $('#reset').click(function(e){
 
            window.location=resetUrl;
 
        });
 

	
 
    $('#file_enable').click(function(){
 
            $('#editor_container').show();
 
            $('#upload_file_container').hide();
 
            $('#filename_container').show();
 
        });
 

	
 
    $('#upload_file_enable').click(function(){
0 comments (0 inline, 0 general)