From: <die...@us...> - 2010-02-02 16:21:59
|
Revision: 1769 http://openutils.svn.sourceforge.net/openutils/?rev=1769&view=rev Author: diego_schivo Date: 2010-02-02 16:21:50 +0000 (Tue, 02 Feb 2010) Log Message: ----------- MEDIA-64 "edit" menu display: click instead of mouseenter Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediaedit.js Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-02-02 16:06:07 UTC (rev 1768) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-02-02 16:21:50 UTC (rev 1769) @@ -162,6 +162,7 @@ .mediaheader span.edit { float: right; margin-right: 5px; + cursor: pointer; } .mediaheader .icons { Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediaedit.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediaedit.js 2010-02-02 16:06:07 UTC (rev 1768) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediaedit.js 2010-02-02 16:21:50 UTC (rev 1769) @@ -1,19 +1,18 @@ var MediaEdit = new Class({ initialize: function(triggers){ - this.triggerEnterHandler = this.handleTriggerEnter.bindWithEvent(this); + this.triggerClickHandler = this.handleTriggerClick.bindWithEvent(this); this.popupEnterHandler = this.handlePopupEnter.bindWithEvent(this); this.popupMoveHandler = this.handlePopupMove.bindWithEvent(this); - this.leaveHandler = this.handleLeave.bindWithEvent(this); + this.popupLeaveHandler = this.handlePopupLeave.bindWithEvent(this); $$(triggers).each(function(item){ item.addEvents({ - mouseenter: this.triggerEnterHandler, - mouseleave: this.leaveHandler + click: this.triggerClickHandler, }); }, this); }, - handleTriggerEnter: function(e){ + handleTriggerClick: function(e){ this.timer = $clear(this.timer); var popup = $(e.target).getNext(); if (popup != this.popup){ @@ -22,7 +21,7 @@ popup.addEvents({ mouseenter: this.popupEnterHandler, mousemove: this.popupMoveHandler, - mouseleave: this.leaveHandler + mouseleave: this.popupLeaveHandler }); this.popup = popup; } @@ -41,9 +40,8 @@ this.link = link; }, - handleLeave: function(e){ - $clear(this.timer); - this.timer = this.hide.delay(250, this); + handlePopupLeave: function(e){ + if (!this.timer) this.timer = this.hide.delay(250, this); }, hide: function(){ @@ -51,7 +49,7 @@ this.popup.setStyle('display', 'none'); this.popup.removeEvent('mouseenter', this.popupEnterHandler); this.popup.removeEvent('mousemove', this.popupMoveHandler); - this.popup.removeEvent('mouseleave', this.leaveHandler); + this.popup.removeEvent('mouseleave', this.popupLeaveHandler); delete this.popup; } if (this.link){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |