searchViz 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module SearchViz
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) 2012 Fms-shintomon
2
2
 
3
- var AjaxGet, AjaxPut, searchViz, searchVizHistory, searchVizHash, searchVizCookie;
3
+ var AjaxGet, AjaxPut, searchViz, searchVizHistory, searchVizHash, searchVizCookie, hashUrlParse;
4
4
 
5
5
  searchVizHistory = function(urlReplaceR) {
6
6
  if (history.pushState) {
@@ -45,6 +45,28 @@ searchVizCookie = function(urlReplaceR,urlReplaceH,opt) {
45
45
  }
46
46
  };
47
47
 
48
+ hashUrlParse = function(args) {
49
+ var i, key, output;
50
+ output = {};
51
+ args = args.split("&");
52
+ i = 0;
53
+ while (i < args.length) {
54
+ args[i] = args[i].split("=");
55
+ if (/\[\]$/.test(args[i][0])) {
56
+ key = args[i][0].substring(0, args[i][0].length - 2);
57
+ } else {
58
+ key = args[i][0];
59
+ }
60
+ if (output[key] === undefined) {
61
+ output[key] = [];
62
+ }
63
+ output[key].push(args[i][1].replace("+", " "));
64
+ i++;
65
+ }
66
+ return output;
67
+ };
68
+
69
+
48
70
  searchViz = function(searchVizForm, e, callback) {
49
71
  var action, formData, urlGet, urlReplace;
50
72
  e.preventDefault();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchViz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-14 00:00:00.000000000 Z
12
+ date: 2013-01-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Write a gem description
15
15
  email: