Antoni Segura Puimedon avatar Antoni Segura Puimedon committed 5f26da1

Fixed problem with settings when the server is not on the root url of the server.

Comments (0)

Files changed (1)


 #    You should have received a copy of the GNU General Public License
 #    along with Geminfo.  If not, see <>.
+base_url = Redmine::Utils.relative_url_root
+base_url = base_url + '/' if base_url[-1] != '/'
 <% content_for :header_tags do %>
         var dataToSend = { 'verb': 'reorder', 'data': attrs };
-        var url = '/geminfo/attributes/';
+        var url = '<%= base_url %>geminfo/attributes/';
         new Ajax.Request(url, {
             method: 'PUT',
             postBody: Object.toJSON(dataToSend),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.