All pastes #191270 Raw Edit

Quelque chose

public text v1 · immutable
·published 2006-10-04 20:28 UTC
rendered paste body
blip:~/Sites/spip fil$ svn diff plugins/_dev_/widgets/
Index: plugins/_dev_/widgets/widgets.js
===================================================================
--- plugins/_dev_/widgets/widgets.js    (revision 5878)
+++ plugins/_dev_/widgets/widgets.js    (working copy)
@@ -19,6 +19,7 @@
        function (c) {
          $(me)
          .unclick()
+         .attr('oldhtml',$(me).html())
          .html(c)
          .find('form')
            .ajaxForm(function(c){
@@ -35,6 +36,11 @@
                'fontFamily': $(me).css('fontFamily')
              })
              .each(function(){this.focus();})
+             .keypress(function(e){
+               if (e.keyCode == 27) {
+                 $(me).html($(me).attr('oldhtml')).click($.setupwidget);
+               }
+             })
            .end()
          .end()
          ;