Mercurial > hg > LGToc
changeset 17:2e6bf16b0be3
Commit from test site
author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
---|---|
date | Tue, 21 Mar 2017 18:05:52 +0100 |
parents | 0bbf7b85d005 |
children | a15320882b30 |
files | check_sections_details.php config/config.php js/check_sections_details.js |
diffstat | 3 files changed, 28 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/check_sections_details.php Wed Jul 15 12:03:22 2015 +0200 +++ b/check_sections_details.php Tue Mar 21 18:05:52 2017 +0100 @@ -104,11 +104,11 @@ $output = file_get_contents($lg_url); $user_info = json_decode($output, true); $current_editor = (string)$user_info['userName']; - + if ($current_editor == null || $current_editor == "" || strcmp($current_editor, "") === 0 || strcmp($user_info['status'], "ok") !== 0) { // redirect to LGServices homepage - //header("Location: http://localgazetteers.mpiwg-berlin.mpg.de/LGServices"); header("Location: "+$lgserver_url+"LGServices"); + //header('Location: http://localgazetteers/LGServices'); } } else { @@ -190,19 +190,19 @@ </div> <div id="panel"></div> <script> - var version = <?php echo $version;?>; - var session_id = "<?php echo $_GET['sessionId']; ?>"; + var version=<?php echo $version;?>; + var session_id = "<?php echo $_GET['sessionId'];?>"; </script> <script type="text/javascript"> function setCurrentEditor() { // current_editor is gotten from LGService var current_editor = <?php echo json_encode($current_editor) ?>; - if (current_editor != "") { + if (current_editor != "") { $("#saveBook .editor").val(current_editor); } else { alert("Error!! You have to login from LGService!"); - $("#loading").show(); + $("#loading").show(); } } @@ -244,15 +244,14 @@ } - // --- timeout reminder --- var timeoutID; delayedAlert(); function delayedAlert() { - timeoutID = window.setTimeout(slowAlert, 3600*1000); // 1 hr + timeoutID = window.setTimeout(slowAlert, 3600*1000); } function slowAlert() { - if (confirm("Reminder: It's been 1 hour. Remember saving your work to prevent data lost. \n\nKeep working? \n(Press Cancel will turn off this reminder.)")) { + if (confirm("Reminder: It's been 1 hour. Remember saving your work to prevent data lost. \n\nKeep working? \n(Press Cancel will turn off this reminder.)")) { var lg_url = "<?php echo $lgserver_url?>" + "rest/utils/getUser?sessionId=" + session_id; @@ -274,8 +273,8 @@ console.log("fail to renew session."); }); } + } -
--- a/config/config.php Wed Jul 15 12:03:22 2015 +0200 +++ b/config/config.php Tue Mar 21 18:05:52 2017 +0100 @@ -3,12 +3,23 @@ $at_local = false; if (!$at_local) { + /* // host at localgazetteers-dev server $mysql_database = "Gazetteer"; $mysql_server = "localhost"; $mysql_user = "root"; $mysql_password = "admin"; - $server_host = "http://localgazetteers.mpiwg-berlin.mpg.de/"; + */ + + + // remote server at SBB + $mysql_database = "gazetteer"; + $mysql_server = "194.94.134.66"; + $mysql_user = "gazetteer"; + $mysql_password = "R-9C7Bmx%2"; + // --- + + $server_host = "https://localgazetteers-test.mpiwg-berlin.mpg.de/"; $lgserver_url = $server_host."LGServices/"; } else { @@ -18,10 +29,15 @@ $mysql_user = "root"; $mysql_password = "root"; $server_host = "http://localhost:1080/localgazetteers-dev/"; + + + $server_host = "http://localhost:1080/localgazetteers-dev/"; $lgserver_url = "http://localhost:8080/LGServices/"; + } $systemNAME = "interface"; $system_root_url = $server_host."LGToc/"; ?> +
--- a/js/check_sections_details.js Wed Jul 15 12:03:22 2015 +0200 +++ b/js/check_sections_details.js Tue Mar 21 18:05:52 2017 +0100 @@ -8,7 +8,7 @@ initInsert(); initConfigure(); initSave(version); - if($("#saveBook .editor").val() == ""){ + if($("#saveBook .editor").val() == "") { $("#loading").show(); } else { $("#loading").hide(); @@ -365,7 +365,7 @@ var count=reg.exec(href); reg = /[^\?]+/g; href = reg.exec(href); - + href=href+"?book_id="+bookId+"&"+count+"&hideDeletedChecked="+hideDeletedChecked+"&editor="+editor+"&sessionId="+session_id; location.href=href; //refresh the page to load the sections saved in db