From 889cfa40420db12fc15beddc8d3f25076ee69fc3 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 12 Feb 2015 15:54:06 +0100 Subject: [PATCH] Chamilo files changes due ckeditor integration. BT#8968 --- main/css/base.css | 40 +++++++++++++++++++++-- main/document/create_document.php | 9 +++-- main/document/edit_document.php | 39 ++++------------------ main/exercice/calculated_answer.class.php | 19 ++++++----- main/exercice/exercise.lib.php | 15 +++------ main/exercice/fill_blanks.class.php | 20 ++++-------- 6 files changed, 73 insertions(+), 69 deletions(-) diff --git a/main/css/base.css b/main/css/base.css index 36504f10c1..8c604b5469 100755 --- a/main/css/base.css +++ b/main/css/base.css @@ -3540,7 +3540,6 @@ form .formw .freeze { margin-bottom: .5em; } - /* **************************************************** END SKILL **************************************************** */ @@ -3660,7 +3659,6 @@ form .formw .freeze { } /* END SCORM CSS BASE*/ - .skill_root { box-shadow: 2px 2px 19px #aaa; -o-box-shadow: 2px 2px 19px #aaa; @@ -3715,6 +3713,44 @@ form .formw .freeze { position:relative; } +/* **************************************************** + END SKILL + **************************************************** */ + +/* list template document */ +#frmModel{ + height: 700px; + min-height: 100%; + overflow-y: scroll; + overflow-x: hidden +} +#frmModel ul{ + list-style: none; + margin: 0; + padding: 0 .5em 0 1em; +} +#frmModel ul li:hover{ + background-color: #FAFAFA; + border: 1px solid #F2F2F2; +} +#frmModel ul li{ + text-align: center; + padding-top: 1em; + padding-bottom: 1em; +} +#frmModel ul li .title, #frmModel ul li .description{ + padding-top: .5em; + padding-bottom: .5em; + width: auto; +} +.lp-add-item{ + display:block; + height:890px; + width:250px; + position:relative; +} +/* end list template document */ + .done_window { background-color: #73982C; } diff --git a/main/document/create_document.php b/main/document/create_document.php index 2e2711b973..b288ee3dc0 100755 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -39,6 +39,10 @@ $(document).ready(function() { $(this).css("background-image", \'url("../img/hide0.png")\'); } ); + + CKEDITOR.on("instanceReady", function (e) { + showTemplates(); + }); }); function InnerDialogLoaded() { @@ -223,7 +227,6 @@ if ($is_certificate_mode) { $dir = '/certificates/'; } -// Configuration for the FCKEDITOR $doc_tree = explode('/', $dir); $count_dir = count($doc_tree) -2; // "2" because at the begin and end there are 2 "/" @@ -673,8 +676,8 @@ if ($form->validate()) { } // HTML-editor echo '
-
-
+
+
diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 4bf2971afa..0e41af4419 100755 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -57,39 +57,12 @@ $(document).ready(function() { $(this).css("background-image", \'url("../img/hide0.png")\'); } ); -}); - -function InnerDialogLoaded() { - /* - var B=new window.frames[0].FCKToolbarButton(\'Templates\',window.frames[0].FCKLang.Templates); - return B.ClickFrame(); - */ - var isIE = (navigator.appVersion.indexOf(\'MSIE\') != -1) ? true : false ; - var EditorFrame = null ; - if ( !isIE ) { - EditorFrame = window.frames[0] ; - } else { - // For this dynamic page window.frames[0] enumerates frames in a different order in IE. - // We need a sure method to locate the frame that contains the online editor. - for ( var i = 0, n = window.frames.length ; i < n ; i++ ) { - if ( window.frames[i].location.toString().indexOf(\'InstanceName=content\') != -1 ) { - EditorFrame = window.frames[i] ; - } - } - } - - if ( !EditorFrame ) { - return null ; - } - - var B = new EditorFrame.FCKToolbarButton(\'Templates\', EditorFrame.FCKLang.Templates); - return B.ClickFrame(); -}; + CKEDITOR.on("instanceReady", function (e) { + showTemplates(); + }); +}); -function FCKeditor_OnComplete( editorInstance) { - document.getElementById(\'frmModel\').innerHTML = "