mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 17:26:25 +02:00
fix(core): fixed home page warning issue
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
.module('core')
|
||||
.controller('HeaderController', HeaderController);
|
||||
|
||||
HeaderController.$inject = ['$scope', '$state', '$stateParams', '$translate', 'Authentication', 'menuService', 'MeanTorrentConfig', 'localStorageService',
|
||||
HeaderController.$inject = ['$scope', '$state', '$timeout', '$translate', 'Authentication', 'menuService', 'MeanTorrentConfig', 'localStorageService',
|
||||
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService', 'UsersService', 'DebugConsoleService'];
|
||||
|
||||
function HeaderController($scope, $state, $stateParams, $translate, Authentication, menuService, MeanTorrentConfig, localStorageService, ScoreLevelService,
|
||||
function HeaderController($scope, $state, $timeout, $translate, Authentication, menuService, MeanTorrentConfig, localStorageService, ScoreLevelService,
|
||||
InvitationsService, $interval, MessagesService, TorrentsService, UsersService, mtDebug) {
|
||||
var vm = this;
|
||||
vm.user = Authentication.user;
|
||||
@@ -30,6 +30,19 @@
|
||||
|
||||
$scope.$on('$stateChangeSuccess', stateChangeSuccess);
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#warning_popup').popup({
|
||||
outline: false,
|
||||
focusdelay: 400,
|
||||
vertical: 'top',
|
||||
autoopen: false,
|
||||
opacity: 0.6,
|
||||
closetransitionend: function () {
|
||||
$('.popup_wrapper').remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* auth-user-changed
|
||||
*/
|
||||
@@ -74,6 +87,25 @@
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* getWarningInfo
|
||||
*/
|
||||
vm.getWarningInfo = function () {
|
||||
var sw = localStorageService.get('showed_warning');
|
||||
if (vm.appConfig.showDemoWarningPopup && !sw) {
|
||||
$timeout(function () {
|
||||
$('#warning_popup').popup('show');
|
||||
//$('.warning_popup_open').trigger('click');
|
||||
//angular.element('#myselector').triggerHandler('click');
|
||||
}, 300);
|
||||
|
||||
localStorageService.set('showed_warning', true);
|
||||
}
|
||||
if (sw) {
|
||||
$('.popup_wrapper').remove();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* checkMessageUnread
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user