Commit Graph

1043 Commits

Author SHA1 Message Date
agrath@gmail.com
26bf18766b Fixed a bad check in my patch for booleans that wasn't installation-portable by making it check the DataTypeDefinition instead of ContentTypeId.
Added a cache for the propertyType lookup (within a single DynamicNode instance) in case the razor logic needs to check the same boolean multiple times within a node.
Should improve performance if working with large trees & repeatedly checking a boolean value
2011-01-28 14:36:13 -13:00
agrath@gmail.com
c692b296d7 Added Pascal Case support to DynamicMedia and .Media helper 2011-01-27 21:56:09 -13:00
agrath@gmail.com
a0dd8aa2ab Improves access to media items when working in Razor
Added a new DynamicMedia class that wraps umbraco.cms.businesslogic.media.Media which caches GetProperty calls (while DynamicMedia is instantiated)
Added method to DynamicNode to retrieve a property as DynamicMedia: @Model.Media("catPicture"); or @Model.Media("catPicture").umbracoFile;
Added overload to DynamicNode Media method for shorthand if you only want one property; @Model.Media("catPicture","umbracoFile");
@Model.catPicture will still return the nodeId of the media item because we can't easily check the propertyType (no propertyType on IProperty)
2011-01-27 21:38:06 -13:00
agrath@gmail.com
6382241e4c Special casing in DynamicNode property retrieval for when the property being retrieved is True/False. I'm not sure how comfortable I am with having to go to Document to get the proerty info or the check of the ContentTypeId but the syntactic sugar of being able to go:
if(@Model.shouldBeVisible) {...} where shouldBeVisible is a true/false property on the datatype is pretty nice
2011-01-27 15:29:38 -13:00
agrath@gmail.com
3ab4944e5e If you're dealing with dynamicNode such as using:
var someNode = new umbraco.MacroEngines.DynamicNode(1046) in your template, it instantiates a DynamicNode like you'd expect, but then it doesn't function as a dynamic object
because it wasn't initialised as a dynamic variable [dynamic someNode = new umbraco.MacroEngines.DynamicNode(1046)]

Added a method to DynamicNode called NodeById which returns a new DynamicNode with the ID you pass, so you can call it off @Model
e.g. var item = @Model.NodeById(1046) will still function as a dynamic, even though it was defined as var
2011-01-27 14:49:56 -13:00
agrath@gmail.com
28b48b187a Added DynamicNode constructor that takes an int and passes it to NodeFactory so you can go var @clientNode = new umbraco.MacroEngines.DynamicNode(1560); 2011-01-27 14:22:28 -13:00
agrath@gmail.com
fce7ea48b0 Didn't test the AncestorOrSelf changes on a non-parent node. Changed implementation to call into Func<DynamicNode,bool> to check Level == 1
Also fixed post-build rule on umbraco.MacroEngines which had an incorrect path for copying umbraco.MacroEngines to presentation (allows debug without manual file copy, I think)
2011-01-27 13:07:10 -13:00
agrath@gmail.com
fbf13d8cf7 Fixed support for AncestorOrSelf when in Test mode (the INode passed to the razor script in testing has a null parent)
Added AncestorOrSelf overload which doesn't require a Func<DynamicNode,bool> argument

Both changes modify DynamicNode.Parent so that if there is no parent, it returns itself instead of null, (you can't new DynamicNode(null) as it throws exception)
and then in the AncestorOrSelf checks, the loop makes sure that it won't get stuck by continually returning itself (because this.Parent returns this)
2011-01-27 12:59:34 -13:00
agrath@gmail.com
dca21f9ce1 Added support for Macro Parameters in Razor Macros (@Model.Parameters.AnimalName) where AnimalName is defined on the Macro as a Parameter 2011-01-26 08:28:16 -13:00
agrath@gmail.com
69a1e7000c Added support for calling IEnumerable methods which return IEnumerable (e.g. Skip,Take) rather than single nodes (e.g. First,ElementAt) 2011-01-26 07:35:55 -13:00
agrath@gmail.com
c1f96000b4 Adding web.config transformation file for agrath/Gareth Evans/Sniper Systems Laptop 2011-01-25 22:31:33 -13:00
agrath@gmail.com
873871b6c2 Fixing messup 2011-01-25 22:30:56 -13:00
agrath@gmail.com
6650394bf9 Upgraded DynamicNode to handle IEnumerable better so that you can chain method/property calls through an IEnumerable set like this: @Model.Children.Count() or @Model.Children.ElementAt(2) 2011-01-25 22:24:51 -13:00
agrath@gmail.com
9259dd897f Upgraded DynamicNode to handle IEnumerable better so that you can chain method/property calls through an IEnumerable set like this: @Model.Children.Count() or @Model.Children.ElementAt(2) 2011-01-25 22:24:40 -13:00
psterling
05459b12c9 backed out fix for #29741 - updates default Admin Language to en-US including date/time/currency formats 2011-01-25 01:45:06 +08:00
hartvig
966c792c8b Patch by sgay. Work items: 29889 2011-01-24 09:58:14 -01:00
starfighter83
320382a143 Small css update to skin customization dialog 2011-01-24 08:04:18 -01:00
starfighter83
2d856cf664 Merge 2011-01-24 07:41:38 -01:00
starfighter83
1cf475e120 Update to installer, makes 'Connection string' input bigger 2011-01-24 07:40:45 -01:00
psterling
cd50056154 update to API Wiki link in default dashboard 2011-01-21 23:50:30 +08:00
psterling
c2caf8ba91 fixes #29741 - updates default Admin Language to en-US including date/time/currency formats 2011-01-21 23:32:51 +08:00
sgay
6e157581ca fix #29889 - content tabs issues 2011-01-21 14:10:52 -01:00
hartvig
7beffb2305 Merge of gplwhite patches, reviewed by hartvig. Work items: 29833 2011-01-21 11:20:01 -01:00
hartvig
f51f5354f1 Merge of sgays patches, reviewed by hartvig. Work items: 29931, 29930, 29929, 29928, 29927, 29926, 29447, 29443, 29470, 28975, 29889 2011-01-21 11:10:01 -01:00
PerPloug
b67f3a9c8e Missing build dependencie for release target 2011-01-21 07:32:38 -01:00
PerPloug
27ec2d16f1 Updated build.config for webPi package generation 2011-01-21 07:18:31 -01:00
PerPloug
17c3699612 WebPi Assets 2011-01-21 06:42:21 -01:00
PerPloug
0b4d7902b8 Adding missing SqlCE Manifests for x86 + amd64 2011-01-21 06:41:51 -01:00
sgay
5790ff26fd fix #29931 - cleanup member statue management 2011-01-20 14:19:06 -01:00
sgay
542b892dd5 fix #29930 2011-01-20 14:08:15 -01:00
sgay
4af6ea2b3c fix #29929 2011-01-20 14:04:32 -01:00
sgay
b82a251bb8 fix #29928 2011-01-20 14:01:17 -01:00
sgay
582b5797dc fix #29927 2011-01-20 14:00:08 -01:00
sgay
edc930241b fix #29926 2011-01-20 13:56:20 -01:00
sgay
f08ca0f014 fix #29447 - fail to rebuild content tree 2011-01-20 13:51:47 -01:00
sgay
415f6f38b1 should fix #29443 - duplicate node in content tree 2011-01-20 13:50:29 -01:00
sgay
3b7c8d73de fix #29470 - macros rendered twice 2011-01-20 13:47:46 -01:00
starfighter83
bae04cd27e WIP installer db step update 2011-01-20 11:42:26 -01:00
starfighter83
447582b018 Update to installer, adds continue button to validate permissions step 2011-01-20 11:10:19 -01:00
starfighter83
2af1812b01 WIP installer db step refactor, opens video help link in new window 2011-01-20 09:45:34 -01:00
starfighter83
d8c98ccfd8 WIP installer db step refactor 2011-01-20 09:23:04 -01:00
starfighter83
f4b4c03a9c Merge 2011-01-19 08:27:35 -01:00
starfighter83
580b670f33 Fixes: RTE can't cleanup pasted code automatically(umbraco 4.6.1)
Work Items: 29897
2011-01-19 08:27:00 -01:00
gplwhite
791b31bc3a Work Item #29833
Avoid saving an empty Xml document to the file-based content cache when a database connection is not available.
2011-01-17 15:00:49 -13:00
sgay
7c87b09e97 fix #28975 - broken macros cache 2011-01-17 14:19:54 -01:00
sgay
3ae4511532 fix #29889 - broken content tabs 2011-01-17 14:19:10 -01:00
hartvig
2fd905edb9 Work items: 29899 2011-01-17 09:34:40 -01:00
starfighter83
db10f1ed26 Merge 2011-01-17 06:47:00 -01:00
starfighter83
a9dd0a7e65 Fixed: RestExtensionMethod doesn't honour returnXml property
Work Items: 29898
2011-01-17 06:46:20 -01:00
hartvig
d031e1da91 Work items: 29888 2011-01-15 22:06:28 +05:00