Exemple #1
0
 public function renderSummary()
 {
     if (AuxLib::getLayoutType() === 'responsive' && $this->enableResponsiveTitleBar) {
         Yii::app()->clientScript->registerCss('mobileDropdownCss', "\n            .grid-view .mobile-dropdown-button {\n                float: right;\n                display: block;\n                margin-top: -24px;\n                margin-right: 8px;\n            }\n        ");
         $afterUpdateJSString = "\n            ;(function () {\n            var grid = \$('#" . $this->id . "');\n            \$('#" . $this->namespacePrefix . "-mobile-dropdown').unbind ('click.mobileDropdownScript')\n                .bind ('click.mobileDropdownScript', function () {\n                    if (grid.hasClass ('show-top-buttons')) {\n                        grid.find ('.page-title').css ({ height: '' });\n                        grid.removeClass ('show-top-buttons');\n                    } else {\n                        grid.find ('.page-title').animate ({ height: '68px' }, 300);\n                        grid.addClass ('show-top-buttons');\n                        \$(window).one ('resize', function () {\n                            grid.find ('.page-title').css ({ height: '' });\n                            grid.removeClass ('show-top-buttons');\n                        });\n                    }\n                });\n            }) ();\n        ";
         $this->addToAfterAjaxUpdate($afterUpdateJSString);
         echo '<div id="' . $this->namespacePrefix . '-mobile-dropdown" class="mobile-dropdown-button">
             <div class="x2-bar"></div>
             <div class="x2-bar"></div>
             <div class="x2-bar"></div>
         </div>';
     }
     parent::renderSummary();
 }
 /**
  * Renders the summary-clone changer. When the summary changes, it should update the summary-clone in the
  * searchview if it is available.  The ModalListView does not rely on this because it does not run
  * jquery.globalEval on ajax changes such as pagination.  It instead will call processListViewSummaryClone which
  * is decleared @see ModalListView->getCGridViewAfterAjaxUpdate()
  *
  */
 public function renderSummary()
 {
     parent::renderSummary();
     Yii::app()->clientScript->registerScript($this->id . '_listViewSummaryChangeScript', '
             processListViewSummaryClone("' . $this->id . '", "' . $this->summaryCssClass . '", "' . $this->summaryCloneId . '");
         ');
 }
Exemple #3
0
 /**
  * Renders the summary-clone changer. When the summary changes, it should update the summary-clone in the
  * searchview if it is available.  The ModalListView does not rely on this because it does not run
  * jquery.globalEval on ajax changes such as pagination.  It instead will call processListViewSummaryClone which
  * is decleared @see ModalListView->getCGridViewAfterAjaxUpdate()
  *
  */
 public function renderSummary()
 {
     parent::renderSummary();
     Yii::app()->clientScript->registerScript('listViewSummaryChangeScript', "\n            processListViewSummaryClone('" . $this->id . "', '" . $this->summaryCssClass . "');\n            ");
 }