/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ $(".card_taskfloor_viewtasks").each(function () { var card = $(this); $(this).find(".card_title").prepend("Tasks | "); var tasklist = $(this).find(".task-list"); var url = $(this).data("apiurl"); $.post(url, { username: getuser(), password: getAPIKey(), action: "gettasks" }, function (resp) { if (resp.status == "OK") { var tasks = resp.tasks; for (var i = 0; i < tasks.length; i++) { tasklist.append( '
' + '
' + '
' + tasks[i]['title'] + '
' + '
' + '

' + tasks[i]['description'] + '

' + '
'); } } else { showmsg(resp.msg, "danger"); } }, "json").fail(function () { card.css("display", "none"); }); });