Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
schedules
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
schedules
Commits
759d2585
Commit
759d2585
authored
May 03, 2019
by
Zac Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up
parent
d3970aa1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
14 deletions
+20
-14
schedules/app/assets/stylesheets/application.scss
schedules/app/assets/stylesheets/application.scss
+9
-0
schedules/app/controllers/concerns/by_semester.rb
schedules/app/controllers/concerns/by_semester.rb
+7
-9
schedules/app/controllers/search_controller.rb
schedules/app/controllers/search_controller.rb
+0
-1
schedules/app/javascript/src/Calendar.jsx
schedules/app/javascript/src/Calendar.jsx
+1
-1
schedules/app/javascript/src/QuickAdd.jsx
schedules/app/javascript/src/QuickAdd.jsx
+3
-3
No files found.
schedules/app/assets/stylesheets/application.scss
View file @
759d2585
...
...
@@ -119,6 +119,15 @@ body {
top
:
0
;
}
.full-width
{
width
:
90vw
;
position
:
relative
;
left
:
50%
;
right
:
50%
;
margin-left
:
-45vw
;
margin-right
:
-45vw
;
}
// .jumbotron {
// color: #FFFFFF
// }
schedules/app/controllers/concerns/by_semester.rb
View file @
759d2585
# BySemester contains logic for setting the current request's
# Semester. This is not needed by every page as it used to be, so it
# now lives in this concern instead of ApplicationController.
# BySemester contains logic for setting the current request's Semester.
module
BySemester
extend
ActiveSupport
::
Concern
...
...
@@ -9,19 +7,19 @@ module BySemester
end
# This page needs to know what semester it should load data from.
# set_semester checks both the semester_id query parameter and the
user's cookies
# set_semester checks both the semester_id query parameter and the
current session
# to look for a semester id and loads whatever it finds into @semester.
#
# By default, load the most recent semester.
def
set_semester
if
params
.
key?
(
:semester_id
)
@semester
=
Semester
.
find_by_id
params
[
:semester_id
]
cookies
[
:semester_id
]
=
@semester
.
id
elsif
cookies
[
:semester_id
].
nil?
@semester
=
Semester
.
find_by_id
(
params
[
:semester_id
])
session
[
:semester_id
]
=
@semester
.
id
elsif
session
[
:semester_id
].
nil?
@semester
=
Semester
.
first
cookies
[
:semester_id
]
=
@semester
.
id
session
[
:semester_id
]
=
@semester
.
id
else
@semester
=
Semester
.
find_by_id
cookies
[
:semester_id
]
@semester
=
Semester
.
find_by_id
(
session
[
:semester_id
])
end
end
end
schedules/app/controllers/search_controller.rb
View file @
759d2585
...
...
@@ -42,7 +42,6 @@ class SearchController < ApplicationController
c
.
serializable_hash
.
merge
(
url:
course_url
(
c
))
end
gon
.
courses
=
@courses
gon
.
courses
.
map!
end
/[0-9]{5}/
.
match
(
params
[
:query
])
do
|
m
|
...
...
schedules/app/javascript/src/Calendar.jsx
View file @
759d2585
...
...
@@ -6,7 +6,7 @@ import '!style-loader!css-loader!react-big-calendar/lib/css/react-big-calendar.c
const
localizer
=
BigCalendar
.
momentLocalizer
(
moment
);
const
Calendar
=
props
=>
(
<
div
style
=
{
{
backgroundColor
:
'
white
'
,
padding
:
'
24px
'
}
}
>
<
div
className
=
"full-width"
style
=
{
{
backgroundColor
:
'
white
'
,
padding
:
'
24px
'
}
}
>
<
BigCalendar
localizer
=
{
localizer
}
events
=
{
props
.
events
}
...
...
schedules/app/javascript/src/QuickAdd.jsx
View file @
759d2585
...
...
@@ -4,12 +4,12 @@ import Cart from 'src/Cart';
export
default
class
QuickAdd
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
crn
s
:
''
};
this
.
state
=
{
crn
String
:
''
};
}
add
=
e
=>
{
e
.
preventDefault
();
const
crns
=
this
.
state
.
crn
s
.
split
(
'
,
'
);
const
crns
=
this
.
state
.
crn
String
.
split
(
'
,
'
);
crns
.
forEach
(
c
=>
c
.
length
===
5
&&
Cart
.
addCrn
(
c
));
this
.
props
.
loadCalendar
();
};
...
...
@@ -26,7 +26,7 @@ export default class QuickAdd extends React.Component {
name
=
"crns"
type
=
"text"
value
=
{
this
.
state
.
crns
}
onChange
=
{
e
=>
this
.
setState
({
crn
s
:
e
.
target
.
value
})
}
onChange
=
{
e
=>
this
.
setState
({
crn
String
:
e
.
target
.
value
})
}
className
=
"form-control"
placeholder
=
"12345,54321,..."
aria
-
describedby
=
"basic-addon2"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment