[svn r16628] fix a bug with default template (it was loaded when editing a doc)

skala
Eric Marguin 17 years ago
parent 6e5302f54f
commit d2bb52723a
  1. 5
      main/document/create_document.php
  2. 1
      main/inc/lib/fckeditor/editor/dialog/fck_template.html

@ -1,5 +1,5 @@
<?php <?php
// $Id: create_document.php 16555 2008-10-17 10:29:14Z elixir_inter $ // $Id: create_document.php 16628 2008-10-27 16:01:12Z elixir_inter $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -57,6 +57,7 @@ function InnerDialogLoaded()
var temp=false; var temp=false;
var temp2=false; var temp2=false;
var use_document_title='.api_get_setting('use_document_title').'; var use_document_title='.api_get_setting('use_document_title').';
var load_default_template = true;
function launch_templates() function launch_templates()
{ {
@ -68,7 +69,7 @@ function InnerDialogLoaded()
function FCKeditor_OnComplete( editorInstance ) function FCKeditor_OnComplete( editorInstance )
{ {
editorInstance.Events.AttachEvent( \'OnSelectionChange\', check_for_title ) ; editorInstance.Events.AttachEvent( \'OnSelectionChange\', check_for_title ) ;
document.getElementById(\'frmModel\').innerHTML = "<iframe height=950px; width=97%; frameborder=0 src=\''.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/fckdialogframe.html \'>"; document.getElementById(\'frmModel\').innerHTML = "<iframe height=950px; width=97%; id=\"template_iframe\" frameborder=0 src=\''.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/fckdialogframe.html \'>";
} }
function check_for_title() function check_for_title()

@ -73,6 +73,7 @@ window.onload = function()
LoadTemplatesXml() ; LoadTemplatesXml() ;
// select first by default (Dokeos customization) // select first by default (Dokeos customization)
if(window.top.load_default_template==true)
SelectTemplate(0); SelectTemplate(0);
} }

Loading…
Cancel
Save