]> git.sur5r.net Git - contagged/blobdiff - scripts/gui.js
Dynamically decide which attributes to fetch
[contagged] / scripts / gui.js
index e4a9a2688bbe5e0d895d0824519f50838cadb45b..68ec0a016bdd2c7a627fc5f3a051b8737d499054 100644 (file)
@@ -101,8 +101,6 @@ function noteedit(type){
     $('#noteedit_editor').focus();
 }
 
-
-
 /**
  * Initialize everything when DOM is ready
  */
@@ -146,7 +144,7 @@ $(document).ready(function() {
     });
 
     // tag editing
-    if($('#tagedit')){
+    if($('#tagedit').length){
         var img       = new Image();
         img.src       = 'pix/tag_blue_edit.png';
         img.className = 'click';
@@ -156,7 +154,7 @@ $(document).ready(function() {
     }
 
     // note editing
-    if($('#noteedit')){
+    if($('#noteedit').length){
         var img;
 
         img           = new Image();
@@ -186,7 +184,13 @@ $(document).ready(function() {
 
 
     // set focus
-    if($('#searchfield')) $('#searchfield').focus();
-    if($('#firstfield')) $('#firstfield').focus();
+    if($('#searchfield').length) $('#searchfield').focus();
+    if($('#firstfield').length) $('#firstfield').focus();
 
+
+    // run google maps loader
+    if($('#google_map').length){
+        gmap_loader();
+        $(document).unload(GUnload);
+    }
 });