-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Atualizados arquivos page-* e adicionado biblioteca para redimensiona…
…mento de imagens de ofertas
- Loading branch information
Showing
20 changed files
with
2,329 additions
and
1,826 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
<?php | ||
|
||
/* | ||
* Plugin Name: Ofertas | ||
* Description: Adiciona menus de ofertas | ||
* Author: Redsuns Design e Tecnologia Web | ||
* Author URI: http://www.redsuns.com.br | ||
* Date: 2012-10-02 | ||
* Version: 1.0 | ||
*/ | ||
|
||
|
||
function menuOfertas() | ||
{ | ||
add_menu_page('Ofertas', 'Ofertas', 7, 'ofertas/ofertas.php','','../wp-content/plugins/ofertas/sources/imagens/oferta.png'); | ||
add_submenu_page('ofertas/ofertas.php', 'Nova oferta','Nova oferta', 7, 'ofertas/nova-oferta.php'); | ||
} | ||
|
||
// adding menu | ||
add_action('admin_menu', 'menuOfertas'); | ||
|
||
include_once 'sources/schemas/default-schema-for-ofertas.php'; | ||
|
||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/jquery-1.4.3.min.js'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.mousewheel-3.0.4.pack.js'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/functions-ofertas.js'); | ||
?> | ||
<link rel="stylesheet" type="text/css" href="../wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> | ||
<?php | ||
$url = get_bloginfo('url'); | ||
$themePath = str_replace($url,'..',get_bloginfo('template_url')); | ||
|
||
if(!file_exists($themePath.'/page-ofertas.php')) | ||
{ | ||
@copy('../wp-content/plugins/ofertas/theme-pages/page-ofertas.php',$themePath.'/page-ofertas.php'); | ||
} | ||
|
||
?> | ||
<?php | ||
|
||
/* | ||
* Plugin Name: Ofertas | ||
* Description: Adiciona menus de ofertas | ||
* Author: Redsuns Design e Tecnologia Web | ||
* Author URI: http://www.redsuns.com.br | ||
* Date: 2012-10-02 | ||
* Version: 1.0 | ||
*/ | ||
|
||
|
||
function menuOfertas() | ||
{ | ||
add_menu_page('Ofertas', 'Ofertas', 7, 'ofertas/ofertas.php','','../wp-content/plugins/ofertas/sources/imagens/oferta.png'); | ||
add_submenu_page('ofertas/ofertas.php', 'Nova oferta','Nova oferta', 7, 'ofertas/nova-oferta.php'); | ||
} | ||
|
||
// adding menu | ||
add_action('admin_menu', 'menuOfertas'); | ||
|
||
include_once 'sources/schemas/default-schema-for-ofertas.php'; | ||
|
||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/jquery-1.4.3.min.js'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.mousewheel-3.0.4.pack.js'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js'); | ||
wp_enqueue_style('css', '/wp-content/plugins/ofertas/sources/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css','screen'); | ||
wp_enqueue_script('javascript','/wp-content/plugins/ofertas/sources/js/functions-ofertas.js'); | ||
|
||
$url = get_bloginfo('url'); | ||
$themePath = str_replace($url,'..',get_bloginfo('template_url')); | ||
|
||
if(!file_exists($themePath.'/page-ofertas.php')) | ||
{ | ||
@copy('../wp-content/plugins/ofertas/theme-pages/page-ofertas.php',$themePath.'/page-ofertas.php'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,62 @@ | ||
/* 28/09/2012 */var qtdeCampos=0;function adicionaCampos(){var a=document.getElementById("campoPai"),b=document.createElement("div");b.setAttribute("id","filho"+qtdeCampos);a.appendChild(b);document.getElementById("filho"+qtdeCampos).innerHTML="<input type='file' name='imagem[]' id='campo"+qtdeCampos+"' > <input type='button' onclick='removerCampo("+qtdeCampos+")' class='button' value='Remover este campo'>";qtdeCampos++} | ||
function removerCampo(a){var b=document.getElementById("campoPai"),a=document.getElementById("filho"+a);b.removeChild(a)}function confirmaRemocao(){return confirm("Deseja realmente remover este ciclo de ofertas??")?!0:!1}function imagens(a){jQuery(".imagens_"+a).toggle("slow")}; | ||
/* 28/09/2012 */ | ||
var qtdeCampos = 0; | ||
|
||
function adicionaCampos() { | ||
|
||
var objPai = document.getElementById("campoPai"); | ||
|
||
//Criando o elemento DIV; | ||
|
||
var objFilho = document.createElement("div"); | ||
|
||
//Definindo atributos ao objFilho: | ||
|
||
objFilho.setAttribute("id","filho"+qtdeCampos); | ||
|
||
|
||
|
||
//Inserindo o elemento no pai: | ||
|
||
objPai.appendChild(objFilho); | ||
|
||
//Escrevendo algo no filho recém-criado: | ||
|
||
|
||
document.getElementById("filho"+qtdeCampos).innerHTML = "<input type='file' name='imagem[]' id='campo"+qtdeCampos+"' > <input type='button' onclick='removerCampo("+qtdeCampos+")' class='button' value='Remover este campo'>"; | ||
qtdeCampos++; | ||
|
||
} | ||
|
||
|
||
function removerCampo(id) { | ||
|
||
|
||
var objPai = document.getElementById("campoPai"); | ||
|
||
var objFilho = document.getElementById("filho"+id); | ||
|
||
|
||
|
||
//Removendo o DIV com id específico do nó-pai: | ||
|
||
var removido = objPai.removeChild(objFilho); | ||
|
||
} | ||
|
||
function confirmaRemocao() | ||
{ | ||
var decisao = confirm('Deseja realmente remover este ciclo de ofertas??'); | ||
if(decisao) | ||
{ | ||
return true; | ||
} | ||
else | ||
{ | ||
return false; | ||
} | ||
} | ||
|
||
function imagens(id) | ||
{ | ||
jQuery('.imagens_'+id).slideToggle('slow'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div style="width:400px;"> | ||
<h2>This comes from ajax request</h2> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean non velit. Donec pharetra, felis ut tristique adipiscing, diam magna rhoncus neque, sit amet convallis nibh nibh vel libero. Nulla facilisi. In eleifend nisl quis lorem. Duis semper fringilla justo. Proin imperdiet sapien sed lectus. Integer quis nisl et est elementum tempor. Morbi quis tellus nec turpis suscipit molestie. Praesent sed pede. Pellentesque ac orci. Sed sit amet urna eget tellus hendrerit aliquet. Nulla consectetur, pede aliquam ornare placerat, nunc augue commodo leo, sit amet elementum dolor est eleifend magna. | ||
</p> | ||
<div style="width:400px;"> | ||
<h2>This comes from ajax request</h2> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean non velit. Donec pharetra, felis ut tristique adipiscing, diam magna rhoncus neque, sit amet convallis nibh nibh vel libero. Nulla facilisi. In eleifend nisl quis lorem. Duis semper fringilla justo. Proin imperdiet sapien sed lectus. Integer quis nisl et est elementum tempor. Morbi quis tellus nec turpis suscipit molestie. Praesent sed pede. Pellentesque ac orci. Sed sit amet urna eget tellus hendrerit aliquet. Nulla consectetur, pede aliquam ornare placerat, nunc augue commodo leo, sit amet elementum dolor est eleifend magna. | ||
</p> | ||
</div> |
Oops, something went wrong.