OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  r...@openpkg.org
  Module: openpkg-src                      Date:   22-Oct-2009 08:51:09
  Branch: HEAD                             Handle: 2009102207510800

  Modified files:
    openpkg-src/activemq    activemq-ajax.js activemq.spec

  Log:
    adapter has to come first

  Summary:
    Revision    Changes     Path
    1.2         +82 -83     openpkg-src/activemq/activemq-ajax.js
    1.10        +1  -1      openpkg-src/activemq/activemq.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/activemq/activemq-ajax.js
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 activemq-ajax.js
  --- openpkg-src/activemq/activemq-ajax.js     21 Oct 2009 19:13:52 -0000      
1.1
  +++ openpkg-src/activemq/activemq-ajax.js     22 Oct 2009 06:51:08 -0000      
1.2
  @@ -16,6 +16,88 @@
    * limitations under the License.
    */
   
  +// AMQ Ajax Adapter for jQuery
  +// This class provides an adapter interface for the jquery library to perform
  +// some of the library-dependent tasks...namely logging and ajax.
  +
  +var org = org || {};
  +org.activemq = org.activemq || {};
  +
  +org.activemq.AmqAdapter = {
  +
  +    init: function(options) {
  +    },
  +
  +    /**
  +     *  Implement this method to make an AJAX call to the AjaxServlet. An
  +     *  options object will accompany this class and will contain the 
properties
  +     *  that describe the details of the AJAX call. The options object will
  +     *  have the following properties:
  +     *
  +     *  - method:  'get' or 'post'
  +     *  - data:    query data to accompany the post or get.
  +     *  - success: A callback function that is invoked upon successful
  +     *             completion of the AJAX call. The parameter is:
  +     *             - data: The result of the AJAX call. In the case of XML
  +     *                     data should resolve to a Document element.
  +     *  - error:   A callback when some type of error occurs. The callback
  +     *             function's parameters should be:
  +     *             - xhr:    The XmlHttpRequest object.
  +     *             - status: A text string of the status.
  +     *             - ex:     The exception that caused the error.
  +     */
  +    ajax: function(uri, options) {
  +        if (options.method == 'post') {
  +            jQuery.ajax({
  +                type: "POST",
  +                url: uri,
  +                data: options.data,
  +                success: options.success || function(){},
  +                error: options.error || function(){},
  +                beforeSend: function(xhr) {
  +                    /* Force "Connection: close" for Mozilla browsers to 
work around
  +                     * a bug where XMLHttpRequest sends an incorrect 
Content-length
  +                     * header. See Mozilla Bugzilla #246651.
  +                     */
  +                    xhr.setRequestHeader("Connection", 'close');
  +                }
  +            });
  +        } else {        
  +            jQuery.ajax({
  +                type: "GET",
  +                url: uri,
  +                data: options.data,
  +                success: options.success || function(){},
  +                error: options.error || function(){},
  +                dataType: 'xml'
  +            });
  +        }
  +    },
  +
  +    log: function(message, exception) {
  +        if (typeof console != 'undefined' && console.log)
  +            console.log("AMQAJAX: " + message);
  +    }
  +};
  +
  +/**
  + *
  + * Licensed to the Apache Software Foundation (ASF) under one or more
  + * contributor license agreements.  See the NOTICE file distributed with
  + * this work for additional information regarding copyright ownership.
  + * The ASF licenses this file to You under the Apache License, Version 2.0
  + * (the "License"); you may not use this file except in compliance with
  + * the License.  You may obtain a copy of the License at
  + *
  + * http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   // AMQ Ajax handler
   // This class provides the main API for using the Ajax features of AMQ. It
   // allows JMS messages to be sent and received from javascript when used
  @@ -244,86 +326,3 @@
           }
       };
   }();
  -
  -/**
  - *
  - * Licensed to the Apache Software Foundation (ASF) under one or more
  - * contributor license agreements.  See the NOTICE file distributed with
  - * this work for additional information regarding copyright ownership.
  - * The ASF licenses this file to You under the Apache License, Version 2.0
  - * (the "License"); you may not use this file except in compliance with
  - * the License.  You may obtain a copy of the License at
  - *
  - * http://www.apache.org/licenses/LICENSE-2.0
  - *
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an "AS IS" BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  - */
  -
  -// AMQ Ajax Adapter for jQuery
  -// This class provides an adapter interface for the jquery library to perform
  -// some of the library-dependent tasks...namely logging and ajax.
  -
  -var org = org || {};
  -org.activemq = org.activemq || {};
  -
  -org.activemq.AmqAdapter = {
  -
  -    init: function(options) {
  -    },
  -
  -    /**
  -     *  Implement this method to make an AJAX call to the AjaxServlet. An
  -     *  options object will accompany this class and will contain the 
properties
  -     *  that describe the details of the AJAX call. The options object will
  -     *  have the following properties:
  -     *
  -     *  - method:  'get' or 'post'
  -     *  - data:    query data to accompany the post or get.
  -     *  - success: A callback function that is invoked upon successful
  -     *             completion of the AJAX call. The parameter is:
  -     *             - data: The result of the AJAX call. In the case of XML
  -     *                     data should resolve to a Document element.
  -     *  - error:   A callback when some type of error occurs. The callback
  -     *             function's parameters should be:
  -     *             - xhr:    The XmlHttpRequest object.
  -     *             - status: A text string of the status.
  -     *             - ex:     The exception that caused the error.
  -     */
  -    ajax: function(uri, options) {
  -        if (options.method == 'post') {
  -            jQuery.ajax({
  -                type: "POST",
  -                url: uri,
  -                data: options.data,
  -                success: options.success || function(){},
  -                error: options.error || function(){},
  -                beforeSend: function(xhr) {
  -                    /* Force "Connection: close" for Mozilla browsers to 
work around
  -                     * a bug where XMLHttpRequest sends an incorrect 
Content-length
  -                     * header. See Mozilla Bugzilla #246651.
  -                     */
  -                    xhr.setRequestHeader("Connection", 'close');
  -                }
  -            });
  -        } else {        
  -            jQuery.ajax({
  -                type: "GET",
  -                url: uri,
  -                data: options.data,
  -                success: options.success || function(){},
  -                error: options.error || function(){},
  -                dataType: 'xml'
  -            });
  -        }
  -    },
  -
  -    log: function(message, exception) {
  -        if (typeof console != 'undefined' && console.log)
  -            console.log("AMQAJAX: " + message);
  -    }
  -};
  -
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/activemq/activemq.spec
  ============================================================================
  $ cvs diff -u -r1.9 -r1.10 activemq.spec
  --- openpkg-src/activemq/activemq.spec        21 Oct 2009 19:13:52 -0000      
1.9
  +++ openpkg-src/activemq/activemq.spec        22 Oct 2009 06:51:08 -0000      
1.10
  @@ -32,7 +32,7 @@
   Group:        Network
   License:      Apache
   Version:      5.2.0
  -Release:      20091021
  +Release:      20091022
   
   #   list of sources
   Source0:      
http://www.apache.org/dist/activemq/apache-activemq/%{version}/apache-activemq-%{version}-bin.tar.gz
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to