|
|
@@ -1,6 +1,7 @@
|
|
|
<?php
|
|
|
global $AREA_TYPE;
|
|
|
global $SCENARIO;
|
|
|
+ global $UID;
|
|
|
?>
|
|
|
<!DOCTYPE html>
|
|
|
<html lang='en'>
|
|
|
@@ -33,6 +34,36 @@
|
|
|
<meta name='twitter:image' content='<?=$page->icon?>'/>
|
|
|
<meta name='twitter:url' content='<?=$page->canonical?>'/>
|
|
|
<meta name='robots' content='index follow'/>
|
|
|
+ <script>
|
|
|
+ function saveForm(id, show){
|
|
|
+ if (show === true){
|
|
|
+ document.getElementById('save_team').style.display = 'block';
|
|
|
+ document.getElementById('save_id').value = id;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById('save_team').style.display = 'none';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function saveTeam(){
|
|
|
+ var id = document.getElementById('save_id').value;
|
|
|
+ var name = document.getElementById('save_team_name').value;
|
|
|
+ var description = document.getElementById('save_team_description').value;
|
|
|
+ if (name == ''){
|
|
|
+ alert('Name required')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var xhttp = new XMLHttpRequest();
|
|
|
+ xhttp.onreadystatechange = function() {
|
|
|
+ if (this.readyState == 4 && this.status == 200) {
|
|
|
+ saveForm(null, false);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ xhttp.open("POST", "/action/save_run_team/", true);
|
|
|
+ xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
|
|
+ xhttp.send('uid=<?=$UID?>&run=' + id + '&name=' + encodeURI(name) + '&description=' + encodeURI(description));
|
|
|
+ }
|
|
|
+ </script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<?php
|
|
|
@@ -50,6 +81,9 @@
|
|
|
|
|
|
</section> <!-- #filters -->
|
|
|
<section class='content'>
|
|
|
+ <h2>
|
|
|
+ Runs
|
|
|
+ </h2>
|
|
|
<article>
|
|
|
<table id='runs'>
|
|
|
<tr>
|
|
|
@@ -71,6 +105,7 @@
|
|
|
</tr>
|
|
|
<?php
|
|
|
foreach ($page->runs as $run){
|
|
|
+ $enable_save = true;
|
|
|
?>
|
|
|
<tr>
|
|
|
<td class='area'>
|
|
|
@@ -108,6 +143,7 @@
|
|
|
<td class='team'>
|
|
|
<?php
|
|
|
if ($run->helper == 1){
|
|
|
+ $enable_save = false;
|
|
|
?>
|
|
|
<div class='monster_panel helper'>
|
|
|
<img class='monster' title='Friend/Menstor' src='<?=$path["img"]["currency"]?>socialpoint.png'/>
|
|
|
@@ -116,6 +152,7 @@
|
|
|
}
|
|
|
foreach ($run->party as $party){
|
|
|
if ($party instanceof K_Unit){
|
|
|
+ $enable_save = false;
|
|
|
$disabled = "disabled";
|
|
|
}
|
|
|
else{
|
|
|
@@ -233,6 +270,15 @@
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
+?>
|
|
|
+ </td>
|
|
|
+ <td class='action'>
|
|
|
+<?php
|
|
|
+ if ($enable_save){
|
|
|
+?>
|
|
|
+ <img alt='Save Team' class='save_team' onclick='saveForm(<?=$run->id?>, true);' src='<?=$path["img"]["icon"]?>save.png'/>
|
|
|
+<?php
|
|
|
+ }
|
|
|
?>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -242,6 +288,38 @@
|
|
|
</table>
|
|
|
</article>
|
|
|
</section>
|
|
|
+ <section id='save_team' class='content'>
|
|
|
+ <h2>
|
|
|
+ Save run
|
|
|
+ </h2>
|
|
|
+ <article>
|
|
|
+ <input id='save_id' type='hidden' value=''/>
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <td class='save_title'>
|
|
|
+ Name
|
|
|
+ </td>
|
|
|
+ <td class='save_values'>
|
|
|
+ <input type='text' id='save_team_name' name='name'/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='save_title'>
|
|
|
+ Description
|
|
|
+ </td>
|
|
|
+ <td class='save_values'>
|
|
|
+ <textarea id='save_team_description' name='description'></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan='2'>
|
|
|
+ <input type='button' value='Save' onClick='saveTeam();'/>
|
|
|
+ <input type='button' value='Close' onClick='saveForm(null, false);'/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </article>
|
|
|
+ </section>
|
|
|
<?php
|
|
|
include __DIR__ . "/inc/footer.php";
|
|
|
?>
|