-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecision_analysis_animated.zip
More file actions
95 lines (83 loc) · 2.47 KB
/
decision_analysis_animated.zip
File metadata and controls
95 lines (83 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
PK ���Z�>.,* * decision_analysis_animated.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Decision Analysis Assistant with Animations</title>
<style>
.fade-in {
animation: fadeIn 0.6s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.highlight-change {
animation: highlightChange 1s ease-in-out;
}
@keyframes highlightChange {
0% { background-color: #ffffcc; }
100% { background-color: transparent; }
}
.sortable-ghost {
opacity: 0.4;
}
.sortable-chosen {
background: #e0f7fa;
transition: background 0.3s ease;
}
.sortable-drag {
transform: scale(1.05);
transition: transform 0.2s ease;
}
input[type="range"] {
transition: background 0.3s ease;
}
input[type="range"]:hover {
background: #d0ebff;
}
</style>
</head>
<body class="fade-in">
<h2>Decision Analysis Assistant</h2>
<p>This is a placeholder for the enhanced UI with animations.</p>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
const tbody = document.querySelector("#objectivesTable tbody");
if (tbody) {
Sortable.create(tbody, {
animation: 150,
onEnd: function () {
updateObjectiveWeights();
}
});
}
function updateObjectiveWeights() {
const rows = document.querySelectorAll("#objectivesTable tbody tr");
rows.forEach((row, index) => {
const weightInput = row.querySelector("input[type='range']");
if (index === 0) {
weightInput.value = 10;
weightInput.disabled = true;
} else {
if (weightInput.disabled) weightInput.disabled = false;
if (weightInput.value >= 10) weightInput.value = 9;
}
});
calculateScores();
}
document.querySelectorAll("#scoresSection").forEach(section => {
section.addEventListener("input", function (e) {
if (e.target.tagName === "INPUT" && e.target.type === "number") {
e.target.classList.add("highlight-change");
setTimeout(() => e.target.classList.remove("highlight-change"), 1000);
calculateScores();
}
});
});
});
</script>
</body>
</html>
PK ���Z�>.,* * �� decision_analysis_animated.htmlPK M g