summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2013-03-26 16:23:47 +0100
committerMarcel Klehr <mklehr@gmx.net>2013-03-26 16:23:47 +0100
commit7edfff75743a876d94411e9a1313a8f19777502c (patch)
tree381a94f2cc80ebf92e7076977ae0e58d44ae01f0 /src/static
parent638cea5fd65cb0845cbb290bcaf6630ffea76a24 (diff)
downloadetherpad-lite-7edfff75743a876d94411e9a1313a8f19777502c.zip
/admin/plugins: Show some text if nothing is display otherwise
Diffstat (limited to 'src/static')
-rw-r--r--src/static/css/admin.css9
-rw-r--r--src/static/js/admin/plugins.js21
2 files changed, 27 insertions, 3 deletions
diff --git a/src/static/css/admin.css b/src/static/css/admin.css
index c65aafd0..7a2e00f4 100644
--- a/src/static/css/admin.css
+++ b/src/static/css/admin.css
@@ -141,6 +141,15 @@ td, th {
display: inline-block; /*make this fill the whole cell*/
}
+.messages * {
+ text-align: center;
+ display: none;
+}
+
+.messages .fetching {
+ display: block;
+}
+
.progress {
position: absolute;
top: 0; left: 0; bottom:0; right:0;
diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js
index ed854b7d..f640ed83 100644
--- a/src/static/js/admin/plugins.js
+++ b/src/static/js/admin/plugins.js
@@ -87,6 +87,7 @@ $(document).ready(function () {
$row.remove().appendTo('#installed-plugins')
socket.emit("install", plugin);
installed.progress.show(plugin, 'Installing')
+ $(".installed-results .nothing-installed").hide()
});
// uninstall
@@ -126,6 +127,8 @@ $(document).ready(function () {
socket.on('results:search', function (data) {
if(!data.results.length) search.end = true;
+ $(".search-results .nothing-found").hide()
+ $(".search-results .fetching").hide()
console.log('got search results', data)
@@ -143,11 +146,18 @@ $(document).ready(function () {
// re-render search results
var searchWidget = $(".search-results");
searchWidget.find(".results *").remove();
- displayPluginList(search.results, searchWidget.find(".results"), searchWidget.find(".template tr"))
+ if(search.results.length > 0) {
+ displayPluginList(search.results, searchWidget.find(".results"), searchWidget.find(".template tr"))
+ }else {
+ $(".search-results .nothing-found").show()
+ }
$('#search-progress').hide()
});
socket.on('results:installed', function (data) {
+ $(".installed-results .nothing-installed").hide()
+ $(".installed-results .fetching").hide()
+
installed.list = data.installed
sortPluginList(installed.list, 'name', /*ASC?*/true);
@@ -156,11 +166,16 @@ $(document).ready(function () {
return plugin.name != 'ep_etherpad-lite'
})
- // remove all installed plugins (leave all plugins that are still being installed)
+ // remove all installed plugins (leave plugins that are still being installed)
installed.list.forEach(function(plugin) {
$('#installed-plugins .'+plugin.name).remove()
})
- displayPluginList(installed.list, $("#installed-plugins"), $("#installed-plugin-template"));
+
+ if(installed.list.length > 0) {
+ displayPluginList(installed.list, $("#installed-plugins"), $("#installed-plugin-template"));
+ }else {
+ $(".installed-results .nothing-installed").show()
+ }
});
socket.on('results:updatable', function(data) {