From 11109c8372146299e420fa859c3b9602d33721d9 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 10 Oct 2013 13:21:09 -0600 Subject: [PATCH] upload button --- .../meta/pkg-index/official/static/index.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkgs/plt-services/meta/pkg-index/official/static/index.js b/pkgs/plt-services/meta/pkg-index/official/static/index.js index e3916f56dd..0465f9c108 100644 --- a/pkgs/plt-services/meta/pkg-index/official/static/index.js +++ b/pkgs/plt-services/meta/pkg-index/official/static/index.js @@ -353,7 +353,27 @@ $( document ).ready(function() { ")" ] : ""), " | ", jslink( "upload", function () { - console.log("XXX upload"); }), + var value = { name: "", + author: me(), + authors: [ me() ], + 'checksum-error': false, + conficts: [], + dependencies: [], + description: "", + 'last-checked': now, + 'last-edit': now, + 'last-updated': now, + modules: [], + ring: 2, + source: "", + 'source_url': "", + tags: [], + versions: []}; + value['search-terms'] = {}; + value['search-terms'][("author:" + me())] = true; + add_package_to_list (value); + evaluate_search(); + open_info(value); }), " | ", jslink( "update", function () { dynamic_send ( "/jsonp/update", {} ); }),