Changes

m
asecchau deshou nai chaudeshou
Line 1: Line 1:  
(function($){
 
(function($){
 
"use strict";
 
"use strict";
console.log("Fleet Reporting v0.10");
+
console.log("Fleet Reporting v0.11");
 
 
 
var routes = {};
 
var routes = {};
Line 9: Line 9:  
var thisFleet = [];
 
var thisFleet = [];
 
var fleetIndexer = "";
 
var fleetIndexer = "";
 +
var CompilationString = "";
 
 
 
$(document).ready(function(){
 
$(document).ready(function(){
Line 25: Line 26:  
routes[thisRoute][fleetIndexer]++;
 
routes[thisRoute][fleetIndexer]++;
 
});
 
});
 +
 +
CompilationString = "";
 
for(routeName in routes){
 
for(routeName in routes){
$(".FleetCompilation").append("<div style='margin:0px 10px 10px; background:#fff; border:1px solid #ccc;'>");
+
CompilationString += "<div style='margin:0px 10px 10px; background:#fff; border:1px solid #ccc;'>";
$(".FleetCompilation").append("<div style='padding:5px 10px;'>");
+
CompilationString += "<div style='padding:5px 10px;'>";
$(".FleetCompilation").append("<div style='font-size:16px; font-weight:bold;'>"+routeName+"</div>");
+
CompilationString += "<div style='font-size:16px; font-weight:bold;'>"+routeName+"</div>";
 
for(compoName in routes[routeName]){
 
for(compoName in routes[routeName]){
$(".FleetCompilation").append("<div style='margin:0px 0px 5px 0px;'>");
+
CompilationString += "<div style='margin:0px 0px 5px 0px;'><div style='width:200px; font-size:14px; font-weight:bold; float:left;'>"+compoName+"</div><div style='width:200px; height:16px; border:1px solid #000; background:#444; float:left; margin:0px 10px 0px 0px;'><div style='width:"+routes[routeName][compoName]+"px; height:16px; background:#0f0;'></div></div><div style='width:100px; float:left; font-weight:bold;'>"+routes[routeName][compoName]+"</div><div style='clear:both;'></div></div>";
$(".FleetCompilation").append("<div style='width:200px; font-size:14px; font-weight:bold; float:left;'>"+compoName+"</div>");
  −
  −
$(".FleetCompilation").append("<div style='width:200px; height:16px; border:1px solid #000; background:#444; float:left;'><div style='width:"+routes[routeName][compoName]+"px; height:16px; background:#0f0;'></div></div>");
  −
  −
$(".FleetCompilation").append("<div style='width:100px; float:left; font-weight:bold;'>"+routes[routeName][compoName]+"</div>");
  −
  −
$(".FleetCompilation").append("<div style='clear:both;'></div>");
  −
$(".FleetCompilation").append("</div>");
   
}
 
}
$(".FleetCompilation").append("</div></div>");
+
CompilationString += "</div></div>";
 
}
 
}
 +
$(".FleetCompilation").append(CompilationString);
 
console.log(routes);
 
console.log(routes);
 
}
 
}
15

edits