[extensions-web] fsui: Don't show the "Compatible with..." filter if we don't have a proxy
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] fsui: Don't show the "Compatible with..." filter if we don't have a proxy
- Date: Tue, 14 Feb 2012 18:14:28 +0000 (UTC)
commit ed944119df7f0554e80b7bd2ab2c4c48c90b97cf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Feb 14 12:25:59 2012 -0500
fsui: Don't show the "Compatible with..." filter if we don't have a proxy
sweettooth/static/js/fsui.js | 41 +++++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/sweettooth/static/js/fsui.js b/sweettooth/static/js/fsui.js
index 3847c5d..4a1d245 100644
--- a/sweettooth/static/js/fsui.js
+++ b/sweettooth/static/js/fsui.js
@@ -84,8 +84,6 @@ function($, dbusProxy, hashparamutils, modal) {
return false;
}).appendTo($fsui);
- $fsui.append('<span>Compatible with</span>');
-
function textForFilterValue(value) {
if (value === undefined)
return "All versions";
@@ -94,29 +92,32 @@ function($, dbusProxy, hashparamutils, modal) {
return "GNOME Shell version " + hp.shell_version;
}
- $link = makeDropdownLink(textForFilterValue(hp.shell_version)).
- click(function() {
- var $dropdown = $('<div>', {'class': 'fsui-dropdown'}).
- appendTo($fsui).
- css('right', calculateRight($fsui, $(this))).
- hide().
- fadeIn('fast');
+ if (dbusProxy.ShellVersion !== undefined) {
+ $fsui.append('<span>Compatible with</span>');
- $(this).addClass('selected');
- var closeUI = makeCloseUI($(this), $dropdown);
- modal.activateModal($dropdown, closeUI);
+ $link = makeDropdownLink(textForFilterValue(hp.shell_version)).
+ click(function() {
+ var $dropdown = $('<div>', {'class': 'fsui-dropdown'}).
+ appendTo($fsui).
+ css('right', calculateRight($fsui, $(this))).
+ hide().
+ fadeIn('fast');
- var $filterUL = $('<ul>').appendTo($dropdown);
+ $(this).addClass('selected');
+ var closeUI = makeCloseUI($(this), $dropdown);
+ modal.activateModal($dropdown, closeUI);
- $.each([undefined, dbusProxy.ShellVersion], function() {
- var $filterItem = makeLink('shell_version', this, textForFilterValue(this), closeUI).appendTo($filterUL);
- if (hp.shell_version === this)
- $filterItem.addClass('selected');
- });
+ var $filterUL = $('<ul>').appendTo($dropdown);
- return false;
- }).appendTo($fsui);
+ $.each([undefined, dbusProxy.ShellVersion], function() {
+ var $filterItem = makeLink('shell_version', this, textForFilterValue(this), closeUI).appendTo($filterUL);
+ if (hp.shell_version === this)
+ $filterItem.addClass('selected');
+ });
+ return false;
+ }).appendTo($fsui);
+ }
});
};
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]