Explorar o código

rename functions in TableAjax

Piotr Labudda %!s(int64=7) %!d(string=hai) anos
pai
achega
642016ef2b
Modificáronse 1 ficheiros con 10 adicións e 10 borrados
  1. 10 10
      SE/se-lib/TableAjax.php.TableAjax.js

+ 10 - 10
SE/se-lib/TableAjax.php.TableAjax.js

@@ -806,7 +806,7 @@ var TableAjax = function() {
 		var stateObjectFilter = createTableFiltersStateObject(priv.options.filterInit || {});
 		priv.options.filterStore = stateObjectFilter.store;
 		priv.options.filterActions = stateObjectFilter.actions;
-		priv.options.filterMapStoreToState = function (curFilterState) {
+		priv.filter_mapStoreToState = function (curFilterState) {
 			// var curFilterState = store.getState()
 			return {
 				_filterQuery: p5Utils__mapToQueryWithKeyPrefix(curFilterState.filter, 'f_'),
@@ -815,14 +815,14 @@ var TableAjax = function() {
 				_currSortFlip: curFilterState.currSortFlip
 			};
 		};
-		priv.options.filterGetFilterQuery = function () {
+		priv.filter_getFilterQuery = function () {
 			return [
 				_state._filterQuery,
 				_state._specialFilterQuery,
 				_state._forceFilterQuery
 			].filter(Boolean).join('&');
 		};
-		priv.options.filterGetFullFilterQuery = function () {
+		priv.filter_getFullFilterQuery = function () {
 			return [
 				'currSortCol=' + ( _state._currSortCol || ''),
 				'currSortFlip=' + ( _state._currSortFlip ? "desc" : "asc" ),
@@ -831,10 +831,10 @@ var TableAjax = function() {
 				_state._forceFilterQuery
 			].filter(Boolean).join('&');
 		};
-		_state = Object.assign(_state, priv.options.filterMapStoreToState(priv.options.filterStore.getState()));
+		_state = Object.assign(_state, priv.filter_mapStoreToState(priv.options.filterStore.getState()));
 		DBG && console.log('TODO:INIT: ', { _state });
 		priv.options.filterStore.subscribe(function () {
-			var curState = priv.options.filterMapStoreToState(priv.options.filterStore.getState());
+			var curState = priv.filter_mapStoreToState(priv.options.filterStore.getState());
 			var needFetchData = (
 				curState._filterQuery !== _state._filterQuery
 				|| curState._specialFilterQuery !== _state._specialFilterQuery
@@ -864,8 +864,8 @@ var TableAjax = function() {
 						store: priv.options.selectedStore,
 						actions: priv.options.selectedActions,
 						onSelectAllMatching: function () {
-							// TODO: priv.options.filterMapStoreToState(priv.options.filterStore.getState())
-							var filterQuery = priv.options.filterGetFilterQuery();
+							// TODO: priv.filter_mapStoreToState(priv.options.filterStore.getState())
+							var filterQuery = priv.filter_getFilterQuery();
 							// var filterQuery = '';
 							// filterQuery += (_state._filterQuery) ? "&" + _state._filterQuery : "";
 							// filterQuery += (_state._specialFilterQuery) ? "&" + _state._specialFilterQuery : "";
@@ -2296,7 +2296,7 @@ var TableAjax = function() {
 		exportUrl += '&' + 'flds=' + exportFields.join(',');
 		exportUrl += '&' + 'sortCol=' + (_state._currSortCol || '');
 		exportUrl += '&' + 'sortDir=' + (_state._currSortFlip ? "desc" : "asc");
-		exportUrl += '&' + priv.options.filterGetFilterQuery();
+		exportUrl += '&' + priv.filter_getFilterQuery();
 
 		node.attr('href', exportUrl);
 	};
@@ -2329,7 +2329,7 @@ var TableAjax = function() {
 
 		if (priv.options.debug || DBG) console.log(p5Utils__format('requesting data from url:{0}', [priv.options.url]));
 
-		var initUrlAdd = '&' + priv.options.filterGetFullFilterQuery();
+		var initUrlAdd = '&' + priv.filter_getFullFilterQuery();
 		DBG && console.warn('DBG:update... - FETCH_DATA', { initUrlAdd, '_state._filterQuery': _state._filterQuery, '_state._specialFilterQuery': _state._specialFilterQuery, _state });
 
 		// p5UI__notifyAjaxCallback({type: 'info', msg: 'pobieranie danych (init) ...'});
@@ -3386,7 +3386,7 @@ var TableAjax = function() {
 		urlAdd += '&' + 'page=' + page;
 		urlAdd += '&' + 'pageSize=' + (pageSize || priv.options.pageSize);
 		DBG && console.log('DBG::loadPage... FETCH_DATA', { '_state._filterQuery': _state._filterQuery, '_state._specialFilterQuery': _state._specialFilterQuery, _state });
-		urlAdd += '&' + priv.options.filterGetFullFilterQuery();
+		urlAdd += '&' + priv.filter_getFullFilterQuery();
 
 		_uiNode$Table.parent().parent().addClass('AjaxTable-loading');