Skip to content
Browse files

Merge branch 'master' of github.com:kcalmes/a-team

  • Loading branch information...
2 parents 2931774 + 9ff2af1 commit e7865417551dccc0c121bba5e4b26a15b2518454 @kcalmes committed
View
22 js/application.js
@@ -58,6 +58,26 @@ $(document).ready(function() {
});
+function clickOnResource(urlToGoTo) {
+ if(document.getElementById('end-sesh')) {
+ var http = new XMLHttpRequest();
+ var url = "http://www.williamsware.com/cs/urlReturner.php";
+ var params = "url=" + urlToGoTo;
+ http.open("POST", url, true);
+ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ http.setRequestHeader("Content-length", params.length);
+ http.setRequestHeader("Connection", "close");
+ http.onreadystatechange = function() {
+ if(http.readyState == 4 && http.status == 200) {
+ window.location = urlToGoTo;
+ }
+ };
+ http.send(params);
+ } else {
+ window.location = urlToGoTo;
+ }
+}
+
//24 - 16 - 11
-//1250 + 1000
+//1250 + 1000
View
42 pages/advisors/aResource.ejs
@@ -1,24 +1,24 @@
<div class="row">
<div class="span6 offset3">
- <h4>Documents:</h4>
- <div id="resourceList">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>Title</th>
- <th>isDoc</th>
- </tr>
- <tbody>
- <% for (var index in results) {
- var result = results[index] %>
- <tr class="apt-row">
- <td><%= result.title %></td>
- <td><%= result.isDoc %></td>
- </tr>
- <% } %>
- </tbody>
- </thead>
- </table>
- </div>
- </div>
+ <h4>Documents:</h4>
+ <div id="resourceList">
+ <table class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Title</th>
+ <th> </th>
+ </tr>
+ </thead>
+ <tbody>
+ <% for (var index in results) {
+ var result = results[index] %>
+ <tr class="apt-row" <%= "onclick='clickOnResource(\"" %><%= result.url%><%= "\");'" %> >
+ <td><%= result.title %></td>
+ <td><%= (result.isDoc == '1')? "<i class='icon-file'>" : "<i class='icon-globe'>" %></td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
</div>
+ </div>
+</div>
View
76 pages/advisors/default.ejs
@@ -1,31 +1,47 @@
-
+<div id="the-sessions" class="container">
<div class="row">
- <div class="span6 offset3">
- <h4>Todays Appointments:</h4>
- <table id="adv-upcoming" class="table table-bordered">
- <thead>
- <tr>
- <th>Time</th>
- <th>Name</th>
- </tr>
- </thead>
- <tbody>
- <% for (var abb in apts) {
- var apt = apts[abb] %>
- <tr id="<%= apt.netid %>" class="apt-row">
- <td><%= apt.time %></td>
- <td><%= apt.lname %>, <%= apt.fname %></td>
- </tr>
- <% } %>
- </tbody>
- </table>
- </div>
- </div>
- <div class="row-fluid">
- <div class="span6 offset3">
- <form id="form-sesh">
- <input id="netid" type="text" placeholder="Student NetID">
- <button id="start-sesh" class="btn btn-primary start-sesh">Start Session</button>
- </form>
- </div>
- </div>
+ <div class="span8 offset2">
+ <h3>Future Sessions</h3>
+ <div id="acc-content">
+ <div id="tb-accordion" class="accordion">
+ <div class="dis-table">
+ <div class="acc-row">
+ <div>Date - Time</div>
+ <div>Name</div>
+ </div>
+ </div>
+ <% for (var abb in fsessions) { %>
+ <% var sesh = fsessions[abb] %>
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle acc-row" data-toggle="collapse" data-parent="#tb-accordion" href="#sesh-<%= abb %>">
+ <div><%= sesh.date %> - <%= sesh.time %></div>
+ <div><%= sesh.fname %> <%= sesh.lname %></div>
+ </a>
+ </div>
+ <div id="sesh-<%= abb %>" class="accordion-body collapse">
+ <div class="accordion-inner acc-inner-row">
+ <div><strong>Email:</strong> <%= sesh.email %></div>
+ <div><strong>NetID:</strong> <%= sesh.netid %></div>
+ <div><button id="<%= sesh.netid %>" class="btn btn-primary start-sesh f-sesh">Start Session</button></div>
+ </div>
+ </div>
+ </div>
+ <% } %>
+ </div>
+
+ <div class="row-fluid">
+ <div class="span6 offset3">
+ <form id="form-sesh">
+ <input id="netid" type="text" placeholder="Student NetID">
+ <button id="start-sesh" class="btn btn-primary start-sesh">Start Session</button>
+ </form>
+ </div>
+ </div>
+
+
+
+ </div>
+ </div>
+ </div>
+</div>
View
0 pages/advisors/resources/business.ejs
No changes.
View
11 pages/advisors/students/future.ejs
@@ -5,6 +5,17 @@
<div id="acc-content">
</div>
+
+ <div class="row-fluid">
+ <div class="span6 offset3">
+ <form id="form-sesh">
+ <input id="netid" type="text" placeholder="Student NetID">
+ <button id="start-sesh" class="btn btn-primary start-sesh">Start Session</button>
+ </form>
+ </div>
+ </div>
+
+
</div>
</div>
</div>
View
10 pages/advisors/students/past.ejs
@@ -5,6 +5,16 @@
<div id="acc-content">
</div>
+
+ <div class="row-fluid">
+ <div class="span6 offset3">
+ <form id="form-sesh">
+ <input id="netid" type="text" placeholder="Student NetID">
+ <button id="start-sesh" class="btn btn-primary start-sesh">Start Session</button>
+ </form>
+ </div>
+ </div>
+
</div>
</div>
</div>
View
26 pages/advisors/students/table_future.ejs
@@ -6,25 +6,25 @@
</div>
</div>
- <% for (var abb in fsessions) {
- var sesh = fsessions[abb] %>
+
+ <% for (var abb in fsessions) { %>
+ <% var sesh = fsessions[abb] %>
<div class="accordion-group">
- <div class="accordion-heading dis-table">
- <a class="acc-row" data-toggle="collapse" data-parent="#tb-accordion" href="#sesh-<%= abb %>">
+ <div class="accordion-heading">
+ <a class="accordion-toggle acc-row" data-toggle="collapse" data-parent="#tb-accordion" href="#sesh-<%= abb %>">
<div><%= sesh.date %> - <%= sesh.time %></div>
<div><%= sesh.fname %> <%= sesh.lname %></div>
</a>
</div>
- <div>
- <div id="sesh-<%= abb %>" class="accordion-body collapse">
- <div class="accordion-inner acc-inner-row">
- <div><strong>Email:</strong> <%= sesh.email %></div>
- <div><strong>NetID:</strong> <%= sesh.netid %></div>
- <div><button id="<%= sesh.netid %>" class="btn btn-primary start-sesh f-sesh">Start Session</button></div>
- </div>
- </div>
- </div>
+ <div id="sesh-<%= abb %>" class="accordion-body collapse">
+ <div class="accordion-inner acc-inner-row">
+ <div><strong>Email:</strong> <%= sesh.email %></div>
+ <div><strong>NetID:</strong> <%= sesh.netid %></div>
+ <div><button id="<%= sesh.netid %>" class="btn btn-primary start-sesh f-sesh">Start Session</button></div>
+ </div>
+ </div>
</div>
<% } %>
+
</div>
View
29 studentMirror.html
@@ -0,0 +1,29 @@
+<html>
+ <head>
+ <title>Advisement Center</title>
+ <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"> </script>
+ <script type="text/javascript">
+ var oldURL = "http://www.byu.edu/";
+
+ function runUpdate() {
+ $.ajax({
+ type: "POST",
+ url: "some.php",
+ data: "name=John&location=Boston",
+ success: function(msg){
+ alert( "Data Saved: " + msg );
+ }
+ });
+ }
+ </script>
+ </head>
+ <body>
+ <div id="mainFrame">
+ <iframe src="http://www.byu.edu/" height="100%" width="100%"></iframe>
+ </div>
+
+ <script type="text/javascript">
+ runUpdate();
+ </script>
+ </body>
+</html>
View
13 urlReturner.php
@@ -0,0 +1,13 @@
+<?php
+ $link = mysql_connect('williamswarecom.fatcowmysql.com', 'lawrence', 'pitridish');
+ if(!link) {die('Could not connect: ' . mysql_error());}
+ mysql_select_db("cs240", $link);
+
+ if($_POST['url']) {
+ mysql_query("UPDATE `CurrentResource` SET `url` = '" . $_POST['url'] . "';");
+ } else {
+ $result = mysql_query("SELECT url FROM CurrentResource;");
+ $row = mysql_fetch_array($result);
+ echo $row['url'];
+ }
+?>

0 comments on commit e786541

Please sign in to comment.
Something went wrong with that request. Please try again.