diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-03 12:57:58 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-03 12:57:58 +0000 |
commit | 0e877c081ff80292e1e1e6bca42a458f38deae4e (patch) | |
tree | 51b3e92241cb41fb390af1fbab3d79d02108a952 /app/assets/javascripts | |
parent | 1799ee49ceef4dd2f9051c0e4d4e5c85643316f2 (diff) | |
download | redmine-0e877c081ff80292e1e1e6bca42a458f38deae4e.tar.gz redmine-0e877c081ff80292e1e1e6bca42a458f38deae4e.zip |
Fixes duplicate spacer id in jsToolBar (#38915).
Patch by Yasu Saku (user:skys).
git-svn-id: https://svn.redmine.org/redmine/trunk@23192 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/jstoolbar/jstoolbar.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/jstoolbar/jstoolbar.js b/app/assets/javascripts/jstoolbar/jstoolbar.js index 3353a7581..bae625c3b 100644 --- a/app/assets/javascripts/jstoolbar/jstoolbar.js +++ b/app/assets/javascripts/jstoolbar/jstoolbar.js @@ -140,15 +140,14 @@ jsButton.prototype.draw = function() { return button; } -function jsSpace(id) { - this.id = id || null; +function jsSpace(className) { + this.className = className || null; this.width = null; } jsSpace.prototype.draw = function() { var span = document.createElement('span'); - if (this.id) span.id = this.id; span.appendChild(document.createTextNode(String.fromCharCode(160))); - span.className = 'jstSpacer'; + span.className = 'jstSpacer' + (this.className ? ' ' + this.className : ''); if (this.width) span.style.marginRight = this.width+'px'; return span; |