lib/ymdp/javascripts/jquery/application.js.coffee in ymdp-1.2.0 vs lib/ymdp/javascripts/jquery/application.js.coffee in ymdp-1.3.0

- old
+ new

@@ -8,11 +8,11 @@ ### GLOBAL CONSTANTS ### -window.View = +window.View = application: "<%= @application_name %>" domain: "<%= @domain %>" page_loaded: false authorized: (user) -> @@ -29,11 +29,11 @@ String.prototype.capitalize = () -> this.charAt(0).toUpperCase() + this.slice(1) -window.YMDP = +window.YMDP = Constants: {} # Shows the error view. # # YMDP.showError({ @@ -75,12 +75,15 @@ setTimeoutInSeconds: (callback_function, interval) -> setTimeout(callback_function, interval * 1000) showTranslations: () -> - Debug.log("begin YMDP.showTranslations") - I18n.findAndTranslateAll() + try + Debug.log("begin YMDP.showTranslations") + I18n.findAndTranslateAll() - # define I18n.localTranslations in the view template - I18n.localTranslations() - - Debug.log("end YMDP.showTranslations") + # define I18n.localTranslations in the view template + I18n.localTranslations() + + Debug.log("end YMDP.showTranslations") + catch omg + Debug.error(omg.message)