searchViz 0.0.10 → 0.0.11

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.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -1,13 +1,10 @@
1
1
  // Copyright (c) 2012 Fms-shintomon
2
2
 
3
- var AjaxGet, AjaxPut, searchViz, searchVizCookie, hashUrlParse, OnHashDataLoad, HashDataLoad;
4
-
5
-
6
- searchVizHashRemove = function(urlrpeplaceH) {
3
+ function searchVizHashRemove(urlrpeplaceH) {
7
4
  window.location.hash = '';
8
5
  };
9
6
 
10
- searchVizCookie = function(urlrpeplaceRP,urlrpeplaceH,opt) {
7
+ function searchVizCookie(urlrpeplaceRP,urlrpeplaceH,opt) {
11
8
  try {
12
9
  if (opt=='R') {
13
10
  history.replaceState(null, document.title, urlrpeplaceRP);
@@ -44,29 +41,28 @@ searchVizCookie = function(urlrpeplaceRP,urlrpeplaceH,opt) {
44
41
  }
45
42
  };
46
43
 
47
- OnHashDataLoad = function(blk_id, ctrl_q, opt) {
44
+ function OnHashDataLoad(blk_id, path_call, ctrl_q, opt) {
48
45
  if(opt=="H") {
49
46
  hash = window.location.hash.substring(1);
50
47
  path = window.location.pathname;
51
- url = path + hash + "&trigger_call=svZ" + "&ctrl_q =" + ctrl_q;
48
+ url = path_call + hash + "&trigger_call=svZ" + "&ctrl_q =" + ctrl_q;
52
49
  urlrp = path + hash;
53
50
  urlh = hash;
54
51
  $.get(url, function(data, status, xhr) {
55
52
  $("#" + blk_id).html(data);
56
- return searchVizCookie(urlrp, urlh, "H");
57
53
  });
58
54
  }
59
55
  };
60
56
 
61
- HashDataLoad = function(path, hash_data, page_id, q, opt) {
57
+ function HashDataLoad(path, hash_data, page_id, q, opt) {
62
58
  if(opt=="H") {
63
59
  urlrp = path + "?q=" + q + "&page_id=" + page_id + hash_data;
64
60
  urlh = "?q=" + q + "&page_id=" + page_id + hash_data;
65
- return searchVizCookie(urlrp, urlh, "H");
61
+ searchVizCookie(urlrp, urlh, "H");
66
62
  }
67
63
  };
68
64
 
69
- hashUrlParse = function(args) {
65
+ function hashUrlParse(args) {
70
66
  var i, key, output;
71
67
  output = {};
72
68
  args = args.split("&");
@@ -88,14 +84,14 @@ hashUrlParse = function(args) {
88
84
  };
89
85
 
90
86
 
91
- searchViz = function(searchVizForm, e, callback) {
87
+ function searchViz(searchVizForm, e, opt, callback) {
92
88
  var action, formData, urlGet, urlrpeplace;
93
89
  e.preventDefault();
94
90
  action = $(searchVizForm).attr("action");
95
91
  formData = $(searchVizForm).serialize();
96
92
  urlGet = action + "?" + formData;
97
93
  urlrpeplace = "?" + formData;
98
- searchVizCookie(urlGet, urlrpeplace, 'B');
94
+ searchVizCookie(urlGet, urlrpeplace, opt);
99
95
  return $.ajax("http://" + window.location.host + "/" + urlGet, {
100
96
  type: "GET",
101
97
  dataType: "json",
@@ -112,7 +108,7 @@ searchViz = function(searchVizForm, e, callback) {
112
108
  });
113
109
  };
114
110
 
115
- AjaxPut = function(id, data, callback) {
111
+ function AjaxPut(id, data, callback) {
116
112
  return $.ajax("http://" + window.location.host + id, {
117
113
  type: "POST",
118
114
  data: JSON.stringify(data),
@@ -130,7 +126,7 @@ AjaxPut = function(id, data, callback) {
130
126
  });
131
127
  };
132
128
 
133
- AjaxGet = function(id, callback) {
129
+ function AjaxGet(id, callback) {
134
130
  return $.ajax("http://" + window.location.host + id, {
135
131
  type: "GET",
136
132
  dataType: "json",
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.10
4
+ version: 0.0.11
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-22 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Write a gem description
15
15
  email: