Skip to content

Commit

Permalink
Fixed issue #1097
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 13, 2022
1 parent 58d56c1 commit 4274dfc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions public_html/javascript/admin.topic.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$(function() {
var topicimg = $('.admin-topic-image'),
topicSelector = document.getElementById('admin-topiceditor-parent_id');
topicSelector = document.getElementById('admin-topiceditor-parent_id'),
i, elms;

topicimg.mouseover(function() {
var
Expand Down Expand Up @@ -42,8 +43,15 @@ $(function() {
elms = document.getElementsByClassName('admin-topiceditor-hidden-element');

for (i = 0; i < elms.length; i++) {
elms[i].style.display = (ev.target.selectedIndex === 0) ? 'none':'';
elms[i].style.display = (ev.target.selectedIndex === 0) ? 'none' : '';
}
});

// When the editor is loaded first time
elms = document.getElementsByClassName('admin-topiceditor-hidden-element');

for (i = 0; i < elms.length; i++) {
elms[i].style.display = (topicSelector.selectedIndex === 0) ? 'none' : '';
}
}
});

0 comments on commit 4274dfc

Please sign in to comment.