MOD avancement dans la Grande Restructuration
[euphorik.git] / js / util.js
index c70f7e5..638fa6d 100644 (file)
@@ -167,8 +167,7 @@ euphorik.Util.prototype.infoBulle = function(message, element, position) {
          var depassementDroit = (positionMessage.left + m.width()) - $("body").width();
          if (depassementDroit > 0) {
             positionMessage.left -= depassementDroit;\r
-         }
-         else if (positionMessage.left < 0) {
+         } else if (positionMessage.left < 0) {
             positionMessage.left = 0;
          }
          
@@ -200,8 +199,7 @@ euphorik.Util.prototype.setSelectionRange = function(input, selectionStart, sele
    if (input.setSelectionRange) {
       input.focus();
       input.setSelectionRange(selectionStart, selectionEnd);
-   }
-   else if (input.createTextRange) {
+   } else if (input.createTextRange) {
       var range = input.createTextRange();
       range.collapse(true);
       range.moveEnd('character', selectionEnd);
@@ -233,12 +231,10 @@ euphorik.Util.prototype.replaceSelection = function(input, replaceString) {
       
       if (selectionStart != selectionEnd) { // has there been a selection
          this.setSelectionRange(input, selectionStart, selectionStart + replaceString.length);\r
-      }
-      else { // set caret
+      } else { // set caret
          this.setCaretToPos(input, selectionStart + replaceString.length);\r
       }
-   }
-   else if (document.selection) {
+   } else if (document.selection) {
       input.focus();
       var range = document.selection.createRange();
       if (range.parentElement() == input) {