diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 4a8676bf70..22093f37a6 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -2794,6 +2794,10 @@ form .formw .freeze { height:550px; position:relative; } +.items-templates{ + display:block; + height:750px; +} .editor-lp{ margin-bottom: 20px; } @@ -5629,6 +5633,10 @@ a.sessionView { text-align:center; vertical-align:middle; } +#gradebook_list .score{ + font-weight: bold; + color: #8A6E4E; +} #gradebook_list .centered .badge-group { width: auto; } diff --git a/main/document/create_document.php b/main/document/create_document.php index 89e7920bab..8185e36ee9 100755 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -21,15 +21,30 @@ var hide_bar = function() { $("#hide_bar_template").css({"background-image" : \'url("../img/hide2.png")\'}) } +jQuery(document).ready(function(){ + jQuery(".scrollbar-macosx").scrollbar(); +}); + $(document).ready(function() { if ($(window).width() <= 785 ) { hide_bar(); } - $("#doc_form").removeClass( "col-md-8" ).addClass( "col-md-7" ); + $("#hide_bar_template").click(function() { + $("#template_col").toggleClass("hide"); + + if ($("#doc_form").is(".col-md-8")) { + $("#doc_form").removeClass("col-md-8"); + $("#doc_form").addClass("col-md-11"); + } else { + $("#doc_form").removeClass("col-md-11"); + $("#doc_form").addClass("col-md-8"); + } + $("#hide_bar_template").toggleClass("hide_bar_template_not_hide"); + }); CKEDITOR.on("instanceReady", function (e) { @@ -157,7 +172,8 @@ $is_allowed_to_edit = api_is_allowed_to_edit(null, true); $editorConfig = array( 'ToolbarSet' => ($is_allowed_to_edit ? 'Documents' : 'DocumentsStudent'), 'Width' => '100%', - 'Height' => '500', + 'Height' => '400', + 'cols-size' => [2, 10, 0], 'FullPage' => true, 'InDocument' => true, 'CreateDocumentDir' => $relative_url, @@ -226,8 +242,7 @@ $form = new FormValidator( 'create_document', 'post', api_get_self().'?'.api_get_cidreq().'&dir='.Security::remove_XSS(urlencode($dir)).'&selectcat='.$select_cat, - null, - array('class' =>'form-vertical') + null ); // form title @@ -269,9 +284,9 @@ function document_exists($filename) // Add group to the form if ($is_certificate_mode) { - $form->addText('title', get_lang('CertificateName'), true, array('autofocus')); + $form->addText('title', get_lang('CertificateName'), true, array('cols-size' => [2, 10, 0], 'autofocus')); } else { - $form->addText('title', get_lang('Title'), true, array('autofocus')); + $form->addText('title', get_lang('Title'), true, array('cols-size' => [2, 10, 0], 'autofocus')); } // Show read-only box only in groups @@ -282,7 +297,7 @@ $form->addRule('title', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('title', get_lang('FileExists'), 'callback', 'document_exists'); $current_session_id = api_get_session_id(); -$form->addHtmlEditor('content','', true, true, $editorConfig); +$form->addHtmlEditor('content','', true, true, $editorConfig, true); // Comment-field $folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit); @@ -295,8 +310,8 @@ if (!$is_certificate_mode && ) { $folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit); - $parent_select = $form->addElement('select', 'curdirpath', array(null, get_lang('DestinationDirectory'))); - + //$parent_select = $form->addElement('select', 'curdirpath', array(null, get_lang('DestinationDirectory'))); + $parent_select = $form->addSelect('curdirpath', get_lang('DestinationDirectory'),null, array('cols-size' => [2, 10, 0]) ); // Following two conditions copied from document.inc.php::build_directory_selector() $folder_titles = array(); @@ -575,16 +590,18 @@ if ($form->validate()) { Display :: display_header($nameTools, "Doc"); // actions - echo '