Skip to content

Commit

Permalink
Updated skeletonfiles for future
Browse files Browse the repository at this point in the history
  • Loading branch information
anistuhin committed Nov 12, 2024
1 parent 8ef33cb commit d9c6b07
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 39 deletions.
76 changes: 38 additions & 38 deletions assets/main-working.js
Original file line number Diff line number Diff line change
Expand Up @@ -1747,44 +1747,44 @@
}
});
}
})(window.jQuery);

// flori: adds custom comment dropdown to all custom comments
function addCustomDropdown() {
$('li[data-type="0"]>div[class="comment-container"]').each(function() {
var $this = $(this);
if (!$this.hasClass("has-dropdown")) {
$this.addClass("has-dropdown");
$this.prepend(
'<div class="custom-comment-title" data-type="0"><p>Custom Comment</p><ul><li data-type="0" class="active">Custom Comment</li><li data-type="1" data-group="student-summary">Summary</li><li data-type="2" data-group="vocab-support" >Vocabulary Support</li><li data-type="3" data-group="personal-connection" >Personal Connection</li><li data-type="4" data-group="emotional-connection" >Emotional Connection</li></ul></div>'
);
}
});
}
// flori: adds custom comment dropdown to all custom comments
function addCustomDropdown() {
$('li[data-type="0"]>div[class="comment-container"]').each(function() {
var $this = $(this);
if (!$this.hasClass("has-dropdown")) {
$this.addClass("has-dropdown");
$this.prepend(
'<div class="custom-comment-title" data-type="0"><p>Custom Comment</p><ul><li data-type="0" class="active">Custom Comment</li><li data-type="1" data-group="student-summary">Summary</li><li data-type="2" data-group="vocab-support" >Vocabulary Support</li><li data-type="3" data-group="personal-connection" >Personal Connection</li><li data-type="4" data-group="emotional-connection" >Emotional Connection</li></ul></div>'
);
}
});
}

// flori: sorts review comments list based on sort-by option
function checkSortOption() {
var commentsList = $("#comments-list > ul");
var comments = commentsList.find("li[data-emotion]");
var sortedComments = comments.toArray().sort(function(a, b) {
var aVal = $(a).find(".comment-id").text();
var bVal = $(b).find(".comment-id").text();
var activeOption = $('#sort-by > ul > li[class="active"]').text();
if (activeOption == "Order") {
aVal = $(a).find(".comment-id").text();
bVal = $(b).find(".comment-id").text();
} else if (activeOption == "Type") {
aVal = $(a).attr("data-type");
bVal = $(b).attr("data-type");
} else if (activeOption == "Emotion") {
aVal = $(a).attr("data-emotion");
bVal = $(b).attr("data-emotion");
}
if (aVal < bVal) return -1;
if (aVal > bVal) return 1;
return 0;
});
// flori: sorts review comments list based on sort-by option
function checkSortOption() {
var commentsList = $("#comments-list > ul");
var comments = commentsList.find("li[data-emotion]");
var sortedComments = comments.toArray().sort(function(a, b) {
var aVal = $(a).find(".comment-id").text();
var bVal = $(b).find(".comment-id").text();
var activeOption = $('#sort-by > ul > li[class="active"]').text();
if (activeOption == "Order") {
aVal = $(a).find(".comment-id").text();
bVal = $(b).find(".comment-id").text();
} else if (activeOption == "Type") {
aVal = $(a).attr("data-type");
bVal = $(b).attr("data-type");
} else if (activeOption == "Emotion") {
aVal = $(a).attr("data-emotion");
bVal = $(b).attr("data-emotion");
}
if (aVal < bVal) return -1;
if (aVal > bVal) return 1;
return 0;
});

commentsList.empty();
commentsList.append(sortedComments);
}
commentsList.empty();
commentsList.append(sortedComments);
}
})(window.jQuery);
2 changes: 1 addition & 1 deletion assets/robot-play.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function($) {
var misty_IP = '10.0.0.221';
var misty_IP = '192.168.0.111';
var behaviors = {
"spooked": "SL 500\nFI eyes_terror.jpg\nFL true\nAU teethChatter.mp3\nTL 0 0 0 170 0 255 breathe 1220\nMH 0 10 0 90\nMT -75 0 500\nMAS 90 100 90 100\nMH 0 5 -2 100\nSL 100\nMAS 80 100 80 100\nMH 0 5 2 100\nMH 0 5 -2 100\nMH 0 5 2 100\nMAS 90 100 90 100\nMH 0 5 -2 100\nSL 100\nMAS 80 100 80 100",
"boredom": "SL 500\nFI eyes_boredom.jpg\nTL 0 0 0 47 0 255 breathe 3474\nMH -20 0 -5 100\nMAS 90 90 90 90",
Expand Down
17 changes: 17 additions & 0 deletions assets/skeleton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function($) {
// global variables

$(document).ready(function() {
// code executions
name();
// event listeners
$(document).on('click', 'selector', function() {

});
});

// all the function definitions
function name() {

}
})(window.jQuery);
57 changes: 57 additions & 0 deletions skeleton.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Pathwise</title>
<link rel="stylesheet" type="text/css" href="assets/styles-working.css" />
<!-- Create your isolated CSS file -->
<link rel="icon" type="image/x-icon" href="assets/icons/favicon.png" />
</head>

<body class="student-facing student-robot-facing">
<nav id="primary-nav">
<!-- Navigation -->
<div class="container">
<div class="brand">PATHWiSE</div>
<div id="nav-right">
<div id="user-profile">
<div id="user-profile-menu">
<!-- class="temporary-hidden" -->
<div id="user-profile-menu-top">
<div id="user-profile-menu-icon"></div>
<div id="user-profile-menu-details">
<div id="user-profile-menu-header" style="font-weight: bold">
Profile Name
</div>
<p>Profile@gmail.com</p>
<p>User</p>
</div>
</div>
<ul>
<li>Dashboard</li>
<li>Settings</li>
<li id="logout">Logout</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<main data-comments="1" data-comments-toggle="1">
<div class="container">
<div id="main-content-wrapper">
<!-- main content start -->
<div id="main-content">
</div>
<!-- main content -->
</div>
</div>
</main>
<script type="text/javascript" src="assets/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="assets/skeleton.js"></script>
<!-- Create your isolated JS file -->
</body>

</html>
1 change: 1 addition & 0 deletions student-robot.htm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
display: inline-block;
height: 35px;
padding-left: 0;
opacity: 0 !important;
}

.student-robot-facing #pages .cp p::before {
Expand Down

0 comments on commit d9c6b07

Please sign in to comment.