Skip to content
Snippets Groups Projects
Commit c142c4d8 authored by Brian Canini's avatar Brian Canini
Browse files

asc_bootstrap - research ct mobile view theme hook, js, and styles

parent 7bdaf27f
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
/*
* events and news filters
*/
if (($form['#id'] == 'views-exposed-form-events-page-1')||($form['#id'] == 'views-exposed-form-news-page-1')||($form['#id'] == 'views-exposed-form-research-project-directory-page-1')||($form['#id'] == 'views-exposed-form-research-project-gallery-page-1')) {
if (($form['#id'] == 'views-exposed-form-events-page-1')||($form['#id'] == 'views-exposed-form-news-page-1')||($form['#id'] == 'views-exposed-form-research-project-directory-page-1')||($form['#id'] == 'views-exposed-form-research-project-gallery-page-1')||($form['#id'] == 'views-exposed-form-research-database-mobile-page-1')) {
/*
* add new HTML content to filters (headers and spacer)
* and setting weights for where they should appear in the form hierarchy
......@@ -102,6 +102,7 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
/*
* checking if taxonomy has vocabulary - if not, don't display field
*/
//events
if(count($form['field_evt_taxonomy_target_id_1']['#options']) == 1) {
$form['field_evt_taxonomy_target_id_1']['#access'] = FALSE;
}
......@@ -109,7 +110,7 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
if(count($form['field_evt_taxonomy2_target_id']['#options']) == 1) {
$form['field_evt_taxonomy2_target_id']['#access'] = FALSE;
}
//news
if(count($form['field_news_terms_1_target_id']['#options']) == 1) {
$form['field_news_terms_1_target_id']['#access'] = FALSE;
}
......@@ -117,7 +118,7 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
if(count($form['field_news_terms_2_target_id']['#options']) == 1) {
$form['field_news_terms_2_target_id']['#access'] = FALSE;
}
//research
if(count($form['field_research_departments_target_id']['#options']) == 1) {
$form['field_research_departments_target_id']['#access'] = FALSE;
}
......@@ -129,6 +130,18 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
if(count($form['field_research_year_target_id']['#options']) == 1) {
$form['field_research_year_target_id']['#access'] = FALSE;
}
//research - mobile
if(count($form['field_research_departments_target_id']['#options']) == 0) {
$form['field_research_departments_target_id']['#access'] = FALSE;
}
if(count($form['field_research_other_target_id']['#options']) == 0) {
$form['field_research_other_target_id']['#access'] = FALSE;
}
if(count($form['field_research_year_target_id']['#options']) == 0) {
$form['field_research_year_target_id']['#access'] = FALSE;
}
/*
* research filters - setting default value on select box to taxonomy vocabulary
*/
......
......@@ -220,6 +220,93 @@
}
// --------------------------------------------------
//## Research Directory Mobile.
.view-research-database-mobile {
.view-filters {
background: #D8D8D8;
padding: 10px;
}
.filter-heading {
color: #225D62;
width: 100%;
}
.form-item {
background: $white;
padding: 5px 10px;
border-radius: 8px;
margin: 10px 0;
}
.form-type-textfield {
width: 100%;
background: transparent;
padding: 0;
label {
display: none;
}
.form-control {
width: 100%;
border-radius: 0;
}
}
.form-type-textfield {
margin-right: 10px;
input {
min-width: 250px;
}
}
.select-wrapper {
select {
min-width: 250px;
}
&:after {
color: #555555;
font-size: 12px;
}
}
.form-actions {
min-width: 50%;
.button {
text-transform: uppercase;
border-radius: 0;
}
}
.views-row {
.views-col {
background: #F9F9F9;
border: #DDD solid 1px;
padding: 20px;
margin-bottom: 15px;
}
}
.form-item-field-research-departments-target-id-all {
display: none;
}
.form-item-field-research-other-target-id-all {
display: none;
}
.form-item-field-research-year-target-id-all {
display: none;
}
}
// --------------------------------------------------
//## Research Gallery filters.
......
......@@ -10509,6 +10509,84 @@ article .field--name-body {
}
/* line 227, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .view-filters {
background: #D8D8D8;
padding: 10px;
}
/* line 232, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .filter-heading {
color: #225D62;
width: 100%;
}
/* line 237, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-item {
background: #ffffff;
padding: 5px 10px;
border-radius: 8px;
margin: 10px 0;
}
/* line 244, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-type-textfield {
width: 100%;
background: transparent;
padding: 0;
}
/* line 249, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-type-textfield label {
display: none;
}
/* line 253, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-type-textfield .form-control {
width: 100%;
border-radius: 0;
}
/* line 259, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-type-textfield {
margin-right: 10px;
}
/* line 262, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-type-textfield input {
min-width: 250px;
}
/* line 269, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .select-wrapper select {
min-width: 250px;
}
/* line 273, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .select-wrapper:after {
color: #555555;
font-size: 12px;
}
/* line 279, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-actions {
min-width: 50%;
}
/* line 282, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-actions .button {
text-transform: uppercase;
border-radius: 0;
}
/* line 289, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .views-row .views-col {
background: #F9F9F9;
border: #DDD solid 1px;
padding: 20px;
margin-bottom: 15px;
}
/* line 297, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-item-field-research-departments-target-id-all {
display: none;
}
/* line 300, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-item-field-research-other-target-id-all {
display: none;
}
/* line 303, ../assets/sass/components/_filters.scss */
.view-research-database-mobile .form-item-field-research-year-target-id-all {
display: none;
}
/* line 314, ../assets/sass/components/_filters.scss */
.view-research-project-gallery .control-label {
display: none;
}
......
......@@ -100,6 +100,10 @@ jQuery(document).ready(function(){
if(((window.location.pathname == '/people')||(window.location.pathname == '/directory')) && (jQuery(window).width() <= 740)) {
document.location = "people-mobile";
}
//redirect if mobile for research directory main page
if((window.location.pathname == '/research-project-directory') && (jQuery(window).width() <= 740)) {
document.location = "research-project-directory-mobile";
}
//sidebar arrows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment