1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 23:00:57 +00:00

Merge branch '6.0'

Conflicts:
	seahub/api2/endpoints/file.py
	seahub/urls.py
	static/scripts/app/views/share.js
This commit is contained in:
zhengxie
2017-04-17 16:21:22 +08:00
56 changed files with 821 additions and 308 deletions

View File

@@ -583,6 +583,11 @@ define([
return false;
};
if (dirent_name.indexOf('/') != -1) {
Common.showFormError(form_id, gettext("Name should not include '/'."));
return false;
}
var post_data = { 'operation': 'mkdir' },
post_url = Common.getUrl({name: "new_dir", repo_id: dir.repo_id})
+ '?p=' + encodeURIComponent(Common.pathJoin([dir.path, dirent_name]));
@@ -639,6 +644,11 @@ define([
return false;
};
if (dirent_name.indexOf('/') != -1) {
Common.showFormError(form_id, gettext("Name should not include '/'."));
return false;
}
// if it has an extension, make sure it has a name
if (dirent_name.lastIndexOf('.') != -1 && dirent_name.substr(0, dirent_name.lastIndexOf('.')).length == 0) {
Common.showFormError(form_id, gettext("Only an extension there, please input a name."));