Some readability improvements

This commit is contained in:
kondou 2014-03-03 17:11:23 +01:00
parent 9bc3f3cf30
commit 770382aea9
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ ListView.prototype={
$.each(this.hoverElement,function(index,collumn){
$.each(collumn,function(index,element){
var html='<a href="#" title="'+element.title+'" class="hoverElement"/>';
element=$(html);
element = $(html);
element.append($('<img src="'+element.icon+'"/>'));
element.click(element.callback);
tr.children('td.'+collumn).append(element);
@ -61,7 +61,7 @@ ListView.prototype={
},
addHoverElement:function(column,icon,title,callback){
if(!this.hoverElements[column]){
this.hoverElements[column]=[];
this.hoverElements[column] = [];
}
this.hoverElements[row].push({icon:icon,callback:callback,title:title});
},

View File

@ -279,7 +279,7 @@
}
list.append(list.find('li.creator'));
var pos=button.position();
if(($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height()) &&
if(($(document).height() > (button.offset().top + button.outerHeight() + list.children().length * button.height()) &&
$(document).height() - button.offset().top > (button.offset().top+button.outerHeight() + list.children().length * button.height())) ||
$(document).height()/2 > button.offset().top
) {