mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
Fix hangman example to use Dojo plugin tags
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@542323 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Showcase - Hangman</title>
|
||||
<@s.head theme="ajax" debug="false" />
|
||||
<@sx.head />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -17,14 +17,13 @@
|
||||
}
|
||||
|
||||
var _listeners = {
|
||||
guessMade: function(sourceId, type) {
|
||||
if(type == "before") {
|
||||
this.guessMadeFunc(sourceId);
|
||||
this.updateCharacterAvailable(sourceId);
|
||||
this.updateVocab(sourceId);
|
||||
this.updateScaffold(sourceId);
|
||||
this.updateGuessLeft(sourceId);
|
||||
}
|
||||
guessMade: function(request, widget) {
|
||||
var sourceId = widget.widgetId;
|
||||
this.guessMadeFunc(sourceId);
|
||||
this.updateCharacterAvailable(sourceId);
|
||||
this.updateVocab(sourceId);
|
||||
this.updateScaffold(sourceId);
|
||||
this.updateGuessLeft(sourceId);
|
||||
},
|
||||
guessMadeFunc: function(sourceId) {
|
||||
var requestAttr = { character: sourceId };
|
||||
@@ -216,13 +215,11 @@
|
||||
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
|
||||
|
||||
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
|
||||
<@s.a theme="ajax"
|
||||
href="%{blankUrl}"
|
||||
id="%{#currentCharacter}"
|
||||
notifyTopics="topicGuessMade"
|
||||
<@sx.a id="%{#currentCharacter}"
|
||||
beforeNotifyTopics="topicGuessMade"
|
||||
showErrorTransportText="true">
|
||||
<img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
|
||||
</@s.a>
|
||||
</@sx.a>
|
||||
</@s.iterator>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<@s.head theme="ajax" debug="true" />
|
||||
<@sx.head />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -22,13 +22,11 @@
|
||||
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
|
||||
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
|
||||
|
||||
<@s.a theme="ajax"
|
||||
id="%{#currentCharacter}"
|
||||
href="%{blankUrl}"
|
||||
notifyTopics="topicGuessMade"
|
||||
<@sx.a id="%{#currentCharacter}"
|
||||
afterNotifyTopics="topicGuessMade"
|
||||
showErrorTransportText="true">
|
||||
<img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
|
||||
</@s.a>
|
||||
</@sx.a>
|
||||
|
||||
<#--
|
||||
<a href="#" id="<@s.property value="%{#currentCharacter}"/>" >
|
||||
|
||||
Reference in New Issue
Block a user