ProductInstantSearch - Version 0.1.1

Version Notes

Instant_search

Download this release

Release Info

Developer Magestore
Extension ProductInstantSearch
Version 0.1.1
Comparing to
See all releases


Version 0.1.1

js/tinybox/tinybox.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var TINY={};
2
+
3
+ function T$(i){return document.getElementById(i)}
4
+
5
+ TINY.box=function(){
6
+ var p,m,b,fn,ic,iu,iw,ih,ia,f=0;
7
+ return{
8
+ show:function(c,u,w,h,a,t){
9
+ if(!f){
10
+ p=document.createElement('div'); p.id='tinybox';
11
+ m=document.createElement('div'); m.id='tinymask';
12
+ b=document.createElement('div'); b.id='tinycontent';
13
+ document.body.appendChild(m); document.body.appendChild(p); p.appendChild(b);
14
+ m.onclick=TINY.box.hide; window.onresize=TINY.box.resize; f=1
15
+ }
16
+ if(!a&&!u){
17
+ p.style.width=w?w+'px':'auto'; p.style.height=h?h+'px':'auto';
18
+ p.style.backgroundImage='none'; b.innerHTML=c
19
+ }else{
20
+ b.style.display='none'; p.style.width=p.style.height='100px'
21
+ }
22
+ this.mask();
23
+ ic=c; iu=u; iw=w; ih=h; ia=a; this.alpha(m,1,80,3);
24
+ if(t){setTimeout(function(){TINY.box.hide()},1000*t)}
25
+ },
26
+ fill:function(c,u,w,h,a){
27
+ if(u){
28
+ p.style.backgroundImage='';
29
+ var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
30
+ x.onreadystatechange=function(){
31
+ if(x.readyState==4&&x.status==200){TINY.box.psh(x.responseText,w,h,a)}
32
+ };
33
+ x.open('GET',c,1); x.send(null)
34
+ }else{
35
+ this.psh(c,w,h,a)
36
+ }
37
+ },
38
+ psh:function(c,w,h,a){
39
+ if(a){
40
+ if(!w||!h){
41
+ var x=p.style.width, y=p.style.height; b.innerHTML=c;
42
+ p.style.width=w?w+'px':''; p.style.height=h?h+'px':'';
43
+ b.style.display='';
44
+ w=parseInt(b.offsetWidth); h=parseInt(b.offsetHeight);
45
+ b.style.display='none'; p.style.width=x; p.style.height=y;
46
+ }else{
47
+ b.innerHTML=c
48
+ }
49
+ this.size(p,w,h)
50
+ }else{
51
+ p.style.backgroundImage='none'
52
+ }
53
+ },
54
+ hide:function(){
55
+ TINY.box.alpha(p,-1,0,3)
56
+ },
57
+ resize:function(){
58
+ TINY.box.pos(); TINY.box.mask()
59
+ },
60
+ mask:function(){
61
+ m.style.height=TINY.page.total(1)+'px';
62
+ m.style.width=''; m.style.width=TINY.page.total(0)+'px'
63
+ },
64
+ pos:function(){
65
+ var t=(TINY.page.height()/2)-(p.offsetHeight/2); t=t<10?10:t;
66
+ p.style.top=(t+TINY.page.top())+'px';
67
+ p.style.left=(TINY.page.width()/2)-(p.offsetWidth/2)+'px'
68
+ },
69
+ alpha:function(e,d,a){
70
+ clearInterval(e.ai);
71
+ if(d==1){
72
+ e.style.opacity=0; e.style.filter='alpha(opacity=0)';
73
+ e.style.display='block'; this.pos()
74
+ }
75
+ e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)
76
+ },
77
+ ta:function(e,a,d){
78
+ var o=Math.round(e.style.opacity*100);
79
+ if(o==a){
80
+ clearInterval(e.ai);
81
+ if(d==-1){
82
+ e.style.display='none';
83
+ e==p?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''
84
+ }else{
85
+ e==m?this.alpha(p,1,100):TINY.box.fill(ic,iu,iw,ih,ia)
86
+ }
87
+ }else{
88
+ var n=Math.ceil((o+((a-o)*.5))); n=n==1?0:n;
89
+ e.style.opacity=n/100; e.style.filter='alpha(opacity='+n+')'
90
+ }
91
+ },
92
+ size:function(e,w,h){
93
+ e=typeof e=='object'?e:T$(e); clearInterval(e.si);
94
+ var ow=e.offsetWidth, oh=e.offsetHeight,
95
+ wo=ow-parseInt(e.style.width), ho=oh-parseInt(e.style.height);
96
+ var wd=ow-wo>w?0:1, hd=(oh-ho>h)?0:1;
97
+ e.si=setInterval(function(){TINY.box.ts(e,w,wo,wd,h,ho,hd)},20)
98
+ },
99
+ ts:function(e,w,wo,wd,h,ho,hd){
100
+ var ow=e.offsetWidth-wo, oh=e.offsetHeight-ho;
101
+ if(ow==w&&oh==h){
102
+ clearInterval(e.si); p.style.backgroundImage='none'; b.style.display='block'
103
+ }else{
104
+ if(ow!=w){var n=ow+((w-ow)*.5); e.style.width=wd?Math.ceil(n)+'px':Math.floor(n)+'px'}
105
+ if(oh!=h){var n=oh+((h-oh)*.5); e.style.height=hd?Math.ceil(n)+'px':Math.floor(n)+'px'}
106
+ this.pos()
107
+ }
108
+ }
109
+ }
110
+ }();
111
+
112
+ TINY.page=function(){
113
+ return{
114
+ top:function(){return document.documentElement.scrollTop||document.body.scrollTop},
115
+ width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
116
+ height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
117
+ total:function(d){
118
+ var b=document.body, e=document.documentElement;
119
+ return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
120
+ Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
121
+ }
122
+ }
123
+ }();
124
+
125
+
126
+
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>ProductInstantSearch</name>
4
+ <version>0.1.1</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSLv3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Instant_search</summary>
10
+ <description>Instant_search</description>
11
+ <notes>Instant_search</notes>
12
+ <authors><author><name>magestore</name><user>magestore</user><email>info@magestore.com</email></author></authors>
13
+ <date>2012-07-14</date>
14
+ <time>02:05:54</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="instantsearch.xml" hash=""/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magestore_Instantsearch.xml" hash=""/></dir></target><target name="mage"><dir name="js"><dir name="magestore"><file name="instantsearch.js" hash=""/><file name="viewinstantsearch.js" hash=""/></dir><dir name="tinybox"><file name="tinybox.js" hash="2ca7fcb7fefc5e8d85887f3c6dc6e315"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="tinybox"><dir name="images"><file name="Thumbs.db" hash="11fb2793c09da50437dcdfe0c4bd6333"/><file name="preload.gif" hash="bf3ec68db23e93ba2ec795ef558e96da"/><file name="rhino.jpg" hash="d00bad1ec05584e10a5601ec103aff72"/></dir><file name="style.css" hash="e3016ee232fbf3c6f780255002703237"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="magestore"><file name="instantsearch.css" hash=""/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/css/tinybox/images/Thumbs.db ADDED
Binary file
skin/adminhtml/default/default/css/tinybox/images/preload.gif ADDED
Binary file
skin/adminhtml/default/default/css/tinybox/images/rhino.jpg ADDED
Binary file
skin/adminhtml/default/default/css/tinybox/style.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ body {height:100%; margin:0px; padding:0}
2
+
3
+ #tinybox {position:absolute; display:none; padding:10px; background:#fff url(images/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000}
4
+ #tinymask {position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000; z-index:1500}
5
+ #tinycontent {background:#fff}
6
+
7
+ .button {margin-bottom:10px; padding:8px 10px 9px; border:1px solid #ccc; background:#eee; cursor:pointer}
8
+ .button:hover {border:1px solid #bbb; background:#e3e3e3}