kenken999/php
0
1<?php2/**3 * Class for list page with mode ajax4 *5 */6class ListPage_Ajax extends ListPage_Simple7{8 /**9 * Constructor, set initial params10 *11 * @param array $params12 */13 function __construct(&$params)14 {15 // call parent constructor16 ListPage::__construct($params);17 }18 /**19 * Add common assign for ajax mode on list page20 */21 function commonAssign()22 {23 parent::commonAssign();24 25 $this->xt->assign("filterPanelStateClass", "filter-ajaxReloaded");26 }27 28 /**29 * Add common html code for ajax mode on list page30 */31 function addCommonHtml()32 {33 return true;34 }35 36 /**37 * Add common javascript code for ajax mode on list page38 */39 function addCommonJs()40 {41 $this->addJsForGrid();42 }43 44 /**45 * Show page method46 */47 function showPage() {48 global $pagesData;49 50 $this->addControlsJSAndCSS();51 $this->fillSetCntrlMaps();52 53 $this->BeforeShowList();54 55 $this->xt->load_template( $this->templatefile );56 57 $returnJSON = array();58 $returnJSON["success"] = true;59 $returnJSON["idStartFrom"] = $this->flyId;60 $returnJSON["pagesData"] = $pagesData;61 62 $returnJSON["controlsMap"] = $this->controlsHTMLMap;63 $returnJSON["viewControlsMap"] = $this->viewControlsMap;64 $returnJSON["settings"] = $this->jsSettings;65 $returnJSON["cellStyles"] = $this->row_css_rules.$this->cell_css_rules."\n".$this->mobile_css_rules;66 $returnJSON["numberOfRecs"] = $this->numRowsFromSQL;67 $returnJSON["recPerPage"] = $this->pageSize;68 69 if( $this->deleteMessage != '' )70 $returnJSON["usermessage"] = true;71 72 $returnJSON["html"] = $this->xt->fetch_loaded("body");73 74 echo printJSON( $returnJSON );75 exit();76 return;77 }78 79 /**80 * A stub81 */82 function rulePRG() {83 }84}85?>