[icinga-checkins] icinga.org: icinga-web/r1.6: * Multiline have now the same behaviour as in the classic interface ( fixes #2224)

git at icinga.org git at icinga.org
Fri Feb 24 15:20:27 CET 2012


Module: icinga-web
Branch: r1.6
Commit: c60e8a65ae6db977071df9c8eca20ea0e5f8aa32
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=c60e8a65ae6db977071df9c8eca20ea0e5f8aa32

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Fri Feb 24 12:30:24 2012 +0100

* Multiline have now the same behaviour as in the classic interface (fixes #2224)

---

 .../Commands/CommandDispatcherModel.class.php      |    4 +++-
 .../Cronks/lib/js/grid/IcingaCommandHandler.js     |    9 +--------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/app/modules/Api/models/Commands/CommandDispatcherModel.class.php b/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
index 3e404d6..6cd991f 100644
--- a/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
+++ b/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
@@ -78,7 +78,8 @@ class Api_Commands_CommandDispatcherModel extends IcingaApiBaseModel implements
                 $str .= ";";
             } else {
                 $val = $params[$vals["alias"]];
-
+                $val = preg_replace("/\n/"," ",$val);
+                    
                 switch ($vals["type"]) {
                     case "date":
                         $val = strtotime($val);
@@ -90,6 +91,7 @@ class Api_Commands_CommandDispatcherModel extends IcingaApiBaseModel implements
                 else
                     $str .= "|".$val;
             }
+
         }
         return $str;
     }
diff --git a/app/modules/Cronks/lib/js/grid/IcingaCommandHandler.js b/app/modules/Cronks/lib/js/grid/IcingaCommandHandler.js
index f20f4a2..e98f336 100755
--- a/app/modules/Cronks/lib/js/grid/IcingaCommandHandler.js
+++ b/app/modules/Cronks/lib/js/grid/IcingaCommandHandler.js
@@ -262,14 +262,7 @@ IcingaCommandHandler.prototype = {
                 allowBlank: !(o.fieldRequired || false),
                 enableKeyEvents: true,
                 listeners: {
-                    /*
-                     * For text consistency system-wide
-                     */
-                    keydown: function (textField, event) {
-                        if (event.getKey() === Ext.EventObject.ENTER) {
-                            event.stopEvent();
-                        }
-                    }
+                    
                 }
             });
             return new Ext.form.TextArea(oDef);





More information about the icinga-checkins mailing list