Skip to content

Commit

Permalink
Added jQuery Support for local file load
Browse files Browse the repository at this point in the history
  • Loading branch information
zigzag committed Jan 22, 2010
1 parent 679f01f commit 68e3f77
Show file tree
Hide file tree
Showing 6 changed files with 6,453 additions and 30 deletions.
26 changes: 18 additions & 8 deletions Classes/ReportController.m
Expand Up @@ -42,13 +42,9 @@ - (void)loadView {
aWebView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
// //set the web view and acceleration delagates for the web view to be itself
//// [aWebView setDelegate:self];
// //determine the path the to the index.html file in the Resources directory
// NSString *filePathString = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
// //build the URL and the request for the index.html file
NSURL *aURL = [NSURL URLWithString:@"http://redmine.finalist.hk/projects/guanxin/burndown"];
NSURLRequest *aRequest = [NSURLRequest requestWithURL:aURL];
// //load the index.html file into the web view.
[aWebView loadRequest:aRequest];

[aWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];

//
// //add the web view to the content view
[contentView addSubview:aWebView];
Expand All @@ -66,7 +62,21 @@ - (void)viewDidLoad {
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
// return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

/*
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
//CATransition *transition =[CATransition animation];
// [transition setType:kCATransitionFade];
// [transition setDuration:duration];
// [self.view.layer addAnimation:transition forKey:@"idunno"];
}
*/

/*
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
}
*/

Expand Down
16 changes: 16 additions & 0 deletions cnpc.xcodeproj/project.pbxproj
Expand Up @@ -11,6 +11,8 @@
0033E30411097B4100E01B07 /* fuel.png in Resources */ = {isa = PBXBuildFile; fileRef = 0033E30111097B4100E01B07 /* fuel.png */; };
0033E31811097C4E00E01B07 /* star.png in Resources */ = {isa = PBXBuildFile; fileRef = 0033E31711097C4E00E01B07 /* star.png */; };
007D4C10110984DB00DC7299 /* ReportController.m in Sources */ = {isa = PBXBuildFile; fileRef = 007D4C0F110984DB00DC7299 /* ReportController.m */; };
007D4C5E110995A200DC7299 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 007D4C5D110995A200DC7299 /* index.html */; };
007D4C8A11099D0500DC7299 /* jquery-1.4.js in Resources */ = {isa = PBXBuildFile; fileRef = 007D4C781109997600DC7299 /* jquery-1.4.js */; };
1D3623260D0F684500981E51 /* cnpcAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* cnpcAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
Expand All @@ -25,6 +27,8 @@
0033E31711097C4E00E01B07 /* star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star.png; sourceTree = "<group>"; };
007D4C0E110984DB00DC7299 /* ReportController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportController.h; sourceTree = "<group>"; };
007D4C0F110984DB00DC7299 /* ReportController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportController.m; sourceTree = "<group>"; };
007D4C5D110995A200DC7299 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = "<group>"; };
007D4C781109997600DC7299 /* jquery-1.4.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "jquery-1.4.js"; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* cnpcAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cnpcAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* cnpcAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = cnpcAppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -51,6 +55,14 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
007D4C771109997600DC7299 /* js */ = {
isa = PBXGroup;
children = (
007D4C781109997600DC7299 /* jquery-1.4.js */,
);
path = js;
sourceTree = "<group>";
};
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -94,6 +106,8 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
007D4C771109997600DC7299 /* js */,
007D4C5D110995A200DC7299 /* index.html */,
0033E31711097C4E00E01B07 /* star.png */,
0033E30011097B4100E01B07 /* bar-chart.png */,
0033E30111097B4100E01B07 /* fuel.png */,
Expand Down Expand Up @@ -155,10 +169,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
007D4C8A11099D0500DC7299 /* jquery-1.4.js in Resources */,
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
0033E30311097B4100E01B07 /* bar-chart.png in Resources */,
0033E30411097B4100E01B07 /* fuel.png in Resources */,
0033E31811097C4E00E01B07 /* star.png in Resources */,
007D4C5E110995A200DC7299 /* index.html in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
32 changes: 21 additions & 11 deletions cnpc.xcodeproj/zig.mode1v3
Expand Up @@ -231,6 +231,8 @@
<key>Layout</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
Expand Down Expand Up @@ -269,14 +271,18 @@
<string>29B97314FDCFA39411CA2CEA</string>
<string>080E96DDFE201D6D7F000001</string>
<string>29B97317FDCFA39411CA2CEA</string>
<string>007D4C771109997600DC7299</string>
<string>1C37FBAC04509CD000000102</string>
<string>007D4C7F11099CEA00DC7299</string>
<string>007D4C8B11099D1D00DC7299</string>
<string>1C37FABC05509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>5</integer>
<integer>1</integer>
<integer>0</integer>
<integer>20</integer>
<integer>19</integer>
<integer>18</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
Expand Down Expand Up @@ -310,34 +316,33 @@
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>ReportController.m</string>
<string>jquery-1.4.js</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>ReportController.m</string>
<string>jquery-1.4.js</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>007D4C4811098A5400DC7299</string>
<string>007D4C8D11099D1D00DC7299</string>
<key>history</key>
<array>
<string>0033E30811097BBE00E01B07</string>
<string>0033E30A11097BBE00E01B07</string>
<string>007D4BF61109847000DC7299</string>
<string>007D4C13110984F900DC7299</string>
<string>007D4C2E1109885900DC7299</string>
<string>007D4C32110988E900DC7299</string>
<string>007D4C8011099CEA00DC7299</string>
<string>007D4C8111099CEA00DC7299</string>
<string>007D4C8211099CEA00DC7299</string>
<string>007D4C8C11099D1D00DC7299</string>
</array>
<key>prevStack</key>
<array>
Expand All @@ -359,6 +364,11 @@
<string>007D4C18110984F900DC7299</string>
<string>007D4C19110984F900DC7299</string>
<string>007D4C2F1109885900DC7299</string>
<string>007D4C8411099CEA00DC7299</string>
<string>007D4C8511099CEA00DC7299</string>
<string>007D4C8611099CEA00DC7299</string>
<string>007D4C8711099CEA00DC7299</string>
<string>007D4C8811099CEA00DC7299</string>
</array>
</dict>
<key>SplitCount</key>
Expand Down

0 comments on commit 68e3f77

Please sign in to comment.