Changeset 374 for minimanager/js


Ignore:
Timestamp:
Sep 11, 2008, 9:10:27 AM (17 years ago)
Author:
george
Message:
  • Aktualizováno: Minimanager 0.12 rev. 99. Opraveno zobrazování honoru, přidána captcha p?i registraci nového účtu a mini fórum.
  • Přidáno: Český překlad pro Minimanager 0.12.
  • Smazáno: Staré fotky fyzického serveru přesunuty do fotogalerie.
  • Přidáno: Nějaké návody na eventy od bbtrashe.
Location:
minimanager/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • minimanager/js/ajax/Php.php

    r5 r374  
    2020class JsHttpRequest
    2121{
    22     var $SCRIPT_ENCODING = "windows-1251";
     22    var $SCRIPT_ENCODING = "utf-8";
    2323    var $SCRIPT_DECODE_MODE = '';
    2424    var $UNIQ_HASH;
     
    277277    /**
    278278     * Convert from UCS-2BE decimal to $toEnc.
    279      */
     279     */   
    280280    function _decUcs2Decode($code, $toEnc)
    281281    {
     282    // Little speedup by using array_flip($this->_encTables) and later hash access.
     283        static $flippedTable = null;
    282284        if ($code < 128) return chr($code);
     285       
    283286        if (isset($this->_encTables[$toEnc])) {
    284             $p = array_search($code, $this->_encTables[$toEnc]);
    285             if ($p !== false) return chr(128 + $p);
    286         }
     287            if (!$flippedTable) $flippedTable = array_flip($this->_encTables[$toEnc]);
     288            if (isset($flippedTable[$code])) return chr(128 + $flippedTable[$code]);
     289        } else if ($toEnc == 'utf-8' || $toEnc == 'utf8') {
     290            // UTF-8 conversion rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html
     291            if ($code < 0x800) {
     292                return chr(0xC0 + ($code >> 6)) .
     293                       chr(0x80 + ($code & 0x3F));
     294            } else { // if ($code <= 0xFFFF) -- it is almost always so for UCS2-BE
     295                return chr(0xE0 + ($code >> 12)) .
     296                       chr(0x80 + (0x3F & ($code >> 6))) .
     297                       chr(0x80 + ($code & 0x3F));
     298            }
     299        }
     300       
    287301        return "";
    288302    }
  • minimanager/js/layout.js

    r5 r374  
    99        }
    1010
    11 function dynamicLayout(){
    12         var browserWidth = getBrowserWidth();
    13         if (browserWidth <= 1024){
    14                 changeLayout("1024");
    15         }
    16          if (browserWidth > 1024){
    17                 changeLayout("1280");
    18         }
    19 }
    20 
    2111// changeLayout is based on setActiveStyleSheet function by Paul Sowdon
    2212// http://www.alistapart.com/articles/alternate/
    23 function changeLayout(description){
    24    var i, a;
    25    for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
    26            if(a.getAttribute("title") == description){a.disabled = false;}
    27                 else if(a.getAttribute("title") != "default"){a.disabled = true;}
    28    }
     13function dynamicLayout(){
     14       
     15           var i, a;
     16           for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
     17                   if (a.getAttribute("title") == 1280){
     18                         ( getBrowserWidth() > 1024) ? a.disabled = false : a.disabled = true;
     19                         }
     20           }
    2921}
    3022
Note: See TracChangeset for help on using the changeset viewer.