[extensions-web] extension-detail: added uninstall button.
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extension-detail: added uninstall button.
- Date: Fri, 23 Mar 2018 16:29:51 +0000 (UTC)
commit 3e05f99b8a7a0827867133ecf3dbfdb11818cba4
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Fri Mar 23 20:03:23 2018 +0400
extension-detail: added uninstall button.
Uninstall button was available at "Installed extensions" page only.
This commit adds same button to extension details page.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/141
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=794598
.../extensions/templates/extensions/detail.html | 1 +
sweettooth/static/js/extensions.js | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail.html
b/sweettooth/extensions/templates/extensions/detail.html
index db592ee..a11f47b 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -22,6 +22,7 @@
<div class="extra-buttons">
<div class="upgrade-button" title="Upgrade this extension"></div>
<div class="configure-button" title="Configure this extension"></div>
+ <div class="uninstall-button" title="Uninstall this extension"></div>
</div>
</div>
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index a4246b8..b8e3e26 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -238,7 +238,14 @@ define(['jquery', 'messages', 'dbus!_', 'extensionUtils', 'templates', 'paginato
dbusProxy.UninstallExtension(uuid).then(function (result) {
if (result)
{
- $elem.fadeOut({queue: false}).slideUp({queue: false});
+ if(!$elem.hasClass('single-page'))
+ {
+ $elem.fadeOut({queue: false}).slideUp({queue: false});
+ }
+ else
+ {
+ $elem.removeClass('installed upgradable
configurable');
+ }
messages.addInfo(templates.get('extensions/uninstall')(meta));
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]