From 24a33b42ae28709c5ef59638ddd1189329d176db Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 26 Feb 2006 18:23:32 +0100 Subject: changed IDs to avoid name clashes darcs-hash:20060226172332-7ad00-f073117ba2f027935f87cf23106bf6a4316a5790.gz --- lib/exe/js.php | 6 +- lib/exe/spellcheck.php | 44 ++-- lib/plugins/config/admin.php | 78 +++---- lib/plugins/config/settings/config.class.php | 120 +++++----- lib/plugins/config/style.css | 30 +-- lib/plugins/plugin/admin.php | 318 +++++++++++++-------------- lib/plugins/plugin/style.css | 72 +++--- lib/scripts/ajax.js | 6 +- lib/scripts/edit.js | 154 ++++++------- lib/scripts/script.js | 20 +- lib/scripts/spellcheck.js | 68 +++--- lib/styles/style.css | 48 ++-- lib/tpl/default/design.css | 64 +++--- lib/tpl/default/layout.css | 74 +++---- lib/tpl/default/main.php | 18 +- lib/tpl/default/mediaedit.php | 36 +-- lib/tpl/default/print.css | 8 +- 17 files changed, 582 insertions(+), 582 deletions(-) (limited to 'lib') diff --git a/lib/exe/js.php b/lib/exe/js.php index 223917fc8..5147f1be3 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -76,18 +76,18 @@ function js_out(){ } // init stuff - js_runonstart("ajax_qsearch.init('qsearch_in','qsearch_out')"); + js_runonstart("ajax_qsearch.init('qsearch__in','qsearch__out')"); js_runonstart("addEvent(document,'click',closePopups)"); js_runonstart('addTocToggle()'); if($edit){ // size controls - js_runonstart("initSizeCtl('sizectl','wikitext')"); + js_runonstart("initSizeCtl('size__ctl','wiki__text')"); if($write){ require_once(DOKU_INC.'inc/toolbar.php'); toolbar_JSdefines('toolbar'); - js_runonstart("initToolbar('toolbar','wikitext',toolbar)"); + js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); // add pageleave check js_runonstart("initChangeCheck('".js_escape($lang['notsavedyet'])."')"); diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php index fa84d11c0..bc0209719 100644 --- a/lib/exe/spellcheck.php +++ b/lib/exe/spellcheck.php @@ -1,6 +1,6 @@ @@ -17,27 +17,27 @@ * Copyright (c) 2005, Garrison Locke * All rights reserved. * - * Redistribution and use in source and binary forms, with or without + * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - * * Redistributions of source code must retain the above copyright notice, + * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * * Neither the name of the http://www.broken-notebook.com nor the names of its - * contributors may be used to endorse or promote products derived from this + * * Neither the name of the http://www.broken-notebook.com nor the names of its + * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ @@ -84,7 +84,7 @@ if(function_exists($call)){ */ function spaceslink($string, $check=""){ $result = ' '; //opening [[ - $result .= str_pad('',utf8_strlen($string),' '); + $result .= str_pad('',utf8_strlen($string),' '); $result .= $check; $result .= ' '; //closing ]] @@ -193,7 +193,7 @@ function spell_check() { $string = utf8_tohtml($string); } - //output + //output print $string; } @@ -223,7 +223,7 @@ function spell_formatword($word,$suggestions=null){ } $link = ''.htmlspecialchars($word).''; + 'class="spell_error" id="spell__error'.$i.'">'.htmlspecialchars($word).''; $i++; return $link; } @@ -231,7 +231,7 @@ function spell_formatword($word,$suggestions=null){ /** * Rewrite markuped XHTML back to plain Text. AJAX callback * - * @author Andreas Gohr + * @author Andreas Gohr */ function spell_resume(){ $text = $_POST['data']; @@ -278,10 +278,10 @@ function unhtmlspecialchars($string, $quotstyle=ENT_COMPAT){ $string = str_replace ( '&', '&', $string ); $string = str_replace ( '<', '<', $string ); $string = str_replace ( '>', '>', $string ); - + if($quotstyle != ENT_NOQUOTES){ $string = str_replace ( '"', '\"', $string ); - } + } if($quotstyle == ENT_QUOTES){ $string = str_replace ( ''', '\'', $string ); $string = str_replace ( ''', '\'', $string ); diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 5f628e687..1859c45fa 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -54,15 +54,15 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { */ function handle() { global $ID; - + if (!$this->_restore_session()) return $this->_close_session(); if (!isset($_REQUEST['save']) || ($_REQUEST['save'] != 1)) return $this->_close_session(); - + if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } - + // don't go any further if the configuration is locked if ($this->_config->_locked) return $this->_close_session(); - + $this->_input = $_REQUEST['config']; while (list($key) = each($this->_config->setting)) { @@ -72,101 +72,101 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { } if ($this->_config->setting[$key]->error()) $this->_error = true; } - + if ($this->_changed && !$this->_error) { $this->_config->save_settings($this->getPluginName()); - + // save state & force a page reload to get the new settings to take effect $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time()); $this->_close_session(); header("Location: ".wl($ID,array('do'=>'admin','page'=>'config'),true,'&')); exit(); } - + $this->_close_session(); } /** * output appropriate html */ - function html() { + function html() { global $lang; global $ID; - + if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } $this->setupLocale(true); print $this->locale_xhtml('intro'); - - ptln('
'); - + + ptln('
'); + if ($this->_config->locked) ptln('

'.$this->getLang('locked').'

'); - elseif ($this->_error) + elseif ($this->_error) ptln('

'.$this->getLang('error').'

'); elseif ($this->_changed) ptln('

'.$this->getLang('updated').'

'); - + ptln('
'); ptln(' '); - + foreach($this->_config->setting as $setting) { - + list($label,$input) = $setting->html($this, $this->_error); - - $class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : ''); + + $class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : ''); $error = $setting->error() ? ' class="error"' : ''; - + ptln(' '); ptln(' '); ptln(' '.$input.''); ptln(' '); } - + ptln('
'.$label.'
'); - + ptln('

'); ptln(' '); ptln(' '); - + if (!$this->_config->locked) { ptln(' '); ptln(' '); ptln(' '); } - + ptln('

'); - + ptln('
'); ptln('
'); } - + /** * @return boolean true - proceed with handle, false - don't proceed */ function _restore_session() { - - // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set, - // however they can't be changed without starting the session again + + // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set, + // however they can't be changed without starting the session again if (!headers_sent()) { session_start(); $this->_session_started = true; - } - + } + if (!isset($_SESSION['PLUGIN_CONFIG'])) return true; - + $session = $_SESSION['PLUGIN_CONFIG']; unset($_SESSION['PLUGIN_CONFIG']); - + // still valid? if (time() - $session['time'] > 120) return true; - + switch ($session['state']) { case 'updated' : $this->_changed = true; return false; } - + return true; } @@ -186,12 +186,12 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { function _setup_localised_plugin_prompts() { global $conf; - + $langfile = '/lang/'.$conf[lang].'/settings.php'; $enlangfile = '/lang/en/settings.php'; - + $lang = array(); - + if ($dh = opendir(DOKU_PLUGIN)) { while (false !== ($plugin = readdir($dh))) { if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue; @@ -199,7 +199,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if (@file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ @include(DOKU_PLUGIN.$plugin.$enlangfile); - if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile); + if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile); } } closedir($dh); @@ -209,5 +209,5 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { return true; } - + } diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 86bb4e9fa..620d9c3b2 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -12,11 +12,11 @@ if (!class_exists('configuration')) { var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname']) var $_format = 'php'; // format of the config file, supported formats - php (overridden by $config['format']) var $_heading = ''; // heading string written at top of config file - don't include comment indicators - var $_loaded = false; // set to true after configuration files are loaded + var $_loaded = false; // set to true after configuration files are loaded var $_metadata = array(); // holds metadata describing the settings var $setting = array(); // array of setting objects var $locked = false; // configuration is considered locked if it can't be updated - + // filenames, these will be eval()'d prior to use so maintain any constants in output var $_default_file = ''; var $_local_file = ''; @@ -42,7 +42,7 @@ if (!class_exists('configuration')) { if (isset($file['protected'])) $this->_protected_file = $file['protected']; $this->locked = $this->_is_locked(); - + $this->_metadata = array_merge($meta, $this->get_plugin_metadata()); $this->retrieve_settings(); @@ -70,16 +70,16 @@ if (!class_exists('configuration')) { $param = NULL; } - $this->setting[$key] = new $class($key,$param); - $this->setting[$key]->initialize($default[$key],$local[$key],$protected[$key]); + $this->setting[$key] = new $class($key,$param); + $this->setting[$key]->initialize($default[$key],$local[$key],$protected[$key]); } - + $this->_loaded = true; - } + } } - + function save_settings($id, $header='', $backup=true) { - + if ($this->locked) return false; $file = eval('return '.$this->_local_file.';'); @@ -93,23 +93,23 @@ if (!class_exists('configuration')) { if (!$fh = @fopen($file, 'wb')) { @rename($file.'.bak', $file); // problem opening, restore the backup return false; - } + } if (empty($header)) $header = $this->_heading; $out = $this->_out_header($id,$header); - + foreach ($this->setting as $setting) { $out .= $setting->out($this->_name, $this->_format); } - + $out .= $this->_out_footer(); @fwrite($fh, $out); fclose($fh); return true; } - + /** * return an array of config settings */ @@ -119,7 +119,7 @@ if (!class_exists('configuration')) { $config = array(); $file = eval('return '.$file.';'); - + if ($this->_format == 'php') { $contents = @php_strip_whitespace($file); @@ -143,7 +143,7 @@ if (!class_exists('configuration')) { return $config; } - + function _out_header($id, $header) { $out = ''; if ($this->_format == 'php') { @@ -155,10 +155,10 @@ if (!class_exists('configuration')) { " * Date: ".date('r')."\n". " */\n\n"; } - + return $out; } - + function _out_footer() { $out = ''; if ($this->_format == 'php') { @@ -167,7 +167,7 @@ if (!class_exists('configuration')) { } $out .= "\n// end auto-generated content\n"; } - + return $out; } @@ -196,7 +196,7 @@ if (!class_exists('configuration')) { if (!is_array($value)) { $out[$prefix.$key] = $value; continue; - } + } $tmp = $this->_flatten($value,$prefix.$key.CM_KEYMARKER); $out = array_merge($out,$tmp); @@ -218,7 +218,7 @@ if (!class_exists('configuration')) { if (is_file(DOKU_PLUGIN.$plugin)) continue; if (@file_exists(DOKU_PLUGIN.$plugin.$file)){ - @include(DOKU_PLUGIN.$plugin.$file); + @include(DOKU_PLUGIN.$plugin.$file); } } closedir($dh); @@ -243,7 +243,7 @@ if (!class_exists('configuration')) { } return $default; } - + } } @@ -300,12 +300,12 @@ if (!class_exists('setting')) { $this->_local = $input; return true; } - + /** * @return array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { - + $value = ''; $disable = ''; @@ -321,11 +321,11 @@ if (!class_exists('setting')) { } $key = htmlspecialchars($this->_key); - $value = htmlspecialchars($value); + $value = htmlspecialchars($value); - $label = ''; - $input = ''; - return array($label,$input); + $label = ''; + $input = ''; + return array($label,$input); } /** @@ -347,19 +347,19 @@ if (!class_exists('setting')) { return $out; } - - function prompt(&$plugin) { + + function prompt(&$plugin) { $prompt = $plugin->getLang($this->_key); if (!$prompt) $prompt = str_replace(array('____','_'),' ',$this->_key); return htmlspecialchars($prompt); } - + function is_protected() { return !is_null($this->_protected); } function is_default() { return !$this->is_protected() && is_null($this->_local); } function error() { return $this->_error; } - - function _out_key() { return str_replace(CM_KEYMARKER,"']['",$this->_key); } - } + + function _out_key() { return str_replace(CM_KEYMARKER,"']['",$this->_key); } + } } if (!class_exists('setting_password')) { @@ -386,9 +386,9 @@ if (!class_exists('setting_password')) { $key = htmlspecialchars($this->_key); - $label = ''; - $input = ''; - return array($label,$input); + $label = ''; + $input = ''; + return array($label,$input); } } } @@ -402,9 +402,9 @@ if (!class_exists('setting_email')) { if (!class_exists('setting_numeric')) { class setting_numeric extends setting { var $_pattern = '/^[-+\/*0-9 ]*$/'; - + function out($var, $fmt='php') { - + if ($this->is_protected()) return ''; if (is_null($this->_local) || ($this->_default == $this->_local)) return ''; @@ -431,25 +431,25 @@ if (!class_exists('setting_onoff')) { $disable = ' disabled="disabled"'; } else { $value = is_null($this->_local) ? $this->_default : $this->_local; - } + } $key = htmlspecialchars($this->_key); - $checked = ($value) ? ' checked="checked"' : ''; + $checked = ($value) ? ' checked="checked"' : ''; $label = ''; $input = '
'; - return array($label,$input); + return array($label,$input); } function update($input) { if ($this->is_protected()) return false; - $input = ($input) ? 1 : 0; + $input = ($input) ? 1 : 0; $value = is_null($this->_local) ? $this->_default : $this->_local; if ($value == $input) return false; $this->_local = $input; - return true; + return true; } } } @@ -467,7 +467,7 @@ if (!class_exists('setting_mulitchoice')) { $value = $this->_protected; $disable = ' disabled="disabled"'; } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; + $value = is_null($this->_local) ? $this->_default : $this->_local; } // ensure current value is included @@ -478,14 +478,14 @@ if (!class_exists('setting_mulitchoice')) { if (!$this->is_protected() && count($this->_choices) <= 1) { $disable = ' disabled="disabled"'; $nochoice = $plugin->getLang('nochoice'); - } + } $key = htmlspecialchars($this->_key); $label = ''; $input = "
\n"; - $input .= ''."\n"; foreach ($this->_choices as $choice) { $selected = ($value == $choice) ? ' selected="selected"' : ''; $option = $plugin->getLang($this->_key.'_o_'.$choice); @@ -498,7 +498,7 @@ if (!class_exists('setting_mulitchoice')) { $input .= " $nochoice \n"; $input .= "
\n"; - return array($label,$input); + return array($label,$input); } function update($input) { @@ -527,26 +527,26 @@ if (!class_exists('setting_dirchoice')) { // populate $this->_choices with a list of available templates $list = array(); - if ($dh = @opendir($this->_dir)) { + if ($dh = @opendir($this->_dir)) { while (false !== ($entry = readdir($dh))) { if ($entry == '.' || $entry == '..') continue; - $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $entry; - if (is_dir($this->_dir.$file)) $list[] = $entry; + $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $entry; + if (is_dir($this->_dir.$file)) $list[] = $entry; } closedir($dh); } sort($list); $this->_choices = $list; - + parent::initialize($default,$local,$protected); } - } + } } /** - * Provide php_strip_whitespace (php5 function) functionality + * Provide php_strip_whitespace (php5 function) functionality * * @author Chris Smith */ @@ -567,11 +567,11 @@ if (!function_exists('php_strip_whitespace')) { function php_strip_whitespace($file) { if (!@is_readable($file)) return ''; - $in = join('',@file($file)); + $in = join('',@file($file)); $out = ''; $tokens = token_get_all($in); - + foreach ($tokens as $token) { if (is_string ($token)) { $out .= $token; @@ -580,13 +580,13 @@ if (!function_exists('php_strip_whitespace')) { switch ($id) { case T_COMMENT : // fall thru case T_ML_COMMENT : // fall thru - case T_DOC_COMMENT : // fall thru - case T_WHITESPACE : + case T_DOC_COMMENT : // fall thru + case T_WHITESPACE : break; default : $out .= $text; break; } } - } + } return ($out); } @@ -614,7 +614,7 @@ if (!function_exists('php_strip_whitespace')) { if (!@is_readable($file)) return ''; - $contents = join('',@file($file)); + $contents = join('',@file($file)); $out = ''; $state = 0; @@ -636,5 +636,5 @@ if (!function_exists('php_strip_whitespace')) { return $out; } - } + } } diff --git a/lib/plugins/config/style.css b/lib/plugins/config/style.css index ab8d20060..d10a7c0e4 100644 --- a/lib/plugins/config/style.css +++ b/lib/plugins/config/style.css @@ -1,25 +1,25 @@ /* plugin:configmanager */ -#configmanager {margin: 1em;} -#configmanager p.error {border: 1px solid red; background-color: #c66; color: white; padding: 0.5em; text-align:center} -#configmanager p.ok {border: 1px solid green; background-color: #6c6; color: black; padding: 0.5em; text-align:center} -#configmanager p.info {border: 1px solid __dark__; background-color: __medium__; color: black; padding: 0.5em; text-align:center} -#configmanager form { } -#configmanager table {margin: 1em 0;} -#configmanager td input.text {width: 30em; border: 1px solid __medium__;} -#configmanager td select {border: 1px solid __medium__;} +#config__manager {margin: 1em;} +#config__manager p.error {border: 1px solid red; background-color: #c66; color: white; padding: 0.5em; text-align:center} +#config__manager p.ok {border: 1px solid green; background-color: #6c6; color: black; padding: 0.5em; text-align:center} +#config__manager p.info {border: 1px solid __dark__; background-color: __medium__; color: black; padding: 0.5em; text-align:center} +#config__manager form { } +#config__manager table {margin: 1em 0;} +#config__manager td input.text {width: 30em; border: 1px solid __medium__;} +#config__manager td select {border: 1px solid __medium__;} -#configmanager tr.default .input, -#configmanager tr.default input, -#configmanager tr.default select { +#config__manager tr.default .input, +#config__manager tr.default input, +#config__manager tr.default select { background-color: #ccddff; } -#configmanager tr.protected .input, -#configmanager tr.protected input, -#configmanager tr.protected select { +#config__manager tr.protected .input, +#config__manager tr.protected input, +#config__manager tr.protected select { background-color: #ffcccc; } -#configmanager td.error {background-color: red;} +#config__manager td.error {background-color: red;} /* end plugin:configmanager */ diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index 92df52b61..cebd4e786 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -5,16 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Christopher Smith */ - + // todo // - maintain a history of file modified // - allow a plugin to contain extras to be copied to the current template (extra/tpl/) // - to images (lib/images/) [ not needed, should go in lib/plugin/images/ ] - + if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'admin.php'); - + //--------------------------[ GLOBALS ]------------------------------------------------ // note: probably should be dokuwiki wide globals, where they can be accessed by pluginutils.php global $common_plugin_types; @@ -30,25 +30,25 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { var $plugin = ''; var $cmd = ''; var $handler = NULL; - + var $functions = array('delete','update',/*'settings',*/'info'); // require a plugin name var $commands = array('manage','download'); // don't require a plugin name var $plugin_list = array(); - + var $msg = ''; var $error = ''; - + function admin_plugin_plugin() { global $conf; $this->disabled = (isset($conf['pluginmanager']) && ($conf['pluginmanager'] == 0)); } - + /** * return some info */ function getInfo(){ $disabled = ($this->disabled) ? '(disabled)' : ''; - + return array( 'author' => 'Christopher Smith', 'email' => 'chris@jalakai.co.uk', @@ -58,41 +58,41 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { 'url' => 'http://wiki.splitbrain.org/plugin:adminplugin', ); } - + /** * return prompt for admin menu */ function getMenuText($language) { - if (!$this->disabled) + if (!$this->disabled) return parent::getMenuText($language); return ''; } - + /** * return sort order for position in admin menu */ function getMenuSort() { return 20; } - + /** * handle user request */ function handle() { - + if ($this->disabled) return; - + // enable direct access to language strings $this->setupLocale(); - + $this->plugin = $_REQUEST['plugin']; $this->cmd = $_REQUEST['fn']; if (is_array($this->cmd)) $this->cmd = key($this->cmd); - + sort($this->plugin_list = plugin_list()); - + // verify $_REQUEST vars if (in_array($this->cmd, $this->commands)) { $this->plugin = ''; @@ -100,63 +100,63 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { $this->cmd = 'manage'; $this->plugin = ''; } - + // create object to handle the command $class = "ap_".$this->cmd; if (!class_exists($class)) $class = 'ap_manage'; - + $this->handler = & new $class($this, $this->plugin); $this->msg = $this->handler->process(); } - + /** * output appropriate html */ function html() { - + if ($this->disabled) return; // enable direct access to language strings $this->setupLocale(); - + if ($this->handler === NULL) $this->handler = & new ap_manage($this, $this->plugin); if (!$this->plugin_list) sort($this->plugin_list = plugin_list()); - - ptln('
'); - $this->handler->html(); + + ptln('
'); + $this->handler->html(); ptln('
'); } - + } class ap_manage { - + var $manager = NULL; var $lang = array(); var $plugin = ''; var $downloaded = array(); - + function ap_manage(&$manager, $plugin) { $this->manager = & $manager; $this->plugin = $plugin; - $this->lang = & $manager->lang; + $this->lang = & $manager->lang; } function process() { return ''; } - - function html() { + + function html() { print $this->manager->locale_xhtml('admin_plugin'); - $this->html_menu(); + $this->html_menu(); } - + // build our standard menu function html_menu($listPlugins = true) { global $ID; - + ptln('
'); - + ptln('
'); ptln('
'); ptln(' '); ptln('
'); ptln('
'); - + if ($listPlugins) { ptln('

'.$this->lang['manage'].'

'); ptln('
'); $this->html_pluginlist(); ptln('
'); } - + ptln('
'); } - + function html_pluginlist() { global $ID; foreach ($this->manager->plugin_list as $plugin) { - + $new = (in_array($plugin, $this->downloaded)) ? ' class="new"' : ''; - + ptln('
'); ptln('

'.$plugin.'

'); ptln('
'); @@ -196,62 +196,62 @@ class ap_manage { ptln(' '); ptln(' '); ptln(' '); - + $this->html_button('info', false, 6); if (in_array('settings', $this->manager->functions)) { $this->html_button('settings', !@file_exists(DOKU_PLUGIN.$plugin.'/settings.php'), 6); } $this->html_button('update', !$this->plugin_readlog($plugin, 'url'), 6); $this->html_button('delete', false, 6); - + ptln('
'); ptln('
'); } } - + function html_button($btn, $disabled=false, $indent=0) { $disabled = ($disabled) ? 'disabled="disabled"' : ''; ptln('',$indent); } - + /** * Refresh plugin list */ function refresh() { - + sort($this->manager->plugin_list = plugin_list()); - - // update latest plugin date - FIXME + + // update latest plugin date - FIXME return (!$this->manager->error); } - + function download($url, $overwrite=false) { global $lang; - + // check the url - $matches = array(); + $matches = array(); if (!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) { $this->manager->error = $this->lang['error_badurl']."\n"; return false; } - + $file = $matches[0]; $folder = "p".md5($file.date('r')); // tmp folder name - will be empty (should really make sure it doesn't already exist) $tmp = DOKU_PLUGIN."tmp/$folder"; - + if (!ap_mkdir($tmp)) { $this->manager->error = $this->lang['error_dir_create']."\n"; return false; } - + if (!$file = io_download($url, "$tmp/", true, $file)) { $this->manager->error = sprintf($this->lang['error_download'],$url)."\n"; } - + if (!$this->manager->error && !ap_decompress("$tmp/$file", $tmp)) { $this->manager->error = sprintf($this->lang['error_decompress'],$file)."\n"; } - + // search tmp/$folder for the folder(s) that has been created // move that folder(s) to lib/plugins/ if (!$this->manager->error) { @@ -259,31 +259,31 @@ class ap_manage { while (false !== ($f = readdir($dh))) { if ($f == '.' || $f == '..' || $f == 'tmp') continue; if (!is_dir("$tmp/$f")) continue; - + // check to make sure we aren't overwriting anything if (!$overwrite && @file_exists(DOKU_PLUGIN."/$f")) { // remember our settings, ask the user to confirm overwrite, FIXME continue; } - + $instruction = @file_exists(DOKU_PLUGIN."/$f") ? 'update' : 'install'; - + if (ap_copy("$tmp/$f", DOKU_PLUGIN.$f)) { $this->downloaded[] = $f; $this->plugin_writelog($f, $instruction, array($url)); } else { $this->manager->error .= sprintf($lang['error_copy']."\n", $f); } - } + } closedir($dh); } else { $this->manager->error = $this->lang['error']."\n"; } } - + // cleanup if ($folder && is_dir(DOKU_PLUGIN."tmp/$folder")) ap_delete(DOKU_PLUGIN."tmp/$folder"); - + if (!$this->manager->error) { $this->refresh(); return true; @@ -291,12 +291,12 @@ class ap_manage { return false; } - - // log + + // log function plugin_writelog($plugin, $cmd, $data) { - + $file = DOKU_PLUGIN.$plugin.'/manager.dat'; - + switch ($cmd) { case 'install' : $url = $data[0]; @@ -305,7 +305,7 @@ class ap_manage { fwrite($fp, "installed=$date\nurl=$url\n"); fclose($fp); break; - + case 'update' : $date = date('r'); if (!$fp = @fopen($file, 'a')) return; @@ -314,47 +314,47 @@ class ap_manage { break; } } - + function plugin_readlog($plugin, $field) { static $log = array(); $file = DOKU_PLUGIN.$plugin.'/manager.dat'; - + if (!isset($log[$plugin])) { $tmp = @file_get_contents($file); if (!$tmp) return ''; $log[$plugin] = & $tmp; } - + if ($field == 'ALL') { return $log[$plugin]; } - - $match = array(); + + $match = array(); if (preg_match_all('/'.$field.'=(.*)$/m',$log[$plugin], $match)) return implode("\n", $match[1]); - + return ''; } } - + class ap_download extends ap_manage { - + var $overwrite = false; - + function process() { global $lang; - + $plugin_url = $_REQUEST['url']; $this->download($plugin_url, $this->overwrite); return ''; } - + function html() { parent::html(); - + ptln('
'); ptln('

'.$this->lang['downloading'].'

'); - + if ($this->manager->error) { ptln('
'.str_replace("\n","
",$this->manager->error).'
'); } else if (count($this->downloaded) == 1) { @@ -371,26 +371,26 @@ class ap_manage { } ptln('
'); } - + } - + class ap_delete extends ap_manage { - - function process() { - + + function process() { + if (!ap_delete(DOKU_PLUGIN.$this->manager->plugin)) { $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin); } else { $this->refresh(); } } - + function html() { parent::html(); - + ptln('
'); ptln('

'.$this->lang['deleting'].'

'); - + if ($this->manager->error) { ptln('
'.str_replace("\n","
",$this->manager->error).'
'); } else { @@ -399,63 +399,63 @@ class ap_manage { ptln('
'); } } - + class ap_info extends ap_manage { - + var $plugin_info = array(); // the plugin itself var $details = array(); // any component plugins - function process() { - + function process() { + // sanity check if (!$this->manager->plugin) { return; } - + $component_list = ap_plugin_components($this->manager->plugin); usort($component_list, ap_component_sort); - + foreach ($component_list as $component) { if ($obj = & plugin_load($component['type'],$component['name']) === NULL) continue; - + $this->details[] = array_merge($obj->getInfo(), array('type' => $component['type'])); unset($obj); } - + // review details to simplify things foreach($this->details as $info) { foreach($info as $item => $value) { if (!isset($this->plugin_info[$item])) { $this->plugin_info[$item] = $value; continue; } if ($this->plugin_info[$item] != $value) $this->plugin_info[$item] = ''; - } - } - } - + } + } + } + function html() { - + // output the standard menu stuff parent::html(); - + // sanity check if (!$this->manager->plugin) { return; } - + ptln('
'); ptln("

".$this->manager->getLang('plugin')." {$this->manager->plugin}

"); // collect pertinent information from the log $installed = $this->plugin_readlog($this->manager->plugin, 'installed'); - $source = $this->plugin_readlog($this->manager->plugin, 'url'); + $source = $this->plugin_readlog($this->manager->plugin, 'url'); $updated = $this->plugin_readlog($this->manager->plugin, 'updated'); if (strrpos($updated, "\n") !== false) $updated = substr($updated, strrpos($updated, "\n")+1); - + ptln("
",2); ptln("
".$this->manager->getLang('source').'
'.($source ? $source : $this->manager->getLang('unknown'))."
",4); ptln("
".$this->manager->getLang('installed').'
'.($installed ? $installed : $this->manager->getLang('unknown'))."
",4); if ($updated) ptln("
".$this->manager->getLang('lastupdate').'
'.$updated."
",4); ptln("
",2); - + if (count($this->details) == 0) { ptln("

".$this->manager->getLang('noinfo')."

",2); } else { - + ptln("
",2); if ($this->plugin_info['name']) ptln("
".$this->manager->getLang('name')."
".$this->out($this->plugin_info['name'])."
",4); if ($this->plugin_info['date']) ptln("
".$this->manager->getLang('date')."
".$this->out($this->plugin_info['date'])."
",4); @@ -464,55 +464,55 @@ class ap_manage { if ($this->plugin_info['author']) ptln("
".$this->manager->getLang('author')."
".$this->manager->email($this->plugin_info['email'], $this->plugin_info['author'])."
",4); if ($this->plugin_info['url']) ptln("
".$this->manager->getLang('www')."
".$this->manager->external_link($this->plugin_info['url'], '', 'urlextern')."
",4); ptln("
",2); - + if (count($this->details) > 1) { ptln("

".$this->manager->getLang('components')."

",2); ptln("
",2); - + foreach ($this->details as $info) { - + ptln("
",4); - ptln("
".$this->manager->getLang('name')."
".$this->out($info['name'])."
",6); + ptln("
".$this->manager->getLang('name')."
".$this->out($info['name'])."
",6); if (!$this->plugin_info['date']) ptln("
".$this->manager->getLang('date')."
".$this->out($info['date'])."
",6); if (!$this->plugin_info['type']) ptln("
".$this->manager->getLang('type')."
".$this->out($info['type'])."
",6); if (!$this->plugin_info['desc']) ptln("
".$this->manager->getLang('desc')."
".$this->out($info['desc'])."
",6); if (!$this->plugin_info['author']) ptln("
".$this->manager->getLang('author')."
".$this->manager->email($info['email'], $info['author'])."
",6); if (!$this->plugin_info['url']) ptln("
".$this->manager->getLang('www')."
".$this->manager->external_link($info['url'], '', 'urlextern')."
",6); ptln("
",4); - + } ptln("
",2); } } ptln("
"); } - + // simple output filter, make html entities safe and convert new lines to
function out($text) { return str_replace("\n",'
',htmlentities($text)); } - + } - + //--------------[ to do ]--------------------------------------- class ap_update extends ap_manage { - + var $overwrite = true; - + function process() { global $lang; - + $plugin_url = $this->plugin_readlog($this->plugin, 'url'); $this->download($plugin_url, $this->overwrite); return ''; } - + function html() { parent::html(); - + ptln('
'); ptln('

'.$this->lang['updating'].'

'); - + if ($this->manager->error) { ptln('
'.str_replace("\n","
", $this->manager->error).'
'); } else if (count($this->downloaded) == 1) { @@ -531,58 +531,58 @@ class ap_manage { } } class ap_settings extends ap_manage {} - + //--------------[ utilities ]----------------------------------- - + function is_css($f) { return (substr($f, -4) == '.css'); } - - // generate an admin plugin href - function apl($pl, $fn) { - global $ID; + + // generate an admin plugin href + function apl($pl, $fn) { + global $ID; return wl($ID,"do=admin&page=plugin".($pl?"&plugin=$pl":"").($fn?"&fn=$fn":"")); } - + // decompress wrapper function ap_decompress($file, $target) { - + // decompression library doesn't like target folders ending in "/" if (substr($target, -1) == "/") $target = substr($target, 0, -1); $ext = substr($file, strrpos($file,'.')+1); - + // .tar, .tar.bz, .tar.gz, .tgz if (in_array($ext, array('tar','bz','bz2','gz','tgz'))) { - + require_once(DOKU_PLUGIN."plugin/inc/tarlib.class.php"); - + if (strpos($ext, 'bz') !== false) $compress_type = COMPRESS_BZIP; else if (strpos($ext,'gz') !== false) $compress_type = COMPRESS_GZIP; else $compress_type = COMPRESS_NONE; $tar = new CompTar($file, $compress_type); $ok = $tar->Extract(FULL_ARCHIVE, $target, '', 0777); - - // FIXME sort something out for handling tar error messages meaningfully + + // FIXME sort something out for handling tar error messages meaningfully return ($ok<0?false:true); - + } else if ($ext == 'zip') { require_once(DOKU_PLUGIN."plugin/inc/zip.lib.php"); - + $zip = new zip(); $ok = $zip->Extract($file, $target); - - // FIXME sort something out for handling zip error messages meaningfully + + // FIXME sort something out for handling zip error messages meaningfully return ($ok==-1?false:true); - + } else if ($ext == "rar") { // not yet supported -- fix me return false; } - + // unsupported file type return false; } - + // possibly should use io_MakeFileDir, not sure about using its method of error handling function ap_mkdir($d) { global $conf; @@ -593,36 +593,36 @@ class ap_manage { // copy with recursive sub-directory support function ap_copy($src, $dst) { - + if (is_dir($src)) { if (!$dh = @opendir($src)) return false; - - if ($ok = ap_mkdir($dst)) { + + if ($ok = ap_mkdir($dst)) { while ($ok && $f = readdir($dh)) { if ($f == '..' || $f == '.') continue; $ok = ap_copy("$src/$f", "$dst/$f"); } - } - + } + closedir($dh); return $ok; - + } else { if (!@copy($src,$dst)) return false; touch($dst,filemtime($src)); } - + return true; } - + // delete, with recursive sub-directory support function ap_delete($path) { - + if (!is_string($path) || $path == "") return false; - + if (is_dir($path)) { if (!$dh = @opendir($path)) return false; - + while ($f = readdir($dh)) { if ($f == '..' || $f == '.') continue; ap_delete("$path/$f"); @@ -635,31 +635,31 @@ class ap_manage { } return false; - } - + } + // return a list (name & type) of all the component plugins that make up this plugin // can this move to pluginutils? function ap_plugin_components($plugin) { global $common_plugin_types; - + $components = array(); $path = DOKU_PLUGIN.$plugin.'/'; - + foreach ($common_plugin_types as $type) { if (file_exists($path.$type.'.php')) { $components[] = array('name'=>$plugin, 'type'=>$type); continue; } - + if ($dh = @opendir($path.$type.'/')) { while (false !== ($cp = readdir($dh))) { if ($cp == '.' || $cp == '..' || strtolower(substr($cp,-4)) != '.php') continue; $components[] = array('name'=>$plugin.'_'.substr($cp, 0, -4), 'type'=>$type); } closedir($dh); - } + } } return $components; } - + function ap_component_sort($a, $b) { if ($a['name'] == $b['name']) return 0; return ($a['name'] < $b['name']) ? -1 : 1; diff --git a/lib/plugins/plugin/style.css b/lib/plugins/plugin/style.css index f9d496f2e..03f8ace19 100644 --- a/lib/plugins/plugin/style.css +++ b/lib/plugins/plugin/style.css @@ -6,42 +6,42 @@ */ /* overall containing div */ -#plugin_manager {} - -#plugin_manager h2 { margin-left: 0;} -#plugin_manager form { display: block; margin: 0; padding: 0;} -#plugin_manager legend { display: none;} -#plugin_manager .legend { color: black; display: block; margin: 0; padding: 0; font-size: 1em; line-height: 1.4em; font-weight: normal; text-align: left;} -#plugin_manager fieldset { border: 0; width: auto;} -#plugin_manager .button { margin: 0 0.3em 2px 0;} -#plugin_manager p, #plugin_manager label { text-align: left;} -#plugin_manager .hidden { display: none;} -#plugin_manager .new { background: __medium__;} -#plugin_manager input[disabled] { color: __mediumgray__; border-color: __mediumgray__;} /* IE won't understand but doesn't require it */ - -#plugin_manager .pm_menu, #plugin_manager .pm_info { margin-left: 0; text-align: left; } -#plugin_manager .pm_menu { float: left; width: 48%; } -#plugin_manager .pm_info { float: right; width: 50%; } - -#plugin_manager .common { border-bottom: 1px solid __dark__; margin-top: 1em;} -#plugin_manager .common form { border: 1px solid __dark__; border-bottom: 0;} -#plugin_manager .common fieldset { margin: 0; padding: 0;} -#plugin_manager .common .legend { background: __medium__; margin-bottom: 0.3em; padding-left: 0.5em;} -#plugin_manager .common label { padding: 0 0 0.5em 0.5em; } -#plugin_manager .common input { width: auto; margin: 0 1em;} -#plugin_manager .common .button { float: right; width: 6em; } -#plugin_manager .common p { border-bottom: 1px solid __dark__; padding: 0 0 0.5em 0.5em; margin-bottom: 0;} - -#plugin_manager .plugins { border-bottom: 1px solid __dark__;} -#plugin_manager .plugins form { border: 1px solid __dark__; border-bottom: 0;} -#plugin_manager .plugins fieldset { text-align: right; } -#plugin_manager .plugins .legend { float: left; padding: 5px 0 0 5px;} -#plugin_manager .plugins .button { width: 5em; font-size: 95%;} - -#plugin_manager .pm_info h3 { margin-left: 0; } -#plugin_manager .pm_info dl { margin: 1em 0; padding: 0;} -#plugin_manager .pm_info dt { width: 6em; float: left; clear: left; margin:0; padding: 0;} -#plugin_manager .pm_info dd { margin:0 0 0 7em; padding: 0;} +#plugin__manager {} + +#plugin__manager h2 { margin-left: 0;} +#plugin__manager form { display: block; margin: 0; padding: 0;} +#plugin__manager legend { display: none;} +#plugin__manager .legend { color: black; display: block; margin: 0; padding: 0; font-size: 1em; line-height: 1.4em; font-weight: normal; text-align: left;} +#plugin__manager fieldset { border: 0; width: auto;} +#plugin__manager .button { margin: 0 0.3em 2px 0;} +#plugin__manager p, #plugin__manager label { text-align: left;} +#plugin__manager .hidden { display: none;} +#plugin__manager .new { background: __medium__;} +#plugin__manager input[disabled] { color: __mediumgray__; border-color: __mediumgray__;} /* IE won't understand but doesn't require it */ + +#plugin__manager .pm_menu, #plugin__manager .pm_info { margin-left: 0; text-align: left; } +#plugin__manager .pm_menu { float: left; width: 48%; } +#plugin__manager .pm_info { float: right; width: 50%; } + +#plugin__manager .common { border-bottom: 1px solid __dark__; margin-top: 1em;} +#plugin__manager .common form { border: 1px solid __dark__; border-bottom: 0;} +#plugin__manager .common fieldset { margin: 0; padding: 0;} +#plugin__manager .common .legend { background: __medium__; margin-bottom: 0.3em; padding-left: 0.5em;} +#plugin__manager .common label { padding: 0 0 0.5em 0.5em; } +#plugin__manager .common input { width: auto; margin: 0 1em;} +#plugin__manager .common .button { float: right; width: 6em; } +#plugin__manager .common p { border-bottom: 1px solid __dark__; padding: 0 0 0.5em 0.5em; margin-bottom: 0;} + +#plugin__manager .plugins { border-bottom: 1px solid __dark__;} +#plugin__manager .plugins form { border: 1px solid __dark__; border-bottom: 0;} +#plugin__manager .plugins fieldset { text-align: right; } +#plugin__manager .plugins .legend { float: left; padding: 5px 0 0 5px;} +#plugin__manager .plugins .button { width: 5em; font-size: 95%;} + +#plugin__manager .pm_info h3 { margin-left: 0; } +#plugin__manager .pm_info dl { margin: 1em 0; padding: 0;} +#plugin__manager .pm_info dt { width: 6em; float: left; clear: left; margin:0; padding: 0;} +#plugin__manager .pm_info dd { margin:0 0 0 7em; padding: 0;} /* end admin plugin styles */ diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js index c0323f09e..a2a48a996 100644 --- a/lib/scripts/ajax.js +++ b/lib/scripts/ajax.js @@ -31,7 +31,7 @@ ajax_qsearch.init = function(inID,outID){ if(ajax_qsearch.outObj === null){ return; } // attach eventhandler to search field - addEvent(ajax_qsearch.inObj,'keyup',ajax_qsearch.call); + addEvent(ajax_qsearch.inObj,'keyup',ajax_qsearch.call); // attach eventhandler to output field addEvent(ajax_qsearch.outObj,'click',function(){ ajax_qsearch.outObj.style.display='none'; }); @@ -47,14 +47,14 @@ ajax_qsearch.clear = function(){ }; ajax_qsearch.exec = function(){ - ajax_qsearch.clear(); + ajax_qsearch.clear(); var value = ajax_qsearch.inObj.value; if(value === ''){ return; } ajax_qsearch.sack.runAJAX('call=qsearch&q='+encodeURI(value)); }; ajax_qsearch.sack.onCompletion = function(){ - var data = ajax_qsearch.sack.response; + var data = ajax_qsearch.sack.response; if(data === ''){ return; } ajax_qsearch.outObj.innerHTML = data; diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index 9a317a85c..22d040610 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -49,13 +49,13 @@ function createToolButton(icon,label,key,id){ */ function createPicker(id,list,icobase,edid){ var cnt = list.length; - + var picker = document.createElement('div'); picker.className = 'picker'; picker.id = id; picker.style.position = 'absolute'; picker.style.display = 'none'; - + for(var key in list){ var btn = document.createElement('button'); @@ -139,7 +139,7 @@ function initToolbar(tbid,edid,tb){ case 'format': var sample = tb[i]['title']; if(tb[i]['sample']){ sample = tb[i]['sample']; } - + eval("btn.onclick = function(){insertTags('"+ jsEscape(edid)+"','"+ jsEscape(tb[i]['open'])+"','"+ @@ -207,7 +207,7 @@ function insertTags(edid,tagOpen, tagClose, sampleText) { theSelection=sampleText; } txtarea.focus(); - + // This has change var text = theSelection; if(theSelection.charAt(theSelection.length - 1) == " "){// exclude ending space char, if any @@ -240,14 +240,14 @@ function insertTags(edid,tagOpen, tagClose, sampleText) { txtarea.value = txtarea.value.substring(0, startPos) + subst + txtarea.value.substring(endPos, txtarea.value.length); txtarea.focus(); - + //set new selection if(replaced){ var cPos=startPos+(tagOpen.length+myText.length+tagClose.length); txtarea.selectionStart=cPos; txtarea.selectionEnd=cPos; }else{ - txtarea.selectionStart=startPos+tagOpen.length; + txtarea.selectionStart=startPos+tagOpen.length; txtarea.selectionEnd=startPos+tagOpen.length+myText.length; } txtarea.scrollTop=scrollTop; @@ -363,21 +363,21 @@ function initChangeCheck(msg){ } // reset change memory var on submit - var btn_save = document.getElementById('edbtn_save'); + var btn_save = document.getElementById('edbtn__save'); btn_save.onclick = function(){ textChanged = false; }; btn_save.onkeypress = function(){ textChanged = false; }; - var btn_prev = document.getElementById('edbtn_preview'); + var btn_prev = document.getElementById('edbtn__preview'); btn_prev.onclick = function(){ textChanged = false; }; btn_prev.onkeypress = function(){ textChanged = false; }; // add change memory setter - var edit_text = document.getElementById('wikitext'); + var edit_text = document.getElementById('wiki__text'); edit_text.onchange = function(){ textChanged = true; //global var summaryCheck(); }; edit_text.onkeyup = summaryCheck; - var summary = document.getElementById('summary'); + var summary = document.getElementById('edit__summary'); summary.onchange = summaryCheck; summary.onkeyup = summaryCheck; @@ -391,7 +391,7 @@ function initChangeCheck(msg){ * @author Andreas Gohr */ function summaryCheck(){ - var sum = document.getElementById('summary'); + var sum = document.getElementById('edit__summary'); if(sum.value === ''){ sum.className='missing'; }else{ @@ -404,84 +404,84 @@ function summaryCheck(){ * Class managing the timer to display a warning on a expiring lock */ function locktimer_class(){ - this.sack = null; - this.timeout = 0; - this.timerID = null; - this.lasttime = null; - this.msg = ''; - this.pageid = ''; + this.sack = null; + this.timeout = 0; + this.timerID = null; + this.lasttime = null; + this.msg = ''; + this.pageid = ''; }; var locktimer = new locktimer_class(); - locktimer.init = function(timeout,msg){ - // init values - locktimer.timeout = timeout*1000; - locktimer.msg = msg; - locktimer.lasttime = new Date(); - - if(!$('dw__editform')) return; - locktimer.pageid = $('dw__editform').elements.id.value; - if(!locktimer.pageid) return; - - // init ajax component - locktimer.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); - locktimer.sack.AjaxFailedAlert = ''; - locktimer.sack.encodeURIString = false; - locktimer.sack.onCompletion = locktimer.refreshed; - - // register refresh event - addEvent($('dw__editform').elements.wikitext,'keyup',function(){locktimer.refresh();}); - - // start timer - locktimer.reset(); - }; - - /** + locktimer.init = function(timeout,msg){ + // init values + locktimer.timeout = timeout*1000; + locktimer.msg = msg; + locktimer.lasttime = new Date(); + + if(!$('dw__editform')) return; + locktimer.pageid = $('dw__editform').elements.id.value; + if(!locktimer.pageid) return; + + // init ajax component + locktimer.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); + locktimer.sack.AjaxFailedAlert = ''; + locktimer.sack.encodeURIString = false; + locktimer.sack.onCompletion = locktimer.refreshed; + + // register refresh event + addEvent($('dw__editform').elements.wikitext,'keyup',function(){locktimer.refresh();}); + + // start timer + locktimer.reset(); + }; + + /** * (Re)start the warning timer */ - locktimer.reset = function(){ - locktimer.clear(); - locktimer.timerID = window.setTimeout("locktimer.warning()", locktimer.timeout); - }; - - /** - * Display the warning about the expiring lock - */ - locktimer.warning = function(){ - locktimer.clear(); - alert(locktimer.msg); - }; - - /** - * Remove the current warning timer + locktimer.reset = function(){ + locktimer.clear(); + locktimer.timerID = window.setTimeout("locktimer.warning()", locktimer.timeout); + }; + + /** + * Display the warning about the expiring lock + */ + locktimer.warning = function(){ + locktimer.clear(); + alert(locktimer.msg); + }; + + /** + * Remove the current warning timer */ - locktimer.clear = function(){ - if(locktimer.timerID !== null){ - window.clearTimeout(locktimer.timerID); - locktimer.timerID = null; - } - }; - - /** + locktimer.clear = function(){ + if(locktimer.timerID !== null){ + window.clearTimeout(locktimer.timerID); + locktimer.timerID = null; + } + }; + + /** * Refresh the lock via AJAX * * Called on keypresses in the edit area */ - locktimer.refresh = function(){ - var now = new Date(); - // refresh every minute only - if(now.getTime() - locktimer.lasttime.getTime() > 60*1000){ - locktimer.sack.runAJAX('call=lock&id='+encodeURI(locktimer.pageid)); - locktimer.lasttime = now; - } - }; + locktimer.refresh = function(){ + var now = new Date(); + // refresh every minute only + if(now.getTime() - locktimer.lasttime.getTime() > 60*1000){ + locktimer.sack.runAJAX('call=lock&id='+encodeURI(locktimer.pageid)); + locktimer.lasttime = now; + } + }; - /** + /** * Callback. Resets the warning timer */ - locktimer.refreshed = function(){ - if(this.response != '1') return; // locking failed - locktimer.reset(); - }; + locktimer.refreshed = function(){ + if(this.response != '1') return; // locking failed + locktimer.reset(); + }; // end of locktimer class functions diff --git a/lib/scripts/script.js b/lib/scripts/script.js index d621232ce..834f0f4a4 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -132,7 +132,7 @@ function prependChild(parent,element) { function showLoadBar(){ if(document.getElementById){ document.write(''); + 'width="150" height="12" id="dw__loading" />'); } } @@ -143,7 +143,7 @@ function showLoadBar(){ */ function hideLoadBar(){ if(document.getElementById){ - $('loading').style.display="none"; + $('dw__loading').style.display="none"; } } @@ -153,7 +153,7 @@ function hideLoadBar(){ * @see http://www.alexking.org/index.php?content=software/javascript/content.php */ function mediaSelect(file){ - opener.insertTags('wikitext','{{'+file+'|','}}',file); + opener.insertTags('wiki__text','{{'+file+'|','}}',file); window.close(); } @@ -296,34 +296,34 @@ var currentFootnote = 0; function fnt(id, e, evt) { if (currentFootnote && id != currentFootnote) { - domTT_close($('insitu-fn'+currentFootnote)); + domTT_close($('insitu__fn'+currentFootnote)); } // does the footnote tooltip already exist? - var fnote = $('insitu-fn'+id); + var fnote = $('insitu__fn'+id); var footnote; if (!fnote) { // if not create it... // locate the footnote anchor element - var a = $( "fn"+id ); + var a = $( "fn__"+id ); if (!a){ return; } // anchor parent is the footnote container, get its innerHTML footnote = new String (a.parentNode.innerHTML); // strip the leading footnote anchors and their comma separators - footnote = footnote.replace(//gi, ''); + footnote = footnote.replace(//gi, ''); footnote = footnote.replace(/^\s+(,\s+)+/,''); - // prefix ids on any elements with "insitu-" to ensure they remain unique - footnote = footnote.replace(/\bid=\"(.*?)\"/gi,'id="insitu-$1'); + // prefix ids on any elements with "insitu__" to ensure they remain unique + footnote = footnote.replace(/\bid=\"(.*?)\"/gi,'id="insitu__$1'); } else { footnote = new String(fnt.innerHTML); } // activate the tooltip - domTT_activate(e, evt, 'content', footnote, 'type', 'velcro', 'id', 'insitu-fn'+id, 'styleClass', 'insitu-footnote JSpopup', 'maxWidth', document.body.offsetWidth*0.4); + domTT_activate(e, evt, 'content', footnote, 'type', 'velcro', 'id', 'insitu__fn'+id, 'styleClass', 'insitu-footnote JSpopup', 'maxWidth', document.body.offsetWidth*0.4); currentFootnote = id; } diff --git a/lib/scripts/spellcheck.js b/lib/scripts/spellcheck.js index 9ce529131..2af56642f 100644 --- a/lib/scripts/spellcheck.js +++ b/lib/scripts/spellcheck.js @@ -1,5 +1,5 @@ /** - * DokuWiki Spellcheck AJAX clientside script + * DokuWiki Spellcheck AJAX clientside script * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr @@ -16,27 +16,27 @@ * Copyright (c) 2005, Garrison Locke * All rights reserved. * - * Redistribution and use in source and binary forms, with or without + * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - * * Redistributions of source code must retain the above copyright notice, + * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * * Neither the name of the http://www.broken-notebook.com nor the names of its - * contributors may be used to endorse or promote products derived from this + * * Neither the name of the http://www.broken-notebook.com nor the names of its + * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ @@ -81,7 +81,7 @@ function ajax_spell_class(){ this.utf8ok = 1; this.handler = DOKU_BASE+'lib/exe/spellcheck.php'; // to hold the page objects (initialized with init()) - this.textboxObj = null; + this.textboxObj = null; this.showboxObj = null; this.suggestObj = null; this.editbarObj = null; @@ -114,25 +114,25 @@ function ajax_spell_class(){ if(ajax.failed){ return; } // get Elements - this.textboxObj = document.getElementById('wikitext'); - this.editbarObj = document.getElementById('wikieditbar'); - this.showboxObj = document.getElementById('spell_result'); - this.suggestObj = document.getElementById('spell_suggest'); + this.textboxObj = document.getElementById('wiki__text'); + this.editbarObj = document.getElementById('wiki__editbar'); + this.showboxObj = document.getElementById('spell__result'); + this.suggestObj = document.getElementById('spell__suggest'); // set Translation Strings this.txtStart = txtStart; this.txtStop = txtStop; this.txtRun = txtRun; - this.txtNoErr = txtNoErr; + this.txtNoErr = txtNoErr; this.txtNoSug = txtNoSug; this.txtChange= txtChange; // create ToolBar Button with ID and add it to the toolbar with null action - var toolbarObj = document.getElementById('toolbar'); - this.buttonObj = createToolButton('spellcheck.png',txtStart,'k','spellcheck'); + var toolbarObj = document.getElementById('tool__bar'); + this.buttonObj = createToolButton('spellcheck.png',txtStart,'k','spell__check'); this.buttonObj.onclick = function(){return false;}; toolbarObj.appendChild(this.buttonObj); - this.imageObj = document.getElementById('spellcheck_ico'); + this.imageObj = document.getElementById('spell__check_ico'); // start UTF-8 compliance test - send an UTF-8 char and see what comes back ajax.AjaxFailedAlert = ''; @@ -204,7 +204,7 @@ function ajax_spell_class(){ * @author Garrison Locke */ this.correct = function (id, word){ - var obj = document.getElementById('spell_error'+id); + var obj = document.getElementById('spell__error'+id); obj.innerHTML = decodeURIComponent(word); obj.style.color = "#005500"; this.suggestObj.style.display = "none"; @@ -212,11 +212,11 @@ function ajax_spell_class(){ /** * Opens a prompt to let the user change the word her self - * + * * @author Andreas Gohr */ this.ask = function(id){ - var word = document.getElementById('spell_error'+id).innerHTML; + var word = document.getElementById('spell__error'+id).innerHTML; word = prompt(this.txtChange,word); if(word){ this.correct(id,encodeURIComponent(word)); @@ -236,10 +236,10 @@ function ajax_spell_class(){ // set position of the popup this.suggestObj.style.display = "none"; - var x = findPosX('spell_error'+id); - var y = findPosY('spell_error'+id); + var x = findPosX('spell__error'+id); + var y = findPosY('spell__error'+id); - // handle scrolling + // handle scrolling var scrollPos; if(is_opera){ scrollPos = 0; //FIXME how to do this without browser sniffing? @@ -294,7 +294,7 @@ function ajax_spell_class(){ addEvent(ajax_spell.textboxObj,'focus',ajax_spell.setState); // get started - ajax_spell.setState('start'); + ajax_spell.setState('start'); }; /** @@ -302,7 +302,7 @@ function ajax_spell_class(){ * Inside the callback 'this' is the SACK object!! * * @author Andreas Gohr - */ + */ this.start = function(){ var data = this.response; var error = data.charAt(0); @@ -350,7 +350,7 @@ function ajax_spell_class(){ return String.fromCharCode(+match1); }); // now remove & protection - data = data.replace(/&/g,'&'); + data = data.replace(/&/g,'&'); } // replace div with textbox again diff --git a/lib/styles/style.css b/lib/styles/style.css index 6912e4f24..283fee14d 100644 --- a/lib/styles/style.css +++ b/lib/styles/style.css @@ -1,7 +1,7 @@ /** * Basic styles. These styles are needed for basic DokuWiki functions * regardless of the used template. Templates can override them of course - */ + */ div.clearer {clear: both; line-height: 0; height: 0; overflow:hidden;} @@ -14,7 +14,7 @@ div.no { div.error{ background: #fcc url(../images/error.png) 0.5em 0px no-repeat; color: #000; - border-bottom: 1px solid #faa; + border-bottom: 1px solid #faa; font-size: 90%; margin: 0px; padding-left: 3em; @@ -23,7 +23,7 @@ div.error{ div.info{ background: #ccf url(../images/info.png) 0.5em 0px no-repeat; color: #000; - border-bottom: 1px solid #aaf; + border-bottom: 1px solid #aaf; font-size: 90%; margin: 0; padding-left: 3em; @@ -32,7 +32,7 @@ div.info{ div.success{ background: #cfc url(../images/success.png) 0.5em 0px no-repeat; color: #000; - border-bottom: 1px solid #afa; + border-bottom: 1px solid #afa; font-size: 90%; margin: 0; padding-left: 3em; @@ -61,23 +61,23 @@ div.dokuwiki em.u { /* syntax highlighting code */ -.code .br0 { color: #66cc66; } -.code .co1 { color: #808080; font-style: italic; } -.code .co2 { color: #808080; font-style: italic; } -.code .coMULTI { color: #808080; font-style: italic; } -.code .es0 { color: #000099; font-weight: bold; } -.code .kw1 { color: #b1b100; } -.code .kw2 { color: #000000; font-weight: bold; } -.code .kw3 { color: #000066; } -.code .kw4 { color: #993333; } -.code .kw5 { color: #0000ff; } -.code .me0 { color: #006600; } -.code .nu0 { color: #cc66cc; } -.code .re0 { color: #0000ff; } -.code .re1 { color: #0000ff; } -.code .re2 { color: #0000ff; } -.code .re4 { color: #009999; } -.code .sc0 { color: #00bbdd; } -.code .sc1 { color: #ddbb00; } -.code .sc2 { color: #009900; } -.code .st0 { color: #ff0000; } +.code .br0 { color: #66cc66; } +.code .co1 { color: #808080; font-style: italic; } +.code .co2 { color: #808080; font-style: italic; } +.code .coMULTI { color: #808080; font-style: italic; } +.code .es0 { color: #000099; font-weight: bold; } +.code .kw1 { color: #b1b100; } +.code .kw2 { color: #000000; font-weight: bold; } +.code .kw3 { color: #000066; } +.code .kw4 { color: #993333; } +.code .kw5 { color: #0000ff; } +.code .me0 { color: #006600; } +.code .nu0 { color: #cc66cc; } +.code .re0 { color: #0000ff; } +.code .re1 { color: #0000ff; } +.code .re2 { color: #0000ff; } +.code .re4 { color: #009999; } +.code .sc0 { color: #00bbdd; } +.code .sc1 { color: #ddbb00; } +.code .sc2 { color: #009900; } +.code .st0 { color: #ff0000; } diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 950493688..b46987369 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -81,7 +81,7 @@ div.dokuwiki fieldset { div.dokuwiki textarea.edit { font-family:monospace; - border: 1px solid __dark__; + border: 1px solid __dark__; color: Black; background-color: __white__; font-size:14px; @@ -112,23 +112,23 @@ div.dokuwiki input.missing { } /* edit form */ -div.dokuwiki div.toolbar, div.dokuwiki div#wikieditbar { +div.dokuwiki div.toolbar, div.dokuwiki div#wiki__editbar { margin:2px 0; text-align: left; } -div.dokuwiki div#sizectl { +div.dokuwiki div#size__ctl { float:right; width:40px; height:2.7em; } -div.dokuwiki #sizectl img { +div.dokuwiki #size__ctl img { cursor: pointer; } -div.dokuwiki div#wikieditbar div.editButtons { +div.dokuwiki div#wiki__editbar div.editButtons { float: left; padding: 0 1.0em 0.7em 0; } -div.dokuwiki div#wikieditbar div.summary { +div.dokuwiki div#wiki__editbar div.summary { float: left; } div.dokuwiki .nowrap { @@ -139,7 +139,7 @@ div.dokuwiki .nowrap { div.dokuwiki input.button, div.dokuwiki button.button{ - border: 1px solid __dark__; + border: 1px solid __dark__; color: Black; background-color: __white__; vertical-align: middle; @@ -153,7 +153,7 @@ div.dokuwiki input.button, div.dokuwiki button.button{ /* Mac IE will not see this and continue with inline-block */ /* \*/ display: inline; - /* */ + /* */ } * html div.dokuwiki input.button, * html div.dokuwiki button.button{ @@ -178,27 +178,27 @@ div.dokuwiki div.secedit input.button { /* ----------- page navigator ------------- */ div.dokuwiki div.pagenav { - margin-top:1em; + margin-top:1em; } div.dokuwiki div.pagenav-prev { - text-align:right; - float:left; - width:50% + text-align:right; + float:left; + width:50% } div.dokuwiki div.pagenav-prev input.button { - margin-right:5px; + margin-right:5px; } div.dokuwiki div.pagenav-next { - text-align:left; - float:right; - width:50% + text-align:left; + float:right; + width:50% } div.dokuwiki div.pagenav-next input.button { - margin-left:5px; + margin-left:5px; } /* --------------- Links ------------------ */ @@ -236,11 +236,11 @@ div.dokuwiki a.windows{ padding: 1px 0px 1px 16px; color:__extern__; text-decoration:none; -} +} div.dokuwiki a.windows:visited { color:Purple; } -div.dokuwiki a.windows:hover { +div.dokuwiki a.windows:hover { text-decoration:underline; } @@ -333,7 +333,7 @@ div.dokuwiki img.mediaright { div.dokuwiki img.mediacenter { border: 0; - display: block; + display: block; margin-left: auto; margin-right: auto; } @@ -382,7 +382,7 @@ div.dokuwiki div.level4 {margin-left: 63px;} div.dokuwiki div.level5 {margin-left: 83px;} /* unordered lists */ -div.dokuwiki ul { +div.dokuwiki ul { line-height: 1.5em; list-style-type: square; margin: 0 0 0.5em 1.5em; @@ -414,12 +414,12 @@ div.dokuwiki ol ol ol ol {list-style-type: lower-greek} div.dokuwiki li.open { list-style-image: url(images/open.gif); - /*list-style-type: circle;*/ + /*list-style-type: circle;*/ } div.dokuwiki li.closed { list-style-image: url(images/closed.gif); - /*list-style-type: disc;*/ + /*list-style-type: disc;*/ } div.dokuwiki blockquote { @@ -557,7 +557,7 @@ div.dokuwiki a.toc { div.dokuwiki a.toc:hover { color: __black__; - text-decoration:underline; + text-decoration:underline; } /* ---------------------------- Diff rendering --------------------------*/ @@ -572,9 +572,9 @@ div.dokuwiki td.diff-addedline { font-family: monospace; font-size: 100%; } -div.dokuwiki td.diff-deletedline { +div.dokuwiki td.diff-deletedline { background:#ffffbb; - font-family: monospace; + font-family: monospace; font-size: 100%; } div.dokuwiki td.diff-context { @@ -616,7 +616,7 @@ div.insitu-footnote { background: __light__; text-align: left; padding: 4px; - max-width: 40%; /* IE's width is handled in javascript */ + max-width: 40%; /* IE's width is handled in javascript */ } /* overcome IE issue with one line code or file boxes which require h. scrolling */ @@ -729,7 +729,7 @@ div.dokuwiki a.spell_error { text-decoration: underline; } -div.dokuwiki div#spell_suggest { +div.dokuwiki div#spell__suggest { position: absolute; left: 0; top: 0; @@ -741,10 +741,10 @@ div.dokuwiki div#spell_suggest { z-index: 2; } -div.dokuwiki div#spell_result { +div.dokuwiki div#spell__result { display:none; font-family:monospace; - border: 1px solid __dark__; + border: 1px solid __dark__; color: Black; font-size:14px; padding: 3px; @@ -795,13 +795,13 @@ div.dokuwiki div.imagemeta img.thumb{ /* -------------- Media Popup ---------------------- */ -div.dokuwiki div.mediaselect-right li, div.dokuwiki div.uploadform { +div.dokuwiki div.mediaselect-right li, div.dokuwiki div.uploadform { clear: both; } div.dokuwiki div.mediaedit div.data label{ display: block; - text-align: right; + text-align: right; width: 20%; float: left; margin-right: 0.5em; diff --git a/lib/tpl/default/layout.css b/lib/tpl/default/layout.css index 13fb37404..40e0362a2 100644 --- a/lib/tpl/default/layout.css +++ b/lib/tpl/default/layout.css @@ -7,19 +7,19 @@ /* -------------- top row --------------- */ div.dokuwiki .header { - height:35px; - padding:3px 0 2px 2px; + height:35px; + padding:3px 0 2px 2px; } div.dokuwiki .pagename { - height:25px; - float:left; - font-size:200%; - font-weight:bolder; - color: __medium__; - text-align:left; - vertical-align:middle; - padding:1px 0 0 1px; + height:25px; + float:left; + font-size:200%; + font-weight:bolder; + color: __medium__; + text-align:left; + vertical-align:middle; + padding:1px 0 0 1px; } div.dokuwiki .pagename a:link, div.dokuwiki .pagename a:visited, div.dokuwiki .pagename a:hover, div.dokuwiki .pagename a:active { @@ -28,41 +28,41 @@ div.dokuwiki .pagename a:link, div.dokuwiki .pagename a:visited, div.dokuwiki .p } div.dokuwiki .logo { - float:right; - font-size:220%; - font-weight:bolder; - text-align:right; - vertical-align:middle; + float:right; + font-size:220%; + font-weight:bolder; + text-align:right; + vertical-align:middle; } div.dokuwiki .logo a:link, div.dokuwiki .logo a:visited, div.dokuwiki .logo a:hover, div.dokuwiki .logo a:active { - color: __medium__; - text-decoration:none; - font-variant:small-caps; - letter-spacing:2pt; + color: __medium__; + text-decoration:none; + font-variant:small-caps; + letter-spacing:2pt; } /* --------------- top and bottom bar ---------------- */ div.dokuwiki .bar { - height:2.0em; - border-top:1px solid __dark__; - border-bottom:1px solid __dark__; - background: __medium__; - padding:0.15em; - margin:0; + height:2.0em; + border-top:1px solid __dark__; + border-bottom:1px solid __dark__; + background: __medium__; + padding:0.15em; + margin:0; clear: both; } div.dokuwiki .bar-left { - float:left; + float:left; } div.dokuwiki .bar-right { - float:right; + float:right; text-align:right; } -div.dokuwiki #bar_bottom { +div.dokuwiki #bar__bottom { margin-bottom:3px; } @@ -104,26 +104,26 @@ div.dokuwiki .mediaselect-right { } div.dokuwiki div.mediaref_head { - margin-left:0.5em; + margin-left:0.5em; } div.dokuwiki div.mediaref .search_result { - padding-left:1em; + padding-left:1em; } div.dokuwiki .mediaref_ref { - color: __existing__; + color: __existing__; } div.dokuwiki div.mediaref_hidden { - margin-top:1em; - text-align:center; - font-size:1.2em; - color: #BB0000; + margin-top:1em; + text-align:center; + font-size:1.2em; + color: #BB0000; } div.dokuwiki div.mediaref_footer { - margin-top:1em; - text-align:center; + margin-top:1em; + text-align:center; } diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 1f4940327..9e1a4681d 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -42,16 +42,16 @@
- + -
-
+
+
- -
+ +
 
@@ -98,15 +98,15 @@ -
-
+
+
-
+
- +   diff --git a/lib/tpl/default/mediaedit.php b/lib/tpl/default/mediaedit.php index 2f0466ab8..66d40ad5e 100644 --- a/lib/tpl/default/mediaedit.php +++ b/lib/tpl/default/mediaedit.php @@ -31,49 +31,49 @@

- + -
-
- - +
+ + + - - +
- -
- - +
- - +
- -
- - -
+ +