Callback called after template is loaded inside the DOM
@param {Object} success Status about the loadTemplate action
@param {Object} args Contains params about the page
@protected
969386
function (success, args) {
            if (this._navigationManager) {
                this._navigationManager.update(args.pageRequest);
            }

            var browser = ariaCoreBrowser;
            if (browser.isOldIE && browser.majorVersion < 8) {
                ariaCoreTimer.addCallback({
                    fn : function () {
                        args.div.style.zoom = 0;
                        args.div.style.zoom = 1;
                        args.div = null;
                    },
                    scope : this,
                    delay : 0
                });
            }

            this._isTemplateLoaded = true;

            if (this._animationsManager && args.pageConfig.animation) {
                this._animationsManager.$on({
                    "animationend" : {
                        fn : this._pageTransitionComplete,
                        args : args
                    },
                    scope : this
                });
                this._animationsManager.startPageTransition(this._getContainer(false), this._getContainer(), args.pageConfig.animation);
            } else {
                this._finishDisplay(args);
            }
        }
1225721
public static void renderExcel(Object... args) {
		String templateName = null;
		final Http.Request request = Http.Request.current();

		if (args.length > 0
				&& args[0] instanceof String
				&& LocalvariablesNamesEnhancer.LocalVariablesNamesTracer
						.getAllLocalVariableNames(args[0]).isEmpty()) {
			templateName = args[0].toString();
		} else {
			templateName = request.action.replace(".", "/");
		}
		if (templateName.startsWith("@")) {
			templateName = templateName.substring(1);
			if (!templateName.contains(".")) {
				templateName = request.controller + "." + templateName;
			}
			templateName = templateName.replace(".", "/");
		}
		renderTemplateAsExcel(templateName, args);
	}
890285
function () {
            var tplDiv = this._subTplDiv; // may be null at this time
            if (tplDiv) {
                tplDiv.className = "xTplContent"; // remove the loading indicator
                ariaUtilsDom.replaceHTML(tplDiv, "#ERROR WHILE LOADING TEMPLATE#");
            }
            this._deleteTplcfg();
            this.$callback(this.tplLoadCallback, {
                success : false
            });
        }
160397
function done(context, template) {
      // Store the rendered template someplace so it can be re-assignable.
      var rendered;

      // Trigger this once the render method has completed.
      manager.callback = function(rendered) {
        // Clean up asynchronous manager properties.
        delete manager.isAsync;
        delete manager.callback;

        root._applyTemplate(rendered, manager, def);
      };

      // Ensure the cache is up-to-date.
      LayoutManager.cache(url, template);

      // Render the View into the el property.
      if (template) {
        rendered = root.renderTemplate.call(root, template, context);
      }

      // If the function was synchronous, continue execution.
      if (!manager.isAsync) {
        root._applyTemplate(rendered, manager, def);
      }
    }
1253195
function (res, args) {
            var tplcfg = this._tplcfg;
            if (!tplcfg) {
                // the template may be ready after the widget has been disposed
                // do nothing in this case
                // except disposing the module which has just been created
                if (args.autoDispose) {
                    res.moduleCtrlPrivate.$dispose();
                }
                return;
            }

            var tplDiv = this._subTplDiv; // may be null at this time

            tplcfg.tplDiv = tplDiv;
            tplcfg.div = this._domElt;
            tplcfg.data = this._cfg.data;

            // if a module controller was created, inject it in template initialization
            if (res.moduleCtrl) {
                tplcfg.moduleCtrl = res.moduleCtrl;
            }
            tplcfg.isRootTemplate = false; // a Template Widget is not a root template
            tplcfg.context = this._context;

            if (args.autoDispose) {
                if (tplcfg.toDispose == null) {
                    tplcfg.toDispose = [res.moduleCtrlPrivate];
                } else {
                    tplcfg.toDispose.push(res.moduleCtrlPrivate);
                }
            }

            var tplCtxt = new ariaTemplatesTemplateCtxt();
            this.subTplCtxt = tplCtxt;
            tplCtxt.parent = this._context;

            var res = tplCtxt.initTemplate(tplcfg);

            if (res) {
                tplCtxt.dataReady(); // data successfully loaded: signal to template through TemplateContext
                // check that tplCtxt was not disposed
                if (tplDiv && tplCtxt._cfg) {
                    // Load the CSS dependencies, the style should be added before the html
                    tplDiv.className = tplCtxt.getCSSClassNames();
                    tplCtxt.$onOnce({
                        "Ready" : this.__innerTplReadyCb,
                        "SectionRefreshed" : {
                            fn : this.__innerTpl1stRefreshed,
                            args : {
                                success : true,
                                templateCtxt : tplCtxt
                            },
                            scope : this
                        },
                        scope : this
                    });
                    tplCtxt.$refresh();
                }
                // don't clean this object, as the template context will do it. Just break reference
                this.tplcfg = null;

            } else {
                tplCtxt.$dispose();
                this.subTplCtxt = null;
                this._errorWhileLoadingTemplate();
            }

            tplDiv = null;
        }
563994
public static function propertyBatchLoadFinishedCallback($success, $results, $operations) {
    $updated_node_ids = implode(', ', $results['nodes_updated']);

    $processed = $results['count_processed'];

    drupal_set_message("Processed $processed nodes. And updated these: [$updated_node_ids] nodes.");
  }
1060711
function loadScript(src, loadedCallback) {
    var script = document.createElement("script");
    script.setAttribute("type", "text/javascript");
    script.setAttribute("src", src);

    // Call the callback when the script is loaded.
    script.onload = loadedCallback;
    script.onreadystatechange = function () {
      if (this.readyState === "complete" || this.readyState === "loaded") {
        loadedCallback();
      }
    };

    head.appendChild(script);
  }
1279231
function (tmpCfg, callback) {
            var div = tmpCfg.div;
            // check if the div is still in the dom
            // (because it could be inside a template which was refreshed, so no longer in the dom)
            if (!ariaUtilsDom.isInDom(div)) {
                this.$callback(callback);
                return;
            }
            var tplWidget = div.__widget;
            Aria.loadTemplate(tmpCfg, function (args) {
                // remap widget content
                if (args.success && tplWidget) {
                    var tplCtxt = args.tplCtxt;
                    var tplCtxtManager = ariaTemplatesTemplateCtxtManager;
                    // TODO: find a cleaner way to do this
                    // as this template is inside a template widget, it is not a root template
                    // (even if we reloaded it with Aria.loadTemplate)
                    // This is necessary for the inspector not to display the template twice:
                    tplCtxtManager.remove(tplCtxt); // remove the template from the list of root templates
                    args.tplCtxt._cfg.isRootTemplate = false; // remove the root template flag
                    tplCtxtManager.add(tplCtxt); // add the template back to the list of templates
                    tplWidget.subTplCtxt = tplCtxt; // add the reference to the template context in the template
                    // widget
                }

                if (callback != null) {
                    this.$callback(callback);
                }
            });
        }
959813
function renderTemplate(templatePath, viewOpts, callback) {
  templateContent(templatePath, function(err, content) {
    if (err) {
      return callback(err, null);
    } else {
      return callback(null, Mustache.to_html(content, viewOpts));
    }
  });
}
463751
function processTemplates(templates) {
	var templateProcessingLog = logger.createTemplateProcessingLog();
	var replacements = Mix.manifest.get();
	for (let template in templates) {
		if (templates.hasOwnProperty(template)) {
			// Copy to target
			fs.copySync(template, templates[template]);
			// Compile
			compileTemplate(
				templates[template],
				replacements,
				templateProcessingLog.addTemplateFileLog(
					template,
					templates[template]
				)
			);
		}
	}
	templateProcessingLog.print();
}
195715
private function getProcessedTemplatePreviewAndOther($result, $args)
    {
        if (empty($args)) {
            $result = $this->getResultIfArgsEmptyForPreviewAndOther($result);
        } else {
            if (isset($args[0])) {
                $field = $args[0];
                //check for correct field
                if ($field == 'template_text' && $this->isStringCompressed($result)) {
                    $result = $this->decompressString($result);
                }
                if ($field == 'template_id') {
                    $this->saveTemplateIdInRegistry($result);
                }
            }
        }

        return $result;
    }
1235531
function Init(arg) {
    array.push.apply(this, arg && (arg.nodeType || /^o/.test(typeof arg)) && !u.isArray(arg) && arg !== null ? [arg] : u.isArray(arg) ? arg : '' + arg === arg ? u.isHtml(arg) ? u.toHtml(arg) : document.querySelectorAll(arg) : undefined);
  }
696667
function(args) {
        args = args || [];
        var that = this;
        var html = '';
        var number = 0;
        this.callbacks = {};


        if (typeof args === 'string') {
            html = args;
            number++;
        } else {
            $.each(args, function(i, val) {

                var id = val.id = val.id || val.value;
                var style = '';
                that.callbacks[id] = val.callback;


                if (val.display === false) {
                    style = ' style="display:none"';
                } else {
                    number++;
                }

                html +=
                    '<button' +
                    ' type="button"' +
                    ' i-id="' + id + '"' +
                    style +
                    (val.disabled ? ' disabled' : '') +
                    (val.autofocus ? ' autofocus class="ui-dialog-autofocus"' : '') +
                    '>' +
                    val.value +
                    '</button>';

                that._$('button')
                    .on('click', '[i-id=' + id + ']', function(event) {
                        var $this = $(this);
                        if (!$this.attr('disabled')) { // IE BUG
                            that._trigger(id);
                        }

                        event.preventDefault();
                    });

            });
        }

        this._$('button').html(html);
        this._$('footer')[number ? 'show' : 'hide']();

        return this;
    }
1319998
function (src, success, error) {
		var s = document.createElement('script');
		s.src = src;
		s.async = true;
		s.onload = function() {
			document.body.removeChild(s);
			success && success();
		};
		s.onerror = function() {
			document.body.removeChild(s);
			error && error();
		};
		document.body.appendChild(s);
	}
1346969
function( arg ) {
            var listItems, listItem, i, len, results;
            var options = _callMethod( this, "option" );
            var searched = arg instanceof $.Event ? arg.target.value : arg;
            var bselect = _callMethod( this, "element" );

            if ( this[ 0 ].disabled ) {
                return this;
            }

            // Avoid searching for nothing
            if ( searched === "" ) {
                _callMethod( this, "clearSearch" );
            }

            if ( !( arg instanceof $.Event ) ) {
                bselect.find( ".bselect-search" ).val( searched );
            }

            // Same search/few chars? We won't search then!
            if (
                ( searched === options.lastSearch ) ||
                ( searched.length < options.minSearchInput )
            ) {
                return;
            }

            // Initialize the result collection
            results = $();

            listItems = bselect.find( "li" ).hide();
            for ( i = 0, len = listItems.length; i < len; i++ ) {
                listItem = listItems[ i ];
                if ( listItem.textContent.toLowerCase().indexOf( searched.toLowerCase() ) > -1 ) {
                    results = results.add( $( listItem ).show() );
                }
            }

            if ( results.length === 0 ) {
                showNoOptionsAvailable( this );
            } else {
                bselect.find( ".bselect-message" ).hide();
            }

            this.trigger( "bselectsearch", [ searched, results ] );

            adjustDropdownHeight( listItems.end() );
            return this;
        }
336368
public static function afterSetupTheme( $callback, $priority = null, $accepted_args = null ) {
		self::action( 'after_setup_theme', $callback, $priority, $accepted_args );
	}
1190337
function load(query, callback) {
      if (!query.length) return callback();

      pagelet.complete(query, function complete(err, results) {
        if (err) return callback();

        callback(results);
      });
    }