Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f22fc3a
Clean up code.
Tanner Aug 27, 2013
35d9481
Create the post backend file in Post class.
Tanner Aug 27, 2013
ae17cd0
Place posts in their own directories. Create metadata file.
Tanner Aug 27, 2013
3b88e83
Save the post directory in an instance var.
Tanner Aug 27, 2013
0698137
Remove the date out of the filename.
Tanner Aug 27, 2013
4dde97d
Don't extract the date from the filename anymore.
Tanner Aug 27, 2013
12d00df
Update the initWithURL method for TBPost.
Tanner Aug 27, 2013
da07eb8
When creating an existing TSPostMetadata file, load the data in.
Tanner Aug 27, 2013
ca84666
Place a draft label in the UI cells for posts.
Tanner Aug 28, 2013
0d5dc80
Show the "Draft" label when the cell is selected.
Tanner Aug 28, 2013
1cc4095
When reading the metadata file, use the path versus the URL.
Tanner Aug 29, 2013
0c4a6c3
When setting the draft, write the data to the metadata file.
Tanner Aug 29, 2013
a9fce65
Add right-click menu items for marking/unmarking as draft.
Tanner Aug 29, 2013
804a3f4
Only show the appropriate menu items for unmarking/marking as draft.
Tanner Aug 29, 2013
4647a7a
When "publishing a post" set the publish date to now.
Tanner Aug 29, 2013
19fbdfa
Write the date to the JSON as a ISO 8601 compliant string.
Tanner Aug 29, 2013
3e3b4fd
Remove the published time from the post if it's a draft.
Tanner Aug 29, 2013
e7fd999
Update Default.tribo to new directory structure.
Tanner Aug 29, 2013
8c67ab8
Show the date in the UI.
Tanner Sep 2, 2013
dbd3f0d
Move text label color changing on selection into code.
Tanner Sep 5, 2013
bb9a193
When clicking on an empty row, don't crash when showing the menu.
Tanner Sep 5, 2013
6d64315
Show drafts in preview mode, but don't include for publishing.
Tanner Sep 5, 2013
904a84d
Document new code.
Tanner Sep 5, 2013
daa1ce9
Use the correct post label colors.
Tanner Sep 5, 2013
582cf06
Only have one menu item to change draft status.
Tanner Sep 5, 2013
d9bfcba
Change "TS" prefix to "TB".
Tanner Sep 5, 2013
e1711fe
Revert "Clean up code."
Tanner Sep 5, 2013
0863920
Convert init constructors to factory methods.
Tanner Sep 5, 2013
1ebce68
Attempt to compact code by removing whitespace.
Tanner Sep 5, 2013
4264ec6
Don't call init when we don't have any memory alloc'd.
Tanner Sep 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Default.tribo/Posts/example-post/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"draft":true}
18 changes: 18 additions & 0 deletions Mac App/Controllers/TBPostTableCellView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// TSPostTableCellView.h
// Tribo
//
// Created by Tanner Smith on 9/4/13.
// Copyright (c) 2013 Opt-6 Products, LLC. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface TBPostTableCellView : NSTableCellView

@property (assign) IBOutlet NSTextField *title;
@property (assign) IBOutlet NSTextField *draft;
@property (assign) IBOutlet NSTextField *date;
@property (assign) IBOutlet NSTextField *postExcerpt;

@end
52 changes: 52 additions & 0 deletions Mac App/Controllers/TBPostTableCellView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// TSPostTableCellView.m
// Tribo
//
// Created by Tanner Smith on 9/4/13.
// Copyright (c) 2013 Opt-6 Products, LLC. All rights reserved.
//

#import "TBPostTableCellView.h"

#import "NSTextField+TBAdditions.h"

@implementation TBPostTableCellView

@synthesize title, date, draft, postExcerpt;

- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}

return self;
}

- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle {
switch (backgroundStyle) {
case NSBackgroundStyleDark: {
[title setTextColor:[NSColor whiteColor]];
[date setTextColor:[NSColor whiteColor]];
[draft setTextColor:[NSColor whiteColor]];
[postExcerpt setTextColor:[NSColor whiteColor]];

[postExcerpt tb_setPlaceholderTextColor:[NSColor alternateSelectedControlColor]];

break;
}
default: {
[title setTextColor:[NSColor blackColor]];
[date setTextColor:[NSColor alternateSelectedControlColor]];
[draft setTextColor:[NSColor grayColor]];
[postExcerpt setTextColor:[NSColor grayColor]];

[postExcerpt tb_setPlaceholderTextColor:[NSColor grayColor]];

break;
}
}
}

@end
Loading