$clickThroughCounts = array('day' => 0, 'week' => 0, 'month' => 0);
$detailViewCounts = array('day' => 0, 'week' => 0, 'month' => 0);
+ // Enqueue Materialize
+ wp_register_script(
+ 'materialize',
+ GLM_MEMBERS_PLUGIN_URL . 'js/materialize.min.js',
+ array(
+ 'jquery'
+ ),
+ GLM_MEMBERS_PLUGIN_VERSION
+ );
+ wp_enqueue_script('materialize', false, array('jquery'), false, true);
+ wp_enqueue_style('materialize-css', GLM_MEMBERS_PLUGIN_URL . 'css/materialize.min.css');
+
// Check if there's a logged in user who is locked to their own entity.
$lockedToMember = apply_filters( 'glm_members_locked_to_member_id', false );
$memberID = $lockedToMember;
<ul id="members-summary-widget" class="summary members-summary-widget dashboard-summary-widget collapsible">
<li>
- <div class="summary-widget-handle collapsible-header"> {$w|var_dump} </div>
+ <div class="summary-widget-handle collapsible-header"><pre> {$w|var_dump} </pre></div>
<div class="summary-widget-body collapsible-body">
<div class="quicklinks">
<a href="#">Dashboard</a>
</div>
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+<script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ /*
+ * Do autocomplete search for member
+ * label: What will be searched
+ * value: What will be displayed when selected
+ * id: Member id added so we can go to the member while showing what was selected
+ * Also note that autocomplete does not properly render HTML codes, so we
+ * "unescape" them for HTML in Smarty.
+ */
+
+ // $( "#glmMembersList" ).autocomplete({
+ // //source: availableTags,
+ // source: {*ajaxModel*},
+ // data: {
+
+ // action: 'glm_members_admin_ajax',
+ // glm_action: 'eventsCalMonthAJAX',
+ // custom_data: 'custom_data',
+ // },
+ // html: true,
+ // select: function( event, ui ) {
+ // var memberID = ui.item.id;
+ // window.location.replace("{*$adminUrl*}?page=glm-members-admin-menu-member&glm_action=index&member=" + memberID );
+ // },
+ // response: function(event, ui) {
+ // if (!ui.content.length) {
+ // var noResult = { value:"",label:"No results found" };
+ // ui.content.push(noResult);
+ // }
+ // }
+ // });
+
+ });
+
+</script>