couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elman Reyes (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1668) jquery.couch.js is incompatible with jquery.js version 1.9
Date Tue, 17 Sep 2013 21:55:54 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13770037#comment-13770037
] 

Elman Reyes commented on COUCHDB-1668:
--------------------------------------

Using jQuery.support is not recommended to be used in production (documented by jQuery in
the same link in the above comment).

A temporary solution is to just edit your local copy of jquery.couch.js file and simply hard-code
the cache variable to true or false, based on your needs.

This made my own application work fine, regardless of the user's browser, however your own
mileage may vary.

{panel}
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 6abac2c..e6e9c85 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -995,7 +995,7 @@
     errorMessage = errorMessage || "Unknown error";
     timeStart = (new Date()).getTime();
     $.ajax($.extend($.extend({
-      type: "GET", dataType: "json", cache : !$.browser.msie,
+      type: "GET", dataType: "json", cache : false,
       beforeSend: function(xhr){
         if(ajaxOptions && ajaxOptions.headers){
           for (var header in ajaxOptions.headers){
{panel}
                
> jquery.couch.js is incompatible with jquery.js version 1.9
> ----------------------------------------------------------
>
>                 Key: COUCHDB-1668
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1668
>             Project: CouchDB
>          Issue Type: Dependency upgrade
>            Reporter: bob pasker
>
> jquery.couch 1.2.x line 998:
>           type: "GET", dataType: "json", cache : !$.browser.msie ...
> fails with error: 
> "Uncaught TypeError: Cannot read property 'msie' of undefined"
> because jquery 1.9 removed the deprecated jQuery.browser()
> see: http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message