CallBackery

 view release on metacpan or  search on metacpan

lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/MHistoryRelaxedEncoding.js  view on Meta::CPAN

/* ************************************************************************

   Copyrigtht: OETIKER+PARTNER AG
   License:    GPL V3 or later
   Authors:    Tobias Oetiker
   Utf8Check:  äöü

************************************************************************ */

/**
 * Make the History object use encodeURI instead of encodeURIComponent
 * in order to generate nicer urls
 **/
qx.Mixin.define("callbackery.data.MHistoryRelaxedEncoding", {
    members: {

        /**
         * Encodes the state value into a format suitable as fragment identifier.
         *
         * @param value {String} The string to encode
         * @return {String} The encoded string
         */
        _encode: function(value) {
            if (qx.lang.Type.isString(value)) {
                return encodeURI(value);
            }

            return "";
        },


        /**
         * Decodes a fragment identifier into a string
         *
         * @param value {String} The fragment identifier
         * @return {String} The decoded fragment identifier
         */
        _decode: function(value) {
            if (qx.lang.Type.isString(value)) {
                return decodeURI(value);
            }

            return "";
        }
    }
});



( run in 1.505 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )