2014-07-18 17:24:04 +02:00

22 lines
550 B
Plaintext

$("#new_portlet_content_form").html("<%= escape_javascript(render( :partial => "portlet/shared/new")) %>");
$(".block_portlets").sortable("disable");
var first_form_element = $("#new_portlet_content_form input:text:visible:first")
if(first_form_element.length == 0){
first_form_element = $("#new_portlet_content_form .text_editor:first")
//first_form_element.tinymce().focus();
}
if(first_form_element.length == 0){
first_form_element = $("#new_portlet_content_form textarea:first")
}
first_form_element.focus();
uninitialize_block_js();