+// Wall Message needs a special handling because in some cases
+// it redirects you to your own server. In such cases we can't
+// load it into a modal.
+function openWallMessage(url) {
+ // Split the the url in its parts.
+ var parts = parseUrl(url);
+
+ // If the host isn't the same we can't load it in a modal.
+ // So we will go to to the url directly.
+ if( ("host" in parts) && (parts.host !== window.location.host)) {
+ window.location.href = url;
+ } else {
+ // Otherwise load the wall message into a modal.
+ addToModal(url);
+ }
+}
+
+// This function load the content of the edit url into a modal.
+/// @todo Rename this function because it can be used for more than events.
+function eventEdit(url) {
+ var char = qOrAmp(url);
+ url = url + char + 'mode=none';
+
+ $.get(url, function(data) {
+ $("#modal-body").empty();
+ $("#modal-body").append(data);
+ }).done(function() {
+ loadModalTitle();
+ });
+}