Changeset 374 for minimanager/js
- Timestamp:
- Sep 11, 2008, 9:10:27 AM (17 years ago)
- Location:
- minimanager/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/js/ajax/Php.php
r5 r374 20 20 class JsHttpRequest 21 21 { 22 var $SCRIPT_ENCODING = " windows-1251";22 var $SCRIPT_ENCODING = "utf-8"; 23 23 var $SCRIPT_DECODE_MODE = ''; 24 24 var $UNIQ_HASH; … … 277 277 /** 278 278 * Convert from UCS-2BE decimal to $toEnc. 279 */ 279 */ 280 280 function _decUcs2Decode($code, $toEnc) 281 281 { 282 // Little speedup by using array_flip($this->_encTables) and later hash access. 283 static $flippedTable = null; 282 284 if ($code < 128) return chr($code); 285 283 286 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 287 301 return ""; 288 302 } -
minimanager/js/layout.js
r5 r374 9 9 } 10 10 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 21 11 // changeLayout is based on setActiveStyleSheet function by Paul Sowdon 22 12 // 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 } 13 function 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 } 29 21 } 30 22
Note:
See TracChangeset
for help on using the changeset viewer.