~ubuntu-branches/debian/squeeze/f-spot/squeeze

« back to all changes in this revision

Viewing changes to extensions/FolderExport/f-spot.js

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Mirco Bauer, Iain Lane
  • Date: 2009-02-07 20:23:32 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090207202332-oc93rfjo1st0571s
Tags: 0.5.0.3-2
[ Mirco Bauer]
* Upload to unstable.
* debian/control:
  + Lowered GNOME# build-deps to 2.0 ABI as that transition didn't happen
    yet in unstable.

[ Iain Lane ]
* debian/patches/svn-r4545_locales-import.dpatch: Patch backported from SVN
  trunk revision 4545 - initialize the translation catalog earlier (LP: #293305)
  (Closes: #514457). Thanks to Florian Heinle for finding the patch and to
  Chris Coulson for preparing the update.
* debian/control: Build-depend on libmono-dev (>= 1.2.4) to match configure
  checks.
* debian/rules: Pass CSC=/usr/bin/csc to configure for gio-sharp to fix FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
function setActiveStyleSheet(title) {
2
 
   var i, a, main;
3
 
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
4
 
     if(a.getAttribute("rel").indexOf("style") != -1
5
 
        && a.getAttribute("title")) {
6
 
       a.disabled = true;
7
 
       if(a.getAttribute("title") == title) a.disabled = false;
8
 
     }
9
 
   }
10
 
   if (title!="") {
11
 
      setCookie("theme", title);
12
 
   }
13
 
}
14
 
 
15
 
function getInactiveStyleSheet() {
16
 
  var i, a;
17
 
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
18
 
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && a.disabled) return a.getAttribute("title");
19
 
  }
20
 
  return null;
21
 
}
22
 
 
23
 
 
24
 
function setCookie(name, value, expires, path, domain, secure)
25
 
{
26
 
    document.cookie= name + "=" + escape(value) +
27
 
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
28
 
        ((path) ? "; path=" + path : "") +
29
 
        ((domain) ? "; domain=" + domain : "") +
30
 
        ((secure) ? "; secure" : "");
31
 
}
32
 
 
33
 
function getCookie(name)
34
 
{
35
 
    var dc = document.cookie;
36
 
    var prefix = name + "=";
37
 
    var begin = dc.indexOf("; " + prefix);
38
 
    if (begin == -1)
39
 
    {
40
 
        begin = dc.indexOf(prefix);
41
 
        if (begin != 0) return null;
42
 
    }
43
 
    else
44
 
    {
45
 
        begin += 2;
46
 
    }
47
 
    var end = document.cookie.indexOf(";", begin);
48
 
    if (end == -1)
49
 
    {
50
 
        end = dc.length;
51
 
    }
52
 
    return unescape(dc.substring(begin + prefix.length, end));
53
 
}
54
 
 
55
 
function deleteCookie(name, path, domain)
56
 
{
57
 
    if (getCookie(name))
58
 
    {
59
 
        document.cookie = name + "=" + 
60
 
            ((path) ? "; path=" + path : "") +
61
 
            ((domain) ? "; domain=" + domain : "") +
62
 
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
63
 
    }
64
 
}
65
 
 
66
 
 
67
 
function checkForTheme() {
68
 
   var theme = getCookie('theme');
69
 
 
70
 
   //alert(theme);   
71
 
   if (theme) {
72
 
      setActiveStyleSheet(theme);
73
 
   }
74
 
}
75
 
 
76
 
// to hide and show the styles
77
 
// inspired by www.wikipedia.org
78
 
function toggle_stylebox() {
79
 
    var stylebox = document.getElementById('stylebox');
80
 
    var showlink=document.getElementById('showlink');
81
 
    var hidelink=document.getElementById('hidelink');
82
 
    if(stylebox.style.display == 'none') {
83
 
        stylebox_was = stylebox.style.display; 
84
 
        stylebox.style.display = '';
85
 
        hidelink.style.display='';
86
 
        showlink.style.display='none';
87
 
    } else {
88
 
        stylebox.style.display = stylebox_was;
89
 
        hidelink.style.display='none';
90
 
        showlink.style.display='';
91
 
    }
92
 
}