function initJS($blockContent) { $script = ""; $script .= parent::initJS($blockContent); $script .= "\nPHOCOA.namespace('widgets.{$this->id}.PhocoaDialog');\nPHOCOA.widgets.{$this->id}.PhocoaDialog.queueProps = function(o) {\n PHOCOA.widgets.{$this->id}.Panel.queueProps(o); // queue parent props\n // alert('id={$this->id}: queue PhocoaDialog props');\n // queue PhocoaDialog props here\n};\nPHOCOA.widgets.{$this->id}.PhocoaDialog.init = function() {\n PHOCOA.widgets.{$this->id}.Panel.init(); // init parent\n var phocoaDialog = PHOCOA.runtime.getObject('{$this->id}');\n phocoaDialog.cfg.setProperty('deferModuleViewLoading', " . ($this->deferModuleViewLoading ? 'true' : 'false') . ");\n phocoaDialog.cfg.setProperty('cacheModuleView', " . ($this->cacheModuleView ? 'true' : 'false') . ");\n phocoaDialog.cfg.setProperty('moduleViewInvocationPath', " . ($this->moduleView ? "'" . WWW_ROOT . '/' . $this->moduleView->invocationPath() . "'" : 'null') . ");\n " . ($this->inline ? "phocoaDialog.element.setStyle({position:'static'});" : null) . "\n};\n" . (get_class($this) == 'WFYAHOO_widget_PhocoaDialog' ? "PHOCOA.widgets.{$this->id}.init = function() { PHOCOA.widgets.{$this->id}.PhocoaDialog.init(); };" : NULL); return $script; }
function initJS($blockContent) { $script .= parent::initJS($blockContent); $script .= "\nPHOCOA.namespace('widgets.{$this->id}.Dialog');\nPHOCOA.widgets.{$this->id}.Dialog.queueProps = function(o) {\n PHOCOA.widgets.{$this->id}.Panel.queueProps(o); // queue parent props\n // alert('id={$this->id}: queue Dialog props');\n // queue Dialog props here\n " . ($buttonsJS ? "o.cfg.queueProperty(\"buttons\", {$buttonsJS});" : NULL) . "\n};\nPHOCOA.widgets.{$this->id}.Dialog.init = function() {\n PHOCOA.widgets.{$this->id}.Panel.init(); // init parent\n var dialog = PHOCOA.runtime.getObject('{$this->id}');\n dialog.cfg.setProperty('postmethod', '{$this->postmethod}');\n " . ($this->callbackSuccess ? "dialog.callback.success = {$this->callbackSuccess};" : NULL) . "\n " . ($this->callbackFailure ? "dialog.callback.failure = {$this->callbackFailure};" : NULL) . "\n};\n" . (get_class($this) == 'WFYAHOO_widget_Dialog' ? "PHOCOA.widgets.{$this->id}.init = function() { PHOCOA.widgets.{$this->id}.Dialog.init(); };" : NULL); return $script; }