Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas for the interface
Message
 
 
To
All
General information
Forum:
AngularJS
Category:
Coding, syntax & commands
Title:
Ideas for the interface
Miscellaneous
Thread ID:
01651931
Message ID:
01651931
Views:
50
Hi everybody,

We have a directive with transclude = true. That directive allows to select something from the list by invoking a modal form. Here is the directive's template:
<input type="submit" value="" id="btnChoose" style="width: 100% !important; margin-top: 0;"
           class="btn_file_select" ng-click="click()" />
and this is how it's implemented in the form:
 <data-desc:type title="{{ '@String.Format(Labels.selectX, Labels.layout)'}}" do-search="popup()"
                                        value="{{currentItem.t1LayoutId == 0 ? '@String.Format(Labels.selectX, Labels.layout)' : currentItem.t1Layout}}"
                                        param="layouts" message="@String.Format(Labels.selectX, Labels.layout)"
                                        filter-by="Ticket"
                                        selected="currentItem.t1LayoutId" descrip-value="descrip" type-value="lTypeId"
                                        description="currentItem.t1Layout">
                        </data-desc:type>
All works quite nicely.

Now, I want to enhance this directive a bit. If the layout is selected, I want to be able to have ability to go directly to the form to edit this layout (opening in the new tab).

Here is a question about implementation. I can either attempt to add the right click event or somehow display the above as the link, but then it would require changes in all forms that use that directive.

Do you see my dilemma? What would you suggest as the implementation?

I added the openLayout method to the directive but I don't see how exactly to hook it up:
$scope.openLayout = function()
            {                
                var linkUrl = "LayoutManagement/Layouts#/edit/" + $scope.selected;
                    window.open(linkUrl, "_blank");                
            }
Thanks a lot in advance and hopefully you can understand what do I mean (perhaps, Viv is the only person who can understand me here).

Also, I tried adding an extra button into the template but then got an error about 2 root elements. So, I am not sure if it's possible to have an extra little button to be able to use it for the Edit functionality.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform