Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • maanehunden 61 posts 105 karma points
    Sep 18, 2012 @ 16:35
    maanehunden
    0

    using ShowSpeechBubble in BeforePublish

    Hello fellow develpers 

    Have any of you used ShowSpeechBubble to display publishing status. I am creatiing folder-nodes by extensing ApplicationBase. 

    The strangest thing is that i can't get it to pop up. No matter what i do. Her's my popup method.  

            public void ShowStatusBubble(string message){
                string title = "Generating content";
                BasePage.Current.ClientTools.ShowSpeechBubble(BasePage.speechBubbleIcon.info, title, message);
            }
    

    I am calling it from my event trigered method:

            
            void Document_BeforePublish(Document sender, PublishEventArgs e) {
                Media media = Media.MakeNew("new media folder", 
                                            MediaType.GetByAlias(mediaAlias), 
                                            UmbracoHelpers.GetAdmin(), 
                                            parentId);
                ShowStatusBubble("Creating media folders");
            }
    

    Any ideas ?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 18, 2012 @ 17:06
    Tom Fulton
    0

    I think the issue is probably that the Speech Bubble doesn't support "chaining" notifications, so I'm guessing the "Published" bubble is overriding your custom one.  I think Darren Ferguson was working on a fix for this, not sure the status though.  See this thread:  https://groups.google.com/forum/?fromgroups=#!searchin/umbraco-dev/speech/umbraco-dev/Z11_oy9bUJQ/7_4khEMbOCkJ

    Actually after reading that it might have been already done but maybe not commited to the core yet.  You might want to give that thread a bump or comment on the issue:  http://issues.umbraco.org/issue/U4-99

    Hope this helps,
    Tom 

  • maanehunden 61 posts 105 karma points
    Sep 19, 2012 @ 10:09
    maanehunden
    0

    Her's a snippet from that disquission

    void Document_BeforePublish(Document sender, PublishEventArgs e)
            {
                e.Messages.Add("You do not have permission to publish documents of type " + sender.ContentType.Alias);
                e.Messages.Add("The time is " + DateTime.Now.TimeOfDay + " and publishing is not allowed now");
                e.Messages.Add("When all is said and done, generally speaking, you suck.");
    
                e.Cancel = true;
            }
    

    Tanks, it's interresting reading, i am looking forward to using this funktionality, but as yet it is not implemented in umbraco 4.7.1 that i am using )c: 

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 19, 2012 @ 17:40
    Tom Fulton
    0

    Yeah, its definitely not in 4.7, but you may want to reply to the issue or the thread to check on the status and what future version it might be included in.  Hopefully it's not too far out!

Please Sign in or register to post replies

Write your reply to:

Draft