opportunity: support not being at web server root
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 29 Oct 2014 21:52:11 +0000 (17:52 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 30 Oct 2014 16:00:53 +0000 (12:00 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/opportunity/src/templates/boilerplate.nit
contrib/opportunity/src/templates/meetup.nit
contrib/opportunity/src/templates/meetup_confirmation.nit

index 3261552..ee64f21 100644 (file)
@@ -69,7 +69,7 @@ class OpportunityHeader
 <nav class="menu" role="navigation">
        <div class="container">
                <div class="navbar-header">
-                       <a class="navbar-brand" href="/" >Opportunity</a>
+                       <a class="navbar-brand" href="./" >Opportunity</a>
                </div>
        </div>
 </nav>
index 98ca32f..cc04684 100644 (file)
@@ -52,7 +52,7 @@ class OpportunityMeetupPage
                        var aid = a[2]
                        $.ajax({
                                type: "POST",
-                               url: "/rest/answer",
+                               url: "./rest/answer",
                                data: {
                                        answer_id: aid,
                                        pers_id: pid,
@@ -90,7 +90,7 @@ class OpportunityMeetupPage
                        }
                        $.ajax({
                                type: "POST",
-                               url: "/rest/meetup/new_pers",
+                               url: "./rest/meetup/new_pers",
                                data: {
                                        meetup_id: mid,
                                        persname: pname,
@@ -110,7 +110,7 @@ class OpportunityMeetupPage
                        $('#' + ele.id).parent().remove();
                        $.ajax({
                                type: "POST",
-                               url: "/rest/people",
+                               url: "./rest/people",
                                data: {
                                        method: "DELETE",
                                        p_id: pid
index 0752a37..4378217 100644 (file)
@@ -18,7 +18,7 @@ module meetup_confirmation
 import boilerplate
 import opportunity_model
 
-# Show this page when a `Meetup` is sucessfully created.
+# Show this page when a `Meetup` is successfully created.
 class MeetupConfirmation
        super OpportunityPage
 
@@ -32,7 +32,7 @@ class MeetupConfirmation
                <p class="text-center">
                        <h2> Your meetup was successfully created. </h2>
                        <p>
-                       You can invite people to participate to your event by sharing them this link : <a href="/?meetup_id={{{meetup.id}}}">{{{meetup.name}}}</a>
+                       You can invite people to participate to your event by sharing them this link : <a href="./?meetup_id={{{meetup.id}}}">{{{meetup.name}}}</a>
                        </p>
                        <p>
                        See you soon for more Opportunities !