Permalink
Browse files

Add message to indicate that a new wall has been created

  • Loading branch information...
1 parent 9a3a5e6 commit 103bf4e32f2f900c2ee7b188a568b1c2a1b6449c @birtles birtles committed Mar 25, 2013
View
4 wall/public/wall-maker/index.html.php
@@ -117,10 +117,10 @@ class="button newWallLink center">新しい壁を作る</a>
class="button left arrow">戻る</a><br>
</nav>
<hr>
- <div id="wall-loading" aria-hidden="true">
+ <div id="wall-loading" aria-hidden="false">
<img src="<?php echo $wallMakerRoot?>/img/spinner.gif" class="spinner">
</div>
- <div id="wall-info" aria-hidden="false">
+ <div id="wall-info" aria-hidden="true">
<form name="manageWall"
action="javascript:ManageWallController.saveCurrentTab()">
<section id="wall-summary">
View
2 wall/public/wall-maker/js/create-wall.js
@@ -59,7 +59,7 @@ var CreateWallController =
UserData.updateWalls();
// Fill in fields of manage wall form using response
- ManageWallController.updateWallInfo(response);
+ ManageWallController.showNewWall(response);
// Update the screen
Navigation.goToScreen("wall/" + response.wallId + "#event");
View
15 wall/public/wall-maker/js/manage-wall.js
@@ -134,6 +134,9 @@ var ManageWallController =
},
loadSuccess: function(response, tabName) {
+ // It doesn't make sense to show errors when we change wall
+ this.messageBox.clear();
+
// Update form fields
this.updateWallInfo(response);
@@ -147,10 +150,16 @@ var ManageWallController =
$("wall-info").setAttribute("aria-hidden", "false");
},
- updateWallInfo: function(wall) {
- // It doesn't make sense to show errors when we change wall
- this.messageBox.clear();
+ showNewWall: function(wall) {
+ this.updateWallInfo(wall);
+ $("wall-loading").setAttribute("aria-hidden", "true");
+ $("wall-info").setAttribute("aria-hidden", "false");
+
+ this.messageBox.showInfo('created-wall', wall.name, 5000);
+ },
+
+ updateWallInfo: function(wall) {
// Set the ID
this.wallId = wall.wallId;
View
7 wall/public/wall-maker/js/messages.js
@@ -36,7 +36,7 @@ function MessageBox(screen)
this._show = function(key, args, className, timeout) {
// Set message
- this.textBlock.textContent = this._translateKey(key);
+ this.textBlock.textContent = this._translateKey(key, args);
// Update classes
this.messageBlock.classList.remove("error");
@@ -54,7 +54,7 @@ function MessageBox(screen)
}
};
- this._translateKey = function(key) {
+ this._translateKey = function(key, args) {
// XXXl10n
switch(key) {
case 'timeout':
@@ -73,6 +73,9 @@ function MessageBox(screen)
return "Someone else has updated the session."
+ " Please confirm the updated session status.";
+ case 'created-wall':
+ return "Created wall '" + args + "'";
+
case 'db-error':
case 'design-not-found':
case 'server-fail':

0 comments on commit 103bf4e

Please sign in to comment.