AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : awebpaca ( 35430)
PHP Version : 8.5.0
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/awebpaca/visitevirtuelle/plugins/system/ova/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/awebpaca/visitevirtuelle/plugins/system/ova/assets/js/create-element.js
/**
 * @version     $Id$
 * @author      OvaTheme
 * @package     Joomla.Site
 * @subpackage  com_ovacomposer
 * @copyright   Copyright (C) 2013 OvaTheme. All rights reserved.
 * @license     License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.
 */

// get K2simple Option
function getK2simpleOption(data){
    content ="<div class='ova-nav-title'><i class='icon-folder-open-alt'></i> K2 Simple<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
    content+="<div class='ova-nav-option ova-k2simple'>";
    content+="<label>Section Id:</label>";
    content+='<input placeholder="Section ID like menu link" type="text" name="ova-elementid" value="'+((data.attr.elementid==null)?"":data.attr.elementid)+'">';
    content+="<label>Title:</label>";
    content+='<input type="text" name="ova-title" value="'+((data.attr.title==null)?"K2 Simple":data.attr.title)+'">';
    content+="<label>Description:</label>";
    content+='<textarea name="ova-description" rows="4" cols="50">'+ ((data.attr.description==null?"K2 Simple":data.attr.description))+'';
    content+="</textarea>";
    content+="<label>Category:</label>";
    content+="<div class='row-fluid ova-category'></div>";
    content+="<label>Count:</label>";
    content+='<input type="text" name="ova-itemcount" value="'+((data.attr.itemcount==null)?"4":data.attr.itemcount)+'">';
    content+='<label>Select Template:</label>';
    content+='<div class="row-fluid"><select name="ova-template" class="ova-template span6">';
    content+='<option value="services">Our Services</option>';
    content+='<option value="about">About Us</option>';
    content+='</select></div>';
    content+="</div>";
    content+="<div class='ova-button-group'>";
    content+="<button class='btn btn-primary btn-save'>Save</button>";
    content+="<button class='btn btn-cancel'>Cancel</button>";
    content+="</div>";
    content+="</div>";
    jQuery('.ova-navigation').html(content);
    jQuery('#ova-navigation .ova-column [value="'+((data.attr.title!=null)?data.attr.title:"")+'"]').prop("checked",true);
    jQuery('#ova-navigation .ova-template [value="'+data.attr.template+'"]').attr("selected","selected");
    jQuery('#ova-navigation .btn-primary.btn-save').click(function(){
        saveK2simple(data);
    });
}

function saveK2simple(data){
    data.attr.title = convertHTML(jQuery('#ova-navigation .ova-k2simple [name="ova-title"]').val());
    data.attr.elementid = convertHTML(jQuery('#ova-navigation .ova-k2simple [name="ova-elementid"]').val());
    data.attr.description = convertHTML(jQuery('#ova-navigation .ova-k2simple [name="ova-description"]').val());
    data.attr.category = jQuery('#ova-navigation .ova-category select').val();
    data.attr.template = jQuery('#ova-navigation .ova-template').val();
    data.attr.itemcount = jQuery('#ova-navigation .ova-k2simple [name="ova-itemcount"]').val();
    var title = convertHTML(jQuery('#ova-navigation .ova-k2simple [name="ova-title"]').val());
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').find('.ova-modulename').remove();
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').append(' <span class="ova-modulename">'+title+'</span>');


    var json = encodeURIComponent(JSON.stringify(data));
    jQuery('#ova-page li.ova-focus').attr("data",json);
    jQuery.stbox.close();
}
// End K2simple Option

// get Team Option
function getTeamOption(data){
    content ="<div class='ova-nav-title'><i class='icon-folder-open-alt'></i> Our Team<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
    content+="<div class='ova-nav-option ova-team'>";
    content+="<label>Section Id:</label>";
    content+='<input placeholder="Section ID like menu link" type="text" name="ova-elementid" value="'+((data.attr.elementid==null)?"":data.attr.elementid)+'">';
    content+="<label>Title:</label>";
    content+='<input type="text" name="ova-title" value="'+((data.attr.title==null)?"K2 Simple":data.attr.title)+'">';
    content+="<label>Description:</label>";
    content+='<textarea name="ova-description" rows="4" cols="50">'+ ((data.attr.description==null?"K2 Simple":data.attr.description))+'';
    content+="</textarea>";
    content+="<label>Category:</label>";
    content+="<div class='row-fluid ova-category'></div>";
    content+="<label>Count:</label>";
    content+='<input type="text" name="ova-itemcount" value="'+((data.attr.itemcount==null)?"4":data.attr.itemcount)+'">';
    content+="</div>";
    content+="<div class='ova-button-group'>";
    content+="<button class='btn btn-primary btn-save'>Save</button>";
    content+="<button class='btn btn-cancel'>Cancel</button>";
    content+="</div>";
    content+="</div>";
    jQuery('.ova-navigation').html(content);
    jQuery('#ova-navigation .ova-column [value="'+((data.attr.title!=null)?data.attr.title:"")+'"]').prop("checked",true);    
    jQuery('#ova-navigation .btn-primary.btn-save').click(function(){
        saveTeam(data);
    });
}

function saveTeam(data){
    data.attr.title = convertHTML(jQuery('#ova-navigation .ova-team [name="ova-title"]').val());
    data.attr.elementid = convertHTML(jQuery('#ova-navigation .ova-team [name="ova-elementid"]').val());
    data.attr.description = convertHTML(jQuery('#ova-navigation .ova-team [name="ova-description"]').val());
    data.attr.category = jQuery('#ova-navigation .ova-category select').val();    
    data.attr.itemcount = jQuery('#ova-navigation .ova-team [name="ova-itemcount"]').val();
    var title = convertHTML(jQuery('#ova-navigation .ova-team [name="ova-title"]').val());
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').find('.ova-modulename').remove();
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').append(' <span class="ova-modulename">'+title+'</span>');

    var json = encodeURIComponent(JSON.stringify(data));
    jQuery('#ova-page li.ova-focus').attr("data",json);
    jQuery.stbox.close();
}
// End Team Option

// get Testmonial Option
function getTestmonialOption(data){
    content ="<div class='ova-nav-title'><i class='icon-folder-open-alt'></i> Testmonial<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
    content+="<div class='ova-nav-option ova-testmonial'>";
    content+="<label>Section Id:</label>";
    content+='<input placeholder="Section ID like menu link" type="text" name="ova-elementid" value="'+((data.attr.elementid==null)?"":data.attr.elementid)+'">';
    content+="<label>Title:</label>";
    content+='<input type="text" name="ova-title" value="'+((data.attr.title==null)?"Testmonial":data.attr.title)+'">';
    content+="<label>Description:</label>";
    content+='<textarea name="ova-description" rows="4" cols="50">'+ ((data.attr.description==null?"Testmonial":data.attr.description))+'';
    content+="</textarea>";
    content+="<label>Category:</label>";
    content+="<div class='row-fluid ova-category'></div>";
    content+="<label>Count:</label>";
    content+='<input type="text" name="ova-itemcount" value="'+((data.attr.itemcount==null)?"4":data.attr.itemcount)+'">';
    content+="</div>";
    content+="<div class='ova-button-group'>";
    content+="<button class='btn btn-primary btn-save'>Save</button>";
    content+="<button class='btn btn-cancel'>Cancel</button>";
    content+="</div>";
    content+="</div>";
    jQuery('.ova-navigation').html(content);
    jQuery('#ova-navigation .ova-column [value="'+((data.attr.title!=null)?data.attr.title:"")+'"]').prop("checked",true);    
    jQuery('#ova-navigation .btn-primary.btn-save').click(function(){
        saveTestmonial(data);
    });
}

function saveTestmonial(data){
    data.attr.title = convertHTML(jQuery('#ova-navigation .ova-testmonial [name="ova-title"]').val());
    data.attr.elementid = convertHTML(jQuery('#ova-navigation .ova-testmonial [name="ova-elementid"]').val());
    data.attr.description = convertHTML(jQuery('#ova-navigation .ova-testmonial [name="ova-description"]').val());
    data.attr.category = jQuery('#ova-navigation .ova-category select').val();    
    data.attr.itemcount = jQuery('#ova-navigation .ova-testmonial [name="ova-itemcount"]').val();
    var title = convertHTML(jQuery('#ova-navigation .ova-testmonial [name="ova-title"]').val());
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').find('.ova-modulename').remove();
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').append(' <span class="ova-modulename">'+title+'</span>');


    var json = encodeURIComponent(JSON.stringify(data));
    jQuery('#ova-page li.ova-focus').attr("data",json);
    jQuery.stbox.close();
}
// End Testmonial Option

// get Portfolio Option
function getPortfolioOption(data){
	content ="<div class='ova-nav-title'><i class='icon-folder-open-alt'></i> Portfolio<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
	content+="<div class='ova-nav-option ova-portfolio'>";
		content+="<label>Section Id:</label>";
        content+='<input type="text" name="ova-elementid" value="'+((data.attr.elementid==null)?"":data.attr.elementid)+'">';
		content+="<label>Select Category:</label>";
        content+="<div class='row-fluid ova-category'></div>";
        content+="<label>Select Extrafield Filter:</label>";
        content+="<div class='row-fluid ova-extrafilter'></div>";
        content+="<label>Item Count:</label>";
        content+='<input type="text" name="ova-count" value="'+((data.attr.count==null)?"100":data.attr.count)+'">';
        content+="<label>Title:</label>";
        content+='<input type="text" name="ova-title" value="'+((data.attr.title==null)?"Portfolio":data.attr.title)+'">';
        content+="<label>Description:</label>";
        content+='<textarea name="ova-description" rows="4" cols="80">'+ ((data.attr.description==null?"":data.attr.description))+'';
        content+="</textarea>";
		content+="<div class='ova-button-group'>";
		content+="<button class='btn btn-primary btn-save'>Save</button>";
		content+="<button class='btn btn-cancel'>Cancel</button>";
		content+="</div>";
	content+="</div>";

	jQuery('.ova-navigation').html(content);
	jQuery('#ova-navigation .btn-primary.btn-save').click(function(){
		savePortfolio(data);
	});
}

function savePortfolio(data){
	data.attr.category = jQuery('#ova-navigation .ova-category select').val();
	data.attr.id = jQuery('#ova-navigation .ova-extrafilter select').val();
	data.attr.elementid = convertHTML(jQuery('#ova-navigation .ova-portfolio [name="ova-elementid"]').val());
	data.attr.title = convertHTML(jQuery('#ova-navigation .ova-portfolio [name="ova-title"]').val());
	data.attr.count = jQuery('#ova-navigation .ova-portfolio [name="ova-count"]').val();
    data.attr.description = convertHTML(jQuery('#ova-navigation .ova-portfolio [name="ova-description"]').val());
	jQuery('#ova-page li.ova-focus').attr("data",encodeURIComponent(JSON.stringify(data)));
	jQuery.stbox.close();
}
// End Portfolio Option


// Get Option HTML
function getHtmlOption(data){
	content ="<div class='ova-nav-title'><i class='icon-code'></i> HTML<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
	content+="<div class='ova-nav-option'>";
        content+="<label>Title</label>";
        content+="<div class='title'><input type='text' class='html-title' value='"+((data.attr.title==null)?"":data.attr.title)+"' ></div>";
		content+="<div class='row-fluid'>";
			content+="<div class='span12 ova-editor'>";
				content+="<iframe class='if-editor' src='index.php?option=com_ovacomposer&task=item.getEditor&tmpl=component' width='100%' height='370'></iframe>";
			content+="</div>";
		content+="</div>";
		content+="<div class='ova-button-group'>";
		content+="<button class='btn btn-primary btn-html'>Save</button>";
		content+="<button class='btn btn-cancel'>Cancel</button>";
		content+="</div>";
	content+="</div>";
	jQuery('.ova-navigation').html(content);
	jQuery('#ova-navigation .if-editor').load(function(){
		setDataEditor(data.content);
		jQuery('#ova-navigation iframe').contents().find('.mce_editable').css('width', '98%');
	});
	jQuery('.ova-nav-option button.btn-primary.btn-html').click(function(){
		saveHtml();
	});
}

function setDataEditor(ct){	
	window.setTimeout(function(){
		  if(jQuery('#ova-navigation iframe').contents().find('iframe').contents().find('body').length>0){
		   jQuery('#ova-navigation iframe').contents().find('iframe').contents().find('body').html(decodeURIComponent(ct));
		  }else{
		   setDataEditor(ct);
		  }
	},300);
}
function saveHtml(){
    var title = convertHTML(jQuery('.ova-navigation .html-title').val());
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').find('.ova-modulename').remove();
    jQuery('#ova-page .ova-focus .ova-header-title .ova-name').append(' <span class="ova-modulename">'+title+'</span>');
	var html = encodeURIComponent(jQuery('#ova-navigation iframe').contents().find('iframe').contents().find('body').html());

	var json = encodeURIComponent(JSON.stringify({"type":"html_desi","content":html,"attr":{"title":title}}));
	jQuery('#ova-page li.ova-focus').attr("data",json);
	jQuery.stbox.close();
}

// End Option HMTL

// Get Option Module
function getModuleOption(data){
	content ="<div class='ova-nav-title'><i class='icon-qrcode-2'></i> Module<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
	content+="<div class='ova-nav-option ova-module'>";
		content+="<div class='row-fluid'>";
			content+="<div class='span12'>";
				content+="<label>Choose:</label>";
				content+="<div class='ova-listmodule'></div>";
			content+="</div>";
		content+="</div>";
		content+="<label>Show title:</label>";
		content+="<div class='row-fluid'><div class='ova-showtitle ova-radio'>"; 
			content+='<label class="radio inline"><input type="radio" name="ova-title" value="0" checked="checked">No</label>';
			content+='<label class="radio inline"><input type="radio" name="ova-title" value="1">Yes</label>';
		content+="</div></div>";
		content+="<label>Module Class Suffix:</label>";
		content+="<div class='row-fluid'><input type='text' class='ova-moduleclass span12' value='"+((data.attr.moduleclass==null)?"":data.attr.moduleclass)+"'></div>";
		content+="<div class='ova-button-group'>";
		content+="<button class='btn btn-primary btn-save'>Save</button>";
		content+="<button class='btn btn-cancel'>Cancel</button>";
		content+="</div>";
	content+="</div>";
	jQuery('.ova-navigation').html(content);
	if(typeof data.attr.showtitle !='undefined'){
		jQuery('#ova-navigation .ova-showtitle [value="'+data.attr.showtitle+'"]').prop('checked', true);
	}
	jQuery('.ova-nav-option button.btn-primary.btn-save').click(function(){
		saveModule();
	});
}

function saveModule(){
	// var title = jQuery('#ova-navigation #jform_modules_chzn>a>span').text();
	var title = convertHTML(jQuery('#ova-navigation #jform_modules').val());
	jQuery('#ova-page .ova-focus .ova-header-title .ova-name').find('.ova-modulename').remove();
	jQuery('#ova-page .ova-focus .ova-header-title .ova-name').append(' <span class="ova-modulename">'+title+'</span>');
	// validate
	if(jQuery('#ova-navigation #jform_modules').val()==0){
		alert('Please select a module !');
		return false;
	}
	if(testspecialclass(jQuery('#ova-navigation .ova-moduleclass').val())){
		data = {"type":"moduleid_desi","content":"","attr":{"id":jQuery('.ova-nav-option #jform_modules').val(),"title":title}};
		data.attr.showtitle=jQuery('#ova-navigation .ova-showtitle [type="radio"]:checked').val();
		data.attr.moduleclass = jQuery('#ova-navigation .ova-moduleclass').val();
		var json = encodeURIComponent(JSON.stringify(data));
		jQuery('#ova-page li.ova-focus').attr("data",json);
		jQuery.stbox.close();
	}else{
		alert('No special characters allowed.');
		return false;
	}
}

// End Option Module

// get Option Google map
function getGooglemapOption(data){
	content ="<div class='ova-nav-title'><i class='icon-mail-6'></i> Google Map<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
    content+="<div class='ova-nav-option'>";
    	content+="<label>Insert Address:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-address span12' value='"+((data.attr.address!=null)?data.attr.address:"")+"' placeholder='Address'></div>";
        content+="<label>Or use two paraments bellow</label>";
        content+="<label>Latitude:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-latitude span12' value='"+((data.attr.latitude!=null)?data.attr.latitude:"")+"' placeholder='Latitude'></div>";
        content+="<label>Longitude:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-longitude span12' value='"+((data.attr.longitude!=null)?data.attr.longitude:"")+"' placeholder='Longitude'></div>";
        content+="<label>Zoom:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-zoom span12' value='"+((data.attr.zoom!=null)?data.attr.zoom:"")+"' placeholder='16'></div>";
        content+="<div class='ova-button-group'>";
        content+="<button class='btn btn-primary btn-save'>Save</button>";
        content+="<button class='btn btn-cancel'>Cancel</button>";
        content+="</div>";
    content+="</div>";
    jQuery('.ova-navigation').html(content);
    jQuery('.ova-nav-option button.btn-primary.btn-save').click(function(){
        saveGooglemapForm();
    });
}

function saveGooglemapForm(){
	data = {"type":"googlemap_desi","content":"","attr":{}};
	data.attr.address=convertHTML(jQuery('.ova-navigation .ova-nav-option .ova-address').val());
	data.attr.zoom=jQuery('.ova-navigation .ova-nav-option .ova-zoom').val();
    data.attr.latitude=jQuery('.ova-navigation .ova-nav-option .ova-latitude').val();
    data.attr.longitude=jQuery('.ova-navigation .ova-nav-option .ova-longitude').val();    
    var json = encodeURIComponent(JSON.stringify(data));
    jQuery('#ova-page li.ova-focus').attr("data",json);
    jQuery.stbox.close();
}

// End Option Google map

// get Option Contact Form 
function getContactOption(data){
	content ="<div class='ova-nav-title'><i class='icon-mail-6'></i> Contact Form<span class='ova-close' title='Close'><i class='icon-cancel-circle'></i></span></div>";
    content+="<div class='ova-nav-option'>";
        content+="<label>Title:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-title span12' value='"+((data.attr.title!=null)?data.attr.title:"")+"' placeholder='Title'></div>";
        content+="<label>Description:</label>";
        content+='<textarea name="description" class="ova-description" rows="4" cols="50">'+ ((data.attr.description==null?"Contact":data.attr.description))+'</textarea>';
        content+="<label>Email:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-email span12' value='"+((data.attr.email!=null)?data.attr.email:"")+"' placeholder='Email'></div>";
        content+="<label>Subject:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-subject span12' value='"+((data.attr.subject!=null)?data.attr.subject:"")+"' placeholder='Subject'></div>";
        content+="<label>Thank You Message:</label>";
        content+="<div class='row-fluid'><input type='text' class='ova-thanks span12' value='"+((data.attr.thanks!=null)?data.attr.thanks:"")+"' placeholder='Thank You Message'></div>";
        content+="<div class='ova-button-group'>";
        content+="<button class='btn btn-primary btn-save'>Save</button>";
        content+="<button class='btn btn-cancel'>Cancel</button>";
        content+="</div>";
    content+="</div>";
    jQuery('.ova-navigation').html(content);
    jQuery('.ova-nav-option button.btn-primary.btn-save').click(function(){
        saveContactForm();
    });
}

function saveContactForm(){
	data = {"type":"contact_desi","content":"","attr":{}};
    data.attr.title=convertHTML(jQuery('.ova-navigation .ova-nav-option .ova-title').val());
    data.attr.description=convertHTML(jQuery('.ova-navigation .ova-nav-option .ova-description').val());
    data.attr.email=jQuery('.ova-navigation .ova-nav-option .ova-email').val();
    data.attr.subject=convertHTML(jQuery('.ova-navigation .ova-nav-option .ova-subject').val());
    data.attr.thanks=convertHTML(jQuery('.ova-navigation .ova-nav-option .ova-thanks').val());
    var json = encodeURIComponent(JSON.stringify(data));
    jQuery('#ova-page li.ova-focus').attr("data",json);
    jQuery.stbox.close();
}

// End Contact Form 



Anon7 - 2022
AnonSec Team