~quam-plures-core/quam-plures/install_bug_fix

« back to all changes in this revision

Viewing changes to qp_rsc/js/functions.js

  • Committer: EdB
  • Date: 2013-03-08 17:13:49 UTC
  • mfrom: (7657.1.3 qp5_smallstep)
  • Revision ID: 1912webworks@gmail.com-20130308171349-o4x1e211b3cl4syl
quam-plures-core/quam-plures/qp5_smallstep

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
        // First try, if a JavaScript callback is registered to handle this.
189
189
        // E.g. the tinymce_plugin uses registers "wrap_selection_for_itemform_post_content"
190
190
        //      to replace the (non-)selection
191
 
        if( b2evo_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
 
191
        if( app_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
192
192
        {
193
193
                return;
194
194
        }
195
195
        if( window.opener
196
 
                && window.opener.b2evo_Callbacks
197
 
                && ( typeof window.opener.b2evo_Callbacks != "undefined" ) )
 
196
                && window.opener.app_Callbacks
 
197
                && ( typeof window.opener.app_Callbacks != "undefined" ) )
198
198
        { // callback in parent document (e.g. "Files" popup)
199
 
                if( window.opener.b2evo_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
 
199
                if( window.opener.app_Callbacks.trigger_callback( "wrap_selection_for_"+myField.id, hook_params ) )
200
200
                {
201
201
                        return;
202
202
                }
372
372
 * content into a specific element ("itemform_post_content" in this case):
373
373
 *
374
374
 * <code>
375
 
 * if( typeof b2evo_Callbacks == "object" )
 
375
 * if( typeof app_Callbacks == "object" )
376
376
 * { // add a callback, that lets us insert the
377
 
 *   b2evo_Callbacks.register_callback( "wrap_selection_for_itemform_post_content", function(value) {
 
377
 *   app_Callbacks.register_callback( "wrap_selection_for_itemform_post_content", function(value) {
378
378
 *       tinyMCE.execCommand( "mceInsertRawHTML", false, value );
379
379
 *       return true;
380
380
 *     } );
384
384
 * and others (e.g. the smilies_plugin or the youtube_plugin) should first try to use this
385
385
 * callback to insert the HTML:
386
386
 *
387
 
 * if( typeof b2evo_Callbacks == 'object' )
 
387
 * if( typeof app_Callbacks == 'object' )
388
388
 * { // see if there's a callback registered that should handle this:
389
 
 *   if( b2evo_Callbacks.trigger_callback("wrap_selection_for_"+app_Canvas.id, tag) )
 
389
 *   if( app_Callbacks.trigger_callback("wrap_selection_for_"+app_Canvas.id, tag) )
390
390
 *   {
391
391
 *     return;
392
392
 *   }
393
393
 * }
394
394
 */
395
 
function b2evo_Callbacks() {
 
395
function app_Callbacks() {
396
396
        this.eventHandlers = new Array();
397
397
};
398
398
 
399
 
b2evo_Callbacks.prototype = {
 
399
app_Callbacks.prototype = {
400
400
        register_callback : function(event, f) {
401
401
                if( typeof this.eventHandlers[event] == "undefined" )
402
402
                {
444
444
        }
445
445
};
446
446
 
447
 
var b2evo_Callbacks = new b2evo_Callbacks();
 
447
var app_Callbacks = new app_Callbacks();