From 575c131a16d2f29956fef1aff7d878f3d0645a83 Mon Sep 17 00:00:00 2001 From: prashant Date: Tue, 30 Jun 2015 11:09:24 +0530 Subject: Initial commit --- css/base.css | 302 ++++++++++++++++++++++++++++++++++++++++++++++++++++ css/main.css | 24 +++++ fossee_stats.info | 7 ++ fossee_stats.module | 241 +++++++++++++++++++++++++++++++++++++++++ js/main.js | 28 +++++ js/smooth_scroll.js | 26 +++++ 6 files changed, 628 insertions(+) create mode 100755 css/base.css create mode 100755 css/main.css create mode 100755 fossee_stats.info create mode 100755 fossee_stats.module create mode 100755 js/main.js create mode 100755 js/smooth_scroll.js 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/fossee_stats.info b/fossee_stats.info new file mode 100755 index 0000000..fbd35d1 --- /dev/null +++ b/fossee_stats.info @@ -0,0 +1,7 @@ +name = Fossee stats +description = Fossee stats for FOSSEE . +package = STATISTICS +core = 7.x + +stylesheets[all][] = css/base.css +stylesheets[all][] = css/main.css diff --git a/fossee_stats.module b/fossee_stats.module new file mode 100755 index 0000000..ecc0ac7 --- /dev/null +++ b/fossee_stats.module @@ -0,0 +1,241 @@ + array( + "title" => t("Access fossee_stats"), + "description" => t("Allows users to view job postings.") + ), + "manage fossee_stats" => array( + "title" => t("Manage fossee_stats"), + "description" => t("Allows users to manage job postings.") + ), + /* "manage download_application" => array( + "title" => t("Manage Download Portal"), + "description" => t("Allows users to download job applications.") + ),*/ +); + } + + function fossee_stats_menu() { + $items = array(); + $items["fossee-stats"] = array( + "title" => "FOSSEE STATS", + "page callback" => "drupal_get_form", + "page arguments" => array("fossee_stats_form"), + "access arguments" => array("access fossee_stats"), + "type" => MENU_NORMAL_ITEM, + ); + + $items["jobs/ajax"] = array( + "title" => "Ajax callbacks", + "page callback" => "fossee_stats_ajax", + "access arguments" => array("access fossee_stats"), + "type" => MENU_CALLBACK + ); + + return $items; + } + + function fossee_stats_form($form, &$form_state) { + $options_first = _ajax_example_get_first_dropdown_options(); + + // If we have a value for the first dropdown from $form_state['values'] we use + // this both as the default value for the first dropdown and also as a + // parameter to pass to the function that retrieves the options for the + // second dropdown. + if(isset($form_state['values']['foss_type'])){ + $foss_project = isset($form_state['values']['foss_type']) ? $form_state['values']['foss_type'] : key($options_first); + }else{ + $foss_project = ''; + } + //$foss_project=$selected; + $form['foss_type'] = array( + '#type' => 'select', + '#title' => 'FOSS Type', + '#options' => $options_first, + '#default_value' => $foss_project, + // Bind an ajax callback to the change event (which is the default for the + // select form type) of the first dropdown. It will replace the second + // dropdown when rebuilt. + '#ajax' => array( + + // When 'event' occurs, Drupal will perform an ajax request in the + // background. Usually the default value is sufficient (eg. change for + // select elements), but valid values include any jQuery event, + // most notably 'mousedown', 'blur', and 'submit'. + // 'event' => 'change', + 'callback' =>'ajax_example_dependent_dropdown_callback', + 'wrapper' => 'dropdown-second-replace', + ), + ); + if(isset($form_state['values']['foss_sub_project'])){ + $foss_sub_project = isset($form_state['values']['foss_sub_project']) ? $form_state['values']['foss_sub_project'] : key(_ajax_example_get_second_dropdown_options($foss_project)); + }else{ + $foss_sub_project = ''; + } + $form['foss_sub_project'] = array( + '#type' => 'select', + '#title' => t('Foss Sub Project'), + '#options' => _ajax_example_get_second_dropdown_options($foss_project), + // The entire enclosing div created here gets replaced when foss_type + // is changed. + '#prefix' => '