Browse Source

Image en fond transparent (sinon récupère la grille de fond de SPIP 3.1). Et renommer l’image en « croix-centre-image.png» («croix.png » était beaucoup trop générique = source de conflits)

svn/root/tags/v0.10.7
arno@rezo.net 6 years ago
parent
commit
08e0b246a2
  1. 2
      .gitattributes
  2. 2
      centre_image_fonctions.php
  3. 3
      centre_image_gestion.js
  4. 0
      imgs/croix-centre-image.png
  5. 2
      paquet.xml

2
.gitattributes

@ -3,7 +3,7 @@ action/centre_image_forcer.php -text
/centre_image_fonctions.php -text
/centre_image_gestion.js -text
/centre_image_json.html -text
imgs/croix.png -text
imgs/croix-centre-image.png -text
inc/FaceDetector.php -text
inc/centre_image_lib.php -text
inc/detection.dat -text

2
centre_image_fonctions.php

@ -231,7 +231,7 @@ function centre_image_visage($fichier) {
**/
function centre_image_header_prive($flux) {
$flux .= "\n<script type='text/javascript' src='".find_in_path("centre_image_gestion.js")."'></script>\n";
$flux .= "\n<script>var croix = '".find_in_path("imgs/croix.png")."'</script>";
$flux .= "\n<script>var croix = '".find_in_path("imgs/croix-centre-image.png")."'</script>";
return $flux;
}

3
centre_image_gestion.js

@ -1,9 +1,10 @@
function centre_image_croix(el, x, y) {
if (el.find("img.croix_centre_image").length == 0) {
alert("Hop");
el.css("display", "inline-block").css("position", "relative")
.find("img").addClass("img_source").css("border", "1px solid green")
.parent()
.prepend("<img src='"+croix+"' class='croix_centre_image' style='cursor: move; position: absolute; margin-left: -7px; margin-top: -7px; margin-right: -7px; margin-bottom: -7px;'>");
.prepend("<img src='"+croix+"' class='croix_centre_image' style='cursor: move; position: absolute; margin-left: -7px; margin-top: -7px; margin-right: -7px; margin-bottom: -7px;background:transparent;'>");
}
el.find("img.croix_centre_image").css("left", x+"px").css("top", y+"px")

0
imgs/croix.png → imgs/croix-centre-image.png

Before

Width: 15  |  Height: 15  |  Size: 989 B

After

Width: 15  |  Height: 15  |  Size: 989 B

2
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="centre_image"
categorie="multimedia"
version="0.7.1"
version="0.8.0"
etat="dev"
compatibilite="[3.0.18;3.1.*]"
logo="prive/themes/spip/images/centre_image-64.png"

Loading…
Cancel
Save