You've already forked OpenShorte.old
Added URL redirect support directly in management panel
Added buttons that automatically redirects the user to the corresponding URL, in a new page. Modified css and javascript accordingly.
This commit is contained in:
@@ -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 = "<button onclick=\"window.open('" + script_name + "/go/" + response [ 'last_insert' ] + "', '_blank');\">" + response [ 'last_insert' ] + "</button>";
|
||||
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 ( ) {
|
||||
|
Reference in New Issue
Block a user