Merge remote branch 'cappuccino/jake' into enstore_jake

Conflicts:
	AppKit/CPTableView.j
This commit is contained in:
Klaas Pieter Annema
2010-01-27 10:08:48 +01:00
18 changed files with 508 additions and 329 deletions
+16 -6
View File
@@ -12,6 +12,8 @@ Implemented class methods:
Opera : All except resizeLeftRightCursor resizeUpDownCursor operationNotAllowedCursor dragCopyCursor dragLinkCursor contextualMenuCursor openHandCursor closedHandCursor disappearingItemCursor // Opera does not support url cursors so these won't work with images
*/
#include "Platform/Platform.h"
var currentCursor = nil,
cursorStack = [],
cursors = {},
@@ -186,12 +188,12 @@ var currentCursor = nil,
+ (void)hide
{
document.body.style.cursor = 'none'; // Not supported in IE
[self _setCursorCSS:"none"]; // Not supported in IE
}
+ (void)unhide
{
document.body.style.cursor = [currentCursor _cssString];
[self _setCursorCSS:[currentCursor _cssString]]
}
+ (void)setHiddenUntilMouseMoves:(BOOL)flag
@@ -217,17 +219,25 @@ var currentCursor = nil,
- (void)set
{
document.body.style.cursor = _cssString;
currentCursor = self;
#if PLATFORM(DOM)
var platformWindows = [[CPPlatformWindow visiblePlatformWindows] allObjects];
for (var i = 0, count = [platformWindows count]; i < count; i++)
platformWindows[i]._DOMWindow.document.body.style.cursor = _cssString;
[[self class] _setCursorCSS:_cssString];
#endif
}
+ (void)_setCursorCSS:(CPString)aString
{
#if PLATFORM(DOM)
[CPPlatformWindow primaryPlatformWindow]._DOMBodyElement.style.cursor = aString;
var platformWindows = [[CPPlatformWindow visiblePlatformWindows] allObjects];
for (var i = 0, count = [platformWindows count]; i < count; i++)
platformWindows[i]._DOMBodyElement.style.cursor = aString;
#endif
}
- (void)push
{
currentCursor = cursorStack.push(self);
+158 -72
View File
@@ -137,7 +137,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
BOOL _reloadAllRows;
Object _objectValues;
CPRange _exposedRows;
CPIndexSet _exposedRows;
CPIndexSet _exposedColumns;
Object _dataViewsForTableColumns;
@@ -1057,10 +1057,6 @@ window.setTimeout(function(){
{
var y = aPoint.y;
if (NO)
{
}
var row = FLOOR(y / (_rowHeight + _intercellSpacing.height));
if (row >= _numberOfRows)
@@ -1269,28 +1265,13 @@ window.setTimeout(function(){
- (void)scrollRowToVisible:(int)rowIndex
{
var scrollView = [[self superview] superview];
if ([scrollView isKindOfClass:[CPScrollView class]] && [scrollView documentView] === self)
{
var rect = CGRectMake([scrollView._contentView bounds].origin.x, rowIndex*[self rowHeight], 1, [self rowHeight]);
[[[scrollView contentView] documentView] scrollRectToVisible: rect];
}
[self scrollRectToVisible:[self rectOfRow:rowIndex]];
}
- (void)scrollColumnToVisible:(int)columnIndex
{
var rect = [self rectOfColumn:columnIndex];
var scrollView = [[self superview] superview];
if ([scrollView isKindOfClass:[CPScrollView class]] && [scrollView documentView] === self)
{
var rect = CGRectMake(rect.origin.x, [scrollView._contentView bounds].origin.y, rect.size.width, 1);
[[[scrollView contentView] documentView] scrollRectToVisible: rect];
/*FIX ME: tableview header isn't rendered until you click the horizontal scroller (or scroll)*/
}
[self scrollRectToVisible:[self rectOfColumn:columnIndex]];
/*FIX ME: tableview header isn't rendered until you click the horizontal scroller (or scroll)*/
}
//Persistence
@@ -1404,7 +1385,7 @@ window.setTimeout(function(){
if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)])
[defaultCenter
addObserver:_delegate
selector:@selector(tableViewColumnDidMove:)
selector:@selector(tableViewColumnDidResize:)
name:CPTableViewColumnDidResizeNotification
object:self];
@@ -1503,6 +1484,64 @@ window.setTimeout(function(){
return view;
}
- (CPImage)dragViewForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CPPointPointer)dragImageOffset
{
var draggedRowsArray = [],
colCount = [theTableColumns count],
rowsCount = [dragRows count],
firstRowIndex = [dragRows firstIndex],
rowIndexesLength = [dragRows lastIndex] - firstRowIndex + 1,
firstRowRect = [self rectOfRow:firstRowIndex],
exposedMinX = CGRectGetMinX([self exposedClipRect]),
dragViewWidth = CGRectGetWidth([self exposedClipRect]),
dragViewHeight = rowIndexesLength * _rowHeight,
location = [self convertPoint:[dragEvent locationInWindow] fromView:nil];
dragImageOffset.x = exposedMinX + CGRectGetMinX(firstRowRect) - location.x + dragViewWidth/2;
dragImageOffset.y = CGRectGetMinY(firstRowRect) - location.y + dragViewHeight/2;
var draggedView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, dragViewWidth, dragViewHeight)];
[dragRows getIndexes:draggedRowsArray maxCount:-1 inIndexRange:CPMakeRange(firstRowIndex, rowIndexesLength)];
// calculate the dragImageOffset : we want the ghost row to be where the real row is.
for (var i = 0; i < rowsCount ; i++)
{
var rowIndex = draggedRowsArray[i];
var dataViewOriginY = (rowIndex - firstRowIndex) * [self rowHeight];
for (var c = 0; c < colCount; c++)
{
var column = [theTableColumns objectAtIndex:c],
tableColumnUID = [column UID],
dataView = _dataViewsForTableColumns[tableColumnUID][rowIndex];
var frame = [dataView frame];
frame.origin.y = dataViewOriginY;
frame.origin.x -= exposedMinX;
// Mega hack: The default CPView impl. doesn't implement -copy so we copy the innerHTML
// It ok because it's a temporary view and we won't have to interact with it later ...
// ... except we want the text to be normal when it's a selected row (unset the highlighted theme state)
// and that does'nt work.
// Possible fix: only for default dataviews (CPTextField), we can implement -copy and unset the state
var html = dataView._DOMElement.innerHTML;
var dataViewCopy = [[CPView alloc] initWithFrame:frame];
dataViewCopy._DOMElement.innerHTML = html;
// This works (don't know how ?!). Until we fix the previous bug, we can stay with a white transparent bg
// so at least we have a visible feedback of the dragged row. Maybe less opaque ...
[dataViewCopy setBackgroundColor:[CPColor colorWithWhite:1 alpha:0.7]];
[draggedView addSubview:dataViewCopy];
}
}
return draggedView;
}
- (void)setDraggingSourceOperationMask:(CPDragOperation)mask forLocal:(BOOL)isLocal
{
//ignoral local for the time being since only one capp app can run at a time...
@@ -1837,7 +1876,11 @@ window.setTimeout(function(){
[self drawBackgroundInClipRect:exposedRect];
[self drawGridInClipRect:exposedRect];
[self highlightSelectionInClipRect:exposedRect];
}
- (void)drawRect:(CGRect)aRect
{
[_tableDrawView display];
}
- (void)drawBackgroundInClipRect:(CGRect)aRect
@@ -2141,7 +2184,7 @@ window.setTimeout(function(){
var row = [self rowAtPoint:aPoint];
//if the user clicks outside a row then deslect everything
if(row < 0 && _allowsEmptySelection)
if (row < 0 && _allowsEmptySelection)
[self selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO];
[self _noteSelectionIsChanging];
@@ -2200,7 +2243,7 @@ window.setTimeout(function(){
var pboard = [CPPasteboard pasteboardWithName:CPDragPboard];
if([self canDragRowsWithIndexes:_draggedRowIndexes atPoint:aPoint] && [_dataSource tableView:self writeRowsWithIndexes:_draggedRowIndexes toPasteboard:pboard])
{
{§
var currentEvent = [CPApp currentEvent],
offset = CPPointMakeZero();
@@ -2225,6 +2268,7 @@ window.setTimeout(function(){
}
[self dragView:view at:offset offset:CPPointMakeZero() event:[CPApp currentEvent] pasteboard:pboard source:self slideBack:YES];
return NO;
}
}
@@ -2318,7 +2362,28 @@ window.setTimeout(function(){
*/
- (CPDragOperation)draggingEntered:(id)sender
{
var dropOperation = [self _proposedDropOperation],
draggingLocation = [sender draggingLocation],
row;
var location = [self convertPoint:draggingLocation fromView:nil];
row = [self _proposedRowAtPoint:location];
if(_retargetedDropRow !== nil)
row = _retargetedDropRow;
var draggedTypes = [self registeredDraggedTypes],
count = [draggedTypes count],
i;
for (i = 0; i < count; i++)
{
if ([[[sender draggingPasteboard] types] containsObject:[draggedTypes objectAtIndex: i]])
return [self _validateDrop:sender proposedRow:row proposedDropOperation:dropOperation];
}
return CPDragOperationNone;
}
/*
@@ -2334,11 +2399,16 @@ window.setTimeout(function(){
*/
- (void)draggingEnded:(id)sender
{
_retargetedDropOperation = nil;
_retargetedDropRow = nil;
[_dropOperationFeedbackView setHidden:YES];
[self _draggingEnded];
}
- (void)_draggingEnded
{
_retargetedDropOperation = nil;
_retargetedDropRow = nil;
_draggedRowIndexes = [CPIndexSet indexSet];
[_dropOperationFeedbackView setHidden:YES];
}
/*
@ignore
*/
@@ -2363,58 +2433,75 @@ window.setTimeout(function(){
/*
@ignore
*/
- (CPInteger)_proposedRowAtPoint:(CGPoint)dragPoint
{
var numberOfRows = [self numberOfRows],
row;
// cocoa seems to jump to the next row when we approach the below row
dragPoint.y += FLOOR(_rowHeight/4);
if (dragPoint.y > numberOfRows * (_rowHeight + _intercellSpacing.height))
{
if ([self _proposedDropOperation] === CPTableViewDropAbove)
row = numberOfRows;
else
row = numberOfRows - 1;
}
else
row = [self rowAtPoint:dragPoint];
return row;
}
- (void)_validateDrop:(id)info proposedRow:(CPInteger)row proposedDropOperation:(CPTableViewDropOperation)dropOperation
{
if(_implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_)
return [_dataSource tableView:self validateDrop:info proposedRow:row proposedDropOperation:dropOperation];
return CPDragOperationNone;
}
- (CPDragOperation)draggingUpdated:(id)sender
{
var dropOperation = [self _proposedDropOperation],
numberOfRows = [self numberOfRows],
draggingLocation = [sender draggingLocation],
dragOperation,
row;
var location = [self convertPoint:draggingLocation fromView:nil];
var location = [sender draggingLocation],
scrollview = [[self superview] superview],
contentview = [scrollview contentView],
dropOperation = [self _proposedDropOperation];
location = [contentview convertPoint:location fromView:nil];
if(_headerView)
location.y += CGRectGetHeight([_headerView bounds]);
var row = [self rowAtPoint:location] - 1;
//FIX ME: if the operation is CPTableViewDropAbove, we should be able to drop BELOW...
if(row < 0 && dropOperation === CPTableViewDropOn)
row = [self numberOfRows] - 1;
else if(row < 0)
row = [self numberOfRows] - 1;
if(!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_))
var operation = CPDragOperationNone;
else
var operation = [_dataSource tableView:self validateDrop:sender proposedRow:row proposedDropOperation:dropOperation];
row = [self _proposedRowAtPoint:location];
dragOperation = [self _validateDrop:sender proposedRow:row proposedDropOperation:dropOperation];
if(_retargetedDropRow !== nil)
row = _retargetedDropRow;
//if the user forces -1 then we should highlight the whole tabelview
var rowRect;
if(_retargetedDropRow === -1)
var rowRect = [self exposedClipRect];
rowRect = [self exposedClipRect];
else
var rowRect = [self rectOfRow:row];
rowRect = [self rectOfRow:row];
var exposedClipRect = [self exposedClipRect];
var visibleWidth = _CGRectGetWidth(exposedClipRect);
if([[[self superview] superview] isKindOfClass:[CPScrollView class]])
var visibleWidth = _CGRectGetWidth([[[self superview] superview] bounds]);
else
var visibleWidth = row.size.width;
rowRect = _CGRectMake(_CGRectGetMinX(exposedClipRect), rowRect.origin.y, visibleWidth, rowRect.size.height);
rowRect = _CGRectMake(_CGRectGetMinX([self _exposedRect]), rowRect.origin.y, visibleWidth, rowRect.size.height);
[_dropOperationFeedbackView setDropOperation:[self _proposedDropOperation]];
[_dropOperationFeedbackView setHidden:NO];
[_dropOperationFeedbackView setDropOperation:dropOperation];
[_dropOperationFeedbackView setHidden:(dragOperation == CPDragOperationNone)];
[_dropOperationFeedbackView setFrame:rowRect];
[_dropOperationFeedbackView setCurrentRow:row];
[self addSubview:_dropOperationFeedbackView];
return operation;
// FIXME : Maybe we should do this in a timer outside this method. Problem: we don't know when the scroll ends and neighter when the next -draggingUpdated is called. Which one will come first ?
if (row > 0 && location.y - CGRectGetMinY(exposedClipRect) < _rowHeight)
[self scrollRowToVisible:row - 1];
else if (row < numberOfRows && CGRectGetMaxY(exposedClipRect) - location.y < _rowHeight)
[self scrollRowToVisible:row + 1];
return dragOperation;
}
/*
@@ -2435,11 +2522,9 @@ window.setTimeout(function(){
- (BOOL)performDragOperation:(id)sender
{
var operation = [self _proposedDropOperation],
location = [sender draggingLocation],
scrollview = [[self superview] superview],
contentview = [scrollview contentView];
draggingLocation = [sender draggingLocation];
location = [contentview convertPoint:location fromView:scrollview];
var location = [self convertPoint:draggingLocation fromView:nil];
if(_retargetedDropRow !== nil)
var row = _retargetedDropRow;
@@ -2471,7 +2556,8 @@ window.setTimeout(function(){
we're using this because we drag views instead of images so we can get the rows themselves to actually drag
*/
- (void)draggedView:(CPImage)aView endedAt:(CGPoint)aLocation operation:(CPDragOperation)anOperation
{
{
[self _draggingEnded];
[self draggedImage:aView endedAt:aLocation operation:anOperation];
}
@@ -2897,4 +2983,4 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
//CGContextStrokeLineSegments(context, [aRect.origin.x + 8, aRect.origin.y + 8, 300 , aRect.origin.y + 8]);
}
}
@end
@end
+6 -6
View File
@@ -501,11 +501,11 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
if (document.attachEvent)
{
CPTextFieldCachedSelectStartFunction = document.body.onselectstart;
CPTextFieldCachedDragFunction = document.body.ondrag;
CPTextFieldCachedSelectStartFunction = [[self window] platformWindow]._DOMBodyElement.onselectstart;
CPTextFieldCachedDragFunction = [[self window] platformWindow]._DOMBodyElement.ondrag;
document.body.ondrag = function () {};
document.body.onselectstart = function () {};
[[self window] platformWindow]._DOMBodyElement.ondrag = function () {};
[[self window] platformWindow]._DOMBodyElement.onselectstart = function () {};
}
[self textDidFocus:[CPNotification notificationWithName:CPTextFieldDidFocusNotification object:self userInfo:nil]];
@@ -548,8 +548,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
CPTextFieldCachedSelectStartFunction = nil;
CPTextFieldCachedDragFunction = nil;
document.body.ondrag = CPTextFieldCachedDragFunction
document.body.onselectstart = CPTextFieldCachedSelectStartFunction
[[self window] platformWindow]._DOMBodyElement.ondrag = CPTextFieldCachedDragFunction;
[[self window] platformWindow]._DOMBodyElement.onselectstart = CPTextFieldCachedSelectStartFunction;
}
#endif
+3
View File
@@ -6,6 +6,9 @@ $BUILD_PATH = FILE.join($BUILD_DIR, $CONFIGURATION, 'AppKit');
AppKitFiles = new FileList("**/*.j").exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**/*', 'Tools/**/*', "Platform/DOM/CPPlatform.j", "Platform/DOM/CPPlatformString.j");
FIXME_fileDependency (FILE.join("Platform", "CPPlatform.j"), FILE.join("Platform", "DOM", "CPPlatform.j"));
FIXME_fileDependency (FILE.join("Platform", "CPPlatformString.j"), FILE.join("Platform", "DOM", "CPPlatformString.j"));
appKitTask = framework ("AppKit", function(appKitTask)
{
appKitTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "AppKit.build", $CONFIGURATION))
+13 -4
View File
@@ -22,7 +22,8 @@
CPPlatformDidClearBodyElementNotification = @"CPPlatformDidClearBodyElementNotification";
var screenNeedsInitialization = NO;
var screenNeedsInitialization = NO,
mainBodyElement = nil;
@implementation CPPlatform : CPBasePlatform
{
@@ -75,6 +76,14 @@ var screenNeedsInitialization = NO;
window.cpHide();
}
+ (DOMElement)mainBodyElement
{
if (!mainBodyElement)
mainBodyElement = document.getElementById("cappuccino-body") || document.body;
return mainBodyElement;
}
+ (void)initializeScreenIfNecessary
{
if (!screenNeedsInitialization)
@@ -82,11 +91,11 @@ var screenNeedsInitialization = NO;
screenNeedsInitialization = NO;
var DOMBodyElement = document.body;
var bodyElement = [self mainBodyElement];
// Get rid of any of the original contents of the page.
DOMBodyElement.innerHTML = "";
DOMBodyElement.style.overflow = "hidden";
bodyElement.innerHTML = "";
bodyElement.style.overflow = "hidden";
if (document.documentElement)
document.documentElement.style.overflow = "hidden";
+17 -11
View File
@@ -44,34 +44,40 @@ var DOMSpanElement = nil,
+ (void)createDOMElements
{
var DOMIFrameElement = document.createElement("iframe");
DOMIFrameElement.name = name = "iframe_" + FLOOR(RAND() * 10000);
// necessary for Safari caching bug:
DOMIFrameElement.name = "iframe_" + FLOOR(RAND() * 10000);
DOMIFrameElement.style.position = "absolute";
DOMIFrameElement.style.left = "-1000px";
DOMIFrameElement.style.top = "-1000px";
// TODO: investigate a better way to make this work in IE:
DOMIFrameElement.style.width = "1000px";
DOMIFrameElement.style.height = "1000px";
DOMIFrameElement.style.left = "-100px";
DOMIFrameElement.style.top = "-100px";
DOMIFrameElement.style.width = "1px";
DOMIFrameElement.style.height = "1px";
DOMIFrameElement.style.borderWidth = "0px";
DOMIFrameElement.style.overflow = "hidden";
DOMIFrameElement.style.zIndex = 100000000000;
document.body.appendChild(DOMIFrameElement);
var bodyElement = [CPPlatform mainBodyElement];
bodyElement.appendChild(DOMIFrameElement);
var DOMIFrameDocument = (DOMIFrameElement.contentDocument || DOMIFrameElement.contentWindow.document);
DOMIFrameDocument.write("<html><head></head><body></body></html>");
DOMIFrameDocument.close();
DOMSpanElement = DOMIFrameDocument.createElement("span");
// IE needs this wide <div> to prevent unwanted text wrapping:
var DOMDivElement = DOMIFrameDocument.createElement("div");
DOMDivElement.style.position = "absolute";
DOMDivElement.style.width = "100000px";
DOMIFrameDocument.body.appendChild(DOMDivElement);
DOMSpanElement = DOMIFrameDocument.createElement("span");
DOMSpanElement.style.position = "absolute";
DOMSpanElement.style.whiteSpace = "pre";
DOMSpanElement.style.visibility = "visible";
DOMSpanElement.style.padding = "0px";
DOMSpanElement.style.margin = "0px";
DOMIFrameDocument.body.appendChild(DOMSpanElement);
DOMDivElement.appendChild(DOMSpanElement);
}
+ (void)platformDidClearBodyElement:(CPNotification)aNotification
+7 -7
View File
@@ -264,7 +264,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
{
var theDocument = _DOMWindow.document;
_DOMBodyElement = theDocument.body;
_DOMBodyElement = theDocument.getElementById("cappuccino-body") || theDocument.body;
// FIXME: Always do this?
if ([CPPlatform supportsDragAndDrop])
@@ -401,8 +401,8 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
_DOMWindow.onmousewheel = scrollEventCallback;
theDocument.onmousewheel = scrollEventCallback;
theDocument.body.ondrag = function () { return NO; };
theDocument.body.onselectstart = function () { return _DOMWindow.event.srcElement === _DOMPasteboardElement; };
_DOMBodyElement.ondrag = function () { return NO; };
_DOMBodyElement.onselectstart = function () { return _DOMWindow.event.srcElement === _DOMPasteboardElement; };
_DOMWindow.attachEvent("onbeforeunload", function()
{
@@ -423,8 +423,8 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
_DOMWindow.onmousewheel = NULL;
theDocument.onmousewheel = NULL;
theDocument.body.ondrag = NULL;
theDocument.body.onselectstart = NULL;
_DOMBodyElement.ondrag = NULL;
_DOMBodyElement.onselectstart = NULL;
//_DOMWindow.removeEvent("beforeunload", this);
@@ -462,7 +462,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
_DOMWindow.cpSetShadowStyle(_shadowStyle);
}
_DOMWindow.document.body.style.cursor = [[CPCursor currentCursor] _cssString];
_DOMBodyElement.style.cursor = [[CPCursor currentCursor] _cssString];
[self registerDOMWindow];
}
@@ -497,7 +497,7 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
DOMDragElement.style.left = -_CGRectGetWidth(draggedWindowFrame) + "px";
DOMDragElement.style.top = -_CGRectGetHeight(draggedWindowFrame) + "px";
document.body.appendChild(DOMDragElement);
_DOMBodyElement.appendChild(DOMDragElement);
var draggingOffset = [dragServer draggingOffset];
+3 -3
View File
@@ -882,16 +882,16 @@
]
isVertical:NO]);
var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices:
/*var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices:
[
[_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-left.png" size:CGSizeMake(10.0, 15.0)],
[_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-center.png" size:CGSizeMake(1.0, 15.0)],
[_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-right.png" size:CGSizeMake(10.0, 15.0)]
]
isVertical:NO]);
isVertical:NO]);*/
[scroller setValue:knobColor forThemeAttribute:@"knob-color"];
[scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateDisabled];
//[scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateDisabled];
[scroller setFloatValue:0.1];
[scroller setKnobProportion:0.5];
+24 -22
View File
@@ -39,29 +39,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CursorTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CursorTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
+86 -42
View File
@@ -22,13 +22,12 @@ CPLogRegister(CPLogConsole);
dataSet1 = [],
dataSet2 = [];
for(var i = 1; i < 11; i++)
for(var i = 1; i < 100; i++)
{
dataSet1[i - 1] = i;
dataSet2[i - 1] = i + 10;
}
var window1 = [[CPWindow alloc] initWithContentRect:CGRectMake(50, 50, 500, 400) styleMask:CPTitledWindowMask],
view = [window1 contentView];
@@ -57,16 +56,12 @@ CPLogRegister(CPLogConsole);
iconImage = [[CPImage alloc] initWithContentsOfFile:"http://cappuccino.org/images/favicon.png" size:CGSizeMake(16,16)];
var textDataView = [CPTextField new];
// [textDataView setFrameSize:CGSizeMake(200,32)];
// [textDataView setValue:CGInsetMake(9.0, 7.0, 5.0, 8.0) forThemeAttribute:@"content-inset"];
//[textDataView setValue:CGInsetMake(9.0, 7.0, 5.0, 8.0) forThemeAttribute:@"content-inset"];
//[textDataView setValue:CGInsetMake(4.0, 4.0, 3.0, 4.0) forThemeAttribute:@"bezel-inset"];
// [textDataView setValue:CGInsetMake(2, 0, 0, 0) forThemeAttribute:@"focus-inset"];
// [textDataView setValue:CGInsetMake(0, 0, 0, 0) forThemeAttribute:@"focus-inset" inState:CPThemeStateBezeled|CPThemeStateEditing];
[textDataView setValue:[CPColor whiteColor] forThemeAttribute:@"text-color" inState:CPThemeStateHighlighted];
[textDataView setValue:[CPFont systemFontOfSize:12] forThemeAttribute:@"font" inState:CPThemeStateHighlighted];
//[textDataView setValue:CGSizeMake(1,1) forThemeAttribute:@"text-shadow-offset"];
//[textDataView setValue:[CPColor blackColor] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateHighlighted];
@@ -84,7 +79,6 @@ CPLogRegister(CPLogConsole);
[column setWidth:200.0];
[column setMinWidth:150.0];
[column setDataView:textDataView];
[column setEditable:YES];
[tableView addTableColumn:column];
}
@@ -94,7 +88,7 @@ CPLogRegister(CPLogConsole);
[tableView setColumnAutoresizingStyle:CPTableViewUniformColumnAutoresizingStyle];
var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(100, 100, CGRectGetWidth([view bounds]), CGRectGetHeight([view bounds]))];
[tableView setRowHeight:32.0];
[tableView setRowHeight:22.0];
[scrollView setDocumentView:tableView];
[scrollView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
@@ -104,7 +98,6 @@ CPLogRegister(CPLogConsole);
[tableView setDelegate:self];
[tableView setDataSource:self];
[tableView setRowHeight:22.0];
[tableView setVerticalMotionCanBeginDrag:NO];
[tableView setDraggingDestinationFeedbackStyle:CPTableViewDropOn];
[tableView registerForDraggedTypes:[CPArray arrayWithObject:tableTestDragType]];
@@ -259,9 +252,19 @@ CPLogRegister(CPLogConsole);
return YES;
}
- (void)tableViewSelectionDidChange:(id)blah
- (void)tableViewSelectionDidChange:(id)notification
{
CPLogConsole(_cmd + [notification description]);
}
- (void)tableViewSelectionIsChanging:(id)notification
{
CPLogConsole(_cmd + [notification description]);
}
- (void)tableViewColumnDidResize:(id)notification
{
CPLogConsole(_cmd + [notification description]);
}
//- (CPIndexSet)tableView:(CPTableView)tableView selectionIndexesForProposedSelection:(CPIndexSet)proposedSelectionIndexes
@@ -283,14 +286,7 @@ CPLogRegister(CPLogConsole);
- (BOOL)tableView:(CPTableView)aTableView writeRowsWithIndexes:(CPIndexSet)rowIndexes toPasteboard:(CPPasteboard)pboard
{
//var selectedRows = [aTableView selectedRowIndexes];
[pboard declareTypes:[CPArray arrayWithObject:tableTestDragType] owner:self];
if(aTableView === tableView)
var data = [dataSet1 objectsAtIndexes:rowIndexes];
else if(aTableView === tableView2)
var data = [dataSet2 objectsAtIndexes:rowIndexes];
var data = [rowIndexes, [aTableView UID]];
var encodedData = [CPKeyedArchiver archivedDataWithRootObject:data];
[pboard declareTypes:[CPArray arrayWithObject:tableTestDragType] owner:self];
@@ -306,42 +302,57 @@ CPLogRegister(CPLogConsole);
{
// console.log([aTableView rectOfRow:0]);
//console.log(row)
[[aTableView window] orderFront:nil];
if(aTableView === tableView)
[aTableView setDropRow:row dropOperation:CPTableViewDropOn];
else
[aTableView setDropRow:row dropOperation:CPTableViewDropAbove];
return CPDragOperationMove;
}
- (BOOL)tableView:(CPTableView)aTableView acceptDrop:(id)info row:(int)row dropOperation:(CPTableViewDropOperation)operation
{
{
var pboard = [info draggingPasteboard],
rowData = [pboard dataForType:tableTestDragType];
rowData = [pboard dataForType:tableTestDragType],
tables = [tableView, tableView2],
dataSets = [dataSet1, dataSet2];
rowData = [CPKeyedUnarchiver unarchiveObjectWithData:rowData];
var sourceIndexes = rowData[0],
sourceTableUID = rowData[1];
var index = (aTableView == tableView) ? 1 : 0;
var destinationTable = tables[1 - index],
sourceTable = tables[index],
destinationDataSet = dataSets[1 - index],
sourceDataSet = dataSets[index];
//remember to check the operation/info
if(aTableView === tableView)
if(operation | CPDragOperationMove)
{
//[dataSet1 insertObjects:(CPArray)objects atIndexes:(CPIndexSet)indexes];
}
else if(aTableView === tableView2)
{
//setup indices
//console.log("drag source");
//console.log([[CPDragServer sharedDragServer] draggingSource]);
var indices = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(row, [rowData count])];
[dataSet2 insertObjects:rowData atIndexes:indices];
console.log(operation);
if(operation | CPDragOperationMove)
if (sourceTableUID == [aTableView UID])
{
[dataSet1 removeObjectsInArray:rowData];
[tableView reloadData];
[tableView selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO];
[destinationDataSet moveIndexes:sourceIndexes toIndex:row];
[destinationTable reloadData];
var destIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(row, [sourceIndexes count])];
[destinationTable selectRowIndexes:destIndexes byExtendingSelection:NO];
}
else
{
var destIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(row, [sourceIndexes count])];
var sourceObjects = [sourceDataSet objectsAtIndexes:sourceIndexes];
[destinationDataSet insertObjects:sourceObjects atIndexes:destIndexes];
[destinationTable reloadData];
[destinationTable selectRowIndexes:destIndexes byExtendingSelection:NO];
[sourceDataSet removeObjectsAtIndexes:sourceIndexes];
[sourceTable reloadData];
[sourceTable selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO];
}
}
@@ -353,4 +364,37 @@ CPLogRegister(CPLogConsole);
//for convenience
}
@end
@end
@implementation CPArray (MoveIndexes)
- (void)moveIndexes:(CPIndexSet)indexes toIndex:(int)insertIndex
{
var aboveCount = 0,
object,
removeIndex;
var index = [indexes lastIndex];
while (index != CPNotFound)
{
if (index >= insertIndex)
{
removeIndex = index + aboveCount;
aboveCount ++;
}
else
{
removeIndex = index;
insertIndex --;
}
object = [self objectAtIndex:removeIndex];
[self removeObjectAtIndex:removeIndex];
[self insertObject:object atIndex:insertIndex];
index = [indexes indexLessThanIndex:index];
}
}
@end
+24 -22
View File
@@ -39,29 +39,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading TableTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading TableTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -55,29 +55,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -39,29 +39,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -40,29 +40,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -39,29 +39,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -40,29 +40,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
@@ -39,29 +39,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<div id="cappuccino-body">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading __project.name__...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
+7 -2
View File
@@ -79,7 +79,6 @@ if (!SYSTEM.env["CAPP_BUILD"] && SYSTEM.env["STEAM_BUILD"])
if (!SYSTEM.env["CONFIG"])
SYSTEM.env["CONFIG"] = "Release";
// TODO: deprecate these globals
global.ENV = SYSTEM.env;
global.ARGV = SYSTEM.args
global.FILE = FILE;
@@ -87,7 +86,7 @@ global.OS = OS;
global.task = JAKE.task;
global.directory = JAKE.directory;
//global.file = JAKE.file;
global.file = JAKE.file;
global.filedir = JAKE.filedir;
global.FileList = JAKE.FileList;
@@ -108,6 +107,12 @@ global.$BUILD_CJS_CAPPUCCINO_FRAMEWORKS = FILE.join($BUILD_CJS_CAPPUCCINO, "Fram
global.$HOME_DIR = FILE.absolute(FILE.dirname(module.path));
global.$LICENSE_FILE = FILE.absolute(FILE.join(FILE.dirname(module.path), 'LICENSE'));
global.FIXME_fileDependency = function(destinationPath, sourcePath)
{
file(destinationPath, [sourcePath], function(){
FILE.touch(destinationPath);
});
};
// logic to determine which packages should be loaded but are not.
// used in serializedENV()