Skip to content

Commit

Permalink
signup and search enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoglom committed Sep 12, 2015
1 parent fb10b3e commit c2c1191
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
8 changes: 8 additions & 0 deletions intranet/static/css/eighth.signup.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ h5.hidden {
display: none;
}

#activity-list h5 .clear-button {
float: right;
margin-top: 4px;
margin-right: 0;
height: 16px;
padding-bottom: 3px;
}

#activity-list li {
height: 26px;
line-height: 26px;
Expand Down
10 changes: 10 additions & 0 deletions intranet/static/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
.eighth-signup .middle .desktop-info {
display: none;
}


.eighth-signup #activity-list h5 .clear-button {
margin-right: 20px;
}
}

#activity-picker .backbtn {
Expand Down Expand Up @@ -193,6 +198,11 @@
.block-title .block-comments > span {
display: none;
}


.eighth-signup #activity-list h5 .clear-button {
margin-right: 0;
}
}

@media (max-width: 500px) {
Expand Down
2 changes: 1 addition & 1 deletion intranet/static/css/schedule.widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
}

.chevron.schedule-right {
float: right;
/* float: right;*/
}

.chevron.schedule-left {
Expand Down
14 changes: 13 additions & 1 deletion intranet/static/js/eighth/signup.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ $(document).ready(function() {

searchDebug = false;

eighthSearch = function() {
clearSearch = function() {
$("#activity-picker .search-wrapper input").val("").trigger("keyup");
}

eighthSearch = function(q) {
var _st = +new Date();

var searchStr = $(this).val().toLowerCase();
searchStr = $.trim(searchStr);

var searchSplit = [];
if(searchStr.indexOf('"') != -1) {
var quoteSplit = searchStr.split('"');
Expand Down Expand Up @@ -33,6 +39,12 @@ $(document).ready(function() {
}
}

if(searchStr.length == 0) {
$(".sticky-header.all-header").html("All");
} else {
$(".sticky-header.all-header").html("Search Results<a class='button small-button clear-button' onclick='clearSearch()'>Clear</span>");
}

// console.log("query:", searchStr);

var results = [];
Expand Down
4 changes: 2 additions & 2 deletions intranet/static/js/schedule.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$(document).ready(function() {

scheduleBind = function() {
$(".schedule-outer .schedule-left").click(function() {
$(".schedule-outer .schedule-left").click(function(event) {
event.preventDefault();
scheduleView(-1);
});

$(".schedule-outer .schedule-right").click(function() {
$(".schedule-outer .schedule-right").click(function(event) {
event.preventDefault();
scheduleView(1);
});
Expand Down
4 changes: 2 additions & 2 deletions intranet/templates/eighth/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ <h4>
<i class="fa fa-arrow-up"></i>
</span>
<p>
Choose an eighth period block above,<br />
Choose an Eighth Period block above,<br />
then select an activity from the list below.
</p>
</div>
Expand All @@ -382,7 +382,7 @@ <h4>
<div id="activity-list" data-toggle-favorite-endpoint="{% url 'eighth_toggle_favorite' %}">
<h5 class="sticky-header favorites-header">Favorites</h5>
<ul class="favorite-activities"></ul>
<h5 class="sticky-header">All</h5>
<h5 class="sticky-header all-header">All</h5>
<ul class="all-activities"></ul>
<ul class="search-noresults">
<li>
Expand Down

0 comments on commit c2c1191

Please sign in to comment.