From ad9a07c258fa6f7a757029654e852d064ca664bc Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 12 Jul 2019 09:45:30 -0400 Subject: [PATCH] Continuing work on implementing Foundation 6 and UI Snippets. --- css/admin.css | 21 +- index.php | 10 +- views/adminServerStatsConfig.html | 399 ++++++++++-------- views/footer.html | 2 +- views/ui/f6/LayoutNotes.txt | 30 ++ views/ui/f6/checkbox.html | 53 +-- views/ui/f6/editor.html | 88 ++-- views/ui/f6/errorCallout.html | 3 + views/ui/f6/grid-end.html | 5 + views/ui/f6/grid-start.html | 30 ++ views/ui/f6/image.html | 50 +++ views/ui/f6/multicheckboxes.html | 41 ++ views/ui/f6/multiselect.html | 46 ++ views/ui/f6/number.html | 1 + views/ui/f6/section-end.html | 8 + views/ui/f6/section-start.html | 21 + views/ui/f6/select.html | 47 +++ views/ui/f6/text.html | 83 ++-- views/uiOLD/f6/checkbox.html | 30 ++ views/uiOLD/f6/editor.html | 53 +++ views/{ui => uiOLD}/f6/f6-image.html | 0 views/{ui => uiOLD}/f6/f6-select.html | 0 views/uiOLD/f6/grid-end.html | 4 + views/uiOLD/f6/grid-start.html | 10 + views/uiOLD/f6/number.html | 49 +++ views/uiOLD/f6/section-end.html | 5 + views/uiOLD/f6/section-start.html | 22 + views/uiOLD/f6/sub-section-end.html | 14 + .../f6/sub-section-start.html} | 8 +- views/uiOLD/f6/text.html | 45 ++ views/uiOLD/multiSelectSearch.html | 18 + views/uiOLD/std/deleteDialog.html | 49 +++ 32 files changed, 920 insertions(+), 325 deletions(-) create mode 100644 views/ui/f6/LayoutNotes.txt create mode 100644 views/ui/f6/errorCallout.html create mode 100644 views/ui/f6/grid-end.html create mode 100644 views/ui/f6/grid-start.html create mode 100644 views/ui/f6/image.html create mode 100644 views/ui/f6/multicheckboxes.html create mode 100644 views/ui/f6/multiselect.html create mode 100644 views/ui/f6/section-end.html create mode 100644 views/ui/f6/section-start.html create mode 100644 views/ui/f6/select.html create mode 100644 views/uiOLD/f6/checkbox.html create mode 100644 views/uiOLD/f6/editor.html rename views/{ui => uiOLD}/f6/f6-image.html (100%) rename views/{ui => uiOLD}/f6/f6-select.html (100%) create mode 100644 views/uiOLD/f6/grid-end.html create mode 100644 views/uiOLD/f6/grid-start.html create mode 100644 views/uiOLD/f6/number.html create mode 100644 views/uiOLD/f6/section-end.html create mode 100644 views/uiOLD/f6/section-start.html create mode 100644 views/uiOLD/f6/sub-section-end.html rename views/{ui/f6/section-name.html => uiOLD/f6/sub-section-start.html} (79%) create mode 100644 views/uiOLD/f6/text.html create mode 100644 views/uiOLD/multiSelectSearch.html create mode 100644 views/uiOLD/std/deleteDialog.html diff --git a/css/admin.css b/css/admin.css index 6b56607..84700df 100644 --- a/css/admin.css +++ b/css/admin.css @@ -36,13 +36,28 @@ margin: 0 0 0.5rem; } .glm-usage-admin-wrap .help-text { - margin-bottom: .5rem; } .fix-margin-bottom-for-inputs { - margin-bottom: .5rem; } .glm-usage-admin-wrap .form-error, .glm-usage-admin-wrap .help-text { - margin-top: 0px; +} +.glm-ui-f6-section-start { + +} +.glm-ui-f6-section-end { + +} +.glm-ui-f6-checkbox { + +} +.glm-ui-f6-number { + +} +.glm-ui-f6-text { + +} +.glm-ui-f6-editor { + } diff --git a/index.php b/index.php index b30db06..5f07411 100755 --- a/index.php +++ b/index.php @@ -100,27 +100,27 @@ function glmServerStatsScripts() wp_enqueue_style('glm-usage-admin-styles'); wp_enqueue_script( - 'glm-usage-foundation6', + 'glm-usage-foundation6-js', GLM_SERVERSTATS_PLUGIN_URL.'js/foundation-6.min.js', array('jquery'), GLM_SERVERSTATS_PLUGIN_VERSION, true ); wp_register_style( - 'glm-usage-foundation6', + 'glm-usage-foundation6-css', GLM_SERVERSTATS_PLUGIN_URL . 'css/foundation-6.min.css', array(), GLM_SERVERSTATS_PLUGIN_VERSION ); - wp_enqueue_style('glm-usage-foundation6'); + wp_enqueue_style('glm-usage-foundation6-css'); - wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); + wp_enqueue_style('jquery-style', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); // wp_enqueue_style('glm-server-stats-admin-css', GLM_SERVERSTATS_PLUGIN_CSS_URL.'/admin.css'); // Jquery DatePicker wp_enqueue_script('jquery-ui-datepicker'); - wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); + wp_enqueue_style('jquery-style', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); // Register and enqueue DateTimePicker wp_register_script( diff --git a/views/adminServerStatsConfig.html b/views/adminServerStatsConfig.html index 4f981cd..316bc6d 100755 --- a/views/adminServerStatsConfig.html +++ b/views/adminServerStatsConfig.html @@ -1,185 +1,234 @@ {include file='header.html'} - -

Server Usage Statistics Configuration

{if $connectError}

NOTICE: Unable To Connect - Please check data below

{/if} {if $connectionUpdated} {* Place Settings Updatd after first title line *} Settings Updated {/if} -
- - - - - - {* See included UI files for required and optional fields *} - - {$fieldData = [ - 'title' => 'Database Connection and Usage Reporting Configuration for This Site' - ]} - {include file="ui/f6/section-name.html"} - - {* db_name *} - {$fieldData = [ - 'field' => 'db_name', - 'label' => 'Database Name', - 'placeholder' => 'Provided by Gaslight Media Engineering', - 'required' => true, - 'maxWidth' => 20, - 'helpText' => 'We be here!', - 'errorText' => 'The database name is required for connecting to the usage database.' - ]} - {include file="ui/f6/text.html"} - - {* db_host *} - {$fieldData = [ - 'field' => 'db_host', - 'label' => 'Database Server Hostname', - 'placeholder' => 'Provided by Gaslight Media Engineering', - 'required' => true, - 'helpText' => 'We be here!', - 'maxWidth' => 20 - ]} - {include file="ui/f6/text.html"} - - {* db_user *} - {$fieldData = [ - 'field' => 'db_user', - 'label' => 'Database Username', - 'placeholder' => 'Provided by Gaslight Media Engineering', - 'required' => true, - 'maxWidth' => 20 - ]} - {include file="ui/f6/text.html"} - - {* db_pass *} - {$fieldData = [ - 'field' => 'db_pass', - 'label' => 'Database Password', - 'placeholder' => 'Provided by Gaslight Media Engineering', - 'required' => true - ]} - {include file="ui/f6/text.html"} - - {* website *} - {$fieldData = [ - 'field' => 'website', - 'label' => 'Default Website Name', - 'placeholder' => 'Provided by Gaslight Media Engineering', - 'required' => true - ]} - {include file="ui/f6/text.html"} - - {* SECTION *} - {$fieldData = [ - 'title' => 'Usage Notifications for All Sites' - ]} - {include file="ui/f6/section-name.html"} - - {* show_usage *} - {$fieldData = [ - 'field' => 'show_usage', - 'label' => 'Show Data Usage', - 'helpText' => 'Check this box to have server display website usage information.' - - ]} - {include file="ui/f6/checkbox.html"} - - {* send_usage *} - {$fieldData = [ - 'field' => 'send_usage', - 'label' => 'Automatically Send Usage Notices Monthly', - 'helpText' => 'More help stuff. Arent you excited?' - ]} - {include file="ui/f6/checkbox.html"} - - {* send_percent *} - {$fieldData = [ - 'field' => 'send_percent', - 'label' => '% of Target for Notification', - 'required' => true, - 'min' => 0, - 'max' => 150, - 'maxWidth' => 3, - 'helpText' => 'Send notification to customer contact if at this % of target or higher for usage or disk space.', - 'errorText' => 'Im a fool.' - ]} - {include file="ui/f6/number.html"} - - {* SECTION *} - {$fieldData = [ - 'title' => 'Usage Notifications for All Sites' - ]} - {include file="ui/f6/section-name.html"} - - {* show_notifications *} - {$fieldData = [ - 'field' => 'show_notifications', - 'label' => 'Customer Notiifications for This Site' - ]} - {include file="ui/f6/checkbox.html"} - - {* SECTION *} - {$fieldData = [ - 'title' => 'Cookie Pop-Ups for This Site' - ]} - {include file="ui/f6/section-name.html"} - - {* show_cookie_popup *} - {$fieldData = [ - 'field' => 'show_cookie_popup', - 'label' => 'Show Cookie Pop-Up' - ]} - {include file="ui/f6/checkbox.html"} - - {* cookie_popup_timeout *} - {$fieldData = [ - 'field' => 'cookie_popup_timeout', - 'label' => 'Cookie Pop-Up Re-Display Days', - 'required' => true, - 'min' => 0, - 'max' => 90, - 'maxWidth' => 5, - 'helpText' => 'Number of days after user accepts the cookie pop-up that it will display again. - Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.' - ]} - {include file="ui/f6/number.html"} - - {* cookie_message *} - {$fieldData = [ - 'field' => 'cookie_message', - 'label' => 'Cookies Notice Text', - 'required' => true, - 'height' => 50, - 'rows' => 5, - 'maxWidth' => '900px', - 'helpText' => 'My Help Text', - 'errorText' => 'Im a fool.' - ]} - {include file="ui/f6/editor.html"} - - {* SECTION *} - {$fieldData = [ - 'title' => 'Addional Notices', - 'helpText' => 'These notices are displayed when the user clicks the "Show more" button.' - ]} - {include file="ui/f6/section-name.html"} - - {* show_cookie_popup *} - {$fieldData = [ - 'field' => 'show_cookie_popup', - 'label' => 'Show Cookie Pop-Up' - ]} - {include file="ui/f6/checkbox.html"} + {* Beginning of user interface using view UI elements *} + + + + + + + + {include file="ui/f6/grid-start.html"} + + {* Section Start *} + {$ui = [ + 'title' => 'Database Connection' + ]} + {include file="ui/f6/section-start.html"} + + {* db_name *} + {$ui = [ + 'field' => 'db_name', + 'label' => 'Database Name', + 'placeholder' => 'Provided by Gaslight Media Engineering', + 'required' => true, + 'helpText' => 'We be here!', + 'errorText' => 'The database name is required for connecting to the usage database.' + ]} + {include file="ui/f6/text.html"} + + {* db_host *} + {$ui = [ + 'field' => 'db_host', + 'label' => 'Database Server Hostname', + 'placeholder' => 'Provided by Gaslight Media Engineering', + 'required' => true, + 'helpText' => 'We be there!', + 'maxWidth' => 20 + ]} + {include file="ui/f6/text.html"} + + {* db_user *} + {$ui = [ + 'field' => 'db_user', + 'label' => 'Database Username', + 'placeholder' => 'Provided by Gaslight Media Engineering', + 'required' => true, + 'maxWidth' => 20 + ]} + {include file="ui/f6/text.html"} + + {* db_pass *} + {$ui = [ + 'field' => 'db_pass', + 'label' => 'Database Password', + 'placeholder' => 'Provided by Gaslight Media Engineering', + 'required' => true + ]} + {include file="ui/f6/text.html"} + + {* website *} + {$ui = [ + 'field' => 'website', + 'label' => 'Default Website Name', + 'placeholder' => 'Provided by Gaslight Media Engineering', + 'required' => true + ]} + {include file="ui/f6/text.html"} + + {include file="ui/f6/section-end.html"} + + {* Section Start *} + {$ui = [ + 'title' => 'Usage Notifications for All Sites' + ]} + {include file="ui/f6/section-start.html"} + + {* show_usage *} + {$ui = [ + 'field' => 'show_usage', + 'label' => 'Show Data Usage', + 'helpText' => 'Check this box to have server display website usage information.' + + ]} + {include file="ui/f6/checkbox.html"} + + {* send_usage *} + {$ui = [ + 'field' => 'send_usage', + 'label' => 'Automatically Send Usage Notices Monthly', + 'helpText' => 'More help stuff. Arent you excited?' + ]} + {include file="ui/f6/checkbox.html"} + + {* send_percent *} + {$ui = [ + 'field' => 'send_percent', + 'label' => '% of Target for Notification', + 'required' => true, + 'min' => 0, + 'max' => 150, + 'maxWidth' => 3, + 'helpText' => 'Send notification to customer contact if at this % of target or higher for usage or disk space.', + 'errorText' => 'Im a fool.' + ]} + {include file="ui/f6/number.html"} + + {include file="ui/f6/section-end.html"} + + {include file="ui/f6/grid-end.html"} + -


-
+


+ + + + {* End of user interface using view UI elements *} + - \ No newline at end of file diff --git a/views/uiOLD/std/deleteDialog.html b/views/uiOLD/std/deleteDialog.html new file mode 100644 index 0000000..e3ea787 --- /dev/null +++ b/views/uiOLD/std/deleteDialog.html @@ -0,0 +1,49 @@ +{* Delete Dialog *} +{* Set these variables to use the Dialog in your project *} +{* $itemName = Name of item *} +{* $deleteUrl = Url to delete item *} +Delete this {$itemName} + +
+
+

Cancel

+

+
+
+

WARNING:

+

+ Clicking the "Delete this {$itemName}" button above will + delete all of the data and images associated with this event. + +

+

+ + Once deleted, this information will no longer be available and cannot be retrieved! + If you are unsure that you want to completely remove this data, consider changing the status + of this event to "Archived" instead. + +

+
+
+ + -- 2.17.1