diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 056119c24967a6c0c40c2b2f53c8ea717eb27b32..5690ed8dffa0da6e0861fed71c24e2555009908a 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -132,13 +132,18 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i } else { $timeout(function() { + // Init phase + if (csConfig.initPhase && !state.stateParams.type) { + $scope.doGetPending(0, undefined, true/*skipLocationUpdate*/); + } // get new comers - if (!csConfig.initPhase || state.stateParams.type == 'newcomers') { - $scope.doGetNewcomers(0, state.stateParams.newcomers); + else if (state.stateParams.type == 'newcomers' || (!csConfig.initPhase && !state.stateParams.type)) { + $scope.doGetNewcomers(0, undefined, true/*skipLocationUpdate*/); } - else if (csConfig.initPhase || state.stateParams.type == 'pending') { - $scope.doGetPending(0, state.stateParams.pendings); + else if (state.stateParams.type == 'pending') { + $scope.doGetPending(0, undefined, true/*skipLocationUpdate*/); } + }, 100); } // removeIf(device) @@ -230,7 +235,7 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i } }; - $scope.doGetNewcomers = function(offset, size) { + $scope.doGetNewcomers = function(offset, size, skipLocationUpdate) { offset = offset || 0; size = size || defaultSearchLimit; if (size < defaultSearchLimit) size = defaultSearchLimit; @@ -240,7 +245,7 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i $scope.search.type = 'newcomers'; // Update location href - if (!offset) { + if (!offset && !skipLocationUpdate) { $scope.doRefreshLocationHref(); } @@ -258,7 +263,7 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i }); }; - $scope.doGetPending = function(offset, size) { + $scope.doGetPending = function(offset, size, skipLocationUpdate) { offset = offset || 0; size = size || defaultSearchLimit; if (size < defaultSearchLimit) size = defaultSearchLimit; @@ -272,7 +277,7 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i csWot.pending; // Update location href - if (!offset) { + if (!offset && !skipLocationUpdate) { $scope.doRefreshLocationHref(); } @@ -449,7 +454,7 @@ function WotLookupController($scope, $state, $timeout, $focus, $ionicPopover, $i // Motion if (res.length > 0 && $scope.motion) { - $scope.motion.show({selector: '.lookupForm .item.ink'}); + $scope.motion.show({selector: '.lookupForm .list .item', ink: true}); } }; diff --git a/www/js/services/utils-services.js b/www/js/services/utils-services.js index c40122818d7bf4592569d706be450e0656bf1438..247a85c0ae03c108acf27cef656e69750c3e8c1a 100644 --- a/www/js/services/utils-services.js +++ b/www/js/services/utils-services.js @@ -552,8 +552,9 @@ angular.module('cesium.utils.services', ['ngResource']) options.ink = angular.isDefined(options.ink) ? options.ink : true; options.startVelocity = options.startVelocity || (isSmallScreen() ? 1100 : 3000); return $timeout(function(){ + if (options.ink || options.inkSelector) { - ionicMaterialInk.displayEffect({selector: (options.inkSelector || (options.selector + '.ink'))}); + exports.ink({selector: (options.inkSelector || (options.selector + '.ink'))}); } callback(options); }, options.timeout || motionTimeout); diff --git a/www/templates/blockchain/view_block.html b/www/templates/blockchain/view_block.html index f3c82e69440bfd8106ab40e8aae9602e1c662ced..efba0084a63a37995be33a0a1c804ce2ac7111da 100644 --- a/www/templates/blockchain/view_block.html +++ b/www/templates/blockchain/view_block.html @@ -51,7 +51,7 @@ <h3> <a target="_blank" - ng-href="{{node.node.url}}/blockchain/block/{{formData.number}}"> + ng-href="{{node.url}}/blockchain/block/{{formData.number}}"> <i class="icon ion-share"></i> {{'BLOCKCHAIN.VIEW.SHOW_RAW'|translate}} </a> </h3> diff --git a/www/templates/menu.html b/www/templates/menu.html index ee74ee31831005b5ecf699a80918107348121a08..b05dc3875190256f3301a98357aeb9482f62e379 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -104,10 +104,10 @@ <!-- MAIN Section --> <div class="item item-divider"></div> - <ion-item menu-close class="item item-icon-left" active-link="active" href="#/app/wot"> + <a menu-close class="item item-icon-left" active-link="active" ui-sref="app.wot_lookup"> <i class="icon ion-person-stalker"></i> <span translate>MENU.WOT</span> - </ion-item> + </a> <a id="helptip-menu-btn-wot"></a> <!-- Allow extension here --> diff --git a/www/templates/wot/lookup_form.html b/www/templates/wot/lookup_form.html index f0c1d04944b243f5e3cce2d33d2be08446f97b3c..ac22429b5ac5295dbdd96e339dec203351fbac52 100644 --- a/www/templates/wot/lookup_form.html +++ b/www/templates/wot/lookup_form.html @@ -97,11 +97,12 @@ <span ng-if="search.type=='newcomers'" translate>WOT.LOOKUP.NO_NEWCOMERS</span> </div> - <!-- simple selection --> + <!-- simple selection + device --> + <!--removeIf(no-device)--> <ion-list - ng-if="::!allowMultiple" + ng-if="!allowMultiple && $root.device.enable" class="{{::motion.ionListClass}}" - can-swipe="$root.device.enable"> + can-swipe="true"> <ion-item ng-repeat="identity in search.results track by identity.id" @@ -115,11 +116,30 @@ </ion-item> </ion-list> + <!--endRemoveIf(no-device)--> + + <!-- simple selection + no device --> + <!--removeIf(device)--> + <div + ng-if="!allowMultiple" + class="list {{::motion.ionListClass}}"> + + <div + ng-repeat="identity in search.results track by identity.id" + id="helptip-wot-search-result-{{$index}}" + class="item item-border-large item-avatar item-icon-right ink" ng-click="::select(identity)"> + + <ng-include src="'templates/wot/identity.html'"></ng-include> + + <i class="icon ion-ios-arrow-right "></i> + </div> + </div> + <!--endRemoveIf(device)--> <!-- multi selection --> - <ion-list + <div ng-if="::allowMultiple" - class="{{::motion.ionListClass}}"> + class="list {{::motion.ionListClass}}"> <ion-checkbox ng-repeat="identity in search.results track by identity.id" @@ -128,7 +148,7 @@ ng-click="toggleCheck($index, $event)"> <ng-include src="'templates/wot/identity.html'"></ng-include> </ion-checkbox> - </ion-list> + </div> <ion-infinite-scroll ng-if="search.hasMore"