Closed TomPastyrik closed 10 years ago
Great idea! :-) But actually I'm abroad and don't have notebook with IDE. Please, could you send a fork? (I think is really easy fix, just changing few lines) If you are going to do that please do your changes into master. Not into nette09 branch. Thanks!
not sure about this. it's true about the errors but if renamed to .latte we'll lose colored js markup
There are two options. Both annoing: A) to have .latte - no syntax highliting (or wrong one because it will be considered as a HTML file) B) to have .js file - and there will be parse errors in IDE because of latte macros -> than there is red exclamation mark in project and in IDE it looks that project is broken.
In some .latte looks better for me because it contents latte template, not a js file
Actually it's a js file/contents with some variables&helpers. Or as you say a latte template but with js content inside. Just a point of view..
The simplest solution I can think of is to rename it to have .latte extension and wrap the file content in <script>
tags which would have to be removed in Controller::renderInitJavaScript() method or https://github.com/jkuchar/MultipleFileUpload/blob/master/MultipleFileUpload/MultipleFileUpload.php#L293.
What do you think?
I'm not OK with this solution. Probably best one should be if code will export needed variables as local JavaScript properties that will be used in template. (so they won't be declared in .latte file, but in controller)
Hi,
thanks for this plugin in a first place! :) I would recommend refactor
initJS.js
files toinitJS.latte
since there are inputs for latte variables and IDE parsers cannot handle it with.js
filename. So there are unnecessary errors of static code analysis.