Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.

default change to rtl with jquery #55

Open
ahk124 opened this issue Sep 1, 2019 · 0 comments
Open

default change to rtl with jquery #55

ahk124 opened this issue Sep 1, 2019 · 0 comments

Comments

@ahk124
Copy link

ahk124 commented Sep 1, 2019

Hi

How can I rtl the template page by default with jquery?

function (a, b) {
a("#ace-settings-rtl").removeAttr("checked").on("click", function () {
c()
});
var c = function () {
function b(b) {
function c(a, b) {
e.find("." + a).removeClass(a).addClass("tmp-rtl-" + a).end().find("." + b).removeClass(b).addClass(a).end().find(".tmp-rtl-" + a).removeClass("tmp-rtl-" + a).addClass(b)
}
var d = a(document.body);
b || d.toggleClass("rtl"), b = b || document.body;
var e = a(b);
e.find(".dropdown-menu:not(.datepicker-dropdown,.colorpicker)").toggleClass("dropdown-menu-right").end().find(".pull-right:not(.dropdown-menu,blockquote,.profile-skills .pull-right)").removeClass("pull-right").addClass("tmp-rtl-pull-right").end().find(".pull-left:not(.dropdown-submenu,.profile-skills .pull-left)").removeClass("pull-left").addClass("pull-right").end().find(".tmp-rtl-pull-right").removeClass("tmp-rtl-pull-right").addClass("pull-left").end().find(".chosen-select").toggleClass("chosen-rtl").next().toggleClass("chosen-rtl"), c("align-left", "align-right"), c("no-padding-left", "no-padding-right"), c("arrowed", "arrowed-right"), c("arrowed-in", "arrowed-in-right"), c("tabs-left", "tabs-right"), c("messagebar-item-left", "messagebar-item-right"), a(".modal.aside-vc").ace_aside("flip").ace_aside("insideContainer"), e.find(".fa").each(function () {
if (!(this.className.match(/ui-icon/) || a(this).closest(".fc-button").length > 0))
for (var b = this.attributes.length, c = 0; b > c; c++) {
var d = this.attributes[c].value;
d.match(/fa-(?:[\w-]+)-left/) ? this.attributes[c].value = d.replace(/fa-([\w-]+)-(left)/i, "fa-$1-right") : d.match(/fa-(?:[\w-]+)-right/) && (this.attributes[c].value = d.replace(/fa-([\w-]+)-(right)/i, "fa-$1-left"))
}
});
var f = d.hasClass("rtl");
f ? (e.find(".scroll-hz").addClass("make-ltr").find(".scroll-content").wrapInner('

'), a(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("changeDir", "right")) : (e.find(".scroll-hz").removeClass("make-ltr").find(".make-rtl").children().unwrap(), a(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("changeDir", "left")), a.fn.ace_scroll && e.find(".scroll-hz").ace_scroll("reset");
try {
var g = a("#piechart-placeholder");
if (g.length > 0) {
var h = d.hasClass("rtl") ? "nw" : "ne";
g.data("draw").call(g.get(0), g, g.data("chart"), h)
}
} catch (i) { }
ace.helper.redraw(b, !0)
}
b(), a(".page-content-area[data-ajax-content=true]").on("ajaxscriptsloaded.rtl", function () {
a("body").hasClass("rtl") && b(this)
})
}
}(jQuery),

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant