Went nuts and restyled a bunch of table cells. Also hooked up accounts. Need to clean up the login view, as well as finish the reading flow.

This commit is contained in:
Samuel Clay 2011-07-20 21:08:57 -07:00
parent f52e2ec235
commit 229bd75281
17 changed files with 5359 additions and 4139 deletions

View file

@ -183,12 +183,15 @@ def load_feed_favicons(request):
feed_icons = dict([(i.feed_id, i.data) for i in MFeedIcon.objects(feed_id__in=feed_ids)])
return feed_icons
def load_feeds_flat(request):
user = get_user(request)
user = request.user
include_favicons = request.REQUEST.get('include_favicons', False)
feeds = {}
if not user.is_authenticated():
return HttpResponseForbidden()
try:
folders = UserSubscriptionFolders.objects.get(user=user)
except UserSubscriptionFolders.DoesNotExist:

2
fabfile.py vendored
View file

@ -259,7 +259,7 @@ def setup_psycopg():
def setup_python():
sudo('easy_install pip')
sudo('easy_install fabric django celery django-celery django-compress South django-devserver django-extensions guppy pymongo BeautifulSoup pyyaml nltk==0.9.9 lxml oauth2 pytz boto')
sudo('easy_install fabric django celery django-celery django-compress South django-extensions pymongo BeautifulSoup pyyaml nltk==0.9.9 lxml oauth2 pytz boto')
put('config/pystartup.py', '.pystartup')
with settings(warn_only=True):

View file

@ -51,7 +51,7 @@
<object class="IBUILabel" id="750430533">
<reference key="NSNextResponder" ref="994014136"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{153, 33}, {145, 15}}</string>
<string key="NSFrame">{{172, 39}, {119, 15}}</string>
<reference key="NSSuperview" ref="994014136"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor" id="932003208">
@ -63,20 +63,21 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Date</string>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-BoldOblique</string>
<object class="NSFont" key="IBUIFont" id="624386242">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">10</double>
<int key="NSfFlags">16</int>
</object>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC44NzUgMC4zOTY5MzEwOTM3IDAuMDAwNTMzNjE3OTc5MgA</bytes>
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC4xNDUwOTgwNDU1IDAuMTc2NDcwNTkyNiAwLjQyMzUyOTQ0NjEAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<object class="NSColor" key="IBUIShadowColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEgMAA</bytes>
<object class="NSColor" key="IBUIShadowColor" id="878586146">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<string key="IBUIShadowOffset">{0, 1}</string>
<int key="IBUIBaselineAdjustment">1</int>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
<float key="IBUIMinimumFontSize">10</float>
@ -86,7 +87,7 @@
<object class="IBUILabel" id="417683225">
<reference key="NSNextResponder" ref="994014136"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 0}, {280, 31}}</string>
<string key="NSFrame">{{20, 5}, {271, 31}}</string>
<reference key="NSSuperview" ref="994014136"/>
<reference key="NSWindow"/>
<reference key="IBUIBackgroundColor" ref="932003208"/>
@ -117,39 +118,30 @@
<object class="IBUILabel" id="194816084">
<reference key="NSNextResponder" ref="994014136"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 33}, {131, 15}}</string>
<string key="NSFrame">{{20, 39}, {150, 15}}</string>
<reference key="NSSuperview" ref="994014136"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEgMAA</bytes>
</object>
<reference key="IBUIBackgroundColor" ref="878586146"/>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Author</string>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">10</double>
<int key="NSfFlags">16</int>
</object>
<reference key="IBUIFont" ref="624386242"/>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTE2MjY0MDkgMC4zMDI0ODI2ODcyIDAuMzY5NTY1MjE3NAA</bytes>
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC41ODgyMzUzMTg3IDAuNTg4MjM1MzE4NyAwLjU4ODIzNTMxODcAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<object class="NSColor" key="IBUIShadowColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEgMAA</bytes>
</object>
<reference key="IBUIShadowColor" ref="878586146"/>
<string key="IBUIShadowOffset">{0, 1}</string>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
<object class="IBUIImageView" id="523799572">
<reference key="NSNextResponder" ref="994014136"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{2, 8}, {16, 16}}</string>
<string key="NSFrame">{{2, 13}, {16, 16}}</string>
<reference key="NSSuperview" ref="994014136"/>
<reference key="NSWindow"/>
<bool key="IBUIAutoresizesSubviews">NO</bool>
@ -157,7 +149,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<string key="NSFrameSize">{300, 51}</string>
<string key="NSFrameSize">{300, 59}</string>
<reference key="NSSuperview" ref="749780469"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
@ -171,7 +163,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<string key="NSFrameSize">{320, 51}</string>
<string key="NSFrameSize">{320, 59}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="IBUIBackgroundColor" ref="932003208"/>

View file

@ -11,7 +11,7 @@
#import "FeedDetailTableCell.h"
#import "JSON.h"
#define kTableViewRowHeight 55;
#define kTableViewRowHeight 60;
@implementation FeedDetailViewController
@ -31,7 +31,6 @@
NSLog(@"Loaded Feed view: %@", appDelegate.activeFeed);
self.title = [appDelegate.activeFeed objectForKey:@"feed_title"];
[super viewWillAppear:animated];
}
@ -68,6 +67,9 @@
- (void)fetchFeedDetail {
if ([appDelegate.activeFeed objectForKey:@"id"] != nil) {
[storyTitlesTable scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
NSString *theFeedDetailURL = [[NSString alloc]
initWithFormat:@"http://nb.local.host:8000/reader/feed/%@",
[appDelegate.activeFeed objectForKey:@"id"]];
@ -159,9 +161,12 @@
if ([[story objectForKey:@"read_status"] intValue] != 1) {
// Unread story
cell.storyTitle.textColor = [UIColor colorWithRed:0.05f green:0.05f blue:0.05f alpha:0.9];
cell.storyAuthor.textColor = [UIColor colorWithRed:0.86f green:0.66f blue:0.36 alpha:0.9];
cell.storyDate.textColor = [UIColor colorWithRed:0.26f green:0.36f blue:0.36 alpha:0.9];
cell.storyTitle.textColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:1.0];
cell.storyTitle.font = [UIFont fontWithName:@"Helvetica-Bold" size:12];
cell.storyAuthor.textColor = [UIColor colorWithRed:0.58f green:0.58f blue:0.58f alpha:1.0];
cell.storyAuthor.font = [UIFont fontWithName:@"Helvetica-Bold" size:10];
cell.storyDate.textColor = [UIColor colorWithRed:0.14f green:0.18f blue:0.42f alpha:1.0];
cell.storyDate.font = [UIFont fontWithName:@"Helvetica-Bold" size:10];
int score = [NewsBlurAppDelegate computeStoryScore:[story objectForKey:@"intelligence"]];
if (score > 0) {
cell.storyUnreadIndicator.image = [UIImage imageNamed:@"bullet_green.png"];
@ -172,10 +177,12 @@
}
} else {
// Read story
//cell.storyTitle.font =
cell.storyTitle.textColor = [UIColor colorWithRed:0.26f green:0.36f blue:0.36 alpha:0.4];
cell.storyAuthor.textColor = [UIColor colorWithRed:0.76f green:0.56f blue:0.36 alpha:0.4];
cell.storyDate.textColor = [UIColor colorWithRed:0.26f green:0.36f blue:0.36 alpha:0.4];
cell.storyTitle.textColor = [UIColor colorWithRed:0.15f green:0.25f blue:0.25f alpha:0.9];
cell.storyTitle.font = [UIFont fontWithName:@"Helvetica" size:12];
cell.storyAuthor.textColor = [UIColor colorWithRed:0.58f green:0.58f blue:0.58f alpha:0.5];
cell.storyAuthor.font = [UIFont fontWithName:@"Helvetica-Bold" size:10];
cell.storyDate.textColor = [UIColor colorWithRed:0.14f green:0.18f blue:0.42f alpha:0.5];
cell.storyDate.font = [UIFont fontWithName:@"Helvetica" size:10];
cell.storyUnreadIndicator.image = nil;
}

View file

@ -2,17 +2,20 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1024</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">804</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.SystemVersion">10K540</string>
<string key="IBDocument.InterfaceBuilderVersion">1306</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">123</string>
<string key="NS.object.0">301</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1"/>
<string>IBUILabel</string>
<string>IBUIView</string>
<string>IBUITextField</string>
<string>IBProxyObject</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -23,9 +26,7 @@
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -47,6 +48,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 49}, {280, 31}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -75,6 +77,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 20}, {212, 22}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
@ -98,6 +101,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 133}, {280, 31}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -109,14 +113,18 @@
<bytes key="NSWhite">MAA</bytes>
<reference key="NSCustomColorSpace" ref="892872088"/>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">16</double>
<int key="NSfFlags">16</int>
</object>
<bool key="IBUIClearsOnBeginEditing">YES</bool>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
<float key="IBUIMinimumFontSize">17</float>
<float key="IBUIMinimumFontSize">14</float>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocorrectionType">1</int>
<int key="IBUIKeyboardType">1</int>
<int key="IBUIReturnKeyType">1</int>
<bool key="IBUIEnablesReturnKeyAutomatically">YES</bool>
<bool key="IBUISecureTextEntry">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
@ -126,6 +134,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 104}, {212, 22}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
@ -138,8 +147,9 @@
<float key="IBUIMinimumFontSize">10</float>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@ -275,17 +285,13 @@
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">20</int>
@ -301,6 +307,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>feedMarkReadButton</string>
<string>feedScoreSlider</string>
<string>feedViewToolbar</string>
<string>storyTitlesTable</string>
@ -308,6 +315,7 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIBarButtonItem</string>
<string>UISlider</string>
<string>UIToolbar</string>
<string>UITableView</string>
@ -318,6 +326,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>feedMarkReadButton</string>
<string>feedScoreSlider</string>
<string>feedViewToolbar</string>
<string>storyTitlesTable</string>
@ -328,6 +337,10 @@
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedMarkReadButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedScoreSlider</string>
<string key="candidateClassName">UISlider</string>
@ -344,7 +357,7 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/FeedDetailViewController.h</string>
<string key="minorKey">./Classes/FeedDetailViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@ -391,7 +404,7 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/LoginViewController.h</string>
<string key="minorKey">./Classes/LoginViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@ -408,23 +421,9 @@
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="709521161">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/NewsBlurViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/NSObject+SBJSON.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SBJsonWriter.h</string>
<string key="minorKey">./Classes/LogoutDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@ -506,7 +505,7 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/NewsBlurAppDelegate.h</string>
<string key="minorKey">./Classes/NewsBlurAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@ -576,38 +575,22 @@
</object>
</object>
</object>
<reference key="sourceIdentifier" ref="709521161"/>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NewsBlurViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">OriginalStoryViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">appDelegate</string>
<string key="NS.object.0">NewsBlurAppDelegate</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">appDelegate</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/OriginalStoryViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">StoryDetailViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">showOriginalSubview:</string>
<string key="NS.key.0">doCloseOriginalStoryViewController</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">showOriginalSubview:</string>
<string key="NS.key.0">doCloseOriginalStoryViewController</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">showOriginalSubview:</string>
<string key="name">doCloseOriginalStoryViewController</string>
<string key="candidateClassName">id</string>
</object>
</object>
@ -616,11 +599,27 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>back</string>
<string>closeButton</string>
<string>forward</string>
<string>pageAction</string>
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIBarButtonItem</string>
<string>UIBarButtonItem</string>
<string>UIBarButtonItem</string>
<string>UIBarButtonItem</string>
<string>UILabel</string>
<string>UITextField</string>
<string>UIBarButtonItem</string>
<string>UIToolbar</string>
<string>UIWebView</string>
</object>
</object>
@ -629,6 +628,14 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>back</string>
<string>closeButton</string>
<string>forward</string>
<string>pageAction</string>
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -637,6 +644,38 @@
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">back</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">closeButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">forward</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">pageAction</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">pageTitle</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">pageUrl</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">refresh</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">webView</string>
<string key="candidateClassName">UIWebView</string>
@ -645,277 +684,100 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/StoryDetailViewController.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
<string key="minorKey">./Classes/OriginalStoryViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="550117699">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarButtonItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIControl</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationController</string>
<string key="className">StoryDetailViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="948282312">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doNextUnreadStory</string>
<string>doPreviousStory</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doNextUnreadStory</string>
<string>doPreviousStory</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">doNextUnreadStory</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">doPreviousStory</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>buttonNext</string>
<string>buttonPrevious</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIBarButtonItem</string>
<string>UIBarButtonItem</string>
<string>UIToolbar</string>
<string>UIWebView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>buttonNext</string>
<string>buttonPrevious</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">buttonNext</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">buttonPrevious</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">webView</string>
<string key="candidateClassName">UIWebView</string>
</object>
</object>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="550117699"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIScrollView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISlider</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISlider.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITableView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextField</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="504546753">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIToolbar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<reference key="sourceIdentifier" ref="504546753"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="948282312"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWebView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWebView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/StoryDetailViewController.h</string>
</object>
</object>
</object>
@ -931,8 +793,7 @@
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../NewsBlur.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">123</string>
<string key="IBCocoaTouchPluginVersion">301</string>
</data>
</archive>

View file

@ -288,10 +288,11 @@
"}"
".NB-count {"
" float: right;"
" margin: 1px 2px 0 0;"
" padding: 3px 4px 2px;"
" margin: 0px 2px 0 0;"
" padding: 2px 4px 2px;"
" border: none;"
" border-radius: 5px;"
" font-weight: bold;"
"}"
".NB-positive {"
" color: white;"
@ -308,10 +309,9 @@
" background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#CC2A2E), to(#9B181B));"
"}"
"</style>"];
int negativeCount = (int)[feed objectForKey:@"ng"];
int neutralCount = (int)[feed objectForKey:@"nt"];
int positiveCount = (int)[feed objectForKey:@"ps"];
int negativeCount = [[feed objectForKey:@"ng"] intValue];
int neutralCount = [[feed objectForKey:@"nt"] intValue];
int positiveCount = [[feed objectForKey:@"ps"] intValue];
NSString *negativeCountString = [NSString stringWithFormat:@"<div class=\"NB-count NB-negative\">%@</div>",
[feed objectForKey:@"ng"]];
@ -319,12 +319,12 @@
[feed objectForKey:@"nt"]];
NSString *positiveCountString = [NSString stringWithFormat:@"<div class=\"NB-count NB-positive\">%@</div>",
[feed objectForKey:@"ps"]];
NSLog(@"%@", [[feed objectForKey:@"ps"] class]);
NSLog(@"%@ %d -", [feed objectForKey:@"ps"], positiveCount);
NSString *htmlString = [NSString stringWithFormat:@"%@ %@ %@ %@",
imgCssString,
positiveCount ? positiveCountString : @"",
neutralCount ? neutralCountString : @"",
negativeCount ? negativeCountString : @""];
!!positiveCount ? positiveCountString : @"",
!!neutralCount ? neutralCountString : @"",
!!negativeCount ? negativeCountString : @""];
return htmlString;
}

View file

@ -30,6 +30,7 @@ static const CGFloat kAddressHeight = 22.0f;
UIBarButtonItem* pageAction;
UILabel *pageTitle;
UITextField *pageUrl;
UIToolbar *toolbar;
}
@property (nonatomic, retain) IBOutlet NewsBlurAppDelegate *appDelegate;
@ -41,6 +42,7 @@ static const CGFloat kAddressHeight = 22.0f;
@property (nonatomic, retain) IBOutlet UIBarButtonItem* pageAction;
@property (nonatomic, retain) IBOutlet UILabel *pageTitle;
@property (nonatomic, retain) IBOutlet UITextField *pageUrl;
@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
- (IBAction) doCloseOriginalStoryViewController;
- (void)loadAddress:(id)sender event:(UIEvent*)event;

View file

@ -21,6 +21,7 @@
@synthesize pageAction;
@synthesize pageTitle;
@synthesize pageUrl;
@synthesize toolbar;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
@ -32,6 +33,7 @@
- (void)viewWillAppear:(BOOL)animated {
NSLog(@"Original Story View: %@", [appDelegate activeOriginalStoryURL]);
[appDelegate showNavigationBar:NO];
toolbar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:[appDelegate activeOriginalStoryURL]] autorelease];
[webView loadRequest:request];
}
@ -50,6 +52,9 @@
label.autoresizingMask = UIViewAutoresizingFlexibleWidth;
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont systemFontOfSize:12];
label.textColor = [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f];
label.shadowColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:1.0f];
label.shadowOffset = CGSizeMake(0.0f, 1.0f);
label.textAlignment = UITextAlignmentCenter;
label.text = [[appDelegate activeStory] objectForKey:@"story_title"];
[navBar addSubview:label];
@ -85,6 +90,8 @@
[close addTarget:self action:@selector(doCloseOriginalStoryViewController) forControlEvents:UIControlEventTouchUpInside];
[navBar addSubview:close];
navBar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
[navBar release];
[address release];
@ -178,6 +185,7 @@
self.pageAction = nil;
self.pageTitle = nil;
self.pageUrl = nil;
self.toolbar = nil;
}
@ -191,6 +199,7 @@
[pageAction release];
[pageTitle release];
[pageUrl release];
[toolbar release];
}

View file

@ -69,7 +69,6 @@
<string key="NSFrame">{{0, 421}, {320, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -153,14 +152,6 @@
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="191373211"/>
</object>
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
@ -249,6 +240,14 @@
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="191373211"/>
</object>
<int key="connectionID">39</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -426,7 +425,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">37</int>
<int key="maxID">39</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -738,6 +737,7 @@
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -750,6 +750,7 @@
<string>UILabel</string>
<string>UITextField</string>
<string>UIBarButtonItem</string>
<string>UIToolbar</string>
<string>UIWebView</string>
</object>
</object>
@ -765,6 +766,7 @@
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -801,6 +803,10 @@
<string key="name">refresh</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">webView</string>
<string key="candidateClassName">UIWebView</string>

View file

@ -51,11 +51,11 @@
NSString *urlString = @"http://nb.local.host:8000/reader/mark_story_as_read";
NSURL *url = [NSURL URLWithString:urlString];
// ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
// [request setPostValue:[appDelegate.activeStory objectForKey:@"id"] forKey:@"story_id"];
// [request setPostValue:[appDelegate.activeFeed objectForKey:@"id"] forKey:@"feed_id"];
// [request setDelegate:self];
// [request startAsynchronous];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:[appDelegate.activeStory objectForKey:@"id"] forKey:@"story_id"];
[request setPostValue:[appDelegate.activeFeed objectForKey:@"id"] forKey:@"feed_id"];
[request setDelegate:self];
[request startAsynchronous];
}
@ -102,8 +102,9 @@
" font-weight: bold;"
" background-color: #E0E0E0;"
" border-bottom: 1px solid #A0A0A0;"
" padding: 8px 8px 8px;"
" padding: 8px 8px 6px;"
" text-shadow: 1px 1px 0 #EFEFEF;"
" overflow: hidden;"
"}"
".NB-story {"
" margin: 12px 8px;"
@ -112,16 +113,15 @@
" color: #969696;"
" font-size: 10px;"
" text-transform: uppercase;"
" margin: 0 16px 2px 0;"
" margin: 2px 8px 0px 0;"
" text-shadow: 0 1px 0 #F9F9F9;"
" float: left;"
"}"
".NB-story-tags {"
" clear: both;"
" overflow: hidden;"
" line-height: 12px;"
" height: 14px;"
" margin: 6px 0 0 0;"
" padding: 5px 0 0 0;"
" text-transform: uppercase;"
"}"
".NB-story-tag {"
@ -138,12 +138,12 @@
" -webkit-border-radius: 4px;"
"}"
".NB-story-date {"
" float: right;"
" font-size: 11px;"
" color: #252D6C;"
"}"
".NB-story-title {"
" clear: left;"
" margin: 4px 0 4px;"
"}"
"</style>"];
NSString *story_author = @"";
@ -163,13 +163,13 @@
}
NSString *storyHeader = [NSString stringWithFormat:@"<div class=\"NB-header\">"
"<div class=\"NB-story-date\">%@</div>"
"%@"
"<div class=\"NB-story-title\">%@</div>"
"%@"
"%@"
"</div>",
[story_tags length] ? [appDelegate.activeStory objectForKey:@"long_parsed_date"] : [appDelegate.activeStory objectForKey:@"short_parsed_date"],
story_author,
[story_tags length] ? [appDelegate.activeStory objectForKey:@"long_parsed_date"] : [appDelegate.activeStory objectForKey:@"short_parsed_date"],
[appDelegate.activeStory objectForKey:@"story_title"],
story_author,
story_tags];
NSString *htmlString = [NSString stringWithFormat:@"%@ %@ <div class=\"NB-story\">%@</div>",
imgCssString, storyHeader,

View file

@ -92,10 +92,9 @@
<object class="IBUIWebView" id="360874182">
<reference key="NSNextResponder" ref="471131971"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{224, 2}, {70, 35}}</string>
<string key="NSFrame">{{235, 9}, {65, 22}}</string>
<reference key="NSSuperview" ref="471131971"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor" id="624041427">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>

View file

@ -443,7 +443,7 @@
);
PREBINDING = NO;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphonesimulator4.1;
SDKROOT = iphoneos4.3;
};
name = Debug;
};
@ -458,7 +458,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
SDKROOT = iphoneos;
SDKROOT = iphoneos4.3;
};
name = Release;
};

View file

@ -233,9 +233,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="774585933"/>
<reference key="destination" ref="224086083"/>
</object>
<int key="connectionID">49</int>
<int key="connectionID">59</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@ -350,7 +350,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">56</int>
<int key="maxID">59</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -662,6 +662,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -674,6 +675,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>UILabel</string>
<string>UITextField</string>
<string>UIBarButtonItem</string>
<string>UIToolbar</string>
<string>UIWebView</string>
</object>
</object>
@ -689,6 +691,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>pageTitle</string>
<string>pageUrl</string>
<string>refresh</string>
<string>toolbar</string>
<string>webView</string>
</object>
<object class="NSMutableArray" key="dict.values">
@ -725,6 +728,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="name">refresh</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">webView</string>
<string key="candidateClassName">UIWebView</string>

View file

@ -3,9 +3,7 @@ mongoengine
django-celery
django-compress
South
django-devserver
django-extensions
guppy
psycopg2
BeautifulSoup
pyyaml

View file

@ -340,20 +340,6 @@ if not DEVELOPMENT:
INSTALLED_APPS += (
'gunicorn',
)
# elif DEVELOPMENT:
# INSTALLED_APPS += (
# 'devserver',
# )
DEVSERVER_MODULES = (
# 'devserver.modules.sql.SQLRealTimeModule',
'devserver.modules.sql.SQLSummaryModule',
'devserver.modules.profile.ProfileSummaryModule',
# Modules not enabled by default
'devserver.modules.profile.MemoryUseModule',
'devserver.modules.cache.CacheSummaryModule',
)
# ==========
# = Celery =

View file

@ -118,7 +118,7 @@ def json_view(func):
response = {'result': 'error',
'text': unicode(e)}
code = 500
if isinstance(response, HttpResponseForbidden):
return response
json = json_encode(response)