מדיה ויקי:RefToolbar.js – הבדלי גרסאות
תוכן שנמחק תוכן שנוסף
adding url lookup |
make sure data.authors is defined before trying to use |
||
שורה 488:
var i,j, coauthors;
$('.'+cl+'title').val(data.title);
if ($('.'+cl+'last-incr-1').length != 0) {▼
if (data.authors) {
var classes = $('.'+cl+'last-incr-1').eq(0).attr('class').split(/\s+/);▼
▲ if ($('.'+cl+'last-incr-1').length != 0) {
var group = false;▼
for (var c=0; c<classes.length; c++) {▼
if (patt.exec(classes[c])) {
break;▼
group = patt.exec(classes[c])[1];
}▼
}▼
$('.'+cl+'last-incr-1').val(data.authors[0][0])▼
$('.'+cl+'first-incr-1').val(data.authors[0][1])▼
elemid = '#cite-incr-'+template+'-'+group;▼
$('.'+cl+' } else if ($('.'+cl+'author-incr-1').length != 0) {▼
var group = false;
var patt = /cite-[^-]*?-incr-(.*)/ } else if ($('.'+cl+'last1').length != 0) {
if ($('.'+cl+'last'+(i+1)).length) {
$('.'+cl+'first'+(i+1)).val(data.authors[i][1]);
} else {
coauthors.push(data.authors[j].join(', '));
$('.'+cl+'coauthors').val(coauthors.join('; '));▼
break;▼
}
}
if ($('.'+cl+'author'+(i+1)).length) {▼
} else {▼
coauthors = [];
}
break;▼
}
}
▲ $('.'+cl+'coauthors').val(coauthors.join('; '));
▲ break;
▲ }
▲ if ($('.'+cl+'author'+(i+1)).length) {
▲ $('.'+cl+'author'+(i+1)).val(data.authors[i].join(', '));
} else {
var
}
$('.'+cl+'
▲ break;
}
▲ } else {
▲ var authors = [];
▲ for(i=0; data.authors && i<data.authors.length; i++) {
▲ authors.push(data.authors[i].join(', '));
▲ $('.'+cl+'authors').val(authors.join('; '));
}
if (type === 'pmid' || type === 'doi') {
if (data.fulldate || !$('.'+cl+'month').length) {
|