Updates:

  • Added loading bar left/right positiontion options
  • Added "grip" functionality - created a new notificationc class that is stand alone, not integrated in the "wrapper" and can grip to specified html element id's with specific positions : left,right,top,bottom:
     public enum GripPositon 
        {
            top,
            bottom,
            right,
            left
        }
    
        public class UserNotificationAttached : UserNotification
        {
            public string TargetId { get; set; }
            public GripPositon Grip { get; set; }
    
    
            public UserNotificationAttached(string m, NotificationType t, ushort a, ushort w, BarAnimationDirection b, string targetIt, GripPositon grip = GripPositon.right)
                : this(m, t, a, w, b)
            {
                TargetId = targetIt;
                Grip = grip;
                IsAttached = true;
            }
    
    
            public UserNotificationAttached(string m,NotificationType t,ushort a, ushort w,BarAnimationDirection b) : base(m,t,a,w,b)
            {
            }
    
            public override string ToString()
            {
                return String.Format(@" MVCNotificationQueue.Add(new MVCNotification('{0}','{1}',{2},'{3}','{4}',{5},'{6}',{7},'{8}','{9}')); ",
                                       this.NotificationId,
                                       this.Type.ToString().ToLower(),
                                       this.Duration,
                                       this.Message.Replace("'", "\'"),
                                       this.Scream,
                                       this.Width,
                                       this.AnimationBarDirection,
                                       this.IsAttached.ToString().ToLower(),
                                       this.TargetId,
                                       this.Grip
                                       );
            }
        }
    

Using the new UserNotificationAttached type :

 

ViewBag.oneNotification =  new UserNotificationAttached("Field must not be empty", NotificationType.Info, 0,300,BarAnimationDirection.right,"Title",GripPositon.right  );

 

 the only diffrence here from the regular notification are the last 2 parameters : "Title" is the title input element in the sample page that represents the create page for a Blog Article entity, and the last parameter is the grip position.



Last edited Jul 21, 2012 at 8:04 PM by alexpeta, version 1

Comments

No comments yet.