Copied to clipboard

Flag this post as spam?

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

  • skiltz 501 posts 701 karma points
    Nov 28, 2014 @ 11:28

    Opening Angular View in Parent 'Frame'

    I think my zero knowledge of Angular skills is hurting :( 

    Once the modal opens (create, refresh window). When I click on create I want to open the create.html in the parent frame.  Not sure that makes sense. Screenshot below.

    <form name="magazineCreateForm"
            <umb-header tabs="tabs">
                <div class="span7">
                    <umb-content-name placeholder="@placeholders_entername"
                                      ng-model="magazine.Description" />
                <div class="span5">
                    <div class="btn-toolbar pull-right umb-btn-toolbar">
                        <button type="submit" data-hotkey="ctrl+s" class="btn btn-success">
                            <localize key="buttons_save">Save</localize>
                <umb-tab id="tabContent" rel="Content" class="active">
                        <umb-control-group label="On Sale Date" description="On Sale Date">
                            <input type="text" class="umb-editor datepicker" ng-model="magazine.OnSaleDate" required />
                        <umb-control-group label="Single Issue Price" description="Single Issue Price">
                            <input type="text" class="umb-editor" ng-model="magazine.SingleIssuePrice" required />
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Nov 28, 2014 @ 12:28
    Dave Woestenborghs


    I think this is some custom section that you are building and you have used a custom create dialog. 

    If you have a look at my source code from my umbukfest talk you see 2 different approaches for creating new items in a custom section.

    First approach - default create action

    If you look in this treecontroller you see I just use the default create action for my nodes. This will call your edit view with the a querystring so you know it's in create mode.

    You can look at my angular controller to figure out how you can handle this.

    Second approach - custom create action

    This uses a custom create dialog and that seems to be the route you have chosen.

    You can look in this treecontroller to see how I create the custom create action.

    And then in this view and angular controller you can see how I handle things after the user clicks the save button.

    If you have any more questions feel free to answer them. You can run my code by the way on your local machine. Instructions are on the code repository.




  • skiltz 501 posts 701 karma points
    Nov 28, 2014 @ 20:52

    Thanks Dave.

    I changed   

    menu.Items.Add( new MenuItem("create", ui.Text("actions", ActionNew.Instance.Alias))   { Icon   =  "add"  });


    menu.Items.Add<CreateChildEntity, ActionNew>(ui.Text("actions", ActionNew.Instance.Alias));

    Which nows has the desired effect.  I have no idea what this does and how CreateChildEntity, ActionNew wires up to the create.html file?? Just because it's called create?

    Anyhow thanks heaps :)



Please Sign in or register to post replies

Write your reply to: