Comments (12)
Where would the HtmlHelpers go? The CollidR project does not have a dependency on System.Web.Mvc. Does it make sense to add a CollidR.Mvc project for the helpers?
from collidr.
Yeah, that's good. I think that's forward thinking, too, as far as thinking other clients. Like WinForms :)
from collidr.
I left out the
<script src="~/Scripts/CollidR.js"></script>
portion from the generated code for a few reasons:
a) the ~ part does not get resolved when it is returned from an HTML Helper
b) the script might already be included in the shared layout
c) not sure it's a good idea to assume what folder CollidR.js is located
from collidr.
So...maybe we should include that by default and have an overload that mutes the script tag? That way it works with one line of code, but if you need to control when/where it gets written you can.
from collidr.
I will see if I can get the path to resolve then. It's a trickier problem than I thought it would be.
from collidr.
Gotcha. We could keep it simple to start...the default path (from the NuGet install) is going to be as above. If they need to change it, maybe we do an overload for the path of the script?
I think at this point we don't need to resolve the path, just assume it's okay. Add the override to mute it, then they can add it manually if they like (to a layout, for example).
from collidr.
If we put src="/Scripts/CollidR.js", and the application is installed in a virtual directory in IIS (eg. http://localhost/MyApp), then the browser will not find CollidR.js. It will try to find it at http://localhost/Scripts/CollidR.js.
The ~ solves that problem normally, but not for strings that are returned from the HTML Helper
from collidr.
Gotcha. Okay...I'll leave it to you for implementation here then, either way (assuming or full resolution) is okay with me for now.
from collidr.
Okay, figured out a way to do it
from collidr.
Now that I committed the changes, I am wondering if the helper method should be renamed RegisterCollidRFor() since it is model bound. This would be consistent with the EditorFor / Editor convention in the built in MVC helpers.
from collidr.
Agreed, that's probably a good call. Just commit the update for the rename before you merge the pull request and it will be included.
from collidr.
Closed with #23
from collidr.
Related Issues (20)
- If I login on two page in same brower, not detected by the program HOT 4
- Cascaded click? HOT 6
- Sample Should Include Start Method with WebActivator
- Break Out JS Sources to Separate Files in Core Project
- More than one editor always reports 2 editors
- Create sample Formatter for Something Other than Bootstrap
- Add support for Edit and Save Events HOT 2
- Expose Edit Events in Bootstrap Formatter
- Add HTML Helpers to Create Data API Element Structures HOT 1
- Improve NuGet Package HOT 1
- Add support for String, Guid, and Int64 keys HOT 2
- Clarify Experience for Out-Of-Sequence Logins/Edits HOT 1
- Add a "Shadow user" Feature HOT 9
- Allow Hub to Accept and Send New Values for Form Fields
- Create MVC Scaffolder that includes the RegisterCollidR bits
- Update Project Sample to VS2013
- Make notification pane unobtrusive
- Add build scripts to bundle javascript files
- Updates & nest models/collections
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 collidr.