#9702 fixed
This commit is contained in:
parent
c744e9286e
commit
ae0973c16b
|
@ -8,4 +8,7 @@ rules:
|
|||
no-mixed-spaces-and-tabs: 0
|
||||
no-console: 0
|
||||
no-cond-assign: 0
|
||||
no-unexpected-multiline: 0
|
||||
no-unexpected-multiline: 0
|
||||
brace-style: [error, 1tbs]
|
||||
space-before-function-paren: [error, never]
|
||||
padded-blocks: [error, never]
|
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.406.26) stable; urgency=low
|
||||
hedera-web (1.406.27) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ module.exports =
|
|||
,_hashMap: {}
|
||||
,_listener: null
|
||||
|
||||
,initialize: function ()
|
||||
{
|
||||
,initialize: function() {
|
||||
this._listener = new HashListener ();
|
||||
|
||||
this._hashChangedHandler = this._hashChanged.bind (this);
|
||||
|
@ -19,13 +18,11 @@ module.exports =
|
|||
this._hashChanged ();
|
||||
}
|
||||
|
||||
,destroy: function ()
|
||||
{
|
||||
,destroy: function() {
|
||||
window.removeEventListener ('hashchange', this._hashChangedHandler);
|
||||
}
|
||||
|
||||
,getListener: function ()
|
||||
{
|
||||
,getListener: function() {
|
||||
return this._listener;
|
||||
}
|
||||
|
||||
|
@ -34,8 +31,7 @@ module.exports =
|
|||
*
|
||||
* @param {string} key The variable name
|
||||
**/
|
||||
,get: function (key)
|
||||
{
|
||||
,get: function(key) {
|
||||
return this._hashMap[key];
|
||||
}
|
||||
|
||||
|
@ -44,8 +40,7 @@ module.exports =
|
|||
*
|
||||
* @param {Object} map A key-value map
|
||||
**/
|
||||
,add: function (map)
|
||||
{
|
||||
,add: function(map) {
|
||||
var newMap = this._hashMap;
|
||||
|
||||
for (var key in map)
|
||||
|
@ -59,8 +54,7 @@ module.exports =
|
|||
*
|
||||
* @param {Object} map A key-value map
|
||||
**/
|
||||
,set: function (map)
|
||||
{
|
||||
,set: function(map) {
|
||||
if (map)
|
||||
for (var key in map)
|
||||
if (map[key] === null || map[key] === undefined)
|
||||
|
@ -71,8 +65,7 @@ module.exports =
|
|||
if (!map)
|
||||
map = {};
|
||||
|
||||
if (newHash !== this._hash)
|
||||
{
|
||||
if (newHash !== this._hash) {
|
||||
this._hashMap = map;
|
||||
this._hash = newHash;
|
||||
|
||||
|
@ -91,8 +84,7 @@ module.exports =
|
|||
* @param {boolean} add %true to combine with the current map, %false otherwise
|
||||
* @return {String} The URL
|
||||
**/
|
||||
,make: function (map, add)
|
||||
{
|
||||
,make: function(map, add) {
|
||||
var hash = '#!';
|
||||
|
||||
if (add && map)
|
||||
|
@ -100,19 +92,17 @@ module.exports =
|
|||
if (!map[key])
|
||||
map[key] = this._hashMap[key];
|
||||
|
||||
for (var key in map)
|
||||
{
|
||||
for (var key in map) {
|
||||
if (hash.length > 2)
|
||||
hash += '&';
|
||||
|
||||
hash += key +'='+ map[key];
|
||||
hash += encodeURIComponent(key) +'='+ encodeURIComponent(map[key]);
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
,_hashChanged: function ()
|
||||
{
|
||||
,_hashChanged: function() {
|
||||
var newHash = location.hash;
|
||||
|
||||
if (this._blockChanged || newHash === this._hash)
|
||||
|
@ -121,12 +111,11 @@ module.exports =
|
|||
var newMap = hashMap = {};
|
||||
var kvPairs = newHash.substr(2).split ('&');
|
||||
|
||||
for (var i = 0; i < kvPairs.length; i++)
|
||||
{
|
||||
for (var i = 0; i < kvPairs.length; i++) {
|
||||
var kvPair = kvPairs[i].split ('=', 2);
|
||||
|
||||
if (kvPair[0])
|
||||
newMap[kvPair[0]] = kvPair[1];
|
||||
newMap[decodeURIComponent(kvPair[0])] = decodeURIComponent(kvPair[1]);
|
||||
}
|
||||
|
||||
this._hashMap = newMap;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.406.24",
|
||||
"version": "1.406.27",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.406.26",
|
||||
"version": "1.406.27",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue