Ah c'est super, je viens de tester le double-clic.
Je trouve qu'il manque un style autour du textarea, c'est un peu
gênant de ne pas visualiser la zone de saisie. Mais sinon c'est super
agréable à utiliser pour corriger un long texte
PS: pourquoi tu t'emmerdes avec jQuery 1.1.1 ?
On Fri, Jul 24, 2009 at 6:00 PM, <arno@rezo.net> wrote:
Author: arno@rezo.net
Date: Fri Jul 24 18:00:37 2009
New Revision: 30175Log:
Galere avec la hauteur de la fenetre (manque dans jQuery 1.1.1)Modified:
_plugins_/edition_plein_ecran/javascript/edition_plein_ecran.jsModified: _plugins_/edition_plein_ecran/javascript/edition_plein_ecran.js
--- _plugins_/edition_plein_ecran/javascript/edition_plein_ecran.js (original)
+++ _plugins_/edition_plein_ecran/javascript/edition_plein_ecran.js Fri Jul 24 18:00:37 2009
@@ -8,6 +8,24 @@
parseInt(jQuery.browser.version) == 6 &&
typeof window['XMLHttpRequest'] != "object";+/* Innerheight parce que jquery 1.1.1 ne le fait pas... */
+/* Nom de fonction impossible pour eviter conflits */
+function hauteurWindowPourTextarea() {
+ var myWidth = 0, myHeight = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ //Non-IE
+ myHeight = window.innerHeight;
+ } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+ //IE 6+ in 'standards compliant mode'
+ myHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+ //IE 4 compatible
+ myHeight = document.body.clientHeight;
+ }
+ return myHeight;
+}
+
+/* Afficher en mode plein ecran et forcer le ScrollTop */
/* Est appele quand double clic, et quand redimensionnement de l'ecran */
@@ -23,10 +41,10 @@
width: "550px",
paddingLeft: Math.floor(($("body").width() - 550) / 2),
paddingRight: Math.ceil(($("body").width() - 550) / 2),
- height: window.innerHeight - (60 + 30),
+ height: hauteurWindowPourTextarea() - (60 + 30),
paddingTop: "30px",
paddingBottom: "30px",
- border: "1",
+ border: "0",
backgroundColor : "white",
zIndex: 1000
});
@@ -90,8 +108,8 @@
/* Au passage: corriger bug d'affichage Firefox 2: certains elements de pages restaient au dessus du textarea */
$("body").css ({
overflow: "hidden",
- marginTop: -1 * $("body").height(),
- height: $("body").height()
+ marginTop: -1 * hauteurWindowPourTextarea(),
+ height: hauteurWindowPourTextarea()
});/\* Afficher bouton expliquant touche Escape pour sortir \*/_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit
--
Fil