Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ideas for the interface
Message
 
 
À
Tous
Information générale
Forum:
AngularJS
Catégorie:
Codage, syntaxe et commandes
Titre:
Ideas for the interface
Divers
Thread ID:
01651931
Message ID:
01651931
Vues:
51
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
Répondre
Fil
Voir

Click here to load this message in the networking platform