/[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 509 by dpavlin, Sun Oct 10 19:16:07 2004 UTC revision 523 by dpavlin, Tue Oct 19 15:17:25 2004 UTC
# Line 18  function myfilter() { Line 18  function myfilter() {
18          self.document.myfilter = new BFilter(headlines);          self.document.myfilter = new BFilter(headlines);
19    
20          self.document.myfilter.result = function (arr) {          self.document.myfilter.result = function (arr) {
21                  var r = element_id('results');                  var r_div = element_id('results');
22                  if (r) {                  if (r_div) {
23                            var li = self.document.createElement("li");
24                          var e = self.document.createElement("a");                          var e = self.document.createElement("a");
25                          e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]);                          e.setAttribute("href","hijerarhija.html?o="+arr[1]+"#mfn"+arr[1]);
26                          e.appendChild(self.document.createTextNode(arr[0]));                          e.appendChild(self.document.createTextNode(arr[0]));
27                          r.appendChild(e);                          li.appendChild(e);
28    
29                          r.appendChild(self.document.createTextNode(" "));                          li.appendChild(self.document.createTextNode(" "));
30    
31                          e = self.document.createElement("a");                          e = self.document.createElement("a");
32                          e.setAttribute("href","thes/"+arr[1]+".html");                          e.setAttribute("href","thes/"+arr[1]+".html");
33                          e.setAttribute("target","popup");                          e.setAttribute("target","popup");
34                          e.onclick = function() { return popup(e) };                          e.onclick = function() { return popup(e) };
35                          e.appendChild(self.document.createTextNode("\u00bb"));                          e.appendChild(self.document.createTextNode("\u00bb"));
36                          r.appendChild(e);                          li.appendChild(e);
37    
38                          r.appendChild(self.document.createElement("br"));                          li.appendChild(self.document.createElement("br"));
39    
40                            // append li
41                            r_div.appendChild(li);
42    
43                  } else {                  } else {
44                          alert("can't find results div!");                          alert("can't find results div!");
# Line 64  var lang2thes = { Line 68  var lang2thes = {
68  var lang = get_cookie('w2_lang');  var lang = get_cookie('w2_lang');
69  if (! lang) lang = 'hr';  if (! lang) lang = 'hr';
70    
71  load_js(lang2thes[lang]);  var headlines = null;
72    self.document.myfilter = null;
73    
74  function change_lang(lang) {  function load_lang(lang) {
75          // reset results          // reset results
76          self.document.myfilter.filter('');          if (self.document.myfilter) element_id('results').innerHTML = "";
77    
78          set_cookie('w2_lang', lang);          set_cookie('w2_lang', lang);
79          load_js(lang2thes[lang]);          element_id('lang').disabled = true;
80            element_id('textfilter').disabled = true;
81            element_id('status').innerHTML = "Učitavanje podataka za jezik. Molimo, pričekate";
82    
83            self.document.myfilter = null;
84    
85            load_js(lang2thes[lang], 'headlines', 'load_lang_finished();' );
86    }
87    
88    function load_lang_finished() {
89            //alert("loaded "+lang);
90            myfilter();
91          self.document.myfilter.arr=headlines;          self.document.myfilter.arr=headlines;
92          return true;          element_id('lang').disabled = false;
93            element_id('textfilter').disabled = false;
94            if (self.document.myfilter) self.document.myfilter.filter(element_id('textfilter').value);
95            return false;
96  }  }
97    
98  function select_option(value,text,selected) {  function select_option(value,text,selected) {
# Line 86  function select_option(value,text,select Line 105  function select_option(value,text,select
105  <script type="text/javascript" src="js/hide.js"></script>  <script type="text/javascript" src="js/hide.js"></script>
106  </head>  </head>
107    
108  <body onload="myfilter(); ">  <body onload="load_lang(lang);">
109  <table width="100%" border="0" cellspacing="0" cellpadding="0">  <table width="100%" border="0" cellspacing="0" cellpadding="0">
110    <tr>    <tr>
111          <td colspan="3" class="hdr" height="10">          <td colspan="3" class="hdr" height="10">
# Line 254  function select_option(value,text,select Line 273  function select_option(value,text,select
273  <div class="filters">  <div class="filters">
274    <script type="text/javascript">    <script type="text/javascript">
275          // <!--          // <!--
276          document.write('<select name="lang" onchange="change_lang(this.options[this.selectedIndex].value);">');          document.write('<select id="lang" name="lang" onchange="load_lang(this.options[this.selectedIndex].value);">');
277          select_option("hr","Hrvatski",lang);          select_option("hr","Hrvatski",lang);
278          select_option("en","Engleski",lang);          select_option("en","Engleski",lang);
279          select_option("fr","Francuski",lang);          select_option("fr","Francuski",lang);
# Line 265  function select_option(value,text,select Line 284  function select_option(value,text,select
284    
285          <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="self.document.myfilter.filter(this.value);" />
286          <!-- this button is strictly for looks -->          <!-- this button is strictly for looks -->
287          <input class="filters" value="filter" type="button" />          <input class="filters" value="filter" type="button" disabled="true"/>
288  </div>  </div>
289  </form>  </form>
290    
# Line 275  Enter few letters to filter by them Line 294  Enter few letters to filter by them
294  -->  -->
295  </div>  </div>
296    
297  <div id="results">  <ul id="results">
298  </div>  </ul>
299    
300          </td>          </td>
301  </tr>  </tr>

Legend:
Removed from v.509  
changed lines
  Added in v.523

  ViewVC Help
Powered by ViewVC 1.1.26