-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
169 additions
and
12 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
2 changes: 1 addition & 1 deletion
2
Telerik.Sitefinity.Frontend/assets/dist/css/sitefinity-backend.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
Telerik.Sitefinity.Frontend/assets/documentation/designer.html
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
7 changes: 7 additions & 0 deletions
7
Telerik.Sitefinity.Frontend/assets/src/sass/kendo/_tabstrip.sass
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,102 @@ | ||
param($installPath, $toolsPath, $package, $project) | ||
|
||
# Need to load MSBuild assembly if it's not loaded yet. | ||
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' | ||
|
||
# Grab the loaded MSBuild project for the project | ||
$msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 | ||
$msbuild.Xml.Imports | | ||
Where-Object { $_.Project -eq 'Build\RazorGenerator.MsBuild\build\RazorGenerator.MsBuild.targets' -or $_.Project -eq 'Build\FeatherPrecompilation.targets'} | | ||
ForEach-Object { $msbuild.Xml.RemoveChild($_) } | ||
|
||
# Add project references | ||
Write-Host "Adding project references..." | ||
$references = "System.Web.Extensions", "System.Web.ApplicationServices" | ||
try | ||
{ | ||
foreach ($reference in $references) | ||
{ | ||
# Check if reference doesn't already exist | ||
$existingReference = $msbuild.Items | Where-Object { $_.ItemType -eq "Reference" -and $_.EvaluatedInclude.Split(",")[0] -eq $reference } | Select-Object -First 1 | ||
if (!$existingReference) | ||
{ | ||
Write-Host ("Adding '{0}' to {1}" -f $reference, $project.Name) | ||
|
||
$msbuild.AddItem("Reference", $reference) | ||
|
||
Write-Host ("Successfully added '{0}' to {1}" -f $reference, $project.Name) | ||
} | ||
else | ||
{ | ||
Write-Host ("{0} already has a reference to '{1}'" -f $project.Name, $reference) | ||
} | ||
} | ||
} | ||
catch | ||
{ | ||
Write-Host ("Could not add references {0} to {1}. Please add these references manually or contact Sitefinity support." -f [system.String]::Join(", ", $references), $project.Name) | ||
Write-Error $_.Exception.Message | ||
} | ||
|
||
# Remove Recaptha views from Bootstrap package | ||
ForEach-Object { try { $project.ProjectItems.Item('ResourcePackages').ProjectItems.Item('Bootstrap').ProjectItems.Item('MVC').ProjectItems.Item('Views').ProjectItems.Item('Recaptcha') } catch { $null } } | | ||
Where-Object {$_ -ne $null} | | ||
ForEach-Object { $_.Remove() } | ||
|
||
# Save changes to project | ||
$project.Save() | ||
|
||
$fileInfo = new-object -typename System.IO.FileInfo -ArgumentList $project.FullName | ||
$projectDirectory = $fileInfo.DirectoryName | ||
|
||
# Make sure all Resource Packages have RazorGenerator directives | ||
$generatorDirectivesPath = "$projectDirectory\ResourcePackages\Bootstrap\razorgenerator.directives" | ||
if (Test-Path $generatorDirectivesPath) | ||
{ | ||
Get-ChildItem "$projectDirectory\ResourcePackages" -Directory -Exclude "Bootstrap" | | ||
Where-Object { $_.GetFiles("razorgenerator.directives").Count -eq 0 } | | ||
ForEach-Object { Copy-Item $generatorDirectivesPath $_.FullName } | ||
} | ||
|
||
# Prompt to remove Recaptcha template if exists since it isn't distributed with Feather anymore | ||
$recaptchaTemplatesPath = "$projectDirectory\ResourcePackages\Bootstrap\MVC\Views\Recaptcha" | ||
if (Test-Path $recaptchaTemplatesPath) | ||
{ | ||
Remove-Item $recaptchaTemplatesPath -Recurse -Confirm | ||
} | ||
|
||
# Append attributes to the AssemblyInfo | ||
Write-Host "Appending ControllerContainerAttribute and ResourcePackageAttribute to the AssemblyInfo..." | ||
$assemblyInfoPath = Join-Path $projectDirectory "Properties\AssemblyInfo.cs" | ||
if (Test-Path $assemblyInfoPath) | ||
{ | ||
# Append ControllerContainerAttribute to the AssemblyInfo | ||
$attributeRegex = "\[\s*assembly\s*\:\s*(?:(?:(?:(?:(?:(?:(?:Telerik\.)?Sitefinity\.)?Frontend\.)?Mvc\.)?Infrastructure\.)?Controllers\.)?Attributes\.)?ControllerContainer(?:Attribute)?\s*\]" | ||
$controllerContainerAttributeExists = (Get-Content $assemblyInfoPath | Where-Object { $_ -match $attributeRegex } | Group-Object).Count -eq 1 | ||
if (!$controllerContainerAttributeExists) | ||
{ | ||
Add-Content $assemblyInfoPath "`r`n[assembly: Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes.ControllerContainer]" | ||
Write-Host "Finished appending ControllerContainerAttribute to the AssemblyInfo." | ||
} | ||
else | ||
{ | ||
Write-Host "ControllerContainerAttribute is already in the AssemblyInfo. Nothing is appended." | ||
} | ||
|
||
# Append ResourcePackageAttribute to the AssemblyInfo | ||
$attributeRegex = "\[\s*assembly\s*\:\s*(?:(?:(?:(?:(?:(?:(?:Telerik\.)?Sitefinity\.)?Frontend\.)?Mvc\.)?Infrastructure\.)?Controllers\.)?Attributes\.)?ResourcePackage(?:Attribute)?\s*\]" | ||
$resourcePackageAttributeExists = (Get-Content $assemblyInfoPath | Where-Object { $_ -match $attributeRegex } | Group-Object).Count -eq 1 | ||
if (!$resourcePackageAttributeExists) | ||
{ | ||
Add-Content $assemblyInfoPath "`r`n[assembly: Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes.ResourcePackage]" | ||
Write-Host "Finished appending ResourcePackageAttribute to the AssemblyInfo." | ||
} | ||
else | ||
{ | ||
Write-Host "ResourcePackageAttribute is already in the AssemblyInfo. Nothing is appended." | ||
} | ||
} | ||
else | ||
{ | ||
Write-Host "AssemblyInfo not found." | ||
} |
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,33 @@ | ||
param($installPath, $toolsPath, $package, $project) | ||
|
||
# This is the MSBuild targets file to add | ||
$targetsFile = [System.IO.Path]::Combine($toolsPath, 'RazorGenerator.MsBuild.targets') | ||
|
||
# Need to load MSBuild assembly if it's not loaded yet. | ||
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' | ||
# Grab the loaded MSBuild project for the project | ||
$msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 | ||
$projPath = Split-Path $project.FileName; | ||
|
||
if(Test-Path (Join-Path $projPath "Build\RazorGenerator.MsBuild\build\RazorGenerator.MsBuild.targets")){ | ||
# Add the import and save the project | ||
$msbuild.Xml.AddImport("Build\RazorGenerator.MsBuild\build\RazorGenerator.MsBuild.targets") | out-null | ||
} | ||
|
||
if(Test-Path (Join-Path $projPath "Build\FeatherPrecompilation.targets")){ | ||
# Add the import and save the project | ||
$msbuild.Xml.AddImport("Build\FeatherPrecompilation.targets") | out-null | ||
} | ||
$project.Save() | ||
|
||
$assemblyInfoPath = Join-Path $projPath "Properties\AssemblyInfo.cs" | ||
if (Test-Path $assemblyInfoPath) | ||
{ | ||
$assemblyInfoPathTemp = "$assemblyInfoPath.tmp" | ||
$controllerContainerRegex = "\[\s*assembly\s*\:\s*(?:(?:(?:(?:(?:(?:(?:Telerik\.)?Sitefinity\.)?Frontend\.)?Mvc\.)?Infrastructure\.)?Controllers\.)?Attributes\.)?ControllerContainer(?:Attribute)?\s*\]" | ||
$resourcePackageRegex = "\[\s*assembly\s*\:\s*(?:(?:(?:(?:(?:(?:(?:Telerik\.)?Sitefinity\.)?Frontend\.)?Mvc\.)?Infrastructure\.)?Controllers\.)?Attributes\.)?ResourcePackage(?:Attribute)?\s*\]" | ||
Get-Content $assemblyInfoPath | ? { $_ -notmatch $controllerContainerRegex } | ? { $_ -notmatch $resourcePackageRegex } | Set-Content $assemblyInfoPathTemp -Force | ||
(Get-Content $assemblyInfoPathTemp -Raw).Trim() | Set-Content $assemblyInfoPathTemp -Force | ||
Remove-Item $assemblyInfoPath | ||
Rename-Item $assemblyInfoPathTemp $assemblyInfoPath | ||
} |