コード例 #1
0
 protected function registerModuleClassNameChangeScript()
 {
     $moduleClassNameId = get_class($this->model) . '[moduleClassName]';
     Yii::app()->clientScript->registerScript('moduleForReportChangeScript', "\n                \$('input:radio[name=\"" . $moduleClassNameId . "\"]').live('change', function()\n                    {\n                        \$('#FiltersForReportWizardView').find('.dynamic-rows').find('ul:first').find('li').remove();\n                        \$('#FiltersTreeArea').html('');\n                        \$('." . FiltersForReportWizardView::getZeroComponentsClassName() . "').show();\n                        rebuildReportFiltersAttributeRowNumbersAndStructureInput('FiltersForReportWizardView');\n                        \$('#DisplayAttributesForReportWizardView').find('.dynamic-rows').find('ul:first').find('li').remove();\n                        \$('#DisplayAttributesTreeArea').html('');\n                        \$('." . DisplayAttributesForReportWizardView::getZeroComponentsClassName() . "').show();\n                        " . $this->registerModuleClassNameChangeScriptExtraPart() . "\n                    }\n                );\n            ");
 }
コード例 #2
0
 protected function registerClickFlowScript()
 {
     Yii::app()->clientScript->registerScript('clickflow', "\n                \$('#" . ModuleForReportWizardView::getPreviousPageLinkId() . "').unbind('click');\n                \$('#" . ModuleForReportWizardView::getPreviousPageLinkId() . "').bind('click', function()\n                    {\n                        url = document.referrer;\n                        window.location.href = url;\n                        return false;\n                    }\n                );\n                \$('#" . FiltersForReportWizardView::getPreviousPageLinkId() . "').unbind('click');\n                \$('#" . FiltersForReportWizardView::getPreviousPageLinkId() . "').bind('click', function()\n                    {\n                        \$('#" . static::getValidationScenarioInputId() . "').val('" . ReportWizardForm::MODULE_VALIDATION_SCENARIO . "');\n                        \$('#" . WizardActiveForm::makeErrorsSummaryId(static::getFormId()) . "').hide();\n                        \$('#ModuleForReportWizardView').show();\n                        \$('#FiltersForReportWizardView').hide();\n                        \$('.StepsAndProgressBarForWizardView').find('.progress-bar').width('20%');\n                        \$('.StepsAndProgressBarForWizardView').find('.current-step').removeClass('current-step').prev().addClass('current-step');\n                        return false;\n                    }\n                );\n                \$('#" . DisplayAttributesForReportWizardView::getPreviousPageLinkId() . "').unbind('click');\n                \$('#" . DisplayAttributesForReportWizardView::getPreviousPageLinkId() . "').bind('click', function()\n                    {\n                        \$('#" . static::getValidationScenarioInputId() . "').val('" . ReportWizardForm::FILTERS_VALIDATION_SCENARIO . "');\n                        \$('#FiltersForReportWizardView').show();\n                        \$('#DisplayAttributesForReportWizardView').hide();\n                        \$('.StepsAndProgressBarForWizardView').find('.progress-bar').width('40%');\n                        \$('.StepsAndProgressBarForWizardView').find('.current-step').removeClass('current-step').prev().addClass('current-step');\n                        return false;\n                    }\n                );\n                \$('#" . OrderBysForReportWizardView::getPreviousPageLinkId() . "').unbind('click');\n                \$('#" . OrderBysForReportWizardView::getPreviousPageLinkId() . "').bind('click', function()\n                    {\n                        \$('#" . static::getValidationScenarioInputId() . "').val('" . ReportWizardForm::DISPLAY_ATTRIBUTES_VALIDATION_SCENARIO . "');\n                        \$('#DisplayAttributesForReportWizardView').show();\n                        \$('#OrderBysForReportWizardView').hide();\n                        \$('.StepsAndProgressBarForWizardView').find('.progress-bar').width('60%');\n                        \$('.StepsAndProgressBarForWizardView').find('.current-step').removeClass('current-step').prev().addClass('current-step');\n                        return false;\n                    }\n                );\n                \$('#" . GeneralDataForReportWizardView::getPreviousPageLinkId() . "').unbind('click');\n                \$('#" . GeneralDataForReportWizardView::getPreviousPageLinkId() . "').bind('click', function()\n                    {\n                        \$('#" . static::getValidationScenarioInputId() . "').val('" . ReportWizardForm::ORDER_BYS_VALIDATION_SCENARIO . "');\n                        \$('#OrderBysForReportWizardView').show();\n                        \$('#GeneralDataForReportWizardView').hide();\n                        \$('.StepsAndProgressBarForWizardView').find('.progress-bar').width('80%');\n                        \$('.StepsAndProgressBarForWizardView').find('.current-step').removeClass('current-step').prev().addClass('current-step');\n                        return false;\n                    }\n                );\n            ");
 }