├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── appveyor.yml ├── build.ps1 ├── build ├── build.fsx ├── helpers.fsx ├── paket.bootstrapper.exe ├── paket.dependencies └── paket.lock └── src ├── Security.config ├── Settings.StyleCop ├── SourceBrowser.Generator ├── App.config ├── DocumentWalkers │ ├── CSWalkerUtils.cs │ ├── DocumentWalker.cs │ ├── IWalker.cs │ ├── IWalkerUtils.cs │ ├── VBWalkerUtils.cs │ └── WalkerSelector.cs ├── Extensions │ ├── DocumentExtensions.cs │ └── SymbolExtensions.cs ├── Model │ ├── CSharp │ │ ├── CSharpDelimiters.cs │ │ └── CSharpTokenTypes.cs │ ├── DocumentModel.cs │ ├── FolderModel.cs │ ├── ILink.cs │ ├── IProjectItem.cs │ ├── SymbolLink.cs │ ├── Token.cs │ ├── Trivia.cs │ ├── UrlLink.cs │ ├── VisualBasic │ │ ├── VBDelimiters.cs │ │ └── VisualBasicTokenTypes.cs │ └── WorkspaceModel.cs ├── Properties │ └── AssemblyInfo.cs ├── ReferencesourceLinkProvider.cs ├── SolutionAnalyzer.cs ├── SourceBrowser.Generator.csproj ├── SourceBrowser.Generator.nuspec ├── Transformers │ ├── AbstractWorkspaceVisitor.cs │ ├── HtmlTransformer.cs │ ├── SearchIndexTransformer.cs │ ├── TokenLookupTransformer.cs │ └── TreeViewTransformer.cs ├── Utilities.cs └── packages.config ├── SourceBrowser.Samples ├── App.config ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── SourceBrowser.Samples.csproj └── packages.config ├── SourceBrowser.Search ├── DocumentFields │ └── TokenFields.cs ├── Properties │ └── AssemblyInfo.cs ├── SearchIndex.cs ├── SourceBrowser.Search.csproj ├── ViewModels │ └── TokenViewModel.cs └── packages.config ├── SourceBrowser.Site ├── App_Start │ ├── BundleConfig.cs │ ├── Constraints │ │ └── AjaxOnlyConstraint.cs │ ├── FilterConfig.cs │ ├── IdentityConfig.cs │ ├── RouteConfig.cs │ └── Startup.Auth.cs ├── Content │ ├── Site.css │ ├── accordion.css │ ├── all.css │ ├── autocomplete.css │ ├── base.css │ ├── bootstrap.css │ ├── button.css │ ├── core.css │ ├── datepicker.css │ ├── dialog.css │ ├── draggable.css │ ├── logo.png │ ├── menu.css │ ├── progressbar.css │ ├── resizable.css │ ├── search.png │ ├── selectable.css │ ├── selectmenu.css │ ├── slider.css │ ├── sortable.css │ ├── sourcebrowser-browse.css │ ├── sourcebrowser-codebrowser.css │ ├── sourcebrowser-upload.css │ ├── spinner.css │ ├── tabs.css │ ├── theme.css │ ├── themes │ │ └── base │ │ │ ├── accordion.css │ │ │ ├── all.css │ │ │ ├── autocomplete.css │ │ │ ├── base.css │ │ │ ├── button.css │ │ │ ├── core.css │ │ │ ├── datepicker.css │ │ │ ├── dialog.css │ │ │ ├── draggable.css │ │ │ ├── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ ├── menu.css │ │ │ ├── progressbar.css │ │ │ ├── resizable.css │ │ │ ├── selectable.css │ │ │ ├── selectmenu.css │ │ │ ├── slider.css │ │ │ ├── sortable.css │ │ │ ├── spinner.css │ │ │ ├── tabs.css │ │ │ ├── theme.css │ │ │ └── tooltip.css │ └── tooltip.css ├── Controllers │ ├── AccountController.cs │ ├── BrowseController.cs │ ├── HomeController.cs │ ├── SearchController.cs │ └── UploadController.cs ├── Global.asax ├── Global.asax.cs ├── Models │ ├── AccountViewModels.cs │ ├── GithubFileStructure.cs │ ├── GithubRepoStructure.cs │ ├── GithubSolutionStructure.cs │ ├── GithubUserStructure.cs │ ├── IdentityModels.cs │ ├── ManageViewModels.cs │ ├── SourceFileViewModel.cs │ └── SourceFolderViewModel.cs ├── Project_Readme.html ├── Properties │ └── AssemblyInfo.cs ├── Repositories │ ├── BrowserRepository.cs │ └── UploadRepository.cs ├── Scripts │ ├── _references.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── history.js │ │ ├── amplify.store.js │ │ ├── history.adapter.dojo.js │ │ ├── history.adapter.jquery.js │ │ ├── history.adapter.mootools.js │ │ ├── history.adapter.prototype.js │ │ ├── history.adapter.yui.js │ │ ├── history.adapter.zepto.js │ │ ├── history.html4.js │ │ ├── history.js │ │ └── json2.js │ ├── jquery-2.1.1.intellisense.js │ ├── jquery-2.1.1.js │ ├── jquery-2.1.1.min.js │ ├── jquery-2.1.1.min.map │ ├── jquery-ui-1.11.1.js │ ├── jquery-ui.min-1.11.1.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── jquery.widget.js │ ├── modernizr-2.6.2.js │ ├── respond.js │ ├── respond.min.js │ ├── search.js │ ├── treeViewHelpers.js │ └── upload.js ├── SourceBrowser.Site.csproj ├── Startup.cs ├── Utilities │ ├── Constants.cs │ └── Serialization.cs ├── Views │ ├── Account │ │ ├── ConfirmEmail.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── Login.cshtml │ │ ├── Manage.cshtml │ │ ├── Register.cshtml │ │ ├── ResetPassword.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── VerifyCode.cshtml │ │ ├── _ChangePasswordPartial.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── _RemoveAccountPartial.cshtml │ │ └── _SetPasswordPartial.cshtml │ ├── Browse │ │ ├── AwaitLookup.cshtml │ │ ├── Index.cshtml │ │ ├── InvalidPath.cshtml │ │ ├── LookupError.cshtml │ │ ├── LookupFile.cshtml │ │ ├── LookupFolder.cshtml │ │ └── LookupUser.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── Index.cshtml │ │ ├── ManageLogins.cshtml │ │ ├── SetPassword.cshtml │ │ └── VerifyPhoneNumber.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── _BrowseLayout.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Upload │ │ └── Index.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── css │ ├── iconFont.min.css │ ├── metro-bootstrap-responsive.css │ ├── metro-bootstrap-responsive.min.css │ ├── metro-bootstrap.css │ └── metro-bootstrap.min.css ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ ├── iconFont.dev.svg │ ├── iconFont.eot │ ├── iconFont.json │ ├── iconFont.svg │ ├── iconFont.ttf │ ├── iconFont.woff │ ├── metroSysIcons.svg │ ├── metroSysIcons.ttf │ └── metroSysIcons.woff ├── js │ ├── metro.min.js │ └── metro │ │ ├── metro-accordion.js │ │ ├── metro-button-set.js │ │ ├── metro-calendar.js │ │ ├── metro-carousel.js │ │ ├── metro-core.js │ │ ├── metro-countdown.js │ │ ├── metro-date-format.js │ │ ├── metro-datepicker.js │ │ ├── metro-dialog.js │ │ ├── metro-drag-tile.js │ │ ├── metro-dropdown.js │ │ ├── metro-fluentmenu.js │ │ ├── metro-global.js │ │ ├── metro-hint.js │ │ ├── metro-initiator.js │ │ ├── metro-input-control.js │ │ ├── metro-listview.js │ │ ├── metro-live-tile.js │ │ ├── metro-loader.js │ │ ├── metro-locale.js │ │ ├── metro-notify.js │ │ ├── metro-panel.js │ │ ├── metro-plugin-template.js │ │ ├── metro-progressbar.js │ │ ├── metro-pull.js │ │ ├── metro-rating.js │ │ ├── metro-scroll.js │ │ ├── metro-slider.js │ │ ├── metro-stepper.js │ │ ├── metro-streamer.js │ │ ├── metro-tab-control.js │ │ ├── metro-table.js │ │ ├── metro-tile-transform.js │ │ ├── metro-times.js │ │ ├── metro-touch-handler.js │ │ ├── metro-treeview.js │ │ └── metro-wizard.js ├── less │ ├── accordion.less │ ├── balloon.less │ ├── breadcrumbs.less │ ├── buttons.less │ ├── calendar.less │ ├── carousel.less │ ├── colors.less │ ├── countdown.less │ ├── dataTables.less │ ├── fluent-menu.less │ ├── forms.less │ ├── funcs.less │ ├── grid.less │ ├── hint.less │ ├── iconFont-content.less │ ├── iconFont.less │ ├── icons.less │ ├── images.less │ ├── layout.less │ ├── lists.less │ ├── menus.less │ ├── metro-bootstrap-responsive.less │ ├── metro-bootstrap.less │ ├── misc.less │ ├── navigation-bar.less │ ├── notice.less │ ├── notify.less │ ├── pagination.less │ ├── panels.less │ ├── progress-bar.less │ ├── rating.less │ ├── reset.less │ ├── scroll.less │ ├── sidebar.less │ ├── slider.less │ ├── stepper.less │ ├── streamer.less │ ├── tab-control.less │ ├── tables.less │ ├── tiles.less │ ├── transform.less │ ├── treeview.less │ ├── typography.less │ ├── utils.less │ ├── variables.less │ ├── window.less │ └── wizard.less ├── libs │ ├── Microsoft.CodeAnalysis.CSharp.Workspaces.dll │ ├── Microsoft.CodeAnalysis.CSharp.Workspaces.xml │ ├── Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll │ ├── Microsoft.CodeAnalysis.VisualBasic.Workspaces.xml │ ├── System.Collections.Immutable.dll │ └── System.Collections.Immutable.xml └── packages.config ├── SourceBrowser.SolutionRetriever ├── GitHubInformationRetriever.cs ├── GitHubSolutionRetriever.cs ├── Properties │ └── AssemblyInfo.cs ├── SourceBrowser.SolutionRetriever.csproj └── packages.config ├── SourceBrowser.Tests ├── CSharpTests.cs ├── Properties │ └── AssemblyInfo.cs ├── SourceBrowser.Tests.csproj ├── app.config └── packages.config ├── SourceBrowser.sln └── lib ├── Roslyn.Services.UnitTests.dll └── Roslyn.Test.Utilities.dll /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Code Connect 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SourceBrowser.Generator 2 | ======================= 3 | 4 | C# in. HTML out. 5 | 6 | Demo: [sourcebrowser.io/Browse/CodeConnect/SourceBrowser/](http://sourcebrowser.io/Browse/CodeConnect/SourceBrowser/) 7 | 8 | 9 | _What is it?_ 10 | 11 | SourceBrowser.Generator takes C# solutions and creates HTML files with links between the methods, properties and types. 12 | 13 | _Why?_ 14 | 15 | It's much easier to browse open source and online projects when you can traverse the project easily. GitHub is great, but it's a huge pain in the ass to navigate projects on here. 16 | 17 | _What languages do you support?_ 18 | 19 | C# and VB .Net, but we'd like to support others. 20 | 21 | _I found a bug. How do I tell you?_ 22 | 23 | Post it on our [Issues](https://github.com/CodeConnect/SourceBrowser.Generator/issues) page. 24 | 25 | _I'd like a new feature. How do I tell you?_ 26 | 27 | Post it on our [Uservoice](http://sourcebrowser.uservoice.com). 28 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.{build} 2 | 3 | os: Visual Studio 2015 Preview 4 | 5 | branches: 6 | # blacklist 7 | except: 8 | - gh-pages 9 | 10 | build_script: 11 | - ps: ./build.ps1 12 | 13 | artifacts: 14 | - path: '*.nupkg' 15 | - path: src/SourceBrowser.Samples/bin/Release 16 | name: SourceBrowser.Samples 17 | type: zip 18 | 19 | environment: 20 | MSBUILD: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe 21 | NUGET_APIKEY: 22 | secure: eCwaphHAp/cyOVc/LxigXppNaFjC3WMFSW07rjFNuonyNg2t9pvi9cCZivqxYZBm 23 | -------------------------------------------------------------------------------- /build.ps1: -------------------------------------------------------------------------------- 1 | $buildFolder = "$PSScriptRoot\build" 2 | $toolsFolder = "$PSScriptRoot\tools" 3 | $nuget = "$toolsFolder\nuget.exe" 4 | & "$buildFolder\paket.bootstrapper.exe" 5 | Push-Location $buildFolder 6 | & "$buildFolder\paket.exe" restore 7 | Pop-Location 8 | 9 | if(-not (Test-Path $toolsFolder)) { 10 | mkdir $toolsFolder | Out-Null 11 | } 12 | 13 | if(-not (Test-Path $nuget)) { 14 | Invoke-WebRequest "https://nuget.org/nuget.exe" -OutFile $nuget 15 | } 16 | 17 | $fake = "$buildFolder\packages\FAKE\tools\Fake.exe" 18 | 19 | & $fake "$buildFolder\build.fsx" 20 | if($LASTEXITCODE -ne 0) { 21 | if($env:APPVEYOR) { 22 | exit 1 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /build/helpers.fsx: -------------------------------------------------------------------------------- 1 | module Helpers 2 | 3 | #r "packages/FAKE/tools/FakeLib.dll" // include Fake lib 4 | open Fake 5 | open System 6 | 7 | 8 | let inline FullNameFromHere (fileName : string) = (__SOURCE_DIRECTORY__ + "/" + fileName) 9 | 10 | let CustomRestorePackage solution = 11 | traceStartTask "CustomRestorePackage" solution 12 | let (parameters:RestorePackageParams) = RestorePackageDefaults 13 | 14 | 15 | let args =" \"restore\" \"" + (solution |> FullName) + "\"" 16 | 17 | runNuGetTrial parameters.Retries parameters.ToolPath parameters.TimeOut args (fun () -> failwithf "Package restore of %s failed." solution) 18 | traceEndTask "CustomRestorePackage" solution 19 | 20 | let CusomtNuGetPack nuspecOrProject version configuration = 21 | traceStartTask "CusomtNuGetPack" nuspecOrProject 22 | 23 | let toolPath = findNuget (currentDirectory @@ "tools" @@ "NuGet") 24 | 25 | let args = String.concat " " ["pack"; nuspecOrProject; "-version"; version; "-p"; (sprintf "Configuration=%s" configuration) ] 26 | 27 | let result = 28 | ExecProcess (fun info -> 29 | info.FileName <- toolPath 30 | info.WorkingDirectory <- (".." |> FullNameFromHere) 31 | info.Arguments <- args) (TimeSpan.FromMinutes 5.) 32 | 33 | if result <> 0 then failwithf "Error during NuGet package creation. %s %s" toolPath args 34 | 35 | traceEndTask "CusomtNuGetPack" nuspecOrProject 36 | -------------------------------------------------------------------------------- /build/paket.bootstrapper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/build/paket.bootstrapper.exe -------------------------------------------------------------------------------- /build/paket.dependencies: -------------------------------------------------------------------------------- 1 | source https://nuget.org/api/v2 2 | 3 | nuget FAKE 4 | nuget GitVersion 5 | nuget LibGit2Sharp 6 | -------------------------------------------------------------------------------- /build/paket.lock: -------------------------------------------------------------------------------- 1 | NUGET 2 | remote: https://nuget.org/api/v2 3 | specs: 4 | FAKE (3.7.9) 5 | GitVersion (1.3.2) 6 | LibGit2Sharp (0.19.0.0) 7 | -------------------------------------------------------------------------------- /src/Security.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Settings.StyleCop: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Github 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | False 13 | 14 | 15 | 16 | 17 | False 18 | 19 | 20 | 21 | 22 | False 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | False 33 | 34 | 35 | 36 | 37 | False 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | False 48 | 49 | 50 | 51 | 52 | False 53 | 54 | 55 | 56 | 57 | False 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/DocumentWalkers/CSWalkerUtils.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using Microsoft.CodeAnalysis.CSharp; 3 | using SourceBrowser.Generator.Model.CSharp; 4 | 5 | namespace SourceBrowser.Generator.DocumentWalkers 6 | { 7 | class CSWalkerUtils : CSharpSyntaxWalker, IWalkerUtils 8 | { 9 | private readonly DocumentWalker _walker; 10 | 11 | internal CSWalkerUtils(DocumentWalker walker) 12 | : base(SyntaxWalkerDepth.Trivia) 13 | { 14 | _walker = walker; 15 | } 16 | 17 | public string IdentifierTokenTypeName { get; } = CSharpTokenTypes.IDENTIFIER; 18 | 19 | public string KeywordTokenTypeName { get; } = CSharpTokenTypes.KEYWORD; 20 | 21 | public string OtherTokenTypeName { get; } = CSharpTokenTypes.OTHER; 22 | 23 | public string StringTokenTypeName { get; } = CSharpTokenTypes.STRING; 24 | 25 | public string TypeTokenTypeName { get; } = CSharpTokenTypes.TYPE; 26 | 27 | public string ParameterDelimiter { get; } = CSharpDelimiters.PARAMETER; 28 | 29 | public string LocalVariableDelimiter { get; } = CSharpDelimiters.LOCAL_VARIABLE; 30 | 31 | 32 | public string GetFullName(SyntaxToken token) => token.CSharpKind().ToString(); 33 | 34 | public bool IsIdentifier(SyntaxToken token) => token.CSharpKind() == SyntaxKind.IdentifierToken; 35 | 36 | public bool IsKeyword(SyntaxToken token) => token.IsKeyword(); 37 | 38 | public bool IsLiteral(SyntaxToken token) => token.CSharpKind() == SyntaxKind.StringLiteralToken; 39 | 40 | public override void VisitToken(SyntaxToken token) => _walker.VisitToken(token); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/DocumentWalkers/IWalker.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using SourceBrowser.Generator.Model; 3 | 4 | namespace SourceBrowser.Generator.DocumentWalkers 5 | { 6 | public interface IWalker 7 | { 8 | void Visit(SyntaxNode syntaxRoot); 9 | DocumentModel GetDocumentModel(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/DocumentWalkers/IWalkerUtils.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | 3 | namespace SourceBrowser.Generator.DocumentWalkers 4 | { 5 | interface IWalkerUtils 6 | { 7 | string OtherTokenTypeName { get; } 8 | string KeywordTokenTypeName { get; } 9 | string StringTokenTypeName { get; } 10 | string TypeTokenTypeName { get; } 11 | string IdentifierTokenTypeName { get; } 12 | string LocalVariableDelimiter { get; } 13 | string ParameterDelimiter { get; } 14 | 15 | bool IsKeyword(SyntaxToken token); 16 | bool IsIdentifier(SyntaxToken token); 17 | bool IsLiteral(SyntaxToken token); 18 | string GetFullName(SyntaxToken token); 19 | 20 | void Visit(SyntaxNode syntaxRoot); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/DocumentWalkers/VBWalkerUtils.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using Microsoft.CodeAnalysis.VisualBasic; 3 | using SourceBrowser.Generator.Model.VisualBasic; 4 | 5 | namespace SourceBrowser.Generator.DocumentWalkers 6 | { 7 | class VBWalkerUtils : VisualBasicSyntaxWalker, IWalkerUtils 8 | { 9 | private readonly DocumentWalker _walker; 10 | 11 | internal VBWalkerUtils(DocumentWalker walker) 12 | : base(SyntaxWalkerDepth.Trivia) 13 | { 14 | _walker = walker; 15 | } 16 | 17 | public string IdentifierTokenTypeName { get; } = VisualBasicTokenTypes.IDENTIFIER; 18 | 19 | public string KeywordTokenTypeName { get; } = VisualBasicTokenTypes.KEYWORD; 20 | 21 | public string OtherTokenTypeName { get; } = VisualBasicTokenTypes.OTHER; 22 | 23 | public string StringTokenTypeName { get; } = VisualBasicTokenTypes.STRING; 24 | 25 | public string TypeTokenTypeName { get; } = VisualBasicTokenTypes.TYPE; 26 | 27 | public string ParameterDelimiter { get; } = VBDelimiters.PARAMETER; 28 | 29 | public string LocalVariableDelimiter { get; } = VBDelimiters.LOCAL_VARIABLE; 30 | 31 | 32 | public string GetFullName(SyntaxToken token) => token.CSharpKind().ToString(); 33 | 34 | public bool IsIdentifier(SyntaxToken token) => token.VBKind() == SyntaxKind.IdentifierToken; 35 | 36 | public bool IsKeyword(SyntaxToken token) => token.IsKeyword(); 37 | 38 | public bool IsLiteral(SyntaxToken token) => token.VBKind() == SyntaxKind.StringLiteralToken; 39 | 40 | public override void VisitToken(SyntaxToken token) => _walker.VisitToken(token); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/DocumentWalkers/WalkerSelector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Microsoft.CodeAnalysis; 4 | using SourceBrowser.Generator.Model; 5 | 6 | 7 | namespace SourceBrowser.Generator.DocumentWalkers 8 | { 9 | internal class WalkerSelector 10 | { 11 | public static IWalker GetWalker(IProjectItem parent, Document document, ReferencesourceLinkProvider refSourceLinkProvider) 12 | { 13 | var fileExtension = Path.GetExtension(document.FilePath); 14 | if (String.IsNullOrEmpty(fileExtension)) 15 | { 16 | return null; 17 | } 18 | if (fileExtension == ".cs") 19 | { 20 | return new DocumentWalker(parent, document, refSourceLinkProvider, (w) => new CSWalkerUtils(w)); 21 | } 22 | else if (fileExtension == ".vb") 23 | { 24 | return new DocumentWalker(parent, document, refSourceLinkProvider, (w) => new VBWalkerUtils(w)); 25 | } 26 | return null; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Extensions/DocumentExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.CodeAnalysis; 4 | 5 | namespace SourceBrowser.Generator.Extensions 6 | { 7 | /// 8 | /// A number of extension methods for dealing with the relative path of the 9 | /// document. Often, we're not interested in the document's absolute file path, 10 | /// just its path relative to the root of the project. 11 | /// These extension methods allow us to deal with this relative path. 12 | /// 13 | public static class DocumentExtensions 14 | { 15 | /// 16 | /// Retrieves the document's containing path relative to the root of the project. 17 | /// 18 | public static string GetContainingFolderPath(this Document document) 19 | { 20 | string path = String.Empty; 21 | path += document.Project.Name; 22 | foreach (var folder in document.Folders) 23 | { 24 | path += "\\"; 25 | path += folder; 26 | } 27 | 28 | path += "\\"; 29 | return path; 30 | } 31 | 32 | /// 33 | /// Retrieves the document's path relative to the root of the project 34 | /// 35 | public static string GetRelativeFilePath(this Document document) 36 | { 37 | string path = document.GetContainingFolderPath(); 38 | path += document.Name; 39 | return path; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Extensions/SymbolExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.CodeAnalysis; 7 | 8 | namespace SourceBrowser.Generator.Extensions 9 | { 10 | public static class SymbolExtensions 11 | { 12 | 13 | /// 14 | /// Returns the SymbolId for a symbol. SymbolId is very closely 15 | /// related to DocumentationCommentId, with some minor changes. 16 | /// 17 | public static string GetSymbolId(this ISymbol symbol) 18 | { 19 | string documentationCommentId = String.Empty; 20 | symbol = symbol.OriginalDefinition; 21 | documentationCommentId = symbol.GetDocumentationCommentId(); 22 | if (documentationCommentId == null) 23 | { 24 | return null; 25 | } 26 | documentationCommentId = documentationCommentId.Replace("#ctor", "ctor"); 27 | 28 | return documentationCommentId; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/CSharp/CSharpDelimiters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model.CSharp 8 | { 9 | /// 10 | /// Fully qualified names do not contain enough information to differentiate 11 | /// between some symbols. Occasionally we must extend C#'s fully qualified names 12 | /// to refer to certain symbols. 13 | /// 14 | /// Examples: Local variables, parameters, static constructors etc. 15 | /// 16 | public static class CSharpDelimiters 17 | { 18 | public const string LOCAL_VARIABLE = "::"; 19 | public const string PARAMETER = "::"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/CSharp/CSharpTokenTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model.CSharp 8 | { 9 | public static class CSharpTokenTypes 10 | { 11 | public const string COMMENT = "Comment"; 12 | public const string IDENTIFIER = "Identifier"; 13 | public const string KEYWORD = "Keyword"; 14 | public const string TYPE = "Type"; 15 | public const string STRING = "String"; 16 | public const string OTHER = "Other"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/DocumentModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SourceBrowser.Generator.Model 9 | { 10 | public class DocumentModel : IProjectItem 11 | { 12 | public IProjectItem Parent { get; } 13 | 14 | public ICollection Children { get; } 15 | 16 | public ICollection Tokens { get; } 17 | 18 | public string Name { get; } 19 | 20 | public string RelativePath { get; } 21 | 22 | public int NumberOfLines { get; } 23 | 24 | public DocumentModel(IProjectItem parent, string name, int numberOfLines) 25 | { 26 | Parent = parent; 27 | Name = name; 28 | RelativePath = Path.Combine(parent.RelativePath, name); ; 29 | NumberOfLines = numberOfLines; 30 | Children = new List(); 31 | Tokens = new List(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/FolderModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SourceBrowser.Generator.Model 9 | { 10 | public class FolderModel : IProjectItem 11 | { 12 | public ICollection Children { get; } 13 | 14 | public IProjectItem Parent { get; } 15 | 16 | public string Name { get; } 17 | 18 | public string RelativePath { get; } 19 | 20 | public FolderModel(IProjectItem parent, string name) 21 | { 22 | Parent = parent; 23 | Name = name; 24 | RelativePath = Path.Combine(parent.RelativePath, name) + "/"; 25 | Children = new List(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/ILink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model 8 | { 9 | public interface ILink 10 | { 11 | /// 12 | /// Regardless of the type of link, it must be representable as a single string. 13 | /// 14 | /// 15 | string Link { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/IProjectItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model 8 | { 9 | /// 10 | /// Represents an item within a workspace. 11 | /// 12 | public interface IProjectItem 13 | { 14 | IProjectItem Parent { get; } 15 | 16 | string Name { get; } 17 | 18 | ICollection Children { get; } 19 | 20 | string RelativePath { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/SymbolLink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.CodeAnalysis; 7 | 8 | namespace SourceBrowser.Generator.Model 9 | { 10 | public class SymbolLink : ILink 11 | { 12 | public string ReferencedSymbolName { get; } 13 | 14 | public string Link 15 | { 16 | //TODO: 17 | get 18 | { 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | 23 | public SymbolLink(string referencedSymbolName) 24 | { 25 | ReferencedSymbolName = referencedSymbolName; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/Trivia.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model 8 | { 9 | public class Trivia 10 | { 11 | public string Type { get; } 12 | public string Value { get; } 13 | public Trivia(string value, string type) 14 | { 15 | Value = value; 16 | Type = type; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/UrlLink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model 8 | { 9 | public class UrlLink : ILink 10 | { 11 | public string Url { get; } 12 | 13 | public string Link 14 | { 15 | get 16 | { 17 | return Url; 18 | } 19 | } 20 | 21 | public UrlLink(string url) 22 | { 23 | Url = url; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/VisualBasic/VBDelimiters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model.VisualBasic 8 | { 9 | /// 10 | /// Fully qualified names do not contain enough information to differentiate 11 | /// between some symbols. Occasionally we must extend VB's fully qualified names 12 | /// to refer to certain symbols. 13 | /// 14 | /// Examples: Local variables, parameters, static constructors etc. 15 | /// 16 | public static class VBDelimiters 17 | { 18 | public const string LOCAL_VARIABLE = "::"; 19 | public const string PARAMETER = "::"; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/VisualBasic/VisualBasicTokenTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model.VisualBasic 8 | { 9 | public static class VisualBasicTokenTypes 10 | { 11 | public const string COMMENT = "Comment"; 12 | public const string IDENTIFIER = "Identifier"; 13 | public const string KEYWORD = "Keyword"; 14 | public const string TYPE = "Type"; 15 | public const string STRING = "String"; 16 | public const string OTHER = "Other"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Model/WorkspaceModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Generator.Model 8 | { 9 | /// 10 | /// 11 | /// 12 | public class WorkspaceModel : IProjectItem 13 | { 14 | public ICollection Children { get; } 15 | 16 | public string Name { get; } 17 | 18 | public string BasePath { get; } 19 | 20 | public string RelativePath { get; } 21 | 22 | //The WorkspaceModel has no parent. It is the top level item. 23 | public IProjectItem Parent 24 | { 25 | get 26 | { 27 | return null; 28 | } 29 | } 30 | 31 | public WorkspaceModel(string name, string basePath) 32 | { 33 | Name = name; 34 | BasePath = basePath; 35 | RelativePath = ""; 36 | Children = new List(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SourceBrowser.Generator")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SourceBrowser.Generator")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9fd2eff3-8ee4-472c-a203-c6c3c6002969")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | 38 | 39 | //InternalsVisibleTo 40 | [assembly: InternalsVisibleTo("SourceBrowser.Tests", AllInternalsVisible = true)] -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/ReferencesourceLinkProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Security.Cryptography; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using Microsoft.CodeAnalysis; 10 | using SourceBrowser.Generator.Extensions; 11 | 12 | namespace SourceBrowser.Generator 13 | { 14 | public class ReferencesourceLinkProvider 15 | { 16 | private const string baseUrl = "http://referencesource.microsoft.com"; 17 | private string assembliesUrl = baseUrl + "/assemblies.txt"; 18 | 19 | private List assemblies = new List(); 20 | 21 | public IEnumerable Assemblies 22 | { 23 | get { return assemblies; } 24 | } 25 | 26 | public ReferencesourceLinkProvider() 27 | { 28 | 29 | } 30 | 31 | public void Init() 32 | { 33 | var getReferenceAssemblies = new HttpClient(); 34 | var referenceAssemblies = getReferenceAssemblies.GetStringAsync(assembliesUrl).Result; 35 | foreach(var line in referenceAssemblies.Split('\n')) 36 | { 37 | var parts = line.Split(';'); 38 | if (parts.Length > 0) 39 | { 40 | assemblies.Add(parts[0]); 41 | } 42 | } 43 | 44 | } 45 | 46 | public string GetLink(ISymbol symbol) 47 | { 48 | var symbolId = symbol.GetSymbolId(); 49 | if (symbolId != null) 50 | { 51 | return baseUrl + "/" + symbol.ContainingAssembly.Name + "/a.html#" + Utilities.GetHash(symbolId); 52 | } 53 | else 54 | { 55 | return null; 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/SourceBrowser.Generator.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | SourceBrowser - Generator 7 | CodeConnect 8 | JoshVarty, AmadeusW, yannisgu 9 | https://github.com/CodeConnect/SourceBrowser 10 | https://github.com/CodeConnect/SourceBrowser 11 | https://avatars1.githubusercontent.com/u/9244729?v=2&s=200 12 | false 13 | SourceBrowser - Generator 14 | Copyright 2014 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Transformers/AbstractWorkspaceVisitor.cs: -------------------------------------------------------------------------------- 1 | using SourceBrowser.Generator.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SourceBrowser.Generator.Transformers 9 | { 10 | /// 11 | /// The abstract base class for all transformers. 12 | /// Visits all nodes within the WorkspaceModel. 13 | /// 14 | public abstract class AbstractWorkspaceVisitor 15 | { 16 | private WorkspaceModel _workspaceModel; 17 | public AbstractWorkspaceVisitor() 18 | { 19 | } 20 | 21 | public virtual void Visit(WorkspaceModel workspaceModel) 22 | { 23 | _workspaceModel = workspaceModel; 24 | VisitProjectItem(_workspaceModel); 25 | } 26 | 27 | protected virtual void VisitWorkspace(WorkspaceModel workspaceModel) 28 | { 29 | foreach(var child in _workspaceModel.Children) 30 | { 31 | VisitProjectItem(child); 32 | } 33 | } 34 | 35 | protected virtual void VisitProjectItem(IProjectItem projectItem) 36 | { 37 | if(projectItem is FolderModel) 38 | { 39 | VisitFolder((FolderModel)projectItem); 40 | } 41 | else if(projectItem is DocumentModel) 42 | { 43 | VisitDocument((DocumentModel)projectItem); 44 | } 45 | else if(projectItem is WorkspaceModel) 46 | { 47 | VisitWorkspace((WorkspaceModel)projectItem); 48 | } 49 | else 50 | { 51 | throw new InvalidOperationException("Unhandled: " + nameof(projectItem)); 52 | } 53 | } 54 | 55 | protected virtual void VisitFolder(FolderModel folderModel) 56 | { 57 | foreach(var child in folderModel.Children) 58 | { 59 | VisitProjectItem(child); 60 | } 61 | } 62 | 63 | protected virtual void VisitDocument(DocumentModel documentModel) 64 | { 65 | foreach(var child in documentModel.Children) 66 | { 67 | VisitProjectItem(child); 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Transformers/SearchIndexTransformer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using SourceBrowser.Generator.Model; 7 | using System.IO; 8 | using SourceBrowser.Search; 9 | using SourceBrowser.Search.ViewModels; 10 | 11 | namespace SourceBrowser.Generator.Transformers 12 | { 13 | public class SearchIndexTransformer : AbstractWorkspaceVisitor 14 | { 15 | private string _username; 16 | private string _repository; 17 | 18 | public SearchIndexTransformer(string username, string repository) 19 | { 20 | _username = username; 21 | _repository = repository; 22 | } 23 | protected override void VisitDocument(DocumentModel documentModel) 24 | { 25 | var documentId = Path.Combine(_username, _repository, documentModel.RelativePath); 26 | var declarations = documentModel.Tokens.Where(n => n.IsDeclaration && n.IsSearchable); 27 | 28 | var tokenModels = from declaration in declarations 29 | select new TokenViewModel( 30 | _username, 31 | _repository, 32 | documentId, 33 | declaration.FullName, 34 | declaration.LineNumber 35 | ); 36 | 37 | SearchIndex.AddDeclarationsToIndex(tokenModels); 38 | 39 | base.VisitDocument(documentModel); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/Transformers/TokenLookupTransformer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using SourceBrowser.Generator.Model; 7 | 8 | namespace SourceBrowser.Generator.Transformers 9 | { 10 | /// 11 | /// Given a workspace model, provide a lookup from symbols to their position 12 | /// in a document. 13 | /// 14 | public class TokenLookupTransformer : AbstractWorkspaceVisitor 15 | { 16 | public Dictionary TokenLookup; 17 | 18 | public TokenLookupTransformer() 19 | { 20 | TokenLookup = new Dictionary(); 21 | } 22 | 23 | protected override void VisitDocument(DocumentModel documentModel) 24 | { 25 | var declarations = documentModel.Tokens.Where(n => n.IsDeclaration); 26 | foreach(var declaration in declarations) 27 | { 28 | TokenLookup[declaration.FullName] = declaration; 29 | } 30 | 31 | base.VisitDocument(documentModel); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/SourceBrowser.Generator/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Samples/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/SourceBrowser.Samples/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SourceBrowser.Samples")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SourceBrowser.Samples")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8eea500e-a58c-4879-85f2-3450e7f7deef")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Samples/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Search/DocumentFields/TokenFields.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Search.DocumentFields 8 | { 9 | /// 10 | /// A class containing the names of the document fields within our Lucene Index 11 | /// 12 | public static class TokenFields 13 | { 14 | public const string Id = "Id"; 15 | public const string Path = "Path"; 16 | public const string FullName = "FullName"; 17 | public const string Name = "Name"; 18 | public const string Username = "Username"; 19 | public const string Repository = "Repository"; 20 | public const string LineNumber = "LineNumber"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/SourceBrowser.Search/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SourceBrowser.Search")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SourceBrowser.Search")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6c2ed4c0-e609-47d8-aa05-1cacbe5252ac")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Search/ViewModels/TokenViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SourceBrowser.Search.ViewModels 8 | { 9 | public struct TokenViewModel 10 | { 11 | public string Id { get; } 12 | 13 | public string Path { get; } 14 | public string Username { get; } 15 | public string Repository { get; } 16 | public string FullyQualifiedName { get; } 17 | public string DisplayName 18 | { 19 | get 20 | { 21 | if (FullyQualifiedName == null) 22 | return null; 23 | string currentName = FullyQualifiedName; 24 | var parensIndex = FullyQualifiedName.IndexOf("("); 25 | if(parensIndex != -1) 26 | { 27 | currentName = currentName.Remove(parensIndex, currentName.Length - parensIndex); 28 | } 29 | 30 | var splitName = currentName.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries); 31 | return splitName.Last(); 32 | } 33 | } 34 | public int LineNumber { get; } 35 | 36 | public TokenViewModel(string username, string repository, string path, string fullName, int lineNumber) 37 | { 38 | Id = username + "/" + repository + "/" + fullName; 39 | Username = username; 40 | Repository = repository; 41 | Path = path; 42 | FullyQualifiedName = fullName; 43 | LineNumber = lineNumber; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/SourceBrowser.Search/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/App_Start/Constraints/AjaxOnlyConstraint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using System.Web.Routing; 8 | 9 | namespace SourceBrowser.Site.Attributes 10 | { 11 | public class AjaxOnlyConstraint : IRouteConstraint 12 | { 13 | public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) 14 | { 15 | return httpContext.Request.IsAjaxRequest(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace SourceBrowser.Site 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/Site.css: -------------------------------------------------------------------------------- 1 | line-numbers 2 | { 3 | margin:20px; 4 | } 5 | 6 | #main-content pre, 7 | #main-content pre a, 8 | #main-content pre span, 9 | #main-content pre span a 10 | { 11 | font-family: Consolas,"Liberation Mono",Menlo,Courier,monospace; 12 | } 13 | 14 | /* Set padding to keep content from hitting the edges */ 15 | .body-content { 16 | padding-left: 15px; 17 | padding-right: 15px; 18 | } 19 | 20 | .sb-jumbotron 21 | { 22 | background-color: #7f34a9; 23 | } 24 | 25 | .sb-jumbotron .lead 26 | { 27 | color: #fdf; 28 | font-size: large; 29 | margin-top: 2em; 30 | margin-bottom: 2em; 31 | } 32 | 33 | .sb-jumbotron h1 34 | { 35 | color: #fff; 36 | font-weight: normal; 37 | } 38 | 39 | .Keyword { 40 | color:blue; 41 | } 42 | 43 | .source-code a { 44 | color:#333333; 45 | } 46 | 47 | .source-code .Type { 48 | color:#2DADED; 49 | } 50 | 51 | .source-code .Type a { 52 | color:#2DADED; 53 | } 54 | 55 | .Comment { 56 | color: #18890D; 57 | } 58 | 59 | .String { 60 | color:#A31515; 61 | } 62 | 63 | .metro header .title-element { 64 | padding: 0 !important; 65 | font-family: 'Segoe UI','Open Sans',Verdana,Arial,Helvetica,sans-serif; 66 | float: left; 67 | width: auto; 68 | display: block; 69 | text-decoration: none; 70 | } 71 | 72 | .metro header .title-element .logo { 73 | margin: 6px; 74 | background-image: url("logo.png"); 75 | height: 32px; 76 | width: 32px; 77 | float: left; 78 | display: inline-block; 79 | } 80 | 81 | .metro header .title-element .title { 82 | padding: 15px 15px 15px 0; 83 | line-height: 15px; 84 | float: left; 85 | display: inline-block; 86 | } 87 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/dialog/#theming 10 | */ 11 | .ui-dialog { 12 | overflow: hidden; 13 | position: absolute; 14 | top: 0; 15 | left: 0; 16 | padding: .2em; 17 | outline: 0; 18 | } 19 | .ui-dialog .ui-dialog-titlebar { 20 | padding: .4em 1em; 21 | position: relative; 22 | } 23 | .ui-dialog .ui-dialog-title { 24 | float: left; 25 | margin: .1em 0; 26 | white-space: nowrap; 27 | width: 90%; 28 | overflow: hidden; 29 | text-overflow: ellipsis; 30 | } 31 | .ui-dialog .ui-dialog-titlebar-close { 32 | position: absolute; 33 | right: .3em; 34 | top: 50%; 35 | width: 20px; 36 | margin: -10px 0 0 0; 37 | padding: 1px; 38 | height: 20px; 39 | } 40 | .ui-dialog .ui-dialog-content { 41 | position: relative; 42 | border: 0; 43 | padding: .5em 1em; 44 | background: none; 45 | overflow: auto; 46 | } 47 | .ui-dialog .ui-dialog-buttonpane { 48 | text-align: left; 49 | border-width: 1px 0 0 0; 50 | background-image: none; 51 | margin-top: .5em; 52 | padding: .3em 1em .5em .4em; 53 | } 54 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 55 | float: right; 56 | } 57 | .ui-dialog .ui-dialog-buttonpane button { 58 | margin: .5em .4em .5em 0; 59 | cursor: pointer; 60 | } 61 | .ui-dialog .ui-resizable-se { 62 | width: 12px; 63 | height: 12px; 64 | right: -5px; 65 | bottom: -5px; 66 | background-position: 16px 16px; 67 | } 68 | .ui-draggable .ui-dialog-titlebar { 69 | cursor: move; 70 | } 71 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/logo.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Menu 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/menu/#theming 10 | */ 11 | .ui-menu { 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | display: block; 16 | outline: none; 17 | } 18 | .ui-menu .ui-menu { 19 | position: absolute; 20 | } 21 | .ui-menu .ui-menu-item { 22 | position: relative; 23 | margin: 0; 24 | padding: 3px 1em 3px .4em; 25 | cursor: pointer; 26 | min-height: 0; /* support: IE7 */ 27 | /* support: IE10, see #8844 */ 28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 29 | } 30 | .ui-menu .ui-menu-divider { 31 | margin: 5px 0; 32 | height: 0; 33 | font-size: 0; 34 | line-height: 0; 35 | border-width: 1px 0 0 0; 36 | } 37 | .ui-menu .ui-state-focus, 38 | .ui-menu .ui-state-active { 39 | margin: -1px; 40 | } 41 | 42 | /* icon support */ 43 | .ui-menu-icons { 44 | position: relative; 45 | } 46 | .ui-menu-icons .ui-menu-item { 47 | padding-left: 2em; 48 | } 49 | 50 | /* left-aligned */ 51 | .ui-menu .ui-icon { 52 | position: absolute; 53 | top: 0; 54 | bottom: 0; 55 | left: .2em; 56 | margin: auto 0; 57 | } 58 | 59 | /* right-aligned */ 60 | .ui-menu .ui-menu-icon { 61 | left: auto; 62 | right: 0; 63 | } 64 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-resizable { 10 | position: relative; 11 | } 12 | .ui-resizable-handle { 13 | position: absolute; 14 | font-size: 0.1px; 15 | display: block; 16 | -ms-touch-action: none; 17 | touch-action: none; 18 | } 19 | .ui-resizable-disabled .ui-resizable-handle, 20 | .ui-resizable-autohide .ui-resizable-handle { 21 | display: none; 22 | } 23 | .ui-resizable-n { 24 | cursor: n-resize; 25 | height: 7px; 26 | width: 100%; 27 | top: -5px; 28 | left: 0; 29 | } 30 | .ui-resizable-s { 31 | cursor: s-resize; 32 | height: 7px; 33 | width: 100%; 34 | bottom: -5px; 35 | left: 0; 36 | } 37 | .ui-resizable-e { 38 | cursor: e-resize; 39 | width: 7px; 40 | right: -5px; 41 | top: 0; 42 | height: 100%; 43 | } 44 | .ui-resizable-w { 45 | cursor: w-resize; 46 | width: 7px; 47 | left: -5px; 48 | top: 0; 49 | height: 100%; 50 | } 51 | .ui-resizable-se { 52 | cursor: se-resize; 53 | width: 12px; 54 | height: 12px; 55 | right: 1px; 56 | bottom: 1px; 57 | } 58 | .ui-resizable-sw { 59 | cursor: sw-resize; 60 | width: 9px; 61 | height: 9px; 62 | left: -5px; 63 | bottom: -5px; 64 | } 65 | .ui-resizable-nw { 66 | cursor: nw-resize; 67 | width: 9px; 68 | height: 9px; 69 | left: -5px; 70 | top: -5px; 71 | } 72 | .ui-resizable-ne { 73 | cursor: ne-resize; 74 | width: 9px; 75 | height: 9px; 76 | right: -5px; 77 | top: -5px; 78 | } 79 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/search.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/selectmenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectmenu 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/selectmenu/#theming 10 | */ 11 | .ui-selectmenu-menu { 12 | padding: 0; 13 | margin: 0; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | display: none; 18 | } 19 | .ui-selectmenu-menu .ui-menu { 20 | overflow: auto; 21 | /* Support: IE7 */ 22 | overflow-x: hidden; 23 | padding-bottom: 1px; 24 | } 25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 26 | font-size: 1em; 27 | font-weight: bold; 28 | line-height: 1.5; 29 | padding: 2px 0.4em; 30 | margin: 0.5em 0 0 0; 31 | height: auto; 32 | border: 0; 33 | } 34 | .ui-selectmenu-open { 35 | display: block; 36 | } 37 | .ui-selectmenu-button { 38 | display: inline-block; 39 | overflow: hidden; 40 | position: relative; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | .ui-selectmenu-button span.ui-icon { 45 | right: 0.5em; 46 | left: auto; 47 | margin-top: -8px; 48 | position: absolute; 49 | top: 50%; 50 | } 51 | .ui-selectmenu-button span.ui-selectmenu-text { 52 | text-align: left; 53 | padding: 0.4em 2.1em 0.4em 1em; 54 | display: block; 55 | line-height: 1.4; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | white-space: nowrap; 59 | } 60 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/slider/#theming 10 | */ 11 | .ui-slider { 12 | position: relative; 13 | text-align: left; 14 | } 15 | .ui-slider .ui-slider-handle { 16 | position: absolute; 17 | z-index: 2; 18 | width: 1.2em; 19 | height: 1.2em; 20 | cursor: default; 21 | -ms-touch-action: none; 22 | touch-action: none; 23 | } 24 | .ui-slider .ui-slider-range { 25 | position: absolute; 26 | z-index: 1; 27 | font-size: .7em; 28 | display: block; 29 | border: 0; 30 | background-position: 0 0; 31 | } 32 | 33 | /* support: IE8 - See #6727 */ 34 | .ui-slider.ui-state-disabled .ui-slider-handle, 35 | .ui-slider.ui-state-disabled .ui-slider-range { 36 | filter: inherit; 37 | } 38 | 39 | .ui-slider-horizontal { 40 | height: .8em; 41 | } 42 | .ui-slider-horizontal .ui-slider-handle { 43 | top: -.3em; 44 | margin-left: -.6em; 45 | } 46 | .ui-slider-horizontal .ui-slider-range { 47 | top: 0; 48 | height: 100%; 49 | } 50 | .ui-slider-horizontal .ui-slider-range-min { 51 | left: 0; 52 | } 53 | .ui-slider-horizontal .ui-slider-range-max { 54 | right: 0; 55 | } 56 | 57 | .ui-slider-vertical { 58 | width: .8em; 59 | height: 100px; 60 | } 61 | .ui-slider-vertical .ui-slider-handle { 62 | left: -.3em; 63 | margin-left: 0; 64 | margin-bottom: -.6em; 65 | } 66 | .ui-slider-vertical .ui-slider-range { 67 | left: 0; 68 | width: 100%; 69 | } 70 | .ui-slider-vertical .ui-slider-range-min { 71 | bottom: 0; 72 | } 73 | .ui-slider-vertical .ui-slider-range-max { 74 | top: 0; 75 | } 76 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/sourcebrowser-upload.css: -------------------------------------------------------------------------------- 1 | #upload-form { 2 | margin:0px 0px 75px 0px; 3 | } 4 | 5 | #upload-form div{ 6 | margin:0 auto; 7 | max-width:1000px; 8 | } 9 | 10 | #upload-form input{ 11 | max-width:100%; 12 | } 13 | 14 | #upload-header{ 15 | margin:65px 0px 65px 0px; 16 | } 17 | 18 | #upload-error{ 19 | color:red; 20 | } 21 | 22 | .upload-message{ 23 | margin:0px 0px 52px 0px; 24 | visibility:hidden; 25 | } 26 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/spinner.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Spinner 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/spinner/#theming 10 | */ 11 | .ui-spinner { 12 | position: relative; 13 | display: inline-block; 14 | overflow: hidden; 15 | padding: 0; 16 | vertical-align: middle; 17 | } 18 | .ui-spinner-input { 19 | border: none; 20 | background: none; 21 | color: inherit; 22 | padding: 0; 23 | margin: .2em 0; 24 | vertical-align: middle; 25 | margin-left: .4em; 26 | margin-right: 22px; 27 | } 28 | .ui-spinner-button { 29 | width: 16px; 30 | height: 50%; 31 | font-size: .5em; 32 | padding: 0; 33 | margin: 0; 34 | text-align: center; 35 | position: absolute; 36 | cursor: default; 37 | display: block; 38 | overflow: hidden; 39 | right: 0; 40 | } 41 | /* more specificity required here to override default borders */ 42 | .ui-spinner a.ui-spinner-button { 43 | border-top: none; 44 | border-bottom: none; 45 | border-right: none; 46 | } 47 | /* vertically center icon */ 48 | .ui-spinner .ui-icon { 49 | position: absolute; 50 | margin-top: -8px; 51 | top: 50%; 52 | left: 0; 53 | } 54 | .ui-spinner-up { 55 | top: 0; 56 | } 57 | .ui-spinner-down { 58 | bottom: 0; 59 | } 60 | 61 | /* TR overrides */ 62 | .ui-spinner .ui-icon-triangle-1-s { 63 | /* need to fix icons sprite */ 64 | background-position: -65px -16px; 65 | } 66 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tabs/#theming 10 | */ 11 | .ui-tabs { 12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 13 | padding: .2em; 14 | } 15 | .ui-tabs .ui-tabs-nav { 16 | margin: 0; 17 | padding: .2em .2em 0; 18 | } 19 | .ui-tabs .ui-tabs-nav li { 20 | list-style: none; 21 | float: left; 22 | position: relative; 23 | top: 0; 24 | margin: 1px .2em 0 0; 25 | border-bottom-width: 0; 26 | padding: 0; 27 | white-space: nowrap; 28 | } 29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 30 | float: left; 31 | padding: .5em 1em; 32 | text-decoration: none; 33 | } 34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 35 | margin-bottom: -1px; 36 | padding-bottom: 1px; 37 | } 38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 41 | cursor: text; 42 | } 43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 44 | cursor: pointer; 45 | } 46 | .ui-tabs .ui-tabs-panel { 47 | display: block; 48 | border-width: 0; 49 | padding: 1em 1.4em; 50 | background: none; 51 | } 52 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/dialog/#theming 10 | */ 11 | .ui-dialog { 12 | overflow: hidden; 13 | position: absolute; 14 | top: 0; 15 | left: 0; 16 | padding: .2em; 17 | outline: 0; 18 | } 19 | .ui-dialog .ui-dialog-titlebar { 20 | padding: .4em 1em; 21 | position: relative; 22 | } 23 | .ui-dialog .ui-dialog-title { 24 | float: left; 25 | margin: .1em 0; 26 | white-space: nowrap; 27 | width: 90%; 28 | overflow: hidden; 29 | text-overflow: ellipsis; 30 | } 31 | .ui-dialog .ui-dialog-titlebar-close { 32 | position: absolute; 33 | right: .3em; 34 | top: 50%; 35 | width: 20px; 36 | margin: -10px 0 0 0; 37 | padding: 1px; 38 | height: 20px; 39 | } 40 | .ui-dialog .ui-dialog-content { 41 | position: relative; 42 | border: 0; 43 | padding: .5em 1em; 44 | background: none; 45 | overflow: auto; 46 | } 47 | .ui-dialog .ui-dialog-buttonpane { 48 | text-align: left; 49 | border-width: 1px 0 0 0; 50 | background-image: none; 51 | margin-top: .5em; 52 | padding: .3em 1em .5em .4em; 53 | } 54 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 55 | float: right; 56 | } 57 | .ui-dialog .ui-dialog-buttonpane button { 58 | margin: .5em .4em .5em 0; 59 | cursor: pointer; 60 | } 61 | .ui-dialog .ui-resizable-se { 62 | width: 12px; 63 | height: 12px; 64 | right: -5px; 65 | bottom: -5px; 66 | background-position: 16px 16px; 67 | } 68 | .ui-draggable .ui-dialog-titlebar { 69 | cursor: move; 70 | } 71 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Menu 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/menu/#theming 10 | */ 11 | .ui-menu { 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | display: block; 16 | outline: none; 17 | } 18 | .ui-menu .ui-menu { 19 | position: absolute; 20 | } 21 | .ui-menu .ui-menu-item { 22 | position: relative; 23 | margin: 0; 24 | padding: 3px 1em 3px .4em; 25 | cursor: pointer; 26 | min-height: 0; /* support: IE7 */ 27 | /* support: IE10, see #8844 */ 28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 29 | } 30 | .ui-menu .ui-menu-divider { 31 | margin: 5px 0; 32 | height: 0; 33 | font-size: 0; 34 | line-height: 0; 35 | border-width: 1px 0 0 0; 36 | } 37 | .ui-menu .ui-state-focus, 38 | .ui-menu .ui-state-active { 39 | margin: -1px; 40 | } 41 | 42 | /* icon support */ 43 | .ui-menu-icons { 44 | position: relative; 45 | } 46 | .ui-menu-icons .ui-menu-item { 47 | padding-left: 2em; 48 | } 49 | 50 | /* left-aligned */ 51 | .ui-menu .ui-icon { 52 | position: absolute; 53 | top: 0; 54 | bottom: 0; 55 | left: .2em; 56 | margin: auto 0; 57 | } 58 | 59 | /* right-aligned */ 60 | .ui-menu .ui-menu-icon { 61 | left: auto; 62 | right: 0; 63 | } 64 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-resizable { 10 | position: relative; 11 | } 12 | .ui-resizable-handle { 13 | position: absolute; 14 | font-size: 0.1px; 15 | display: block; 16 | -ms-touch-action: none; 17 | touch-action: none; 18 | } 19 | .ui-resizable-disabled .ui-resizable-handle, 20 | .ui-resizable-autohide .ui-resizable-handle { 21 | display: none; 22 | } 23 | .ui-resizable-n { 24 | cursor: n-resize; 25 | height: 7px; 26 | width: 100%; 27 | top: -5px; 28 | left: 0; 29 | } 30 | .ui-resizable-s { 31 | cursor: s-resize; 32 | height: 7px; 33 | width: 100%; 34 | bottom: -5px; 35 | left: 0; 36 | } 37 | .ui-resizable-e { 38 | cursor: e-resize; 39 | width: 7px; 40 | right: -5px; 41 | top: 0; 42 | height: 100%; 43 | } 44 | .ui-resizable-w { 45 | cursor: w-resize; 46 | width: 7px; 47 | left: -5px; 48 | top: 0; 49 | height: 100%; 50 | } 51 | .ui-resizable-se { 52 | cursor: se-resize; 53 | width: 12px; 54 | height: 12px; 55 | right: 1px; 56 | bottom: 1px; 57 | } 58 | .ui-resizable-sw { 59 | cursor: sw-resize; 60 | width: 9px; 61 | height: 9px; 62 | left: -5px; 63 | bottom: -5px; 64 | } 65 | .ui-resizable-nw { 66 | cursor: nw-resize; 67 | width: 9px; 68 | height: 9px; 69 | left: -5px; 70 | top: -5px; 71 | } 72 | .ui-resizable-ne { 73 | cursor: ne-resize; 74 | width: 9px; 75 | height: 9px; 76 | right: -5px; 77 | top: -5px; 78 | } 79 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/selectmenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectmenu 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/selectmenu/#theming 10 | */ 11 | .ui-selectmenu-menu { 12 | padding: 0; 13 | margin: 0; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | display: none; 18 | } 19 | .ui-selectmenu-menu .ui-menu { 20 | overflow: auto; 21 | /* Support: IE7 */ 22 | overflow-x: hidden; 23 | padding-bottom: 1px; 24 | } 25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 26 | font-size: 1em; 27 | font-weight: bold; 28 | line-height: 1.5; 29 | padding: 2px 0.4em; 30 | margin: 0.5em 0 0 0; 31 | height: auto; 32 | border: 0; 33 | } 34 | .ui-selectmenu-open { 35 | display: block; 36 | } 37 | .ui-selectmenu-button { 38 | display: inline-block; 39 | overflow: hidden; 40 | position: relative; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | .ui-selectmenu-button span.ui-icon { 45 | right: 0.5em; 46 | left: auto; 47 | margin-top: -8px; 48 | position: absolute; 49 | top: 50%; 50 | } 51 | .ui-selectmenu-button span.ui-selectmenu-text { 52 | text-align: left; 53 | padding: 0.4em 2.1em 0.4em 1em; 54 | display: block; 55 | line-height: 1.4; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | white-space: nowrap; 59 | } 60 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/slider/#theming 10 | */ 11 | .ui-slider { 12 | position: relative; 13 | text-align: left; 14 | } 15 | .ui-slider .ui-slider-handle { 16 | position: absolute; 17 | z-index: 2; 18 | width: 1.2em; 19 | height: 1.2em; 20 | cursor: default; 21 | -ms-touch-action: none; 22 | touch-action: none; 23 | } 24 | .ui-slider .ui-slider-range { 25 | position: absolute; 26 | z-index: 1; 27 | font-size: .7em; 28 | display: block; 29 | border: 0; 30 | background-position: 0 0; 31 | } 32 | 33 | /* support: IE8 - See #6727 */ 34 | .ui-slider.ui-state-disabled .ui-slider-handle, 35 | .ui-slider.ui-state-disabled .ui-slider-range { 36 | filter: inherit; 37 | } 38 | 39 | .ui-slider-horizontal { 40 | height: .8em; 41 | } 42 | .ui-slider-horizontal .ui-slider-handle { 43 | top: -.3em; 44 | margin-left: -.6em; 45 | } 46 | .ui-slider-horizontal .ui-slider-range { 47 | top: 0; 48 | height: 100%; 49 | } 50 | .ui-slider-horizontal .ui-slider-range-min { 51 | left: 0; 52 | } 53 | .ui-slider-horizontal .ui-slider-range-max { 54 | right: 0; 55 | } 56 | 57 | .ui-slider-vertical { 58 | width: .8em; 59 | height: 100px; 60 | } 61 | .ui-slider-vertical .ui-slider-handle { 62 | left: -.3em; 63 | margin-left: 0; 64 | margin-bottom: -.6em; 65 | } 66 | .ui-slider-vertical .ui-slider-range { 67 | left: 0; 68 | width: 100%; 69 | } 70 | .ui-slider-vertical .ui-slider-range-min { 71 | bottom: 0; 72 | } 73 | .ui-slider-vertical .ui-slider-range-max { 74 | top: 0; 75 | } 76 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/spinner.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Spinner 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/spinner/#theming 10 | */ 11 | .ui-spinner { 12 | position: relative; 13 | display: inline-block; 14 | overflow: hidden; 15 | padding: 0; 16 | vertical-align: middle; 17 | } 18 | .ui-spinner-input { 19 | border: none; 20 | background: none; 21 | color: inherit; 22 | padding: 0; 23 | margin: .2em 0; 24 | vertical-align: middle; 25 | margin-left: .4em; 26 | margin-right: 22px; 27 | } 28 | .ui-spinner-button { 29 | width: 16px; 30 | height: 50%; 31 | font-size: .5em; 32 | padding: 0; 33 | margin: 0; 34 | text-align: center; 35 | position: absolute; 36 | cursor: default; 37 | display: block; 38 | overflow: hidden; 39 | right: 0; 40 | } 41 | /* more specificity required here to override default borders */ 42 | .ui-spinner a.ui-spinner-button { 43 | border-top: none; 44 | border-bottom: none; 45 | border-right: none; 46 | } 47 | /* vertically center icon */ 48 | .ui-spinner .ui-icon { 49 | position: absolute; 50 | margin-top: -8px; 51 | top: 50%; 52 | left: 0; 53 | } 54 | .ui-spinner-up { 55 | top: 0; 56 | } 57 | .ui-spinner-down { 58 | bottom: 0; 59 | } 60 | 61 | /* TR overrides */ 62 | .ui-spinner .ui-icon-triangle-1-s { 63 | /* need to fix icons sprite */ 64 | background-position: -65px -16px; 65 | } 66 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tabs/#theming 10 | */ 11 | .ui-tabs { 12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 13 | padding: .2em; 14 | } 15 | .ui-tabs .ui-tabs-nav { 16 | margin: 0; 17 | padding: .2em .2em 0; 18 | } 19 | .ui-tabs .ui-tabs-nav li { 20 | list-style: none; 21 | float: left; 22 | position: relative; 23 | top: 0; 24 | margin: 1px .2em 0 0; 25 | border-bottom-width: 0; 26 | padding: 0; 27 | white-space: nowrap; 28 | } 29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 30 | float: left; 31 | padding: .5em 1em; 32 | text-decoration: none; 33 | } 34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 35 | margin-bottom: -1px; 36 | padding-bottom: 1px; 37 | } 38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 41 | cursor: text; 42 | } 43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 44 | cursor: pointer; 45 | } 46 | .ui-tabs .ui-tabs-panel { 47 | display: block; 48 | border-width: 0; 49 | padding: 1em 1.4em; 50 | background: none; 51 | } 52 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Content/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Controllers 2 | { 3 | using System.Web.Mvc; 4 | 5 | public class HomeController : Controller 6 | { 7 | public ActionResult Index() 8 | { 9 | return View(); 10 | } 11 | 12 | public ActionResult About() 13 | { 14 | ViewBag.Message = "Your application description page."; 15 | 16 | return View(); 17 | } 18 | 19 | public ActionResult Contact() 20 | { 21 | ViewBag.Message = "Your contact page."; 22 | 23 | return View(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Controllers/SearchController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace SourceBrowser.Site.Controllers 8 | { 9 | public class SearchController : Controller 10 | { 11 | // GET: Search 12 | public ActionResult Index() 13 | { 14 | return View(); 15 | } 16 | 17 | public ActionResult Repository(string username, string repository, string query) 18 | { 19 | var results = Search.SearchIndex.SearchRepository(username, repository, query); 20 | var json = Json(results); 21 | return json; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="SourceBrowser.Site.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Global.asax.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site 2 | { 3 | using System.Web.Mvc; 4 | using System.Web.Optimization; 5 | using System.Web.Routing; 6 | 7 | public class MvcApplication : System.Web.HttpApplication 8 | { 9 | protected void Application_Start() 10 | { 11 | AreaRegistration.RegisterAllAreas(); 12 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 13 | RouteConfig.RegisterRoutes(RouteTable.Routes); 14 | BundleConfig.RegisterBundles(BundleTable.Bundles); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/GithubFileStructure.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using System; 4 | 5 | using Newtonsoft.Json.Linq; 6 | 7 | public class GithubFileStructure 8 | { 9 | public string FileName { get; set; } 10 | 11 | public string Directory { get; set; } 12 | 13 | public string RelativePath { get; set; } 14 | 15 | public string RelativeRootPath { get; set; } 16 | 17 | public string SourceCode { get; set; } 18 | 19 | public override string ToString() 20 | { 21 | return string.Format( 22 | "{0} in {1}", 23 | new object[] 24 | { 25 | FileName, 26 | Directory 27 | }); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/GithubRepoStructure.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using SourceBrowser.SolutionRetriever; 4 | using System; 5 | using System.Collections.Generic; 6 | 7 | [Serializable] 8 | public class GithubRepoStructure 9 | { 10 | public string Name { get; set; } 11 | 12 | public string ParentUserName { get; set; } 13 | 14 | public DateTime UploadTime { get; set; } // todo: populate. 15 | 16 | public int forksCount; 17 | public int starsCount; 18 | public string language; 19 | public string homepage; 20 | public bool isPrivate; 21 | public string description; 22 | 23 | public void UseLiveData() 24 | { 25 | try 26 | { 27 | GitHubInformationRetriever.GetRepoInformation(ParentUserName, Name, ref forksCount, ref starsCount, ref language, ref homepage, ref isPrivate, ref description); 28 | } 29 | catch 30 | { 31 | // Swallow. This information is not essential to operation of SourceBrowser. 32 | } 33 | } 34 | 35 | public override string ToString() 36 | { 37 | return string.Format( 38 | "{0}'s repository {1}", 39 | ParentUserName, 40 | Name); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/GithubSolutionStructure.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using System; 4 | 5 | using Newtonsoft.Json.Linq; 6 | 7 | public class GithubSolutionStructure 8 | { 9 | public string Name { get; set; } 10 | 11 | public string RelativePath { get; set; } 12 | 13 | public string RelativeRootPath { get; set; } 14 | 15 | public GithubRepoStructure ParentRepo { get; set; } 16 | 17 | public override string ToString() 18 | { 19 | return String.Format("'{0}' from {1}'s repo {2}", Name, ParentRepo.ParentUserName, ParentRepo.Name); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/GithubUserStructure.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using Newtonsoft.Json.Linq; 4 | using System; 5 | using System.Collections.Generic; 6 | using SolutionRetriever; 7 | 8 | [Serializable] 9 | public class GithubUserStructure 10 | { 11 | public string Username; 12 | public string Path; 13 | public IList Repos; 14 | 15 | public string FullName; 16 | public string AvatarURL; 17 | public string GitHubURL; 18 | public string BlogURL; 19 | 20 | public void UseLiveData() 21 | { 22 | try 23 | { 24 | GitHubInformationRetriever.GetUserInformation(Username, ref FullName, ref AvatarURL, ref GitHubURL, ref BlogURL); 25 | } 26 | catch (Exception ex) 27 | { 28 | // Swallow. This information is not essential to operation of SourceBrowser. 29 | } 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return String.Format("User {0} with {1} repo{2}", Username, Repos.Count, Repos.Count == 1 ? "" : "s"); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using System.Threading.Tasks; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.AspNet.Identity.EntityFramework; 5 | 6 | namespace SourceBrowser.Site.Models 7 | { 8 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 9 | public class ApplicationUser : IdentityUser 10 | { 11 | public async Task GenerateUserIdentityAsync(UserManager manager) 12 | { 13 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 14 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); 15 | // Add custom user claims here 16 | return userIdentity; 17 | } 18 | } 19 | 20 | public class ApplicationDbContext : IdentityDbContext 21 | { 22 | public ApplicationDbContext() 23 | : base("DefaultConnection", throwIfV1Schema: false) 24 | { 25 | } 26 | 27 | public static ApplicationDbContext Create() 28 | { 29 | return new ApplicationDbContext(); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/SourceFileViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using Newtonsoft.Json.Linq; 4 | 5 | /// 6 | /// Contains basic information about a source file 7 | /// to be displayed within a view. 8 | /// 9 | public class SourceFileViewModel 10 | { 11 | public string SourceCode { get; set; } 12 | 13 | public string FileName { get; set; } 14 | 15 | public string LookupPath { get; set; } 16 | 17 | public int NumberOfLines { get; set; } 18 | 19 | public JObject FolderInfoRoot { get; set; } 20 | 21 | public string RootDirectory { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Models/SourceFolderViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SourceBrowser.Site.Models 2 | { 3 | using System.Collections.Generic; 4 | 5 | using Newtonsoft.Json.Linq; 6 | 7 | public class SourceFolderViewModel 8 | { 9 | public string FolderName { get; set; } 10 | 11 | public string LookupPath { get; set; } 12 | 13 | public List Folders { get; set; } 14 | 15 | public List Files { get; set; } 16 | 17 | public JObject FolderInfoRoot { get; set; } 18 | 19 | public string RootDirectory { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SourceBrowser.Site")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SourceBrowser.Site")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("eaa37803-d416-435d-84d2-d09298d6a503")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Scripts/_references.js -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.dojo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Scripts/history.js/history.adapter.dojo.js -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.jquery.js: -------------------------------------------------------------------------------- 1 | (function(a,b){var c=a.History=a.History||{},d=a.jQuery;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b){d(a).trigger(b)},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()})(window) -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.mootools.js: -------------------------------------------------------------------------------- 1 | (function(a,b){var c=a.History=a.History||{},d=a.MooTools;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");Object.append(Element.NativeEvents,{popstate:2,hashchange:2}),c.Adapter={bind:function(a,b,c){var d=typeof a=="string"?document.id(a):a;d.addEvent(b,c)},trigger:function(a,b){var c=typeof a=="string"?document.id(a):a;c.fireEvent(b)},onDomLoad:function(b){a.addEvent("domready",b)}},typeof c.init!="undefined"&&c.init()})(window) -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.prototype.js: -------------------------------------------------------------------------------- 1 | (function(a,b){var c=a.History=a.History||{},d=a.Prototype,e=a.Element,f=a.Event,g=a.$;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");typeof a.fireEvent=="undefined"&&typeof a.dispatchEvent=="undefined"?c.enable=!1:(function(){var a={HTMLEvents:/^(?:load|unload|abort|error|select|hashchange|popstate|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvents:/^(?:click|mouse(?:down|up|over|move|out))$/},b={pointerX:0,pointerY:0,button:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,bubbles:!0,cancelable:!0};f.hasNativeEvent=function(b,c){var d=null,e;b=g(b);for(var f in a)if(a[f].test(c)){d=f;break}e=d?!0:!1;return e},f.bind=function(a,b,c){a=g(a);return e.hasNativeEvent(a,b)?e.observe(a,b,c):e.observe(a,"custom:"+b,c)},f.trigger=function(c,d){var f=Object.extend(b,arguments[2]||{}),h,i=null;c=g(c);var j;for(j in a)if(a[j].test(d)){i=j;break}if(!i)return e.fire(c,"custom:"+d);document.createEvent?(h=document.createEvent(i),i==="HTMLEvents"?h.initEvent(d,f.bubbles,f.cancelable):i&&h.initMouseEvent(d,f.bubbles,f.cancelable,document.defaultView,f.button,f.pointerX,f.pointerY,f.pointerX,f.pointerY,f.ctrlKey,f.altKey,f.shiftKey,f.metaKey,f.button,c)):document.createEventObject&&(f.clientX=f.pointerX,f.clientY=f.pointerY,h=Object.extend(document.createEventObject(),f));if(c.fireEvent)c.fireEvent("on"+d,h);else if(c.dispatchEvent)c.dispatchEvent(h);else throw new Error("Cannot dispatch the event");return c},e.addMethods({simulate:f.trigger,trigger:f.trigger,bind:f.bind,hasNativeEvent:f.hasNativeEvent})}(),c.Adapter={bind:function(a,b,c){e.bind(a,b,c)},trigger:function(a,b){e.trigger(a,b)},onDomLoad:function(b){f.observe(a.document,"dom:loaded",b)}},typeof c.init!="undefined"&&c.init())})(window) -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.yui.js: -------------------------------------------------------------------------------- 1 | (function(a,b){var c=a.History=a.History||{},d=a.YUI;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d().use("node-base",function(d){d.one(a).on(b,c)})},trigger:function(a,b){d().use("node-event-simulate",function(c){c.one(a).simulate(b)})},onDomLoad:function(a){d().use("event",function(b){b.on("domready",a)})}},typeof c.init!="undefined"&&c.init()})(window) -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/history.js/history.adapter.zepto.js: -------------------------------------------------------------------------------- 1 | (function(a,b){var c=a.History=a.History||{},d=a.Zepto;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b){d(a).trigger(b)},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()})(window) -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/treeViewHelpers.js: -------------------------------------------------------------------------------- 1 | function endsWith(str, suffix) { 2 | return str.indexOf(suffix, str.length - suffix.length) !== -1; 3 | } 4 | 5 | $(function () { 6 | $("#browserTree").click( 7 | function (e) { 8 | var target = e.originalEvent.target.href; 9 | if (!(endsWith(target, "#"))) { 10 | window.location.href = target; 11 | } 12 | } 13 | ); 14 | }); 15 | 16 | $(document).ready(function () { 17 | var path = window.location.pathname; 18 | expandTreeView(path); 19 | }); 20 | 21 | function expandTreeView(path) { 22 | var parts = path.split("/"); 23 | var pathToDate = ""; 24 | 25 | // Ignore the first three elements from the path: 26 | // Browse/UserName/RepoName/Folder1/Folder2/FileName 27 | for (var partNumber = 4; partNumber < parts.length; partNumber++) 28 | { 29 | pathToDate = pathToDate + parts[partNumber] + "/"; 30 | expandNode(pathToDate); 31 | } 32 | } 33 | 34 | function expandNode(path) { 35 | var selector = "li[id='" + path + "']"; 36 | var node = $(selector); 37 | var child = $(selector + " > ul"); 38 | if (node.length) { 39 | node.removeClass("collapsed"); 40 | } 41 | if (child.length) { 42 | child.show(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Scripts/upload.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | getFormFromDom().submit(prepareForUpload); 3 | }); 4 | 5 | function prepareForUpload() { 6 | getButtonFromDom().prop("disabled", true); 7 | var errorMessageElement = getErrorMessageFromDom(); 8 | if (errorMessageElement) { 9 | errorMessageElement.css("visibility", "hidden"); 10 | } 11 | getMessageDivFromDom().css("visibility", "visible"); 12 | } 13 | 14 | // 15 | // DOM access methods 16 | // 17 | function getButtonFromDom() { 18 | return $(".btn"); 19 | } 20 | 21 | function getFormFromDom() { 22 | return $("#upload-form"); 23 | } 24 | 25 | function getMessageDivFromDom() { 26 | return $(".upload-message"); 27 | } 28 | 29 | function getErrorMessageFromDom() { 30 | return $("#upload-error"); 31 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(SourceBrowser.Site.Startup))] 5 | 6 | namespace SourceBrowser.Site 7 | { 8 | public partial class Startup 9 | { 10 | public void Configuration(IAppBuilder app) 11 | { 12 | ConfigureAuth(app); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Utilities/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace SourceBrowser.Site.Utilities 7 | { 8 | public static class Constants 9 | { 10 | public const string REPO_LOCK_FILENAME = "repo.lock"; 11 | } 12 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "ConfirmAccount"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your account. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 |

@ViewBag.Title.

6 |

Associate your @ViewBag.LoginProvider account.

7 | 8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Association Form

13 |
14 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 15 |

16 | You've successfully authenticated with @ViewBag.LoginProvider. 17 | Please enter a user name for this site below and click the Register button to finish 18 | logging in. 19 |

20 |
21 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 24 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |

Unsuccessful login with service.

7 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/Manage.cshtml: -------------------------------------------------------------------------------- 1 | @using SourceBrowser.Site.Models; 2 | @using Microsoft.AspNet.Identity; 3 | @{ 4 | ViewBag.Title = "Manage Account"; 5 | } 6 | 7 |

@ViewBag.Title.

8 | 9 |

@ViewBag.StatusMessage

10 |
11 |
12 | @if (ViewBag.HasLocalPassword) 13 | { 14 | @Html.Partial("_ChangePasswordPartial") 15 | } 16 | else 17 | { 18 | @Html.Partial("_SetPasswordPartial") 19 | } 20 | 21 |
22 | @Html.Action("RemoveAccountList") 23 | @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl }) 24 |
25 |
26 |
27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.RegisterViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Create a new account.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | 39 | @section Scripts { 40 | @Scripts.Render("~/bundles/jqueryval") 41 | } 42 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ResetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ResetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Reset password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Reset your password.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 | @Html.HiddenFor(model => model.Code) 15 |
16 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 19 |
20 |
21 |
22 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 23 |
24 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 25 |
26 |
27 |
28 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 29 |
30 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 | } 39 | 40 | @section Scripts { 41 | @Scripts.Render("~/bundles/jqueryval") 42 | } 43 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.VerifyCodeViewModel 2 | @{ 3 | ViewBag.Title = "Verify"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("provider", @Model.Provider) 11 | @Html.Hidden("rememberMe", @Model.RememberMe) 12 |

Enter verification code

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 19 |
20 |
21 |
22 |
23 |
24 | @Html.CheckBoxFor(m => m.RememberBrowser) 25 | @Html.LabelFor(m => m.RememberBrowser) 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 | } 35 | 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } 39 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/_ChangePasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @model SourceBrowser.Site.Models.ManageUserViewModel 3 | 4 |

You're logged in as @User.Identity.GetUserName().

5 | 6 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 7 | { 8 | @Html.AntiForgeryToken() 9 |

Change Password Form

10 |
11 | @Html.ValidationSummary("", new { @class = "text-danger" }) 12 |
13 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 14 |
15 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 16 |
17 |
18 |
19 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 20 |
21 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 28 |
29 |
30 | 31 |
32 |
33 | 34 |
35 |
36 | } 37 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using SourceBrowser.Site.Models 2 | @model ExternalLoginListViewModel 3 | @using Microsoft.Owin.Security 4 | 5 |

Use another service to log in.

6 |
7 | @{ 8 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 9 | if (loginProviders.Count() == 0) 10 | { 11 |
12 |

There are no external authentication services configured. See this article 13 | for details on setting up this ASP.NET application to support logging in via external services.

14 |
15 | } 16 | else 17 | { 18 | using (Html.BeginForm(Model.Action, "Account", new { ReturnUrl = Model.ReturnUrl })) 19 | { 20 | @Html.AntiForgeryToken() 21 |
22 |

23 | @foreach (AuthenticationDescription p in loginProviders) 24 | { 25 | 26 | } 27 |

28 |
29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/_RemoveAccountPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count > 0) 4 | { 5 |

Registered Logins

6 | 7 | 8 | @foreach (var account in Model) 9 | { 10 | 11 | 12 | 30 | 31 | } 32 | 33 |
@account.LoginProvider 13 | @if (ViewBag.ShowRemoveButton) 14 | { 15 | using (Html.BeginForm("Disassociate", "Account")) 16 | { 17 | @Html.AntiForgeryToken() 18 |
19 | @Html.Hidden("loginProvider", account.LoginProvider) 20 | @Html.Hidden("providerKey", account.ProviderKey) 21 | 22 |
23 | } 24 | } 25 | else 26 | { 27 | @:   28 | } 29 |
34 | } 35 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Account/_SetPasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ManageUserViewModel 2 | 3 |

4 | You do not have a local username/password for this site. Add a local 5 | account so you can log in without an external login. 6 |

7 | 8 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Create Local Login

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 19 |
20 |
21 |
22 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 23 |
24 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/AwaitLookup.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.GithubSolutionStructure 2 | 3 | @{ 4 | ViewBag.Title = "AwaitLookup"; 5 | } 6 | 7 |
8 | 9 |
10 |

We are currently processing @Model.ParentRepo.ParentUserName's repository @Model.ParentRepo.Name.

11 |

This may take a few minutes. Refresh this page periodically.

12 |

View @Model.ParentRepo.Name on github.

13 |
14 |
15 | 24 |
25 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SourceBrowser.Site.Models 2 | @{ 3 | ViewBag.Title = "Browse"; 4 | } 5 | 6 |
7 | @if (ViewBag.Users == null || ViewBag.Users.Count == 0) 8 | { 9 |
10 |

11 | Oops! There are no repositories to browse. :(

12 |

Try uploading one of your own from Github!

13 |
14 | } 15 | else 16 | { 17 | 18 |
19 |

Pick user or organization whose repo you want to browse:

20 | 34 |
35 | } 36 |
37 | 38 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/InvalidPath.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | ViewBag.Title = "InvalidPath"; 4 | } 5 | 6 |

InvalidPath

7 | 8 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/LookupError.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | ViewBag.Title = "Error"; 4 | } 5 | 6 | 7 |
8 |

There was and error retrieving this project

9 |

Please ensure the URL you're using is correct.

10 | @if(ViewBag.ErrorMessage != null) 11 | { 12 |
13 |

@ViewBag.ErrorMessage

14 | } 15 |
16 | 17 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/LookupFile.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.GithubFileStructure 2 | 3 | @{ 4 | ViewBag.Title = Model.FileName; 5 | } 6 | 7 |
8 | 9 | 10 |
11 | @if (!String.IsNullOrEmpty(Model.SourceCode)) 12 | { 13 | @Html.Raw(Model.SourceCode) 14 | } 15 |
16 |
17 | 18 | 28 |
29 | 30 | @section Scripts { 31 | @Scripts.Render("~/bundles/treeViewScripts") 32 | } 33 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Browse/LookupFolder.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.GithubSolutionStructure 2 | 3 | @{ 4 | ViewBag.Title = Model.ParentRepo.Name; 5 | } 6 | 7 |
8 | 9 |
10 |

Browsing @Model.ParentRepo.ParentUserName's repository @Model.ParentRepo.Name.

11 |

12 | Use the search box or the tree view on the right, 13 | or view @Model.ParentRepo.Name on GitHub. 14 |

15 | @if (ViewBag.Readme != null) 16 | { 17 |
18 |
README.md
19 |
@Html.Raw(ViewBag.Readme)
20 |
21 | } 22 |
23 |
24 | 33 |
34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/treeViewScripts") 37 | } 38 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // ViewBag.Title = "Home Page"; leaving it null, so that users see just "Source Browser" 3 | } 4 | 5 |
6 |
7 |

Source Browser

8 |

Turn any C# GitHub Repository into a set of static HTML files.

9 |

10 | @Html.ActionLink("Upload Your Repo", "", "Upload", new { }, new { @class = "button large primary fg-white" }) 11 | @Html.ActionLink("See sample", "", "Browse//CodeConnect//SourceBrowser", new { }, new { @class = "button large success fg-white" }) 12 |

13 |
14 |
15 | 16 |
17 |
18 |
19 |

What?

20 |

21 | Source Browser takes C# files and turns them into 22 | statically linked HTML files. 23 |

24 |

@Html.ActionLink("Browse projects", "", "Browse", new { }, new { @class = "btn btn-default" })

25 |
26 |
27 |

Why?

28 |

29 | Source Browser makes it easy to browse third party libraries 30 | and explore unfamiliar code online. 31 |

32 |
33 |
34 |

Contribute!

35 |

36 | Source Browser is open source on Github. 37 | We're accepting pull requests and would love your contributions.

38 |

Contribute»

39 |
40 |
41 |
-------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Manage/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ChangePasswordViewModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Change Password Form

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | @section Scripts { 39 | @Scripts.Render("~/bundles/jqueryval") 40 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Manage/ManageLogins.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.ManageLoginsViewModel 2 | @using Microsoft.Owin.Security 3 | @{ 4 | ViewBag.Title = "Manage your external logins"; 5 | } 6 | 7 |

@ViewBag.Title.

8 | 9 |

@ViewBag.StatusMessage

10 | @if (Model.CurrentLogins.Count > 0) 11 | { 12 |

Registered Logins

13 | 14 | 15 | @foreach (var account in Model.CurrentLogins) 16 | { 17 | 18 | 19 | 37 | 38 | } 39 | 40 |
@account.LoginProvider 20 | @if (ViewBag.ShowRemoveButton) 21 | { 22 | using (Html.BeginForm("RemoveLogin", "Manage")) 23 | { 24 | @Html.AntiForgeryToken() 25 |
26 | @Html.Hidden("loginProvider", account.LoginProvider) 27 | @Html.Hidden("providerKey", account.ProviderKey) 28 | 29 |
30 | } 31 | } 32 | else 33 | { 34 | @:   35 | } 36 |
41 | } 42 | @if (Model.OtherLogins.Count > 0) 43 | { 44 |

Add another service to log in.

45 |
46 | using (Html.BeginForm("LinkLogin", "Manage")) 47 | { 48 | @Html.AntiForgeryToken() 49 |
50 |

51 | @foreach (AuthenticationDescription p in Model.OtherLogins) 52 | { 53 | 54 | } 55 |

56 |
57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.SetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Create Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 |

8 | You do not have a local username/password for this site. Add a local 9 | account so you can log in without an external login. 10 |

11 | 12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | 16 |

Create Local Login

17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" }) 19 |
20 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 21 |
22 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 23 |
24 |
25 |
26 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 27 |
28 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | } 37 | @section Scripts { 38 | @Scripts.Render("~/bundles/jqueryval") 39 | } -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model SourceBrowser.Site.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } 32 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | @Model.Exception.StackTrace; 10 |
11 |
12 |
13 |
14 |
15 | @Model.Exception; 16 | 17 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Shared/_BrowseLayout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title | Source Browser 8 | @Styles.Render("~/Content/css") 9 | @Scripts.Render("~/bundles/modernizr") 10 | 11 | 12 | 13 |
14 | 28 |
29 | 30 | @RenderBody() 31 | 32 | @Scripts.Render("~/bundles/jquery") 33 | @Scripts.Render("~/bundles/bootstrap") 34 | @Scripts.Render("~/bundles/search") 35 | @*Scripts.Render("~/bundles/sourcebrowser")*@ 36 | @RenderSection("scripts", required: false) 37 | 38 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @(ViewBag.Title != null ? ViewBag.Title + " | Source Browser" : "Source Browser") 8 | @Styles.Render("~/Content/css") 9 | @Scripts.Render("~/bundles/modernizr") 10 | 11 | 12 | 13 |
14 | 40 |
41 | 42 | @RenderBody() 43 | 44 |
45 |
46 | 49 |
50 | 51 | @Scripts.Render("~/bundles/jquery") 52 | @Scripts.Render("~/bundles/bootstrap") 53 | @Scripts.Render("~/bundles/search") 54 | @*Scripts.Render("~/bundles/sourcebrowser")*@ 55 | @RenderSection("scripts", required: false) 56 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Upload/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Upload"; 3 | } 4 | 5 | @Scripts.Render("~/bundles/jquery") 6 | @Scripts.Render("~/bundles/upload") 7 | 8 |
9 |

Upload any Github Repo

10 |

Paste the URL of the project

11 | @if (ViewBag.Error != null) 12 | { 13 |
@ViewBag.Error
14 | } 15 |
16 | 17 |
18 |
19 | 20 | 21 | 22 | 23 |
24 |
25 | 26 |
27 | Uploading. Please Wait... 28 |
29 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/favicon.ico -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/iconFont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.eot -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/iconFont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.ttf -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/iconFont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.woff -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/metroSysIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/metroSysIcons.ttf -------------------------------------------------------------------------------- /src/SourceBrowser.Site/fonts/metroSysIcons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/metroSysIcons.woff -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-accordion.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | $.widget("metro.accordion", { 3 | 4 | version: "1.0.0", 5 | 6 | options: { 7 | closeAny: true, 8 | open: function(frame){}, 9 | action: function(frame){} 10 | }, 11 | 12 | _frames: {}, 13 | 14 | _create: function(){ 15 | var element = this.element; 16 | 17 | if (element.data('closeany') != undefined) this.options.closeAny = element.data('closeany'); 18 | 19 | this._frames = element.children(".accordion-frame"); 20 | 21 | this.init(); 22 | }, 23 | 24 | init: function(){ 25 | var that = this; 26 | 27 | this._frames.each(function(){ 28 | var frame = this, 29 | a = $(this).children(".heading"), 30 | content = $(this).children(".content"); 31 | 32 | if ($(a).hasClass("active") && !$(a).attr('disabled') && $(a).data('action') != 'none') { 33 | $(content).show(); 34 | $(a).removeClass("collapsed"); 35 | } else { 36 | $(a).addClass("collapsed"); 37 | } 38 | 39 | a.on('click', function(e){ 40 | e.preventDefault(); 41 | if ($(this).attr('disabled') || $(this).data('action') == 'none') return; 42 | 43 | if (that.options.closeAny) that._closeFrames(); 44 | 45 | if ($(content).is(":hidden")) { 46 | $(content).slideDown(); 47 | $(this).removeClass("collapsed"); 48 | that._trigger("frame", e, {frame: frame}); 49 | that.options.open(frame); 50 | } else { 51 | $(content).slideUp(); 52 | $(this).addClass("collapsed"); 53 | } 54 | that.options.action(frame); 55 | }); 56 | }); 57 | }, 58 | 59 | _closeFrames: function(){ 60 | this._frames.children(".content").slideUp().parent().children('.heading').addClass("collapsed"); 61 | }, 62 | 63 | _destroy: function(){}, 64 | 65 | _setOption: function(key, value){ 66 | this._super('_setOption', key, value); 67 | } 68 | }) 69 | })( jQuery ); 70 | 71 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-button-set.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | $.widget("metro.buttonset", { 3 | 4 | version: "1.0.0", 5 | 6 | options: { 7 | click: function(btn, on){} 8 | }, 9 | 10 | _buttons: {}, 11 | 12 | _create: function(){ 13 | var element = this.element; 14 | 15 | this._buttons = element.find("button, .button"); 16 | 17 | this.init(); 18 | }, 19 | 20 | init: function(){ 21 | var that = this; 22 | 23 | this._buttons.each(function(){ 24 | var btn = $(this); 25 | 26 | btn.on('click', function(e){ 27 | e.preventDefault(); 28 | btn.toggleClass("active"); 29 | 30 | that.options.click(btn, btn.hasClass("active")); 31 | that._trigger("click", null, {button: btn, on: (btn.hasClass("active"))}); 32 | }); 33 | }); 34 | }, 35 | 36 | _destroy: function(){}, 37 | 38 | _setOption: function(key, value){ 39 | this._super('_setOption', key, value); 40 | } 41 | }) 42 | })( jQuery ); 43 | 44 | (function( $ ) { 45 | $.widget("metro.buttongroup", { 46 | 47 | version: "1.0.0", 48 | 49 | options: { 50 | click: function(btn, on){} 51 | }, 52 | 53 | _buttons: {}, 54 | 55 | _create: function(){ 56 | var element = this.element; 57 | 58 | this._buttons = element.find("button, .button"); 59 | 60 | this.init(); 61 | }, 62 | 63 | init: function(){ 64 | var that = this; 65 | 66 | this._buttons.each(function(){ 67 | var btn = $(this); 68 | 69 | btn.on('click', function(e){ 70 | e.preventDefault(); 71 | that._buttons.removeClass("active"); 72 | btn.addClass("active"); 73 | 74 | that.options.click(btn, btn.hasClass("active")); 75 | that._trigger("click", null, {button: btn, on: (btn.hasClass("active"))}); 76 | }); 77 | }); 78 | }, 79 | 80 | _destroy: function(){}, 81 | 82 | _setOption: function(key, value){ 83 | this._super('_setOption', key, value); 84 | } 85 | }) 86 | })( jQuery ); 87 | 88 | 89 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-core.js: -------------------------------------------------------------------------------- 1 | 2 | (function($){ 3 | $.Metro = function(params){ 4 | params = $.extend({ 5 | }, params); 6 | }; 7 | 8 | $.Metro.getDeviceSize = function(){ 9 | var device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width; 10 | var device_height = (window.innerHeight > 0) ? window.innerHeight : screen.height; 11 | return { 12 | width: device_width, 13 | height: device_height 14 | } 15 | } 16 | 17 | })(jQuery); 18 | 19 | $(function(){ 20 | $('html').on('click', function(e){ 21 | $('.dropdown-menu').each(function(i, el){ 22 | if (!$(el).hasClass('keep-open') && $(el).css('display')=='block') { 23 | $(el).hide(); 24 | } 25 | }); 26 | }); 27 | }); 28 | 29 | $(function(){ 30 | $(window).on('resize', function(){ 31 | if (METRO_DIALOG) { 32 | var top = ($(window).height() - METRO_DIALOG.outerHeight()) / 2; 33 | var left = ($(window).width() - METRO_DIALOG.outerWidth()) / 2; 34 | METRO_DIALOG.css({ 35 | top: top, left: left 36 | }); 37 | } 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-drag-tile.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | $.widget("metro.dragtile", { 3 | 4 | version: "1.0.0", 5 | 6 | options: { 7 | }, 8 | 9 | _create: function(){ 10 | var that = this, element = tile = this.element, 11 | area = element.parents('.tile-area'), 12 | tiles = area.find(".tile"), 13 | groups = area.find(".tile-group"); 14 | 15 | tile.attr("draggable", "true"); 16 | 17 | addTouchEvents(tile[0]); 18 | 19 | tile[0].addEventListener('dragstart', this._dragStart, false); 20 | tile[0].addEventListener('dragend', this._dragEnd, false); 21 | 22 | tile.on('mousedown', function(e){ 23 | }); 24 | 25 | tile.on('mouseup', function(e){ 26 | }); 27 | }, 28 | 29 | _dragStart: function(e){ 30 | $(this).css('opacity',.4); 31 | }, 32 | 33 | _dragEnd: function(e){ 34 | $(this).css('opacity',1); 35 | }, 36 | 37 | _destroy: function(){ 38 | 39 | }, 40 | 41 | _setOption: function(key, value){ 42 | this._super('_setOption', key, value); 43 | } 44 | }) 45 | })( jQuery ); 46 | 47 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-fluentmenu.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | $.widget("metro.fluentmenu", { 3 | 4 | version: "1.0.0", 5 | 6 | options: { 7 | onSpecialClick: function(e, el){}, 8 | onTabClick: function(e, el){} 9 | }, 10 | 11 | _create: function(){ 12 | var that = this, element = this.element, o = this.options, 13 | tabs = element.find('.tabs-holder > li > a'); 14 | 15 | this._hidePanels(); 16 | this._showPanel(); 17 | 18 | tabs.on('click', function(e){ 19 | if ($(this).parent('li').hasClass('special')) { 20 | o.onSpecialClick(e, $(this)); 21 | } else { 22 | var panel = $($(this).attr('href')); 23 | 24 | that._hidePanels(); 25 | that._showPanel(panel); 26 | element.find('.tabs-holder > li').removeClass('active'); 27 | $(this).parent('li').addClass('active'); 28 | 29 | o.onTabClick(e, $(this)); 30 | } 31 | e.preventDefault(); 32 | }); 33 | }, 34 | 35 | _hidePanels: function(){ 36 | this.element.find('.tab-panel').hide(); 37 | }, 38 | 39 | _showPanel: function(panel){ 40 | if (panel == undefined) { 41 | panel = this.element.find('.tabs-holder li.active a').attr('href'); 42 | } 43 | $(panel).show(); 44 | }, 45 | 46 | _destroy: function(){ 47 | 48 | }, 49 | 50 | _setOption: function(key, value){ 51 | this._super('_setOption', key, value); 52 | } 53 | }) 54 | })( jQuery ); 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-global.js: -------------------------------------------------------------------------------- 1 | var METRO_AUTO_REINIT; 2 | var METRO_LOCALE; 3 | var METRO_WEEK_START; 4 | var METRO_DIALOG = false; 5 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-listview.js: -------------------------------------------------------------------------------- 1 | (function( $ ) { 2 | $.widget("metro.listview", { 3 | 4 | version: "1.0.0", 5 | 6 | options: { 7 | onGroupExpand: function(g){}, 8 | onGroupCollapse: function(g){}, 9 | onListClick: function(l){} 10 | }, 11 | 12 | _create: function(){ 13 | var that = this, element = this.element; 14 | 15 | element.children('.collapsed').children('.group-content').hide(); 16 | 17 | element.find('.group-title').on('click', function(e){ 18 | var $this = $(this), 19 | group = $this.parent('.list-group'), 20 | group_content = group.children('.group-content'); 21 | 22 | group.toggleClass('collapsed'); 23 | 24 | if (group.hasClass('collapsed')) { 25 | group_content.slideUp(); 26 | that.options.onGroupCollapse(group); 27 | } else { 28 | group_content.slideDown(); 29 | that.options.onGroupExpand(group); 30 | } 31 | 32 | e.preventDefault(); 33 | }); 34 | 35 | element.find('.list').on('click', function(e){ 36 | element.find('.list').removeClass('active'); 37 | $(this).toggleClass('active'); 38 | that.options.onListClick($(this)); 39 | e.preventDefault(); 40 | }); 41 | }, 42 | 43 | _destroy: function(){ 44 | 45 | }, 46 | 47 | _setOption: function(key, value){ 48 | this._super('_setOption', key, value); 49 | } 50 | }) 51 | })( jQuery ); 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/SourceBrowser.Site/js/metro/metro-loader.js: -------------------------------------------------------------------------------- 1 | var plugins = [ 2 | 'global', 3 | 'core', 4 | 'locale', 5 | 'touch-handler', 6 | 7 | 'accordion', 8 | 'button-set', 9 | 'date-format', 10 | 'calendar', 11 | 'datepicker', 12 | 'carousel', 13 | 'countdown', 14 | 'dropdown', 15 | 'input-control', 16 | 'live-tile', 17 | 18 | 'progressbar', 19 | 'rating', 20 | 'slider', 21 | 'tab-control', 22 | 'table', 23 | 'times', 24 | 'dialog', 25 | 'notify', 26 | 'listview', 27 | 'treeview', 28 | 'fluentmenu', 29 | 'hint', 30 | 'streamer', 31 | 'stepper', 32 | 'drag-tile', 33 | 'scroll', 34 | 'pull', 35 | 'wizard', 36 | 'panel', 37 | 'tile-transform', 38 | 39 | 'initiator' 40 | 41 | 42 | ]; 43 | 44 | $.each(plugins, function(i, plugin){ 45 | $("