searchViz 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/searchViz/version.rb +1 -1
- data/vendor/assets/javascripts/searchViz.js +28 -2
- metadata +2 -2
data/lib/searchViz/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// Copyright (c) 2012 Fms-shintomon
|
2
2
|
|
3
|
-
var AjaxGet, AjaxPut, searchViz, searchVizCookie, hashUrlParse;
|
3
|
+
var AjaxGet, AjaxPut, searchViz, searchVizCookie, hashUrlParse, OnHashDataLoad;
|
4
4
|
|
5
5
|
|
6
6
|
searchVizHashRemove = function(urlReplaceH) {
|
@@ -12,10 +12,22 @@ searchVizCookie = function(urlReplaceR,urlReplaceH,opt) {
|
|
12
12
|
if (opt=='R') {
|
13
13
|
history.replaceState(null, document.title, urlReplaceR);
|
14
14
|
}
|
15
|
+
|
16
|
+
else if (opt=='P') {
|
17
|
+
history.pushState(null, document.title, urlReplaceR);
|
18
|
+
}
|
15
19
|
else if (opt=='H'){
|
16
20
|
window.location.hash = urlReplaceH;
|
17
21
|
}
|
18
|
-
else if (opt=='
|
22
|
+
else if (opt=='RtH') {
|
23
|
+
try {
|
24
|
+
history.pushState(null, document.title, urlReplaceR);
|
25
|
+
}
|
26
|
+
catch(err){
|
27
|
+
window.location.hash = urlReplaceH;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
else if (opt=='PtH') {
|
19
31
|
try {
|
20
32
|
history.replaceState(null, document.title, urlReplaceR);
|
21
33
|
}
|
@@ -32,6 +44,20 @@ searchVizCookie = function(urlReplaceR,urlReplaceH,opt) {
|
|
32
44
|
}
|
33
45
|
};
|
34
46
|
|
47
|
+
OnHashDataLoad = function(blk_id, page_id, q, opt) {
|
48
|
+
if(opt=="H") {
|
49
|
+
hash = window.location.hash.substring(1);
|
50
|
+
path = window.location.pathname;
|
51
|
+
url = path + "?q=" + q + "&page_id=" + page_id + "&" + hash + "&trigger_call=svZ";
|
52
|
+
urlr = path + "?q=" + q + "&page_id=" + page_id + "&" + hash;
|
53
|
+
urlh = "?q=" + q + "&page_id=" + page_id + "&" + hash;
|
54
|
+
$.get(url, function(data, status, xhr) {
|
55
|
+
$("#" + blk_id).html(data);
|
56
|
+
return searchVizCookie(urlr, urlh, "H");
|
57
|
+
});
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
35
61
|
hashUrlParse = function(args) {
|
36
62
|
var i, key, output;
|
37
63
|
output = {};
|
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.
|
4
|
+
version: 0.0.7
|
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-
|
12
|
+
date: 2013-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Write a gem description
|
15
15
|
email:
|