From 8a3568d69df058a5baa6f58b45fc601266d77815 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 14 Apr 2015 23:33:36 -0400 Subject: [PATCH] restored popover functionality for teacher dashboard --- .../slate-cbl/src/view/teacher/Dashboard.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sencha-workspace/packages/slate-cbl/src/view/teacher/Dashboard.js b/sencha-workspace/packages/slate-cbl/src/view/teacher/Dashboard.js index d4ac711a8..e71b1f7cd 100644 --- a/sencha-workspace/packages/slate-cbl/src/view/teacher/Dashboard.js +++ b/sencha-workspace/packages/slate-cbl/src/view/teacher/Dashboard.js @@ -168,6 +168,10 @@ Ext.define('Slate.cbl.view.teacher.Dashboard', { fn: 'onGridClick', element: 'el', delegate: '.cbl-grid-progress-row, .cbl-grid-demo' + }, + mouseover: { + fn: 'onSkillNameMouseOver', + element: 'el' } }, @@ -204,5 +208,24 @@ Ext.define('Slate.cbl.view.teacher.Dashboard', { } else if (targetEl = ev.getTarget('.cbl-grid-demo', me.el, true)) { me.fireEvent('democellclick', me, ev, targetEl); } + }, + + onSkillNameMouseOver: function(ev) { + var me = this, + popover = me.getPopover(), + dashboardEl = me.el, + targetEl; + + if (targetEl = ev.getTarget('.cbl-grid-skill-name', dashboardEl, true)) { + if (popover.hidden || popover.alignTarget !== targetEl) { + popover.showBy(targetEl); + popover.update({ + title: targetEl.getAttribute('data-skill-name'), + body: targetEl.getAttribute('data-skill-description') + }); + } + } else { + popover.hide(); + } } });