add a tag

This commit is contained in:
Jay McCarthy 2013-10-08 14:40:22 -06:00
parent a7e39f6dec
commit 476ab123f2
3 changed files with 19 additions and 6 deletions

View File

@ -29,7 +29,7 @@
<tr><td>Last Edit:</td><td><span id="pi_last_edit"></span></td></tr>
<tr><td>Description:</td><td><span id="pi_description"></span></td></tr>
<tr><td>Tags:</td><td><span id="pi_tags"></span></td></tr>
<tr><td>XXX</td><td>Add a tag</td></tr>
<tr><td></td><td><input type="text" id="pi_add_tag_text" class="text ui-widget-content ui-corner-all" /><button id="pi_add_tag_button">Add Tag</button></td></tr>
<tr><td>Versions Exceptions</td><td><table id="pi_versions"></table></td></tr>
</table>

View File

@ -1,9 +1,10 @@
// xxx display curation if allowed -- http://localhost:8001/#(!:conflicts:)(ring:2)
// xxx logout
// xxx what user am i
// xxx upload
// xxx upload package
// xxx bulk upload api
// xxx update
// xxx show info about a package
// xxx add a tag api
$( document ).ready(function() {
$("#package_info").dialog({
@ -42,12 +43,23 @@ $( document ).ready(function() {
return [tag, " "]; } ) )
$( "#pi_versions" ).html("").append( $.map( pkgi['versions'], function ( vo, v ) {
return [ $('<tr>').append( $('<td>').html(v),
$('<td>').html(vo['source']) ),
$('<td>').html(vo['source']) ),
$('<tr>').append( $('<td>').html(""),
$('<td>').html(vo['checksum']) ),
$('<td>').html(vo['checksum']) ),
" "]; } ) )
active_info = pkgi; };
function submit_add_tag () {
var it = $( "#pi_add_tag_text" );
// <xxx>
active_info['tags'].push( it.val() );
update_info( active_info );
// </xxx>
it.val("");}
$( "#pi_add_tag_text" ).keypress( function (e) {
if (e.which == 13) { submit_add_tag (); } } );
$( "#pi_add_tag_button" ).click( function (e) { submit_add_tag (); } );
var search_terms = { };
function parse_hash ( h ) {

View File

@ -96,12 +96,13 @@ table.packages tbody tr.even {
}
.package table td:nth-child(2) {
text-align: left;
width: 60%;
}
.package table td.submit {
text-align: center;
}
.package input {
width: 100%;
width: 50%;
}
.package textarea {
width: 100%;