view views/Extractapp/EditWordlist.php @ 122:a36bb5a48af4 extractapp tip

1. remove redundancy server side code. 2. All pop up sub-windows are made with dialog component of bootstrap v3.3.2
author Calvin Yeh <cyeh@mpiwg-berlin.mpg.de>
date Thu, 28 Sep 2017 22:26:48 +0200
parents 3bca624e4ac2
children
line wrap: on
line source

<?php
/*
 * EditWordlist.php
 * This file is part of Extraction-interface.
 *
 * Extraction-interface is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Extraction-interface is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Extraction-interface.  If not, see <http://www.gnu.org/licenses/>.
*/
/*! \file
* This is the view for EditWordlist.
* It shows the wordlist and allows user to view or edit it.
* User can create new wordlist here.
*/

// --- initialize ---
$wordlistArray = $viewmodel['wordlistArray'];
?>

<html>
<head>
<title></title>
<?php include 'views/maintemplate.php'; ?>
<style>
dynasty
{
	color:red;
}
nianhao
{
	color:blue;
}
name
{
	color:orange;
}
#editable-area {
	line-height:160%;
	letter-spacing:1.5px;
	font-size:21px;
}
</style>
</head>
<body>

<table width="98%" border="1">
	<tr>
		<td width="20%" valign="top">
			<?php
			foreach ( $wordlistArray as $nameId => $nameValue ) {
				echo "&nbsp;&nbsp;<a onclick=\"showListContent(".$nameId.")\" href=\"#\">".$nameValue."</a></br>";
			}
			?>
			<form action="javascript:void(0);">
				<fieldset>
					<legend>Add List:</legend>
					List name: <input type="text" size="30" id="listNameText"><br>
					<button onclick="addNewList()">Add</button>
				</fieldset>
			</form>
		</td>
		<td width="60%">
			<div id="editable-area"></div>
		</td>
		<td width="20%" valign="top" id="button-area">&nbsp;</td>
	</tr>
</table>

</body>
</html>