Remove Address::updateGeocoding unused parameter
[platal.git] / htdocs / javascript / xorg.js
index 47bf78b..2ce2212 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2011 Polytechnique.org                              *
+ *  Copyright (C) 2003-2014 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -147,7 +147,7 @@ function addSearchEngine()
 
             return this.overlib({
                 text: text,
-                caption: this.attr('title') || goodies.default_title,
+                caption: this.attr('title') || goodies[type].default_title,
                 close_text: 'Fermer',
                 delay: 800,
                 sticky: true,
@@ -179,7 +179,7 @@ function auto_links() {
         }
         if ((!href.contains(fqdn) && !this.className.contains('popup')) || node.hasClass('popup')) {
             node.click(function () {
-                window.open(this.href);
+                window.open($.plURL(this.href));
                 return false;
             });
         }
@@ -662,7 +662,6 @@ function doChallengeResponse() {
     }
     document.forms.loginsub.username.value = document.forms.login.username.value;
     document.forms.loginsub.remember.value = document.forms.login.remember.checked;
-    document.forms.loginsub.domain.value = document.forms.login.domain.value;
     document.forms.login.password.value = "";
     document.forms.loginsub.submit();
 }
@@ -817,7 +816,7 @@ function sendTestEmail(token, hruid)
 
         popWin: function(w, h) {
             return this.click(function() {
-                window.open(this.href, '_blank',
+                window.open($.plURL(this.href), '_blank',
                             'toolbar=0,location=0,directories=0,status=0,'
                            +'menubar=0,scrollbars=1,resizable=1,'
                            +'width='+w+',height='+h);
@@ -839,20 +838,23 @@ function previewWiki(idFrom, idTo, withTitle, idShow)
 }
 
 // }}}
-// {{{ send test email
-
-function sendTestEmail(token, hruid)
-{
-    var url = 'emails/test';
-    var msg = "Un email a été envoyé avec succès";
-    if (hruid != null) {
-        url += '/' + hruid;
-        msg += " sur l'adresse de " + hruid + ".";
-    } else {
-        msg += " sur ton addresse.";
+// {{{ updatepromofields
+
+function updatepromofields(egal1, egal2, promo2) {
+    var comparator = egal1.val();
+
+    if (comparator == '=') {
+        egal2.attr('disabled', 'disabled');
+        promo2.attr('disabled', 'disabled');
+    } else if (comparator == '<=' || comparator == '>=') {
+        egal2.removeAttr('disabled');
+        promo2.removeAttr('disabled');
+        if (comparator == '<=') {
+            egal2.val('>=');
+        } else {
+            egal2.val('<=');
+        }
     }
-    $('#mail_sent').successMessage($url + '?token=' + token, msg);
-    return false;
 }
 
 // }}}
@@ -1063,7 +1065,7 @@ function sendTestEmail(token, hruid)
                         break;
                       case 'admin':
                         $(this).attr('href', 'admin/user/' + profile.hrpid)
-                        .click(function() { window.open($(this).attr('href')); return false });
+                        .click(function() { window.open($.plURL(this.href)); return false });
                         break;
                     }
                 }
@@ -1253,4 +1255,4 @@ $(function() {
     });
 });
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: