webbuild.js: support for new autospec kde5 template

This commit is contained in:
Silvan Calarco 2015-05-09 12:58:15 +02:00
parent a12a5e03ac
commit 8835883286

View File

@ -47,6 +47,7 @@ function checkMinLength(st,len) {
function suggestSpecName(url) { function suggestSpecName(url) {
var version=""; var version="";
var spectype="";
var url=document.getElementById("speccreateurl").value; var url=document.getElementById("speccreateurl").value;
if (url.indexOf('?') > 0) url=url.substring(0,url.indexOf('?')); if (url.indexOf('?') > 0) url=url.substring(0,url.indexOf('?'));
var specname=url.substring(url.lastIndexOf('/')+1); var specname=url.substring(url.lastIndexOf('/')+1);
@ -125,8 +126,12 @@ function suggestSpecName(url) {
document.getElementById("speccreatetype").options[j].selected=true; document.getElementById("speccreatetype").options[j].selected=true;
}; };
} else if (url.search("kde.org") >= 0) { } else if (url.search("kde.org") >= 0) {
if ((url.search("plasma" >= 0)) || (url.search("frameworks" >= 0)) || (url.search("applications" >= 0)))
spectype="kde5";
else
spectype="kde4";
for (var j=0;j<document.getElementById("speccreatetype").length;j++) { for (var j=0;j<document.getElementById("speccreatetype").length;j++) {
if (document.getElementById("speccreatetype").options[j].value == "kde4") if (document.getElementById("speccreatetype").options[j].value == spectype)
document.getElementById("speccreatetype").options[j].selected=true; document.getElementById("speccreatetype").options[j].selected=true;
}; };
} else { } else {