aboutsummaryrefslogtreecommitdiff
path: root/app/public/static/package_create.js
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-27 22:03:54 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-27 22:04:03 +0100
commitfb5cba4cc82efa5cae4e78c5ad75575b615de378 (patch)
tree2f8c542baf23036b3f3f4dc761f2203794b5ffaf /app/public/static/package_create.js
parentfb8aa25b710fe4b6db70a0b54b2d867b737a6cb1 (diff)
downloadcheatdb-fb5cba4cc82efa5cae4e78c5ad75575b615de378.tar.xz
Add dependency detection to importer
Diffstat (limited to 'app/public/static/package_create.js')
-rw-r--r--app/public/static/package_create.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/public/static/package_create.js b/app/public/static/package_create.js
index 2b992f5..771d0fd 100644
--- a/app/public/static/package_create.js
+++ b/app/public/static/package_create.js
@@ -26,13 +26,25 @@ $(function() {
$(".pkg_wiz_2").show()
$(".pkg_repo").hide()
+ function setSpecial(id, value) {
+ if (value != "") {
+ var ele = $(id);
+ ele.val(value);
+ ele.trigger("change")
+ }
+ }
+
performTask("/tasks/getmeta/new/?url=" + encodeURI(repoURL)).then(function(result) {
$("#name").val(result.name || "")
+ setSpecial("#provides_str", result.name || "")
$("#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 || "")
if (result.forumId) {
$("#forums").val(result.forumId)
}