-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from greystate/issue-23
Support MNTP in Media mode with MultiPicker Helper - closes #23
- Loading branch information
Showing
14 changed files
with
203 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!ENTITY % use.in.umbraco "IGNORE"> | ||
<!ENTITY % use.in.textmate "INCLUDE"> | ||
|
||
<![ %use.in.umbraco; [ | ||
<!ENTITY GetMediaFile "umb:GetMedia(., false())"> | ||
]]> | ||
|
||
<![ %use.in.textmate; [ | ||
<!ENTITY GetMediaFile "document('test/fixtures/media.xml')//*[@id = current()]"> | ||
]]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<x:description | ||
stylesheet="MultiPickerHelperSample.xslt" | ||
xslt-version="1.0" | ||
xmlns:x="http://www.jenitennison.com/xslt/xspec" | ||
> | ||
<x:scenario label="when processing an empty MNTP (media) property"> | ||
<x:context mode="multipicker"> | ||
<relatedLinks> | ||
<MultiNodePicker type="media"> | ||
</MultiNodePicker> | ||
</relatedLinks> | ||
</x:context> | ||
<x:expect label="it should not produce any output" test="()" /> | ||
</x:scenario> | ||
|
||
<x:scenario label="when processing the MNTP (media) fixture - Doc[1]"> | ||
<x:context href="fixtures/mntp-media.xml" select="/root/Doc[1]/mntpProperty" mode="multipicker" /> | ||
<x:expect label="it should produce a list of 4 media nodes in sequential order"> | ||
<p>Media 1</p> | ||
<p>Media 2</p> | ||
<p>Media 3</p> | ||
<p>Media 4</p> | ||
</x:expect> | ||
</x:scenario> | ||
|
||
<x:scenario label="when processing the MNTP (media) fixture - Doc[2]"> | ||
<x:context href="fixtures/mntp-media.xml" select="/root/Doc[2]/mntpProperty" mode="multipicker" /> | ||
<x:expect label="it should produce a list of 4 media nodes in the correct order"> | ||
<p>Media 3</p> | ||
<p>Media 2</p> | ||
<p>Media 4</p> | ||
<p>Media 1</p> | ||
</x:expect> | ||
</x:scenario> | ||
|
||
<x:scenario label="when processing the MNTP (media) fixture - Doc[3]"> | ||
<x:context href="fixtures/mntp-media.xml" select="/root/Doc[3]/mntpProperty" mode="multipicker" /> | ||
<x:expect label="it should produce a list of 3 media nodes in the correct order"> | ||
<p>Media 5.2</p> | ||
<p>Media 5</p> | ||
<p>Media 5.1</p> | ||
</x:expect> | ||
</x:scenario> | ||
|
||
<x:scenario label="when processing the MNTP (media) fixture - Doc[4]"> | ||
<x:context href="fixtures/mntp-media.xml" select="/root/Doc[4]/mntpProperty" mode="multipicker" /> | ||
<x:expect label="it should *not* include media nodes that don't exist"> | ||
<p>Media 5.2</p> | ||
<p>Media 5</p> | ||
<p>Media 5.1</p> | ||
</x:expect> | ||
</x:scenario> | ||
|
||
</x:description> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<root id="-1"> | ||
<Image id="12" isDoc=""> | ||
<name>Media 1</name> | ||
</Image> | ||
|
||
<Image id="13" isDoc=""> | ||
<name>Media 2</name> | ||
</Image> | ||
|
||
<Image id="14" isDoc=""> | ||
<name>Media 3</name> | ||
</Image> | ||
|
||
<Image id="15" isDoc=""> | ||
<name>Media 4</name> | ||
</Image> | ||
|
||
<Folder id="16" isDoc=""> | ||
<name>Media 5</name> | ||
<Image id="17" isDoc=""> | ||
<name>Media 5.1</name> | ||
</Image> | ||
<Image id="18" isDoc=""> | ||
<name>Media 5.2</name> | ||
</Image> | ||
</Folder> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<root> | ||
<Doc isDoc=""> | ||
<!-- This is standard functionality --> | ||
<mntpProperty> | ||
<MultiNodePicker type="media"> | ||
<nodeId>12</nodeId> | ||
<nodeId>13</nodeId> | ||
<nodeId>14</nodeId> | ||
<nodeId>15</nodeId> | ||
</MultiNodePicker> | ||
</mntpProperty> | ||
</Doc> | ||
|
||
<Doc isDoc=""> | ||
<!-- These have been reordered --> | ||
<mntpProperty> | ||
<MultiNodePicker type="media"> | ||
<nodeId>14</nodeId> | ||
<nodeId>13</nodeId> | ||
<nodeId>15</nodeId> | ||
<nodeId>12</nodeId> | ||
</MultiNodePicker> | ||
</mntpProperty> | ||
</Doc> | ||
|
||
<Doc isDoc=""> | ||
<!-- These are at arbitrary nesting levels --> | ||
<mntpProperty> | ||
<MultiNodePicker type="media"> | ||
<nodeId>18</nodeId> | ||
<nodeId>16</nodeId> | ||
<nodeId>17</nodeId> | ||
</MultiNodePicker> | ||
</mntpProperty> | ||
</Doc> | ||
|
||
<Doc isDoc=""> | ||
<!-- There are deleted ids in here --> | ||
<mntpProperty> | ||
<MultiNodePicker type="media"> | ||
<nodeId>18</nodeId> | ||
<nodeId>3</nodeId> | ||
<nodeId>16</nodeId> | ||
<nodeId>9</nodeId> | ||
<nodeId>2</nodeId> | ||
<nodeId>17</nodeId> | ||
</MultiNodePicker> | ||
</mntpProperty> | ||
</Doc> | ||
|
||
<!-- None of these should be returned when @type is "media" ! --> | ||
<MultiPickerTestNode id="12" isDoc=""> | ||
<name>Node 1</name> | ||
</MultiPickerTestNode> | ||
|
||
<MultiPickerTestNode id="13" isDoc=""> | ||
<name>Node 2</name> | ||
</MultiPickerTestNode> | ||
|
||
<MultiPickerTestNode id="14" isDoc=""> | ||
<name>Node 3</name> | ||
</MultiPickerTestNode> | ||
|
||
<MultiPickerTestNode id="15" isDoc=""> | ||
<name>Node 4</name> | ||
</MultiPickerTestNode> | ||
|
||
<MultiPickerTestNode id="16" isDoc=""> | ||
<name>Node 5</name> | ||
<MultiPickerTestNode id="17" isDoc=""> | ||
<name>Node 5.1</name> | ||
</MultiPickerTestNode> | ||
<MultiPickerTestNode id="18" isDoc=""> | ||
<name>Node 5.2</name> | ||
</MultiPickerTestNode> | ||
</MultiPickerTestNode> | ||
|
||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<!-- Current Versions --> | ||
<!ENTITY packageVersion "0.9"> | ||
<!ENTITY packageVersion "0.9.1"> | ||
<!ENTITY XSLTHelpersVersionHeader "XSLT Helpers v&packageVersion;"> | ||
<!ENTITY MediaHelperVersion "1.4"> | ||
<!ENTITY PaginationHelperVersion "1.5"> | ||
<!ENTITY GroupingHelperVersion "1.0"> | ||
<!ENTITY CalendarHelperVersion "1.2"> | ||
<!ENTITY NavigationHelperVersion "1.2"> | ||
<!ENTITY MultiPickerHelperVersion "1.0"> | ||
<!ENTITY MultiPickerHelperVersion "1.1"> |