]> git.sur5r.net Git - contagged/blobdiff - scripts/gui.js
Version updated
[contagged] / scripts / gui.js
index e4a9a2688bbe5e0d895d0824519f50838cadb45b..d1523203c3d7d320043e191cad5881a213b2a87a 100644 (file)
@@ -101,8 +101,6 @@ function noteedit(type){
     $('#noteedit_editor').focus();
 }
 
-
-
 /**
  * Initialize everything when DOM is ready
  */
@@ -115,7 +113,7 @@ $(document).ready(function() {
         helperClass: 'autocompleter',
         selectClass: 'autocompleterSelect',
         inputWidth: true,
-        minchars: 1,
+        minchars: 1
         //multiple: true,
         //multipleSeperator: ','
     });
@@ -136,7 +134,7 @@ $(document).ready(function() {
         helperClass: 'autocompleter',
         selectClass: 'autocompleterSelect',
         inputWidth: true,
-        minchars: 1,
+        minchars: 1
     });
 
     // nice images
@@ -146,17 +144,17 @@ $(document).ready(function() {
     });
 
     // tag editing
-    if($('#tagedit')){
+    if($('#tagedit').length){
         var img       = new Image();
         img.src       = 'pix/tag_blue_edit.png';
         img.className = 'click';
         img.id        = 'tagedit_start';
         $('#tagedit').empty().after(img);
-        $(img).click(tagedit)
+        $(img).click(tagedit);
     }
 
     // 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);
+    }
 });