Req.Pages and view file fixes
authorlaury <laury@gaslightmedia.com>
Thu, 12 May 2016 16:56:59 +0000 (12:56 -0400)
committerlaury <laury@gaslightmedia.com>
Thu, 12 May 2016 16:56:59 +0000 (12:56 -0400)
controllers/admin.php
css/front.css
models/admin/management/index.php
models/front/members/list.php
setup/requiredPages.php

index 0d7bb79..556ceca 100644 (file)
@@ -234,11 +234,7 @@ class glmMembersAdmin extends GlmPluginSupport
             }
             $existingPost = get_post(get_option($trimmedName));
             $testSlug = get_post_field( 'post_name', $existingPost);
-            //$existingSlug = $existingPost->post_name;
-            
-            $newSlug = str_replace(' ','-',strtolower($requiredPageInfo['name']));
-            
-            //$existingSlug = $this->get_post_data($newSlug, 'post_name', 'post_name');
+            $newSlug = sanitize_title($requiredPageInfo['name']);
             $existingSlug = $this->verify_post_slug($newSlug);
             
             
@@ -249,14 +245,7 @@ class glmMembersAdmin extends GlmPluginSupport
                 //  then it's either the first time this plugin is run on an outdated site or somehow the ID was
                 //  deleted. Either way, replace the option value with whatever is the ID of the page matching 
                 //  that slug. The slug is checked by translating the page title.
-                //$existingPage = get_post(url_to_postid(str_replace(' ','-',strtolower($requiredPageInfo['name']))));
-                //$existingPage = get_post('members-detail');
-                //echo '-- PROCESSING PAGE'.str_replace(' ','-',strtolower($requiredPageInfo['name']));
-                
-                if ($newSlug == $existingSlug) {
-                    //echo $existingSlug;
-                    //echo 'DUPLICATE PAGE'.$existingSlug;
-            
+                if ($newSlug == $existingSlug) {            
                     $existingID = $this->get_post_id_by_slug($newSlug);
                     update_option($trimmedName, $existingID);
                 // Otherwise create a new page
@@ -289,11 +278,7 @@ class glmMembersAdmin extends GlmPluginSupport
                     }
                 }
             } else {
-                
-//                echo " ((( slugpage ID: ".$existingID.")))";
-//                echo " ((( testslug: ".$testSlug.")))";
-//                echo " ((( existingslug: ".$existingSlug.")))";
-//                echo '-- EXISTING PAGE '.$existingPost->ID.' - '.$existingPost->post_name;
+                // No page created
             }
         }
         
index 304fb3e..576ce32 100644 (file)
     }
 }
 .glm-member-db-list-grid-view #glm-member-list-filters-close {
-    background-color: grey;
+    background-color: rgba(0,0,0,0.25);
     height: 40px;
     line-height: 40px;
     color: white;
     padding-top: 50px;
     border-top: 0;
 }
+#glm-member-list-filters-box .glm-member-search h3 {
+    color: black;
+}
 .glm-member-db-list-grid-view .glm-member-search:before {
     background-color: lightgrey;
     content: '';
     color: white;
 }
 #glm-member-detail-contact-info {
-    background-color: #2C296D;
+    background-color: #2c296d;
     padding: 15px;
     color: white;
     font-size: 18px;
index 2c7ff61..e7ce21a 100644 (file)
@@ -130,7 +130,7 @@ class GlmMembersAdmin_management_index extends GlmDataSettingsGeneral
                     //echo $pageName;
                     $pageID = get_option(GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$pageData['underscored_name']);
                     $pageData['id'] = $pageID;
-                    $pageData['slug'] = str_replace(' ','-',strtolower($pageData['name']));
+                    $pageData['slug'] = sanitize_title($pageData['name']);;
                     echo get_the_title($pageID);
                     //$pageData['name'] = single_post_title(get_post(get_option($pageID)));
                 }
index 0d1f797..09c23bd 100644 (file)
@@ -432,23 +432,13 @@ class GlmMembersFront_members_list extends GlmDataMemberInfo
             $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
 
         }
-        
-        // Check whether search filters open by default
-        if ($this->config['settings']['list_show_search_filters_opened'] == 1) {
-            $filtersOpened = true;
-        }
-        
-        // Check whether map opens by default
-        if ($this->config['settings']['list_map_opened'] == 1) {
-            $mapOpened = true;
-        }
 
         /*
          * Check for which view file to use, else default to bars
          */
-        $view = "front/members/index.html";
+        $view = "front/members/list.html";
         if (isset($actionData['request']['view']) &&
-                strtolower($actionData['request']['view']) == "grid") {
+            strtolower($actionData['request']['view']) == "grid") {
             $view = "front/members/grid.html";
         }
         
index a3d3c04..b26434f 100644 (file)
  * - 'associate'   : this will make the page a child of the GLM Associate page 
  *                   for management purposes
  *
- * When in doubt just use 'associate'
+ * When in doubt just use '0'
  *
  */
 
 $glmMembersRequiredPages = array(
     // These should be in GLM Associate
-    'GLM Associate' => array(
-        'name' => 'GLM Associate',
-        'content' => '',
-        'parent' => '0',
-        'underscored_name' => 'glm_associate_id',
-    ),
+//    'GLM Associate' => array(
+//        'name' => 'GLM Associate',
+//        'content' => '',
+//        'parent' => '0',
+//        'underscored_name' => 'glm_associate_id',
+//    ),
     // These should be in GLM Members
     'Members Only' => array(
         'name' => 'Members Only',
@@ -56,13 +56,13 @@ $glmMembersRequiredPages = array(
     'Members List' => array(
         'name' => 'Members List',
         'content' => '[glm-members-list]',
-        'parent' => 'associate',
+        'parent' => '0',
         'underscored_name' => 'members_list_id',
     ),
-    'Members Detail' => array(
-        'name' => 'Members Detail',
+    'Member Detail' => array(
+        'name' => 'Member Detail',
         'content' => '[glm-member-detail]',
-        'parent' => 'associate',
+        'parent' => '0',
         'underscored_name' => 'member_detail_id',
     )
 );