diff --git a/English.lproj/RepositoryWindow.xib b/English.lproj/RepositoryWindow.xib index 9b1d7f1..9baf874 100644 --- a/English.lproj/RepositoryWindow.xib +++ b/English.lproj/RepositoryWindow.xib @@ -2,17 +2,17 @@ 1050 - 10F569 - 804 - 1038.29 - 461.00 + 10J567 + 788 + 1038.35 + 462.00 com.apple.InterfaceBuilder.CocoaPlugin - 804 + 788 YES - + YES @@ -58,6 +58,7 @@ 41FA1145-D953-446F-B6DF-0230885AB433 7A8FEE7B-B273-4AF3-8A22-53A9DAF786FA B15C57F2-985F-4446-9A29-34C76DBA9042 + D43D38AE-6110-463C-8514-FC8ACC0F327C FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC NSToolbarFlexibleSpaceItem NSToolbarSeparatorItem @@ -92,9 +93,10 @@ Clone Repository To - + 268 {{38, 14}, {40, 25}} + YES -2080244224 @@ -137,9 +139,10 @@ Refresh - + 268 {{8, 14}, {32, 25}} + YES -2080244224 @@ -170,6 +173,67 @@ YES 0 + + + D43D38AE-6110-463C-8514-FC8ACC0F327C + + View + View + + + + 268 + {{0, 14}, {94, 25}} + + YES + + 67239424 + 0 + + LucidaGrande + 13 + 16 + + + + YES + + 44 + + NSImage + sidebar_Template + + + YES + 2 + + + 43 + + NSImage + list_Template + + + 1 + YES + 0 + + + 1 + 2 + + + + + + {94, 25} + {94, 25} + YES + YES + 0 + YES + 0 + FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC @@ -287,11 +351,14 @@ + YES + + @@ -520,6 +587,14 @@ 419 + + + changeLayout: + + + + 423 + @@ -603,6 +678,7 @@ + @@ -719,6 +795,29 @@ Content SplitView + + 422 + + + YES + + + + + + 420 + + + YES + + + + + + 421 + + + @@ -757,6 +856,12 @@ 415.IBPluginDependency 416.IBPluginDependency 417.IBPluginDependency + 420.IBPluginDependency + 420.IBSegmentedControlTracker.RoundRobinState + 420.IBSegmentedControlTracker.WasGrowing + 421.IBPluginDependency + 421.IBSegmentedControlInspectorSelectedSegmentMetadataKey + 422.toolbarItem.selectable 5.IBPluginDependency 5.ImportedFromIB2 @@ -779,7 +884,7 @@ AUM5AAAAAAAAA com.apple.InterfaceBuilder.CocoaPlugin - {{347, 1169}, {616, 0}} + {{207, 573}, {616, 227}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -801,6 +906,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin @@ -820,7 +931,7 @@ - 419 + 423 @@ -832,6 +943,13 @@ NSApplication+GitXScripting.h + + NSCell + + IBProjectSource + View/CellTrackingRect.h + + PBGitWindowController NSWindowController @@ -839,6 +957,7 @@ YES YES + changeLayout: cloneTo: openInTerminal: refresh: @@ -854,12 +973,14 @@ id id id + id YES YES + changeLayout: cloneTo: openInTerminal: refresh: @@ -869,6 +990,10 @@ YES + + changeLayout: + id + cloneTo: id @@ -1349,6 +1474,13 @@ QuartzCore.framework/Headers/CIImageProvider.h + + NSObject + + IBFrameworkSource + ScriptingBridge.framework/Headers/SBApplication.h + + NSObject @@ -1456,6 +1588,22 @@ AppKit.framework/Headers/NSResponder.h + + NSSegmentedCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSSegmentedCell.h + + + + NSSegmentedControl + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSSegmentedControl.h + + NSSplitView NSView @@ -1587,6 +1735,8 @@ NSMenuCheckmark NSMenuMixedState NSRefreshTemplate + list_Template + sidebar_Template YES @@ -1594,6 +1744,8 @@ {9, 8} {7, 2} {10, 12} + {16, 16} + {16, 16} diff --git a/GLFileView.h b/GLFileView.h index 7dd9125..a734dd0 100644 --- a/GLFileView.h +++ b/GLFileView.h @@ -40,6 +40,7 @@ +(BOOL)isBinaryFile:(NSString *)line; +(NSString*)mimeTypeForFileName:(NSString*)file; +(BOOL)isImage:(NSString*)file; ++(BOOL)isDiffHeader:(NSString*)line; @property(retain) NSMutableArray *groups; @property(retain) NSString *logFormat; diff --git a/GLFileView.m b/GLFileView.m index 4999df4..a35b3bf 100644 --- a/GLFileView.m +++ b/GLFileView.m @@ -125,7 +125,7 @@ } } -#if 1 +#ifdef DEBUG_BUILD NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML]; NSString *tmpFile=@"~/tmp/test.html"; [dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil]; @@ -274,61 +274,27 @@ NSArray *lines = [txt componentsSeparatedByString:@"\n"]; NSString *line; NSMutableString *res=[NSMutableString string]; - BOOL inDiff=FALSE; - BOOL inBlock=FALSE; - + int l_line,l_end; int r_line,r_end; - int i; - for (i=0; i<[lines count]; i++) { + + int i=0; + do { line=[lines objectAtIndex:i]; - - if([GLFileView isStartBlock:line]){ - [res appendString:@""]; - inDiff=FALSE; - NSString *header=[line substringFromIndex:3]; - NSRange hr = NSMakeRange(0, [header rangeOfString:@" @@"].location); - header=[header substringWithRange:hr]; - - NSArray *pos=[header componentsSeparatedByString:@" "]; - NSArray *pos_l=[[pos objectAtIndex:0] componentsSeparatedByString:@","]; - NSArray *pos_r=[[pos objectAtIndex:1] componentsSeparatedByString:@","]; - - l_end=l_line=abs([[pos_l objectAtIndex:0]integerValue]); - if ([pos_l count]>1) { - l_end=l_line+[[pos_l objectAtIndex:1]integerValue]; - } - - r_end=r_line=[[pos_r objectAtIndex:0]integerValue]; - if ([pos_r count]>1) { - r_end=r_line+[[pos_r objectAtIndex:1]integerValue]; - } - - [res appendString:[NSString stringWithFormat:@"%@",line]]; - inBlock=TRUE; - }else if(inBlock){ - NSString *s=[line substringToIndex:1]; - if([s isEqualToString:@" "]){ - [res appendString:[NSString stringWithFormat:@"%d%d",l_line++,r_line++]]; - }else if([s isEqualToString:@"-"]){ - [res appendString:[NSString stringWithFormat:@"%d",l_line++]]; - }else if([s isEqualToString:@"+"]){ - [res appendString:[NSString stringWithFormat:@"%d",r_line++]]; - } - [res appendString:[NSString stringWithFormat:@"%@",[line substringFromIndex:1]]]; - if(!(l_line"]; - inDiff=TRUE; + if([GLFileView isStartDiff:line]){ NSString *fileName=[self getFileName:line]; - [res appendString:[NSString stringWithFormat:@"
",fileName]]; - [res appendString:[NSString stringWithFormat:@"

%@

",line]]; - }else if(inDiff){ - [res appendString:[NSString stringWithFormat:@"

%@

",line]]; + [res appendString:[NSString stringWithFormat:@""]; + if([self isBinaryFile:line]){ - [res appendString:@""]; NSArray *files=[self getFilesNames:line]; if(![[files objectAtIndex:0] isAbsolutePath]){ [res appendString:[NSString stringWithFormat:@"",[files objectAtIndex:0]]]; @@ -342,11 +308,50 @@ [res appendString:[NSString stringWithFormat:@"",[files objectAtIndex:1]]]; } } + }else{ + do{ + NSString *header=[line substringFromIndex:3]; + NSRange hr = NSMakeRange(0, [header rangeOfString:@" @@"].location); + header=[header substringWithRange:hr]; + + NSArray *pos=[header componentsSeparatedByString:@" "]; + NSArray *pos_l=[[pos objectAtIndex:0] componentsSeparatedByString:@","]; + NSArray *pos_r=[[pos objectAtIndex:1] componentsSeparatedByString:@","]; + + l_end=l_line=abs([[pos_l objectAtIndex:0]integerValue]); + if ([pos_l count]>1) { + l_end=l_line+[[pos_l objectAtIndex:1]integerValue]; + } + + r_end=r_line=[[pos_r objectAtIndex:0]integerValue]; + if ([pos_r count]>1) { + r_end=r_line+[[pos_r objectAtIndex:1]integerValue]; + } + + [res appendString:[NSString stringWithFormat:@"",line]]; + do{ + line=[lines objectAtIndex:++i]; + NSString *s=[line substringToIndex:1]; + if([s isEqualToString:@" "]){ + [res appendString:[NSString stringWithFormat:@"",l_line++,r_line++]]; + }else if([s isEqualToString:@"-"]){ + [res appendString:[NSString stringWithFormat:@"",l_line++]]; + }else if([s isEqualToString:@"+"]){ + [res appendString:[NSString stringWithFormat:@"",r_line++]]; + } + [res appendString:[NSString stringWithFormat:@"",[line substringFromIndex:1]]]; + }while((l_line
",fileName]]; + do{ + [res appendString:[NSString stringWithFormat:@"

%@

",line]]; + line=[lines objectAtIndex:++i]; + }while([GLFileView isDiffHeader:line]); + [res appendString:@"
"]; + if(![self isBinaryFile:line]){ + [res appendString:[NSString stringWithFormat:@"",fileName]]; + } + [res appendString:@"
%@
%@
%d%d
%d
%d%@
"]; + }else { + i++; } - } - if(inDiff) - [res appendString:@"
"]; + }while(i<[lines count]); + return res; } @@ -395,6 +400,12 @@ return mimeType; } ++(BOOL)isDiffHeader:(NSString*)line +{ + unichar c=[line characterAtIndex:0]; + return (c=='i') || (c=='m') || (c=='n') || (c=='d') || (c=='-') || (c=='+'); +} + +(BOOL)isImage:(NSString*)file { NSString *mimeType=[GLFileView mimeTypeForFileName:file]; diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index 53ee770..dc18665 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -60,6 +60,8 @@ 31460CD4124185BA00B90AED /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 31460CAF124185BA00B90AED /* ReadMe.txt */; }; 31460CD5124185BA00B90AED /* Source Code License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 31460CB0124185BA00B90AED /* Source Code License.rtf */; }; 31460CD6124185BA00B90AED /* TODO in Resources */ = {isa = PBXBuildFile; fileRef = 31460CB1124185BA00B90AED /* TODO */; }; + 316E7202131EE9C600AFBB36 /* list_Template.png in Resources */ = {isa = PBXBuildFile; fileRef = 316E7200131EE9C600AFBB36 /* list_Template.png */; }; + 316E7203131EE9C600AFBB36 /* sidebar_Template.png in Resources */ = {isa = PBXBuildFile; fileRef = 316E7201131EE9C600AFBB36 /* sidebar_Template.png */; }; 31DAA7ED1317737100463846 /* gitx_l_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 31DAA7EC1317737100463846 /* gitx_l_pub.pem */; }; 3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; }; 3BC07F4D0ED5A5C5009A7768 /* CommitViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4B0ED5A5C5009A7768 /* CommitViewTemplate.png */; }; @@ -348,6 +350,8 @@ 31460CAF124185BA00B90AED /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; 31460CB0124185BA00B90AED /* Source Code License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "Source Code License.rtf"; sourceTree = ""; }; 31460CB1124185BA00B90AED /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = ""; }; + 316E7200131EE9C600AFBB36 /* list_Template.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = list_Template.png; sourceTree = ""; }; + 316E7201131EE9C600AFBB36 /* sidebar_Template.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sidebar_Template.png; sourceTree = ""; }; 31DAA7EC1317737100463846 /* gitx_l_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gitx_l_pub.pem; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* GitX_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitX_Prefix.pch; sourceTree = ""; }; 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HistoryViewTemplate.png; path = Images/HistoryViewTemplate.png; sourceTree = ""; }; @@ -816,6 +820,8 @@ isa = PBXGroup; children = ( FA8DFF37131AEDD400C0F289 /* Start_iTerm2.applescript */, + 316E7200131EE9C600AFBB36 /* list_Template.png */, + 316E7201131EE9C600AFBB36 /* sidebar_Template.png */, 21025C1012947AB200D87200 /* sourceListAction.png */, 21025C1112947AB200D87200 /* sourceListActionOver.png */, 02B41A5F123E307F00DFC531 /* PBCommitHookFailedSheet.xib */, @@ -1433,6 +1439,8 @@ 212A49AD12A31350009DAFAD /* ignored_file.png in Resources */, 212A49AF12A3135C009DAFAD /* modified_file.png in Resources */, 31DAA7ED1317737100463846 /* gitx_l_pub.pem in Resources */, + 316E7202131EE9C600AFBB36 /* list_Template.png in Resources */, + 316E7203131EE9C600AFBB36 /* sidebar_Template.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/PBGitHistoryController.h b/PBGitHistoryController.h index 93bfea0..d592943 100644 --- a/PBGitHistoryController.h +++ b/PBGitHistoryController.h @@ -27,6 +27,7 @@ IBOutlet PBRefController *refController; IBOutlet NSSearchField *searchField; IBOutlet NSArrayController* commitController; + IBOutlet NSSearchField *filesSearchField; IBOutlet NSTreeController* treeController; IBOutlet NSOutlineView* fileBrowser; NSArray *currentFileBrowserSelectionPath; @@ -57,6 +58,7 @@ } @property (readonly) NSTreeController* treeController; +@property (readonly) PBCollapsibleSplitView *historySplitView; @property (assign) int selectedCommitDetailsIndex; @property (retain) PBGitCommit *webCommit; @property (retain) PBGitTree* gitTree; @@ -93,6 +95,7 @@ // Find/Search methods - (IBAction)selectNext:(id)sender; - (IBAction)selectPrevious:(id)sender; +- (IBAction) updateSearch:(id) sender; - (void) copyCommitInfo; - (void) copyCommitSHA; diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m index e3be741..ab221f1 100644 --- a/PBGitHistoryController.m +++ b/PBGitHistoryController.m @@ -48,6 +48,7 @@ @synthesize searchController; @synthesize commitList; @synthesize treeController; +@synthesize historySplitView; - (void)awakeFromNib { @@ -231,7 +232,8 @@ { if ([(NSString *)context isEqualToString: @"commitChange"]) { [self updateKeys]; - //[self restoreFileBrowserSelection]; + [self restoreFileBrowserSelection]; + [self updateSearch:filesSearchField]; }else if ([(NSString *)context isEqualToString: @"treeChange"]) { [self updateQuicklookForce: NO]; [self saveFileBrowserSelection]; @@ -810,6 +812,32 @@ NSImage *image = [workspace iconForFile:path]; [image setSize:NSMakeSize(15, 15)]; [cell setImage:image]; + + NSColor *textColor = [NSColor blackColor]; + if ([object filterPredicate] && !([[filesSearchField stringValue] length] > 0 && [[object filterPredicate] evaluateWithObject:object])) { + textColor = [NSColor lightGrayColor]; + } + + + [cell setTextColor:textColor]; +} + +#pragma mark - + +- (IBAction) updateSearch:(NSSearchField *) sender { + static NSPredicate *predicateTemplate = nil; + if (!predicateTemplate) { + predicateTemplate = [NSPredicate predicateWithFormat:@"path CONTAINS[c] $SEARCH_STRING"]; + } + + NSString *searchString = [sender stringValue]; + NSPredicate *predicate = nil; + if ([searchString length] > 0) { + predicate = [predicateTemplate predicateWithSubstitutionVariables: + [NSDictionary dictionaryWithObject:searchString forKey:@"SEARCH_STRING"]]; + } + [gitTree setFilterPredicate:predicate]; + [treeController setContent:gitTree.filteredChildren]; } @end diff --git a/PBGitHistoryView.xib b/PBGitHistoryView.xib index 3d02796..1671ac9 100644 --- a/PBGitHistoryView.xib +++ b/PBGitHistoryView.xib @@ -2,10 +2,10 @@ 1050 - 10H574 - 804 + 10J567 + 762 1038.35 - 461.00 + 462.00 YES @@ -15,13 +15,13 @@ YES - 804 - 804 + 762 + 762 YES - + YES @@ -113,7 +113,6 @@ 292 {{267, 3}, {71, 25}} - YES -2080244224 @@ -156,7 +155,6 @@ 268 {{206, 3}, {37, 25}} - YES -2080244224 @@ -181,7 +179,6 @@ 268 {{161, 3}, {37, 25}} - YES -2080244224 @@ -206,7 +203,6 @@ 268 {{116, 3}, {37, 25}} - YES -2080244224 @@ -231,7 +227,6 @@ 268 {{55, 3}, {37, 25}} - YES -2080244224 @@ -256,7 +251,6 @@ 268 {{10, 3}, {37, 25}} - YES -2080244224 @@ -281,7 +275,6 @@ 10 {{0, -2}, {955, 5}} - {0, 0} 67239424 @@ -310,7 +303,6 @@ {{0, 404}, {955, 30}} - PBGitGradientBarView @@ -328,7 +320,6 @@ 10 {{0, 144}, {955, 5}} - {0, 0} 67239424 @@ -361,14 +352,12 @@ 4352 {955, 130} - YES 256 {955, 17} - @@ -376,7 +365,6 @@ -2147483392 {{-26, 0}, {16, 17}} - YES @@ -503,7 +491,7 @@ - d MMMM yyyy HH:mm + MMMM d, yyyy h:mm a NO @@ -632,7 +620,6 @@ {{0, 17}, {955, 130}} - @@ -643,7 +630,6 @@ -2147483392 {{837, 17}, {15, 179}} - _doScroller: 0.87603306770324707 @@ -653,7 +639,6 @@ -2147483392 {{0, 123}, {852, 15}} - 1 _doScroller: @@ -669,7 +654,6 @@ {955, 17} - @@ -679,7 +663,6 @@ {955, 147} - 560 @@ -700,7 +683,6 @@ {{740, 3}, {16, 16}} - 20746 100 @@ -709,7 +691,6 @@ 265 {{765, 2}, {180, 19}} - YES 343014976 @@ -771,7 +752,6 @@ 265 {{714, 3}, {43, 18}} - YES 67239424 @@ -808,7 +788,6 @@ 265 {{630, 5}, {80, 14}} - YES 68288064 @@ -830,7 +809,6 @@ 268 {{49, 2}, {57, 17}} - 1 YES @@ -856,7 +834,6 @@ 268 {{114, 2}, {103, 17}} - 2 YES @@ -878,7 +855,6 @@ 268 {{11, 2}, {30, 17}} - YES 67239424 @@ -897,13 +873,11 @@ {{0, 147}, {955, 24}} - PBGitGradientBarView {955, 171} - NSView @@ -916,7 +890,6 @@ 18 {955, 233} - YES @@ -995,114 +968,184 @@ 4370 YES - + - 4372 + 274 YES - - - 2304 - - YES - - - 4368 - {216, 233} - - - YES - - - 256 - {{223, 0}, {16, 17}} - - + + + 266 + {{5, 212.5}, {196, 19}} + + YES + + 343014976 + 268698624 + + + LucidaGrande + 9 + 3614 + + + YES + 1 + + + + 130560 + 0 + search + + _searchFieldSearch: + + 138690815 + 0 + + 400 + 75 + + + 130560 + 0 + clear + YES - - 213 - 16 - 1000 - - 75628096 - 2048 - - - - 3 - MC4zMzMzMzI5ODU2AA - - + + YES + + YES + AXDescription + NSAccessibilityEncodedAttributesValueType - - 337772096 - 2048 - Text Cell - - - - + + YES + cancel + - 3 - YES - - 3 - 2 - - - 17 - -624951296 - - - 4 - 15 - 0 - YES - 0 + + _searchFieldCancel: + + 138690815 + 0 + + 400 + 75 + + 255 + + + + + 4370 + + YES + + + 2304 + + YES + + + 4368 + {190, 208} + + YES + + + 256 + {{223, 0}, {16, 17}} + + + YES + + 187 + 16 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + + 3 + 2 + + + 17 + -624951296 + + + 4 + 15 + 0 + YES + 0 + + + {{1, 1}, {190, 208}} + + + + + 4 + + + + 256 + {{191, 1}, {15, 208}} + + + _doScroller: + 0.98701298701298701 + + + + -2147483392 + {{-100, -100}, {502, 15}} + + 1 + + _doScroller: + 0.0045045050792396069 + 0.99801188707351685 - {{1, 1}, {216, 233}} - - - - - - 4 - - - - 256 - {{217, 1}, {15, 233}} - - - - _doScroller: - 0.99481862783432007 - - - - -2147483392 - {{-100, -100}, {502, 15}} - - - 1 - - _doScroller: - 0.0045045050792396069 - 0.99801188707351685 + {{0, 0.5}, {207, 210}} + + + 18 + + + + QSAAAEEgAABBmAAAQZgAAA - {233, 235} + {207, 235} - - - 18 - - - - QSAAAEEgAABBmAAAQZgAAA + NSView @@ -1124,7 +1167,6 @@ 289 {{41, 1.5}, {29, 19}} - YES -2080244224 @@ -1149,15 +1191,13 @@ - {{639, 0}, {84, 24}} + {{665, 0}, {84, 24}} - NSView - {{0, 211}, {723, 24}} + {{0, 211}, {749, 24}} - MGScopeBar @@ -1184,9 +1224,8 @@ public.url-name - {723, 210} + {749, 210} - @@ -1195,22 +1234,19 @@ YES - {{234, 0}, {723, 235}} + {{208, 0}, {749, 235}} - NSView {{-1, -1}, {957, 235}} - YES 2 {955, 233} - Tree @@ -1230,19 +1266,16 @@ {{0, 172}, {955, 233}} - NSView {955, 405} - 2 {955, 434} - NSView @@ -2042,6 +2075,22 @@ 490 + + + filesSearchField + + + + 494 + + + + updateSearch: + + + + 495 + @@ -2299,56 +2348,11 @@ YES - + - - 10 - - - YES - - - - - - File List Scroll View - - - 17 - - - - - 16 - - - - - 15 - - - YES - - - - - - 18 - - - YES - - - - - - 19 - - - 311 @@ -2662,6 +2666,75 @@ + + 491 + + + YES + + + + + + + 10 + + + YES + + + + + + File List Scroll View + + + 17 + + + + + 16 + + + + + 15 + + + YES + + + + + + 18 + + + YES + + + + + + 19 + + + + + 492 + + + YES + + + + + + 493 + + + @@ -2777,6 +2850,9 @@ 486.IBPluginDependency 49.IBAttributePlaceholdersKey 49.IBPluginDependency + 491.IBPluginDependency + 492.IBPluginDependency + 493.IBPluginDependency 50.IBPluginDependency 51.IBPluginDependency 6.IBPluginDependency @@ -2958,7 +3034,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.WebKitIBPlugin - {{1084, 241}, {955, 434}} + {{256, 24}, {955, 434}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2978,6 +3054,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2996,7 +3075,7 @@ - 490 + 495 @@ -3021,35 +3100,6 @@ MGScopeBar - - YES - - YES - accessoryView - fileListSplitView - historyController - typeBar - - - YES - - accessoryView - NSView - - - fileListSplitView - NSSplitView - - - historyController - PBGitHistoryController - - - typeBar - MGScopeBar - - - IBProjectSource GLFileView.h @@ -3070,13 +3120,6 @@ contextMenuDelegate id - - contextMenuDelegate - - contextMenuDelegate - id - - IBProjectSource GitXTextFieldCell.h @@ -3089,13 +3132,6 @@ delegate id - - delegate - - delegate - id - - IBProjectSource MGScopeBar/MGScopeBar.h @@ -3150,35 +3186,6 @@ WebView - - YES - - YES - controller - searchController - webController - webView - - - YES - - controller - PBGitHistoryController - - - searchController - PBHistorySearchController - - - webController - PBWebHistoryController - - - webView - WebView - - - IBProjectSource PBCommitList.h @@ -3224,6 +3231,7 @@ showCommitsFromTree: showInFinderAction: toggleQLPreviewPanel: + updateSearch: YES @@ -3244,100 +3252,7 @@ id id id - - - - YES - - YES - cherryPick: - createBranch: - createTag: - merge: - openFilesAction: - openSelectedFile: - rebase: - refresh: - selectNext: - selectPrevious: - setBranchFilter: - setDetailedView: - setTreeView: - showAddRemoteSheet: - showCommitsFromTree: - showInFinderAction: - toggleQLPreviewPanel: - - - YES - - cherryPick: - id - - - createBranch: - id - - - createTag: - id - - - merge: - id - - - openFilesAction: - id - - - openSelectedFile: - id - - - rebase: - id - - - refresh: - id - - - selectNext: - id - - - selectPrevious: - id - - - setBranchFilter: - id - - - setDetailedView: - id - - - setTreeView: - id - - - showAddRemoteSheet: - id - - - showCommitsFromTree: - id - - - showInFinderAction: - id - - - toggleQLPreviewPanel: - id - + id @@ -3350,6 +3265,7 @@ commitList fileBrowser fileView + filesSearchField historySplitView localRemoteBranchesFilterItem mergeButton @@ -3372,6 +3288,7 @@ PBCommitList NSOutlineView GLFileView + NSSearchField PBCollapsibleSplitView NSButton NSButton @@ -3387,110 +3304,6 @@ id - - YES - - YES - allBranchesFilterItem - cherryPickButton - commitController - commitList - fileBrowser - fileView - historySplitView - localRemoteBranchesFilterItem - mergeButton - rebaseButton - refController - scopeBarView - searchController - searchField - selectedBranchFilterItem - treeController - upperToolbarView - webHistoryController - webView - - - YES - - allBranchesFilterItem - NSButton - - - cherryPickButton - NSButton - - - commitController - NSArrayController - - - commitList - PBCommitList - - - fileBrowser - NSOutlineView - - - fileView - GLFileView - - - historySplitView - PBCollapsibleSplitView - - - localRemoteBranchesFilterItem - NSButton - - - mergeButton - NSButton - - - rebaseButton - NSButton - - - refController - PBRefController - - - scopeBarView - PBGitGradientBarView - - - searchController - PBHistorySearchController - - - searchField - NSSearchField - - - selectedBranchFilterItem - NSButton - - - treeController - NSTreeController - - - upperToolbarView - PBGitGradientBarView - - - webHistoryController - PBWebHistoryController - - - webView - id - - - IBProjectSource PBGitHistoryController.h @@ -3520,25 +3333,6 @@ PBGitHistoryController - - YES - - YES - contextMenuDelegate - controller - - - YES - - contextMenuDelegate - id - - - controller - PBGitHistoryController - - - IBProjectSource PBGitRevisionCell.h @@ -3562,30 +3356,6 @@ id - - YES - - YES - selectSearchMode: - stepperPressed: - updateSearch: - - - YES - - selectSearchMode: - id - - - stepperPressed: - id - - - updateSearch: - id - - - YES @@ -3607,45 +3377,6 @@ NSSegmentedControl - - YES - - YES - commitController - historyController - numberOfMatchesField - progressIndicator - searchField - stepper - - - YES - - commitController - NSArrayController - - - historyController - PBGitHistoryController - - - numberOfMatchesField - NSTextField - - - progressIndicator - NSProgressIndicator - - - searchField - NSSearchField - - - stepper - NSSegmentedControl - - - IBProjectSource PBHistorySearchController.h @@ -3674,13 +3405,6 @@ controller PBGitHistoryController - - controller - - controller - PBGitHistoryController - - IBProjectSource PBQLOutlineView.h @@ -3728,90 +3452,6 @@ PBRefMenuItem - - YES - - YES - checkout: - cherryPick: - copyPatch: - copySHA: - createBranch: - createTag: - diffWithHEAD: - fetchRemote: - merge: - pullRemote: - pushDefaultRemoteForRef: - pushToRemote: - pushUpdatesToRemote: - rebaseHeadBranch: - showTagInfoSheet: - - - YES - - checkout: - PBRefMenuItem - - - cherryPick: - PBRefMenuItem - - - copyPatch: - PBRefMenuItem - - - copySHA: - PBRefMenuItem - - - createBranch: - PBRefMenuItem - - - createTag: - PBRefMenuItem - - - diffWithHEAD: - PBRefMenuItem - - - fetchRemote: - PBRefMenuItem - - - merge: - PBRefMenuItem - - - pullRemote: - PBRefMenuItem - - - pushDefaultRemoteForRef: - PBRefMenuItem - - - pushToRemote: - PBRefMenuItem - - - pushUpdatesToRemote: - PBRefMenuItem - - - rebaseHeadBranch: - PBRefMenuItem - - - showTagInfoSheet: - PBRefMenuItem - - - YES @@ -3829,35 +3469,6 @@ PBGitHistoryController - - YES - - YES - branchPopUp - commitController - commitList - historyController - - - YES - - branchPopUp - NSPopUpButton - - - commitController - NSArrayController - - - commitList - PBCommitList - - - historyController - PBGitHistoryController - - - IBProjectSource PBRefController.h @@ -3870,13 +3481,6 @@ refish id - - refish - - refish - id - - IBProjectSource PBRefMenuItem.h @@ -3889,13 +3493,6 @@ controller NSArrayController - - controller - - controller - NSArrayController - - IBProjectSource PBUnsortableTableHeader.h @@ -3908,13 +3505,6 @@ refresh: id - - refresh: - - refresh: - id - - IBProjectSource PBViewController.h @@ -3936,25 +3526,6 @@ WebView - - YES - - YES - repository - view - - - YES - - repository - id - - - view - WebView - - - IBProjectSource PBWebController.h @@ -3976,25 +3547,6 @@ PBGitHistoryController - - YES - - YES - contextMenuDelegate - historyController - - - YES - - contextMenuDelegate - id - - - historyController - PBGitHistoryController - - - IBProjectSource PBWebHistoryController.h @@ -4007,13 +3559,6 @@ view WebView - - view - - view - WebView - - IBUserSource @@ -4716,13 +4261,6 @@ view NSView - - view - - view - NSView - - IBFrameworkSource AppKit.framework/Headers/NSViewController.h @@ -4762,70 +4300,6 @@ id - - YES - - YES - goBack: - goForward: - makeTextLarger: - makeTextSmaller: - makeTextStandardSize: - reload: - reloadFromOrigin: - stopLoading: - takeStringURLFrom: - toggleContinuousSpellChecking: - toggleSmartInsertDelete: - - - YES - - goBack: - id - - - goForward: - id - - - makeTextLarger: - id - - - makeTextSmaller: - id - - - makeTextStandardSize: - id - - - reload: - id - - - reloadFromOrigin: - id - - - stopLoading: - id - - - takeStringURLFrom: - id - - - toggleContinuousSpellChecking: - id - - - toggleSmartInsertDelete: - id - - - IBFrameworkSource WebKit.framework/Headers/WebView.h diff --git a/PBGitRepository.h b/PBGitRepository.h index 63fb753..fe5369d 100644 --- a/PBGitRepository.h +++ b/PBGitRepository.h @@ -145,7 +145,6 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) { // for the scripting bridge - (void)findInModeScriptCommand:(NSScriptCommand *)command; --(NSNumber *)countCommintsOf:(NSString *)branchs; - (NSMenu *) menu; +(bool)isLocalBranch:(NSString *)branch branchNameInto:(NSString **)name; diff --git a/PBGitSidebarController.m b/PBGitSidebarController.m index 7be189d..eee30ea 100644 --- a/PBGitSidebarController.m +++ b/PBGitSidebarController.m @@ -150,17 +150,17 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged"; [sourceView reloadData]; }else if ([@"updateRefs" isEqualToString:context]) { for(PBGitSVRemoteItem* remote in [remotes children]){ - NSLog(@"remote.title=%@",[remote title]); - [remote setAlert:[self remoteNeedFetch:[remote title]]]; + [self performSelectorInBackground:@selector(evaluateRemoteBadge:) withObject:remote]; } for(PBGitSVBranchItem* branch in [branches children]){ - NSString *bName=[branch title]; - [branch setAhead:[self countCommintsOf:[NSString stringWithFormat:@"origin/%@..%@",bName,bName]]]; - [branch setBehind:[self countCommintsOf:[NSString stringWithFormat:@"%@..origin/%@",bName,bName]]]; - [branch setIsCheckedOut:[branch.revSpecifier isEqual:[repository headRef]]]; + if([branch isKindOfClass:[PBGitSVBranchItem class]]){ + NSString *bName=[branch title]; + [branch setAhead:[self countCommintsOf:[NSString stringWithFormat:@"origin/%@..%@",bName,bName]]]; + [branch setBehind:[self countCommintsOf:[NSString stringWithFormat:@"%@..origin/%@",bName,bName]]]; + [branch setIsCheckedOut:[branch.revSpecifier isEqual:[repository headRef]]]; + } } - }else{ [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } @@ -168,6 +168,12 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged"; #pragma mark Badges Methods +-(void)evaluateRemoteBadge:(PBGitSVRemoteItem *)remote +{ + NSLog(@"remote.title=%@",[remote title]); + [remote setAlert:[self remoteNeedFetch:[remote title]]]; +} + -(NSNumber *)countCommintsOf:(NSString *)range { NSArray *args = [NSArray arrayWithObjects:@"rev-list", range, nil]; diff --git a/PBGitTree.h b/PBGitTree.h index 27cef62..72b7204 100644 --- a/PBGitTree.h +++ b/PBGitTree.h @@ -21,6 +21,9 @@ NSString* localFileName; NSDate* localMtime; + + NSPredicate *filterPredicate; + NSMutableArray *filteredChildren; } + (PBGitTree*) rootForCommit: (id) commit; @@ -41,6 +44,9 @@ @property(retain) PBGitRepository* repository; @property(assign) __weak PBGitTree* parent; +@property (nonatomic, copy) NSPredicate *filterPredicate; +@property(readonly) NSArray *filteredChildren; + @property(readonly) NSArray* children; @property(readonly) NSString* fullPath; @property(readonly) NSString* contents; diff --git a/PBGitTree.m b/PBGitTree.m index c966fa5..f1ba694 100644 --- a/PBGitTree.m +++ b/PBGitTree.m @@ -15,6 +15,55 @@ @implementation PBGitTree @synthesize sha, path, repository, leaf, parent; +@synthesize filterPredicate; +@synthesize filteredChildren; + +#pragma mark - +#pragma mark get/set + +- (NSArray *) filteredChildren { + if (!filteredChildren) { + filteredChildren = [[NSMutableArray alloc] init]; + [filteredChildren addObjectsFromArray:self.children]; + } + return filteredChildren; +} + +- (void) setFilterPredicate:(NSPredicate *) newPredicate { + if (newPredicate != filterPredicate) { + [filterPredicate release]; + filterPredicate = [newPredicate retain]; + + if (leaf) { + return; + } + + // initiate filtering + [filteredChildren removeAllObjects]; + filteredChildren = [[NSMutableArray alloc] init]; + + if (filterPredicate == nil) { + [filteredChildren addObjectsFromArray:self.children]; + } + + for (id item in self.children) { + [item setFilterPredicate:filterPredicate]; + if (filterPredicate) { + if ([item leaf]) { + if ([filterPredicate evaluateWithObject:item]) { + [filteredChildren addObject:item]; + } + } else { + if ([[item filteredChildren] count] > 0) { + [filteredChildren addObject:item]; + } + } + } + } + } +} + +#pragma mark - + (PBGitTree*) rootForCommit:(id) commit { @@ -40,6 +89,7 @@ - init { + filteredChildren = nil; children = nil; localFileName = nil; leaf = YES; diff --git a/PBGitWindowController.h b/PBGitWindowController.h index 9b008fc..70b268d 100644 --- a/PBGitWindowController.h +++ b/PBGitWindowController.h @@ -9,6 +9,9 @@ #import #import "PBGitRepository.h" +#define kGitSplitViewMinWidth 150.0f +#define kGitSplitViewMaxWidth 300.0f + @class PBViewController, PBGitSidebarController, PBGitCommitController; @interface PBGitWindowController : NSWindowController { @@ -39,6 +42,7 @@ - (void)showMessageSheet:(NSString *)messageText infoText:(NSString *)infoText; - (void)showErrorSheet:(NSError *)error; - (void)showErrorSheetTitle:(NSString *)title message:(NSString *)message arguments:(NSArray *)arguments output:(NSString *)output; +- (void)collapseSplitView:(NSSplitView *)sp show:(BOOL)show; - (IBAction) showCommitView:(id)sender; - (IBAction) showHistoryView:(id)sender; @@ -46,6 +50,7 @@ - (IBAction) openInTerminal:(id)sender; - (IBAction) cloneTo:(id)sender; - (IBAction) refresh:(id)sender; +- (IBAction) changeLayout:(id)sender; - (void)setHistorySearch:(NSString *)searchString mode:(NSInteger)mode; diff --git a/PBGitWindowController.m b/PBGitWindowController.m index 2df9828..9ec67f2 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -237,14 +237,40 @@ [sidebarController setHistorySearch:searchString mode:mode]; } +- (IBAction) changeLayout:(id)sender{ + NSLog(@"selectedSegment=%ld (%d)",[sender selectedSegment],[sender isSelectedForSegment:[sender selectedSegment]]); + NSSplitView *sp=nil; + switch ([sender selectedSegment]) { + case 0: + sp=splitView; + break; + case 1: + sp=[[sidebarController historyViewController] historySplitView]; + break; + } + NSLog(@"sp=%@",sp); + if(sp!=nil) { + [self collapseSplitView:sp show:[sender isSelectedForSegment:[sender selectedSegment]]]; + } +} +- (void)collapseSplitView:(NSSplitView *)sp show:(BOOL)show{ + NSView *clipview = [[sp subviews] objectAtIndex:0]; + NSRect clipFrame = [clipview frame]; + + if ([sp isVertical]) { + clipFrame.size.width = kGitSplitViewMinWidth * show; + }else{ + clipFrame.size.height = kGitSplitViewMinWidth * show; + } + + [[clipview animator] setFrame:clipFrame]; + [sp adjustSubviews]; +} #pragma mark - #pragma mark SplitView Delegates -#define kGitSplitViewMinWidth 150.0f -#define kGitSplitViewMaxWidth 300.0f - #pragma mark min/max widths while moving the divider - (CGFloat)splitView:(NSSplitView *)view constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex diff --git a/PBGitXProtocol.m b/PBGitXProtocol.m index 7d1e1bc..052a667 100644 --- a/PBGitXProtocol.m +++ b/PBGitXProtocol.m @@ -11,6 +11,19 @@ @implementation PBGitXProtocol +- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id )client +{ + // work around for NSURLProtocol bug + // note that this leaks! + CFRetain(client); + + if (self = [super initWithRequest:request cachedResponse:cachedResponse client:client]) + { + } + + return self; +} + + (BOOL) canInitWithRequest:(NSURLRequest *)request { return [[[request URL] scheme] isEqualToString:@"GitX"]; @@ -31,25 +44,40 @@ return; } - NSString *path=[[url path] substringFromIndex:1]; - NSString *v=@""; - if ([[path substringToIndex:5] isEqualToString:@"prev/"]) { - path=[path substringFromIndex:5]; - v=@"^"; + if ([[url host] isEqualToString:@"app"]) { + NSString *app=[[url path] substringFromIndex:1]; + NSString *appPath=[[NSWorkspace sharedWorkspace] fullPathForApplication:app]; + NSLog(@"app=%@ appPath=%@",app,appPath); + if(appPath){ + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:appPath]; + NSLog(@"icon=%@",icon); + [[self client] URLProtocol:self didLoadData:[icon TIFFRepresentation]]; + [[self client] URLProtocolDidFinishLoading:self]; + }else{ + [[self client] URLProtocol:self didFailWithError:[NSError errorWithDomain:@"gitx" code:404 userInfo:nil]]; + } + }else { + + NSString *path=[[url path] substringFromIndex:1]; + NSString *v=@""; + if ([[path substringToIndex:5] isEqualToString:@"prev/"]) { + path=[path substringFromIndex:5]; + v=@"^"; + } + NSString *specifier = [NSString stringWithFormat:@"%@%@:%@", [url host], v,path]; + handle = [repo handleInWorkDirForArguments:[NSArray arrayWithObjects:@"cat-file", @"blob", specifier, nil]]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didFinishFileLoad:) name:NSFileHandleReadToEndOfFileCompletionNotification object:handle]; + [handle readToEndOfFileInBackgroundAndNotify]; + + NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] + MIMEType:nil + expectedContentLength:-1 + textEncodingName:nil]; + + [[self client] URLProtocol:self + didReceiveResponse:response + cacheStoragePolicy:NSURLCacheStorageNotAllowed]; } - NSString *specifier = [NSString stringWithFormat:@"%@%@:%@", [url host], v,path]; - handle = [repo handleInWorkDirForArguments:[NSArray arrayWithObjects:@"cat-file", @"blob", specifier, nil]]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didFinishFileLoad:) name:NSFileHandleReadToEndOfFileCompletionNotification object:handle]; - [handle readToEndOfFileInBackgroundAndNotify]; - - NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] - MIMEType:nil - expectedContentLength:-1 - textEncodingName:nil]; - - [[self client] URLProtocol:self - didReceiveResponse:response - cacheStoragePolicy:NSURLCacheStorageNotAllowed]; } - (void) didFinishFileLoad:(NSNotification *)notification diff --git a/PBWebController.m b/PBWebController.m index ab890fb..7c18db8 100644 --- a/PBWebController.m +++ b/PBWebController.m @@ -76,6 +76,11 @@ NSLog(@"Error from webkit: %@", dictionary); } +- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame +{ + NSLog(@"Message from webkit: %@", message); +} + - (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request diff --git a/PBWebHistoryController.h b/PBWebHistoryController.h index 0d887be..7f4fc4a 100644 --- a/PBWebHistoryController.h +++ b/PBWebHistoryController.h @@ -29,6 +29,7 @@ - (NSString *)parseHeader:(NSString *)txt withRefs:(NSString *)badges; - (NSMutableDictionary *)parseStats:(NSString *)txt; - (NSString *) someMethodThatReturnsSomeHashForSomeString:(NSString*)concat; +- (void) openFileMerge:(NSString*)file sha:(NSString *)sha; @property (readonly) NSString* diff; @end diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m index d38a180..45ab3c4 100644 --- a/PBWebHistoryController.m +++ b/PBWebHistoryController.m @@ -120,7 +120,7 @@ [[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]]; -#if 1 +#ifdef DEBUG_BUILD NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML]; NSString *tmpFile=@"~/tmp/test2.html"; [dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil]; @@ -224,6 +224,13 @@ [historyController selectCommit:[PBGitSHA shaWithString:sha]]; } +- (void) openFileMerge:(NSString*)file sha:(NSString *)sha +{ + NSArray *args=[NSArray arrayWithObjects:@"difftool",@"--no-prompt",@"--tool=opendiff",[NSString stringWithFormat:@"%@^",sha],sha,@"--",file,nil]; + [historyController.repository handleForArguments:args]; +} + + - (void) sendKey: (NSString*) key { id script = [view windowScriptObject]; diff --git a/gitx_askpasswd_main.m b/gitx_askpasswd_main.m index 9c3a44f..b6a63ce 100644 --- a/gitx_askpasswd_main.m +++ b/gitx_askpasswd_main.m @@ -37,7 +37,7 @@ NSButton* rememberCheck; } --(NSPanel*) passwordPanel; +-(NSPanel*)passwordPanel:(NSString *)prompt remember:(BOOL)remember; -(IBAction) doOKButton: (id)sender; -(IBAction) doCancelButton: (id)sender; diff --git a/html/views/history/history.css b/html/views/history/history.css index 6ac1cda..8c073d4 100644 --- a/html/views/history/history.css +++ b/html/views/history/history.css @@ -317,4 +317,9 @@ a.showdiff { -webkit-box-shadow: 5px 5px 5px #ccc; width: 98%; margin: auto auto 20px 1%; +} + +.filemerge { + float: right; + text-align: center; } \ No newline at end of file diff --git a/html/views/history/history.js b/html/views/history/history.js index e37baee..6a3b3e1 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -2,6 +2,12 @@ var selectCommit = function(a) { Controller.selectCommit_(a); } +var openFileMerge = function(file,sha) { + alert(file); + alert(sha); + Controller.openFileMerge_sha_(file,sha); +} + var showImage = function(element, filename) { element.outerHTML = ''; diff --git a/list_Template.png b/list_Template.png new file mode 100644 index 0000000..690ace1 Binary files /dev/null and b/list_Template.png differ diff --git a/sidebar_Template.png b/sidebar_Template.png new file mode 100644 index 0000000..9326ad9 Binary files /dev/null and b/sidebar_Template.png differ