|
|
|
@ -156,10 +156,10 @@ var fileFieldCount = 1; |
|
|
|
|
function addFileField() { |
|
|
|
|
fileFieldCount++; |
|
|
|
|
if (fileFieldCount >= 10) return false; |
|
|
|
|
var clone = $('attachment_template').cloneNode(true); |
|
|
|
|
clone.writeAttribute('id', ''); |
|
|
|
|
clone.innerHTML = clone.innerHTML.replace(/\[1\]/g, '['+ fileFieldCount + ']'); |
|
|
|
|
jQuery('#attachments_fields')[0].appendChild(clone); |
|
|
|
|
var clone = jQuery('#attachment_template').clone(true); |
|
|
|
|
clone.removeAttr('id'); |
|
|
|
|
clone.html(clone.html().replace(/\[1\]/g, '['+ fileFieldCount + ']')); |
|
|
|
|
jQuery('#attachments_fields').append(clone); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function randomKey(size) { |
|
|
|
@ -177,7 +177,7 @@ var projectIdentifierDefault; |
|
|
|
|
var projectIdentifierMaxLength; |
|
|
|
|
|
|
|
|
|
function generateProjectIdentifier() { |
|
|
|
|
var identifier = $('project_name').getValue(); // project name |
|
|
|
|
var identifier = jQuery('#project_name').val(); // project name |
|
|
|
|
var diacriticsMap = [ |
|
|
|
|
{'base':'a', 'letters':/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g}, |
|
|
|
|
{'base':'aa','letters':/[\uA733\uA732]/g}, |
|
|
|
@ -300,12 +300,12 @@ jQuery(hideOnLoad); |
|
|
|
|
|
|
|
|
|
function addClickEventToAllErrorMessages() { |
|
|
|
|
jQuery('a.afocus').each(function() { |
|
|
|
|
var target = $(this); |
|
|
|
|
var target = jQuery(this); |
|
|
|
|
target.click(function(evt) { |
|
|
|
|
var field = $(target.readAttribute('href').substr(1)); |
|
|
|
|
var field = jQuery('#' + target.readAttribute('href').substr(1)); |
|
|
|
|
if (field === null) { |
|
|
|
|
// Cut off '_id' (necessary for select boxes) |
|
|
|
|
field = $(target.readAttribute('href').substr(1).concat('_id')); |
|
|
|
|
field = jQuery('#' + target.readAttribute('href').substr(1).concat('_id')); |
|
|
|
|
} |
|
|
|
|
if (field) { |
|
|
|
|
field.down('input, textarea, select').focus(); |
|
|
|
|