add map it link in member edit admin
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 5 Jun 2013 20:33:26 +0000 (20:33 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 5 Jun 2013 20:33:26 +0000 (20:33 +0000)
Toolkit/Members.php
Toolkit/Members/EditMemberInfo.php
Toolkit/Members/libjs/edit-member.js
Toolkit/Members/templates/editMember.tpl

index 540b28c..65591eb 100644 (file)
@@ -334,6 +334,12 @@ class Toolkit_Members
                default :
                        $GLOBALS['bottomScripts'][]
                                = GLM_APP_BASE_URL . 'ckeditor/current/ckeditor.js';
+            $GLOBALS['styleSheets'][]
+                = GLM_APP_BASE_URL
+                . 'libjs/jqueryui/1.8.13/development-bundle/themes/base/jquery.ui.all.css';
+            $GLOBALS['topScripts'][]
+                = GLM_APP_BASE_URL
+                . 'libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js';
                        $GLOBALS['bottomScripts'][]
                                = BASE_URL . 'Toolkit/Members/libjs/edit-member.js';
                        $GLOBALS['bottomScripts'][]
@@ -348,6 +354,10 @@ class Toolkit_Members
                                = GLM_APP_BASE_URL . 'gallery/thickbox.css';
                        $GLOBALS['styleSheets'][]
                                = GLM_APP_BASE_URL . 'libjs/cluetip/jquery.cluetip.css';
+            $GLOBALS['topScripts'][]
+                = 'http://maps.googleapis.com/maps/api/js?sensor=true';
+            $GLOBALS['bottomScripts'][]
+                = BASE_URL . 'Toolkit/Maps/geoCoder.js';
 
                        $mr = new Toolkit_Members_EditMemberInfo(
                                $pdo,
index 4f4cd0c..3587350 100644 (file)
@@ -840,19 +840,6 @@ class Toolkit_Members_EditMemberInfo
                        'opts'    => array('class' => 'text')
                );
 
-               /*
-               $e[] = array(
-                       'type'    => 'select',
-                       'req'     => false,
-                       'name'    => 'country',
-                       'display' => 'Country',
-                       'opts'    => array(
-                               ''       => '-- Select Country --',
-                               'USA'    => 'USA',
-                               'Canada' => 'Canada'
-                       )
-               );
-               */
                $e[] = array(
                        'type'        => 'text',
                        'req'         => false,
@@ -1113,19 +1100,28 @@ class Toolkit_Members_EditMemberInfo
                        'display' => 'Zip / Postal Code',
                        'opts'    => array('class' => 'text')
                );
+        $e[] = array(
+            'type'    => 'header',
+            'name'    => 'eventLocationInfoHeader_rmv',
+            'display' => 'Location Information
+                <div id="map-dialog">
+                    <div id="map_canvas" style="width:500px; height:400px"></div>
+                </div>
+                <a id="map-it" href="#">Map It</a>'
+        );
         $e[] = array(
             'type' => 'text',
             'req' => false,
             'name' => 'lat',
             'display' => 'Latitude',
-            'opts' => array('class' => 'text')
+            'opts' => array('id' => 'lat', 'class' => 'text')
         );
         $e[] = array(
             'type' => 'text',
             'req' => false,
             'name' => 'lon',
             'display' => 'Longitude',
-            'opts' => array('class' => 'text')
+            'opts' => array('id' => 'lon', 'class' => 'text')
         );
 
                //      {{{ Main Image
index ed02c1d..bb2eeea 100755 (executable)
@@ -108,6 +108,18 @@ var Member =
                 return true;
             }
         });
+        // Create a jquery dialog with #map-dialog
+        $('#map-dialog').dialog({
+            height: 480,
+            width: 520,
+            modal: true,
+            autoOpen: false
+        });
+        $("#map-it").click(function(e){
+            e.preventDefault();
+            $("#map-dialog").dialog('open');
+            GLM_GeoMap.initialize();
+        });
        },
 
        addCategory: function(event)
index 385c427..e03ab42 100644 (file)
@@ -27,7 +27,7 @@
                                <fieldset class="form">
                        {end:}<!-- /inColumn2 -->
                        <legend>
-                {sec.header}
+                {sec.header:h}
             </legend>
                        <table>
                                {foreach:sec.elements,elem}