Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ckeditor font plugin only where needed #229

Merged
merged 11 commits into from
May 24, 2017
21 changes: 21 additions & 0 deletions js/ckeditor-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

function placeCkEditorIn(nodeId)
{
CKEDITOR.replace(nodeId, { extraPlugins: 'font' } );
CKEDITOR.on('instanceReady', function(ev)
{
var tags = ['p', 'ol', 'ul', 'li']; // etc.

for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(
tags[key],
{
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false,
});
}
});
}
21 changes: 3 additions & 18 deletions modules/candidates/SendEmail.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php /* $Id: SendEmail.tpl 3078 2007-09-21 20:25:28Z will $ */ ?>
<?php TemplateUtility::printHeader('Candidates', array('vendor/ckeditor/ckeditor/ckeditor.js', 'modules/candidates/validator.js', 'js/searchSaved.js', 'js/sweetTitles.js', 'js/searchAdvanced.js', 'js/highlightrows.js', 'js/export.js')); ?>
<?php TemplateUtility::printHeader('Candidates', array('vendor/ckeditor/ckeditor/ckeditor.js', 'js/ckeditor-manager.js', 'modules/candidates/validator.js', 'js/searchSaved.js', 'js/sweetTitles.js', 'js/searchAdvanced.js', 'js/highlightrows.js', 'js/export.js')); ?>
<?php TemplateUtility::printHeaderBlock(); ?>
<?php TemplateUtility::printTabs($this->active); ?>
<div id="main">
Expand Down Expand Up @@ -107,23 +107,8 @@
document.emailForm.emailSubject.focus();
//added the code below for the ckeditor html box - Jamin 2-19-2010
//adjusted code to remove or prevent extra breaks in email - Jamin 2-23-2010
CKEDITOR.replace( 'emailBody' );
CKEDITOR.on('instanceReady', function(ev)
{
var tags = ['p', 'ol', 'ul', 'li']; // etc.

for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(tags[key],
{
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false,
});
}
});
</script>
placeCkEditorIn('emailBody');
</script>

</td>
</tr>
Expand Down
20 changes: 2 additions & 18 deletions modules/joborders/Add.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php /* $Id: Add.tpl 3810 2007-12-05 19:13:25Z brian $ */ ?>
<?php TemplateUtility::printHeader('Job Orders', array('modules/joborders/validator.js', 'js/company.js', 'js/sweetTitles.js', 'js/suggest.js', 'js/joborder.js', 'js/lib.js', 'js/listEditor.js', 'vendor/ckeditor/ckeditor/ckeditor.js')); ?>
<?php TemplateUtility::printHeader('Job Orders', array('modules/joborders/validator.js', 'js/company.js', 'js/sweetTitles.js', 'js/suggest.js', 'js/joborder.js', 'js/lib.js', 'js/listEditor.js', 'vendor/ckeditor/ckeditor/ckeditor.js', 'js/ckeditor-manager.js')); ?>
<?php TemplateUtility::printHeaderBlock(); ?>
<?php TemplateUtility::printTabs($this->active, $this->subActive); ?>
<div id="main">
Expand Down Expand Up @@ -308,23 +308,7 @@
</form>

<script type="text/javascript">
CKEDITOR.replace( 'description' );
CKEDITOR.on('instanceReady', function(ev)
{
var tags = ['p', 'ol', 'ul', 'li']; // etc.

for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(
tags[key],
{
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false,
});
}
});
placeCkEditorIn('description');
</script>

<script type="text/javascript">
Expand Down
20 changes: 2 additions & 18 deletions modules/joborders/Edit.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php /* $Id: Edit.tpl 3810 2007-12-05 19:13:25Z brian $ */ ?>
<?php TemplateUtility::printHeader('Job Orders', array('modules/joborders/validator.js', 'js/company.js', 'js/sweetTitles.js', 'js/suggest.js', 'js/joborder.js', 'js/lib.js', 'js/listEditor.js', 'vendor/ckeditor/ckeditor/ckeditor.js')); ?>
<?php TemplateUtility::printHeader('Job Orders', array('modules/joborders/validator.js', 'js/company.js', 'js/sweetTitles.js', 'js/suggest.js', 'js/joborder.js', 'js/lib.js', 'js/listEditor.js', 'vendor/ckeditor/ckeditor/ckeditor.js', 'js/ckeditor-manager.js')); ?>
<?php TemplateUtility::printHeaderBlock(); ?>
<?php TemplateUtility::printTabs($this->active); ?>
<div id="main">
Expand Down Expand Up @@ -330,23 +330,7 @@
</form>

<script type="text/javascript">
CKEDITOR.replace( 'description' );
CKEDITOR.on('instanceReady', function(ev)
{
var tags = ['p', 'ol', 'ul', 'li']; // etc.

for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(
tags[key],
{
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false,
});
}
});
placeCkEditorIn('description');
</script>

<script type="text/javascript">
Expand Down