Skip to content

Commit

Permalink
fix(wizard): var declaration mandatory
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Jan 20, 2021
1 parent 7c82430 commit 7645f63
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions js/scripts.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function updateKbCategoriesView() {
type: "GET",
dataType: "json"
}).done(function(response) {
html = '<div class="slinky-menu">';
var html = '<div class="slinky-menu">';
html = html + buildKbCategoryList(response);
html = html + '</div>';

Expand Down Expand Up @@ -308,9 +308,9 @@ function (event) {
}

function getFaqItems(categoryId) {
currentCategory = categoryId;
keywords = $('#plugin_formcreator_searchBar input:first').val();
deferred = jQuery.Deferred();
var currentCategory = categoryId;
var keywords = $('#plugin_formcreator_searchBar input:first').val();
var deferred = jQuery.Deferred();
$.ajax({
url: formcreatorRootDoc + '/ajax/knowbaseitem.php',
data: {
Expand Down Expand Up @@ -436,14 +436,13 @@ function () {
}

function buildKbCategoryList(tree) {
var html = '';
if (tree.id != 0) {
html = '<a href="#" data-parent-category-id="' + tree.parent +'"'
html += '<a href="#" data-parent-category-id="' + tree.parent +'"'
+ ' data-category-id="' + tree.id + '"'
+ ' onclick="updateKbitemsView(' + tree.id + ')">'
+ tree.name
+ '</a>';
} else {
html = '';
}
if (Object.keys(tree.subcategories).length == 0) {
return html;
Expand Down

0 comments on commit 7645f63

Please sign in to comment.