edit page css to fix the layout
This commit is contained in:
parent
456ce12222
commit
9aba9a3f0b
|
@ -1,6 +1,20 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var head_data = $.post("/cancerpredictResult",{"header":1,locale:I18n.locale});
|
var head_data = $.post("/cancerpredictResult",{"header":1,locale:I18n.locale});
|
||||||
var data = {};
|
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(){
|
head_data.done(function(){
|
||||||
// $('.header-nav').html(head_images.responseJSON['head_images']);
|
// $('.header-nav').html(head_images.responseJSON['head_images']);
|
||||||
// $('.navbar-brand').html(head_images.responseJSON['title'])
|
// $('.navbar-brand').html(head_images.responseJSON['title'])
|
||||||
|
@ -219,10 +233,10 @@ $(document).ready(function(){
|
||||||
flag = 1;
|
flag = 1;
|
||||||
for(var i = 0;i < $('#cancer_table .cancer_form_field').length;i++){
|
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).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;
|
flag = 0;
|
||||||
$('#cancer_table .cancer_form_field').eq(i).addClass('cancertable_empty');
|
$('#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');
|
$('#cancer_table .cancer_form_field').eq(i).removeClass('cancertable_empty');
|
||||||
};
|
};
|
||||||
}else{
|
}else{
|
||||||
|
@ -797,4 +811,18 @@ $(window).resize(function(){
|
||||||
}else{
|
}else{
|
||||||
$('#cancer_predict_result').attr('style','');
|
$('#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%');
|
||||||
|
};
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,11 +45,16 @@ div.num_group{
|
||||||
width: 16.25em;
|
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{
|
#cancer_table .cencer_table_name{
|
||||||
width: 12.25em;
|
width: 12.25em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media screen and (max-width: 28.25em){
|
||||||
|
#cancer_table .cencer_table_name{
|
||||||
|
width: 7em;
|
||||||
|
}
|
||||||
|
}
|
||||||
#cancer_predict_result_block .cencer_table_name{
|
#cancer_predict_result_block .cencer_table_name{
|
||||||
width: 5em;
|
width: 5em;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue