Skip to content

Commit 6c8abf1

Browse files
committed
Fixed a lot of small styling issues: with the footer, the new popover, and others.
Also fixed the digit dropping on small screens. Closes #60.
1 parent 8782421 commit 6c8abf1

File tree

6 files changed

+47
-33
lines changed

6 files changed

+47
-33
lines changed

assets/src/modules/sm/App/directives/courseDetailPopover.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ angular.module('sm').directive('courseDetailPopover', function($http, $filter) {
1212
for (var timeIndex = 0; timeIndex < parsedTimes.length; timeIndex++) {
1313
var time = parsedTimes[timeIndex];
1414
HTML += time.days + ' <span style="white-space: nowrap">' + formatTime(time.start) + '-' + formatTime(time.end) + '</span> <span style="font-style: italic; white-space: nowrap">Location: ' + time.location + '</span>';
15+
if(timeIndex < parsedTimes.length - 1) {
16+
HTML += '<br>';
17+
}
1518
}
1619
HTML += '</div>';
1720

@@ -33,7 +36,8 @@ angular.module('sm').directive('courseDetailPopover', function($http, $filter) {
3336

3437
$body.off('click.hidepopovers');
3538
$body.on('click.hidepopovers', function () {
36-
elm.popover('hide');
39+
elm.popover('destroy');
40+
loaded = false;
3741
$body.off('click.hidepopovers');
3842
opened = false;
3943
});
@@ -50,8 +54,8 @@ angular.module('sm').directive('courseDetailPopover', function($http, $filter) {
5054
).success(function(data) {
5155
elm.popover({
5256
html:true,
53-
trigger:'manual',
54-
placement:'auto left',
57+
trigger:'click',
58+
5559
title: data.courseNum,
5660
content: '<div class="well-sm pull-right" style=" background-color: #ddd;" title="Other students enrolled as of 6AM today">' + data.curenroll + '/' + data.maxenroll + ' <i class="fa fa-user"></i></div><p>' + data.title + '<br><span class="label label-default popover-white">' + RMPUrl(data.instructor) + '</span></p><p>' + getTimesHTML(data.times) + '</p><p>' + data.description + '</p>',
5761
container: '#container'
@@ -63,10 +67,10 @@ angular.module('sm').directive('courseDetailPopover', function($http, $filter) {
6367
loaded = false;
6468
});
6569
} else {
66-
elm.popover('toggle');
70+
//elm.popover('toggle');
6771
opened = !opened;
6872
if(opened) {
69-
hidePopoverOnBodyClick();
73+
//hidePopoverOnBodyClick();
7074
}
7175
}
7276
});

assets/src/modules/sm/App/styles/global.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ body.print footer.main.default {
106106

107107
body.default header.main {
108108
display: block;
109+
transform: translateZ(0);
109110
}
110111

111112
body.print header.main {
@@ -145,7 +146,7 @@ body.print #container {
145146

146147
footer.main.default {
147148
position: relative;
148-
padding:20px;
149+
padding:20px 0;
149150
background-color:#2C3E50;
150151
color:#ccc;
151152
}
@@ -616,10 +617,12 @@ svg g.item:hover rect {
616617
overflow-y: auto;
617618
height: 350px;
618619
height: calc(100% - 124px);
620+
min-height: 100px;
619621
}
620622

621623
.course-cart {
622624
height: calc(100% - 20px);
625+
min-height: 230px;
623626
}
624627

625628
.pinned-sizer {
@@ -662,6 +665,11 @@ svg g.item:hover rect {
662665
margin-bottom: 0 !important;
663666
}
664667
}
668+
@media screen and (min-width:767px) and (max-width:1020px) {
669+
svg g.svg-schedule-hours {
670+
transform: translateX(7px);
671+
}
672+
}
665673

666674
/* ANIMATIONS */
667675
@media screen and (min-width:767px) {

assets/src/modules/sm/Schedule/templates/scheduleitem.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@ <h2 class="panel-title control-label pull-left smaller-sm">{{saveAction == "crea
1010
<span class="caret"></span>
1111
</button>
1212
<ul class="dropdown-menu" role="menu">
13-
<li><a ng-click="scheduleActions.downloadiCal($event)" href="#"><i class="fa fa-calendar-o"></i> iCal</a></li>
14-
<li ng-show="imageSupport"><a ng-click="scheduleActions.downloadImage($event)" href="#"><i class="fa fa-picture-o"></i> Image</a></li>
13+
<li><a ng-click="scheduleActions.downloadiCal($event)" href="#"><i class="fa fa-fw fa-calendar-o"></i> iCal</a></li>
14+
<li ng-show="imageSupport"><a ng-click="scheduleActions.downloadImage($event)" href="#"><i class="fa fa-fw fa-picture-o"></i> Image</a></li>
1515
</ul>
1616
</div>
17-
<button ng-click="scheduleActions.print()" type="button" class="btn btn-info hidden-xs"><i class="fa fa-print"></i> Print</button>
17+
<button ng-click="scheduleActions.print()" type="button" class="btn btn-info hidden-xs"><i class="fa fa-fw fa-print"></i> Print</button>
1818
<div class="btn-group">
1919
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
2020
<i class="fa fa-share"></i> Share to... <span class="caret"></span>
2121
</button>
2222
<ul class="dropdown-menu" role="menu">
23-
<li><a ng-click="scheduleActions.shareToService($event, 'facebook')" href="#"><i class="fa fa-facebook"></i> Facebook</a></li>
24-
<li><a ng-click="scheduleActions.shareToService($event, 'twitter')" href="#"><i class="fa fa-twitter"></i> Twitter</a></li>
25-
<li><a ng-click="scheduleActions.shareToService($event, 'googlep')" href="#"><i class="fa fa-google-plus"></i> Google+</a></li>
23+
<li><a ng-click="scheduleActions.shareToService($event, 'facebook')" href="#"><i class="fa fa-fw fa-facebook"></i> Facebook</a></li>
24+
<li><a ng-click="scheduleActions.shareToService($event, 'twitter')" href="#"><i class="fa fa-fw fa-twitter"></i> Twitter</a></li>
25+
<li><a ng-click="scheduleActions.shareToService($event, 'googlep')" href="#"><i class="fa fa-fw fa-google-plus"></i> Google+</a></li>
2626
<li class="divider"></li>
27-
<li><a ng-click="scheduleActions.shareToEmail($event)" href="#"><i class="fa fa-envelope"></i> Email</a></li>
28-
<li><a ng-click="scheduleActions.shareToDirectLink($event)" href="#"><i class="fa fa-link"></i> Direct link</a></li>
27+
<li><a ng-click="scheduleActions.shareToEmail($event)" href="#"><i class="fa fa-fw fa-envelope"></i> Email</a></li>
28+
<li><a ng-click="scheduleActions.shareToDirectLink($event)" href="#"><i class="fa fa-fw fa-link"></i> Direct link</a></li>
2929
</ul>
3030
</div>
3131
</div>
3232
<div class="btn-group pull-right visible-xs visible-sm">
3333
<div class="btn-group">
34-
<button ng-click="scheduleActions.save(saveAction)" type="button" class="btn btn-primary btn-sm"><i class="fa" ng-class="{'fa-save': saveAction == 'create', 'fa-copy': saveAction == 'fork'}"></i> {{saveAction == "create"?"Save":"Copy and Edit"}} </button>
34+
<button ng-click="scheduleActions.save(saveAction)" type="button" class="btn btn-primary btn-sm"><i class="fa fa-fw" ng-class="{'fa-save': saveAction == 'create', 'fa-copy': saveAction == 'fork'}"></i> {{saveAction == "create"?"Save":"Copy and Edit"}} </button>
3535
<button type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown">
3636
<span class="caret"></span>
3737
</button>{{scheduleActionsAvailable}}
3838
<ul class="dropdown-menu" role="menu">
39-
<li><a ng-click="scheduleActions.downloadiCal($event)" href="#"><i class="fa fa-calendar-o"></i> iCal</a></li>
40-
<li ng-show="imageSupport"><a ng-click="scheduleActions.downloadImage($event)" href="#"><i class="fa fa-picture-o"></i> Image</a></li>
39+
<li><a ng-click="scheduleActions.downloadiCal($event)" href="#"><i class="fa fa-fw fa-calendar-o"></i> iCal</a></li>
40+
<li ng-show="imageSupport"><a ng-click="scheduleActions.downloadImage($event)" href="#"><i class="fa fa-fw fa-picture-o"></i> Image</a></li>
4141
</ul>
4242
</div>
4343
<div class="btn-group">
4444
<button type="button" class="btn btn-info dropdown-toggle btn-sm" data-toggle="dropdown">
4545
<i class="fa fa-share"></i> Share to... <span class="caret"></span>
4646
</button>
4747
<ul class="dropdown-menu" role="menu">
48-
<li><a ng-click="scheduleActions.shareToService($event, 'facebook', true)" href="#"><i class="fa fa-facebook"></i> Facebook</a></li>
49-
<li><a ng-click="scheduleActions.shareToService($event, 'twitter', true)" href="#"><i class="fa fa-twitter"></i> Twitter</a></li>
50-
<li><a ng-click="scheduleActions.shareToService($event, 'googlep', true)" href="#"><i class="fa fa-google-plus"></i> Google+</a></li>
48+
<li><a ng-click="scheduleActions.shareToService($event, 'facebook', true)" href="#"><i class="fa fa-fw fa-facebook"></i> Facebook</a></li>
49+
<li><a ng-click="scheduleActions.shareToService($event, 'twitter', true)" href="#"><i class="fa fa-fw fa-twitter"></i> Twitter</a></li>
50+
<li><a ng-click="scheduleActions.shareToService($event, 'googlep', true)" href="#"><i class="fa fa-fw fa-google-plus"></i> Google+</a></li>
5151
<li class="divider"></li>
52-
<li><a ng-click="scheduleActions.shareToEmail($event)" href="#"><i class="fa fa-envelope"></i> Email</a></li>
53-
<li><a ng-click="scheduleActions.shareToDirectLink($event)" href="#"><i class="fa fa-link"></i> Direct link</a></li>
52+
<li><a ng-click="scheduleActions.shareToEmail($event)" href="#"><i class="fa fa-fw fa-envelope"></i> Email</a></li>
53+
<li><a ng-click="scheduleActions.shareToDirectLink($event)" href="#"><i class="fa fa-fw fa-link"></i> Direct link</a></li>
5454
</ul>
5555
</div>
5656
</div>
@@ -67,7 +67,7 @@ <h2 class="panel-title control-label pull-left smaller-sm">{{saveAction == "crea
6767
</div>
6868
<div class="schedule-cont">
6969
<div class="schedule-track" ng-class="mobileTrackClass">
70-
<svg version="1.1" ng-attr-height="{{grid.opts.height}}" width="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern vector-effect="non-scaling-stroke" id="day" width="100%" x="0" height="40" patternUnits="userSpaceOnUse"><line vector-effect="non-scaling-stroke" x1="0" y1="19.5" x2="100%" y2="19.5" style="stroke:#bbb;stroke-width:1" /></pattern></defs><rect x="0" y="0" width="100%" height="100%" fill="#ffffff" /><g ng-attr-transform="{{grid.opts.pixelAlignment}}" font-family="Roboto" font-size="15"><g><text fill="#aaa" text-anchor="end" ng-repeat="hour in grid.hours track by $index" ng-attr-x="{{print?'41':'5%'}}" ng-attr-y="{{($index * 40) + 25}}">{{hour}}</text></g><g ng-repeat="day in grid.days"><text y="12" ng-attr-x="{{day.offset}}" ng-attr-width="{{grid.opts.daysWidth}}" fill="#aaa" ng-bind="day.name"></text><rect y="19" ng-attr-x="{{day.offset}}" ng-attr-width="{{grid.opts.daysWidth}}" ng-attr-height="{{grid.opts.daysHeight}}" fill="url(#day)" /></g><g svg-schedule-item class="item" ng-mouseenter="itemEnter($event)" ng-mouseleave="itemLeave($event)" ng-repeat="item in scheduleItems | orderBy:'-boundry.y'"><rect ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y}}" ng-attr-width="{{item.boundry.width}}" ng-attr-height="{{item.boundry.height}}" ng-attr-fill="{{item.color}}" fill-opacity=".8" /><rect ng-if="item.boundry.shorten != 0" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.shorten < 0 ?item.boundry.y : item.boundry.y + item.boundry.height - 2}}" ng-attr-width="{{item.boundry.width}}" height="2" fill="#ffff00" /><text svg-text-line="{{item.title}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 16}}" transform="translate(3,0)" font-weight="bold" fill="white"></text><text ng-if="item.boundry.height > 32 && item.content.courseNum" svg-text-line="{{item.content.courseNum}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 32}}" transform="translate(3,0)" fill="#fff"></text><text ng-if="item.boundry.height > 48 && item.content.instructor" svg-text-line="{{item.content.instructor}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 48}}" transform="translate(3,0)" fill="#fff"></text><text ng-if="item.boundry.height > 64 && item.content.location" svg-text-line="{{item.content.location}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 64}}" transform="translate(3,0)" fill="#fff"></text><g svg-text-content="item.content"></g></g></g></svg>
70+
<svg version="1.1" ng-attr-height="{{grid.opts.height}}" width="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern vector-effect="non-scaling-stroke" id="day" width="100%" x="0" height="40" patternUnits="userSpaceOnUse"><line vector-effect="non-scaling-stroke" x1="0" y1="19.5" x2="100%" y2="19.5" style="stroke:#bbb;stroke-width:1" /></pattern></defs><rect x="0" y="0" width="100%" height="100%" fill="#ffffff" /><g ng-attr-transform="{{grid.opts.pixelAlignment}}" font-family="Roboto" font-size="15"><g class="svg-schedule-hours"><text fill="#aaa" text-anchor="end" ng-repeat="hour in grid.hours track by $index" ng-attr-x="{{print?'41':'5%'}}" ng-attr-y="{{($index * 40) + 25}}">{{hour}}</text></g><g ng-repeat="day in grid.days"><text y="12" ng-attr-x="{{day.offset}}" ng-attr-width="{{grid.opts.daysWidth}}" fill="#aaa" ng-bind="day.name"></text><rect y="19" ng-attr-x="{{day.offset}}" ng-attr-width="{{grid.opts.daysWidth}}" ng-attr-height="{{grid.opts.daysHeight}}" fill="url(#day)" /></g><g svg-schedule-item class="item" ng-mouseenter="itemEnter($event)" ng-mouseleave="itemLeave($event)" ng-repeat="item in scheduleItems | orderBy:'-boundry.y'"><rect ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y}}" ng-attr-width="{{item.boundry.width}}" ng-attr-height="{{item.boundry.height}}" ng-attr-fill="{{item.color}}" fill-opacity=".8" /><rect ng-if="item.boundry.shorten != 0" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.shorten < 0 ?item.boundry.y : item.boundry.y + item.boundry.height - 2}}" ng-attr-width="{{item.boundry.width}}" height="2" fill="#ffff00" /><text svg-text-line="{{item.title}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 16}}" transform="translate(3,0)" font-weight="bold" fill="white"></text><text ng-if="item.boundry.height > 32 && item.content.courseNum" svg-text-line="{{item.content.courseNum}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 32}}" transform="translate(3,0)" fill="#fff"></text><text ng-if="item.boundry.height > 48 && item.content.instructor" svg-text-line="{{item.content.instructor}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 48}}" transform="translate(3,0)" fill="#fff"></text><text ng-if="item.boundry.height > 64 && item.content.location" svg-text-line="{{item.content.location}}" ng-attr-x="{{item.boundry.x}}" ng-attr-y="{{item.boundry.y + 64}}" transform="translate(3,0)" fill="#fff"></text><g svg-text-content="item.content"></g></g></g></svg>
7171
</div>
7272
</div>
7373
<div ng-if="hiddenCourses.length > 0" class="row">

assets/src/modules/sm/Search/templates/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h2 class="panel-title control-label pull-left">Search Courses</h2>
186186
<li class="list-group-item course-info">
187187
<div class="row">
188188
<div class="col-sm-8">
189-
<h4 class="list-group-item-heading">{{($index + 1) + (searchPagination.currentPage*searchPagination.pageSize)}}. {{section.courseNum}}</h4>
189+
<h4 class="list-group-item-heading"><span course-detail-popover="section.id">{{($index + 1) + (searchPagination.currentPage*searchPagination.pageSize)}}. {{section.courseNum}}</span></h4>
190190
<small>{{section.title}}</small>
191191
<p class="list-group-item-text label-line ">
192192
<span class="label label-default" ng-bind-html="section.instructor | RMPUrl"></span>

index.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,17 @@
9393
<div ui-view autoscroll="false"></div>
9494
</div>
9595
<footer class="main default">
96-
<div class="csh"><a target="_blank" href="http://www.csh.rit.edu/"><img src="<?=$ASSETROOTADDRESS?>img/csh.png" alt="CSH" /></a></div>
97-
Version: <?=$APP_VERSION?> | <a ui-sref="help">Help</a> | <a href="/status">Status</a> | <a target="_blank" href="https://github.com/ComputerScienceHouse/schedulemaker/issues">Report Issues</a>
98-
<div>
99-
Development v3: Ben Grawi (bgrawi at csh.rit.edu)<br>
100-
Development v2: Ben Russell (benrr101 at csh.rit.edu),<br>
101-
Idea: John Resig (phytar at csh.rit.edu)<br>
102-
Hosting: <a href="http://www.csh.rit.edu/">Computer Science House</a><br>
96+
<div class="container">
97+
<div class="csh"><a target="_blank" href="http://www.csh.rit.edu/"><img src="<?=$ASSETROOTADDRESS?>img/csh.png" alt="CSH" /></a></div>
98+
Version: <?=$APP_VERSION?> | <a ui-sref="help">Help</a> | <a href="/status">Status</a> | <a target="_blank" href="https://github.com/ComputerScienceHouse/schedulemaker/issues">Report Issues</a>
99+
<div>
100+
Development v3: Ben Grawi (bgrawi at csh.rit.edu)<br>
101+
Development v2: Ben Russell (benrr101 at csh.rit.edu),<br>
102+
Idea: John Resig (phytar at csh.rit.edu)<br>
103+
Hosting: <a href="http://www.csh.rit.edu/">Computer Science House</a><br>
104+
</div>
103105
</div>
104-
</div>
106+
</footer>
105107
<footer class="main print">
106108
Made Using <a href='<?= $HTTPROOTADDRESS ?>'>CSH ScheduleMaker</a>
107109
<a href="http://www.csh.rit.edu/"><img height="25" src="/img/csh_print.png"></a>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "schedulemaker",
3-
"version": "3.0.12",
3+
"version": "3.0.13",
44
"private": true,
55
"description": "A course database lookup tool and schedule building web application for use at Rochester Institute of Technology.",
66
"main": "index.php",

0 commit comments

Comments
 (0)