diff --git a/codepot/src/codepot/views/code_folder.php b/codepot/src/codepot/views/code_folder.php index a6a0a41a..28561d64 100644 --- a/codepot/src/codepot/views/code_folder.php +++ b/codepot/src/codepot/views/code_folder.php @@ -180,8 +180,7 @@ function render_readme() } -var new_file_item_no = 0; -var new_dir_item_no = 0; +var new_item_no = 0; function get_new_item_html(no, type, name) { @@ -192,25 +191,27 @@ $(function () { - new_file_item_no = 0; - new_dir_item_no = 0; - $('#code_folder_mainarea_new_file_form_item_list').append (get_new_item_html(new_file_item_no, 'file', 'file')); - $('#code_folder_mainarea_new_dir_form_item_list').append (get_new_item_html(new_dir_item_no, 'text', 'dir')); + new_item_no = 0; + $('#code_folder_mainarea_new_file_form_item_list').append (get_new_item_html(new_item_no, 'file', 'file')); + $('#code_folder_mainarea_new_dir_form_item_list').append (get_new_item_html(new_item_no, 'text', 'dir')); - $("#code_folder_mainarea_new_file_form_div").dialog ( + $("#code_folder_mainarea_new_form_tabs").tabs (); + + $("#code_folder_mainarea_new_form_div").dialog ( { - title: 'lang->line('File');?>', + title: 'lang->line('New');?>', resizable: true, autoOpen: false, modal: true, buttons: { 'More': function () { - ++new_file_item_no; - $('#code_folder_mainarea_new_file_form_item_list').append (get_new_item_html(new_file_item_no, 'file', 'file')); + ++new_item_no; + $('#code_folder_mainarea_new_file_form_item_list').append (get_new_item_html(new_item_no, 'file', 'file')); + $('#code_folder_mainarea_new_dir_form_item_list').append (get_new_item_html(new_item_no, 'text', 'dir')); }, 'lang->line('OK')?>': function () { - $('#code_folder_mainarea_new_file_item_count').val (new_file_item_no + 1); - $('#code_folder_mainarea_new_file_form').submit(); + $('#code_folder_mainarea_new_item_count').val (new_item_no + 1); + $('#code_folder_mainarea_new_form').submit(); $(this).dialog('close'); }, 'lang->line('Cancel')?>': function () { @@ -222,37 +223,10 @@ $(function () { } ); - $("#code_folder_mainarea_new_dir_form_div").dialog ( - { - title: 'lang->line('Directory');?>', - resizable: true, - autoOpen: false, - modal: true, - buttons: { - 'More': function () { - ++new_dir_item_no; - $('#code_folder_mainarea_new_dir_form_item_list').append (get_new_item_html(new_dir_item_no, 'text', 'dir')); - }, - 'lang->line('OK')?>': function () { - $('#code_folder_mainarea_new_dir_item_count').val (new_dir_item_no + 1); - $('#code_folder_mainarea_new_dir_form').submit(); - $(this).dialog('close'); - }, - 'lang->line('Cancel')?>': function () { - $(this).dialog('close'); - } - - }, - clsoe: function() {} - } - ); - - $("#code_folder_mainarea_new_file_button").button().click (function() { - $("#code_folder_mainarea_new_file_form_div").dialog('open'); - }); - $("#code_folder_mainarea_new_dir_button").button().click (function() { - $("#code_folder_mainarea_new_dir_form_div").dialog('open'); + $("#code_folder_mainarea_new_button").button().click (function() { + $("#code_folder_mainarea_new_form_div").dialog('open'); }); + 0): ?> @@ -547,8 +521,7 @@ $this->load->view ( if (isset($login['id']) && $login['id'] != '') { - printf ('%s', $this->lang->line('New file')); - printf ('%s', $this->lang->line('New directory')); + printf ('%s', $this->lang->line('New')); } if ($file_count > 0) @@ -780,35 +753,37 @@ $this->load->view ( -
+ +
'code_folder_mainarea_new_file_form'); - // this posts to the head revision regardless of the revision being shown - print form_open_multipart("code/file/{$project->id}/".$this->converter->AsciiToHex($headpath), $attrs); + $attrs = array ('id' => 'code_folder_mainarea_new_form'); + // this form posts to the head revision regardless of the revision being shown currently + print form_open_multipart("code/file/{$project->id}/".$this->converter->AsciiToHex($headpath), $attrs); ?> - + +
lang->line('Message'); ?>:
-
lang->line('Unzip a zip file'); ?>
-
    + +
    + +
    +
    lang->line('Unzip a zip file'); ?>
    +
      +
      +
      +
        +
        +
        +
        -
        - 'code_folder_mainarea_new_dir_form'); - // this posts to the head revision regardless of the revision being shown - print form_open_multipart("code/file/{$project->id}/".$this->converter->AsciiToHex($headpath), $attrs); - ?> - -
        lang->line('Message'); ?>:
        -
        -
          - -
          -