Permalink
Browse files

Move behaviour initialization into own js function.

  • Loading branch information...
1 parent f0b6628 commit 06444a8604593a73e48851056f668fe2749e58f1 @huerlisi committed Dec 19, 2010
Showing with 14 additions and 11 deletions.
  1. +14 −11 public/javascripts/application.js
@@ -217,16 +217,19 @@ function addTabsBehaviour() {
$("#tabs").tabs();
}
+// Initialize behaviours
+function initializeBehaviours() {
+ addSelectableBehaviour();
+ addAutocompleteBehaviour();
+ addNestedFormsBehaviour();
+ addCorrectnessIndicatorBehaviour();
+ addQuestionSelectionBehaviour();
+ addAutogrowBehaviour();
+ addMultipleSelectBehaviourForQuizAssignments();
+ addMultipleSelectBehaviourForEMails();
+ addTabsBehaviour();
+}
+
// Loads functions after DOM is ready
-$(document).ready(function() {
- addSelectableBehaviour();
- addAutocompleteBehaviour();
- addNestedFormsBehaviour();
- addCorrectnessIndicatorBehaviour();
- addQuestionSelectionBehaviour();
- addAutogrowBehaviour();
- addMultipleSelectBehaviourForQuizAssignments();
- addMultipleSelectBehaviourForEMails();
- addTabsBehaviour();
-});
+$(document).ready(initializeBehaviours);

0 comments on commit 06444a8

Please sign in to comment.