@@ -991,15 +991,29 @@ $(window).load(function () {
991
991
//cleft.parent().append(
992
992
// $("<div/>").html("<i style=\"font-size:18px;\" class=\"fas fa-arrows-alt-h\"/>").addClass("colsResizer").css({ position: "absolute", left: (cleft.width()-0+13) + "px", top: "10px" })
993
993
//);
994
+ var afterVariants = function ( data ) {
995
+ languages = data ;
996
+ for ( var i = 0 ; i < languages . length ; i ++ ) {
997
+ languageSortDictionary [ languages [ i ] . Key ] = i + 1 ;
998
+ }
999
+ var hash = getQueryString ( "hash" ) ;
1000
+ if ( languages . length == 0 ) {
1001
+ onAfterDom ( function ( ) {
1002
+ msg ( 0 , "take a moment to setup puck. at the very least, choose your languages!" ) ;
1003
+ } ) ;
1004
+ location . hash = "settings?path=/puck/settings/languages" ;
1005
+ } else if ( ! hash && ! location . hash ) {
1006
+ location . hash = "#content" ;
1007
+ }
1008
+ } ;
994
1009
995
1010
var hash = getQueryString ( "hash" ) ;
996
1011
//console.log("hashQs",hash);
997
1012
998
- if ( ! hash ) {
999
- if ( ! location . hash )
1000
- location . hash = "#content" ;
1001
- return ;
1002
- }
1013
+ getVariants ( afterVariants ) ;
1014
+
1015
+ if ( ! hash ) return ;
1016
+
1003
1017
setTimeout ( function ( ) {
1004
1018
location . hash = hash ;
1005
1019
if ( hash [ 0 ] != "#" )
@@ -1050,18 +1064,7 @@ getUserRoles(function (d) {
1050
1064
if ( ! userRoles . contains ( "_republish" ) ) $ ( ".republish_entire_site" ) . hide ( ) ;
1051
1065
} ) ;
1052
1066
} ) ;
1053
- getVariants ( function ( data ) {
1054
- languages = data ;
1055
- for ( var i = 0 ; i < languages . length ; i ++ ) {
1056
- languageSortDictionary [ languages [ i ] . Key ] = i + 1 ;
1057
- }
1058
- if ( languages . length == 0 ) {
1059
- onAfterDom ( function ( ) {
1060
- msg ( 0 , "take a moment to setup puck. at the very least, choose your languages!" ) ;
1061
- } ) ;
1062
- location . hash = "settings?path=/puck/settings/languages" ;
1063
- }
1064
- } ) ;
1067
+
1065
1068
var isArray = function ( arg ) {
1066
1069
return Object . prototype . toString . call ( arg ) === '[object Array]' ;
1067
1070
} ;
0 commit comments