Commit Graph

1175 Commits

Author SHA1 Message Date
agrath@gmail.com
6d615e6762 Work on DynamicQueryable to support .Where("bodyText.Contains(\"string\")")
Chaining works too: .Where("Name.SubString(1,3).Contains(\"v\")");
2011-02-25 16:58:17 -13:00
agrath@gmail.com
b1ff0db8fe Work on DynamicQueryable to support .Where("shouldBeVisible && Level < 4") rather than .Where("shouldBeVisible == true && Level < 4")
Confirmed other test cases of .Where still work
2011-02-25 12:16:03 -13:00
agrath@gmail.com
3961787463 Added DynamicNode.HasProperty(string) method to check to see if a particular DynamicNode has a property 2011-02-25 00:51:41 -13:00
agrath@gmail.com
9b45a81f22 Rewrote implementation of HandleDynamicNodeLambdas in DynamicQueryable.cs to be easier to read and handle unboxing and type conversion when the output type of the lambda is convertable between the left and right side.
Allows this syntax to work now:
@Model.Children.Where("updateDate < DateTime.Now.AddDays(-2)")
This didn't work previously in 4.7beta because updateDate was still boxed as an object and object < DateTime can't be implicitly converted

@Model.Children.Where("bodyText.Contains('ipsum')") still doesn't work because the parser doesn't know how to invoke .Contains on a LambdaExpression (yet)
2011-02-25 00:39:53 -13:00
starfighter83
0e9fc4a84b Merge 2011-02-25 09:23:17 -01:00
starfighter83
78aaa85765 Fine tuning to edit template split button 2011-02-25 09:20:54 -01:00
agrath@gmail.com
71c5e35443 Added DynamicNodeWalker and implementation on DynamicNode and DynamicNodeList
DynamicNodeWalker is our secret weapon in the fight against the Rebel XSLT Alliance
Navigate nodes by calling Up(), Down(), Next() and Previous() on them
Next(1) will jump two items along within the current list, whereas Next() will walk by one within the list
Previous(1) will move two items backwards within the current list
Up() is a special wrapper around .Parent which has an overload .Up(int) to replace @Model.Parent.Parent.Parent... [.Up(2)]
Down() will take you to the first Child item and is equivilent to .Children.First(), use .Down(1) to replace .Children.First().Children
If one of the NodeWalker functions fails to find a node at the requested position, it will return null
2011-02-24 17:19:50 -13:00
agrath@gmail.com
603a12c5a0 Split umbraco.MacroEngines.Juno into two subfolders (namespaces remain the same)
RazorCore contains all the core razor engine implementation
RazorDynamicNode contains all the DynamicNode functionality and associated support files
2011-02-24 16:05:54 -13:00
agrath@gmail.com
78ae4132eb Added IEnumerable Map method used in Descendants feature
Fixed DynamicNodeList.OrderBy where there was only one column and the ordering was descending
Added DateTime.TryParse support to DynamicNode property retrieval to allow OrderBy and Where to have date support
Added IsProtected & HasAccess to DynamicNode
Added .AncestorsOrSelf to DynamicNode
Added .Descendants to DynamicNode [Deep Children]
Added .DescendantsAndSelf [Deep Children]
Fixed .nodeTypeAlias children collection crashing when the node didn't contain any children of that type
Added cshtml templates first versions for DynamicNode, these are samples I demo'ed at the Auckland umbraco meetup the night of 4.7beta release
2011-02-24 15:56:52 -13:00
psterling
9a4f44e73d Merge 2011-02-25 03:53:50 +08:00
psterling
11d09a6796 Added explanatory text to connection error messages in installer 2011-02-25 03:51:37 +08:00
starfighter83
8d064c89f7 Merge 2011-02-24 14:58:57 -01:00
starfighter83
6936a1db5a Update to edit template toolbar, WIP 2011-02-24 14:57:33 -01:00
matt
007bab36cc Rolled back changes to web.config 2011-02-24 14:58:20 +00:00
matt
ccf832fec5 Removed rouge zipupload files, and fixed missing DMU dashboard (didn't realize the config file was in multiple places) 2011-02-24 14:43:53 +00:00
slace
4fcc62f04a merge 2011-02-23 01:17:53 -11:00
starfighter83
c09b5102af Fixes: TinyMCE no longer defaults <P> tags around text
Work Items: 29964
2011-02-23 09:26:40 -01:00
starfighter83
49c4ce45cb Merge 2011-02-23 07:54:52 -01:00
starfighter83
126c62dee5 Merge 2011-02-23 07:50:07 -01:00
starfighter83
20bff9acd4 Fixes: Inserted macro in rte always positioned above existing content (in IE)
Work Items: 30061
2011-02-23 07:49:15 -01:00
Elijah
c2ff9019cf Microsoft.Web.Infrastructure.dll is required, missed it bacause webmatrix was installed 2011-02-22 21:14:52 -11:00
hartvig
ff3a776617 Fix for parents in DynamicNode by Agrath 2011-02-23 00:16:50 -01:00
slace
76bb93fa23 changing umbraco.presentation project to .NET 4.0 2011-02-22 13:44:54 -11:00
hartvig
4225ac9d8a 4.7.0.beta 2011-02-22 23:10:34 -01:00
hartvig
6e58c622cd Work Items: 30059 2011-02-22 23:03:23 -01:00
hartvig
ceb8c9d896 Work items: 29237 2011-02-22 23:00:41 -01:00
hartvig
5eb20a1101 Better error reporting inside the NiceUrl engine 2011-02-22 13:53:56 -01:00
hartvig
9196c039d1 Patches via GPLwhite => Work items: 30057 2011-02-22 13:30:20 -01:00
hartvig
d54b2416f0 Work items: 30050 2011-02-22 13:27:45 -01:00
hartvig
7be3314a11 Work items: 29917, 30065, 30066 2011-02-22 13:23:15 -01:00
hartvig
c2acb33933 Fix by Lee Kelleher. Work items: 30064 2011-02-22 12:55:50 -01:00
hartvig
5ca12fb99f Work items: 29918 2011-02-22 12:00:15 -01:00
hartvig
b2db75bcb2 Fixes issues with macro caching, Work items: 29891 2011-02-22 11:52:58 -01:00
hartvig
e2cee9e99d Work items: 29972 2011-02-22 11:21:22 -01:00
hartvig
526bc454a5 Work items: 29149 2011-02-22 11:03:28 -01:00
hartvig
fef629181f Work items: 29934 2011-02-22 09:45:21 -01:00
hartvig
33741210b3 Fix to macro container bug. Thank you to the 'mysterious patcher'. Work items: 29874 2011-02-22 09:11:45 -01:00
psterling
970903eb2a Added graceful installation completion option when no connection to repo exists 2011-02-22 13:13:58 +08:00
Elijah
9d5c127c14 Resharper Renamed My Property!!! Now Fixed :( 2011-02-21 17:27:32 -11:00
Elijah
0071bfbb13 webPages:Enabled requires a lowercase "W" 2011-02-21 17:01:55 -11:00
PerPloug
69ccf5a138 AddRestExtension package action, swicth to use XmlHelper instead of doc.load(); 2011-02-21 12:49:45 -01:00
hartvig
4866bcafb8 Fixes issue with tildes in content, work items: 30048 2011-02-21 11:12:38 -01:00
hartvig
64914da779 Adding missing files 2011-02-21 10:05:13 -01:00
hartvig
16f78d0f4c Merge of razor query improvements (missing one file in merge, though - will be added in next commit!) 2011-02-21 09:28:13 -01:00
PerPloug
fa008b3679 Removing umbraco.MacroEngines.Legacy files from build 2011-02-21 09:05:34 -01:00
agrath@gmail.com
03441fab21 Added umbraco.Settings entry for controlling what document element types are parsed as DynamicXml
Added documentElement checking to DynamicXml convert for DynamicNode property get to solve a potential issue with XHTML RTEs
Fixed issue with calling @Model.Children.First() in testing (null Children in testing)
Put some commented placeholder code in .XPath->DynamicNodeList inside DynamicNode.cs for future return of DynamicXml if not valid List<NodeFactory.Node>
2011-02-20 19:55:06 -13:00
psterling
3e56fe947a Add catch for no internet connection on final Installer screen 2011-02-21 05:38:03 +08:00
psterling
9410d34485 Update to DB selection text in installer 2011-02-21 05:05:03 +08:00
agrath@gmail.com
6b431eb000 Fixed a bug in DynamicNode when the string contained "false" it would fail and not return (bool)false
Decided that if using @Model.XPath and you were in testing, then the resulting DynamicNodeList should contain self/this, not be empty
Should allow chaining to work when in test mode

Fixed a potential issue when DynamicNode got returned during testing because there are no children
and then property accesses would return false causing chaining to break

Added [a somewhat experimental] DynamicXml and xml fragment detection within DynamicNode to DynamicXml,
When accessing a string property that contains XML, you can now continue your dot based access
Call .ToXml() to get the real XML string again
Call .XPath(string) to run a XPath query on the fragment and return another DynamicXml
Example:
	<Catalog>
	  <Book id="bk101">
	    <Author>Garghentini, Davide</Author>
	    <Title>XML Developer's Guide</Title>
	    <Genre>Computer</Genre>
	    ...
	@Model.Children.Random().someXmlProperty.Catalog.Book[1].Genre
	@Model.Children.Random().someXmlProperty.Book[1].XPath(".//Genre")
	@Model.Children.Random().someXmlProperty.Book[1].ToXml()
2011-02-19 21:19:45 -13:00
agrath@gmail.com
84d7999f32 Added .XPath helper to DynamicNode list that allows you to use XPath to query from the current node represented in XML (e.g. if you have a child DynamicNode which actually exists part way down the original dom from NodeFactory then get it at that position (allowing you to use .. to move to parent)
Nodes are attempted to be turned back into NodeFactory.Node when returned by XPath and then wrapped in DynamicNode and then DynamicNodeList

Added .Random parameterless overload to pick a single random node from the DynamicNodeList

Example of new Methods being used:
<img src='@Model.XPath("//ChildItem[catCount = 2]").Random().Media("catPicture","umbracoFile")'/>
2011-02-19 20:05:02 -13:00