v30495092 fix attribute href
This commit is contained in:
@@ -1465,26 +1465,34 @@ class AutomaticDispose {
|
||||
CollectInvolvedVehicles() {
|
||||
let self = this;
|
||||
$("#mission_vehicle_driving tbody").find("tr").each(function (_, elem) {
|
||||
var VehicleID = $(elem).find("a").first().attr("href").substr($(elem).find("a").first().attr("href").lastIndexOf("/") + 1);
|
||||
var VehicleName = $(elem).find("a").first().text();
|
||||
var VehicleType = $(elem).find("a").first().attr("vehicle_type_id");
|
||||
var f = $(elem).find("a").first()
|
||||
var attr = f.attr("href")
|
||||
if (typeof attr !== 'undefined' && attr !== false) {
|
||||
var VehicleID = f.attr("href").substr(f.attr("href").lastIndexOf("/") + 1);
|
||||
var VehicleName = f.text();
|
||||
var VehicleType = f.attr("vehicle_type_id");
|
||||
|
||||
self.Vehicles[VehicleID] = {
|
||||
"id": VehicleID,
|
||||
"name": VehicleName,
|
||||
"type": VehicleType
|
||||
self.Vehicles[VehicleID] = {
|
||||
"id": VehicleID,
|
||||
"name": VehicleName,
|
||||
"type": VehicleType
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#mission_vehicle_at_mission tbody").find("tr").each(function (_, elem) {
|
||||
var VehicleID = $(elem).find("a").first().attr("href").substr($(elem).find("a").first().attr("href").lastIndexOf("/") + 1);
|
||||
var VehicleName = $(elem).find("a").first().text();
|
||||
var VehicleType = $(elem).find("a").first().attr("vehicle_type_id");
|
||||
var f = $(elem).find("a").first()
|
||||
var attr = f.attr("href")
|
||||
if (typeof attr !== 'undefined' && attr !== false) {
|
||||
var VehicleID = f.attr("href").substr(f.attr("href").lastIndexOf("/") + 1);
|
||||
var VehicleName = f.text();
|
||||
var VehicleType = f.attr("vehicle_type_id");
|
||||
|
||||
self.Vehicles[VehicleID] = {
|
||||
"id": VehicleID,
|
||||
"name": VehicleName,
|
||||
"type": VehicleType
|
||||
self.Vehicles[VehicleID] = {
|
||||
"id": VehicleID,
|
||||
"name": VehicleName,
|
||||
"type": VehicleType
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user