Juan Carlos Raña 14 年之前
父节点
当前提交
6d909619d0

+ 9 - 1
main/inc/lib/fckeditor/toolbars/default/documents.php

@@ -7,13 +7,21 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','FitWindow','PasteWord','-','Undo','Redo'),
 	array('Link','Unlink','Anchor','Glossary'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 	array('Table','SpecialChar'),
-	array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList','-','Source'),
+	array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList','-',$VSpellCheck,'Source'),
 	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),

+ 9 - 1
main/inc/lib/fckeditor/toolbars/default/wiki.php

@@ -7,6 +7,14 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 	array('FitWindow','Save','NewPage','Templates','PageBreak','Preview','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'),
@@ -15,7 +23,7 @@ $config['ToolbarSets']['Normal'] = array(
 	array('Table','Rule','Smiley','SpecialChar','googlemaps'),
 	array('FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
-	array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
+	array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor', $VSpellCheck),
 	array('Source')
 );
 

+ 4 - 1
main/install/db_main.sql

@@ -771,6 +771,7 @@ VALUES
 ('sso_authentication_unauth_uri',NULL,'textfield','Security','/?q=logout','SSOServerUnAuthURITitle','SSOServerUnAuthURIComment',NULL,NULL,1),
 ('sso_authentication_protocol',NULL,'radio','Security','http://','SSOServerProtocolTitle','SSOServerProtocolComment',NULL,NULL,1),
 ('enabled_wiris',NULL,'radio','Editor','false','EnabledWirisTitle','EnabledWirisComment',NULL,NULL, 0),
+('allow_spellcheck',NULL,'radio','Editor','false','AllowSpellCheckTitle','AllowSpellCheckComment',NULL,NULL, 0),
 ('chamilo_database_version', NULL, 'textfield', NULL, '1.8.8.12885', 'DokeosDatabaseVersion', '', NULL, NULL, 0);
 
 
@@ -995,7 +996,9 @@ VALUES
 ('sso_authentication_protocol', 'http://', 'http://'),
 ('sso_authentication_protocol', 'https://', 'https://'),
 ('enabled_wiris','true','Yes'),
-('enabled_wiris','false','No');
+('enabled_wiris','false','No'),
+('allow_spellcheck','true','Yes'),
+('allow_spellcheck','false','No');
 
 UNLOCK TABLES;
 

+ 4 - 0
main/install/migrate-db-1.8.7-1.8.8-pre.sql

@@ -55,6 +55,10 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'false', 'No');
 
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_spellcheck',NULL,'radio','Editor','false','AllowSpellCheckTitle','AllowSpellCheckComment',NULL,NULL, 0);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_spellcheck', 'true', 'Yes');
+INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_spellcheck', 'false', 'No');
+
 -- xxSTATSxx
 ALTER TABLE track_e_exercices ADD COLUMN orig_lp_item_view_id INT NOT NULL DEFAULT 0;
 -- xxUSERxx