Skip to content

Commit

Permalink
change labels on exception page dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 11, 2014
1 parent 6dae38a commit 205bfd7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Mojolicious/templates/exception.development.html.ep
Expand Up @@ -102,9 +102,16 @@
function mojoDrawer (handle, drawer) {
$(handle).click(function() {
$(drawer).slideToggle('slow');
var text = $(handle + ' div.tap').text();
text = text == "tap for more" ? "tap for less" : "tap for more";
$(handle + ' div.tap').text(text);
});
$(drawer).toggle();
}
$(document).ready(function() {
mojoDrawer('#trace', '#frames');
mojoDrawer('#more', '#infos');
});
% end
<div id="wrapperlicious">
<div id="nothing" class="box spaced"></div>
Expand Down Expand Up @@ -181,7 +188,6 @@
</table>
</div>
<div class="tap">tap for more</div>
<%= javascript begin%>mojoDrawer('#trace', '#frames')<% end %>
% }
</div>
<div id="request" class="box infobox spaced">
Expand Down Expand Up @@ -244,6 +250,5 @@
%= image '/mojo/logo-black.png', alt => 'Mojolicious logo'
% end
</div>
<%= javascript begin%>mojoDrawer('#more', '#infos')<% end %>
</body>
</html>

0 comments on commit 205bfd7

Please sign in to comment.