Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting window.location.href takes a long time
Message
 
 
À
20/10/2015 08:45:05
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01626184
Message ID:
01626223
Vues:
39
>>How would I define the state to go to that same location and do nothing? Do I need to define another 'home' like state but without a controller?
>
>I don't know - you haven't really explained how (or if) views are nested in your application. If the view into which the 'customerAccounts/PrefsAcs/InvoiceUDFs' template etc is loaded is a child view of that holding the menu items then maybe you could add a 'blank' url/template to your states and navigate to that on 'Cancel' ?

This particular form is a single view form (e.g. it's an index view and nothing else). Here is the whole code for that view
@{
    ViewBag.Title = String.Format(Labels.xPreferences, Labels.customerAccount);
    Layout = "~/Views/Shared/_SearchDetailsLayout.cshtml";
}
<div class="col-md-12" ng-controller="prefsAcsCrudController">
    <div class="ng-load-indicator" ng-show="isEditLoading"></div>
    <form name="form" class="form-horizontal ng-cloak"
          novalidate role="form" data-server:error ng-show="showForm"
          data-sm:dirty-check>
        <div data-resize:container class="widget">
            <div class="widget-head">
                @String.Format(Labels.xPreferences, Labels.customerAccount)
            </div>
            <div class="widget-content">
                <div class="padd scrollable widget-resize">
                    @Html.Partial("_EditFormAlerts")
                    <div class="col-lg-2 col-md-2 panel-container">
                        <tabset vertical="true" type="pills">
                            <tab ng-repeat="tab in tabsViews" select="selectView(tab.index)"
                                 active = "tab.active"   
                                 class = "{{tabsViews[tab.index-1]['invalid'] ? 'invalid-tab': 'valid-tab' }}">
                                <tab-heading>{{tab.title}}</tab-heading>                                
                            </tab>
                        </tabset>
                    </div>

                    <div class="col-lg-10 col-md-10 panel-container">
                        <div data-ui-view data-autoscroll="false"></div>                    
                    </div>                                       
                </div>
            </div>
            <div class="widget-foot">
                <div>
                    <input type="submit" value="@Labels.save" ng-disabled="form.$invalid || disableAction" 
                    ng-click="save(currentPrefsAc)"
                           class="btn btn-primary" />
                    <data-cancel:button title="@Labels.unsavedChanges"
                                        message="@Messages.unsavedChanges"
                                        cancel="cancel()"
                                        disable-action="disableAction"
                                        dirty="form.$dirty">
                    </data-cancel:button>
                </div>
            </div>
        </div>
    </form>
</div>

@section scripts {
    <script src="~/Areas/CustomerAccounts/Scripts/Controllers/PrefsAcController.js"></script>
    <script src="~/Areas/CustomerAccounts/Scripts/Services/PrefsAcService.js"></script>
}
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform