Testing maybe final logic of this
This commit is contained in:
@@ -227,7 +227,7 @@ namespace Swarmops.Frontend.Socket
|
||||
{
|
||||
JObject malfunctionObject = new JObject();
|
||||
malfunctionObject["Id"] = "Mal" + loop.ToString();
|
||||
malfunctionObject["Text"] = malfunctionStrings[loop];
|
||||
malfunctionObject["Text"] = malfunctionStrings[loop] + " (Test code, ignore)";
|
||||
malfunctionsArray.Add(malfunctionObject);
|
||||
}
|
||||
|
||||
|
||||
+15
-13
@@ -99,21 +99,23 @@ function updateListBox(box, listData) {
|
||||
var listContainer = $(box).parent().parent();
|
||||
var listElements = $(box).children();
|
||||
|
||||
listElements.each(function(index) {
|
||||
console.log($(this));
|
||||
var elementId = $(this).attr("rel");
|
||||
console.log(elementId);
|
||||
if (listElements.length > 0) {
|
||||
listElements.children().each(function(index) {
|
||||
console.log($(this));
|
||||
var elementId = $(this).attr("rel");
|
||||
console.log(elementId);
|
||||
|
||||
if (typeof idListLookup[elementId] != 'undefined') {
|
||||
// displayed item is present in supplied list
|
||||
// TODO: update text
|
||||
} else {
|
||||
// displayed item is NOT present in supplied list, and should be removed
|
||||
$(this).slideUp(400, function() { $(this).remove(); });
|
||||
}
|
||||
});
|
||||
if (typeof idListLookup[elementId] != 'undefined') {
|
||||
// displayed item is present in supplied list
|
||||
// TODO: update text
|
||||
} else {
|
||||
// displayed item is NOT present in supplied list, and should be removed
|
||||
$(this).slideUp(400, function() { $(this).remove(); });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Step 3: Iterate through list, add missing items
|
||||
// Step 3: Iterate through list, add missing items
|
||||
|
||||
if (listElements.length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user