# HG changeset patch # User Aras Pranckevicius # Date 2012-01-09 08:01:37 # Node ID 6300364efc35fc75c01268ee7366ac496d7f7d91 # Parent bd7e95937acd977caf2c8189c631d4d786f63dea changelog: expand clipped messages on click (graph part todo) diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html --- a/rhodecode/templates/changelog/changelog.html +++ b/rhodecode/templates/changelog/changelog.html @@ -155,6 +155,20 @@ ${c.repo_name} ${_('Changelog')} - ${c.r }); + // Expand long messages on click + var messages = YUD.getElementsByClassName('message'); + for (idx in messages) { + var msg = messages[idx]; + // would the message be clipped? + if (msg.scrollHeight > msg.parentNode.parentNode.offsetHeight) + { + msg.style.cursor = 's-resize'; + msg.onclick = function() { + this.parentNode.parentNode.style.height = 'auto'; + } + } + } + function set_canvas(heads) { var c = document.getElementById('graph_nodes'); var t = document.getElementById('graph_content');