# HG changeset patch # User Dan # Date 1189140531 14400 # Node ID 7cfdbb2fd17adefa8792d29d5b567332f8ebd995 # Parent 77c75179bb952702ceb0d2689e3bc78c4f8fdbd3 Bugfix in Special:AllPages; fixed tinyMCE under Opera (finally!) diff -r 77c75179bb95 -r 7cfdbb2fd17a includes/clientside/static/editor.js --- a/includes/clientside/static/editor.js Thu Sep 06 23:03:51 2007 -0400 +++ b/includes/clientside/static/editor.js Fri Sep 07 00:48:51 2007 -0400 @@ -1,24 +1,25 @@ // Javascript routines for the page editor +var enano_tinymce_options = { + mode : "exact", + elements : '', + plugins : 'table', + theme_advanced_resize_horizontal : false, + theme_advanced_resizing : true, + theme_advanced_toolbar_location : "top", + theme_advanced_toolbar_align : "left", + theme_advanced_buttons1_add : "fontselect,fontsizeselect", + theme_advanced_buttons3_add_before : "tablecontrols,separator", + theme_advanced_statusbar_location : 'bottom' +}; + var initTinyMCE = function(e) { if ( typeof(tinyMCE) == 'object' ) { - var options = { - mode : "exact", - elements : '', - plugins : 'table', - theme_advanced_resize_horizontal : false, - theme_advanced_resizing : true, - theme_advanced_toolbar_location : "top", - theme_advanced_toolbar_align : "left", - theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_statusbar_location : 'bottom' - } if ( !KILL_SWITCH ) { - tinyMCE.init(options); + tinyMCE.init(enano_tinymce_options); } } } diff -r 77c75179bb95 -r 7cfdbb2fd17a includes/clientside/static/enano-lib-basic.js --- a/includes/clientside/static/enano-lib-basic.js Thu Sep 06 23:03:51 2007 -0400 +++ b/includes/clientside/static/enano-lib-basic.js Fri Sep 07 00:48:51 2007 -0400 @@ -35,6 +35,8 @@ if (checkIt('msie')) IE = true; else IE = false; +var is_Opera = ( checkIt('opera') ) ? true : false; + var KILL_SWITCH = false; if ( IE ) @@ -214,6 +216,39 @@ } } +var onload_hooks = new Array(); + +function addOnloadHook(func) +{ + if ( typeof ( func ) == 'function' ) + { + if ( typeof(onload_hooks.push) == 'function' ) + { + onload_hooks.push(func); + } + else + { + onload_hooks[onload_hooks.length] = func; + } + } +} + +function runOnloadHooks(e) +{ + var _errorTrapper = 0; + for ( var _oLc = 0; _oLc < onload_hooks.length; _oLc++ ) + { + _errorTrapper++; + if ( _errorTrapper >= 1000 ) + break; + var _f = onload_hooks[_oLc]; + if ( typeof(_f) == 'function' ) + { + _f(e); + } + } +} + var head = document.getElementsByTagName('head')[0]; if ( !KILL_SWITCH ) { @@ -270,39 +305,6 @@ head.appendChild(script); } -var onload_hooks = new Array(); - -function addOnloadHook(func) -{ - if ( typeof ( func ) == 'function' ) - { - if ( typeof(onload_hooks.push) == 'function' ) - { - onload_hooks.push(func); - } - else - { - onload_hooks[onload_hooks.length] = func; - } - } -} - -function runOnloadHooks(e) -{ - var _errorTrapper = 0; - for ( var _oLc = 0; _oLc < onload_hooks.length; _oLc++ ) - { - _errorTrapper++; - if ( _errorTrapper >= 1000 ) - break; - var _f = onload_hooks[_oLc]; - if ( typeof(_f) == 'function' ) - { - _f(e); - } - } -} - addOnloadHook(function() { if ( $_REQUEST['do'] ) { diff -r 77c75179bb95 -r 7cfdbb2fd17a includes/clientside/tinymce/tiny_mce_src.js --- a/includes/clientside/tinymce/tiny_mce_src.js Thu Sep 06 23:03:51 2007 -0400 +++ b/includes/clientside/tinymce/tiny_mce_src.js Fri Sep 07 00:48:51 2007 -0400 @@ -559,7 +559,8 @@ addMCEControl : function(replace_element, form_element_name, target_document) { var id = "mce_editor_" + tinyMCE.idCounter++; - var inst = new TinyMCE_Control(tinyMCE.settings); + + var inst = new TinyMCE_Control(tinyMCE.settings); inst.editorId = id; this.instances[id] = inst; @@ -2494,11 +2495,12 @@ /* file:jscripts/tiny_mce/classes/TinyMCE_Control.class.js */ function TinyMCE_Control(settings) { + var t, i, to, fu, p, x, fn, fu, pn, s = settings; this.undoRedoLevel = true; this.isTinyMCE_Control = true; - + // Default settings this.settings = s; this.settings['theme'] = tinyMCE.getParam("theme", "default"); diff -r 77c75179bb95 -r 7cfdbb2fd17a plugins/SpecialPageFuncs.php --- a/plugins/SpecialPageFuncs.php Thu Sep 06 23:03:51 2007 -0400 +++ b/plugins/SpecialPageFuncs.php Fri Sep 07 00:48:51 2007 -0400 @@ -206,18 +206,24 @@ static $rowtracker = 0; static $tdclass = 'row2'; static $per_row = 2; + static $first = true; $return = ''; - if ( $crap === false && $row === false ) + if ( $id === false && $row === false ) { $rowtracker = 0; + $first = true; return false; } $rowtracker++; - if ( $rowtracker == $per_row ) + if ( $rowtracker == $per_row || $first ) { $rowtracker = 0; $tdclass = ( $tdclass == 'row2' ) ? 'row1' : 'row2'; } + if ( $rowtracker == 0 && !$first ) + $return .= "\n"; + + $first = false; preg_match('/^ns=(' . implode('|', array_keys($paths->nslist)) . ');pid=(.*?)$/i', $id, $match); $namespace =& $match[1]; @@ -232,9 +238,6 @@ $return .= $td; - if ( $rowtracker == ($per_row - 1) ) - $return .= "\n"; - return $return; } @@ -251,6 +254,24 @@ $db->_die(); $row = $db->fetchrow_num(); $count = $row[0]; + + switch($count % 4) + { + case 0: + case 2: + // even number of results; do nothing + $last_cell = ''; + break; + case 1: + // odd number of results and odd number of rows, use row1 + $last_cell = ''; + break; + case 3: + // odd number of results and even number of rows, use row2 + $last_cell = ''; + break; + } + $db->free_result(); $q = $db->sql_unbuffered_query('SELECT CONCAT("ns=",namespace,";pid=",urlname) AS identifier, name FROM '.table_prefix.'pages WHERE visible!=0 ORDER BY name ASC;'); @@ -273,7 +294,7 @@ '
', // print at start - ' + ' ' . $last_cell . '
' // print at end ); diff -r 77c75179bb95 -r 7cfdbb2fd17a plugins/admin/PageGroups.php --- a/plugins/admin/PageGroups.php Thu Sep 06 23:03:51 2007 -0400 +++ b/plugins/admin/PageGroups.php Fri Sep 07 00:48:51 2007 -0400 @@ -259,6 +259,10 @@ $catlist .= ''; } + echo ''; + echo '
'; echo '