edit page css to fix the layout

This commit is contained in:
BOHUNG 2020-01-12 21:47:55 +08:00
parent 456ce12222
commit 9aba9a3f0b
2 changed files with 36 additions and 3 deletions

View File

@ -1,6 +1,20 @@
$(document).ready(function(){
var head_data = $.post("/cancerpredictResult",{"header":1,locale:I18n.locale});
var data = {};
if(I18n.locale == 'en'){
var window_width = $(window).width();
if(window_width < 520){
$('#cancer_table .cencer_table_name').css('max-width','');
}else if(window_width < 768){
$('#cancer_table .cencer_table_name').css({'max-width':'','width':'11em'});
}else if(window_width < 860){
$('#cancer_table .cencer_table_name').css('max-width','30%');
}else if(window_width < 1130){
$('#cancer_table .cencer_table_name').css('max-width','33%');
}else{
$('#cancer_table .cencer_table_name').css('max-width','39%');
};
};
head_data.done(function(){
// $('.header-nav').html(head_images.responseJSON['head_images']);
// $('.navbar-brand').html(head_images.responseJSON['title'])
@ -219,10 +233,10 @@ $(document).ready(function(){
flag = 1;
for(var i = 0;i < $('#cancer_table .cancer_form_field').length;i++){
if($('#cancer_table .cancer_form_field').eq(i).hasClass('num_only')){
if($('#cancer_table .cancer_form_field').eq(i).siblings('.num_only_value').val()==""){
if($('#cancer_table .cancer_form_field').eq(i).val()==""){
flag = 0;
$('#cancer_table .cancer_form_field').eq(i).addClass('cancertable_empty');
}else{
}else if($('#cancer_table .cancer_form_field').eq(i).val() != "" && !$('#cancer_table .cancer_form_field').eq(i).hasClass('cancertable_empty')){
$('#cancer_table .cancer_form_field').eq(i).removeClass('cancertable_empty');
};
}else{
@ -797,4 +811,18 @@ $(window).resize(function(){
}else{
$('#cancer_predict_result').attr('style','');
};
if(I18n.locale == 'en'){
var window_width = $(window).width();
if(window_width < 520){
$('#cancer_table .cencer_table_name').css('max-width','');
}else if(window_width < 768){
$('#cancer_table .cencer_table_name').css({'max-width':'','width':'11em'});
}else if(window_width < 860){
$('#cancer_table .cencer_table_name').css('max-width','30%');
}else if(window_width < 1130){
$('#cancer_table .cencer_table_name').css('max-width','33%');
}else{
$('#cancer_table .cencer_table_name').css('max-width','39%');
};
};
});

View File

@ -45,11 +45,16 @@ div.num_group{
width: 16.25em;
}
}
@media screen and (max-width: 71em){
@media screen and (min-width: 28.375em) and (max-width: 71em){
#cancer_table .cencer_table_name{
width: 12.25em;
}
}
@media screen and (max-width: 28.25em){
#cancer_table .cencer_table_name{
width: 7em;
}
}
#cancer_predict_result_block .cencer_table_name{
width: 5em;
}