[pgAdmin][RM4408] Show validation errors for slickgrid cells

Aditya Toshniwal <[email protected]>
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CAM9w-_nv74+ua-RxZW6eDnG3ufSS4dL_OYH5g1Y=i55QYC3XVA@mail.gmail.com>
Hi Hackers,

Attached is a tiny patch to show the validation error message in case a
user enters syntactically incorrect data in cell editors.
Note that, the validation is already been done but the message was not
displayed. Attached patch will display the message.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
RM4408.patch (application/octet-stream, 614 B)
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index f6fbadf3..37d15a9c 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -1192,6 +1192,10 @@ define('tools.querytool', [
         }
       });
 
+      grid.onValidationError.subscribe(function (e, args) {
+        alertify.error(args.validationResults.msg);
+      });
+
       // Resize SlickGrid when window resize
       $(window).resize(function() {
         // Resize grid only when 'Data Output' panel is visible.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.