-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from spekary/master
bugfix-AjaxTextUpdate
- Loading branch information
Showing
5 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
/** | ||
* Called by the ModelConnector Designer to create a list of controls appropriate for the given database field type. | ||
* The control will be available in the list of controls that appear in ModelConnector desginer dialog | ||
* in the ControlClass entry. | ||
*/ | ||
|
||
$controls[QControlCategoryType::Blob][] = 'QCubed\Plugin\QCKEditor'; | ||
$controls[QControlCategoryType::Text][] = 'QCubed\Plugin\QCKEditor'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
// CKEditor Setup Functions | ||
|
||
// Must be path to ckeditor relative to DOCROOT | ||
var CKEDITOR_BASEPATH = qc.baseDir + "/vendor/ckeditor/ckeditor/"; | ||
// Must be path to ckeditor relative to DOCROOT | ||
var CKEDITOR_BASEPATH = qc.baseDir + "/vendor/ckeditor/ckeditor/"; | ||
|
||
// Insert a custom startup function into qcubed to help us retrieve data during ajax calls. | ||
qcubed.qckeditor = function (inst, formId, controlId, customReadyFunc) { | ||
// We need to do this on the qposting event because blur and change are delayed and fire after button events. | ||
$j('#' + formId).on('qposting', function() { | ||
if (inst.checkDirty()) { // provided by ckeditor | ||
// This works because the jquery adapter provides a .val() function, which is what qcubed.js uses | ||
// We could also call qcubed.setAdditionalPostVar here | ||
$j('#' + controlId).change(); | ||
} | ||
}); | ||
|
||
if (customReadyFunc) { | ||
customReadyFunc.call(inst, formId, controlId); | ||
} | ||
}; |