Skip to content

Commit

Permalink
Fixed: submitText and cancelText attributes had no effect on prompt c…
Browse files Browse the repository at this point in the history
…ommand.
  • Loading branch information
jsteinbeck committed Nov 4, 2014
1 parent 442813e commit 2f1e774
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

===== Version 0.3.x =====

==== Version 0.3.8 ====

Released on 2014-11-04.

* Fixed: submitText and cancelText attributes had no effect on prompt command.

==== Version 0.3.7 ====

Released on 2013-11-01.
Expand Down
2 changes: 1 addition & 1 deletion js/WSE.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var WSE = (function (Squiddle, MO5, STEINBECK)
{
"use strict";

var out = {}, version = "0.3.7";
var out = {}, version = "0.3.8";

out.fx = MO5;
out.Keys = STEINBECK.Keys;
Expand Down
21 changes: 15 additions & 6 deletions js/WSE.tools.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/* global document, setTimeout, WSE */

(function (out)
{
"use strict";
Expand Down Expand Up @@ -353,19 +356,23 @@
{
return function (command, interpreter)
{
var title, message, container, key, doNext;
var title, message, container, key, doNext, submitText, cancelText;

title = command.getAttribute("title") || "Input required...";
message = command.getAttribute("message") || "Your input is required:";
key = command.getAttribute("var") || null;
doNext = command.getAttribute("next") === "false" ? false : true;
submitText = command.getAttribute("submitText") || "";
cancelText = command.getAttribute("cancelText") || "";

if (key === null)
{
interpreter.bus.trigger("wse.interpreter.warning",
{
element: command,
message: "No 'var' attribute defined on " + type + " command. Command ignored."
});
{
element: command,
message: "No 'var' attribute defined on " + type + " command. Command ignored."
});

return {
doNext: true
};
Expand All @@ -383,7 +390,9 @@
callback: function (decision)
{
container[key] = "" + decision;
}
},
submitText: submitText,
cancelText: cancelText
});
return {
doNext: true
Expand Down

0 comments on commit 2f1e774

Please sign in to comment.