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
W
whats-open
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Jay J Kim
whats-open
Commits
6c2ee6b4
Commit
6c2ee6b4
authored
Mar 16, 2014
by
Renfred Harper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix front-end to match new API
parent
6564a989
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
whats-open/static/js/grid.js
whats-open/static/js/grid.js
+4
-4
whats-open/static/js/typeAhead.js
whats-open/static/js/typeAhead.js
+3
-3
No files found.
whats-open/static/js/grid.js
View file @
6c2ee6b4
...
...
@@ -70,8 +70,8 @@ function update_grid(facilities) {
// Special schedules take effect after 5am on their start day
// to prevent collisions with the previous night's schedule,
// and they end at 5am the day after their end date.
special_start
=
Date
.
parse
(
special
.
start
+
'
05:00:00
'
);
special_end
=
Date
.
parse
(
special
.
end
+
'
05:00:00
'
);
special_start
=
Date
.
parse
(
special
.
vaild_
start
+
'
05:00:00
'
);
special_end
=
Date
.
parse
(
special
.
valid_
end
+
'
05:00:00
'
);
special_end
.
setDate
(
special_end
.
getDate
()
+
1
);
if
(
now
>=
special_start
&&
now
<=
special_end
)
{
schedule
=
special
;
...
...
@@ -139,9 +139,9 @@ function update_grid(facilities) {
}
$
.
ajax
({
url
:
'
/a
jax/schedule/
'
,
url
:
'
/a
pi/facilities/.json
'
,
}).
done
(
function
(
data
)
{
facilities
=
data
.
data
;
facilities
=
data
;
update_grid
(
facilities
);
construct_grid
(
facilities
);
// Every second, check and see if it is necessary to update the grid.
...
...
whats-open/static/js/typeAhead.js
View file @
6c2ee6b4
$
.
ajax
({
url
:
'
/a
jax/schedule/
'
,
url
:
'
/a
pi/facilities/.json
'
,
}).
done
(
function
(
data
)
{
//collecting list of facility names from server data
var
rest_names
=
[];
for
(
var
i
=
0
;
i
<
data
.
data
.
length
;
i
++
)
{
rest_names
.
push
(
data
.
data
[
i
].
name
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
rest_names
.
push
(
data
[
i
].
name
);
};
// For doumentation on jQuery's autocomplete: (api.jqueryui.com/autocomplete)
$
(
"
#searchBar
"
).
autocomplete
({
...
...
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