Final set of changes before initial deployment
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 4 May 2016 19:17:26 +0000 (15:17 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 4 May 2016 19:17:26 +0000 (15:17 -0400)
css/admin.css
setup/adminMenus.php
views/admin/member/index.html
views/admin/member/memberInfo.html
views/admin/members/list.html

index 5583758..c6dee75 100644 (file)
@@ -216,6 +216,7 @@ td.glm-nowrap {
 .glm-dynSelect-delete:hover {
     font-size: 1.1em;
     color: #000;
+    cursor: pointer;
 }
 
 /* Map Edit */
index 88bbf1f..ca4eb76 100644 (file)
@@ -75,19 +75,29 @@ if (current_user_can('glm_members_members')) {
         function() {$this->controller('member');}
     );
 
-// Otherwise just display "Member" menu item
+// Otherwise just display menus for logged in member
 } else {
 
     $mainMenuSlug = 'glm-members-admin-menu-member';
 
     add_menu_page(
-        $this->config['terms']['term_admin_menu_member'],
-        $this->config['terms']['term_admin_menu_member'],
+        $this->config['terms']['term_admin_menu_members'],
+        'GLM Associate',
         'glm_members_main_menu',
         'glm-members-admin-menu-member',
-        function() {$this->controller('member');},
+        function() {},
         false,
-        '91.123'
+        '3.100'
+    );
+
+    // Add a submenu for the "Member" info page
+    add_submenu_page(
+        'glm-members-admin-menu-member',
+        $this->config['terms']['term_admin_menu_member'],
+        'My '.$this->config['terms']['term_admin_menu_member'],
+        'glm_members_main_menu',
+        'glm-members-admin-menu-member',
+        function() {$this->controller('member', 'index');}
     );
 
 }
index 1d356f9..9427ccd 100644 (file)
@@ -34,7 +34,9 @@
                 </table>
             </td>
             <td class="glm-right">
+{if apply_filters('glm_members_menu_members', true)}            
                 <span class="glm-right"><a href="{$thisUrl}?page={$thisPage}&glm_action=memberEdit&member={$memberID}" class="button button-primary glm-button glm-right">Edit {$terms.term_member_cap} Name and Status</a></span>
+{/if}
             </td>
         </tr>            
     </table>
index a129a85..3d839b8 100644 (file)
             <tr>
                 {if $memberInfo.fieldRequired.lat}<th class="emRequiredInputField">{else}<th>{/if}Location:</th>
                 <td>
-                    <input id="glmLat" name="lat" type="hidden" value="{$memberInfo.fieldData.lat}">
-                    <input id="glmLng" name="lon" type="hidden" value="{$memberInfo.fieldData.lon}">
                     <div id="glm-estimate-location" class="button button-secondary">Map Location Using Above Address</div>
                     <p>
                         MAP USE: Drag the pointer to the desired location for this {$terms.term_member}.
                         Click and drag anywhere else on the map to move to another area.
                     </p>
                     <div id="locationMap" class="glm-map-edit">(map loads here)</div>
-                    Selected Position: <span id="mapPosition">Lat {$memberInfo.fieldData.lat}, Lon {$memberInfo.fieldData.lon}</span>
+                    <p>
+                        <b>Selected Position:</b> 
+                        &nbsp;&nbsp;Latitude <input id="glmLat" name="lat" type="text" value="{$memberInfo.fieldData.lat}" class="glm-form-text-input-veryshort">
+                        &nbsp;&nbsp;Longitude <input id="glmLng" name="lon" type="text" value="{$memberInfo.fieldData.lon}" class="glm-form-text-input-veryshort">
+                        &nbsp;&nbsp;<span id="latLonRecenter" class="button button-secondary">Update pointer with new lat/lon postion.</span>
+                    </p>
                 </td>
             </tr>
         </table>
                         <option id="" value="">(No Categories Listed - Select "Add a new Category" to the right. )</option>  
         {/if}
                     </select>&nbsp;&nbsp; Select a category to add to box below.<br>
+{else}
+                    <p>You do not have permission to change your {$terms.term_member} categories. Please call if you need changes made here.                    
 {/if}
                     <div id="activeCategories" class="glm-dynSelect-box">
                     
         <!-- **** Images **** -->
          
         <table id="glm-table-images" class="glm-admin-table glm-hidden glm-member-info-table">
+            <tr>
+                <td>&nbsp</td>
+                <td>
+                    <p>
+                        Best image size to provide is between 800 and 1000 pixels wide and stored as a JPG or JPEG file. 
+                        Also try to supply images that have a reasonable "aspect ratio" (not too tall, not too wide).
+                        Files provided like this should have a file size of 100 to 250 KB. Images will be automatically
+                        resized for use in the Web site. Images that are too large will be rejected.
+                   </p>
+                </td>
+            </tr>
             <tr>
                 <th {if $memberInfo.fieldRequired.logo}class="glm-required"{/if}>Logo:</th>
                 <td {if $memberInfo.fieldFail.logo}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
                     initMap();
                 }
                 
+                // Listen for changes in the lat/lon inputs
+                $('#latLonRecenter').on('click', function() {
+
+                    // Get lat and lon from the input fields
+                    var glmLat = $('#glmLat').val();
+                    var glmLng = $('#glmLng').val();
+                    
+                    location = new google.maps.LatLng(glmLat, glmLng);
+                    initMap();
+                    return false;
+                    
+                });
+                                
             });
             
             /*
                     glmLat = this.position.lat();
                     glmLng = this.position.lng();
                     
-                    // Assign it to the hidden fields for submission
-                    $('#glmLat').val(glmLat);
-                    $('#glmLng').val(glmLng);
+                    // Assign it to the lat/lon fields for submission
+                    $('#glmLat').val(glmLat.toFixed(6));
+                    $('#glmLng').val(glmLng.toFixed(6));
                     
-                    // Also display it to the user
-                    $('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
                 });
-                
+
                 // When estimate location button is clicked, geocode using address
                 $('#glm-estimate-location').on('click', function() {
     
                             // Assign the new position to the hidden fields for submission
                             glmLat = results[0].geometry.location.lat();
                             glmLng = results[0].geometry.location.lng();
-                            $('#glmLat').val(glmLat);
-                            $('#glmLng').val(glmLng);
+                            $('#glmLat').val(glmLat.toFixed(6));
+                            $('#glmLng').val(glmLng.toFixed(6));
     
                             // Also display it to the user
                             $('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
                         map.setCenter(results[0].geometry.location);
                         marker.setPosition( results[0].geometry.location );
                         
-                        // Assign the new position to the hidden fields for submission
+                        // Assign the new position to the lat/lon fields for submission
                         glmLat = results[0].geometry.location.lat();
                         glmLng = results[0].geometry.location.lng();
                         $('#glmLat').val(glmLat);
                     }
                 });
             }
-
+            
             // Flash certain elements for a short time after display      
             $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
            
index 861fe67..755a18b 100644 (file)
@@ -24,6 +24,8 @@
         <h2>List&nbsp;of&nbsp;{$terms.term_member_plur_cap}</h2>
         <br clear="all">
         
+        <p><b>Total found:</b> {$memberCount}&nbsp;&nbsp;</p>
+        
         {if $paging}
             {if $prevStart}<input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.term_member_plur_cap}" class="button button-secondary glm-button">{/if}
             {if $nextStart}<input type="Submit" name="pageSelect" value="Next {$limit} {$terms.term_member_plur_cap}" class="button button-secondary glm-button">{/if}
              $( "#glmMembersSearch" ).autocomplete({
                  source: availableTags,
                  html: true,
+                 position: { my : "right top", at: "right bottom" },
                  select: function( event, ui ) {
                      var memberID = ui.item.id;
                      window.location.replace("{$adminUrl}?page=glm-members-admin-menu-member&glm_action=index&member=" + memberID );