1

I have a webpart wit row limit 9, and a widget that displays me a table with different numbers. I want that table to continue to show me the 9 rows until a date, and after that date to show me 5 rows.

How can I change that value using JavaScript or AngularJS ?

Here is a part of my widget code:

<section class="{{::vm.cssClass}}" data-ng-init="vm.cssClass = vm.ClassContainer || 'list_1_container'">
    <a href="{{::vm.moreUrl | replaceNavigationToken}}" class="btn-more" data-ng-if="vm.moreUrl && !vm.moreLabel && vm.HasSeeMoreOption"><span class="tooltip" data-localize="SeeMore">See more</span></a>
    <a href="{{::vm.moreUrl | replaceNavigationToken}}" class="btn-more" data-ng-if="vm.moreUrl && vm.moreLabel && vm.HasSeeMoreOption"><span class="tooltip">{{::vm.moreLabel}}</span></a>
    <a class="btn-user-pref" data-ng-if="vm.UserCustomFilter" data-ng-class="{'push': (vm.moreUrl)}" data-ng-click="vm.showRefinementPopin = true; vm.getRefinersList();"><span class="tooltip">{{::vm.userPrefLabel}}</span></a>

    <div class="wrap">
        <div class="table" id="tableToday">
            <div class="grid-container-item" data-ng-init="
                vm.itemSizeMobile = vm.itemSizeMobile || 1;
                vm.itemSizeTablet = vm.itemSizeTablet || 1;
                vm.itemSizeDesktop = vm.itemSizeDesktop || 1;
                vm.itemSizeLarge = vm.itemSizeLarge || 1">

                    <div class="item wt-l1-pow0000005369item__background__border ng-repeat-animated item-size-xs-{{::vm.itemSizeMobile}} item-size-sm-{{::vm.itemSizeTablet}} item-size-md-{{::vm.itemSizeDesktop}} item-size-lg-{{::vm.itemSizeLarge}}" 
                    ng-repeat="item in vm.DisplayTemplateData | startFrom: vm.getStartForPaginate(vm.isPaginate,vm.currentPage,vm.numberBeforePaginate) | limitTo: vm.getLimitPaginate(vm.isPaginate,vm.numberBeforePaginate)"> 
                        <div class="container-content">

                            <div class="tableRowDate" data-ng-if=$first>
                                <div class="tableCell">
                                    <h3 class="cellTextTitle" ><span>{{::item.Dia.split('#')[1]}} de {{::item.Mes.split('#')[1]}} de {{::item.Ano.split('#')[1]}}</span></h3>
                                </div>
                            </div>

                            <div class="tableRowFields" data-ng-if=$first>
                                <div class="tableCellType"></div>
                                <div class="tableCellType"><h3 class="cellTextTypeEuribor"><span>Last</span></h3></div>
                                <div class="tableCellType"><h3 class="cellTextTypeEuribor" ><span>Last1</span></h3></div>
                                <div class="tableCellType"><h3 class="cellTextTypeEuribor" ><span>Last2</span></h3></div>
                                <div class="tableCellType"><h3 class="cellTextTypeEuribor" ><span>Last3</span></h3></div>
                            </div>

                            <!-- 1Y Type -->
                            <div data-ng-if=$odd class="tableRowOdd" data-ng-show="item.TipoOWS === '1Y'">
                                <div class="tableCellContent20">
                                    <h3 class="cellTextType" id="mytable"><span>{{::item.TipoCalculado.split('#')[1]}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                    <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.Last.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastUm.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastDois.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastTres.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                            </div>

                            <div data-ng-if=$even class="tableRowEven" data-ng-show="item.TipoOWS === '1Y'">
                                <div class="tableCellContent20">
                                    <h3 class="cellTextType" id="mytable"><span>{{::item.TipoCalculado.split('#')[1]}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                    <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span class="cutText">{{::item.Last.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastUm.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastDois.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                                <div class="tableCellContent20">
                                     <h3 class="cellTextValue" data-ng-show="item.TipoOWS !== 'Datas'"><span>{{::item.LastTres.replace('.',',') | limitTo:7:0}}</span></h3>
                                </div>
                            </div>

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.