diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-04-21 14:26:09 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-04-21 14:26:09 -0700 |
commit | 4c90fdb7b27fdf6527b59097d489a9df0a929264 (patch) | |
tree | b00f3196f58ed712dea40dd69a261fc43129a651 /theme/javascript/core/exercise.js | |
parent | d1c1d7b75b6e4a304d031c4313cf54ae8aa3a11d (diff) | |
parent | 98c133df3c9077c1b06748c3206bea3ff011ed3a (diff) | |
download | gitbook-4c90fdb7b27fdf6527b59097d489a9df0a929264.zip gitbook-4c90fdb7b27fdf6527b59097d489a9df0a929264.tar.gz gitbook-4c90fdb7b27fdf6527b59097d489a9df0a929264.tar.bz2 |
Merge pull request #123 from GitbookIO/feature/plugins
Fix #65: Plugins Architecture
Diffstat (limited to 'theme/javascript/core/exercise.js')
-rwxr-xr-x | theme/javascript/core/exercise.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/theme/javascript/core/exercise.js b/theme/javascript/core/exercise.js index e24ae0a..7dbe982 100755 --- a/theme/javascript/core/exercise.js +++ b/theme/javascript/core/exercise.js @@ -1,9 +1,9 @@ define([ "jQuery", "utils/execute", - "utils/analytic", + "core/events", "core/state" -], function($, execute, analytic, state){ +], function($, execute, events, state){ // Bind an exercise var prepareExercise = function($exercise) { var codeSolution = $exercise.find(".code-solution").text(); @@ -19,7 +19,7 @@ define([ $exercise.find(".action-submit").click(function(e) { e.preventDefault(); - analytic.track("exercise.submit", {type: "code"}); + events.trigger("exercise.submit", {type: "code"}); execute("javascript", editor.getValue(), codeValidation, codeContext, function(err, result) { $exercise.toggleClass("return-error", err != null); |