replace prototype leftovers

pull/4834/head
Jens Ulferts 8 years ago
parent 7386123620
commit 6c55b20e80
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 16
      app/assets/javascripts/application.js.erb
  2. 2
      frontend/app/ui_components/expandable-search.js
  3. 2
      lib/redmine/wiki_formatting/textile/helper.rb

@ -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();

@ -60,7 +60,7 @@ module.exports = function(ENTER_KEY) {
// Hide unless icon clicked
if (elem.find(':active,:focus').length === 0) {
setCollapsed(true);
$(elem).off('focusout');
elem.off('focusout');
}
}, 10);
});

@ -45,7 +45,7 @@ module Redmine
title: ::I18n.t('js.inplace.link_formatting_help')
javascript_tag(<<-EOF)
var wikiToolbar = new jsToolBar($('#{field_id}'));
var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}'));
wikiToolbar.setHelpLink(jQuery('#{escape_javascript help_button}')[0]);
// initialize the toolbar later, so that i18n-js has a chance to set the translations
// for the wiki-buttons first.

Loading…
Cancel
Save