diff --git a/lib/css/manage.css b/lib/css/manage.css index 734087e..51d1c49 100644 --- a/lib/css/manage.css +++ b/lib/css/manage.css @@ -6,6 +6,15 @@ .urlContainer .urlId, .urlContainer .urlLink, .urlContainer .urlControl { display: inline; } +.urlId button { + width: 35px; + height: 35px; + cursor: pointer; + background-color: aqua; + border-radius: 7px; + border: 0px; + outline: none; +} .urlContainer .urlLink { border: none; background-color: transparent; diff --git a/lib/js/manage.js b/lib/js/manage.js index 72e95ab..c8aefbb 100644 --- a/lib/js/manage.js +++ b/lib/js/manage.js @@ -17,7 +17,7 @@ function insertNewURL() { div.appendChild ( document.createElement ( 'text' ) ); div.appendChild ( document.createElement ( 'div' ) ); div.childNodes [ 1 ].classList.add ( "urlId" ); - div.childNodes [ 1 ].innerHTML = response [ 'last_insert' ]; + div.childNodes [ 1 ].innerHTML = ""; div.appendChild ( document.createElement ( 'text' ) ); div.appendChild ( document.createElement ( 'input' ) ); div.childNodes [ 3 ].type = 'text'; @@ -58,7 +58,7 @@ function insertNewURL() { } function editURL(node) { var url = node.childNodes[3].value; - var url_id = node.childNodes[1].innerHTML + var url_id = node.childNodes[1].childNodes[0].innerHTML; var xhr = new XMLHttpRequest ( ); xhr.open ( "POST", 'edit', true ); xhr.onreadystatechange = function ( ) { diff --git a/lib/php/manage.php b/lib/php/manage.php index 642d175..5174dbe 100644 --- a/lib/php/manage.php +++ b/lib/php/manage.php @@ -22,7 +22,7 @@
- rowCount ( ) == 0 ) { echo ( "You have not created any URL yet.
" ); } @@ -30,7 +30,7 @@ $rows = $result->fetchAll ( PDO::FETCH_ASSOC ); foreach ( $rows as $row ) { echo ( "\t\t\t
\n" ); - echo ( "\t\t\t\t
" . $row [ 'ID' ] . "
\n" ); + echo ( "\t\t\t\t
\n" ); echo ( "\t\t\t\t\n" ); echo ( "\t\t\t\t
\n" ); echo ( "\t\t\t\t\t\n" ); @@ -45,7 +45,7 @@