@@ -1483,6 +1483,7 @@ function domReadyHistory() {
14831483 // I cannot say what will happen if they are not like that, togglediffs
14841484 // will go mad !
14851485 togglerevs ( ) ;
1486+ toggleProjectInfo ( ) ;
14861487}
14871488
14881489function get_annotations ( ) {
@@ -1737,21 +1738,21 @@ function toggle_revtags() {
17371738}
17381739
17391740/**
1740- * Function to toggle revision message length for long revision messages
1741+ * Function to toggle message length presentation
17411742 */
1742- function togglerevs ( ) {
1743+ function toggleCommon ( closestType ) {
17431744 $ ( ".rev-toggle-a" ) . click ( function ( ) {
1744- var toggleState = $ ( this ) . closest ( "p" ) . attr ( "data-toggle-state" ) ;
1745+ var toggleState = $ ( this ) . closest ( closestType ) . attr ( "data-toggle-state" ) ;
17451746 var thisCell = $ ( this ) . closest ( "td" ) ;
17461747
1747- if ( toggleState == "less" ) {
1748- $ ( this ) . closest ( "p" ) . attr ( "data-toggle-state" , "more" ) ;
1748+ if ( toggleState === "less" ) {
1749+ $ ( this ) . closest ( closestType ) . attr ( "data-toggle-state" , "more" ) ;
17491750 thisCell . find ( ".rev-message-summary" ) . addClass ( "rev-message-hidden" ) ;
17501751 thisCell . find ( ".rev-message-full" ) . removeClass ( "rev-message-hidden" ) ;
17511752 $ ( this ) . html ( "... show less" ) ;
17521753 }
1753- else if ( toggleState == "more" ) {
1754- $ ( this ) . closest ( "p" ) . attr ( "data-toggle-state" , "less" ) ;
1754+ else if ( toggleState === "more" ) {
1755+ $ ( this ) . closest ( closestType ) . attr ( "data-toggle-state" , "less" ) ;
17551756 thisCell . find ( ".rev-message-full" ) . addClass ( "rev-message-hidden" ) ;
17561757 thisCell . find ( ".rev-message-summary" ) . removeClass ( "rev-message-hidden" ) ;
17571758 $ ( this ) . html ( "show more ..." ) ;
@@ -1761,6 +1762,19 @@ function togglerevs() {
17611762 } ) ;
17621763}
17631764
1765+ /**
1766+ * Function to toggle revision message length for long revision messages
1767+ */
1768+ function togglerevs ( ) {
1769+ $ ( ".rev-toggle-a" ) . click ( toggleCommon ( "p" ) ) ;
1770+ }
1771+ /**
1772+ * Function to toggle project info message length
1773+ */
1774+ function toggleProjectInfo ( ) {
1775+ $ ( ".rev-toggle-a" ) . click ( toggleCommon ( "span" ) ) ;
1776+ }
1777+
17641778function selectAllProjects ( ) {
17651779 if ( $ ( "#project" ) . data ( SearchableOptionList . prototype . DATA_KEY ) ) {
17661780 $ ( "#project" ) . searchableOptionList ( ) . selectAll ( ) ;
0 commit comments