From: Anthony Talarico Date: Fri, 9 Nov 2018 18:47:03 +0000 (-0500) Subject: linking admin settings to the front view display X-Git-Tag: v1.0.0^2~34 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=19d9da337701a0d543ff02be95ab18862cd1d46b;p=WP-Plugins%2Fglm-member-db-county-map.git linking admin settings to the front view display --- diff --git a/css/admin.min.css b/css/admin.min.css index 522e2e7..247407e 100644 --- a/css/admin.min.css +++ b/css/admin.min.css @@ -1 +1 @@ -#new-area-section{background-color:white}#new-area-section .input-container{margin-bottom:0;padding:0 10px 0 10px}#new-area-section .input-container input.area-name{margin:10px 10px 0 0px}#new-area-section .input-container input.area-name+label{top:15px !important}#new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child){line-height:1;min-height:20px}#new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child) span,#new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child) a{line-height:1;padding:2px 10px}#new-area-section .map-color-selection{margin-top:20px}#new-area-section .map-color-selection label{margin-left:15px;font-size:16px}#list-header{padding:5px;background-color:#003366;color:white}#list-header .area-header{color:inherit}#area-list .record-container{margin-bottom:2px}#area-list .record-container .area-record{padding:5px;background-color:white}#area-list .record-container .area-record:hover{cursor:pointer}#area-list .record-container .area-record .area-record-delete{position:relative;right:15px}#area-list .record-container .area-record .area-record-delete:hover{cursor:pointer}.edit-field{background-color:rgba(30,202,162,0.3) !important}.error-field{background-color:rgba(244,67,54,0.3) !important} +#map-area-container{padding:10px}#map-area-container #new-area-section{max-width:800px;background-color:white}#map-area-container #new-area-section .input-container{margin-bottom:0;padding:0 10px 0 10px}#map-area-container #new-area-section .input-container input.area-name{margin:10px 10px 0 0px}#map-area-container #new-area-section .input-container input.area-name+label{top:15px !important}#map-area-container #new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child){line-height:1;min-height:20px}#map-area-container #new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child) span,#map-area-container #new-area-section .map-page-selection .select-wrapper .dropdown-content.select-dropdown li:not(:first-child) a{line-height:1;padding:2px 10px}#map-area-container #new-area-section .map-color-selection{margin-top:20px}#map-area-container #new-area-section .map-color-selection label{margin-left:15px;font-size:16px}#map-area-container #list-header{padding:5px;background-color:#003366;color:white}#map-area-container #list-header .area-header{color:inherit}#map-area-container #area-list .record-container{margin-bottom:2px}#map-area-container #area-list .record-container .area-record{padding:5px;background-color:white}#map-area-container #area-list .record-container .area-record:hover{cursor:pointer}#map-area-container #area-list .record-container .area-record .area-record-delete{position:relative;right:15px}#map-area-container #area-list .record-container .area-record .area-record-delete:hover{cursor:pointer}#area-update{margin-top:10px;float:right}.edit-field{background-color:rgba(30,202,162,0.3) !important}.error-field{background-color:rgba(244,67,54,0.3) !important} diff --git a/models/front/map/display.php b/models/front/map/display.php index 70e005d..e254248 100644 --- a/models/front/map/display.php +++ b/models/front/map/display.php @@ -15,15 +15,14 @@ // Translation table for [glm-contacts-list] "show" options to configuration parameters -// Load Contacts data abstract - +require_once GLM_MEMBERS_COUNTY_MAP_PLUGIN_CLASS_PATH.'/data/dataMapSettings.php'; /* * This class performs the work for the default action of the "Contacts" menu * option, which is to display the contacts dashboard. * */ -class GlmMembersFront_map_display +class GlmMembersFront_map_display extends GlmDataMapSettings { /** @@ -100,10 +99,14 @@ class GlmMembersFront_map_display */ public function modelAction ($actionData = false) { + $sql = "SELECT * FROM " . GLM_MEMBERS_COUNTY_MAP_PLUGIN_DB_PREFIX . 'areas'; + $areas = $this->wpdb->get_results($sql); + wp_enqueue_style('admin-css', GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'css/front.min.css'); // Compile template data $templateData = array( - 'assets' => GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'assets/' + 'assets' => GLM_MEMBERS_COUNTY_MAP_PLUGIN_URL . 'assets/', + 'areas' => $areas ); // Return status, any suggested view, and any data to controller diff --git a/sass/admin/_settings.scss b/sass/admin/_settings.scss index 1967284..1e9d29e 100644 --- a/sass/admin/_settings.scss +++ b/sass/admin/_settings.scss @@ -1,64 +1,72 @@ -#new-area-section{ - background-color: white; - .input-container{ - margin-bottom: 0; - padding: 0 10px 0 10px; - input.area-name{ - margin: 10px 10px 0 0px; - } - input.area-name + label{ - top: 15px !important; +#map-area-container{ + padding: 10px; + #new-area-section{ + max-width: 800px; + background-color: white; + .input-container{ + margin-bottom: 0; + padding: 0 10px 0 10px; + input.area-name{ + margin: 10px 10px 0 0px; + } + input.area-name + label{ + top: 15px !important; + } } - } - .map-page-selection{ - .select-wrapper{ - .dropdown-content.select-dropdown{ - li:not(:first-child){ - line-height: 1; - min-height: 20px; - span,a{ + .map-page-selection{ + .select-wrapper{ + .dropdown-content.select-dropdown{ + li:not(:first-child){ line-height: 1; - padding: 2px 10px; + min-height: 20px; + span,a{ + line-height: 1; + padding: 2px 10px; + } } } } } - } - .map-color-selection{ - margin-top: 20px; - label{ - margin-left: 15px; - font-size: 16px; + .map-color-selection{ + margin-top: 20px; + label{ + margin-left: 15px; + font-size: 16px; + } } } -} -#list-header{ - padding: 5px; - background-color: #003366; - color: white; - .area-header{ - color: inherit; + #list-header{ + padding: 5px; + background-color: #003366; + color: white; + .area-header{ + color: inherit; + } } -} -#area-list{ - .record-container{ - margin-bottom: 2px; - .area-record{ - padding: 5px; - background-color: white; - &:hover{ - cursor: pointer; - } - .area-record-delete{ - position: relative; - right: 15px; + #area-list{ + .record-container{ + margin-bottom: 2px; + .area-record{ + padding: 5px; + background-color: white; &:hover{ cursor: pointer; } + .area-record-delete{ + position: relative; + right: 15px; + &:hover{ + cursor: pointer; + } + } } } } } +#area-update{ + margin-top: 10px; + float: right; +} .edit-field{ background-color: rgba(30, 202, 162, 0.3) !important; } diff --git a/views/admin/settings/mapSettings.html b/views/admin/settings/mapSettings.html index 87786b8..3556dbc 100644 --- a/views/admin/settings/mapSettings.html +++ b/views/admin/settings/mapSettings.html @@ -1,45 +1,57 @@ - -
-
-
-
-
- - - Required +
+
Map Areas
+
+
+
+
+
+ + + Required + +
+
+ +
+
+ + +
-
- -
-
- + +
+
+
+ + +
+
-
-
-
-
- - +
+
+ +
+ +
-
-
-
Area Name
-
Attached Page
-
Hover Color
-
-
-
- +
+
Area Name
+
Attached Page
+
Hover Color
+
+
+
+