Copied to clipboard

Flag this post as spam?

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


  • Mounhim Tahtahi 41 posts 62 karma points
    May 03, 2013 @ 12:18
    Mounhim Tahtahi
    0

    Custom section using MVC and Razor and Speechbubble

    Hi,

    I managed to create a custom section in the backend. In my custom section I use MVC to create the controllers and views. This works quite ok. I followed the blog of http://blog.bartdemeyer.be/ to achieve that. Now my custom section is pretty much standalone. 

    Hoewever I would like to use some of the umbraco client tools (not the one on codeplex) to achieve some stuff like displaying a speech bubble when the record is saved.

    Since I use razor and mvc I cannot inherit from basepage. Also the umbclientmanager is not available. How can I achieve a feature like SpeechBubble in my code.

  • Mounhim Tahtahi 41 posts 62 karma points
    May 03, 2013 @ 12:37
    Mounhim Tahtahi
    0

    Hi,

    Dug a little deeper and found a solution.

    Had to add reference to the following scripts:

    <script src="/umbraco_client/Application/NamespaceManager.js?cdv=2" type="text/javascript"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui-1.10.2.min.js"></script>
    <script src="/umbraco_client/Application/UmbracoClientManager.js?cdv=2" type="text/javascript"></script>

    and also jquery off course.

    Based on that I could do:

            function ShowErrorBubble(title, message)
            {
                UmbClientMgr.mainWindow().UmbSpeechBubble.ShowMessage('info', 'This is the header', 'This is the body text.');
            }
    

     

    Now I have to figure out to attach this function to a save event. 

Please Sign in or register to post replies

Write your reply to:

Draft