mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
admin interface styling and sensibility
This commit is contained in:
parent
4f5ac851cc
commit
8fa54e2402
2 changed files with 293 additions and 217 deletions
|
@ -1,49 +1,123 @@
|
||||||
table {
|
body {
|
||||||
border-collapse: collapse;
|
margin: 0;
|
||||||
}
|
height: 100%;
|
||||||
td, th {
|
color: #333;
|
||||||
border: 1px solid black;
|
font: 14px helvetica, sans-serif;
|
||||||
padding-left: 10px;
|
background: #ddd;
|
||||||
padding-right: 10px;
|
background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||||
padding-top: 2px;
|
background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||||
padding-bottom: 2px;
|
background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||||
}
|
background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
|
||||||
.template {
|
border-top: 8px solid rgba(51,51,51,.8);
|
||||||
display: none;
|
}
|
||||||
}
|
#wrapper {
|
||||||
.dialog {
|
margin-top: 160px;
|
||||||
display: none;
|
padding: 15px;
|
||||||
position: absolute;
|
background: #fff;
|
||||||
left: 50%;
|
opacity: .9;
|
||||||
top: 50%;
|
box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
|
||||||
width: 700px;
|
max-width: 700px;
|
||||||
height: 500px;
|
margin: auto;
|
||||||
margin-left: -350px;
|
border-radius: 0 0 7px 7px;
|
||||||
margin-top: -250px;
|
}
|
||||||
border: 3px solid #999999;
|
h1 {
|
||||||
background: #eeeeee;
|
font-size: 29px;
|
||||||
}
|
}
|
||||||
.dialog .title {
|
h2 {
|
||||||
margin: 0;
|
font-size: 24px;
|
||||||
padding: 2px;
|
}
|
||||||
border-bottom: 3px solid #999999;
|
.seperator {
|
||||||
font-size: 24px;
|
margin: 10px 0;
|
||||||
line-height: 24px;
|
height: 1px;
|
||||||
height: 24px;
|
background: #aaa;
|
||||||
overflow: hidden;
|
background: -webkit-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
|
||||||
}
|
background: -moz-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
|
||||||
.dialog .title .close {
|
background: -ms-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
|
||||||
float: right;
|
background: -o-linear-gradient(left, #fff, #aaa 20%, #aaa 80%, #fff);
|
||||||
}
|
}
|
||||||
.dialog .history {
|
form {
|
||||||
background: #222222;
|
margin-bottom: 0;
|
||||||
color: #eeeeee;
|
}
|
||||||
position: absolute;
|
#inner {
|
||||||
top: 41px;
|
width: 300px;
|
||||||
bottom: 10px;
|
margin: 0 auto;
|
||||||
left: 10px;
|
}
|
||||||
right: 10px;
|
button, input {
|
||||||
padding: 2px;
|
font-weight: bold;
|
||||||
overflow: auto;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
input[type="button"] {
|
||||||
|
height: 30px;
|
||||||
|
margin: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
input[value="Uninstall"], input[value="Install"] {
|
||||||
|
float: right;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
input[type="text"] {
|
||||||
|
border-radius: 3px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
*padding: 0; /* IE7 hack */
|
||||||
|
width: 100%;
|
||||||
|
outline: none;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
margin: 0 0 5px 1px;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
||||||
|
button{
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 3px;
|
||||||
|
border-spacing: 0;
|
||||||
|
width: 100%;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
table thead tr {
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
td, th {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.dialog {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
width: 700px;
|
||||||
|
height: 500px;
|
||||||
|
margin-left: -350px;
|
||||||
|
margin-top: -250px;
|
||||||
|
border: 3px solid #999999;
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.dialog .title {
|
||||||
|
margin: 0;
|
||||||
|
padding: 2px;
|
||||||
|
border-bottom: 3px solid #999999;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
height: 24px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.dialog .title .close {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.dialog .history {
|
||||||
|
background: #222222;
|
||||||
|
color: #eeeeee;
|
||||||
|
position: absolute;
|
||||||
|
top: 41px;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 10px;
|
||||||
|
right: 10px;
|
||||||
|
padding: 2px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
|
@ -1,168 +1,170 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Plugin manager</title>
|
<title>Plugin manager</title>
|
||||||
<link href="../../static/css/admin.css" rel="stylesheet" type="text/css" />
|
<link href="../../static/css/admin.css" rel="stylesheet" type="text/css" />
|
||||||
<script src="../../static/js/jquery.js"></script>
|
<script src="../../static/js/jquery.js"></script>
|
||||||
<script src="../../socket.io/socket.io.js"></script>
|
<script src="../../socket.io/socket.io.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var socket = io.connect().of("/pluginfw/installer");
|
var socket = io.connect().of("/pluginfw/installer");
|
||||||
|
|
||||||
var doUpdate = false;
|
var doUpdate = false;
|
||||||
|
|
||||||
function updateHandlers() {
|
function updateHandlers() {
|
||||||
$("#progress.dialog .close").unbind('click').click(function () {
|
$("#progress.dialog .close").unbind('click').click(function () {
|
||||||
$("#progress.dialog").hide();
|
$("#progress.dialog").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#do-search").unbind('click').click(function () {
|
$("#do-search").unbind('click').click(function () {
|
||||||
if ($("#search-query")[0].value != "")
|
if ($("#search-query")[0].value != "")
|
||||||
socket.emit("search", $("#search-query")[0].value);
|
socket.emit("search", $("#search-query")[0].value);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".do-install").unbind('click').click(function (e) {
|
$(".do-install").unbind('click').click(function (e) {
|
||||||
var row = $(e.target).closest("tr");
|
var row = $(e.target).closest("tr");
|
||||||
doUpdate = true;
|
doUpdate = true;
|
||||||
socket.emit("install", row.find(".name").html());
|
socket.emit("install", row.find(".name").html());
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".do-uninstall").unbind('click').click(function (e) {
|
$(".do-uninstall").unbind('click').click(function (e) {
|
||||||
var row = $(e.target).closest("tr");
|
var row = $(e.target).closest("tr");
|
||||||
doUpdate = true;
|
doUpdate = true;
|
||||||
socket.emit("uninstall", row.find(".name").html());
|
socket.emit("uninstall", row.find(".name").html());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateHandlers();
|
updateHandlers();
|
||||||
|
|
||||||
socket.on('progress', function (data) {
|
socket.on('progress', function (data) {
|
||||||
$("#progress.dialog .close").hide();
|
$("#progress.dialog .close").hide();
|
||||||
$("#progress.dialog").show();
|
$("#progress.dialog").show();
|
||||||
var message = "Unknown status";
|
var message = "Unknown status";
|
||||||
if (data.message) {
|
if (data.message) {
|
||||||
message = "<span class='status'>" + data.message.toString() + "</span>";
|
message = "<span class='status'>" + data.message.toString() + "</span>";
|
||||||
}
|
}
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
message = "<span class='error'>" + data.error.toString() + "<span>";
|
message = "<span class='error'>" + data.error.toString() + "<span>";
|
||||||
}
|
}
|
||||||
$("#progress.dialog .message").html(message);
|
$("#progress.dialog .message").html(message);
|
||||||
$("#progress.dialog .history").append("<div>" + message + "</div>");
|
$("#progress.dialog .history").append("<div>" + message + "</div>");
|
||||||
|
|
||||||
if (data.progress >= 1) {
|
if (data.progress >= 1) {
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
$("#progress.dialog .close").show();
|
$("#progress.dialog .close").show();
|
||||||
} else {
|
} else {
|
||||||
if (doUpdate) {
|
if (doUpdate) {
|
||||||
doUpdate = false;
|
doUpdate = false;
|
||||||
socket.emit("load");
|
socket.emit("load");
|
||||||
}
|
}
|
||||||
$("#progress.dialog").hide();
|
$("#progress.dialog").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('search-result', function (data) {
|
socket.on('search-result', function (data) {
|
||||||
$("#search-results *").remove();
|
$("#search-results *").remove();
|
||||||
for (plugin_name in data.results) {
|
for (plugin_name in data.results) {
|
||||||
var plugin = data.results[plugin_name];
|
var plugin = data.results[plugin_name];
|
||||||
var row = $("#search-result-template").clone();
|
var row = $("#search-result-template").clone();
|
||||||
|
|
||||||
for (attr in plugin) {
|
for (attr in plugin) {
|
||||||
row.find("." + attr).html(plugin[attr]);
|
row.find("." + attr).html(plugin[attr]);
|
||||||
}
|
}
|
||||||
$("#search-results").append(row);
|
$("#search-results").append(row);
|
||||||
}
|
}
|
||||||
updateHandlers();
|
updateHandlers();
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('installed-results', function (data) {
|
socket.on('installed-results', function (data) {
|
||||||
$("#installed-plugins *").remove();
|
$("#installed-plugins *").remove();
|
||||||
for (plugin_name in data.results) {
|
for (plugin_name in data.results) {
|
||||||
var plugin = data.results[plugin_name];
|
var plugin = data.results[plugin_name];
|
||||||
var row = $("#installed-plugin-template").clone();
|
var row = $("#installed-plugin-template").clone();
|
||||||
|
|
||||||
for (attr in plugin.package) {
|
for (attr in plugin.package) {
|
||||||
row.find("." + attr).html(plugin.package[attr]);
|
row.find("." + attr).html(plugin.package[attr]);
|
||||||
}
|
}
|
||||||
$("#installed-plugins").append(row);
|
$("#installed-plugins").append(row);
|
||||||
}
|
}
|
||||||
updateHandlers();
|
updateHandlers();
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.emit("load");
|
socket.emit("load");
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<% if (errors.length) { %>
|
<div id="wrapper">
|
||||||
<div class="errors">
|
|
||||||
<% errors.forEach(function (item) { %>
|
<h1>Etherpad Lite</h1>
|
||||||
<div class="error"><%= item.toString() %></div>
|
|
||||||
<% }) %>
|
<div class="seperator"></div>
|
||||||
</div>
|
|
||||||
<% } %>
|
<% if (errors.length) { %>
|
||||||
|
<div class="errors">
|
||||||
|
<% errors.forEach(function (item) { %>
|
||||||
<h1>Installed plugins</h1>
|
<div class="error"><%= item.toString() %></div>
|
||||||
<table>
|
<% }) %>
|
||||||
<thead>
|
</div>
|
||||||
<tr>
|
<% } %>
|
||||||
<th>Name</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<td></td>
|
<h2>Installed plugins</h2>
|
||||||
</tr>
|
<table>
|
||||||
</thead>
|
<thead>
|
||||||
<tbody class="template">
|
<tr>
|
||||||
<tr id="installed-plugin-template">
|
<th>Name</th>
|
||||||
<td class="name"></td>
|
<th>Description</th>
|
||||||
<td class="description"></td>
|
<td></td>
|
||||||
<td class="actions">
|
</tr>
|
||||||
<input type="button" value="Uninstall" class="do-uninstall">
|
</thead>
|
||||||
</td>
|
<tbody class="template">
|
||||||
</tr>
|
<tr id="installed-plugin-template">
|
||||||
</tbody>
|
<td class="name"></td>
|
||||||
<tbody id="installed-plugins">
|
<td class="description"></td>
|
||||||
</tbody>
|
<td class="actions">
|
||||||
</table>
|
<input type="button" value="Uninstall" class="do-uninstall">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
<h1>Search for plugins to install</h1>
|
<tbody id="installed-plugins">
|
||||||
<form>
|
</tbody>
|
||||||
<input type="text" name="search" value="" id="search-query">
|
</table>
|
||||||
<input type="button" value="Search" id="do-search">
|
<div class="seperator"></div>
|
||||||
</form>
|
<h2>Search for plugins to install</h2>
|
||||||
<table>
|
<form>
|
||||||
<thead>
|
<input type="text" name="search" placeholder="Search term" id="search-query">
|
||||||
<tr>
|
<input type="button" value="Search" id="do-search">
|
||||||
<th>Name</th>
|
</form>
|
||||||
<th>Description</th>
|
<table>
|
||||||
<td></td>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th>Name</th>
|
||||||
<tbody class="template">
|
<th>Description</th>
|
||||||
<tr id="search-result-template">
|
<td></td>
|
||||||
<td class="name"></td>
|
</tr>
|
||||||
<td class="description"></td>
|
</thead>
|
||||||
<td class="actions">
|
<tbody class="template">
|
||||||
<input type="button" value="Install" class="do-install">
|
<tr id="search-result-template">
|
||||||
</td>
|
<td class="name"></td>
|
||||||
</tr>
|
<td class="description"></td>
|
||||||
</tbody>
|
<td class="actions">
|
||||||
<tbody id="search-results">
|
<input type="button" value="Install" class="do-install">
|
||||||
</tbody>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody id="search-results">
|
||||||
<div id="progress" class="dialog">
|
</tbody>
|
||||||
<h1 class="title">
|
</table>
|
||||||
Please wait: <span class="message"></span>
|
|
||||||
<input type="button" class="close" value="Close">
|
<div id="progress" class="dialog">
|
||||||
</h1>
|
<h1 class="title">
|
||||||
|
Please wait: <span class="message"></span>
|
||||||
<div class="history"></div>
|
<input type="button" class="close" value="Close">
|
||||||
</div>
|
</h1>
|
||||||
|
<div class="history"></div>
|
||||||
</body>
|
</div>
|
||||||
</html>
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue