check if jquery-ui.js is missing
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 22 Aug 2013 11:13:05 +0000 (11:13 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 22 Aug 2013 11:13:05 +0000 (11:13 +0000)
tools/htdocs/mkws.js

index aeb3ad3..0b1c9f7 100644 (file)
@@ -930,10 +930,13 @@ function init_popup(obj) {
 
     debug("popup height: " + height + ", width: " + width);
 
-    /* 
-     * make sure that jquery-ui was loaded afte jQuery core lib
-     * http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"
-     */
+    // make sure that jquery-ui was loaded afte jQuery core lib, e.g.:
+    // <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
+    if (!$.ui) {
+       debug("Error: jquery-ui.js is missing, did you included it after jquery core in the HTML file?");
+       return;
+    }
+
     $(id_popup).dialog({
       closeOnEscape: true,
       autoOpen: false,