Adding reset css in base.css, improving form styles + some fixes in the social tool

skala
Julio Montoya 15 years ago
parent b3e5b304a8
commit 790611504f
  1. 2
      main/announcements/announcements.php
  2. 2
      main/auth/lostPassword.php
  3. 1
      main/calendar/agenda_js.php
  4. 4
      main/course_home/activity.php
  5. 576
      main/css/base.css
  6. 63
      main/css/base_chamilo.css
  7. 6
      main/document/create_document.php
  8. 8
      main/glossary/index.php
  9. 2
      main/inc/lib/banner.lib.php
  10. 4
      main/inc/lib/course_home.lib.php
  11. 31
      main/inc/lib/formvalidator/FormValidator.class.php
  12. 2
      main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
  13. 2
      main/messages/new_message.php
  14. 8
      main/social/group_edit.php
  15. 16
      main/social/groups.php
  16. 20
      main/template/default/agenda/month.tpl
  17. 2
      main/work/work.lib.php

@ -477,7 +477,7 @@ if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_ed
$mail_body = api_get_person_name($myrow["lastname"], $myrow["firstname"], null, PERSON_NAME_EMAIL_ADDRESS)."<br />\n".stripslashes($emailTitle)."<br />";
// Main part of the email
$mail_body .= trim(stripslashes(AnnouncementManager::parse_content($newContent)));
$mail_body .= trim(stripslashes(AnnouncementManager::parse_content($newContent, api_get_course_id())));
// Signature of email: sender name and course URL after -- line
$mail_body .= "<br />-- <br />";
$mail_body .= api_get_person_name($_user['firstName'], $_user['lastName'], null, PERSON_NAME_EMAIL_ADDRESS)." \n";

@ -49,7 +49,7 @@ if (isset ($_GET['reset']) && isset ($_GET['id'])) {
$form->addElement('style_submit_button', 'submit', get_lang('Send'),'class="save"');
// setting the rules
$form->addRule('user', '<div class="required">'.get_lang('ThisFieldIsRequired').'</div>', 'required');
$form->addRule('user', get_lang('ThisFieldIsRequired'), 'required');
if ($form->validate()) {
$values = $form->exportValues();

@ -22,7 +22,6 @@ $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/fullcal
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
$tpl = new Template();
$tpl->assign('ajax_url', api_get_path(WEB_AJAX_PATH).'agenda.ajax.php');
$content = $tpl->fetch('default/agenda/month.tpl');
$tpl->assign('content', $content);
$template_file = $tpl->get_template('layout/layout_1_col.tpl');

@ -87,7 +87,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
?>
<div class="courseadminview">
<span class="viewcaption"><?php echo get_lang('SessionData'); ?></span>
<table width="100%">
<table class="course_activity_home">
<?php
echo show_session_data($id_session);
?>
@ -130,7 +130,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
?>
<div class="courseadminview">
<span class="viewcaption"><?php echo get_lang('SessionData'); ?></span>
<table width="100%">
<table class="course_activity_home">
<?php
echo CourseHome::show_session_data($id_session);
?>

@ -2,10 +2,379 @@
* Common CSS for all themes
*/
/* Reset.less */
* {
outline :none;
}
html, body {
margin: 0;
padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
cite,
code,
del,
dfn,
em,
img,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dd,
dl,
dt,
li,
ol,
ul,
fieldset,
form,
label,
legend,
button,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
margin: 0;
padding: 0;
border: 0;
font-weight: normal;
font-style: normal;
font-size: 100%;
line-height: 1;
font-family: inherit;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
ol, ul {
list-style: none;
}
q:before,
q:after,
blockquote:before,
blockquote:after {
content: "";
}
html {
overflow-y: scroll;
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
a:focus {
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
display: block;
}
audio, canvas, video {
display: inline-block;
*display: inline;
*zoom: 1;
}
audio:not([controls]) {
display: none;
}
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
-ms-interpolation-mode: bicubic;
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
button, input {
line-height: normal;
*overflow: visible;
}
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
padding: 0;
}
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
cursor: pointer;
-webkit-appearance: button;
}
input[type="search"] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
textarea {
overflow: auto;
vertical-align: top;
}
/* Typography.less
* Headings, body text, lists, code, and more for a versatile and durable typography system
* ---------------------------------------------------------------------------------------- */
p {
font-size: 13px;
font-weight: normal;
line-height: 18px;
margin-bottom: 9px;
}
p small {
font-size: 11px;
color: #bfbfbf;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
color: #404040;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small {
color: #bfbfbf;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
line-height: 36px;
}
h1 small {
font-size: 18px;
}
h2 {
font-size: 24px;
line-height: 36px;
}
h2 small {
font-size: 14px;
}
h3,
h4,
h5,
h6 {
line-height: 36px;
}
h3 {
font-size: 18px;
}
h3 small {
font-size: 14px;
}
h4 {
font-size: 16px;
}
h4 small {
font-size: 12px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
color: #bfbfbf;
text-transform: uppercase;
}
ul, ol {
margin: 0 0 18px 25px;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-bottom: 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li {
line-height: 18px;
color: #808080;
}
ul.unstyled {
list-style: none;
margin-left: 0;
}
dl {
margin-bottom: 18px;
}
dl dt, dl dd {
line-height: 18px;
}
dl dt {
font-weight: bold;
}
dl dd {
margin-left: 9px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #eee;
}
strong {
font-style: inherit;
font-weight: bold;
line-height: inherit;
}
em {
font-style: italic;
font-weight: inherit;
line-height: inherit;
}
.muted {
color: #bfbfbf;
}
blockquote {
margin-bottom: 18px;
border-left: 5px solid #eee;
padding-left: 15px;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
}
blockquote small {
display: block;
font-size: 12px;
font-weight: 300;
line-height: 18px;
color: #bfbfbf;
}
blockquote small:before {
content: '\2014 \00A0';
}
address {
display: block;
line-height: 18px;
margin-bottom: 18px;
}
code, pre {
padding: 0 3px 2px;
font-family: Monaco, Andale Mono, Courier New, monospace;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
code {
background-color: #fee9cc;
color: rgba(0, 0, 0, 0.75);
padding: 1px 3px;
}
pre {
background-color: #f5f5f5;
display: block;
padding: 17px;
margin: 0 0 18px;
line-height: 18px;
font-size: 12px;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/* Begin of proper */
#menu {
width:180px;
}
@ -881,8 +1250,9 @@ button:hover {
.bread span {
display: block;
font-size:11px;
padding: 0 15px 0 9px;
padding: 0px 15px 0 9px;
}
.bread a {
@ -895,15 +1265,16 @@ button:hover {
}
.bread li {
display: block;
display: block;
}
.bread li a {
height:17px;
background: url("crumbs.gif") no-repeat scroll right center transparent;
display: block;
background-repeat:no-repeat;
background-position:right;
padding:7px 0px 0px 0px;
}
.bread .home {
@ -1514,10 +1885,10 @@ div.image-social-content center.friend {
}
#social-content-right {
height:auto;
overflow:hidden;
float:left;
width:700px;
height: auto;
margin-left: 190px;
overflow: hidden;
width: 75%;
}
.social-content-image {
@ -1530,7 +1901,7 @@ div.image-social-content center.friend {
display:block;
float:left;
height:auto;
margin-right:10px;
min-height:300px;
overflow:hidden;
width:180px;
@ -1677,8 +2048,17 @@ div.image-social-content center.friend {
/* BOX SHARED PROFILE */
.social_menu_items {
/* font-size:9px; */
.social-menu-groups li {
padding:5px;
}
.social-menu-groups li a{
margin-left:6px;
}
.social_menu_items ul li{
padding:5px;
}
.social_menu_items ul li a{
padding-left:6px;
}
.social_menu_option {
@ -2029,25 +2409,34 @@ select {
}
input[type=checkbox], input[type=radio], input[type=button], input[type=submit] {
border: 1px solid #E1E1E0;
border-radius: 5px 5px 5px 5px;
cursor: pointer;
font-size: 12px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
-border-radius:5px;
border:1px solid #E1E1E0;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
border: 1px solid #849FB3;
box-shadow: 0 0 5px #C9D2D9;
background-image:none;
background-color:white;
-moz-border-radius:5px;
-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
input[type=checkbox], input[type=radio] {
margin-right: 5px;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
outline: none;
border-color: rgba(82, 168, 236, 0.8);
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
}
input, select, textarea {
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
transition: border linear 0.2s, box-shadow linear 0.2s;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Fixes the FB input*/
input.maininput:focus {
@ -2689,3 +3078,144 @@ div.admin_section h4 {
word-wrap: break-word;
font-size:11px;
}
/* Forms */
/*****************************************************
* FORM STYLES *
*****************************************************/
div.row div.form_header {
white-space: nowrap;
padding: 2px;
margin : 0px 0px 10px 0px;
background-color: #E5EDF9;
border: 1px solid #E5EDF9;
font-size:20px;
}
[dir=ltr] div.row div.label, [dir=ltl] div.row div.formw {
float: left;
text-align: right;
}
[dir=rtl] div.row div.label, [dir=rtr] div.row div.formw {
float: right;
text-align: left;
}
span.form_required {
color: #f00;header2
}
span.form_error {
color: #f00;
font-size: x-small;
margin: 2px;
}
div.row {
clear: both;
margin-bottom: 18px;
}
div.row div.label {
color: #404040;
float: left;
font-size: 13px;
line-height: 18px;
padding-top: 6px;
text-align: right;
width: 130px !important;
}
div.row div.formw {
margin-left: 150px;
}
.formw {
width:85%;
}
.formw iframe {
text-align: left;
}
.formw table {
float: left;
margin-left: 24px;
}
form div.form_error {
background: none repeat scroll 0 0 #FAE5E3;
border-radius: 4px 4px 4px 4px;
margin: -10px 0 10px;
padding: 10px 0;
}
fieldset {
/* margin-bottom: 18px;
padding-top: 18px;
*/
}
fieldset legend {
color: #404040;
display: block;
font-size: 20px;
line-height: 1;
/* margin-left: 150px;*/
margin-bottom:15px;
}
.help-inline {
padding-left: 5px;
color: red;
}
form div.error > .label,
form div.error > label,
form div.error span.help-inline,
form div.error span.help-block {
color: #9D261D;
}
form div.error input:focus,
form div.error textarea:focus {
border-color: #C87872;
box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
}
form div.error {
background: none repeat scroll 0 0 #FAE5E3;
border-radius: 4px 4px 4px 4px;
padding: 10px 0;
}
.formw label {
line-height: 18px;
text-align: left;
white-space: normal;
}
form div.error input, form div.error textarea {
border-color: #C87872;
box-shadow: 0 0 3px rgba(171, 41, 32, 0.25);
}
.course_activity_home {
width:100%;
}
.course_activity_home td {
line-height: normal;
padding: 4px;
text-align: left;
vertical-align: middle;
}

@ -751,12 +751,6 @@ input.link_alike:hover {
}
#lang_form input, #lang_form select {
font-size: 12px;
margin-left: 6px;
-moz-border-radius-bottomleft:5px;
-moz-border-radius-bottomright:5px;
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
border:1px solid #E1E1E0;
/* width:100%; */
}
#formLogin label {
@ -765,18 +759,14 @@ input.link_alike:hover {
font-family:Tahoma, Geneva, sans-serif;
color:#666666;
}
#formLogin input {
font-size: 13px;
margin: 4px 6px;
padding:6px;
-moz-border-radius-bottomleft:5px;
-moz-border-radius-bottomright:5px;
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
border:1px solid #E1E1E0;
/*width:100%;*/
}
#login_fail {
margin: 0 6px 6px 6px;
padding: 4px;
@ -937,46 +927,7 @@ a.nobold:hover {
border-collapse: collapse;
}
/*****************************************************
* FORM STYLES *
*****************************************************/
div.row {
clear: both;
padding-top: 10px;
}
div.row div.form_header {
white-space: nowrap;
padding: 2px;
margin : 0px 0px 10px 0px;
background-color: #E5EDF9;
border: 1px solid #E5EDF9;
font-size:20px;
}
div.row div.label {
float: left;
width: 22%;
text-align: right;
}
div.row div.formw {
width: 76%;
float:left;
}
[dir=ltr] div.row div.label, [dir=rtl] div.row div.formw {
float: left;
text-align: right;
}
[dir=rtl] div.row div.label, [dir=ltr] div.row div.formw {
float: right;
text-align: left;
}
span.form_required {
color: #f00;header2
}
span.form_error {
color: #f00;
font-size: x-small;
margin: 2px;
}
/*****************************************************
* DATA TABLE STYLES *
@ -1000,6 +951,7 @@ span.form_error {
text-align: center;
vertical-align: middle;
background-color: #F2F2F2;
font-weight: bold;
}
.cell_header {
background-color: #EEEEFF;
@ -1082,8 +1034,8 @@ form br {
background-color: transparent;
}
.required {
color: #f00;
font-weight: bold;
/* color: #f00;
font-weight: bold;*/
}
/* Admin section */
@ -2707,3 +2659,6 @@ abbr {
padding: 8px 0px 2px 0;
}
.chzn-search input {
}

@ -330,15 +330,9 @@ function document_exists($filename) {
return !file_exists($filepath.$filename.'.html');
}
// Change the default renderer for the filename-field to display the dir and extension
/*
$renderer = & $form->defaultRenderer();
*/
//$filename_template = str_replace('{element}', "<tt>$display_dir</tt> {element} <tt>.html</tt>", $renderer->_elementTemplate);
$filename_template = str_replace('{element}', '{element}', $renderer->_elementTemplate); // TODO: What is the point of this statement?
$renderer->setElementTemplate($filename_template, 'filename');
// Initialize group array
$group = array();
// If allowed, add element for document title

@ -65,9 +65,9 @@ if (api_is_allowed_to_edit(null, true)) {
$form = new FormValidator('glossary','post', api_get_self().'?action='.Security::remove_XSS($_GET['action']));
// settting the form elements
$form->addElement('header', '', get_lang('TermAddNew'));
$form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'95', 'id'=>'glossary_title'));
$form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'80', 'id'=>'glossary_title'));
//$form->applyFilter('glossary_title', 'html_filter');
$form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '100%', 'Height' => '300'));
$form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '90%', 'Height' => '300'));
$form->addElement('style_submit_button', 'SubmitGlossary', get_lang('TermAddButton'), 'class="save"');
// setting the rules
$form->addRule('glossary_title',get_lang('ThisFieldIsRequired'), 'required');
@ -92,9 +92,9 @@ if (api_is_allowed_to_edit(null, true)) {
// settting the form elements
$form->addElement('header', '', get_lang('TermEdit'));
$form->addElement('hidden', 'glossary_id');
$form->addElement('text', 'glossary_title', get_lang('TermName'),array('size'=>'100'));
$form->addElement('text', 'glossary_title', get_lang('TermName'),array('size'=>'80'));
//$form->applyFilter('glossary_title', 'html_filter');
$form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '100%', 'Height' => '300'));
$form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '90%', 'Height' => '300'));

@ -560,7 +560,7 @@ function show_header_4($interbreadcrumb, $language_file, $nameTools) {
if ($navigation_info['url'] == '#') {
$final_navigation[$index] = '<span>'.$navigation_info['title'].'</span>';
} else {
$final_navigation[$index] = '<a href="'.$navigation_info['url'].'" class="breadcrumb breadcrumb'.$index.'" target="_top"><span>'.$navigation_info['title'].'</span></a>';
$final_navigation[$index] = '<a href="'.$navigation_info['url'].'" class="" target="_top"><span>'.$navigation_info['title'].'</span></a>';
}
$counter++;
}

@ -752,7 +752,7 @@ class CourseHome {
$data = '';
if ($i == 0) {
echo '<table width="100%">';
echo '<table class="100%">';
}
$row_per = 33;
$mod = 3;
@ -783,7 +783,7 @@ class CourseHome {
break;
case 'activity':
if ($i == 0) {
echo '<table width="100%">';
echo '<table class="course_activity_home">';
}
if (!($i % 2)) {
echo '<tr valign="top">';

@ -58,33 +58,30 @@ class FormValidator extends HTML_QuickForm {
// Modify the default templates
$renderer = & $this->defaultRenderer();
$form_template = <<<EOT
<form {attributes}>
{content}
<div class="clear">
&nbsp;
</div>
<fieldset>
{content}
<div class="clear"></div>
</fieldset>
</form>
EOT;
$renderer->setFormTemplate($form_template);
$element_template = <<<EOT
<div class="row">
<div class="label">
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
</div>
<div class="formw">
<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> {element}
<div class="row {error_class}">
<div class="label">
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
</div>
<div class="formw">
{element}<!-- BEGIN error --><span class="help-inline">{error}</span><!-- END error -->
</div>
</div>
</div>
EOT;
$renderer->setElementTemplate($element_template);
$header_template = <<<EOT
<div class="row">
<div class="form_header">{header}</div>
</div>
<legend>{header}</legend>
EOT;
$renderer->setHeaderTemplate($header_template);
HTML_QuickForm :: setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>');
@ -332,7 +329,7 @@ EOT;
}
}
if ($error) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));
Display::display_warning_message(get_lang('FormHasErrorsPleaseComplete'));
}
$return_value = parent::toHtml();
// Add div-element which is to hold the progress bar

@ -260,9 +260,11 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
}
if (isset($error)) {
$html = str_replace('{error}', $error, $html);
$html = str_replace('{error_class}', 'error', $html);
$html = str_replace('<!-- BEGIN error -->', '', $html);
$html = str_replace('<!-- END error -->', '', $html);
} else {
$html = str_replace('{error_class}', '', $html);
$html = preg_replace("/([ \t\n\r]*)?<!-- BEGIN error -->.*<!-- END error -->([ \t\n\r]*)?/isU", '', $html);
}
if (is_array($label)) {

@ -232,7 +232,7 @@ function manage_form ($default, $select_from_user_list = null) {
<input type="file" name="attach_1" size="20" />
<input type="text" name="legend[]" size="20" />
</div></span></div></div>');
$form->addElement('html','<div class="row"><div class="formw"><span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')</div></div>');
$form->addElement('html','<div class="row"><div class="label"></div><div class="formw"><span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')</div></div>');
}
$form->addElement('style_submit_button','compose',api_xml_http_response_encode(get_lang('SendMessage')),'class="save"');

@ -161,11 +161,9 @@ echo '<div id="social-content">';
//this include the social menu div
SocialManager::show_social_menu('group_edit',$group_id);
echo '</div>';
echo '<div id="social-content-right">';
echo '<table><tr><td>';
// Display form
$form->display();
echo '</td></tr></table>';
echo '<div id="social-content-right">';
// Display form
$form->display();
echo '</div>';
echo '</div>';

@ -263,9 +263,9 @@ if ($group_id != 0 ) {
if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
if (!$is_group_member) {
if (!in_array($my_group_role, array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER, GROUP_USER_PERMISSION_PENDING_INVITATION))) {
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouShouldJoinTheGroup'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouShouldJoinTheGroup').'</a></span>';
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouShouldJoinTheGroup'), array('hspace'=>'6')).get_lang('YouShouldJoinTheGroup').'</a>';
} elseif ($my_group_role == GROUP_USER_PERMISSION_PENDING_INVITATION) {
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouHaveBeenInvitedJoinNow').'</span></a>';
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).get_lang('YouHaveBeenInvitedJoinNow').'</a>';
}
echo '<br /><br />';
}
@ -314,9 +314,9 @@ if ($group_id != 0 ) {
} else {
// if I already sent an invitation message
if (!in_array($my_group_role, array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER, GROUP_USER_PERMISSION_PENDING_INVITATION))) {
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouShouldJoinTheGroup'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouShouldJoinTheGroup').'</a></span>';
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouShouldJoinTheGroup'), array('hspace'=>'6')).get_lang('YouShouldJoinTheGroup').'</a>';
} elseif ($my_group_role == GROUP_USER_PERMISSION_PENDING_INVITATION) {
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouHaveBeenInvitedJoinNow').'</span></a>';
echo '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).get_lang('YouHaveBeenInvitedJoinNow').'</a>';
}
}
echo '</div>'; // end layout messages
@ -470,11 +470,11 @@ if ($group_id != 0 ) {
$my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
}
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$create_group_item = '<a class="a_button orange medium" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
} else {
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$create_group_item = '<a class="a_button orange medium" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
}
@ -506,11 +506,11 @@ if ($group_id != 0 ) {
$my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
}
if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$create_group_item = '<a class="a_button orange medium" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
} else {
if (api_is_allowed_to_edit(null,true)) {
$create_group_item = '<a href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.Display::return_icon('group_add.png',get_lang('CreateASocialGroup'),array('hspace'=>'6','style'=>'float:left')).get_lang('CreateASocialGroup').'</a>';
$create_group_item = '<a class="a_button orange medium" href="'.api_get_path(WEB_PATH).'main/social/group_add.php">'.get_lang('CreateASocialGroup').'</a>';
$my_group_content = $create_group_item. $my_group_content;
}
}

@ -28,7 +28,7 @@ $(document).ready(function() {
var url = '{$_p.web_ajax}agenda.ajax.php?a=add_event&start='+start_date+'&end='+end_date+'&all_day='+allDay+'&view='+view.name;
$('#start_date').html(start.getDate() +"/"+ start.getMonth() +"/"+start.getFullYear());
$('#end_date').html(end.getDate() +"/"+ end.getMonth() +"/"+end.getFullYear());
$('#end_date').html('- '+ end.getDate() +"/"+ end.getMonth() +"/"+end.getFullYear());
$("#dialog-form").dialog("open");
@ -89,7 +89,7 @@ $(document).ready(function() {
$("#dialog-form").dialog({
buttons: {
"Edit event": function() {
"Edit event" : function() {
var params = $("#add_event_form").serialize();
$.ajax({
url: url+'&'+params,
@ -132,7 +132,7 @@ $(document).ready(function() {
},
editable: true,
events: "{$ajax_url}?a=get_events",
events: "{$_p.web_ajax}agenda.ajax.php?a=get_events",
eventDrop: function(event, day_delta, minute_delta, all_day, revert_func) {
$.ajax({
url: '{$ajax_url}',
@ -155,9 +155,16 @@ $(document).ready(function() {
<div id="dialog-form" style="display:none">
<form id="add_event_form" name="form">
<span id="start_date" ></span><span id="end_date" ></span>
<div class="row">
<div class="label">
<label for="date">{"Date"|get_lang}</label>
</div>
<div class="formw">
<span id="start_date" class="label"></span><span id="end_date" class="label"></span>
</div>
</div>
<div class="row">
<label for="name">{"Title"|get_lang}</label>
<label for="name">{"Title"|get_lang}</label>
</div>
<div class="formw">
<input type="text" name="title" id="title" size="52" />
@ -172,5 +179,6 @@ $(document).ready(function() {
</div>
</form>
</div>
<div id='loading' style='position:absolute; display:none'>{"Loading"|get_lang}...</div>
<div id='calendar'></div>
<div id='loading' style='display:none'>{"Loading"|get_lang}...</div>

@ -524,7 +524,7 @@ function display_student_publications_list($id, $link_target_parameter, $dateFor
$defaults = array('my_group[dir_name]' => html_entity_decode($dir), 'description' => api_html_entity_decode($row['description']));
//$form_folder-> addElement('textarea', 'description', get_lang('Description'), array('rows' => 5, 'cols' => 50));
$form_folder->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'work', 'Width' => '100%', 'Height' => '200'));
$form_folder->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'work', 'Width' => '80%', 'Height' => '200'));
$there_is_a_end_date = false;

Loading…
Cancel
Save