2021-07-08 13:31:27 +00:00
|
|
|
function repeat_string(str,num){
|
|
|
|
var tmp="";
|
|
|
|
for (var i=0;i<num;i++){
|
|
|
|
tmp += str;
|
|
|
|
}
|
|
|
|
return tmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
function set_dot_for_double_level(){
|
2021-09-12 12:20:03 +00:00
|
|
|
if($('.double-level .o-question-option').length != 0){
|
|
|
|
var width = $('div.o-question').width()
|
|
|
|
var font_size = parseInt($('.double-level .o-question-option').css('font-size').slice(0,-2))
|
|
|
|
$('.double-level tr').each(function(){
|
|
|
|
var tr_w = $(this).find('.o-question-option').width()+$(this).find('.level2-list').width()
|
|
|
|
if (tr_w/width<0.95){
|
|
|
|
$('.dot').text(repeat_string('•',(width*0.95-tr_w)/font_size-2))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2021-07-08 13:31:27 +00:00
|
|
|
}
|
|
|
|
$(function(){
|
|
|
|
set_dot_for_double_level()
|
|
|
|
})
|
|
|
|
$(window).resize(function(){
|
|
|
|
set_dot_for_double_level()
|
|
|
|
})
|