Revize d5d86f81
Přidáno uživatelem Pavel Fidranský před téměř 6 roky(ů)
sources/src/main/webapp/js/components/attribute.js | ||
---|---|---|
33 | 33 |
_renderValue() { |
34 | 34 |
switch (this.name) { |
35 | 35 |
case 'URL': |
36 |
return DOM.htmlStringToElement(`<a href="${this.value}" target="_blank">${this.value}</a>`); |
|
36 |
return DOM.h('a', { |
|
37 |
href: this.value, |
|
38 |
target: '_blank', |
|
39 |
innerText: this.value, |
|
40 |
}); |
|
37 | 41 |
case 'Size': |
38 |
return DOM.createTextElement(this._formatValue() + ' B');
|
|
42 |
return DOM.t(this._formatValue() + ' B'); |
|
39 | 43 |
case 'Estimate': |
40 | 44 |
case 'Spent': |
41 |
return DOM.createTextElement(this._formatValue() + ' h');
|
|
45 |
return DOM.t(this._formatValue() + ' h'); |
|
42 | 46 |
case 'Progress': |
43 |
return DOM.createTextElement(this._formatValue() + '%');
|
|
47 |
return DOM.t(this._formatValue() + '%'); |
|
44 | 48 |
default: |
45 |
return DOM.createTextElement(this._formatValue());
|
|
49 |
return DOM.t(this._formatValue()); |
|
46 | 50 |
} |
47 | 51 |
} |
48 | 52 |
|
sources/src/main/webapp/js/components/navbar.js | ||
---|---|---|
180 | 180 |
id: 'move', |
181 | 181 |
checked: 'checked', |
182 | 182 |
}), |
183 |
DOM.createTextElement('move'),
|
|
183 |
DOM.t('move'), |
|
184 | 184 |
DOM.h('img', { |
185 | 185 |
src: 'images/move.png', |
186 | 186 |
alt: 'move', |
... | ... | |
196 | 196 |
value: 'exclude', |
197 | 197 |
id: 'exclude', |
198 | 198 |
}), |
199 |
DOM.createTextElement('exclude'),
|
|
199 |
DOM.t('exclude'), |
|
200 | 200 |
DOM.h('img', { |
201 | 201 |
src: 'images/remove2.png', |
202 | 202 |
alt: 'exclude', |
Také k dispozici: Unified diff
modified Attribute and Navbar to use enhanced DOM JS class