diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-08-18 22:31:25 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-08-18 22:31:25 +0200 |
commit | 38c65da553c83e787d8a8adc1d40d789713579c4 (patch) | |
tree | 3aff0778b74cfbf328991aa83af50e9d07aff4e6 /phpBB/styles/prosilver/template/styleswitcher.js | |
parent | f84460c710f528724fac68278361af7fe18e458c (diff) | |
parent | 9589fbffe4cdad9fa35df2597c21fc0753ed1d52 (diff) | |
download | forums-38c65da553c83e787d8a8adc1d40d789713579c4.tar forums-38c65da553c83e787d8a8adc1d40d789713579c4.tar.gz forums-38c65da553c83e787d8a8adc1d40d789713579c4.tar.bz2 forums-38c65da553c83e787d8a8adc1d40d789713579c4.tar.xz forums-38c65da553c83e787d8a8adc1d40d789713579c4.zip |
Merge branch 'develop' into feature/request-class
* develop: (157 commits)
[ticket/10316] Resolve inconsistent move topic behavior
[ticket/9297] Add network to class name of unit tests.
[ticket/9297] Fix typo in localhost.
[ticket/9297] Rename test class to reflect its contents.
[ticket/9297] Adjust comment - IPv6 is needed for IPv6 connections to work.
[ticket/9297] Fix markTestSkipped call in setUpBeforeClass.
[ticket/9608] Remove use of references in topic_review
[ticket/9297] Skip FTP PASV/EPSV test if FTP connection fails.
[ticket/9297] Separate ipv4 and ipv6 tests into separate functions.
[ticket/9297] Update copyright year of unit test file.
[feature/template-engine] Delete _get_locator function.
[feature/template-engine] Clean up template locator usage in bbcode.
[ticket/9297] Make EPSV unit tests work without IPv6.
[ticket/9297] Unit tests for ftp_fsock PASV and EPSV.
[ticket/9297] Add support for Extended Passive Mode (EPSV) in ftp_fsock class.
[ticket/10312] Un-check the shadow option while moving.
[feature/template-engine] Need to call set_template on template.
[feature/template-engine] Update installer for template engine changes.
[feature/template-engine] Dependency inject locator into template.
[feature/template-engine] Delete useless code from set_template.
...
Conflicts:
phpBB/includes/functions.php
Diffstat (limited to 'phpBB/styles/prosilver/template/styleswitcher.js')
-rw-r--r-- | phpBB/styles/prosilver/template/styleswitcher.js | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js deleted file mode 100644 index bbcac9b69c..0000000000 --- a/phpBB/styles/prosilver/template/styleswitcher.js +++ /dev/null @@ -1,193 +0,0 @@ - -function fontsizeup(event) -{ - // Skip tabs; 9 being the ASCII code for a tab - if (event && getKeyCode(event) == 9) - { - return true; - } - - var active = getActiveStyleSheet(); - - switch (active) - { - case 'A--': - setActiveStyleSheet('A-'); - break; - - case 'A-': - setActiveStyleSheet('A'); - break; - - case 'A': - setActiveStyleSheet('A+'); - break; - - case 'A+': - setActiveStyleSheet('A++'); - break; - - case 'A++': - setActiveStyleSheet('A'); - break; - - default: - setActiveStyleSheet('A'); - break; - } - - return false; -} - -function fontsizedown(event) -{ - // Skip tabs - if (event && getKeyCode(event) == 9) - { - return true; - } - - var active = getActiveStyleSheet(); - - switch (active) - { - case 'A++' : - setActiveStyleSheet('A+'); - break; - - case 'A+' : - setActiveStyleSheet('A'); - break; - - case 'A' : - setActiveStyleSheet('A-'); - break; - - case 'A-' : - setActiveStyleSheet('A--'); - break; - - case 'A--' : - break; - - default : - setActiveStyleSheet('A--'); - break; - } - - return false; -} - -function getKeyCode(event) -{ - // IE doesn't fire the onkeypress event for tabs - // Reference: http://www.quirksmode.org/js/keys.html - - var code = (event.keyCode) ? event.keyCode : 0; - - // Probably using FF - if (!code && event.charCode) - { - code = event.charCode; - } - - return code; -} - -function setActiveStyleSheet(title) -{ - var i, a, main; - - for (i = 0; (a = document.getElementsByTagName('link')[i]); i++) - { - if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title')) - { - a.disabled = true; - if (a.getAttribute('title') == title) - { - a.disabled = false; - } - } - } -} - -function getActiveStyleSheet() -{ - var i, a; - - for (i = 0; (a = document.getElementsByTagName('link')[i]); i++) - { - if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled) - { - return a.getAttribute('title'); - } - } - - return null; -} - -function getPreferredStyleSheet() -{ - return ('A-'); -} - -function createCookie(name, value, days) -{ - if (days) - { - var date = new Date(); - date.setTime(date.getTime() + (days*24*60*60*1000)); - var expires = '; expires=' + date.toGMTString(); - } - else - { - expires = ''; - } - - document.cookie = name + '=' + value + expires + style_cookie_settings; -} - -function readCookie(name) -{ - var nameEQ = name + '='; - var ca = document.cookie.split(';'); - - for (var i = 0; i < ca.length; i++) - { - var c = ca[i]; - - while (c.charAt(0) == ' ') - { - c = c.substring(1, c.length); - } - - if (c.indexOf(nameEQ) == 0) - { - return c.substring(nameEQ.length, c.length); - } - } - - return null; -} - -function load_cookie() -{ - var cookie = readCookie('style_cookie'); - var title = cookie ? cookie : getPreferredStyleSheet(); - setActiveStyleSheet(title); -} - -function unload_cookie() -{ - var title = getActiveStyleSheet(); - createCookie('style_cookie', title, 365); -} - -onload_functions.push('load_cookie()'); -onunload_functions.push('unload_cookie()'); - -/* -var cookie = readCookie("style"); -var title = cookie ? cookie : getPreferredStyleSheet(); -setActiveStyleSheet(title); -*/ |