Skip to content

Commit

Permalink
Merge branch 'master' into release_prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
cairijun committed Oct 21, 2014
2 parents 542eb7e + 15401a0 commit 3a9ddcf
Show file tree
Hide file tree
Showing 14 changed files with 348 additions and 362 deletions.
8 changes: 3 additions & 5 deletions server/static/css/simulation.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ body {
}

#Static {
width: 90%;
width: 1100px;
top: 12%;
left: 1%;
z-index: 2;
Expand Down Expand Up @@ -257,7 +257,7 @@ body {
.static_box {
float: left;
width: 450px;
margin: 0 3% 0 3%;
margin: 0 20px 0 20px;
}

.search.icon {
Expand Down Expand Up @@ -345,10 +345,10 @@ body {
#static_adjust_box h3,
#dynamic_adjust_box h3 {
margin: 10px;
text-align: center;
}

.input_range {
margin-top:100px;
height: 20px;
position: relative;
}
Expand All @@ -367,13 +367,11 @@ output {
background-image: -o-linear-gradient(top, #444444, #999999);
background-image: -webkit-gradient(linear, left top, left bottom, from(#444444), to(#999999));
background-image: -webkit-linear-gradient(top, #444444, #999999);
width: 40px;
height: 30px;
text-align: center;
color: white;
border-radius: 10px;
display: none;
font: bold 15px/30px Georgia;
bottom: 180%;
left: 0;
margin-left: -1%;
Expand Down
13 changes: 7 additions & 6 deletions server/static/js/circuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1063,13 +1063,13 @@ Recommend.prototype.nextstep = function() {
this.currentstep.addClass("active");
if (this.index < this.data.length) {
for (var i = 0; i < this.data[this.index].length; ++i) {
var newlogic = new Logicitem(this.data[this.index][i], this);
var newlogic = new Logicitem(this.data[this.index][i], i, this);
this.logiclist.append(newlogic.view);
}
} else {
for (var i = 0; i < this.result.length; ++i) {
var newlogic = new Logicitem(this.result[i], this);
newlogic.view.unbind("click");
var newlogic = new Logicitem(this.result[i], i, this);
newlogic.view.unbind("click");
this.logiclist.append(newlogic.view);
}
this.confirmbut.show();
Expand All @@ -1086,13 +1086,14 @@ Recommend.prototype.nextstep = function() {
*
* @description item object list in recommend
*/
function Logicitem(data, parent) {
function Logicitem(data, index, parent) {
var that = this;
this.view = logic.clone(true);
this.index = index;
this.data = data;
this.view.find("img")[0].src = "../static/images/frame/" + data.name + ".png";
this.view.find(".label[name='name']").append(data.name);
this.view.find(".right").append("<canvas id='recommendradar" + data.id + "' width='200' height='200'>hello</canvas>");
this.view.find(".right").append("<canvas id='recommendradar" + data.id + this.index + "' width='200' height='200'>hello</canvas>");
var radardata = {
labels: ["Efficiency", "Realiability", "Accessiblity", "Demand", "Specificity"],
datasets: [
Expand All @@ -1109,7 +1110,7 @@ function Logicitem(data, parent) {
]
};
this.view.mouseenter(function() {
window.myRadar = new Chart(document.getElementById("recommendradar" + data.id).getContext("2d")).Radar(radardata, {
window.myRadar = new Chart(document.getElementById("recommendradar" + data.id + that.index).getContext("2d")).Radar(radardata, {
responsive: true,
angleLineColor : "rgba(255,255,255,.5)",
scaleLineColor: "rgba(255,255,255,.5)"
Expand Down
Loading

0 comments on commit 3a9ddcf

Please sign in to comment.