Subject: Minor issues

From: Harshal Dhumal <[email-masked]>
Date: Fri, 29 Apr 2016 11:52:19 +0530

Hi,

PFA patch for minor issues.

Issues fixed:

1] Removed unwanted "{% if  %}" from database 9.1 nodes.sql
2] Fixed issue while removing select2cell fro backgrid.

-- 
*Harshal Dhumal*
*Software Engineer *

EenterpriseDB <http://www.enterprisedb.com>
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
index 3ce9645..b05880c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
@@ -3,7 +3,7 @@ SELECT
     has_database_privilege(db.oid, 'CREATE') as cancreate, datdba as owner
 FROM
     pg_database db
-    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid{% if did %}
+    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid
 WHERE {% if did %}
 db.oid = {{ did|qtLiteral }}::OID{% else %}
 db.oid > {{ last_system_oid }}::OID
diff --git a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
index 999ac7c..5311a01 100644
--- a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
@@ -530,7 +530,9 @@
 
     remove: function() {
       this.$select.off('change', this.onSave);
-      this.$select.select2('destroy');
+      if (this.$select.data('select2')) {
+        this.$select.select2('destroy');
+      }
       this.$el.empty();
       Backgrid.SelectCell.prototype.remove.apply(this, arguments);
      }

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Harshal Dhumal <[email-masked]>
Date: Fri, 29 Apr 2016 12:00:15 +0530

-- 
*Harshal Dhumal*
*Software Engineer *

> 2] Fixed issue while removing select2cell fro backgrid.

Regarding select2 cell; Even though we have created select2 cell sometimes
we do not get select2 instance when we retrieve it from dom. So we have to
manually check it's data attribute before calling it's destroy method.

---

From: Ashesh Vashi <[email-masked]>
Date: Fri, 29 Apr 2016 15:53:55 +0530

Thanks - committed along with some other change!!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>