diff options
-rw-r--r-- | .conference_proposal.module.swp | bin | 0 -> 36864 bytes | |||
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | conference_proposal.info | 8 | ||||
-rwxr-xr-x | conference_proposal.module | 582 | ||||
-rwxr-xr-x | css/base.css | 302 | ||||
-rwxr-xr-x | css/main.css | 24 | ||||
-rwxr-xr-x | css/table.css | 22 | ||||
-rwxr-xr-x | js/main.js | 19 | ||||
-rwxr-xr-x | js/smooth_scroll.js | 26 |
9 files changed, 985 insertions, 0 deletions
diff --git a/.conference_proposal.module.swp b/.conference_proposal.module.swp Binary files differnew file mode 100644 index 0000000..0661075 --- /dev/null +++ b/.conference_proposal.module.swp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7536b91 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +.swp diff --git a/conference_proposal.info b/conference_proposal.info new file mode 100755 index 0000000..f80c9a6 --- /dev/null +++ b/conference_proposal.info @@ -0,0 +1,8 @@ +name = conference_proposal +description = conference_proposal for FOSSEE recruitments. +package = conference_proposal +core = 7.x + +stylesheets[all][] = css/base.css +stylesheets[all][] = css/main.css +stylesheets[all][] = css/table.css diff --git a/conference_proposal.module b/conference_proposal.module new file mode 100755 index 0000000..3c7cf22 --- /dev/null +++ b/conference_proposal.module @@ -0,0 +1,582 @@ +<?php + function conference_proposal_permission() { + return array( + "access conference_proposal" => array( + "title" => t("Access proposal Portal"), + "description" => t("Allows users to view proposal postings.") + ), + "manage conference_proposal" => array( + "title" => t("Manage proposal Portal"), + "description" => t("Allows users to manage proposal postings.") + ), + "manage download_application" => array( + "title" => t("Manage Download Portal"), + "description" => t("Allows users to download proposal applications.") + ), + ); + } + + function conference_proposal_menu() { + $items = array(); + $items["conference_proposal"] = array( + "title" => "Abstracts", + "page callback" => "conference_proposal_page", + "access arguments" => array("access conference_proposal"), + "type" => MENU_NORMAL_ITEM, + ); + $items["conference_proposal/apply"] = array( + "title" => "Abstract Submission Form", + "page callback" => "conference_proposal_application_page", + "access arguments" => array("access conference_proposal"), + "type" => MENU_CALLBACK, + ); + // $items["conference_proposal/edit"] = array( + // "title" => "Edit Proposals form", + // "page callback" => "conference_proposal_application_edit_page", + // "access arguments" => array("access conference_proposal"), + // "type" => MENU_CALLBACK, + // ); + $items["conference_proposal/view-applications"] = array( + "title" => "View Applications", + "page callback" => "conference_proposal_view_application_page", + "access arguments" => array("manage conference_proposal"), + "type" => MENU_CALLBACK, + ); + // $items["conference_proposal/Edit-proposals"] = array( + // "title" => "Edit Proposals", + // "page callback" => "edit_conference_proposal_page", + // "access arguments" => array("access conference_proposal"), + // "type" => MENU_CALLBACK + // ); + // $items["conference_proposal/downloads_proposals"] = array( + // "title" => "Application Download", + // "description" => "Applications Download", + // "page callback" => "proposals_downloads_page", + // "access arguments" => array("access proposal_portal"), + // "type" => MENU_CALLBACK + // ); + $items["conference_proposal/ajax"] = array( + "title" => "Ajax callbacks", + "page callback" => "conference_proposal_ajax", + "access arguments" => array("access conference_proposal"), + "type" => MENU_CALLBACK + ); + + return $items; + } + + function conference_proposal_application_form($form, &$form_state, $proposal_id = 0) { + global $user; + + $form = array(); + $form["wrapper"] = array( + "#type" => "lable", + "#title" => t("Form"), + ); + $form["wrapper"]["fname"] = array( + "#type" => "textfield", + "#title" => t("First Name"), + "#required" => TRUE, + '#attributes' => array( + "placeholder" => "Please enter your first name" + ) + ); + $form["wrapper"]["lname"] = array( + "#type" => "textfield", + "#title" => t("Last Name"), + "#required" => TRUE, + '#attributes' => array( + "placeholder" => "Please enter your last name" + ) + ); + $form["wrapper"]["contributer"] = array( + "#type" => "textfield", + "#title" => t("Any Contributer"), + '#attributes' => array( + "placeholder" => "Please enter contributers name" + ) + ); + + $form["wrapper"]["contact"] = array( + "#type" => "textfield", + "#title" => t("Contact"), + "#required" => TRUE, + '#attributes' => array( + "placeholder" => "Please enter your contact number" + ) + ); + $form["wrapper"]["email"] = array( + "#type" => "textfield", + "#title" => t("Email"), + "#required" => TRUE, + '#default_value' => $user->mail, + '#attributes' => array( + "placeholder" => "Please enter your email" + ) + ); + $form["wrapper"]["proposal_id"] = array( + '#type' => 'select', + '#title' => t('Proposal Type'), + '#options' => get_conference_proposal_available("options"), + //'#description' => t(' you like to do'), + '#attributes' => array('disabled' => 'disabled'), + '#default_value' => $proposal_id, + ); + $form["wrapper"]["title"] = array( + "#type" => "textfield", + "#title" => t("Title"), + "#required" => TRUE, + '#attributes' => array( + "placeholder" => "Please enter your title" + ) + ); + // $form["wrapper"]["abstract"] = array( + // "#type" => "textarea", + // "#title" => t("Abstract"), + // "#required" => TRUE, + // '#attributes' => array( + // "placeholder" => "Please enter your abstract" + // ) + // ); + $form["wrapper"]["bio"] = array( + "#type" => "textarea", + "#title" => t("Bio"), + "#required" => TRUE, + '#attributes' => array( + "placeholder" => "Please enter your bio" + ) + ); + $form["wrapper"]["link"] = array( + "#type" => "textfield", + "#title" => t("Link"), + '#attributes' => array( + "placeholder" => "Please enter proposal related link" + ) + ); + $form["wrapper"]["abstract_file"] = array( + "#type" => "file", + "#title" => t("Abstract File" . required_star()), + "#description" => t("Please upload your abstract file in [.pdf] format"), + ); + $form["wrapper"]["supported_file"] = array( + "#type" => "file", + "#title" => t("Supporting File"), + "#description" => t("Please upload your suporting file in [.zip] format"), + ); + $form["wrapper"]["user_id"] = array( + "#type" => "hidden", + "#default_value" => $user->uid, + ); + $form["wrapper"]["submit"] = array( + "#type" => "submit", + "#value" => "Submit Abstract" + ); + return $form; + } + + function conference_proposal_application_form_validate($form, &$form_state) { + $abstractfile = file_save_upload('abstract_file', array( + // Validate extensions. + + 'file_validate_extensions' => array('pdf'), + + )); + // If the file passed validation: + if ($abstractfile) { + + // Move the file into the Drupal file system. + if ($abstractfile = file_move($abstractfile, 'public://')) { + // Save the file for use in the submit handler. + $form_state['storage']['abstract_file'] = $abstractfile; + } + else { + form_set_error('abstract_file', t("Failed to uploaded file to the site's file folder.")); + } + } + else { + form_set_error('abstract_file', t('No file was uploaded.')); + } + + /* validating email field */ + if(!valid_email_address($form_state["values"]["email"])) { + form_set_error('email', t('Please enter an valid email address.')); + } + + $supportedfile = file_save_upload('supported_file', array( + // Validate extensions. + 'file_validate_extensions' => array('zip'), + )); + // If the file passed validation: + if ($supportedfile) { + // Move the file into the Drupal file system. + if ($supportedfile = file_move($supportedfile, 'public://')) { + // Save the file for use in the submit handler. + $form_state['storage']['supported_file'] = $supportedfile; + } + else { + form_set_error('supported_file', t("Failed to uploaded file to the site's file folder.")); + } + } + else { + form_set_error('supported_file', t('No file was uploaded.')); + } + } + + function conference_proposal_application_form_submit($form, &$form_state) { + $v = $form_state["values"]; + $abstract_file = $form_state["storage"]["abstract_file"]; + + $supported_file = $form_state["storage"]["supported_file"]; + $query = " + INSERT INTO proposal_applications + (first_name, last_name, contributer, contact, email, title, bio, link, proposal_file, supported_file, proposal_id, uid) + VALUES + (:fname, :lname, :contributer, :contact, :email, :title, :bio, :link, :abstract_file, :supported_file, :proposal_id, :user_id) + "; + $args = array( + + ":fname" => $v["fname"], + ":lname" => $v["lname"], + ":contact" => $v["contact"], + ":contributer" => $v["contributer"], + ":email" => $v["email"], + ":title" => $v["title"], + //":abstract" => $v["abstract"], + ":bio" => $v["bio"], + ":link" => $v["link"], + ":abstract_file" => $abstract_file->filename, + ":supported_file" => $supported_file->filename, + ":proposal_id" => $v["proposal_id"], + ":user_id" => $v["user_id"], + ); + /* storing the row id in $result */ + $result = db_query($query, $args, array('return' => Database::RETURN_INSERT_ID)); + dpm($result); + + /* moving the file to uploads */ + $base_path = $_SERVER['DOCUMENT_ROOT'] . base_path(); + $uploads_dir = $base_path . "uploads/proposal_file"; + if(!file_exists($uploads_dir . "/{$result}/")) { + mkdir($uploads_dir . "/{$result}/", 0755, TRUE); + } + + + // $from = "abstarct@scilab.in"; + // $to = $v["email"]; + // // $cc = $emails; + // $bcc = "rush2jrp@gmail.com"; + // $subject = "Test Mail"; + // $message = " + + // <p><em>Please check the abstract to this mail.</em></p> + // "; + // $file = $uploads_dir . "/{$result}/" . $abstract_file->filename; + // dpm($file); + // $mail_status = send_mail_attachment($from, $to, "", $bcc, $subject, $message, $file); + // if(!$mail_status) { + // drupal_set_message("An error occurred while sending mail.", "error"); + // } else { + // drupal_set_message("We have received your application. Thank you!", "status"); + // } + + file_unmanaged_move($abstract_file->uri, $uploads_dir . "/{$result}/{$abstract_file->filename}"); + drupal_set_message("Abstract Uploaded Succesfully"); + file_unmanaged_move($supported_file->uri, $uploads_dir . "/{$result}/{$supported_file->filename}"); + drupal_set_message("Supported files Uploaded Succesfully"); + /* cleaning up temporary storage */ + file_delete($abstract_file); + unset($form["storage"]["abstract_file"]); + file_delete($supported_file); + unset($form["storage"]["supported_file"]); + + drupal_set_message("Thank you for submitting your abstract"); + + + /* sending notification to the applicant */ + $subject = "Abstract received"; + $message = " + Dear {$v['fname']}, + + We have received your abstract + We will get back to you shortly. + + Regards, + FOSSEE Team + "; + send_mail("contact@fossee.in", $v["email"], $subject, $message); + + } + + function conference_proposal_page(){ + $output = ""; + $i = 1; + + $result = get_conference_proposal_available(); + foreach($result as $row) { + $output .= " + <strong>Proposal</strong>: {$row->proposal_name}<br> + <strong>Subbmission Guidelines</strong>: <br>{$row->proposal_requirement}<br> + "; + $output .= "<center>"; + $output .= l("Submit Now ", "conference_proposal/apply/{$row->id}" , array( + "attributes" => array("class" => "btn btn-primary"), + "html" => TRUE, + )); + $output .= "</center><br>"; + + $i++; + } + return $output; + + } + + function conference_proposal_view_application_page($proposal_id=0) { + $markup = ""; + if(array_key_exists("saved", $_GET)){ + drupal_set_message("Selections saved successfully.", "success"); + } + if($proposal_id) { + $result = db_select("proposal_applications") + ->fields("proposal_applications") + ->condition("proposal_id",$proposal_id) + ->execute()->fetchAll(); + + $headers = array( + "#", "Name", "Bio" , "View abstract", "Download abstract", "Selected", + ); + $rows = array(); + $i = 1; + foreach($result as $row) { + $item = array( + $i, + $row->first_name.' '.$row->last_name, + $row->bio, + l(str_replace('.', '_',str_replace(' ', '_',strtolower("{$row->id}_{$row->first_name}_{$row->last_name}"))) . '.pdf', "uploads/proposal_file/{$row->id}/{$row->proposal_file}", array("attributes" => array("target" => "_blank",))), + l(str_replace('.', '_',str_replace(' ', '_',strtolower("{$row->id}_{$row->first_name}_{$row->last_name}"))) . '.zip', "uploads/proposal_file/{$row->id}/{$row->supported_file}", array("attributes" => array("target" => "_blank",))), + ); + if($row->selected) { + $check = "<input class='shortlist' type='checkbox' data-aid='{$row->id}' checked>"; + } else { + $check = "<input class='shortlist' type='checkbox' data-aid='{$row->id}'>"; + } + array_push($item, $check); + // $proposal = db_select("proposal_type") + // ->fields("proposal_type") + // ->condition("id", $proposal_id) + // ->execute()->fetchObject(); + + // $base_path= $_SERVER['DOCUMENT_ROOT'] . base_path(); + // $downloads_dir = "uploads/proposal_file/{$row->id}/{$row->proposal_file}"; + // $files = $downloads_dir; + // $zipname = str_replace(' ','_',strtolower($proposal->proposal_name.'_'.'.zip')); + // $zip = new ZipArchive; + // $zip->open($zipname, ZipArchive::CREATE); + // $zip->addFile($files, str_replace('.','_',str_replace(' ','_',strtolower("{$row->id} {$row->first_name} {$row->last_name}" ))) . ".pdf"); + // $zip->close(); + + array_push($rows, $item); + $i++; + } + + $proposal = db_select("proposal_type") + ->fields("proposal_type") + ->condition("id", $proposal_id) + ->execute()->fetchObject(); + $markup .= l("<< Back to the list of Proposals", "conference_proposal/view-applications"); + $markup .= "<div style='float:right'>"; + $markup .= l("Download all applications", "conference_proposal/downloads_applications/{$row->proposal_id}/{$row->id}"); + $markup .= "</div>"; + $markup .= "<h5><u>{$proposal->proposal_name} - List of applications</u></h5>"; + $markup .= bootstrap_table($headers, $rows); + $markup .= l("Save Selections", "conference_proposal/view-applications/", + array( + "query" => array( + "saved" => "true" + ), + "attributes" => array( + "class" => "btn btn-primary" + ) + ) + ); + } else { + /* List all the job positions. + * Change the condition later based on end date. + */ + $result = db_select("proposal_type") + ->fields("proposal_type") + ->condition("status", 0, '<>') + ->execute()->fetchAll(); + $headers = array( + "#", "Proposal", "Time", "Action", + ); + $rows = array(); + foreach($result as $row) { + $item = array( + $row->id, + "{$row->proposal_name}", + $row->time, + l("View applications", "conference_proposal/view-applications/{$row->id}") + ); + array_push($rows, $item); + } + $markup .= "<h5><u>List of Proposals</u></h5>"; + $markup .= bootstrap_table($headers, $rows); + } + $output = array( + "positions_list" => array( + "#prefix" => "<div id='positions-list'>", + "#markup" => $markup, + "#suffix" => "</div>", + ), + ); + return $output; + } + + function conference_proposal_application_page($proposal_id=0){ + $application_form = ""; + if($proposal_id) { + $application_form = drupal_get_form("conference_proposal_application_form", $proposal_id); + $application_form = drupal_render($application_form); + } else { + $application_form = drupal_get_form("conference_proposal_application_form"); + $application_form = drupal_render($application_form); + } + $output = array( + "application_form" => array( + "#prefix" => "", + "#markup" => $application_form, + "#suffix" => "", + ) + ); + return $output; + } + + function get_conference_proposal_available($key="") { + $result = db_select("proposal_type") + ->fields("proposal_type") + ->condition("status", 1) + ->execute()->fetchAll(); + if($key == "options") { + $options = array(); + foreach($result as $row) { + $options[$row->id] = "{$row->proposal_name}"; + } + return $options; + } else { + return $result; + } + } + + function conference_proposal_ajax($item="", $key="") { + $data = ""; + if($item == "shortlist") { + $query = " + UPDATE proposal_applications + SET selected = !selected + WHERE id = aid + "; + $args = array( + ":aid" => $key + ); + db_query($query, $args); + $data = "updated"; + } + echo $data; + exit(); + } + function conference_proposal_init() { + drupal_add_js("misc/form.js"); + drupal_add_js("misc/collapse.js"); + drupal_add_js( + drupal_get_path('module', 'conference_proposal') . '/js/main.js', + array( + 'group' => JS_THEME, + 'weight' => 20, + 'every_page' => TRUE, + 'cache' => TRUE, + //'scope' => 'header', + ) + ); + } + function required_star() { + return "<span class='form-required' title='This field is required.'> *</span>"; + } + + function bootstrap_table($headers, $rows) { + $thead = ""; + $tbody = ""; + foreach($headers as $header) { + $thead .= "<th>{$header}</th>"; + } + foreach($rows as $row) { + $tbody .= "<tr>"; + foreach($row as $data) { + $tbody .= "<td>{$data}</td>"; + } + $tbody .= "</tr>"; + } + $table = " + <table class='table table-bordered table-hover'> + <thead>{$thead}</thead> + <tbody>{$tbody}</tbody> + </table> + "; + return $table; + } + + /** + * Simple wrapper function for drupal_mail() to avoid extraneous code. + */ + function send_mail($from, $to, $subject, $message) { + $my_module = 'conference_proposal'; + $my_mail_token = microtime(); + $message = array( + 'id' => $my_module . '_' . $my_mail_token, + 'to' => $to, + 'subject' => $subject, + 'body' => array($message), + 'headers' => array( + 'From' => $from, + 'Sender' => $from, + 'Return-Path' => $from, + 'Bcc' => 'prashantsinalkar@gmail.com', + ), + ); + $system = drupal_mail_system($my_module, $my_mail_token); + $message = $system->format($message); + if ($system->mail($message)) { + return TRUE; + } + else { + return FALSE; + } + } + + function send_mail_attachment($from, $to, $cc, $bcc, $subject, $message, $file) { + // $file should include path and filename + $filename = basename($file); + $file_size = filesize($file); + $content = chunk_split(base64_encode(file_get_contents($file))); + $uid = md5(uniqid(time())); + $from = str_replace(array("\r", "\n"), '', $from); // to prevent email injection + $header = "From: ".$from."\r\n" + ."Cc: ".$cc."\r\n" + ."Bcc: ".$bcc."\r\n" + ."MIME-Version: 1.0\r\n" + ."Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n" + ."This is a multi-part message in MIME format.\r\n" + ."--".$uid."\r\n" + ."Content-type: text/html; charset=UTF-8; format=flowed\r\n" + ."Content-Transfer-Encoding: 7bit\r\n\r\n" + .$message."\r\n\r\n" + ."--".$uid."\r\n" + ."Content-Type: application/octet-stream; name=\"".$filename."\"\r\n" + ."Content-Transfer-Encoding: base64\r\n" + ."Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n" + .$content."\r\n\r\n" + ."--".$uid."--"; + return mail($to, $subject, "", $header); + } + + + ?> diff --git a/css/base.css b/css/base.css new file mode 100755 index 0000000..6976f69 --- /dev/null +++ b/css/base.css @@ -0,0 +1,302 @@ +/* -------------- Form Elements ------------- */ + +fieldset { + background: #f9f8cc; + border: 1px solid #cccccc; + margin-top: 10px; + margin-bottom: 32px !important; + padding: 10px; + position: relative; + border: 1px solid #cccccc !important; + top: 12px; /* Offsets the negative margin of legends */ + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.fieldset-wrapper { + margin-top: 10px; +} +.node-form .vertical-tabs .fieldset-wrapper { + margin-top: 0; +} +.filter-wrapper { + top: 0; + padding: 1em 0 0.2em; + -khtml-border-radius-topright: 0; + -khtml-border-radius-topleft: 0; + -moz-border-radius-topright: 0; + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + -webkit-border-top-right-radius: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.filter-help a { + font-size: 0.857em; + padding: 2px 20px 0; +} +.filter-wrapper .form-item label { + margin-right: 10px; +} +.filter-wrapper .form-item { + padding: 0 0 0.5em 0.5em; +} +.filter-guidelines { + padding: 0 1.5em 0 0.5em; +} +fieldset.collapsed { + background: transparent; + -khtml-border-radius: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + border: 10px #dddddd solid; +} +fieldset legend { +width: auto; +border: 1px #1a6f93 solid; +color: black; +font-family: Arial; +font-weight: none; +font-size: 25px; +margin-left: 25px; +padding-right: 5px; +padding-left: 2px; +padding-top: 2px; +padding-bottom: 2px; +background:#f9f7cc; +-moz-border-radius: 10px; +margin-bottom: 10px; + + } +fieldset.collapsed legend { + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +fieldset legend a { + color: #3b3b3b; +} +fieldset legend a:hover, +fieldset legend a:focus, +fieldset legend a:active { + color: #000; +} +fieldset .fieldset-wrapper { + padding: 0 15px 15px; +} +fieldset .fieldset-description { + margin-top: 5px; + margin-bottom: 1em; + line-height: 1.4; + color: #3c3c3c; + font-style: italic; +} +input { + margin: 2px 0; + padding: 4px; +} +input, +textarea { + font-size: 0.929em; +} +textarea { + line-height: 1.5; +} +textarea.form-textarea, +select.form-select { + padding: 4px; +} +input.form-text, +textarea.form-textarea, +select.form-select { + border: 1px solid #ccc; +} +input.form-submit:hover, +input.form-submit:focus { + background: #dedede; +} +.password-suggestions ul li { + margin-left: 1.2em; /* LTR */ +} +.form-item { + margin-bottom: 1em; + margin-top: 2px; +} +.form-item label { + font-size: 0.929em; +} +.form-type-radio label, +.form-type-checkbox label { + margin-left: 4px; +} +.form-type-radio .description, +.form-type-checkbox .description { + margin-left: 2px; +} +.form-actions { + padding-top: 10px; +} +/* Contact Form */ +.contact-form #edit-name { + width: 75%; + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.contact-form #edit-mail { + width: 75%; + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.contact-form #edit-subject { + width: 75%; + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.contact-form #edit-message { + width: 76.3%; + -khtml-border-top-left-radius: 4px; + -khtml-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.contact-form .resizable-textarea .grippie { + width: 76%; + -khtml-border-bottom-left-radius: 4px; + -khtml-border-bottom-right-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} + +/* Disabled form elements */ +input.form-button-disabled, +input.form-button-disabled:hover, +input.form-button-disabled:focus, +input.form-button-disabled:active, +.form-disabled input, +.form-disabled select, +.form-disabled textarea { + background: #ededed; + border-color: #bbb; + color: #717171; +} +.form-disabled .grippie { + background-color: #ededed; + border-color: #bbb; +} +.form-disabled label { + color: #717171; +} + +/* Animated throbber */ +html.js input.form-autocomplete { + background-position: 100% 4px; /* LTR */ +} +html.js input.throbbing { + background-position: 100% -16px; /* LTR */ +} + +/* Comment form */ +.comment-form label { + float: left; /* LTR */ + font-size: 0.929em; + width: 120px; +} +.comment-form input, +.comment-form .form-select { + margin: 0; + -khtml-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +.comment-form .form-type-textarea label { + float: none; +} +.comment-form .form-item, +.comment-form .form-radios, +.comment-form .form-type-checkbox, +.comment-form .form-select { + margin-bottom: 10px; + overflow: hidden; +} +.comment-form .form-type-checkbox, +.comment-form .form-radios { + margin-left: 120px; /* LTR */ +} +.comment-form .form-type-checkbox label, +.comment-form .form-radios label { + float: none; + margin-top: 0; +} +.comment-form input.form-file { + width: auto; +} +.no-sidebars .comment-form .form-text { + width: 800px; +} +.one-sidebar .comment-form .form-text { + width: 500px; +} +.two-sidebars .comment-form .form-text { + width: 320px; +} +.comment-form .form-item .description { + font-size: 0.786em; + line-height: 1.2; + margin-left: 120px; /* LTR */ +} +#content h2.comment-form { + margin-bottom: 0.5em; +} +.comment-form .form-textarea { + -khtml-border-radius-topleft: 4px; + -khtml-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.comment-form fieldset.filter-wrapper .fieldset-wrapper, +.comment-form .text-format-wrapper .form-item { + margin-top: 0; + margin-bottom: 0; +} +.filter-wrapper label { + width: auto; + float: none; +} +.filter-wrapper .form-select { + min-width: 120px; +} +.comment-form fieldset.filter-wrapper .tips { + font-size: 0.786em; +} +#comment-body-add-more-wrapper .form-type-textarea label { + margin-bottom: 0.4em; +} +#edit-actions input { + margin-right: 0.6em; /* LTR */ +} +fieldset p { + margin: 0 0 5px; + text-align: left; +} diff --git a/css/main.css b/css/main.css new file mode 100755 index 0000000..8a36e99 --- /dev/null +++ b/css/main.css @@ -0,0 +1,24 @@ +/* override bootstrap */ +.btn-large { + padding: 8px 19px !important; +} +/* main styles */ +#job-application input[type=text], +#job-application select { + width: 55%; +} +#job-description legend, +#job-application legend { + text-align: center; +} +#quick-links { + position: fixed; + left: 45px; + top: 250px; +} +.sync-msg { + font-size: .8em; +} +.messages.success { + background: lightgreen; +} diff --git a/css/table.css b/css/table.css new file mode 100755 index 0000000..01fbe25 --- /dev/null +++ b/css/table.css @@ -0,0 +1,22 @@ +.CSS_Table_Example { + margin:0px;padding:0px; + width:100%; + box-shadow: 10px 10px 5px #888888; + border:1px solid #000000; + -moz-border-radius-bottomleft:9px; + -webkit-border-bottom-left-radius:9px; + border-bottom-left-radius:9px; + -moz-border-radius-bottomright:9px; + -webkit-border-bottom-right-radius:9px; + border-bottom-right-radius:9px; + -moz-border-radius-topright:9px; + -webkit-border-top-right-radius:9px; + border-top-right-radius:9px; + -moz-border-radius-topleft:9px; + -webkit-border-top-left-radius:9px; + border-top-left-radius:9px; +}.CSS_Table_Example table{ + width:100%; + height:100%; + margin:0px;padding:0px; +}
\ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100755 index 0000000..6e33712 --- /dev/null +++ b/js/main.js @@ -0,0 +1,19 @@ +(function($) { +$(document).ready(function() { + var basePath = Drupal.settings.basePath; + var modPath = basePath + "conference_proposal/"; + + $shortlist = $(".shortlist"); + $shortlist.click(function (e) { + $(".sync-msg").remove(); + $(this).after("<span class='sync-msg'>Saving...</span>"); + $.ajax({ + url: modPath + "ajax/shortlist/" + $(this).data("aid"), + success: function() { + $(".sync-msg").remove(); + console.log("success"); + } + }); + }); +}); +})(jQuery); diff --git a/js/smooth_scroll.js b/js/smooth_scroll.js new file mode 100755 index 0000000..d16dc1a --- /dev/null +++ b/js/smooth_scroll.js @@ -0,0 +1,26 @@ +(function($) { + $(document).ready(function() { + $('a[href*=#]:not([href=#])').click(function() { + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') + || location.hostname == this.hostname) { + + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); + if (target.length) { + $('html,body').animate({ + scrollTop: target.offset().top + }, 1000); + return false; + } + } + }); + $(".quick").click(function() { + $(".quick").removeClass("badge-success"); + $(this).addClass("badge-success"); + setTimeout(function() { + $(".quick").removeClass("badge-success"); + }, 4000); + }); + $('.quick').tooltip(); + }); +})(jQuery); |