forked from humhub/humhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a JavaScript event to the renderPartial method for successfully…
… loaded views via ajax
- Loading branch information
1 parent
4befd9d
commit 4233965
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
JavaScript | ||
========== | ||
|
||
Summary of general JavaScript functions and events used in HumHub. | ||
|
||
## Ajax Loaded Event | ||
|
||
Each page that is loading with Ajax via the renderPartial method, fire a JavaScript event named "ajaxLoaded" to signalize that the view is successfully loaded. | ||
To catch this event you have to set a trigger at the body tag: | ||
|
||
$( "body" ).on( "ajaxLoaded", function( event, controllerID, moduleID, actionID, view ) { | ||
alert( controllerID + "\n" + moduleID + "\n" + actionID + "\n" + view ); | ||
}); | ||
|
||
``Note:`` To deliver JavaScript with the view loaded via ajax, you have to set the renderPartial param "$processOutput" to true! |