' + variable + " " + this[2] + ''; chk = this[0]; } }); if ( leng > 0 ) { insert += '';} $(target).append(insert); } var csvfile01 = 'data/art.csv?time=' + String((new Date).getTime()); //愛知県芸術劇場 function readCsv02(data02) { var target = '#csv-data02', csv02 = $.csv.toArrays(data02), leng = csv02.length, insert = '', chk = ''; ( leng > 0 ) ? insert += '

愛知県芸術劇場' : $(target).remove(); csv02.sort(function(index, element){ var fix = ['大ホール','コンサートホール','小ホール','リハーサル室']; var first = fix.indexOf(index[0]); var second = fix.indexOf(element[0]); if ( index[0] == 'リハーサル室') { var fix2 = ['大リハーサル室','中リハーサル室']; var first2 = fix2.indexOf(index[1]); var second2 = fix2.indexOf(element[1]); return first - second || first2 - second2 || index[2] - element[2]; } else { return first - second || index[2] - element[2]; } }); $.each(csv02, function(index, element) { if (this.length > 0) { day = this[2]; view = this[0]; (day) ? day = this[2].slice(0, 2) + ":" + this[2].slice(2) : day = ""; if ( view != "" && view != chk ){ insert += '

' + this[0] + '';} insert += '

'; if ( day != ""){ insert += day + " "; } insert += this[3] + ''; chk = this[0]; } }); if ( leng > 0 ) { insert += '';} $(target).append(insert); } var csvfile02 = 'data/stage.csv?time=' + String((new Date).getTime()); //アートスペース・その他 function readCsv03(data03) { var target = '#csv-data03', csv03 = $.csv.toArrays(data03), leng = csv03.length, insert = '', chk = ''; ( leng > 0 ) ? insert += '

アートスペース・その他' : $(target).remove(); csv03.sort(function(index, element){ var fix = ['アートスペース','その他']; var first = fix.indexOf(index[0]); var second = fix.indexOf(element[0]); if(index[0] > element[0]) return -1; if(index[0] < element[0]) return 1; if(index[1] > element[1]) return 1; if(index[1] < element[1]) return -1; if(index[2] > element[2]) return 1; if(index[2] < element[2]) return -1; if(index[3] > element[3]) return 1; if(index[3] < element[3]) return -1; return 0; }); $(csv03).each(function() { if (this.length > 0) { day = this[2]; view = this[0]; (day) ? day = this[2].slice(0, 2) + ":" + this[2].slice(2) : day = ""; variable = this[1].replace(/アートスペース/g, ''); if ( view != "" && view != chk ){ insert += '

' + this[0] + '';} if ( day != ""){ insert += day + " ";} insert += variable + " " + this[3] + ''; chk = this[0]; } }); if ( leng > 0 ) { insert += '';} $(target).append(insert); } var csvfile03 = 'data/other.csv?time=' + String((new Date).getTime());