Add create links to topic table
This commit is contained in:
@@ -9,20 +9,11 @@ $(function() {
|
||||
$(".pkg_meta").show()
|
||||
}
|
||||
|
||||
function repoIsSupported(url) {
|
||||
// try {
|
||||
// return URI(url).hostname() == "github.com"
|
||||
// } catch(e) {
|
||||
// return false
|
||||
// }
|
||||
return true
|
||||
}
|
||||
|
||||
$(".pkg_meta").hide()
|
||||
$(".pkg_wiz_1").show()
|
||||
$("#pkg_wiz_1_next").click(function() {
|
||||
const repoURL = $("#repo").val();
|
||||
if (repoIsSupported(repoURL)) {
|
||||
if (repoURL.trim() != "") {
|
||||
$(".pkg_wiz_1").hide()
|
||||
$(".pkg_wiz_2").show()
|
||||
$(".pkg_repo").hide()
|
||||
@@ -36,22 +27,22 @@ $(function() {
|
||||
}
|
||||
|
||||
performTask("/tasks/getmeta/new/?url=" + encodeURI(repoURL)).then(function(result) {
|
||||
$("#name").val(result.name || "")
|
||||
setSpecial("#provides_str", result.provides || "")
|
||||
$("#title").val(result.title || "")
|
||||
$("#name").val(result.name)
|
||||
setSpecial("#provides_str", result.provides)
|
||||
$("#title").val(result.title)
|
||||
$("#repo").val(result.repo || repoURL)
|
||||
$("#issueTracker").val(result.issueTracker || "")
|
||||
$("#desc").val(result.description || "")
|
||||
$("#shortDesc").val(result.short_description || "")
|
||||
setSpecial("#harddep_str", result.depends || "")
|
||||
setSpecial("#softdep_str", result.optional_depends || "")
|
||||
$("#shortDesc").val(result.short_description || "")
|
||||
$("#issueTracker").val(result.issueTracker)
|
||||
$("#desc").val(result.description)
|
||||
$("#shortDesc").val(result.short_description)
|
||||
setSpecial("#harddep_str", result.depends)
|
||||
setSpecial("#softdep_str", result.optional_depends)
|
||||
$("#shortDesc").val(result.short_description)
|
||||
if (result.forumId) {
|
||||
$("#forums").val(result.forumId)
|
||||
}
|
||||
|
||||
if (result.type && result.type.length > 2) {
|
||||
$("#type").val(result.type);
|
||||
$("#type").val(result.type)
|
||||
}
|
||||
|
||||
finish()
|
||||
|
||||
Reference in New Issue
Block a user