Skip to content

Commit 02280d2

Browse files
authored
Merge pull request #11 from FaganSC/develop
New Features: Sort Order Column Display By
2 parents 8818aff + 06ed363 commit 02280d2

File tree

16 files changed

+166
-129
lines changed

16 files changed

+166
-129
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
| --------------- | --------------------------------------- |
33
| Bug fix? | no - yes? |
44
| New feature? | no - yes? |
5-
| New sample? | no - yes? |
65
| Related issues? | fixes #X, partially #Y, mentioned in #Z |
76

87
## What's in this Pull Request?

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ The supporting Document Library is deployed when the solution is added to the si
1212

1313
![Screenshot](documentation/screenshot.gif)
1414

15+
16+
## Updating from 1.0.0.0 to 1.1.0.0
17+
On upgrade to 1.1.0.0, and you want to use the new Display Order Column, please add the column to the Default View.
18+
![Screenshot](documentation/updateview.gif)
1519
## Applies to
1620

1721
- [SharePoint Framework](https://aka.ms/spfx)
@@ -45,21 +49,32 @@ SPFX Image Slider | [Shawn Fagan](https://twitter.com/fagansc)
4549
Version|Date|Comments
4650
-------|----|--------
4751
1.0.0.0|January 25, 2021|Initial release
52+
1.1.0.0|february 13, 2021|Added New Order By Options
4853

4954
## Current Features
50-
### Image Size
51-
52-
### Slide Speed
53-
### Display Image Filter
54-
55-
### Display Slide Caption
56-
57-
### Display Slide Indicators
58-
59-
### Render Images using Office 365 Public CDN
60-
61-
### Select Default Image
62-
55+
- Ability to adjust the Image Size
56+
- Small (Height: 300px)
57+
- Medium (Height: 350px)
58+
- Large (Height: 400px)
59+
- X-Large (Height: 450px)
60+
- Ability to adjust the Slide Speed
61+
- Min Speed: 5 Seconds inbetween slides
62+
- Max Speed: 30 Seconds inbetween slides
63+
- Ability to select the Display Image Filter
64+
- Display All Images within the Library
65+
- Display Images with the Enabled Flag set to Yes
66+
- Display Image based on the Publish Start & End fields
67+
- Ability to select the field to use to order of images to be displayed
68+
- Modified Date
69+
- Created Date
70+
- Display Order Field
71+
- Ability to select the direction of the field to order of images to be displayed
72+
- Ascending
73+
- Descending
74+
- Hide or Show the Image Caption
75+
- Hide or Show the Slide Indicators
76+
- Render Images using Office 365 Public CDN
77+
- Select a Default Image to display if no image is found in the libary
6378
## Future Features
6479
- Multplie Layout Options
6580
- Configurable Caption Settings

azure-pipelines.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ trigger:
33
include:
44
- develop
55
- release/*
6+
- feature/*
67
- master
78
resources:
89
repositories:
@@ -14,7 +15,7 @@ resources:
1415
variables:
1516
node_version: '10.x'
1617
package_manager: 'npm'
17-
majorminor: '1.0.0'
18+
majorminor: '1.1.0'
1819
patch: $[counter(${{ variables.majorminor }}, 0)]
1920
version: $(majorminor).$(patch)
2021
name: ${{ variables.version }}
@@ -65,7 +66,7 @@ stages:
6566
target_environment: Development
6667
variables_group: DevelopmentTenant
6768
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
68-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
69+
condition: succeeded()
6970
- stage: DeployPreRelease
7071
displayName: Deploy to Test Tenant SharePoint App Catalog
7172
dependsOn:
@@ -76,7 +77,7 @@ stages:
7677
target_environment: PreRelease
7778
isPreRelease: True
7879
hasChangeLog: True
79-
variables_group: DevelopmentTenant
80+
variables_group: TestTenant
8081
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
8182
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))
8283
- stage: DeployProduction
@@ -89,6 +90,6 @@ stages:
8990
target_environment: Release
9091
isPreRelease: False
9192
hasChangeLog: True
92-
variables_group: DevelopmentTenant
93+
variables_group: ProductionTenant
9394
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
9495
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

config/package-solution.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
"title": "Slider Image Web Part",
1111
"description": "Deployment of Slider Image Web Part and Library",
1212
"id": "61bfff46-b2a0-440a-8f80-efc2a03c21d1",
13-
"version": "1.0.0.0",
13+
"version": "2.0.0.0",
1414
"assets": {
1515
"elementManifests": [
16-
"elements.xml"
16+
"elements.xml",
17+
"elements-v2.xml"
1718
],
1819
"elementFiles": [
1920
"schema.xml",
2021
"Virginia_Beach_Oceanfront.jpg"
22+
],
23+
"upgradeActions": [
24+
"upgrade-actions-v2.xml"
2125
]
2226
}
2327
}],
24-
"skipFeatureDeployment": true,
28+
"skipFeatureDeployment": false,
2529
"isDomainIsolated": false,
2630
"developer": {
2731
"name": "",

documentation/screenshot.gif

-726 KB
Loading

documentation/updateview.gif

213 KB
Loading

sharepoint/assets/elements-v2.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3+
<Field ID="{A3C6E34A-CBDD-4E57-85D3-846348497A0B}" Name="ImgSliderDisplayOrder" DisplayName="Display Order" Group="Image Slider Columns" Type="Number" Decimals="0" Min="0" Required="FALSE" />
4+
</Elements>

sharepoint/assets/elements.xml

Lines changed: 33 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,38 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3-
<Field ID="{d086554e-1290-435d-9c1e-2263189e88c9}"
4-
Name="ImgSliderPublishStart"
5-
DisplayName="Publish Start Date"
6-
StaticName="ImgSliderPublishStart"
7-
Group="Image Slider Columns"
8-
Type="DateTime"
9-
Required="FALSE"
10-
Format="DateOnly"
11-
/>
12-
<Field ID="{18946d2a-2b5c-4e06-b6eb-9489482add4d}"
13-
Name="ImgSliderPublishEnd"
14-
DisplayName="Publish End Date"
15-
StaticName="ImgSliderPublishEnd"
16-
Group="Image Slider Columns"
17-
Type="DateTime"
18-
Required="FALSE"
19-
Format="DateOnly"
20-
/>
21-
<Field ID="{f4e5dd71-448f-40e2-b991-35874a0d7fd6}"
22-
Name="ImgSliderLink"
23-
DisplayName="Link"
24-
StaticName="ImgSliderLink"
25-
Group="Image Slider Columns"
26-
Type="URL"
27-
Required="FALSE"
28-
EnforceUniqueValues="FALSE"
29-
Indexed="FALSE"
30-
Format="Hyperlink"
31-
/>
32-
<Field ID="{E2B01352-3D06-4102-AD32-FEAA4DEA40A0}"
33-
Name="ImgSliderCaptions"
34-
DisplayName="Captions"
35-
Type="Note"
36-
Required="FALSE"
37-
Group="Image Slider Columns"/>
38-
<Field ID="{30F0BC75-7FB8-40AF-B133-D4AE50E9D908}"
39-
Name="ImgSliderNewTab"
40-
DisplayName="New Tab"
41-
Type="Boolean"
42-
Required="FALSE"
43-
Group="Image Slider Columns"/>
44-
<Field ID="{C07D949C-4D99-4936-B039-8ABB4AD4AAB8}"
45-
Name="ImgSliderEnabled"
46-
DisplayName="Enabled"
47-
Type="Boolean"
48-
Required="FALSE"
49-
Group="Image Slider Columns"/>
3+
<Field ID="{d086554e-1290-435d-9c1e-2263189e88c9}" Name="ImgSliderPublishStart" DisplayName="Publish Start Date" StaticName="ImgSliderPublishStart" Group="Image Slider Columns" Type="DateTime" Required="FALSE" Format="DateOnly" />
4+
<Field ID="{18946d2a-2b5c-4e06-b6eb-9489482add4d}" Name="ImgSliderPublishEnd" DisplayName="Publish End Date" StaticName="ImgSliderPublishEnd" Group="Image Slider Columns" Type="DateTime" Required="FALSE" Format="DateOnly" />
5+
<Field ID="{f4e5dd71-448f-40e2-b991-35874a0d7fd6}" Name="ImgSliderLink" DisplayName="Link" StaticName="ImgSliderLink" Group="Image Slider Columns" Type="URL" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" Format="Hyperlink" />
6+
<Field ID="{E2B01352-3D06-4102-AD32-FEAA4DEA40A0}" Name="ImgSliderCaptions" DisplayName="Captions" Type="Note" Required="FALSE" Group="Image Slider Columns" />
7+
<Field ID="{30F0BC75-7FB8-40AF-B133-D4AE50E9D908}" Name="ImgSliderNewTab" DisplayName="New Tab" Type="Boolean" Required="FALSE" Group="Image Slider Columns" />
8+
<Field ID="{C07D949C-4D99-4936-B039-8ABB4AD4AAB8}" Name="ImgSliderEnabled" DisplayName="Enabled" Type="Boolean" Required="FALSE" Group="Image Slider Columns" />
9+
<Field ID="{A3C6E34A-CBDD-4E57-85D3-846348497A0B}" Name="ImgSliderDisplayOrder" DisplayName="Display Order" Group="Image Slider Columns" Type="Number" Decimals="0" Min="0" Required="FALSE" />
5010

51-
<!-- Parent ContentType: Document (0x0101) -->
52-
<ContentType ID="0x0101A33D9AD9805788419BDAAC2CCB37500F"
53-
Name="Image Slider"
54-
Group="Image Slider Content Types"
55-
Description="Image Slider content types from web part solution"
56-
Inherits="FALSE"
57-
Version="0"
58-
Hidden="FALSE"
59-
Sealed="FALSE"
60-
>
61-
<FieldRefs>
62-
<FieldRef ID="{d086554e-1290-435d-9c1e-2263189e88c9}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
63-
<FieldRef ID="{18946d2a-2b5c-4e06-b6eb-9489482add4d}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
64-
<FieldRef ID="{f4e5dd71-448f-40e2-b991-35874a0d7fd6}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
65-
<FieldRef ID="{30F0BC75-7FB8-40AF-B133-D4AE50E9D908}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
66-
<FieldRef ID="{C07D949C-4D99-4936-B039-8ABB4AD4AAB8}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
67-
<FieldRef ID="{E2B01352-3D06-4102-AD32-FEAA4DEA40A0}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
68-
</FieldRefs>
69-
<DocumentTemplate TargetName="/_layouts/15/upload.aspx"/>
70-
</ContentType>
11+
<!-- Parent ContentType: Document (0x0101) -->
12+
<ContentType ID="0x0101A33D9AD9805788419BDAAC2CCB37500F" Name="Image Slider" Group="Image Slider Content Types" Description="Image Slider content types from web part solution" Inherits="FALSE" Version="0" Hidden="FALSE" Sealed="FALSE">
13+
<FieldRefs>
14+
<FieldRef ID="{d086554e-1290-435d-9c1e-2263189e88c9}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
15+
<FieldRef ID="{18946d2a-2b5c-4e06-b6eb-9489482add4d}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
16+
<FieldRef ID="{f4e5dd71-448f-40e2-b991-35874a0d7fd6}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
17+
<FieldRef ID="{30F0BC75-7FB8-40AF-B133-D4AE50E9D908}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
18+
<FieldRef ID="{C07D949C-4D99-4936-B039-8ABB4AD4AAB8}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
19+
<FieldRef ID="{E2B01352-3D06-4102-AD32-FEAA4DEA40A0}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
20+
<FieldRef ID="{A3C6E34A-CBDD-4E57-85D3-846348497A0B}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
21+
</FieldRefs>
22+
<DocumentTemplate TargetName="/_layouts/15/upload.aspx" />
23+
</ContentType>
7124

72-
<!-- Document Library (TemplateType 101) -->
73-
<ListInstance
74-
CustomSchema="schema.xml"
75-
FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101"
76-
Title="Slider Images"
77-
Description=""
78-
TemplateType="101"
79-
Url="SliderImgs"
80-
Hidden="FALSE">
81-
</ListInstance>
82-
83-
<!-- Upload files to the SPFxDocumentLibrary -->
84-
<Module Name="Files" Url="SliderImgs">
85-
<File Path="Virginia_Beach_Oceanfront.jpg" Url="Virginia_Beach_Oceanfront.jpg" Type="GhostableInLibrary" ReplaceContent="TRUE" >
86-
<Property Name="Title" Value = "Virginia Beach Oceanfront"/>
87-
<Property Name="ImgSliderLink" Value = "/"/>
88-
<Property Name="ImgSliderNewTab" Value = "0"/>
89-
<Property Name="ImgSliderCaptions" Value = "Picture of the Virginia Beach Ocreanfront beach"/>
90-
</File>
91-
</Module>
25+
<!-- Document Library (TemplateType 101) -->
26+
<ListInstance CustomSchema="schema.xml" FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" Title="Slider Images" Description="" TemplateType="101" Url="SliderImgs" Hidden="FALSE"></ListInstance>
27+
28+
<!-- Upload files to the SPFxDocumentLibrary -->
29+
<Module Name="Files" Url="SliderImgs">
30+
<File Path="Virginia_Beach_Oceanfront.jpg" Url="Virginia_Beach_Oceanfront.jpg" Type="GhostableInLibrary" ReplaceContent="TRUE">
31+
<Property Name="Title" Value="Virginia Beach Oceanfront" />
32+
<Property Name="ImgSliderLink" Value="/" />
33+
<Property Name="ImgSliderNewTab" Value="0" />
34+
<Property Name="ImgSliderCaptions" Value="Picture of the Virginia Beach Ocreanfront beach" />
35+
<Property Name="ImgSliderDisplayOrder" Value="1" />
36+
</File>
37+
</Module>
9238
</Elements>

sharepoint/assets/schema.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<FieldRef ID="{30F0BC75-7FB8-40AF-B133-D4AE50E9D908}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
1414
<FieldRef ID="{C07D949C-4D99-4936-B039-8ABB4AD4AAB8}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
1515
<FieldRef ID="{E2B01352-3D06-4102-AD32-FEAA4DEA40A0}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
16+
<FieldRef ID="{A3C6E34A-CBDD-4E57-85D3-846348497A0B}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
1617
</FieldRefs>
1718
<DocumentTemplate TargetName="/_layouts/15/upload.aspx"/>
1819
</ContentType>
@@ -35,6 +36,7 @@
3536
<FieldRef Name="ImgSliderLink"></FieldRef>
3637
<FieldRef Name="ImgSliderNewTab"></FieldRef>
3738
<FieldRef Name="ImgSliderEnabled"></FieldRef>
39+
<FieldRef Name="ImgSliderDisplayOrder"></FieldRef>
3840
</ViewFields>
3941
<Query>
4042
<OrderBy>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<ApplyElementManifests>
2+
<ElementManifest Location="61bfff46-b2a0-440a-8f80-efc2a03c21d1\elements-v2.xml" />
3+
</ApplyElementManifests>
4+
<AddContentTypeField
5+
ContentTypeId="0x0101A33D9AD9805788419BDAAC2CCB37500F"
6+
FieldId="{A3C6E34A-CBDD-4E57-85D3-846348497A0B}"
7+
PushDown="TRUE" />

0 commit comments

Comments
 (0)