Opened 16 years ago

Closed 16 years ago

#134 closed defect (fixed)

Dialog buttons fail to be created

Reported by: cj@… Owned by: gogo
Priority: high Milestone:
Component: Xinha Core Version: 2.0
Severity: critical Keywords: dialog buttons


Just noticed that the dialog buttons aren't being created properly on the latest SVN, if you check popupwin.js you'll notice an error since 'buttons' isn't a valid array in this context -- this can be fixed by just using 'btn'. I'm not sure if it's the correct fix as I don't recognize the new _lc language function but it works:

PopupWin.prototype.addButtons = function() {
	var self = this;
	var div = this.doc.createElement("div");
	div.className = "buttons";
	for (var i = 0; i < arguments.length; ++i) {
		var btn = arguments[i];
		var button = this.doc.createElement("button");
		button.innerHTML = HTMLArea._lc(btn, 'HTMLArea');		// *** -- changed buttons[btn] to btn
		switch (btn) {
		    case "ok":
			button.onclick = function() {
				return false;
		    case "cancel":
			button.onclick = function() {
				return false;

Thanks and please keep up the great work!

Attachments (1)

.2 (0 bytes) - added by anonymous 15 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 16 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, committed in changeset:71

Changed 15 years ago by anonymous

Note: See TracTickets for help on using tickets.