{"action":"created","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/4512","labels_url":"https://api.github.com/repos/bolt/bolt/issues/4512/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/4512/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/4512/events","html_url":"https://github.com/bolt/bolt/issues/4512","id":118261484,"number":4512,"title":"Strange working addJavascript","user":{"login":"Boorj","id":2145313,"avatar_url":"https://avatars.githubusercontent.com/u/2145313?v=3","gravatar_id":"","url":"https://api.github.com/users/Boorj","html_url":"https://github.com/Boorj","followers_url":"https://api.github.com/users/Boorj/followers","following_url":"https://api.github.com/users/Boorj/following{/other_user}","gists_url":"https://api.github.com/users/Boorj/gists{/gist_id}","starred_url":"https://api.github.com/users/Boorj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boorj/subscriptions","organizations_url":"https://api.github.com/users/Boorj/orgs","repos_url":"https://api.github.com/users/Boorj/repos","events_url":"https://api.github.com/users/Boorj/events{/privacy}","received_events_url":"https://api.github.com/users/Boorj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-22T12:39:44Z","updated_at":"2015-11-25T11:39:05Z","closed_at":null,"body":"Is it a bug? \r\nIn extension i use addAssets function.\r\n\r\nThis combination \r\n![2015-11-22 18-33-31](https://cloud.githubusercontent.com/assets/2145313/11323794/dd040900-9147-11e5-957d-277c68572b86.png)\r\ngives me\r\n![2015-11-22 18-34-58](https://cloud.githubusercontent.com/assets/2145313/11323800/f02d275a-9147-11e5-9f2f-ecda495b0872.png) (in html sourcecode)\r\n\r\n![2015-11-22 18-33-42](https://cloud.githubusercontent.com/assets/2145313/11323801/f8529e4c-9147-11e5-9d8e-6bb83eaadb68.png)\r\n↓↓↓\r\n![2015-11-22 18-34-33](https://cloud.githubusercontent.com/assets/2145313/11323802/fb87c448-9147-11e5-978f-e7009ba0e7c1.png)\r\n\r\n![2015-11-22 18-34-03](https://cloud.githubusercontent.com/assets/2145313/11323804/0253c83a-9148-11e5-91cd-e4fa6d243a0c.png)\r\nthis one, again, gives me\r\n![2015-11-22 18-34-33](https://cloud.githubusercontent.com/assets/2145313/11323806/095c99e0-9148-11e5-94c7-4057f3987f08.png)\r\n\r\nIs it ok that addJavascript adds only one last existing file?\r\nbolt - v2.3."},"comment":{"url":"https://api.github.com/repos/bolt/bolt/issues/comments/159579944","html_url":"https://github.com/bolt/bolt/issues/4512#issuecomment-159579944","issue_url":"https://api.github.com/repos/bolt/bolt/issues/4512","id":159579944,"user":{"login":"Boorj","id":2145313,"avatar_url":"https://avatars.githubusercontent.com/u/2145313?v=3","gravatar_id":"","url":"https://api.github.com/users/Boorj","html_url":"https://github.com/Boorj","followers_url":"https://api.github.com/users/Boorj/followers","following_url":"https://api.github.com/users/Boorj/following{/other_user}","gists_url":"https://api.github.com/users/Boorj/gists{/gist_id}","starred_url":"https://api.github.com/users/Boorj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boorj/subscriptions","organizations_url":"https://api.github.com/users/Boorj/orgs","repos_url":"https://api.github.com/users/Boorj/repos","events_url":"https://api.github.com/users/Boorj/events{/privacy}","received_events_url":"https://api.github.com/users/Boorj/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T11:39:05Z","updated_at":"2015-11-25T11:39:05Z","body":"tested again on the project. again - it shows only the last javascript.\r\n\r\nhere's the whole code snippet\r\n```php\r\n    public function __construct(Application $app)\r\n    {\r\n        parent::__construct($app);\r\n        $this->app['config']->getFields()->addField(new GridField());\r\n        $app['storage.typemap'] = array_merge( $app['storage.typemap'], ['grid' =>'Bolt\\Extension\\BobdenOtter\\GridField\\GridField'] );\r\n\r\n        if ($this->app['config']->getWhichEnd()=='backend') {\r\n            $this->app['htmlsnippets'] = true;\r\n            $this->app['twig.loader.filesystem']->prependPath(__DIR__.\"/twig\");\r\n        }\r\n\r\n    }\r\n\r\n    public function initialize() {\r\n        $this->app->before(array($this, 'addAssets'));\r\n    }\r\n\r\n    public function getName()\r\n    {\r\n        return \"Gridfield\";\r\n    }\r\n\r\n    public function addAssets(Request $request)\r\n    {\r\n        if ($this->app['config']->getWhichEnd()=='backend') {\r\n            $request->attributes->set('allow_snippets', true);\r\n\r\n            $this->addCss('assets/handsontable.full.min.css');\r\n\r\n            $this->addJavascript('assets/start.js');\r\n            $this->addJavascript('assets/handsontable.full.min.js');\r\n//            $html = '<script src=\"/extensions/local/BobdenOtter/GridField/assets/handsontable.full.min.js\"></script>';\r\n//            $this->app['asset.queue.snippet']->add(Target::AFTER_BODY_JS, $html);\r\n//            $html = '<script src=\"/extensions/local/BobdenOtter/GridField/assets/start.js\"></script>';\r\n//            $this->app['asset.queue.snippet']->add(Target::AFTER_BODY_JS, $html);\r\n        }\r\n\r\n        $this->app['twig.loader.filesystem']->prependPath(__DIR__.\"/twig\");\r\n\r\n    }\r\n```"}}