Need More Info
Last Updated: 02 Jul 2024 14:42 by ADMIN
Phạm
Created on: 20 Jun 2024 09:48
Category: UI for ASP.NET MVC
Type: Bug Report
0
Many components unscaling after upgrade to version 2024.2.514 through NuGet

After i upgrade my ASP.NET MVC project to Telrik UI version 2024.2.514, many component in my web app in smaller than before upgrade. Some form are broken and unable to use. Do you have any idea causes this issue?

I'm looking forward to your answser. Thanks for your support.

3 comments
ADMIN
Ivan Danchev
Posted on: 02 Jul 2024 14:42

Hello Phạm,

Thank you for posting the files.

Could you also post the Layout file (e.g., _Layout.cshtml), in which the bundles are loaded? In addition to the Layout file content, please open the following file and post its version (it should be listed at the top of the file's content):

bundles.Add(new StyleBundle("~/Content/css").Include(AssembleBundleURL("~/Content/","bootstrap.min.css"),

 

As for next steps for verifying if some of the style sheets loaded on the page is responsible for the incorrect appearance of the components, I would suggest commenting the following bundles (highlighted in orange):

using System.Configuration;
using System.IO;
using System.Web;
using System.Web.Optimization;

namespace ILS_MVC
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Clear();
            bundles.UseCdn = true;

            #region CSS
            bundles.Add(new StyleBundle("~/Content/css").Include(AssembleBundleURL("~/Content/","bootstrap.min.css"),
                                                                 AssembleBundleURL("~/Content/","bootstrap-cards.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-submenu.min.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-multiselect.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-theme.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.structure.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.theme.min.css")));

            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(AssembleBundleURL("~/Content/kendo/2024.2.514/", "bootstrap-main.css"),
                                                                       AssembleBundleURL("~/Content/", "kendo_2024.2.514_theme_override.css")));

            bundles.Add(new StyleBundle("~/Content/cuscss").Include(AssembleBundleURL("~/Content/", "Site.css")));
            #endregion

            #region JS
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(AssembleBundleURL("~/Scripts/", "jquery-3.7.1.min.js"),
                                                                     AssembleBundleURL("~/Scripts/", "ils-common.js"),
                                                                     AssembleBundleURL("~/Scripts/", "ajaxloading.js")));

            bundles.Add(new ScriptBundle("~/bundles/codeeffects").Include(AssembleBundleURL("~/Scripts/", "codeeffects.js")));

            bundles.Add(new Bundle("~/bundles/kendo").Include(
                                                                    AssembleBundleURL("~/Scripts/kendo/2024.2.514/", "kendo.all.min.js"),
                                                                    AssembleBundleURL("~/Scripts/kendo/2024.2.514/", "kendo.aspnetmvc.min.js"),
                                                                    AssembleBundleURL("~/Scripts/", "jszip.min.js")));//Kendo Export

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(//AssembleBundleURL("~/Scripts/", "jquery.validate-vsdoc.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.unobtrusive.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.unobtrusive.min.js")));

            bundles.Add(new ScriptBundle("~/bundles/jquerynormal").Include(AssembleBundleURL("~/Scripts/", "jquery.unobtrusive-ajax.js"),
                                                                           AssembleBundleURL("~/Scripts/", "jquery.blockUI.js"),
                                                                           AssembleBundleURL("~/Scripts/", "bootstrap-submenu.min.js"),
                                                                           AssembleBundleURL("~/Scripts/", "jquery-ui-1.13.2.min.js")));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(AssembleBundleURL("~/Scripts/", "modernizr-2.8.3.js")));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(AssembleBundleURL("~/Scripts/", "bootstrap.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "bootstrap-dialog.js"),
                                                                        AssembleBundleURL("~/Scripts/", "bootstrap-multiselect.js"),
                                                                        AssembleBundleURL("~/Scripts/", "respond.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "respond.matchmedia.addListener.min.js")));
            #endregion

            bundles.IgnoreList.Clear();
        }

        internal static string AssembleBundleURL(string localpath, string filename)
        {
            string output = string.Empty;
            string host = ConfigurationManager.AppSettings["ExternalWebAssetsHost"];
            string localFile = HttpContext.Current.Server.MapPath(localpath + filename);
            if (File.Exists(localFile))
            {
                output = localpath + filename;
            }
            else
            {
                output = host + filename;
            }

            return output;
        }
    }
}

You can then run the application again. If the components appearance is ok, start uncommenting the commented bundles one by one, running the page after each uncommented one, to discover which of the bundles is causing the issue.

 

Regards,
Ivan Danchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Phạm
Posted on: 28 Jun 2024 02:58

Hi Ivan,

Thanks for the reply, this is my BundleConfig.cs and the Login.cshtml.

 

BundleConfig.cs

using System.Configuration;
using System.IO;
using System.Web;
using System.Web.Optimization;

namespace ILS_MVC
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Clear();
            bundles.UseCdn = true;

            #region CSS
            bundles.Add(new StyleBundle("~/Content/css").Include(AssembleBundleURL("~/Content/","bootstrap.min.css"),
                                                                 AssembleBundleURL("~/Content/","bootstrap-cards.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-submenu.min.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-multiselect.css"),
                                                                 AssembleBundleURL("~/Content/", "bootstrap-theme.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.structure.min.css"),
                                                                 AssembleBundleURL("~/Content/", "jquery-ui.theme.min.css")));

            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(AssembleBundleURL("~/Content/kendo/2024.2.514/", "bootstrap-main.css"),
                                                                       AssembleBundleURL("~/Content/", "kendo_2024.2.514_theme_override.css")));

            bundles.Add(new StyleBundle("~/Content/cuscss").Include(AssembleBundleURL("~/Content/", "Site.css")));
            #endregion

            #region JS
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(AssembleBundleURL("~/Scripts/", "jquery-3.7.1.min.js"),
                                                                     AssembleBundleURL("~/Scripts/", "ils-common.js"),
                                                                     AssembleBundleURL("~/Scripts/", "ajaxloading.js")));

            bundles.Add(new ScriptBundle("~/bundles/codeeffects").Include(AssembleBundleURL("~/Scripts/", "codeeffects.js")));

            bundles.Add(new Bundle("~/bundles/kendo").Include(
                                                                    AssembleBundleURL("~/Scripts/kendo/2024.2.514/", "kendo.all.min.js"),
                                                                    AssembleBundleURL("~/Scripts/kendo/2024.2.514/", "kendo.aspnetmvc.min.js"),
                                                                    AssembleBundleURL("~/Scripts/", "jszip.min.js")));//Kendo Export

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(//AssembleBundleURL("~/Scripts/", "jquery.validate-vsdoc.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.unobtrusive.js"),
                                                                        AssembleBundleURL("~/Scripts/", "jquery.validate.unobtrusive.min.js")));

            bundles.Add(new ScriptBundle("~/bundles/jquerynormal").Include(AssembleBundleURL("~/Scripts/", "jquery.unobtrusive-ajax.js"),
                                                                           AssembleBundleURL("~/Scripts/", "jquery.blockUI.js"),
                                                                           AssembleBundleURL("~/Scripts/", "bootstrap-submenu.min.js"),
                                                                           AssembleBundleURL("~/Scripts/", "jquery-ui-1.13.2.min.js")));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(AssembleBundleURL("~/Scripts/", "modernizr-2.8.3.js")));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(AssembleBundleURL("~/Scripts/", "bootstrap.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "bootstrap-dialog.js"),
                                                                        AssembleBundleURL("~/Scripts/", "bootstrap-multiselect.js"),
                                                                        AssembleBundleURL("~/Scripts/", "respond.min.js"),
                                                                        AssembleBundleURL("~/Scripts/", "respond.matchmedia.addListener.min.js")));
            #endregion

            bundles.IgnoreList.Clear();
        }

        internal static string AssembleBundleURL(string localpath, string filename)
        {
            string output = string.Empty;
            string host = ConfigurationManager.AppSettings["ExternalWebAssetsHost"];
            string localFile = HttpContext.Current.Server.MapPath(localpath + filename);
            if (File.Exists(localFile))
            {
                output = localpath + filename;
            }
            else
            {
                output = host + filename;
            }

            return output;
        }
    }
}

 

Login.cshtml

@model ILS_MVC.Models.LoginViewModel
@using ILS_MVC.Extensions
@using ILS2_Core.Assets
@using VIPLibrarys

<div class="absolute-center is-responsive">
    <div class="login-form">
        @using (Html.BeginSecureForm("Login", "Home", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @id = "loginForm" }))
        {
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
            <fieldset>
                <legend style="border: none"/>
                <div class="row">
                    <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group">
                        <p class="text-danger" id="validateError"></p>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group">
                        <span class="input-group-addon"><em class="glyphicon glyphicon-user"></em></span>
                        @Html.Kendo().MaskedTextBoxFor(model => Model.UserName).Name("UserName").HtmlAttributes(new { @class = "form-control", @placeholder = "User Name" })
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1  input-group">
                        <span class="input-group-addon"><em class="glyphicon glyphicon-lock"></em></span>
                        @Html.Kendo().MaskedTextBoxFor(model => Model.Password).Name("Password").HtmlAttributes(new { @class = "form-control", @type = "password", @placeholder = "Password" })
                    </div>
                </div>
                @Html.HiddenFor(m => m.RememberMe, new { @id = "rememberMe" })
                <div class="row form-group">
                    <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1  col-lg-10 col-lg-offset-1">
                        @(Html.Kendo().Button().Name("buttonLogin").Content("Login").Events(ev => { ev.Click("validateLogin"); }).HtmlAttributes(new {@class = "btn button2", @type = "button"}))
                    </div>
                </div>
            </fieldset>
        }
    </div>
    <div class="send-code" style="border:1px solid grey; border-radius: 15px; padding:15px;display: none;">
        @Html.Hidden("UserId")
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <h4 style="text-align:center;padding-bottom: 10px;">Two Factor Authentication</h4>
        <fieldset>
            <legend style="border: none"/>
            <div class="row form-group tfa-mail">
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group ">
                    <span class="text-danger k-centered">Send code via Email</span><br />
                    @(Html.Kendo().RadioButton().Name("radioTwoFactor").Value("email").Checked(false).Label(""))
                </div>
            </div>

            <div class="row form-group tfa-text">
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group ">
                    <span class="text-danger k-centered">Send code via Text</span><br />
                    @(Html.Kendo().RadioButton().Name("radioTwoFactor").Value("sms").Checked(true).Label(""))
                </div>
            </div>

            <div class="row form-group tfa-voice">
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group ">
                    <span class="text-danger k-centered">Send code via Voice</span><br />
                    @(Html.Kendo().RadioButton().Name("radioTwoFactor").Value("voice").Checked(false).Label(""))
                </div>
            </div>
            <div class="row form-group">
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1  col-lg-10 col-lg-offset-1">
                    @(Html.Kendo().Button().Name("sendCode").Content("Send Code").Events(ev => { ev.Click("sendCode"); }).HtmlAttributes(new { @class = "btn button2", @type = "button" }))
                </div>
            </div>
        </fieldset>
    </div>
    <div class="verfiy-code" style="border:1px solid grey; border-radius: 15px; padding:15px;display:none; ">
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <h4 style="text-align:center;">Please enter the verification code you received</h4>
        <h5 style="text-align:center;padding-bottom: 10px;">Your code is valid for another <span class="countdown">0</span> minute(s) <span class="countdown-sec">0</span> seconds</h5>
        <fieldset>
            <legend style="border: none" />
            <div class="row form-group">
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 input-group">
                    @(Html.Kendo().TextBox().Name("code").HtmlAttributes(new {@style="text-align:center;font-weight:bold;"}))
                </div>
            </div>
            <div class="row form-group">
                <h5 class="code-incorrect">CODE INCORRECT</h5>
                <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 ">
                    @(Html.Kendo().Button().Name("verifyCode").Content("Verify").Events(ev => { ev.Click("verifyCode"); }).HtmlAttributes(new { @class = "btn button2", @type = "button" }))
                </div>
            </div>
        </fieldset>
    </div>

    <div class="error" style="border:1px solid grey; border-radius: 15px; padding:15px;display:none; ">
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <h4 style="text-align:center;color:red;">ERROR</h4>
        <h5 style="text-align:center;padding-bottom: 10px;">
            No Valid Authentication Methods Present. <br /> Please contact your administrator.
        </h5>
        <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1" style="margin-top:20px;">
            @(Html.Kendo().Button().Name("backToLogin").Content("Back To Login").Events(ev => { ev.Click("backToLogin"); }).HtmlAttributes(new { @class = "btn button2", @type = "button" }))
        </div>
    </div>
</div>
<style>
    .countdown, .countdown-sec {
        font-size: 15px;
        font-weight: bold;
        color: red;
    }
</style>
<script>
    var txtUserName = null, txtPassword, btnLogin = null;

    $(document).ready(function (e) {
        $('#validateError').text('@ViewBag.ExpiredMessage');

        txtUserName = $('#UserName').data('kendoMaskedTextBox');
        txtPassword = $('#Password').data('kendoMaskedTextBox');
        btnLogin = $('#buttonLogin').data('kendoButton');
    });

    $(document).keypress(function (e) {
        if (e.keyCode == 13) {
            if ($("#UserName").is(":focus") && txtUserName.value() != '') {
                $("#Password").focus();
            }
            else if ($("#Password").is(":focus") && txtPassword.value() != '') {
                if (!$('#buttonLogin').hasClass('k-state-disabled')) {
                    validateLogin();
                }
            }
        }
    });

    function validateLogin() {
        $('#validateError').text('');

        if ( txtUserName.value() == '' || txtPassword.value() == '') {
            return;
        }
        login();
    }

    /**
     * Get decrypt an encrypted message with user name + password
     * password: encrypted data in base64 format
     * return decrypted password
     */
    function getPassword(userName, password) {
        try {
            // Detect Firefox
            if (navigator.userAgent.indexOf("Firefox") >= 0) {
                let encryptUserName = encrypt(userName);

                encryptUserName = encryptUserName + "=";

                if (password.startsWith(encryptUserName)) {
                    password = password.substring(encryptUserName.length);

                    let decryptPassword = decrypt(password);

                    if (decryptPassword) {
                        return decryptPassword;
                    }
                }
            }
        } catch (ex) {
        }

        return password;
    }

    function generatePassword(userName, password) {
        let encryptUserName = "";

        try {
            // Detect Firefox
            if (navigator.userAgent.indexOf("Firefox") >= 0) {
                encryptUserName = encrypt(userName);
                password = getPassword(userName, password);
            }

            let encryptPassword = encrypt(password);

            let newPassword = encryptPassword;
            if (encryptUserName) {
                newPassword = encryptUserName + "=" + encryptPassword;
            }

            return newPassword;
        } catch (ex) {
        }

        return password;
    }

    function login() {
        let password = getPassword(txtUserName.value().trim(), txtPassword.value());
        password = encrypt(password);

        $.ajax({
            type: "POST",
            dataType: "json",
            url: '@Url.Action("ValidateLogin", "Home")',
            contentType: 'application/x-www-form-urlencoded; charset=utf-8',
            data: {
                userName: txtUserName.value(),
                password: password,
                rememberMe: $('#rememberMe').prop('checked'),
                fingerPrintValue: fingerPrintValue,
                @Html.AntiForgeryTokenForAjaxPost()
            },
            success: function (data) {
                if (data === "Success") {
                    let newPassword = generatePassword(txtUserName.value().trim(), txtPassword.value());
                    txtPassword.value(newPassword);
                    $('#loginForm').submit();
                } else if (data !== null && data !== undefined && data.Email !== null && data.Email !== undefined) {
                    handleTFA(data);
                } else {
                    if (data != '') {
                        var isLicenseWillExpire =
                            data.indexOf('@ILS2_Core.Assets.ServerStrings.PermissionList_MessageTextLicence') > -1;
                        if (isLicenseWillExpire) {
                            BootstrapDialog.show({
                                title: 'Confirm License',
                                closable: false,
                                message: data,
                                buttons: [
                                    {
                                        label: 'OK',
                                        cssClass: 'btn button1',
                                        action: function(dialogItself) {
                                            $.ajax({
                                                type: "POST",
                                                dataType: "json",
                                                url: '@Url.Action("ContinueLogin", "Home")',
                                                contentType: 'application/x-www-form-urlencoded; charset=utf-8',
                                                data: {
                                                    userName: txtUserName.value(),
                                                    @Html.AntiForgeryTokenForAjaxPost()
                                                },
                                                success: function(data) {
                                                    if (data == "Success") {
                                                        $('#loginForm').submit();
                                                    } else {
                                                        $('#validateError').text(data);
                                                        btnLogin.enable(true);
                                                    }
                                                },
                                                error: function(xhr, props) {
                                                    ajaxError_DisplayMessageBox(
                                                        '@ShareMessageStrings.Message_SomethingWrongs',
                                                        xhr.responseText,
                                                        props.responseText);
                                                    btnLogin.enable(true);
                                                }
                                            })

                                            dialogItself.close();
                                        }
                                    }
                                ]
                            });
                        } else {
                            $('#validateError').text(data);
                        }
                    }

                    btnLogin.enable(true);
                }
            },
            error: function(xhr, props) {
                ajaxError_DisplayMessageBox('@ShareMessageStrings.Message_SomethingWrongs',
                    xhr.responseText,
                    props.responseText);
                btnLogin.enable(true);
            }
        });
    }

    function handleTFA(data) {
        var email = data.Email;
        var phone = data.Phone;
        var cellPhone = data.CellPhone;
        var isValid = false;

        if (data.enableTfaEmail === "true" && email !== null && email.trim() !== "") {
            $(".send-code").find(".tfa-mail").find("label").html(email);
            $(".tfa-mail").show();

            isValid = true;
        } else {
            $(".tfa-mail").hide();
        }

        if (data.enableTfaText === "true" && cellPhone !== null && cellPhone.trim() !== "") {
            $(".send-code").find(".tfa-text").find("label").html(cellPhone);
            $(".tfa-text").show();

            isValid = true;
        } else {
            $(".tfa-text").hide();
        }

        if (data.enableTfaVoice === "true" && phone !== null && phone.trim() !== "") {
            $(".send-code").find(".tfa-voice").find("label").html(phone);
            $(".tfa-voice").show();

            isValid = true;
        } else {
            $(".tfa-voice").hide();
        }

        var enableTfa = (data.enableTfaEmail === "true" ||
            data.enableTfaText === "true" ||
            data.enableTfaVoice === "true");

        if (!isValid && enableTfa) {
            $(".login-form").hide();
            $(".error").show();

        } else {
            if (!isValid) {
                $('#loginForm').submit();

            } else {
                $("#UserId").val(data.UserId);
                $(".login-form").hide();
                $(".send-code").show();
            }
        }
    }

    function sendCode() {
        var userId = $("#UserId").val();
        var sendType = $("input[name='radioTwoFactor']:checked").val();

        var result = postData("/Home/SendCode",
            {
                userId: userId,
                sendType: sendType
            });

        if (result) {
            $(".send-code").hide();
            $(".verfiy-code").show();

            //var minutes = result.ValidSeconds / 60;
            var seconds = result.ValidSeconds % 60;
            var minutes = (result.ValidSeconds - seconds) / 60;

            var interval = setInterval(function () {
                --seconds;
                minutes = (seconds < 0) ? --minutes : minutes;

                if (minutes < 0) {
                    minutes = 0;
                    clearInterval(interval);
                }

                seconds = (seconds < 0) ? 59 : seconds;

                $('.countdown').html(minutes);

                seconds = (seconds < 0 && minutes <= 0) ? 0 : seconds;
                seconds = (seconds < 10) ? '0' + seconds : seconds;

                $('.countdown-sec').html(seconds);
            }, 1000);

            setTimeout(function () {
                window.location = "/";
            }, result.ValidSeconds * 1000);
        }
    }

    function verifyCode() {
        var code = $("#code").val();

        var result = postData("/Home/VerifyCode",
            {
                code: code,
                fingerPrintValue: fingerPrintValue
            });

        if (result === true || result === "Success") {
            $('#loginForm').submit();
        } else {
            $(".code-incorrect").show();
        }
    }

    function backToLogin()
    {
        window.location.reload();
    }

    function encrypt(plainText) {
        var result = fetchData("/Home/Encrypt",
            {
                plainText: window.btoa(plainText)
            });

        return result;
    }

    function decrypt(cipherText) {
        var result = fetchData("/Home/Decrypt",
            {
                cipherText: cipherText
            });

        return result;
    }

</script>
ADMIN
Ivan Danchev
Posted on: 27 Jun 2024 08:49

Hello Phạm,

Usually such issues are caused by:

  • custom CSS that overrides the default styles of the components
  • styles that come from the containers where the components are nested, e.g., a div container element styled with and old Bootstrap version
  • incorrectly loaded kendo theme

Please post:

1. The content of the application's _Layout.cshtml file, so we can check whether the required files are properly loaded. If the js and CSS files are loaded though bundles, post the content of the BundleConfig.cs file as well

2. The content of one of the views shown on the screenshots, on which you see a component that appears smaller than usual

Regards,
Ivan Danchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.