[svn r15067] Fixed CSS picker in Administrator view. Add dokeos_classic as default in current setting.

skala
Julio Montoya 18 years ago
parent f764a68705
commit 33e2a2d283
  1. 16
      main/admin/settings.php
  2. 36
      main/admin/style_preview.php
  3. 8
      main/chat/chat.php
  4. 6
      main/css/medical/default.css
  5. 8
      main/css/public_admin/default.css
  6. 11
      main/inc/header.inc.php
  7. 2
      main/install/dokeos_main.sql
  8. 3
      main/install/migrate-db-1.8.4-1.8.5-pre.sql
  9. 2
      main/newscorm/openoffice_text_document.class.php

@ -1,5 +1,5 @@
<?php
// $Id: settings.php 14996 2008-04-22 01:24:39Z yannoo $
// $Id: settings.php 15067 2008-04-24 17:39:03Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -247,7 +247,7 @@ function handle_plugins()
/* We scan the plugin directory. Each folder is a potential plugin. */
$pluginpath = api_get_path(SYS_PLUGIN_PATH);
$handle = opendir($pluginpath);
$handle = @opendir($pluginpath);
while (false !== ($file = readdir($handle)))
{
if ($file <> '.' AND $file <> '..' AND is_dir(api_get_path(SYS_PLUGIN_PATH).$file))
@ -255,7 +255,7 @@ function handle_plugins()
$possibleplugins[] = $file;
}
}
closedir($handle);
@closedir($handle);
/* for each of the possible plugin dirs we check if a file plugin.php (that contains all the needed information about this plugin)
can be found in the dir.
@ -384,7 +384,7 @@ function handle_stylesheets()
echo '<div><iframe src="style_preview.php" width="100%" height="300" name="preview"></iframe></div>';
echo '<form name="stylesheets" method="post" action="'.api_get_self().'?category='.$_GET['category'].'">';
if ($handle = opendir(api_get_path(SYS_PATH).'main/css/'))
if ($handle = @opendir(api_get_path(SYS_PATH).'main/css/'))
{
$counter=1;
while (false !== ($style_dir = readdir($handle)))
@ -398,7 +398,7 @@ function handle_stylesheets()
{
if ($style_dir != '.' && $style_dir != '..')
{
if ($currentstyle == $style_dir OR ($style_dir == 'default' AND !$currentstyle))
if ($currentstyle == $style_dir OR ($style_dir == 'dokeos_classic' AND !$currentstyle))
{
$selected = 'checked="checked"';
}
@ -406,9 +406,9 @@ function handle_stylesheets()
{
$selected = '';
}
$show_name=ucwords(str_replace('_',' ', $style_dir));
echo "<input type=\"radio\" name=\"style\" value=\"".$style_dir."\" ".$selected." onClick=\"parent.preview.location='style_preview.php?style=".$style_dir."';\"/>";
echo '<a href="style_preview.php?style='.$style_dir.'" target="preview">'.$style_dir.'</a>';
echo '<a href="style_preview.php?style='.$style_dir.'" target="preview">'.$show_name.'</a>';
//echo '<div id="Layer'.$counter.'" style="position:relative; width:687px; z-index:2; visibility: hidden;">';
//echo '<a href="#" onClick="MM_showHideLayers(\'Layer'.$counter.'\',\'\',\'hide\')">'.get_lang('Close').'</a>';
//echo '<iframe src="style_preview.php?style='.$file.'" width="100%" style="float:right;"></iframe></div>';
@ -417,7 +417,7 @@ function handle_stylesheets()
}
}
}
closedir($handle);
@closedir($handle);
}
echo '<input type="submit" name="submit_stylesheets" value="'.get_lang('Ok').'" /></form>';
}

@ -2,30 +2,44 @@
include_once('../inc/global.inc.php');
if (isset($_GET['style']) AND $_GET['style']<>'')
{
$htmlHeadXtra[] = '<link href="../css/'.$_GET['style'].'/default.css" rel="stylesheet" type="text/css">';
$style=Security::remove_XSS($_GET['style']);
//$htmlHeadXtra[] = '<link href="../css/'.$_GET['style'].'/default.css" rel="stylesheet" type="text/css">';
echo '<link href="../css/'.$style.'/default.css" rel="stylesheet" type="text/css">';
}
else
{
$currentstyle = api_get_setting('stylesheets');
echo '<link href="../css/'.$currentstyle.'/default.css" rel="stylesheet" type="text/css">';
}
Display::display_header($tool_name);
?>
<!-- start of #main wrapper for #content and #menu divs -->
//Display::display_header($tool_name);
include(api_get_path(INCLUDE_PATH).'banner.inc.php');
?>
<!-- start of #main wrapper for #content and #menu divs -->
<!-- Begin Of script Output -->
<div class="maincontent">
<h3>tool title</h3>
<div id="courseintro">
<p>This is the introduction text.
</div>
<div id="courseintro_icons"><a href="#"><img src="../img/edit.gif" alt="edit"/></a><a href="#"><img src="../img/delete.gif" alt="delete"/></a></div>
<div id="courseintro_icons">
<a href="#"><img src="../img/edit.gif" alt="edit"/></a><a href="#"><img src="../img/delete.gif" alt="delete"/></a></div>
<div class="normal-message"> Normal Message </div>
<div class="error-message"> Error Message </div>
<table width="750">
<tr>
<td><table>
<td>
<table>
<tr>
<td width="220"><table id="smallcalendar">
<td width="220">
<table id="smallcalendar">
<tr id="title">
<td width="10%"><a href="#">«</a></td>
<td width="80%" colspan="5"> 2006</td>
<td width="10%"><a href="#">»</a></td>
<td width="10%"><a href="#"><<</a></td>
<td width="80%" colspan="5" align="center"> 2006</td>
<td width="10%"><a href="#">>></a></td>
</tr>
<tr>
<td class="weekdays">Mon</td>
@ -134,7 +148,7 @@ Display::display_header($tool_name);
</tr>
</table>
</div>
<div class="menu">
<div class="menu" style="width:200px">
<form action="#" method="post" id="loginform" name="loginform">
<label>Username</label>
<input type="text" name="login" id="login" size="15" value="" />

@ -1,4 +1,4 @@
<?php // $Id: chat.php 14480 2008-03-03 21:59:10Z juliomontoya $
<?php // $Id: chat.php 15067 2008-04-24 17:39:03Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -84,16 +84,16 @@ if (!empty($mycourseid) && $mycourseid != -1)
}
switch($my_style){
case 'default' :
case 'dokeos_classic' :
$footer_size = 48;
break;
case 'academica' :
$footer_size = 140;
break;
case 'corporativa' :
case 'silver_line' :
$footer_size = 60;
break;
case 'baby' :
case 'baby_orange' :
$footer_size = 120;
break;
default :

@ -50,13 +50,15 @@ body {
min-height: 333px;
margin-top:0;
background-color: #ffffff;
}
}.maincontent td {
/* only use in gradebook
.maincontent td {
float: left;
width: 100%;
padding: 4px;
}*/
}
#center {
margin: 0 190px 0 0;
padding: 10px 0 40px 0;

@ -48,12 +48,16 @@ body {
margin-top:0;
background-color: #ffffff;
}.maincontent td {
}
/*
.maincontent td {
float: left;
width: 100%;
padding: 4px;
}
*/
#center {
margin: 0 190px 0 0;
padding: 10px 0 40px 0;

@ -126,15 +126,18 @@ if (!empty($mycourseid) && $mycourseid != -1)
global $show_learn_path;
if ($show_learn_path) {
if ($show_learn_path)
{
$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/learnpath.css"/>';
$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
}
$my_code_path = api_get_path(WEB_CODE_PATH);
if(empty($my_style)){$my_style = 'default';}
if(empty($my_style))
{
$my_style = 'dokeos_classic';
}
echo '@import "'.$my_code_path.'css/'.$my_style.'/default.css";'."\n";
echo '@import "'.$my_code_path.'css/'.$my_style.'/course.css";'."\n";
?>

@ -496,7 +496,7 @@ VALUES
('service_ppt2lp', 'path_to_lzx', 'textfield', NULL, NULL, '', NULL, NULL, NULL),
('service_ppt2lp', 'size', 'radio', NULL, '720x540', '', NULL, NULL, NULL),
('wcag_anysurfer_public_pages', NULL, 'radio','Platform','false','PublicPagesComplyToWAITitle','PublicPagesComplyToWAIComment', NULL, NULL),
('stylesheets', NULL, 'textfield','stylesheets','default_with_tabs','',NULL, NULL, NULL),
('stylesheets', NULL, 'textfield','stylesheets','dokeos_classic','',NULL, NULL, NULL),
('upload_extensions_list_type', NULL, 'radio', 'Security', 'blacklist', 'UploadExtensionsListType', 'UploadExtensionsListTypeComment', NULL, NULL),
('upload_extensions_blacklist', NULL, 'textfield', 'Security', '', 'UploadExtensionsBlacklist', 'UploadExtensionsBlacklistComment', NULL, NULL),
('upload_extensions_whitelist', NULL, 'textfield', 'Security', 'htm;html;jpg;jpeg;gif;png;swf;avi;mpg;mpeg', 'UploadExtensionsWhitelist', 'UploadExtensionsWhitelistComment', NULL, NULL),

@ -97,7 +97,8 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('ldap_versi
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('service_visio', 'visio_use_rtmpt', 'radio', 'false', '', 'VisioUseRtmptTitle', 'VisioUseRtmptComment', NULL, '');
INSERT INTO settings_options (variable, value, display_text) VALUES ('visio_use_rtmpt', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('visio_use_rtmpt', 'false', 'No');
INSERT INTO settings_current(variable,subkey,type,category,selected_value,title,comment,scope,subkeytext) VALUES ('stylesheets', NULL, 'textfield','stylesheets','default','',NULL, NULL, NULL);
UPDATE settings_current SET selected_value='dokeos_classic' WHERE variable='stylesheets';
-- xxSTATSxx
ALTER TABLE track_e_downloads ADD INDEX (down_user_id);

@ -69,7 +69,7 @@ class OpenOfficeTextDocument extends OpenofficeDocument {
// dokeos styles
$my_style = api_get_setting('stylesheets');
if(empty($my_style)){$my_style = 'default';}
if(empty($my_style)){$my_style = 'dokeos_classic';}
$style_to_import = "<style type=\"text/css\">\r\n";
$style_to_import .= '@import "'.api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/default.css";'."\n";
$style_to_import .= '@import "'.api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/course.css";'."\n";

Loading…
Cancel
Save