r1818 - in trunk/wao-web/src/main/webapp: . WEB-INF/content/obsmer
Author: bleny Date: 2014-04-03 14:05:18 +0200 (Thu, 03 Apr 2014) New Revision: 1818 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1818 Log: refs #4483 use tooltips in compact view Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp trunk/wao-web/src/main/webapp/wao.css trunk/wao-web/src/main/webapp/wao.js Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-04-03 11:28:50 UTC (rev 1817) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-04-03 12:05:18 UTC (rev 1818) @@ -317,10 +317,14 @@ </s:if> <td class="only-in-full-view"><s:property value="fishingZones" /></td> <td class="only-in-compact-view"> - <s:property value="fishingZones" /> - <s:if test=" fishingZonesInfos != null"> - (<s:property value="fishingZonesInfos" />) + <s:if test="fishingZonesInfos == null"> + <s:property value="fishingZones"/> </s:if> + <s:else> + <span data-original-title="<s:property value="fishingZonesInfos"/>" data-toggle="tooltip" data-placement="left"> + <s:property value="fishingZones"/> + </span> + </s:else> </td> <td class="only-in-full-view"> <s:property value="fishingZonesInfos" /> @@ -344,7 +348,14 @@ <s:property value="professionDescriptionWithoutDCF5" /> </td> <td class="only-in-compact-view"> - <s:property value="professionLibelle" /> (<s:property value="professionSpecies" />) + <s:if test="professionSpecies == null"> + <s:property value="professionLibelle"/> + </s:if> + <s:else> + <span data-original-title="<s:property value="professionSpecies"/>" data-toggle="tooltip" data-placement="left"> + <s:property value="professionLibelle"/> + </span> + </s:else> </td> <!-- Months columns --> <s:iterator value="samplingPlan.months" var="month"> @@ -410,8 +421,12 @@ <s:property value="appliedCoverageRate" />% </s:if> </td> - <td class="ellipsis"> - <s:property value="comment"/> + <td> + <s:if test=" ! comment.empty"> + <span data-original-title="<s:property value="comment"/>" data-toggle="tooltip" data-placement="left"> + <i class="icon-comment"></i> + </span> + </s:if> </td> <td class="actions"> Modified: trunk/wao-web/src/main/webapp/wao.css =================================================================== --- trunk/wao-web/src/main/webapp/wao.css 2014-04-03 11:28:50 UTC (rev 1817) +++ trunk/wao-web/src/main/webapp/wao.css 2014-04-03 12:05:18 UTC (rev 1818) @@ -32,6 +32,11 @@ margin-top: 0px; } +/** Comme ça on peut faire des tooltips avec des <span> plutôt que des <a> et avec cette règle le tooltip s'affiche même si le curseur ne survole pas exactement un caractère */ +span[data-toggle="tooltip"] { + display: inline-block; +} + /****************************************************************************** * Des classes à usage transverse *****************************************************************************/ @@ -65,22 +70,13 @@ } -td.ellipsis { - max-width: 100px; -} - .ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + max-width: 100px; } -td.ellipsis:hover { - overflow: visible; - white-space: normal; - text-overflow: initial; -} - .compact-view .only-in-full-view, .full-view .only-in-compact-view, .show-estimated .real, Modified: trunk/wao-web/src/main/webapp/wao.js =================================================================== --- trunk/wao-web/src/main/webapp/wao.js 2014-04-03 11:28:50 UTC (rev 1817) +++ trunk/wao-web/src/main/webapp/wao.js 2014-04-03 12:05:18 UTC (rev 1818) @@ -230,6 +230,7 @@ // $('select').select2(); // $('a[data-toggle="popover"]').popover(); + $('span[data-toggle="tooltip"]').tooltip(); WAO = new Wao();
participants (1)
-
bleny@users.forge.codelutin.com