Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Fix adding items with specific lecter uri
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJuliuss committed May 18, 2015
1 parent 957c605 commit 12442b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions assets/js/lecter.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ $(document).ready(function() {
})
.done(function(data) {
if(data.success === true) {
ajaxContent('/?nav=1', function(){
ajaxContent(prefixUrl+'/?nav=1', function(){
$('#alert-success').show().html(data.message);
});
} else {
Expand Down Expand Up @@ -116,7 +116,7 @@ $(document).ready(function() {
};

if(data.newPath !== '') {
ajaxContent('/'+data.newPath+'?nav=1', callback);
ajaxContent(prefixUrl+'/'+data.newPath+'?nav=1', callback);
} else {
callback();
}
Expand Down Expand Up @@ -153,7 +153,7 @@ $(document).ready(function() {
$('#alert-success').show().html(data.message);
}

ajaxContent('/'+data.newPath+'?nav=1', callback);
ajaxContent(prefixUrl+'/'+data.newPath+'?nav=1', callback);
} else {
$('#alert-error').show().html(data.message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
if (Config::get('lecter.private')) {
$router->delete('{any}', ['as' => 'lecter.delete-content', 'uses' => 'WikiController@deletePage'])->where('any', '.*');
$router->put('{any}', ['as' => 'lecter.update-content', 'uses' => 'WikiController@editPage'])->where('any', '.*');
$router->post('{any}', ['as' => 'lecter.update-content', 'uses' => 'WikiController@addPage'])->where('any', '.*');
$router->post('{any?}', ['as' => 'lecter.add-content', 'uses' => 'WikiController@addPage'])->where('any', '.*');
}
});
1 change: 1 addition & 0 deletions src/LecterServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function boot()
*/
public function register()
{

}

protected function setupPackage()
Expand Down
3 changes: 3 additions & 0 deletions views/controllers/wiki/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@extends('lecter::layouts.master')

@section('content')
<script type="text/javascript">
var prefixUrl = "{{ $root }}";
</script>
<nav class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
Expand Down

0 comments on commit 12442b1

Please sign in to comment.