/** * Title: Social * * Opções de compartilhamento e uso de redes sociais. * * Namespace: * * i3GEO.social * * Veja: * * */ /** * Licença * * GPL2 * * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet * * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com * * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença * Pública Geral GNU conforme publicada pela Free Software Foundation; * * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a * garantia implícita de COMERCIABILIDADE OU ADEQUACÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do * GNU junto com este programa; se não, escreva para a Free Software Foundation, Inc., no endereço 59 Temple Street, Suite * 330, Boston, MA 02111-1307 USA. */ if (typeof (i3GEO) === 'undefined') { var i3GEO = {}; } i3GEO.social = { curtirFacebook : function(url, tipo) { if (tipo === "comtotal") { return ""; } if (tipo === "semtotal") { return ""; } }, publicarTwitter : function(url, tipo) { var re = new RegExp("=", "g"); url = url.replace(re, '%3d'); if (tipo === "comtotal") { return ''; } if (tipo === "semtotal") { return ''; } }, /** * Function: compartilhar * * Cria os botões de publicar no Twitter e curtir/compartilhar no Facebook * * Gera o HTML contendo as tags IMG com os links * * Parametros: * * {string} - id do elemento HTML que receberá os links * * {string} - url para o Facebook * * {string} - url para o Twitter * * {string} - tipo de botão comtotal|semtotal * * {string} - url onde está o i3Geo. Se não for especificada, será obtida de i3GEO.configura.locaplic * * Return: * * HTML com os botões */ compartilhar : function(id, urlcf, urlpt, tipo, locaplic) { if (!locaplic) { locaplic = i3GEO.configura.locaplic; } if (!tipo) { tipo = "comtotal"; } var onde = $i(id), tabela = ""; if (tipo === "comtotal") { tabela += ""; } if (tipo === "semtotal") { tabela += "
"; } if (onde || id === "") { if (urlpt !== "") { tabela += ""; } if (urlcf !== "") { // tabela += ""; tabela += ""; } tabela += "
" + i3GEO.social.publicarTwitter(urlpt, tipo) + "" + i3GEO.social.curtirFacebook(urlcf, tipo) + "
"; if (id !== "") { onde.innerHTML = tabela; } return tabela; } else { return false; } }, /** * Function: bookmark * * Cria os botões de bookmark em redes sociais * * Gera o HTML contendo as tags IMG com os links * * Parametro: * * {string} - link que será marcado * * {string} - url onde está o i3Geo. Se não for especificada, será obtida de i3GEO.configura.locaplic * * Return: * * HTML com os botões */ bookmark : function(link, locaplic) { if (!locaplic) { locaplic = i3GEO.configura.locaplic; } var ins = " "; ins += " "; ins += " "; ins += ""; return ins; } };