The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fixed a bug of ajax-profil_edit

2 posters

Go down

Fixed a bug of ajax-profil_edit Empty Fixed a bug of ajax-profil_edit

Post by Zzbaivong June 22nd 2015, 12:13 pm

Default version of the jQuery library in Forumotion is 1.7.2. Codes use jQuery in forums are written based on this version.
On the user page, when you change the information, ajax-profil_edit function will help you change the information immediately.

Fixed a bug of ajax-profil_edit UGAYx10
Editing the information in user page

However, when you upgrade jQuery library version 1.9 or higher, that function would not be used.

To fix this, do the following:

ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management

Title * : Fixed bug ajax-profil_edit
Placement : In all the pages
Javascript Code * :
Code:
/* Fixed bug ajax-profil_edit by Zzbaivong */

var forumVersion = 1; // Change the number 1 to 0 if your forum version is phpbb2

$(function () {
    if (location.pathname.indexOf("/u") === 0 && _userdata.session_logged_in === 1) {
        function attrValue(ele) {
            var $this = $(ele);
            $this.attr("value", $this.val());
        }
        $(".field_editable").on("input", [".post", ".inputbox"][forumVersion], function () {
            attrValue(this);
        }).on("change", "select", function () {
            attrValue(this);
        }).find("select, input, textarea").each(function () {
            attrValue(this);
        });
    }
});

For Technicians:
Zzbaivong
Zzbaivong
Forumember

Posts : 101
Reputation : 51
Language : JavaScript ^^

http://devs.forumvi.com

Back to top Go down

Fixed a bug of ajax-profil_edit Empty Re: Fixed a bug of ajax-profil_edit

Post by JScript June 22nd 2015, 2:35 pm

@Zzbaivong
Hi, I have already given my opinion on this link https://help.forumotion.com/t141456-a-bug-of-ajax-profil_edit-function#963167 , but in addition, I think that's completely irrelevant because it is not a "bug"!

Still, thanks for the tip...

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum