@@ -120,21 +101,6 @@
}
});
- $('#specify-custom-path').on('click', function(e){
- e.preventDefault();
- $('#specify-custom-path-container').hide();
- $('#remove-custom-path-container').show();
- $('#destination-label').css('margin-top', '13px');
- });
-
- $('#remove-custom-path').on('click', function(e){
- e.preventDefault();
- $('#specify-custom-path-container').show();
- $('#remove-custom-path-container').hide();
- $('#location').val('${c.f_path}');
- $('#destination-label').css('margin-top', '0');
- });
-
var hide_upload = function(){
$('#files_data').show();
$('#upload_file_container').hide();
@@ -146,26 +112,6 @@
hide_upload();
});
- $('#upload_file_enable').on('click', function(e){
- e.preventDefault();
- $('#files_data').hide();
- $('#upload_file_container').show();
- $('#filename_container').hide();
- if (detectIE() && detectIE() <= 9) {
- $('#upload_file_container .file-upload-input label').hide();
- $('#upload_file_container .file-upload-input span').hide();
- $('#upload_file_container .file-upload-input input').show();
- }
- });
-
- $('#upload_file').on('change', function() {
- if (this.files && this.files[0]) {
- $('#filename_upload').val(this.files[0].name);
- }
- });
-
- hide_upload();
-
var renderer = "";
var reset_url = "${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}";
var myCodeMirror = initCodeMirror('editor', reset_url, false);
diff --git a/rhodecode/templates/files/files_browser.mako b/rhodecode/templates/files/files_browser.mako
--- a/rhodecode/templates/files/files_browser.mako
+++ b/rhodecode/templates/files/files_browser.mako
@@ -18,10 +18,10 @@
% if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
diff --git a/rhodecode/templates/files/files_upload.mako b/rhodecode/templates/files/files_upload.mako
new file mode 100644
--- /dev/null
+++ b/rhodecode/templates/files/files_upload.mako
@@ -0,0 +1,190 @@
+<%inherit file="/base/base.mako"/>
+
+<%def name="title()">
+ ${_('%s Files Add') % c.repo_name}
+ %if c.rhodecode_name:
+ · ${h.branding(c.rhodecode_name)}
+ %endif
+%def>
+
+<%def name="menu_bar_nav()">
+ ${self.menu_items(active='repositories')}
+%def>
+
+<%def name="breadcrumbs_links()">
+ ${_('Add new file')} @ ${h.show_id(c.commit)} ${_('Branch')}: ${c.commit.branch}
+%def>
+
+<%def name="menu_bar_subnav()">
+ ${self.repo_menu(active='files')}
+%def>
+
+<%def name="main()">
+
+
+
+ ${self.breadcrumbs()}
+
+
+ ${h.secure_form(h.route_path('repo_files_create_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', enctype="multipart/form-data", class_="form-horizontal", request=request)}
+
+
+
+ ${_('Path')}:
+
+
+
+ ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.f_path, request.GET.get('at'))} /
+
+
+
+
+
+
+
+ ${_('Filename')}:
+
+
+
+
+
+ ${_('Upload file')}:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${_('Commit Message')}:
+
+
+
+
+ ${h.reset('reset',_('Cancel'),class_="btn btn-small")}
+ ${h.submit('commit_btn',_('Commit changes'),class_="btn btn-small btn-success")}
+
+
+ ${h.end_form()}
+
+
+%def>