Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CaffeinaLab/aeria
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Diener committed Feb 5, 2016
2 parents 3e67c2c + d71dc08 commit 6a41c26
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 8 additions & 2 deletions classes/AeriaSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function($post) use ($args){
$value_type = ( isset($_POST['section_type_'.$s] ) && !empty( $_POST['section_type_'.$s] ) )? $_POST['section_type_'.$s] : '' ;
}
if( $value_type ) $sections['section_'.$s]['section_type'] = $value_type;

//save classic fields
if(isset($args['fields']) && !empty($args['fields']) && isset($args['fields'][0]['type'])){
foreach ($args['fields'] as $field) {
Expand Down Expand Up @@ -220,6 +220,12 @@ public static function render_field($field=null,$key=0,$val=''){
echo '<input type="text" id="'.$field['id'].'_'.$key.'" name="'.$field['id'].'_'.$key.'" value="'.$val.'">';
break;

case 'textarea':
echo '<div class="wrap-editor">';
echo '<textarea rows="5" id="'.$field['id'].'_'.$key.'" name="'.$field['id'].'_'.$key.'">'.$val.'</textarea>';
echo '</div>';
break;

case 'wysiwyg':
echo '<div class="wrap-editor">';
wp_editor( stripslashes($val) , $field['id'].'_'.$key );
Expand Down Expand Up @@ -354,7 +360,7 @@ public static function render_section($section_passed = [], $key = 0, $ncol = 1,
if( count( $args['fields'] ) === 1 ){
$value_type = current(array_keys($args['fields']));
}else{
$value_type = isset( $section['section_type'] )?$section['section_type']:''; // get value from general section settings
$value_type = isset( $section['section_type'] )?$section['section_type']:''; // get value from general section settings
AeriaSection::render_relation_fields( $args['fields'],$key,$value_type,$preview_path );
}

Expand Down
22 changes: 11 additions & 11 deletions resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,11 @@ body .aeria-container .container .row-field .select2-container .select2-search i
body #aeria_section .container .row-field .select2-container .select2-search input,
body .aeria-container .box-sections .row-field .select2-container .select2-search input,
body #aeria_section .box-sections .row-field .select2-container .select2-search input {
background: #fff url('../img/select2.png') no-repeat 100% -22px;
background: url('../img/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('../img/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('../img/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('../img/select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
background: #ffffff url('../img/select2.png') no-repeat 100% -22px;
background: url('../img/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #ffffff), color-stop(0.99, #eeeeee));
background: url('../img/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #ffffff 85%, #eeeeee 99%);
background: url('../img/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #ffffff 85%, #eeeeee 99%);
background: url('../img/select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #ffffff 85%, #eeeeee 99%) 0 0;
}
body .aeria-container .container .row .select2-container .select2-search input.select2-active,
body #aeria_section .container .row .select2-container .select2-search input.select2-active,
Expand All @@ -476,11 +476,11 @@ body .aeria-container .container .row-field .select2-container .select2-search i
body #aeria_section .container .row-field .select2-container .select2-search input.select2-active,
body .aeria-container .box-sections .row-field .select2-container .select2-search input.select2-active,
body #aeria_section .box-sections .row-field .select2-container .select2-search input.select2-active {
background: #fff url('../img/select2-spinner.gif') no-repeat 100%;
background: url('../img/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('../img/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('../img/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('../img/select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
background: #ffffff url('../img/select2-spinner.gif') no-repeat 100%;
background: url('../img/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #ffffff), color-stop(0.99, #eeeeee));
background: url('../img/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #ffffff 85%, #eeeeee 99%);
background: url('../img/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #ffffff 85%, #eeeeee 99%);
background: url('../img/select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #ffffff 85%, #eeeeee 99%) 0 0;
}
body .aeria-container .container .row .select2-more-results.select2-active,
body #aeria_section .container .row .select2-more-results.select2-active,
Expand All @@ -500,7 +500,7 @@ body .aeria-container .container .row-field .select2-container-multi .select2-ch
body #aeria_section .container .row-field .select2-container-multi .select2-choices .select2-search-field input.select2-active,
body .aeria-container .box-sections .row-field .select2-container-multi .select2-choices .select2-search-field input.select2-active,
body #aeria_section .box-sections .row-field .select2-container-multi .select2-choices .select2-search-field input.select2-active {
background: #fff url('../img/select2-spinner.gif') no-repeat 0% !important;
background: #ffffff url('../img/select2-spinner.gif') no-repeat 0% !important;
}
body .aeria-container .container .row .select2-search-field input,
body #aeria_section .container .row .select2-search-field input,
Expand Down
2 changes: 1 addition & 1 deletion resources/css/section.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
.box-section .wp-editor-wrap {
margin-top: 30px;
}
.box-section .wrap-fields .wp-editor-wrap {
.box-section .wrap-fields .wp-editor-wrap, .box-section .wrap-fields textarea {
margin: 10px;
}
.box-section .wrap-preview img{
Expand Down

0 comments on commit 6a41c26

Please sign in to comment.