Skip to content

Commit

Permalink
Remove Tapx.TEST_MODE, always allow Modalbox to be used, never window…
Browse files Browse the repository at this point in the history
….confirm()
  • Loading branch information
hlship committed Jun 7, 2011
1 parent 6392cbb commit e1676b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public static void contributeComponentClassResolver(Configuration<LibraryMapping
{
configuration.add(new LibraryMapping("tapx", "com.howardlewisship.tapx.core"));

// What's this about? Because other modules in the TapX project ALSO contribute "tapx"
// What's this about? Because other modules in the TapX project ALSO contribute "tapx"
// mapped to other sub-packages of "com.howardlewisship.tapx", there would otherwise
// be a difference in how asset URL paths are created dependening on whether it was just
// tapx-core or tapx-core plus (for example) tapx-datefield. Since the tapx-core.css file relies
// tapx-core or tapx-core plus (for example) tapx-datefield. Since the tapx-core.css file relies
// on a particular layout so that it can reference images that are part of tapestry-core.jar,
// we need at least two mappings for the tapx virtual folder.

configuration.add(new LibraryMapping("tapx", "com.howardlewisship.tapx.placeholder"));
}

Expand Down Expand Up @@ -181,9 +181,7 @@ public static void basicConditions(MappedConfiguration<String, Condition> config
*/
@Contribute(JavaScriptStack.class)
@TapxCore
public static void basicCoreStackElements(OrderedConfiguration<StackExtension> configuration,
@Symbol(CoreSymbols.TEST_MODE)
boolean testMode)
public static void basicCoreStackElements(OrderedConfiguration<StackExtension> configuration)
{
configuration.add("CoreJS", new StackExtension(StackExtensionType.LIBRARY, PATH + "/tapx.js"));
configuration.add("CoreJS-MultiSelect", new StackExtension(StackExtensionType.LIBRARY, PATH
Expand All @@ -195,9 +193,5 @@ public static void basicCoreStackElements(OrderedConfiguration<StackExtension> c
.add("CoreCSS-Modalbox", new StackExtension(StackExtensionType.STYLESHEET, PATH + "/modalbox.css"));
configuration.add("ScriptaculousBuilder", new StackExtension(StackExtensionType.LIBRARY,
"${tapestry.scriptaculous}/builder.js"));

if (testMode)
configuration.add("CoreJS-TestMode", new StackExtension(StackExtensionType.LIBRARY, PATH
+ "/tapx-testmode.js"), "after:CoreJS");
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Tapx = {

TEST_MODE : false,

/**
* Extends an object using a source. In the simple case, the source object's
* properties are overlayed on top of the destination object. In the typical
Expand Down Expand Up @@ -294,13 +292,6 @@ Tapx.extendInitializer(function() {

function runModalDialog(title, message, proceed) {

if (Tapx.TEST_MODE) {
if (window.confirm(message))
proceed.defer();

return;
}

var div = new Element('div', {
className : 'mb-confirm'
}).update(new Element('p').update(message));
Expand Down

0 comments on commit e1676b4

Please sign in to comment.