From bd097b0eff2a7099b73cb80d5a17c85f9b42a218 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Tue, 21 Oct 2008 22:13:16 +0200 Subject: [PATCH] HTML: Restructure html folder This changes the HTML part of GitX to be more consistent -- we now use a "views" directory where every web view has it's own directory. Furthermore, GitX-wide Javascript is added in the "lib" directory. The same is true for CSS in the "css" directory. Every view can have its own custom CSS and JS, and those are put in the views directory (without JS or CSS prefix directories). --- GitX.xcodeproj/project.pbxproj | 73 +++++------------- PBWebChangesController.m | 2 +- PBWebController.m | 4 +- PBWebDiffController.m | 2 +- PBWebHistoryController.m | 2 +- html/css/GitX.css | 1 + html/{diff_style.css => css/diff.css} | 7 -- html/diff.html | 63 --------------- html/diff.js | 0 {Images => html/images}/spinner.gif | Bin html/{ => lib}/GitX.js | 21 ++++- html/{ => lib}/diffHighlighter.js | 0 html/{ => lib}/keyboardNavigation.js | 0 html/{ => lib}/md5.js | 0 html/simpleDiff.html | 19 ----- html/views/commit/commit.css | 19 +++++ html/views/commit/commit.js | 25 ++++++ html/views/commit/index.html | 27 +++++++ html/views/diff/index.html | 21 +++++ .../history/history.css} | 6 +- html/{commit.js => views/history/history.js} | 19 ----- .../{commit.html => views/history/index.html} | 17 ++-- 22 files changed, 153 insertions(+), 175 deletions(-) create mode 100644 html/css/GitX.css rename html/{diff_style.css => css/diff.css} (89%) delete mode 100644 html/diff.html delete mode 100644 html/diff.js rename {Images => html/images}/spinner.gif (100%) rename html/{ => lib}/GitX.js (59%) rename html/{ => lib}/diffHighlighter.js (100%) rename html/{ => lib}/keyboardNavigation.js (100%) rename html/{ => lib}/md5.js (100%) delete mode 100644 html/simpleDiff.html create mode 100644 html/views/commit/commit.css create mode 100644 html/views/commit/commit.js create mode 100644 html/views/commit/index.html create mode 100644 html/views/diff/index.html rename html/{commits.css => views/history/history.css} (95%) rename html/{commit.js => views/history/history.js} (91%) rename html/{commit.html => views/history/index.html} (60%) diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index 9e2a2f7..5f8b284 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3F0851D10EA52E4300C26EE5 /* md5.js in Resources */ = {isa = PBXBuildFile; fileRef = 3F0851CD0EA52D8E00C26EE5 /* md5.js */; }; 770B37ED0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 770B37EC0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel */; }; 77C8280E06725ACE000B614F /* ApplicationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77C8280C06725ACE000B614F /* ApplicationController.m */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; @@ -23,7 +22,6 @@ 93CB42C20EAB7B2200530609 /* PBGitDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB42C10EAB7B2200530609 /* PBGitDefaults.m */; }; 93F7857F0EA3ABF100C1F443 /* PBCommitMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F7857E0EA3ABF100C1F443 /* PBCommitMessageView.m */; }; D26DC6450E782C9000C777B2 /* gitx.icns in Resources */ = {isa = PBXBuildFile; fileRef = D26DC6440E782C9000C777B2 /* gitx.icns */; }; - F504F6970EAB73B300067F56 /* GitX.js in Resources */ = {isa = PBXBuildFile; fileRef = F504F6960EAB73B300067F56 /* GitX.js */; }; F50FE0E30E07BE9600854FCD /* PBGitRevisionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F50FE0E20E07BE9600854FCD /* PBGitRevisionCell.m */; }; F513085B0E0740F2000C8BCD /* PBQLOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = F513085A0E0740F2000C8BCD /* PBQLOutlineView.m */; }; F5140DC90E8A8EB20091E9F3 /* RoundedRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = F5140DC80E8A8EB20091E9F3 /* RoundedRectangle.m */; }; @@ -33,27 +31,21 @@ F53C4DF80E97FCA70022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; }; F53C4DF90E97FCAD0022AD59 /* PBEasyPipe.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */; }; F53FF2050E7ABB5300389171 /* PBGitRevSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */; }; - F561727F0E056A11001DCD79 /* diff_style.css in Resources */ = {isa = PBXBuildFile; fileRef = F561727C0E056A11001DCD79 /* diff_style.css */; }; - F56173280E056ED2001DCD79 /* diffHighlighter.js in Resources */ = {isa = PBXBuildFile; fileRef = F56173270E056ED2001DCD79 /* diffHighlighter.js */; }; F56174570E058893001DCD79 /* PBGitTree.m in Sources */ = {isa = PBXBuildFile; fileRef = F56174560E058893001DCD79 /* PBGitTree.m */; }; F561777D0E05C88E001DCD79 /* DetailView.png in Resources */ = {isa = PBXBuildFile; fileRef = F561777C0E05C88E001DCD79 /* DetailView.png */; }; - F561E6CD0E7AFDDF00521636 /* keyboardNavigation.js in Resources */ = {isa = PBXBuildFile; fileRef = F561E6CB0E7AFDD000521636 /* keyboardNavigation.js */; }; F56244090E9684B0002B6C44 /* PBUnsortableTableHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = F56244080E9684B0002B6C44 /* PBUnsortableTableHeader.m */; }; F56524BB0E02D22D00F03B52 /* NSFileHandleExt.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */; }; F56524F00E02D45200F03B52 /* PBGitCommit.m in Sources */ = {isa = PBXBuildFile; fileRef = F56524EF0E02D45200F03B52 /* PBGitCommit.m */; }; F56526240E03D85900F03B52 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F56526230E03D85900F03B52 /* WebKit.framework */; }; F565262B0E03D89B00F03B52 /* PBWebHistoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = F565262A0E03D89B00F03B52 /* PBWebHistoryController.m */; }; - F565265A0E03E71B00F03B52 /* commit.html in Resources */ = {isa = PBXBuildFile; fileRef = F56526590E03E71B00F03B52 /* commit.html */; }; F56CC7290E65E0AD004307B4 /* PBGitGraphLine.m in Sources */ = {isa = PBXBuildFile; fileRef = F56CC7280E65E0AD004307B4 /* PBGitGraphLine.m */; }; F56CC7320E65E0E5004307B4 /* PBGraphCellInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = F56CC7310E65E0E5004307B4 /* PBGraphCellInfo.m */; }; F57240BB0E9678EA00D8EE66 /* deleted_file.png in Resources */ = {isa = PBXBuildFile; fileRef = F57240BA0E9678EA00D8EE66 /* deleted_file.png */; }; F574A2910EAE2FF4003F2CB1 /* PBGitConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 93FCCBA80EA8AF450061B02B /* PBGitConfig.m */; }; - F57ABE0B0E0442DD00A088B8 /* commit.js in Resources */ = {isa = PBXBuildFile; fileRef = F57ABDDE0E0441DE00A088B8 /* commit.js */; }; F57CC3910E05DDF2000472E2 /* PBEasyPipe.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */; }; F57CC4410E05E496000472E2 /* PBGitWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC4400E05E496000472E2 /* PBGitWindowController.m */; }; F580E6AE0E733276009E2D3F /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F580E6AD0E733276009E2D3F /* Sparkle.framework */; }; F580E6B10E73328C009E2D3F /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F580E6AD0E733276009E2D3F /* Sparkle.framework */; }; - F58A8F280E043698007E3FC0 /* commits.css in Resources */ = {isa = PBXBuildFile; fileRef = F58A8F270E043698007E3FC0 /* commits.css */; }; F59116E60E843BB50072CCB1 /* PBGitCommitView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */; }; F59116E90E843BCB0072CCB1 /* PBGitCommitController.m in Sources */ = {isa = PBXBuildFile; fileRef = F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */; }; F593DF780E9E636C003A8559 /* PBFileChangesTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = F593DF770E9E636C003A8559 /* PBFileChangesTableView.m */; }; @@ -70,11 +62,8 @@ F5E926060E8827D300056E75 /* PBViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E926050E8827D300056E75 /* PBViewController.m */; }; F5E927F80E883E7200056E75 /* PBChangedFile.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E927F70E883E7200056E75 /* PBChangedFile.m */; }; F5E927FC0E883F0700056E75 /* PBWebChangesController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E927FB0E883F0700056E75 /* PBWebChangesController.m */; }; - F5E9281D0E8840CF00056E75 /* diff.html in Resources */ = {isa = PBXBuildFile; fileRef = F5E9281C0E8840CF00056E75 /* diff.html */; }; - F5E928550E8841FB00056E75 /* diff.js in Resources */ = {isa = PBXBuildFile; fileRef = F5E928540E8841FB00056E75 /* diff.js */; }; F5E92A1B0E88550E00056E75 /* empty_file.png in Resources */ = {isa = PBXBuildFile; fileRef = F5E92A1A0E88550E00056E75 /* empty_file.png */; }; F5E92A230E88569500056E75 /* new_file.png in Resources */ = {isa = PBXBuildFile; fileRef = F5E92A220E88569500056E75 /* new_file.png */; }; - F5EC2DAD0E8C235C000FA381 /* spinner.gif in Resources */ = {isa = PBXBuildFile; fileRef = F5EC2DAC0E8C235C000FA381 /* spinner.gif */; }; F5EF8C8E0E9D4A5D0050906B /* PBWebController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5EF8C8D0E9D4A5D0050906B /* PBWebController.m */; }; F5FF4E180E0829C20006317A /* PBGitRevList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FF4E170E0829C20006317A /* PBGitRevList.m */; }; F5FF4E7A0E082E440006317A /* PBGitGrapher.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FF4E790E082E440006317A /* PBGitGrapher.m */; }; @@ -110,7 +99,6 @@ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* GitX_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitX_Prefix.pch; sourceTree = ""; }; - 3F0851CD0EA52D8E00C26EE5 /* md5.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = md5.js; path = html/md5.js; sourceTree = ""; }; 770B37EC0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = GitTest_DataModel.xcdatamodel; sourceTree = ""; }; 77C82804067257F0000B614F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 77C8280B06725ACE000B614F /* ApplicationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationController.h; sourceTree = ""; }; @@ -133,7 +121,6 @@ 93F7857E0EA3ABF100C1F443 /* PBCommitMessageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCommitMessageView.m; sourceTree = ""; }; 93FCCBA80EA8AF450061B02B /* PBGitConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitConfig.m; sourceTree = ""; }; D26DC6440E782C9000C777B2 /* gitx.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = gitx.icns; sourceTree = ""; }; - F504F6960EAB73B300067F56 /* GitX.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = GitX.js; path = html/GitX.js; sourceTree = ""; }; F50FE0E10E07BE9600854FCD /* PBGitRevisionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevisionCell.h; sourceTree = ""; }; F50FE0E20E07BE9600854FCD /* PBGitRevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRevisionCell.m; sourceTree = ""; }; F51308590E0740F2000C8BCD /* PBQLOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBQLOutlineView.h; sourceTree = ""; }; @@ -148,12 +135,9 @@ F53EE3590E06BBA00022B925 /* CWQuickLook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CWQuickLook.h; sourceTree = ""; }; F53FF2030E7ABB5300389171 /* PBGitRevSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevSpecifier.h; sourceTree = ""; }; F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRevSpecifier.m; sourceTree = ""; }; - F561727C0E056A11001DCD79 /* diff_style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = diff_style.css; path = html/diff_style.css; sourceTree = ""; }; - F56173270E056ED2001DCD79 /* diffHighlighter.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = diffHighlighter.js; path = html/diffHighlighter.js; sourceTree = ""; }; F56174550E058893001DCD79 /* PBGitTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitTree.h; sourceTree = ""; }; F56174560E058893001DCD79 /* PBGitTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitTree.m; sourceTree = ""; }; F561777C0E05C88E001DCD79 /* DetailView.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DetailView.png; sourceTree = ""; }; - F561E6CB0E7AFDD000521636 /* keyboardNavigation.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = keyboardNavigation.js; path = html/keyboardNavigation.js; sourceTree = ""; }; F56244070E9684B0002B6C44 /* PBUnsortableTableHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBUnsortableTableHeader.h; sourceTree = ""; }; F56244080E9684B0002B6C44 /* PBUnsortableTableHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBUnsortableTableHeader.m; sourceTree = ""; }; F56524B90E02D22D00F03B52 /* NSFileHandleExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSFileHandleExt.m; sourceTree = ""; }; @@ -163,19 +147,16 @@ F56526230E03D85900F03B52 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; F56526290E03D89B00F03B52 /* PBWebHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebHistoryController.h; sourceTree = ""; }; F565262A0E03D89B00F03B52 /* PBWebHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebHistoryController.m; sourceTree = ""; }; - F56526590E03E71B00F03B52 /* commit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = commit.html; path = html/commit.html; sourceTree = ""; }; F56CC7270E65E0AD004307B4 /* PBGitGraphLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitGraphLine.h; sourceTree = ""; }; F56CC7280E65E0AD004307B4 /* PBGitGraphLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitGraphLine.m; sourceTree = ""; }; F56CC7300E65E0E5004307B4 /* PBGraphCellInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGraphCellInfo.h; sourceTree = ""; }; F56CC7310E65E0E5004307B4 /* PBGraphCellInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGraphCellInfo.m; sourceTree = ""; }; F57240BA0E9678EA00D8EE66 /* deleted_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = deleted_file.png; path = Images/deleted_file.png; sourceTree = ""; }; - F57ABDDE0E0441DE00A088B8 /* commit.js */ = {isa = PBXFileReference; explicitFileType = sourcecode.javascript; fileEncoding = 4; name = commit.js; path = html/commit.js; sourceTree = ""; }; F57CC38F0E05DDF2000472E2 /* PBEasyPipe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBEasyPipe.h; sourceTree = ""; }; F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBEasyPipe.m; sourceTree = ""; }; F57CC43F0E05E496000472E2 /* PBGitWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitWindowController.h; sourceTree = ""; }; F57CC4400E05E496000472E2 /* PBGitWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitWindowController.m; sourceTree = ""; }; F580E6AD0E733276009E2D3F /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = ""; }; - F58A8F270E043698007E3FC0 /* commits.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = commits.css; path = html/commits.css; sourceTree = ""; }; F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitCommitView.xib; sourceTree = ""; }; F59116E70E843BCB0072CCB1 /* PBGitCommitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommitController.h; sourceTree = ""; }; F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommitController.m; sourceTree = ""; }; @@ -191,6 +172,7 @@ F5C6F68B0E65FF9300478D97 /* PBGitLane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitLane.h; sourceTree = ""; }; F5C6F68C0E65FF9300478D97 /* PBGitLane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitLane.m; sourceTree = ""; }; F5D2DC850EA401A80034AD24 /* PBGitConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitConfig.h; sourceTree = ""; }; + F5D619ED0EAE62EA00341D73 /* html */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = folder; path = html; sourceTree = ""; }; F5DFFA6A0E075D8800617813 /* PBEasyFS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBEasyFS.h; sourceTree = ""; }; F5DFFA6B0E075D8800617813 /* PBEasyFS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBEasyFS.m; sourceTree = ""; }; F5E424100EA3E4D60046E362 /* PBDiffWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBDiffWindow.xib; sourceTree = ""; }; @@ -205,11 +187,8 @@ F5E927F70E883E7200056E75 /* PBChangedFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBChangedFile.m; sourceTree = ""; }; F5E927FA0E883F0700056E75 /* PBWebChangesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebChangesController.h; sourceTree = ""; }; F5E927FB0E883F0700056E75 /* PBWebChangesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebChangesController.m; sourceTree = ""; }; - F5E9281C0E8840CF00056E75 /* diff.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = diff.html; path = html/diff.html; sourceTree = ""; }; - F5E928540E8841FB00056E75 /* diff.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = diff.js; path = html/diff.js; sourceTree = ""; }; F5E92A1A0E88550E00056E75 /* empty_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = empty_file.png; path = Images/empty_file.png; sourceTree = ""; }; F5E92A220E88569500056E75 /* new_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = new_file.png; path = Images/new_file.png; sourceTree = ""; }; - F5EC2DAC0E8C235C000FA381 /* spinner.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; name = spinner.gif; path = Images/spinner.gif; sourceTree = ""; }; F5EF8C8C0E9D4A5D0050906B /* PBWebController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebController.h; sourceTree = ""; }; F5EF8C8D0E9D4A5D0050906B /* PBWebController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebController.m; sourceTree = ""; }; F5FF4E160E0829C20006317A /* PBGitRevList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevList.h; sourceTree = ""; }; @@ -287,7 +266,7 @@ F57CC3850E05DDC1000472E2 /* Controllers */, F561777C0E05C88E001DCD79 /* DetailView.png */, F56174540E05887E001DCD79 /* Git */, - F58A8F250E04368A007E3FC0 /* HTML */, + F5D619ED0EAE62EA00341D73 /* html */, 7756732906782D8800D1FEB8 /* Models */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, @@ -302,7 +281,6 @@ isa = PBXGroup; children = ( F57240BA0E9678EA00D8EE66 /* deleted_file.png */, - F5EC2DAC0E8C235C000FA381 /* spinner.gif */, F5E92A1A0E88550E00056E75 /* empty_file.png */, 32CA4F630368D1EE00C91783 /* GitX_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, @@ -413,23 +391,6 @@ name = Aux; sourceTree = ""; }; - F58A8F250E04368A007E3FC0 /* HTML */ = { - isa = PBXGroup; - children = ( - F504F6960EAB73B300067F56 /* GitX.js */, - 3F0851CD0EA52D8E00C26EE5 /* md5.js */, - F5E928540E8841FB00056E75 /* diff.js */, - F56526590E03E71B00F03B52 /* commit.html */, - F5E9281C0E8840CF00056E75 /* diff.html */, - F561727C0E056A11001DCD79 /* diff_style.css */, - F561E6CB0E7AFDD000521636 /* keyboardNavigation.js */, - F58A8F270E043698007E3FC0 /* commits.css */, - F57ABDDE0E0441DE00A088B8 /* commit.js */, - F56173270E056ED2001DCD79 /* diffHighlighter.js */, - ); - name = HTML; - sourceTree = ""; - }; F5B161BB0EAB6E0C005A1DE1 /* Diff */ = { isa = PBXGroup; children = ( @@ -531,6 +492,7 @@ 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, F580E6BD0E73329C009E2D3F /* CopyFiles */, + F5CF04A20EAE696C00D75C81 /* Copy HTML files */, ); buildRules = ( ); @@ -582,27 +544,16 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F5E928550E8841FB00056E75 /* diff.js in Resources */, - F504F6970EAB73B300067F56 /* GitX.js in Resources */, - 3F0851D10EA52E4300C26EE5 /* md5.js in Resources */, - F561E6CD0E7AFDDF00521636 /* keyboardNavigation.js in Resources */, F5E92A1B0E88550E00056E75 /* empty_file.png in Resources */, 913D5E500E55645900CECEA2 /* gitx in Resources */, 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - F565265A0E03E71B00F03B52 /* commit.html in Resources */, - F56173280E056ED2001DCD79 /* diffHighlighter.js in Resources */, - F561727F0E056A11001DCD79 /* diff_style.css in Resources */, - F57ABE0B0E0442DD00A088B8 /* commit.js in Resources */, - F58A8F280E043698007E3FC0 /* commits.css in Resources */, F561777D0E05C88E001DCD79 /* DetailView.png in Resources */, F5B721C40E05CF7E00AF29DC /* MainMenu.xib in Resources */, 911111E20E58BD5A00BF76B4 /* RepositoryWindow.xib in Resources */, D26DC6450E782C9000C777B2 /* gitx.icns in Resources */, F52BCE030E84208300AA3741 /* PBGitHistoryView.xib in Resources */, F59116E60E843BB50072CCB1 /* PBGitCommitView.xib in Resources */, - F5E9281D0E8840CF00056E75 /* diff.html in Resources */, F5E92A230E88569500056E75 /* new_file.png in Resources */, - F5EC2DAD0E8C235C000FA381 /* spinner.gif in Resources */, F57240BB0E9678EA00D8EE66 /* deleted_file.png in Resources */, F5E424110EA3E4D60046E362 /* PBDiffWindow.xib in Resources */, ); @@ -610,6 +561,24 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + F5CF04A20EAE696C00D75C81 /* Copy HTML files */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + comments = "This is added as a script rather than a 'copy files' phase because those aren't updated correctly when you edit just a single file in a directory.\n\nThis might be improved further by using rsync, but I didn't dive into that yet."; + files = ( + ); + inputPaths = ( + ); + name = "Copy HTML files"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "resource_path=$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\nrm -rf $resource_path/html\ncp -r html $resource_path"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/PBWebChangesController.m b/PBWebChangesController.m index d3ba89f..40ec2e5 100644 --- a/PBWebChangesController.m +++ b/PBWebChangesController.m @@ -12,7 +12,7 @@ - (void) awakeFromNib { - startFile = @"diff"; + startFile = @"commit"; [super awakeFromNib]; [unstagedFilesController addObserver:self forKeyPath:@"selection" options:0 context:@"UnstagedFileSelected"]; diff --git a/PBWebController.m b/PBWebController.m index a321578..dcc3429 100644 --- a/PBWebController.m +++ b/PBWebController.m @@ -15,7 +15,9 @@ - (void) awakeFromNib { - NSString* file = [[NSBundle mainBundle] pathForResource:startFile ofType:@"html"]; + NSString *path = [NSString stringWithFormat:@"html/views/%@", startFile]; + NSString* file = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:path]; + NSLog(@"path: %@, file: %@", path, file); NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:file]]; finishedLoading = NO; diff --git a/PBWebDiffController.m b/PBWebDiffController.m index 141961a..e2f14d2 100644 --- a/PBWebDiffController.m +++ b/PBWebDiffController.m @@ -13,7 +13,7 @@ - (void) awakeFromNib { - startFile = @"simpleDiff"; + startFile = @"diff"; [super awakeFromNib]; [diffController addObserver:self forKeyPath:@"diff" options:0 context:@"ChangedDiff"]; } diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m index 14bdf82..624935a 100644 --- a/PBWebHistoryController.m +++ b/PBWebHistoryController.m @@ -24,7 +24,7 @@ - (void) awakeFromNib { - startFile = @"commit"; + startFile = @"history"; [super awakeFromNib]; [historyController addObserver:self forKeyPath:@"webCommit" options:0 context:@"ChangedCommit"]; } diff --git a/html/css/GitX.css b/html/css/GitX.css new file mode 100644 index 0000000..f94254e --- /dev/null +++ b/html/css/GitX.css @@ -0,0 +1 @@ +@import url("diff.css"); \ No newline at end of file diff --git a/html/diff_style.css b/html/css/diff.css similarity index 89% rename from html/diff_style.css rename to html/css/diff.css index 2298ac1..d7fd572 100644 --- a/html/diff_style.css +++ b/html/css/diff.css @@ -29,13 +29,6 @@ pre code { width: 100%; } -#message { - margin: 5px; - margin-left: 20px; - font-family: Monaco; - width: auto; -} - #CurrentHunk { border-left: 5px solid black; } diff --git a/html/diff.html b/html/diff.html deleted file mode 100644 index 1c856cf..0000000 --- a/html/diff.html +++ /dev/null @@ -1,63 +0,0 @@ - - - Diff for file - - - - - - - - - - - -

Nothing to commit

- -
Nothing to commit (working directory clean)
- diff --git a/html/diff.js b/html/diff.js deleted file mode 100644 index e69de29..0000000 diff --git a/Images/spinner.gif b/html/images/spinner.gif similarity index 100% rename from Images/spinner.gif rename to html/images/spinner.gif diff --git a/html/GitX.js b/html/lib/GitX.js similarity index 59% rename from html/GitX.js rename to html/lib/GitX.js index 419e8b5..a758288 100644 --- a/html/GitX.js +++ b/html/lib/GitX.js @@ -24,4 +24,23 @@ Array.prototype.indexOf = function(item, i) { for (; i < length; i++) if (this[i] === item) return i; return -1; -}; \ No newline at end of file +}; + +var notify = function(text, state) { + var n = $("notification"); + n.style.display = ""; + $("notification_message").innerHTML = text; + + // Change color + if (!state) { // Busy + $("spinner").style.display = ""; + n.setAttribute("class", ""); + } + else if (state == 1) { // Success + $("spinner").style.display = "none"; + n.setAttribute("class", "success"); + } else if (state == -1) {// Fail + $("spinner").style.display = "none"; + n.setAttribute("class", "fail"); + } +} diff --git a/html/diffHighlighter.js b/html/lib/diffHighlighter.js similarity index 100% rename from html/diffHighlighter.js rename to html/lib/diffHighlighter.js diff --git a/html/keyboardNavigation.js b/html/lib/keyboardNavigation.js similarity index 100% rename from html/keyboardNavigation.js rename to html/lib/keyboardNavigation.js diff --git a/html/md5.js b/html/lib/md5.js similarity index 100% rename from html/md5.js rename to html/lib/md5.js diff --git a/html/simpleDiff.html b/html/simpleDiff.html deleted file mode 100644 index 1130b3d..0000000 --- a/html/simpleDiff.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Details for commit - - - - - - - - -
- diff --git a/html/views/commit/commit.css b/html/views/commit/commit.css new file mode 100644 index 0000000..3a0b322 --- /dev/null +++ b/html/views/commit/commit.css @@ -0,0 +1,19 @@ +body { + padding: 0px; + margin: 0px; + margin-top: 20px; +} + +#title { + padding: 0px; + padding-left: 5px; + border-bottom: 1px solid black; + margin: 0px; + font-weight: 500; + background-color: #ECF3FD; + font-size: 100%; + position: fixed; + font-family: Helvetica; + top: 0px; + width: 100%; +} diff --git a/html/views/commit/commit.js b/html/views/commit/commit.js new file mode 100644 index 0000000..036bae3 --- /dev/null +++ b/html/views/commit/commit.js @@ -0,0 +1,25 @@ +var showFileChanges = function(file, cached) { + // New file? + var diff = $("diff"); + + if (file.status == 0) + { + var contents = file.unstagedChanges(); + if (contents) + diff.innerHTML = contents.escapeHTML(); + else + diff.innerHTML = "Could not display changes"; + + diff.style.display= ''; + $('title').innerHTML = "New file: " + file.path; + } else { + diff.style.display = 'none'; + if (cached) + diff.innerHTML = file.cachedChangesAmend_(Controller.amend()).escapeHTML(); + else + diff.innerHTML = file.unstagedChanges().escapeHTML(); + highlightDiffs(); + diff.style.display = ''; + $("title").innerHTML = "Changes for " + file.path; + } +} diff --git a/html/views/commit/index.html b/html/views/commit/index.html new file mode 100644 index 0000000..208dc99 --- /dev/null +++ b/html/views/commit/index.html @@ -0,0 +1,27 @@ + + + Diff for file + + + + + + + + + + + +

Nothing to commit

+ + + +
+		
+			Nothing to commit (working directory clean)
+		
+	
+ diff --git a/html/views/diff/index.html b/html/views/diff/index.html new file mode 100644 index 0000000..2395868 --- /dev/null +++ b/html/views/diff/index.html @@ -0,0 +1,21 @@ + + + Details for commit + + + + + + + + + + +

+	
+ diff --git a/html/commits.css b/html/views/history/history.css similarity index 95% rename from html/commits.css rename to html/views/history/history.css index 3eb801f..d0819e2 100644 --- a/html/commits.css +++ b/html/views/history/history.css @@ -79,8 +79,10 @@ a.servicebutton{ } #message { - font-family: Helvetica; - margin-left: 0px; + font-family: Monaco; + margin: 5px; + margin-left: 20px; + width: auto; font-size: 12px; } diff --git a/html/commit.js b/html/views/history/history.js similarity index 91% rename from html/commit.js rename to html/views/history/history.js index 98fda71..ac325ed 100644 --- a/html/commit.js +++ b/html/views/history/history.js @@ -37,25 +37,6 @@ var Commit = function(obj) { } }; -var notify = function(text, state) { - var n = $("notification"); - n.style.display = ""; - $("notification_message").innerHTML = text; - - // Change color - if (!state) { // Busy - $("spinner").style.display = ""; - n.setAttribute("class", ""); - } - else if (state == 1) { // Success - $("spinner").style.display = "none"; - n.setAttribute("class", "success"); - } else if (state == -1) {// Fail - $("spinner").style.display = "none"; - n.setAttribute("class", "fail"); - } -} - var gistie = function() { notify("Uploading code to Gistie..", 0); diff --git a/html/commit.html b/html/views/history/index.html similarity index 60% rename from html/commit.html rename to html/views/history/index.html index 2b76fcc..9f24af1 100644 --- a/html/commit.html +++ b/html/views/history/index.html @@ -1,13 +1,14 @@ Details for commit - - - - - - - + + + + + + + + @@ -42,7 +43,7 @@