[dev] [commit] r1062 - wwwbase/js

automailer at dexonline.ro automailer at dexonline.ro
Thu Jan 16 14:52:48 EET 2014


Author: radu
Date: Thu Jan 16 14:52:48 2014
New Revision: 1062

Log:
flash missing error hack

Modified:
   wwwbase/js/flex.js

Modified: wwwbase/js/flex.js
==============================================================================
--- wwwbase/js/flex.js	Wed Jan 15 11:01:03 2014	(r1061)
+++ wwwbase/js/flex.js	Thu Jan 16 14:52:48 2014	(r1062)
@@ -1,15 +1,17 @@
 // If there are error messages, show them in a dialog
 $(function() {
-  $('#flashMessage').dialog({
-    buttons: {
-      Ok: function() {
-        $(this).dialog('close');
-      }
-    },
-    modal: true,
-    title: 'Eroare',
-    width: 500,
-  });
+  if($('#flashMessage').length) {
+    $('#flashMessage').dialog({
+      buttons: {
+        Ok: function() {
+          $(this).dialog('close');
+        }
+      },
+      modal: true,
+      title: 'Eroare',
+      width: 500,
+    });
+  }
 });
 
 function updateModelTypeList() {


More information about the Dev mailing list