@@ -263,15 +263,12 @@ Client.prototype = {
263
263
is_ok = false ;
264
264
}
265
265
266
- // allowed markets
267
266
if ( this . is_logged_in ) {
268
267
if (
269
268
! this . get_storage_value ( 'is_virtual' ) &&
270
- ! this . get_storage_value ( 'allowed_markets' ) &&
271
269
Cookies . get ( 'residence' ) &&
272
270
! this . get_storage_value ( 'has_reality_check' )
273
271
) {
274
- $ ( '#topMenuStartBetting' ) . addClass ( 'invisible' ) ;
275
272
BinarySocket . send ( {
276
273
'landing_company' : Cookies . get ( 'residence' ) ,
277
274
'passthrough' : {
@@ -300,15 +297,11 @@ Client.prototype = {
300
297
} ,
301
298
response_landing_company : function ( response ) {
302
299
if ( ! response . hasOwnProperty ( 'error' ) ) {
303
- var allowed_markets = response . legal_allowed_markets ;
304
300
var company = response . name ;
305
301
var has_reality_check = response . has_reality_check ;
306
302
307
- this . set_storage_value ( 'allowed_markets' , allowed_markets . length === 0 ? '' : allowed_markets . join ( ',' ) ) ;
308
303
this . set_storage_value ( 'landing_company_name' , company ) ;
309
304
this . set_storage_value ( 'has_reality_check' , has_reality_check ) ;
310
-
311
- page . header . menu . register_dynamic_links ( ) ;
312
305
}
313
306
} ,
314
307
response_authorize : function ( response ) {
@@ -335,7 +328,7 @@ Client.prototype = {
335
328
} ,
336
329
clear_storage_values : function ( ) {
337
330
var that = this ;
338
- var items = [ 'currencies' , 'allowed_markets' , ' landing_company_name', 'is_virtual' ,
331
+ var items = [ 'currencies' , 'landing_company_name' , 'is_virtual' ,
339
332
'has_reality_check' , 'tnc_status' , 'session_duration_limit' , 'session_start' ] ;
340
333
items . forEach ( function ( item ) {
341
334
that . set_storage_value ( item , '' ) ;
@@ -654,19 +647,6 @@ Menu.prototype = {
654
647
655
648
return { item : item , subitem : subitem } ;
656
649
} ,
657
- register_dynamic_links : function ( ) {
658
- var stored_market = page . url . param ( 'market' ) || LocalStore . get ( 'bet_page.market' ) || 'forex' ;
659
- var allowed_markets = page . client . get_storage_value ( 'allowed_markets' ) ;
660
- if ( ! allowed_markets && page . client . is_logged_in && ! TUser . get ( ) . is_virtual ) {
661
- return ;
662
- }
663
-
664
- var markets_array = allowed_markets ? allowed_markets . split ( ',' ) : [ ] ;
665
- if ( ! TUser . get ( ) . is_virtual && markets_array . indexOf ( stored_market ) < 0 ) {
666
- stored_market = markets_array [ 0 ] ;
667
- LocalStore . set ( 'bet_page.market' , stored_market ) ;
668
- }
669
- } ,
670
650
check_payment_agent : function ( is_authenticated_payment_agent ) {
671
651
if ( is_authenticated_payment_agent ) {
672
652
$ ( '#topMenuPaymentAgent' ) . removeClass ( 'invisible' ) ;
@@ -683,7 +663,6 @@ var Header = function(params) {
683
663
Header . prototype = {
684
664
on_load : function ( ) {
685
665
this . show_or_hide_login_form ( ) ;
686
- this . register_dynamic_links ( ) ;
687
666
this . logout_handler ( ) ;
688
667
this . check_risk_classification ( ) ;
689
668
if ( ! $ ( 'body' ) . hasClass ( 'BlueTopBack' ) ) {
@@ -746,10 +725,6 @@ Header.prototype = {
746
725
}
747
726
$ ( ".login-id-list" ) . html ( loginid_select ) ;
748
727
} ,
749
- register_dynamic_links : function ( ) {
750
- $ ( '#logo' ) . attr ( 'href' , page . url . url_for ( this . client . is_logged_in ? japanese_client ( ) ? 'jptrading' : 'trading' : '' ) ) ;
751
- this . menu . register_dynamic_links ( ) ;
752
- } ,
753
728
start_clock_ws : function ( ) {
754
729
function getTime ( ) {
755
730
clock_started = true ;
@@ -837,7 +812,7 @@ Header.prototype = {
837
812
LocalStore . remove ( 'client.tokens' ) ;
838
813
LocalStore . set ( 'reality_check.ack' , 0 ) ;
839
814
sessionStorage . removeItem ( 'client_status' ) ;
840
- var cookies = [ 'login' , 'loginid' , 'loginid_list' , 'email' , 'settings' , 'reality_check' , 'affiliate_token' , 'affiliate_tracking' , 'residence' , 'allowed_markets' ] ;
815
+ var cookies = [ 'login' , 'loginid' , 'loginid_list' , 'email' , 'settings' , 'reality_check' , 'affiliate_token' , 'affiliate_tracking' , 'residence' ] ;
841
816
var domains = [
842
817
'.' + document . domain . split ( '.' ) . slice ( - 2 ) . join ( '.' ) ,
843
818
'.' + document . domain ,
@@ -1013,6 +988,9 @@ var Page = function() {
1013
988
this . header = new Header ( { user : this . user , client : this . client , url : this . url } ) ;
1014
989
this . contents = new Contents ( this . client , this . user ) ;
1015
990
this . _lang = null ;
991
+ $ ( '#logo' ) . on ( 'click' , function ( ) {
992
+ load_with_pjax ( page . url . url_for ( page . client . is_logged_in ? japanese_client ( ) ? 'jptrading' : 'trading' : '' ) ) ;
993
+ } ) ;
1016
994
} ;
1017
995
1018
996
Page . prototype = {
0 commit comments