What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Support Bracket/Tournament List colour problems.

Clement

Freaky Coder
Staff member
Hello,

I just tested a fresh install of a 2.7.0.
As you can see from the screenshots, it's all ok for me.

As you seemed more or less in a testing phase, I recommend you to uninstall then clear your browser cache and install again.

Clément
 

Attachments

  • Capture d’écran 2018-08-08 à 10.21.37.png
    Capture d’écran 2018-08-08 à 10.21.37.png
    63.7 KB · Views: 3

Clement

Freaky Coder
Staff member
Can you give my testaccount rights to create a tournament and add users ?
I would like to give it a try.

An admin account would be even better but I can understand if you don't want to give that to me.
 

Clement

Freaky Coder
Staff member
Oh wait, I see while inspecting network activity that you have a "script.js" file loaded that contains an old version of jquery bracket.
It's conflicting with my modified version.

That's most certainly the problem.

Do you know where that comes from ?
 

Hecter

Member
Oh wait, I see while inspecting network activity that you have a "script.js" file loaded that contains an old version of jquery bracket.
It's conflicting with my modified version.

That's most certainly the problem.

Do you know where that comes from ?

Yes, I have two files called script both of which I removed, and the problem still persists.
 

Hecter

Member
Here are both the files, but as I said I have deleted them now.

Code:
/*!
 * jQuery Cookie Plugin v1.4.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2006, 2014 Klaus Hartl
 * Released under the MIT license
 */
(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD
        define(['jquery'], factory);
    } else if (typeof exports === 'object') {
        // CommonJS
        factory(require('jquery'));
    } else {
        // Browser globals
        factory(jQuery);
    }
}(function ($) {

    var pluses = /\+/g;

    function encode(s) {
        return config.raw ? s : encodeURIComponent(s);
    }

    function decode(s) {
        return config.raw ? s : decodeURIComponent(s);
    }

    function stringifyCookieValue(value) {
        return encode(config.json ? JSON.stringify(value) : String(value));
    }

    function parseCookieValue(s) {
        if (s.indexOf('"') === 0) {
            // This is a quoted cookie as according to RFC2068, unescape...
            s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
        }

        try {
            // Replace server-side written pluses with spaces.
            // If we can't decode the cookie, ignore it, it's unusable.
            // If we can't parse the cookie, ignore it, it's unusable.
            s = decodeURIComponent(s.replace(pluses, ' '));
            return config.json ? JSON.parse(s) : s;
        } catch(e) {}
    }

    function read(s, converter) {
        var value = config.raw ? s : parseCookieValue(s);
        return $.isFunction(converter) ? converter(value) : value;
    }

    var config = $.cookie = function (key, value, options) {

        // Write

        if (arguments.length > 1 && !$.isFunction(value)) {
            options = $.extend({}, config.defaults, options);

            if (typeof options.expires === 'number') {
                var days = options.expires, t = options.expires = new Date();
                t.setTime(+t + days * 864e+5);
            }

            return (document.cookie = [
                encode(key), '=', stringifyCookieValue(value),
                options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
                options.path    ? '; path=' + options.path : '',
                options.domain  ? '; domain=' + options.domain : '',
                options.secure  ? '; secure' : ''
            ].join(''));
        }

        // Read

        var result = key ? undefined : {};

        // To prevent the for loop in the first place assign an empty array
        // in case there are no cookies at all. Also prevents odd result when
        // calling $.cookie().
        var cookies = document.cookie ? document.cookie.split('; ') : [];

        for (var i = 0, l = cookies.length; i < l; i++) {
            var parts = cookies[i].split('=');
            var name = decode(parts.shift());
            var cookie = parts.join('=');

            if (key && key === name) {
                // If second argument (value) is a function it's a converter...
                result = read(cookie, value);
                break;
            }

            // Prevent storing a cookie that we couldn't decode.
            if (!key && (cookie = read(cookie)) !== undefined) {
                result[name] = cookie;
            }
        }

        return result;
    };

    config.defaults = {};

    $.removeCookie = function (key, options) {
        if ($.cookie(key) === undefined) {
            return false;
        }

        // Must not alter options, thus extending a fresh object...
        $.cookie(key, '', $.extend({}, options, { expires: -1 }));
        return !$.cookie(key);
    };

}));

$(document).on("ready", function(){
    $('#console_select').on("change",function(){
        // store console cookie, refresh
        $.cookie("console", $('#console_select').val(), { path: '/', expires: 365 });

        window.location = window.location.href;
    });
  
  
    $('#filterPlayerStats').on("click",function(e){
        e.preventDefault();
        
        window.location = '/rivals/stats/?pos=' + $(this).data('pos').toLowerCase() + '&page=1&order=' + $('#ordersort').val() + '&orderby=' + $('#orderby').val();
    });
  
    $('.pageNavStats').on("click",function(e){
        e.preventDefault();
        window.location = '/rivals/stats/?pos=' + $(this).data('pos').toLowerCase() + '&page=' + $(this).data('page') + '&order=' + $('#ordersort').val() + '&orderby=' + $('#orderby').val();
    });

    $('.ratingdonut').each(function(i, elem){
        new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Doughnut([{value: ($(elem).data('rating')),color:'#1c89bb',highlight: "#FF5A5E"},{value: 100-($(elem).data('rating')),color:"#CCC"}], {responsive : false, showTooltips: false});
    });
    
    $('.wlddonut').each(function(i, elem){
        new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Doughnut([{value: ($(elem).data('win')),color:'#1f8abb',highlight: "#1f8abb", label: "Win"},{value: $(elem).data('draw'),color:"#CCC", label: 'Draw'}, {value: $(elem).data('lost'),color:"#ff5a5e", label: 'Lose'}], {responsive : false, showTooltips: true});
    });
  
    $('.positionSpider').each(function(i, elem){
    
        var data = {
            labels: ["Goalkeeper", "Defence", "Midfield", "Attack", "Any"],
            datasets: [
                {
                    label: "My First dataset",
                    fillColor: "rgba(28, 137, 187,0.2)",
                    strokeColor: "rgba(28, 137, 187,1)",
                    pointColor: "rgba(28, 137, 187,1)",
                    pointStrokeColor: "#fff",
                    pointHighlightFill: "#fff",
                    pointHighlightStroke: "rgba(220,220,220,1)",
                    data: [$(elem).data('gk'),$(elem).data('def'),$(elem).data('mid'),$(elem).data('atk'),$(elem).data('any')]
                }
            ]
        };   
        var options = {
            scaleBeginAtZero: false,
            pointLabelFontFamily : "'Roboto'",
            pointLabelFontStyle : "bold",
        }
        var myRadarChart = new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Radar(data, options);       
    });
});
 

Hecter

Member
I can't post the other which I suspect where the problem might have began but at the moment both of these have been removed from my server, can you tell me if the above conflicts with your .js file as I need to use the above.
 

Clement

Freaky Coder
Staff member
No they are displaying now.
Though they now need some css tweaking.

For the team name color, try changing it using following css id:
div.jQBracket .teamContainer a.username

Don't forget to use !important, it might be needed.
 

Attachments

  • Capture d’écran 2018-08-09 à 19.11.26.png
    Capture d’écran 2018-08-09 à 19.11.26.png
    12.5 KB · Views: 5

Hecter

Member
No they are displaying now.
Though they now need some css tweaking.

For the team name color, try changing it using following css id:
div.jQBracket .teamContainer a.username

Don't forget to use !important, it might be needed.

Ok I have it showing but the brackets are a complete mess. When I turn off the offending addon, when I turn it on the bracket looks absolutely fine but the names are not appearing.

Is it possible we could chat on skype or something to get this fixed as this is taking way longer than I would like, plus I can send you the file with the offending code and you can tell me which part is conflicting which will hopefully solve the issue instantly.
 
Last edited:

Clement

Freaky Coder
Staff member
What complete mess ? The bracket you shown looked mostly fine.

It's taking longer due to the offending add-on, which is not our fault.
We don't provide free support per skype, I am sorry.

Regarding the offending add-on, as I was telling in one of my previous message it's including the jquery-bracket javascript that we also use in our add-on but it's an old version. Ours is more recent and we also did some custom modification to it.

Clément
 

Hecter

Member
What complete mess ? The bracket you shown looked mostly fine.

It's taking longer due to the offending add-on, which is not our fault.
We don't provide free support per skype, I am sorry.

Regarding the offending add-on, as I was telling in one of my previous message it's including the jquery-bracket javascript that we also use in our add-on but it's an old version. Ours is more recent and we also did some custom modification to it.

Clément

I think you're misunderstanding me, the addons are turned off and the bracket is still a complete shambles, I would say thats your issue and not mine as all I have done is change the background colour of the bracket and the round robin tables, even on a fresh install its not working correctly.
 

Hecter

Member

Clement

Freaky Coder
Staff member
How do I show the full name, or team name? Instead of it being squashed.

https://www.fifaesport.net/forum/tournaments/team-bracket-test.3/

In that example the team name is being chopped I'd like it to show the full team name and or the username if this is possible?

First I would recommend you to decrease the font size as it's quite right now IMO.

The width of the box can't be changed unfortunately, we are using the default css from jquery-bracket third party script and it has some fixed size elements. But I think this sizes could be edited, tried quickly in a DOM inspector and that seems achievable.

You would need to edit the width of the following classes:
  • div.jQBracket .team div.label: that's the width of the team name container
  • div.jQBracket .team: that's the team row width, ie. the width of the container above + 30px (scores)
  • div.jQBracket .round: that's the whole round size, same width that the team container

Also on this page: https://www.fifaesport.net/forum/tournaments/

How do I change the block and text colour of the right hand block which currently looks silver?

Edit the css for the following class: .tournamentListItem .tournamentImage, .tournamentListItem .tournamentStats

Strange that it looks like that though, this is picked from default color that are used for example in the resource manager.
 

Hecter

Member
First I would recommend you to decrease the font size as it's quite right now IMO.

The width of the box can't be changed unfortunately, we are using the default css from jquery-bracket third party script and it has some fixed size elements. But I think this sizes could be edited, tried quickly in a DOM inspector and that seems achievable.

You would need to edit the width of the following classes:
  • div.jQBracket .team div.label: that's the width of the team name container
  • div.jQBracket .team: that's the team row width, ie. the width of the container above + 30px (scores)
  • div.jQBracket .round: that's the whole round size, same width that the team container
Bottom part worked perfect but I cannot change the width of the brackets, the default is 70px, 100x and 100px I tried to increase to 100px, 130px and 130px but nothing changed at all.
 

Hecter

Member
You edit the css template of the add-on ?
If not, you used !important ?

I just edited what already existed.

div.jQBracket .round {
position: relative;
width: 150px;
margin-right: 40px;
float: left;
}


div.jQBracket .team {
position: relative;
z-index: 1;
float: left;
background-color: #EEE;
width: 150px;
cursor: default;
}


div.jQBracket .team div.label {
padding: 3px;
position: absolute;
width: 120px;
height: 22px;
white-space: nowrap;
overflow: hidden;
background-color: #363940;
}

What exactly am I changing these values to as I assumed it was just the width value I was to change?
 
Top