Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#12624 closed enhancement (fixed)

[patch][cla] dojox.widget.Toaster - add center position

Reported by: Manuel Irrschik Owned by: dante
Priority: low Milestone: 1.9
Component: DojoX Widgets Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

i like it to have the toaster messages in the top center of my app so i added the following code to the Toaster Widget:

Index: dojox/widget/Toaster.js
===================================================================
--- dojox/widget/Toaster.js	(revision 24144)
+++ dojox/widget/Toaster.js	(working copy)
@@ -232,6 +232,8 @@
 				style.left = (view.w - nodeSize.w - 1 - view.l)+"px";
 			}else if(pd.match(/^[tb]l-/)){
 				style.left = 0 + "px";
+			}else if(pd.match(/^[tb]c-/)){
+				style.left = ((view.w - nodeSize.w - 1 - view.l)/2)+"px";
 			}
 
 			style.clip = "rect(0px, " + nodeSize.w + "px, " + nodeSize.h + "px, 0px)";

with some css applied (rounded borders and shadows) it looks really cool ;-)

Change History (3)

comment:1 Changed 7 years ago by Kitson Kelly

Summary: dojox.widget.Toaster - add center position[patch][cla] dojox.widget.Toaster - add center position

comment:2 Changed 7 years ago by Kitson Kelly

Resolution: fixed
Status: newclosed

In [30910]:

Support the ability to center the toaster, thanks manii, fixes #12624

comment:3 Changed 7 years ago by bill

Milestone: tbd1.9
Note: See TracTickets for help on using tickets.