r4253 bugfix: Permissions code editor was broken with Google Chrome
authorAlexey Andriyanov <alan@al-an.info>
Tue, 22 Feb 2011 18:33:29 +0000 (18:33 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Tue, 22 Feb 2011 18:33:29 +0000 (18:33 +0000)
codepress.html: changed browser engine to gecko-compatible
js:verify(): removed unused prevCode var
js:document.ready(): idem

ChangeLog
wwwroot/inc/interface.php
wwwroot/js/codepress/codepress.html

index 2f72e19e928661c8353c790bac3244cb62225949..8fc25fe31884ac18b6ad5f8c58009472425125ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 0.19.2
        bugfix: port linking was broken for some users due to open PDO cursor
+       bugfix: Permissions code editor was broken with Google Chrome
 0.19.1 2011-02-22
        update: UI: rack lists are now reduced by common tags with object on Rackspace tab (FILTER_RACKLIST_BY_TAGS config var)
        update: 802.1q: If switch has IP interface in some VLAN linked to IP subnet, this VLAN is not pruned from switch's uplink
index 37bc54f713f028608ee51b43abf7c77a141c6104..57bbfe8434c5b597ef9499d7ca35c10c194c37da 100644 (file)
@@ -6449,13 +6449,12 @@ function renderRackCodeEditor ()
 {
        addJS ('js/codepress/codepress.js');
        addJS (<<<ENDJAVASCRIPT
-var prevCode = '';
 function verify()
 {
        $.ajax({
                type: "POST",
                url: "ajax.php",
-               data: "ac=verifyCode&code="+RCTA.getCode(),
+               data: {'ac': 'verifyCode', 'code': RCTA.getCode()},
                success: function (data)
                {
                        arr = data.split("\\n");
@@ -6471,19 +6470,14 @@ function verify()
                                $("#ShowMessage")[0].innerHTML = arr[1];
                                $("#ShowMessage")[0].className = "msg_warning";
                        }
-                       prevCode = RCTA.getCode();
                }
        });
 }
 
 $(document).ready(function() {
-       if (prevCode != RCTA.getCode())
-       {
-               prevCode = RCTA.getCode();
-               $("#SaveChanges")[0].disabled = "disabled";
-               $("#ShowMessage")[0].innerHTML = "";
-               $("#ShowMessage")[0].className = "";
-       }
+       $("#SaveChanges")[0].disabled = "disabled";
+       $("#ShowMessage")[0].innerHTML = "";
+       $("#ShowMessage")[0].className = "";
 });
 ENDJAVASCRIPT
        , TRUE);
index 20270feab98de03b7068f5924b09bad14ab96dad..99209bf88a81ee98918c879a9b05279cfcabde9e 100644 (file)
@@ -12,7 +12,7 @@
        var lh = location.href;\r
        \r
        if(ua.match('MSIE')) engine = 'msie';\r
-       else if(ua.match('KHTML')) engine = 'khtml'; \r
+       else if(ua.match('KHTML')) engine = 'gecko'; \r
        else if(ua.match('Opera')) engine = 'opera'; \r
        else if(ua.match('Gecko')) engine = 'gecko';\r
 \r