/[webpac]/trunk2/eurovoc/abecedno.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk2/eurovoc/abecedno.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 526 by dpavlin, Tue Oct 19 15:50:13 2004 UTC revision 539 by dpavlin, Sun Oct 24 11:20:12 2004 UTC
# Line 11  Line 11 
11  <script type="text/javascript" src="js/cookies.js"></script>  <script type="text/javascript" src="js/cookies.js"></script>
12  <script type="text/javascript">  <script type="text/javascript">
13  // <!--  // <!--
14    
15    var lang2thes = {
16            'hr' : 'DescriptorHR.js',
17            'en' : 'DescriptorEN.js',
18            'fr' : 'DescriptorFR.js',
19            'ge' : 'DescriptorGE.js'
20    };
21    
22    var lang = get_cookie('w2_lang');
23    
24    var headlines = null;
25    self.document.myfilter = null;
26    
27  function myfilter() {  function myfilter() {
28  //      self.document.getElementById('textfilter').focus();  //      self.document.getElementById('textfilter').focus();
29  //      self.document.getElementById('textfilter').caretPos=1;  //      self.document.getElementById('textfilter').caretPos=1;
# Line 22  function myfilter() { Line 35  function myfilter() {
35                  if (r_div) {                  if (r_div) {
36                          var li = self.document.createElement("li");                          var li = self.document.createElement("li");
37                          var e = self.document.createElement("a");                          var e = self.document.createElement("a");
38                            var pic = null;
39                            
40                          e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]);                          e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]);
41                          var regex = new RegExp(/ *\* */);                          var regex = new RegExp(/ *\* */);
42                          if (arr[0].match(regex)) {                          if (arr[0].match(regex)) {
43                                  e.appendChild(self.document.createTextNode(arr[0].replace(regex,' ')));                                  e.appendChild(self.document.createTextNode(arr[0].replace(regex,' ')));
44                                  var pic = self.document.createElement("img");                                  pic = self.document.createElement("img");
45                                  pic.src = 'img/crovoc.png';                                  pic.src = 'img/crovoc.png';
46                                  pic.border = 0;                                  pic.border = 0;
47                                  e.appendChild(pic);                                  e.appendChild(pic);
# Line 41  function myfilter() { Line 56  function myfilter() {
56                          e.setAttribute("href","thes/"+arr[1]+".html");                          e.setAttribute("href","thes/"+arr[1]+".html");
57                          e.setAttribute("target","popup");                          e.setAttribute("target","popup");
58                          e.onclick = function() { return popup(e) };                          e.onclick = function() { return popup(e) };
59                          var pic = self.document.createElement("img");                          pic = self.document.createElement("img");
60                          pic.src = 'img/listic.png';                          pic.src = 'img/listic.png';
61                          pic.border = 0;                          pic.border = 0;
62                          e.appendChild(pic);                          e.appendChild(pic);
# Line 77  function myfilter() { Line 92  function myfilter() {
92                          html = "Nije pronađen niti jedan zapis";                          html = "Nije pronađen niti jedan zapis";
93                  }                  }
94                  if (! status) {                  if (! status) {
95                          html = "Unesite "+this.min_len+" znakova za pretraživanje.";                          html = "Unesite "+this.min_len+" znaka za pretraživanje.";
96                          status = "";                          status = "";
97                  } else {                  } else {
98                          status = " za <em>"+status+"</em>.";                          status = " za <em>"+status+"</em>.";
# Line 88  function myfilter() { Line 103  function myfilter() {
103          }          }
104  }  }
105    
 var lang2thes = {  
         'hr' : 'DescriptorHR.js',  
         'en' : 'DescriptorEN.js',  
         'fr' : 'DescriptorFR.js',  
         'ge' : 'DescriptorGE.js'  
 };  
   
 var lang = get_cookie('w2_lang');  
 if (! lang) lang = 'hr';  
   
 var headlines = null;  
 self.document.myfilter = null;  
   
106  function load_lang(lang) {  function load_lang(lang) {
107          // reset results          // reset results
108          if (self.document.myfilter) element_id('results').innerHTML = "";          if (self.document.myfilter) element_id('results').innerHTML = "";
109    
110            // default language or fallback from all to hr
111            if (! lang || lang == 'all') lang = 'hr';
112    
113            if (! lang2thes[lang]) {
114                    alert("Jezik "+lang+" nije podržan");
115            }
116    
117          set_cookie('w2_lang', lang);          set_cookie('w2_lang', lang);
118          element_id('lang').disabled = true;          element_id('lang').disabled = true;
119          element_id('textfilter').disabled = true;          element_id('textfilter').disabled = true;
120          element_id('status').innerHTML = "Učitavanje podataka za jezik. Molimo, pričekate";          element_id('status').innerHTML = "Učitavanje podataka za jezik. Molimo, pričekate...";
121    
122          self.document.myfilter = null;          self.document.myfilter = null;
123    
124          load_js(lang2thes[lang], 'headlines', 'load_lang_finished();' );          load_js(lang2thes[lang], 'headlines', 'load_lang_finished();' );
125  }  }
126    
127    function do_filter(filter) {
128            element_id('status').innerHTML = "Pretraživanje u tijeku...";
129            if (self.document.myfilter) self.document.myfilter.filter(filter);
130    }
131    
132  function load_lang_finished() {  function load_lang_finished() {
133          //alert("loaded "+lang);          //alert("loaded "+lang);
134          myfilter();          myfilter();
135          self.document.myfilter.arr=headlines;          self.document.myfilter.arr=headlines;
136          element_id('lang').disabled = false;          element_id('lang').disabled = false;
137          element_id('textfilter').disabled = false;          element_id('textfilter').disabled = false;
138          if (self.document.myfilter) self.document.myfilter.filter(element_id('textfilter').value);          do_filter(element_id('textfilter').value);
139          return false;          return false;
140  }  }
141    
# Line 312  function select_option(value,text,select Line 326  function select_option(value,text,select
326          // -->          // -->
327    </script>    </script>
328    
329          <input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onkeyup="self.document.myfilter.filter(this.value);" />          <input autocomplete="off" class="filters" id="textfilter" title="enter a regular expression to filter by" onkeyup="do_filter(this.value);" />
330          <!-- this button is strictly for looks -->          <!-- this button is strictly for looks -->
331          <input class="filters" value="filter" type="button" disabled="true"/>          <input class="filters" value="filter" type="button" disabled="true"/>
332  </div>  </div>

Legend:
Removed from v.526  
changed lines
  Added in v.539

  ViewVC Help
Powered by ViewVC 1.1.26