Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -2,4 +2,4 @@
var parentLink=elem.closest('a');if(parentLink.length){parentLink.off('click',this._boundHandler);if(parentLink.attr('data-vleHref')){parentLink.attr('href',parentLink.attr('data-vleHref')).removeAttr('data-vleHref');}}},_preventDefaultHandler:function(e){e.preventDefault();},_enableLangEditing:function(e){var elem=$(e.currentTarget);var parentLink=elem.closest('a');if(parentLink.length){parentLink.on('click',this._boundHandler).attr('data-vleHref',parentLink.attr('href')).attr('href','#');}
var inputNode=$('<input/>').attr({type:'text'}).addClass('ipsField_loading ipsField_vle').attr('data-role','vle');elem.html('').append(inputNode);ips.getAjax()('?app=core&module=system&controller=vle&do=get&key='+elem.attr('data-vle')).done(function(response){console.log(elem.attr('data-vle'));inputNode.val(response).attr({'data-original':response}).removeClass('ipsField_loading').focus().select()}).fail(function(){ips.ui.alert.show({type:'alert',icon:'warn',message:ips.getString('js_login_both'),});});},_removeLangTag:function(element){if(_.isUndefined(element)){return;}
var elem=$(element);elem.contents().filter(function(){return this.nodeType===3||this.tagName==="LABEL"||this.tagName==="SPAN";}).each(function(){$(this).replaceWith($(this).text().replace(/#VLE#(.+?)#!#/gm,function(match,key){return(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined)?ipsVle[key]:'';}));});elem.find('i[class]').each(function(){$(this).attr('class',$(this).attr('class').replace(/#VLE#(.+?)#!#/gm,function(match,key){return(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined)?ipsVle[key]:'';}));});elem.find('[placeholder]').each(function(){$(this).attr('placeholder',$(this).attr('placeholder').replace(/#VLE#(.+?)#!#/gm,function(match,key){return(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined)?ipsVle[key]:'';}));});elem.find('[title]').each(function(){$(this).attr('title',$(this).attr('title').replace(/#VLE#(.+?)#!#/gm,function(match,key){return(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined)?ipsVle[key]:'';}));});elem.find('[aria-label]').each(function(){$(this).attr('aria-label',$(this).attr('aria-label').replace(/#VLE#(.+?)#!#/gm,function(match,key){return(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined)?ipsVle[key]:'';}));});},_setUpTextNodes:function(element){if(_.isUndefined(element)){return;}
var regex=/#VLE#([0-9a-z_-]+?)#!#/igm;$(element).find('*').contents().filter(function(){var elem=$(this);return!elem.is('iframe')&&!elem.closest('[data-ipsEditor]').length&&!elem.is('textarea')&&(elem.is('[value]')||this.nodeType==3);}).each(function(idx,elem){var elem=$(elem);if(elem.get(0).nodeType===3){elem.replaceWith(elem.text().replace(regex,function(match,key){if(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined){return'<span data-vle="'+key+'" data-original="'+ipsVle[key]+'">'+ipsVle[key]+'</span>';}else{return Debug.isEnabled()?key:'';}}));}else if(elem.is('[value]')){if(elem.val()!==''){elem.attr('data-vle',elem.val().replace(regex,'$1')).val(elem.val().replace(regex,function(match,key){if(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined){return ipsVle[key];}else{return Debug.isEnabled()?key:'';}}));}}});}});}(jQuery,_));;
var regex=/#VLE#([0-9a-z_-]+?)#!#/igm;$(element).find('*').contents().filter(function(){var elem=$(this);return!elem.is('iframe')&&!elem.closest('[data-ipsEditor]').length&&!elem.is('textarea')&&(elem.is('[value]')||this.nodeType==3);}).each(function(idx,elem){var elem=$(elem);if(elem.get(0).nodeType===3){elem.replaceWith(elem.text().replace(regex,function(match,key){if(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined){return'<span data-vle="'+key+'" data-original="'+ipsVle[key]+'">'+ipsVle[key]+'</span>';}else{return Debug.isEnabled()?key:'';}}));}else if(elem.is('[value]')){if(elem.val()!==''&&elem.val().length){elem.attr('data-vle',elem.val().replace(regex,'$1')).val(elem.val().replace(regex,function(match,key){if(ipsVle.hasOwnProperty(key)&&ipsVle[key]!==undefined){return ipsVle[key];}else{return Debug.isEnabled()?key:'';}}));}}});}});}(jQuery,_));;