Blame view

client/helpers/helpers-ui.js 389 Bytes
3b214be5e   Ryan Glover   Convert all Coffe...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  /*
  * UI Helpers
  * Define UI helpers for common template functionality.
  */
  
  /*
  * Current Route
  * Return an active class if the currentRoute session variable name
  * (set in the appropriate file in /client/routes/) is equal to the name passed
  * to the helper in the template.
  */
  
  UI.registerHelper('currentRoute', function(route){
    Session.equals('currentRoute', route) ? 'active' : '';
  });