- esc key to close popup

This commit is contained in:
jean-emmanuel 2015-09-09 17:34:23 +02:00 • committed by bordun
parent 32e9fe7de6
commit 91b487312a
4 changed files with 25 additions and 34 deletions

View file

@ -60,8 +60,8 @@ init = function(callback) {
// or if mouse is on h-scrollbar
$('.tab').on('mousewheel',function(e) {
// console.log(e)
var h = $('#container').innerHeight()-20-$(this).parents('.tab').length*5;
if ($(this).get(0).scrollHeight+20 == $(this).height()) {
var h = $('#container').innerHeight()-10-$(this).parents('.tab').length*5;
if ($(this).get(0).scrollHeight+10 == $(this).height()) {
$(this).scrollLeft($(this).scrollLeft()+e.originalEvent.deltaY);
e.preventDefault();
} else if (e.pageY>=h) {
@ -70,8 +70,6 @@ init = function(callback) {
}
});
// sidepanel

View file

@ -45,7 +45,7 @@ parsewidgets = function(widgets,parent) {
for (widgetId in widgets) {
var widgetData = widgets[widgetId]
var color = widgetData.color?'style="background:'+widgetData.color+'"':'';
var color = widgetData.color?'style="color:'+widgetData.color+'"':'';
var title = widgetData.title || widgetId;
var type = widgetData.type || 'fader'
widgetData.path = widgetData.path || '/' + widgetId

View file

@ -114,8 +114,8 @@ createPopup = function(title,content) {
popup.find('.popup-content').append(content)
$('body').append(popup)
$(document).on('keydown.popup', function(){
popup.close()
$(document).on('keydown.popup', function(e){
if (e.keyCode==27) popup.close()
})