Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Sticky Footer and Pre-Advising Portal
  • Loading branch information
briandunnigan authored and briandunnigan committed Jun 17, 2015
1 parent bf97b82 commit fe3d4b4
Show file tree
Hide file tree
Showing 6 changed files with 408 additions and 267 deletions.
49 changes: 43 additions & 6 deletions css/ece.css
Expand Up @@ -9211,34 +9211,37 @@ body.home .hentry {
}

/* ----------------------------- Default Page Styles ----------------------------- */
#page-page, #page-blank, #page-userlist, #page-user-profile .col-sm-9, #page-single, #page-archive {
#page-page, #page-blank, #page-userlist, #page-user-profile .col-sm-9, #page-single, #page-archive, #page-advising {
background-color: #FAFAFA;
border: 1px solid #EBEBEB;
}
#page-page .row:nth-child(1), #page-blank .row:nth-child(1), #page-userlist .row:nth-child(1), #page-user-profile .col-sm-9 .row:nth-child(1), #page-single .row:nth-child(1), #page-archive .row:nth-child(1) {
#page-page .row:nth-child(1), #page-blank .row:nth-child(1), #page-userlist .row:nth-child(1), #page-user-profile .col-sm-9 .row:nth-child(1), #page-single .row:nth-child(1), #page-archive .row:nth-child(1), #page-advising .row:nth-child(1) {
background-color: #FAFAFA;
border: 1px solid #EBEBEB;
}
#page-page #main, #page-blank #main, #page-userlist #main, #page-user-profile .col-sm-9 #main, #page-single #main, #page-archive #main {
#page-page #main, #page-blank #main, #page-userlist #main, #page-user-profile .col-sm-9 #main, #page-single #main, #page-archive #main, #page-advising #main {
background-color: transparent;
padding-left: 40px;
padding-right: 40px;
margin-top: 18px;
}
#page-page h1, #page-blank h1, #page-userlist h1, #page-user-profile .col-sm-9 h1, #page-single h1, #page-archive h1 {
#page-page h1, #page-blank h1, #page-userlist h1, #page-user-profile .col-sm-9 h1, #page-single h1, #page-archive h1, #page-advising h1 {
margin-bottom: 30px;
font-family: 'bebas_neue_regularregular', helvetica, arial, sans-serif;
font-size: 40px;
letter-spacing: 0.5px;
text-shadow: 0px 1px 0px white;
color: #4B4B4B;
}
#page-page h2, #page-blank h2, #page-userlist h2, #page-user-profile .col-sm-9 h2, #page-single h2, #page-archive h2 {
#page-page h2, #page-blank h2, #page-userlist h2, #page-user-profile .col-sm-9 h2, #page-single h2, #page-archive h2, #page-advising h2 {
text-transform: uppercase;
color: #00a8b1;
font-size: 20px;
}

#page-user-profile .col-sm-9 {
border: 1px solid #EBEBEB;
}

/* ----------------------------- Page Blank ----------------------------- */
#page-blank {
background-color: #FAFAFA;
Expand Down Expand Up @@ -9306,6 +9309,40 @@ body.home .hentry {
margin-bottom: 20px;
}

/* ----------------------------- Page Advising ----------------------------- */
#page-advising .left-courses {
/*padding-left:0;
padding-right:0;
border-right:1px solid red;*/
}
#page-advising .select-course {
margin-top: 10px;
}
#page-advising #ece-course {
margin-top: 30px;
}
#page-advising #ece-course #ece-course-name {
font-family: 'bebas_neue_regularregular', helvetica, arial, sans-serif;
font-size: 30px;
letter-spacing: 0.5px;
text-shadow: 0px 1px 0px white;
color: #4B4B4B;
}
#page-advising #ece-major {
margin-top: 30px;
}
#page-advising #ece-major #ece-major-name {
font-family: 'bebas_neue_regularregular', helvetica, arial, sans-serif;
font-size: 30px;
letter-spacing: 0.5px;
text-shadow: 0px 1px 0px white;
color: #4B4B4B;
line-height: 1em;
}
#page-advising input, #page-advising button, #page-advising select, #page-advising textarea {
width: 85%;
}

/* ----------------------------- Archive/Blog ----------------------------- */
#page-single .widget, #page-archive .widget {
padding: 0px !important;
Expand Down
156 changes: 78 additions & 78 deletions functions.php
@@ -1,79 +1,79 @@
<?php

function ece_scripts() {
wp_enqueue_style( 'ece-style', get_stylesheet_directory_uri() . '/css/ece.css');
wp_enqueue_script('ece-custom', get_stylesheet_directory_uri().'/js/custom.js', array('jquery'));
wp_localize_script( 'ece-custom', 'ece_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'siteurl' => site_url() ) );
}
add_action( 'wp_enqueue_scripts', 'ece_scripts');

function ece_get_courses( $discipline ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_course.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'discipline='.$discipline);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$courses = curl_exec($ch);
curl_close ($ch);

return json_decode($courses);
}

function ajax_ece_discipline_courses(){
$discipline = $_POST['discipline'];

$courses = ece_get_courses( urlencode($discipline) );

echo wp_json_encode( $courses );
wp_die();
}
add_action( 'wp_ajax_ece_discipline_courses', 'ajax_ece_discipline_courses' );
add_action('wp_ajax_nopriv_ece_discipline_courses', 'ajax_ece_discipline_courses');

function ece_get_course_info( $discipline, $course ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_course.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'course='.$course.'&discipline='.$discipline);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$courses = curl_exec($ch);
curl_close ($ch);

return json_decode($courses);
}

function ajax_ece_course_info(){
$discipline = $_POST['discipline'];
$course = $_POST['course'];

$courseInfo = ece_get_course_info( urlencode($discipline), urlencode($course) );

echo wp_json_encode( $courseInfo );
wp_die();
}
add_action( 'wp_ajax_ece_course_info', 'ajax_ece_course_info' );
add_action('wp_ajax_nopriv_ece_course_info', 'ajax_ece_course_info');

function ece_get_major_info( $major ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_major.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'major='.$major);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$info = curl_exec($ch);
curl_close ($ch);

return json_decode($info);
}

function ajax_ece_major_info(){
$major = $_POST['major'];

$majorInfo = ece_get_major_info( urlencode($major) );

echo wp_json_encode( $majorInfo );
wp_die();
}
add_action( 'wp_ajax_ece_major_info', 'ajax_ece_major_info' );
add_action('wp_ajax_nopriv_ece_major_info', 'ajax_ece_major_info');
<?php

function ece_scripts() {
wp_enqueue_style( 'ece-style', get_stylesheet_directory_uri() . '/css/ece.css');
wp_enqueue_script('ece-custom', get_stylesheet_directory_uri().'/js/custom.js', array('jquery', 'cs'));
wp_localize_script( 'ece-custom', 'ece_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'siteurl' => site_url() ) );
}
add_action( 'wp_enqueue_scripts', 'ece_scripts');

function ece_get_courses( $discipline ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_course.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'discipline='.$discipline);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$courses = curl_exec($ch);
curl_close ($ch);

return json_decode($courses);
}

function ajax_ece_discipline_courses(){
$discipline = $_POST['discipline'];

$courses = ece_get_courses( urlencode($discipline) );

echo wp_json_encode( $courses );
wp_die();
}
add_action( 'wp_ajax_ece_discipline_courses', 'ajax_ece_discipline_courses' );
add_action('wp_ajax_nopriv_ece_discipline_courses', 'ajax_ece_discipline_courses');

function ece_get_course_info( $discipline, $course ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_course.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'course='.$course.'&discipline='.$discipline);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$courses = curl_exec($ch);
curl_close ($ch);

return json_decode($courses);
}

function ajax_ece_course_info(){
$discipline = $_POST['discipline'];
$course = $_POST['course'];

$courseInfo = ece_get_course_info( urlencode($discipline), urlencode($course) );

echo wp_json_encode( $courseInfo );
wp_die();
}
add_action( 'wp_ajax_ece_course_info', 'ajax_ece_course_info' );
add_action('wp_ajax_nopriv_ece_course_info', 'ajax_ece_course_info');

function ece_get_major_info( $major ){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://web2.uconn.edu/ece/preadvising/pread_major.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'major='.$major);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$info = curl_exec($ch);
curl_close ($ch);

return json_decode($info);
}

function ajax_ece_major_info(){
$major = $_POST['major'];
$majorInfo = ece_get_major_info( urlencode($major) );
echo wp_json_encode( $majorInfo );
wp_die();
}
add_action( 'wp_ajax_ece_major_info', 'ajax_ece_major_info' );
add_action('wp_ajax_nopriv_ece_major_info', 'ajax_ece_major_info');
?>

0 comments on commit fe3d4b4

Please sign in to comment.