Skip to content

Commit

Permalink
remove middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
Recca Tsai committed Feb 17, 2016
1 parent cd1556a commit 5a3355c
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 35 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
],
"require": {
"php": ">=5.5.9",
"illuminate/console": "^5.1",
"illuminate/database": "^5.1",
"illuminate/filesystem": "^5.1",
"illuminate/routing": "^5.1",
"illuminate/console": "~5.1",
"illuminate/database": "~5.1",
"illuminate/filesystem": "~5.1",
"illuminate/routing": "~5.1",
"symfony/finder": "2.8.*|3.0.*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ elixir(function(mix) {
], config.get('public.css.outputFolder'))
.copy([
"resources/assets/vendor/jquery/dist/jquery.min.js",
"resources/assets/vendor/jquery-mousewheel/jquery.mousewheel.min.js",
], config.get('public.js.outputFolder'))
.scripts([
"jquery/dist/jquery.js",
Expand All @@ -32,6 +31,7 @@ elixir(function(mix) {
"jsvi/vi.js",
], config.get('public.js.outputFolder') + '/plugins.js', 'resources/assets/vendor')
.scripts([
"jquery-mousewheel/jquery.mousewheel.js",
"jquery.terminal/js/jquery.terminal-src.js",
"jquery.terminal/js/unix_formatting.js",
"jquery.terminal/js/xml_formatting.js",
Expand Down
2 changes: 1 addition & 1 deletion public/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions public/js/jquery.mousewheel.min.js

This file was deleted.

8 changes: 4 additions & 4 deletions public/js/terminal.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions resources/assets/coffee/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,11 @@ do ($ = jQuery, window, document) ->

request: (cmd, callback = null) =>
@ids[cmd.method] = @ids[cmd.method] || 0;
Loading.show @term
Loading.show @term
$.ajax
url: @options.endPoint,
dataType: 'json'
type: 'post'
headers:
'X-CSRF-TOKEN': @options.csrfToken
data:
jsonrpc: "2.0"
id: ++@ids[cmd.method]
Expand Down
3 changes: 1 addition & 2 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<script>
(function($) {
new Term("#shell", $.extend({!! $options !!}, {
editor: "#editor",
csrf_token: "{{ csrf_token() }}"
editor: "#editor"
}));
})(jQuery);
</script>
Expand Down
14 changes: 5 additions & 9 deletions resources/views/panel.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,16 @@
loadStyle("{{ action('\Recca0120\Terminal\Http\Controllers\TerminalController@media', ['file' => 'css/app.css']) }}");
var scripts = {
jquery: "{{ action('\Recca0120\Terminal\Http\Controllers\TerminalController@media', ['file' => 'js/jquery.min.js']) }}",
mousewheel: "{{ action('\Recca0120\Terminal\Http\Controllers\TerminalController@media', ['file' => 'js/jquery.mousewheel.min.js']) }}",
terminal: "{{ action('\Recca0120\Terminal\Http\Controllers\TerminalController@media', ['file' => 'js/terminal.js']) }}",
app: "{{ action('\Recca0120\Terminal\Http\Controllers\TerminalController@media', ['file' => 'js/app.js']) }}"
};
var callback = function () {
loadScript(scripts.mousewheel, function () {
loadScript(scripts.terminal, function () {
loadScript(scripts.app, function() {
new Term("#panel-shell", $.extend({!! $options !!}, {
editor: "#panel-editor",
csrfToken: "{{ csrf_token() }}"
}));
});
loadScript(scripts.terminal, function () {
loadScript(scripts.app, function() {
new Term("#panel-shell", $.extend({!! $options !!}, {
editor: "#panel-editor"
}));
});
});
}
Expand Down
2 changes: 0 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ public function registerRoutes(Router $router)
{
if ($this->app->routesAreCached() === false) {
$prefix = 'terminal';
$middleware = (version_compare($this->app->version(), 5.2, '>=') === true) ? ['web'] : [];
$router->group([
'as' => 'terminal::',
'middleware' => $middleware,
'namespace' => $this->namespace,
'prefix' => $prefix,
], function () {
Expand Down

0 comments on commit 5a3355c

Please sign in to comment.