|
|
@ -505,12 +505,17 @@ $(document).ready(function() { |
|
|
|
$(this).append(input); |
|
|
|
$(this).append(input); |
|
|
|
input.focus(); |
|
|
|
input.focus(); |
|
|
|
input.change(function(){ |
|
|
|
input.change(function(){ |
|
|
|
if(type != 'web' && ($(this).val().indexOf('/')!=-1 || $(this).val().indexOf('\\')!=-1)) { |
|
|
|
if (type != 'web') { |
|
|
|
$('#notification').text(t('files', 'Invalid name, \'/\' or \'\\\' is not allowed.')); |
|
|
|
var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*']; |
|
|
|
$('#notification').fadeIn(); |
|
|
|
for (var i = 0; i < invalid_characters.length; i++) { |
|
|
|
return; |
|
|
|
if ($(this).val().indexOf(invalid_characters[i]) != -1) { |
|
|
|
} |
|
|
|
$('#notification').text(t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.")); |
|
|
|
var name = getUniqueName($(this).val()); |
|
|
|
$('#notification').fadeIn(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var name = getUniqueName($(this).val()); |
|
|
|
if (name != $(this).val()) { |
|
|
|
if (name != $(this).val()) { |
|
|
|
FileList.checkName(name, $(this).val(), true); |
|
|
|
FileList.checkName(name, $(this).val(), true); |
|
|
|
var hidden = true; |
|
|
|
var hidden = true; |
|
|
|