Skip to content

Commit

Permalink
Merge pull request #33 from SlateFoundation/development
Browse files Browse the repository at this point in the history
v0.2.2
  • Loading branch information
themightychris committed Apr 15, 2015
2 parents 7e71a11 + 2b788c1 commit 229d593
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions sencha-workspace/packages/slate-cbl/src/view/teacher/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
},

Expand Down Expand Up @@ -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();
}
}
});

0 comments on commit 229d593

Please sign in to comment.