Skip to content

Commit 6d1d893

Browse files
author
limad
committed
merge: resolve conflicts with upstream/develop (PR #3318 bugfixes)
- dashboard.js: keep const (refactor) + querySelector fix (Lot 1 #3318) - plan.js: keep const (refactor) + data-sixe_y fix (Lot 1 #3318)
2 parents 4e97fbd + 9efd15d commit 6d1d893

8 files changed

Lines changed: 23 additions & 21 deletions

File tree

desktop/js/administration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ document.getElementById('in_searchConfig').addEventListener('keyup', function(ev
484484

485485
//place back found els with unique span id to place them back to right place. Avoid cloning els to not break saveConfig().
486486
document.querySelectorAll('span[searchId]').forEach(_span => {
487-
el = document.querySelector('#searchResult [searchId="' + _span.getAttribute('searchId') + '"]')
487+
const el = document.querySelector('#searchResult [searchId="' + _span.getAttribute('searchId') + '"]')
488488
if (el != null) {
489489
el.removeAttribute('searchId')
490490
_span.replaceWith(el)

desktop/js/dashboard.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ if (!jeeFrontEnd.dashboard) {
265265
for (let i = 0; i < nbEqs; i++) {
266266
if (self.summaryObjEqs[self._object_id].includes(data[i].id)) {
267267
nbEqs--
268-
return
268+
continue
269269
}
270270
self.summaryObjEqs[self._object_id].push(data[i].id)
271271

@@ -345,12 +345,13 @@ if (!jeeFrontEnd.dashboard) {
345345
//synch category filter:
346346
if (self.url_category != 'all') {
347347
const cat = self.url_category.charAt(0).toUpperCase() + self.url_category.slice(1)
348-
document.getElementById('dashTopBar button.dropdown-toggle').addClass('warning')
348+
document.querySelector('#dashTopBar button.dropdown-toggle').addClass('warning')
349349
document.querySelectorAll('#categoryfilter .catFilterKey').forEach(function(element) {
350350
element.checked = false
351351
})
352-
document.querySelector('#categoryfilter .catFilterKey[data-key="' + cat + '"]').checked = true
353-
this.filterByCategory()
352+
const catEl = document.querySelector('#categoryfilter .catFilterKey[data-key="' + cat + '"]')
353+
if (catEl) catEl.checked = true
354+
self.filterByCategory()
354355
}
355356

356357
domUtils.hideLoading()
@@ -458,7 +459,7 @@ document.getElementById('in_searchDashboard')?.addEventListener('keyup', functio
458459
})
459460
document.getElementById('bt_resetDashboardSearch')?.addEventListener('click', function(event) {
460461
if (jeedomUI.isEditing) return
461-
document.querySelectorAll('#categoryfilter li .catFilterKey').forEach(cat => { cat.checkd = true})
462+
document.querySelectorAll('#categoryfilter li .catFilterKey').forEach(cat => { cat.checked = true})
462463
document.querySelectorAll('#dashTopBar button.dropdown-toggle').removeClass('warning')
463464
document.getElementById('in_searchDashboard').jeeValue('').triggerEvent('keyup')
464465
})

desktop/js/eqAnalyse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if (!jeeFrontEnd.eqAnalyse) {
7575

7676
removed = jeeFrontEnd.eqAnalyse.getRemoveCmd(data[i].cmd[j].who.replaceAll('#', ''))
7777
if (removed) {
78-
tr += ' <span class="lebel label-sm label-info">' + removed.name + '</span>'
78+
tr += ' <span class="label label-sm label-info">' + removed.name + '</span>'
7979
tr += ' {{Supprimée le}} ' + removed.date
8080
}
8181

desktop/js/object.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ if (!jeeFrontEnd.object) {
102102
var objectBkgdColor = bodyStyles.getPropertyValue('--objectBkgd-color')
103103
var objectTxtColor = bodyStyles.getPropertyValue('--objectTxt-color')
104104

105-
if (!objectBkgdColor === undefined) {
105+
if (objectBkgdColor !== '' && objectBkgdColor != null) {
106106
objectBkgdColor = jeedomUtils.rgbToHex(objectBkgdColor)
107107
} else {
108108
objectBkgdColor = '#696969'
109109
}
110-
if (!objectTxtColor === undefined) {
110+
if (objectTxtColor !== '' && objectTxtColor != null) {
111111
objectTxtColor = jeedomUtils.rgbToHex(objectTxtColor)
112112
} else {
113113
objectTxtColor = '#ebebeb'
@@ -1000,7 +1000,7 @@ document.getElementById('div_conf').addEventListener('click', function(event) {
10001000
}
10011001

10021002
if (_target = event.target.closest('.bt_removeSummary')) {
1003-
var cmd = _target.closest('.summary').querySelector('input[data-l1key="cmd"]').values
1003+
var cmd = _target.closest('.summary').querySelector('input[data-l1key="cmd"]').value
10041004
var type = _target.closest('.div_summary').dataset.type
10051005
_target.closest('.summary').remove()
10061006
jeeP.updateSummaryTabNbr(type)

desktop/js/plan.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ if (!jeeFrontEnd.plan) {
193193
const img = document.querySelector('.div_displayObject img')
194194
if (img != null) {
195195
const style = {
196-
height: img.getAttribute('data-sixe_x') + 'px',
196+
height: img.getAttribute('data-sixe_y') + 'px',
197197
width: img.getAttribute('data-sixe_x') + 'px'
198198
}
199199
Object.assign(jeeFrontEnd.plan.planContainer.style, style)

desktop/js/replace.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ document.getElementById('in_searchByName')?.addEventListener('keyup', function(e
377377
} else {
378378
eqName = jeedomUtils.normTextLower(eqLogic.getAttribute('data-name'))
379379
if (eqName.includes(search)) {
380-
eqLogic.unseen()
381-
} else {
382380
eqLogic.seen()
381+
} else {
382+
eqLogic.unseen()
383383
}
384384
}
385385
})

desktop/js/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ if (!jeeFrontEnd.update) {
111111
jeeP.getJeedomLog(_autoUpdate, _log)
112112
}, 1000)
113113
} else {
114-
document.getElementById('bt_' + _log + 'Jeedom .fa-refresh')?.unseen()
114+
document.querySelector('#bt_' + _log + 'Jeedom .fa-refresh')?.unseen()
115115
document.querySelectorAll('.bt_' + _log + 'Jeedom .fa-refresh')?.unseen()
116116
}
117117
}

docs/release-notes.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ no entries
1111
## Fixes
1212
| Merge date | Title | PR |
1313
| --- | --- | --- |
14+
| 2026-05-08 11:44:36 | fix(desktop/js): correct 11 DOM and logic bugs (dashboard, object, plan, replace, eqAnalyse, administration, update) | [#3318](https://github.com/jeedom/core/pull/3318) |
1415
| 2026-05-04 10:02:20 | Fix timeline folder field visibility on scenario page load | [#3305](https://github.com/jeedom/core/pull/3305) |
1516
| 2026-04-25 08:00:07 | Fix: translations string concatenation | [#3289](https://github.com/jeedom/core/pull/3289) |
1617
| 2026-04-21 11:24:20 | fix: prevent a possible SQL injection in archive process | [#3268](https://github.com/jeedom/core/pull/3268) |
@@ -30,9 +31,16 @@ no entries
3031
## Others
3132
| Merge date | Title | PR |
3233
| --- | --- | --- |
34+
| 2026-05-06 15:22:08 | Optimize Jeedom core version retrieval by caching the result | [#3315](https://github.com/jeedom/core/pull/3315) |
35+
| 2026-05-06 10:00:20 | Refactor var to const/let in equipment and commands (2/4) | [#3301](https://github.com/jeedom/core/pull/3301) |
36+
| 2026-05-06 09:19:39 | Refactor var to const/let in admin/system + log search multi-term (4/4) | [#3303](https://github.com/jeedom/core/pull/3303) |
37+
| 2026-05-05 17:04:02 | Refactor var to const/let in core JS utilities (1/4) | [#3300](https://github.com/jeedom/core/pull/3300) |
38+
| 2026-05-05 17:02:29 | Refactor var to const/let in UI rendering files (3/4) | [#3302](https://github.com/jeedom/core/pull/3302) |
39+
| 2026-05-05 14:28:06 | add log in plugin autoloader | [#3276](https://github.com/jeedom/core/pull/3276) |
3340
| 2026-04-25 08:04:11 | Update translations | [#3295](https://github.com/jeedom/core/pull/3295) |
3441
| 2026-04-25 07:30:36 | Update translations | [#3293](https://github.com/jeedom/core/pull/3293) |
3542
| 2026-04-20 11:50:35 | Update translations | [#3285](https://github.com/jeedom/core/pull/3285) |
43+
| 2026-04-13 08:16:53 | feat: improve "do not remove log" feature | [#3245](https://github.com/jeedom/core/pull/3245) |
3644
| 2026-04-08 09:16:23 | chore: Correction *aucun* script | [#3246](https://github.com/jeedom/core/pull/3246) |
3745
| 2026-04-04 07:56:05 | chore: typo Securité | [#3241](https://github.com/jeedom/core/pull/3241) |
3846

@@ -44,12 +52,6 @@ no entries
4452
## Developer
4553
| Merge date | Title | PR |
4654
| --- | --- | --- |
47-
| 2026-05-06 15:22:08 | Optimize Jeedom core version retrieval by caching the result | [#3315](https://github.com/jeedom/core/pull/3315) |
48-
| 2026-05-06 10:00:20 | Refactor var to const/let in equipment and commands (2/4) | [#3301](https://github.com/jeedom/core/pull/3301) |
49-
| 2026-05-06 09:19:39 | Refactor var to const/let in admin/system + log search multi-term (4/4) | [#3303](https://github.com/jeedom/core/pull/3303) |
50-
| 2026-05-05 17:04:02 | Refactor var to const/let in core JS utilities (1/4) | [#3300](https://github.com/jeedom/core/pull/3300) |
51-
| 2026-05-05 17:02:29 | Refactor var to const/let in UI rendering files (3/4) | [#3302](https://github.com/jeedom/core/pull/3302) |
52-
| 2026-05-05 14:28:06 | add log in plugin autoloader | [#3276](https://github.com/jeedom/core/pull/3276) |
5355
| 2026-05-05 10:21:10 | Bump peter-evans/create-pull-request from 5 to 8 | [#3307](https://github.com/jeedom/core/pull/3307) |
5456
| 2026-05-05 10:20:50 | Bump actions/github-script from 7 to 9 | [#3308](https://github.com/jeedom/core/pull/3308) |
5557
| 2026-05-05 10:20:32 | Bump actions/checkout from 2 to 6 | [#3309](https://github.com/jeedom/core/pull/3309) |
@@ -66,6 +68,5 @@ no entries
6668
| 2026-04-17 21:11:17 | new workflow for translations | [#3251](https://github.com/jeedom/core/pull/3251) |
6769
| 2026-04-17 12:26:56 | Fix PHPStan workflow on branch deletion | [#3263](https://github.com/jeedom/core/pull/3263) |
6870
| 2026-04-16 22:32:24 | Use Composer dependency for PHPStan | [#3256](https://github.com/jeedom/core/pull/3256) |
69-
| 2026-04-13 08:16:53 | feat: improve "do not remove log" feature | [#3245](https://github.com/jeedom/core/pull/3245) |
7071
| 2026-04-03 15:27:29 | Update GitHub workflows to use 'develop' branch instead of 'alpha' and 'beta' | [#3240](https://github.com/jeedom/core/pull/3240) |
7172

0 commit comments

Comments
 (0)