Bug #24581 ยป 17045.diff

Administrator Admin, 2011-01-20 22:35

View differences:

typo3/js/livesearch.js (working copy)
31 31
	autoSelect: false,
32 32
	ctCls: 'live-search-results',
33 33
	dataProvider: null,
34
	dbListUrl : 'id=0&search_levels=4&search_field=',
34
	searchResultsPid : 0,
35 35
	displayField: 'title',
36 36
	emptyText: null,
37 37
	enableKeyEvents: true,
......
99 99
				if (this.dataReader.jsonData.pageJump != '') {
100 100
					jump(this.dataReader.jsonData.pageJump, 'web_list', 'web');
101 101
				} else {
102
					TYPO3.ModuleMenu.App.showModule('web_list', this.dbListUrl + this.getValue());
102
					TYPO3.ModuleMenu.App.showModule('web_list', this.getSearchResultsUrl(this.getValue()));
103 103
				}
104 104
			}
105 105
		}
......
170 170
							// go to db_list.php and search for given search value
171 171
							// @todo the current selected page ID from the page tree is required, also we need the
172 172
							// values of $BE_USER->returnWebmounts() to search only during the allowed pages
173
						TYPO3.ModuleMenu.App.showModule('web_list', this.dbListUrl + this.getValue());
173
						TYPO3.ModuleMenu.App.showModule('web_list', this.getSearchResultsUrl(this.getValue()));
174 174
						this.collapse();
175 175
					}
176 176
				}
......
270 270
		TYPO3.BackendLiveSearch.superclass.reset.apply(this, arguments);
271 271
	},
272 272

  
273
	getSearchResultsUrl : function(searchTerm) {
274
		return 'id=' + this.searchResultsPid + '&search_levels=4&search_field=' + searchTerm;
275
	},
276

  
273 277
	addIframeListeners : function () {
274 278
		// Add an event handler to each iframe, closing the search window when there's a click inside the iframe
275 279
		// @todo Is there a cleaner way to handle this?
......
306 310
		helpTitle: TYPO3.LLL.liveSearch.helpTitle,
307 311
		emptyText: TYPO3.LLL.liveSearch.emptyText,
308 312
		loadingText: TYPO3.LLL.liveSearch.loadingText,
309
		listEmptyText: TYPO3.LLL.liveSearch.listEmptyText
313
		listEmptyText: TYPO3.LLL.liveSearch.listEmptyText,
314
		searchResultsPid: TYPO3.configuration.firstWebmountPid
310 315
	});
311 316

  
312 317
	TYPO3LiveSearch.applyToMarkup(Ext.get('live-search-box'));
typo3/backend.php (working copy)
599 599
			),
600 600
			'FileUpload' => array(
601 601
				'maxFileSize' => t3lib_div::getMaxUploadFileSize()
602
			)
602
			),
603
			'firstWebmountPid' => intval($GLOBALS['WEBMOUNTS'][0])
603 604
		);
604 605
		if ($GLOBALS['LANG']->charSet !== 'utf-8') {
605 606
			$t3Configuration['username'] = $GLOBALS['LANG']->csConvObj->conv($t3Configuration['username'], $GLOBALS['LANG']->charSet, 'utf-8');
    (1-1/1)