Comments (13)
Based on the new folder structure ( http://edge.javascriptmvc.com/docs.html#!organizing ) it should get
my_app/more_than_one_word/views/view_name
How are you calling this.view?
from jquerymx.
well i just call this.view("view_name")
my controller plugin name is "more_than_one_word"
it tries to get my_app/views/morethanoneword/view_name
so it tries morethanoneword (as a solid word) instead of more_than_one_word
from jquerymx.
hm.. I did not closed it consciously at least
from jquerymx.
can you provide a breaking test case?
from jquerymx.
I added this test to jquery/controller/view/test recently:
test("complex paths nested inside a controller directory", function(){
$.Controller.extend("Myproject.Controllers.Foo.Bar");
var path = jQuery.Controller._calculatePosition(Myproject.Controllers.Foo.Bar, "init.ejs", "init")
equals(path, "//myproject/views/foo/bar/init.ejs", "view path is correct")
})
Yours is a variation of that it sounds like
from jquerymx.
I'm going to close this. Please provide a breaking case (and test code) and reopen it.
from jquerymx.
Well, maybe your concept has changed, but what I mean was:
Myproject.Controllers.FooBar (For and Bar without dot). And in 3.1 i've got "_" (underline symbol between "foo" and "bar" in the generated path to a view ("foo_bar") and now I've got just "foobar"
To be more concrete:
I just compared the code in 3.1 and 3.2 in controoler/view/view.js
function _calculatePosition in 3.2 (and calculatePosition in 3.1)
So lets my controller class full name be: Project.Controllers.FooBar
The point is that in 3.1:
controller_name = Class._shortName
and what we got there was: controller_name = foo_bar
and then the calculated path to view: vews/foo_bar/view_name.ejs
and in 3.2 there is some sophisticated code for controller_name and final view path, and so we've got now:
controller_name = foobar (without underline symbole between Foo and Bar)
and a path to view: vews/foobar/view_name.ejs
from jquerymx.
It says I can not reopen this issue
from jquerymx.
To be concrete, can't you just say something like:
In 3.1:
A.B.FooBar looks in a/b/foo_bar
but in 3.2
A.B.FooBar looks in a/b/foobar
Is that is what is happening?
from jquerymx.
essentially the _ is getting lost.
from jquerymx.
Yes, exaclty.
from jquerymx.
This would be the breaking test:
$.Controller.extend("Myproject.Controllers.FooBar");
path = jQuery.Controller._calculatePosition(Myproject.Controllers.FooBar, "init.ejs", "init")
equals(path, "//myproject/views/foo_bar/init.ejs", "view path is correct")
from jquerymx.
Ok it should be fixed now. Just needed to run the controller name through jQuery.String.underscore.
from jquerymx.
Related Issues (20)
- formParams() can now only be called on <form> element. formParams() called on other than <form> element returns undefined HOT 2
- Case sensitive file system creates problem HOT 2
- View is never rejected when template is not found HOT 1
- jquery tmpl noConflict
- Cookie: jQuery.evalJSON and jQuery.toJSON HOT 2
- Docs Typo: $.route.attr vs $.route.attrs
- Templated Event Listeners string replacement problem HOT 2
- Fixture does not return correct datatype when error is thrown
- $.Model.delete URL cannot be templated beyond {id} HOT 2
- $.fn.val.call([el]) breaks other jQuery plugins
- $.fixture.make always filters out any fixtures when 'parentId'-like param is present
- $.fn.model(s) ignores type parameter.
- JQueryMX breaks when JQuery is in no-conflicts mode HOT 1
- Default fixture path is hardcoded
- $.fixture templated values not being included in callback data
- jQueryMX breaks when jQuery is in not in global scope HOT 1
- Subclasses of $.Observe are not applied to attribute values HOT 2
- Documentation bug in Controller tutorial
- Bug in remove() from $.Model.List class
- Change <% %> delimeters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquerymx.