<commit_before>/*!
 * ${copyright}
 */

/*global history */
sap.ui.define([
		"sap/ui/documentation/sdk/controller/BaseController",
		"sap/ui/Device"
	], function (BaseController, Device) {
		"use strict";

		return BaseController.extend("sap.ui.documentation.sdk.controller.Controls", {

			/**
			 * Called when the controller is instantiated.
			 * @public
			 */
			onInit: function () {
				// manually call the handler once at startup as device API won't do this for us
				this._onOrientationChange({
					landscape: Device.orientation.landscape
				});
			},

			/**
			 * Called before the view is rendered.
			 * @public
			 */
			onBeforeRendering: function() {
				this._deregisterOrientationChange();
			},

			/**
			 * Called after the view is rendered.
			 * @public
			 */
			onAfterRendering: function() {
				this._registerOrientationChange();
			},

			/**
			 * Called when the controller is destroyed.
			 * @public
			 */
			onExit: function() {
				this._deregisterOrientationChange();
			},

			/**
			 * Filter for controls in the master search field when the title of a control section was pressed
 			 */
			onPress: function(oEvent) {
				var sFilter = oEvent.oSource.getFilter();
				var oSearchField = this.getSplitApp().getMasterPages()[0].byId("searchField");
				oSearchField.setValue(sFilter);
				oSearchField.fireLiveChange({
					newValue: sFilter
				});
				// tablet or small screen devices: show master page
				setTimeout(function () {
					this.getSplitApp().showMaster();
				}.bind(this), 0);
				// phone: navigate to master list
				if (Device.system.phone) {
					this.getRouter().navTo("controlsMaster", {});
				}
			}
		});
	}
);<commit_msg>[INTERNAL] sap.ui.documentation - controls landing page links work<commit_after>/*!
 * ${copyright}
 */

/*global history */
sap.ui.define([
		"sap/ui/documentation/sdk/controller/BaseController",
		"sap/ui/Device"
	], function (BaseController, Device) {
		"use strict";

		return BaseController.extend("sap.ui.documentation.sdk.controller.Controls", {

			/**
			 * Called when the controller is instantiated.
			 * @public
			 */
			onInit: function () {
				// manually call the handler once at startup as device API won't do this for us
				this._onOrientationChange({
					landscape: Device.orientation.landscape
				});
			},

			/**
			 * Called before the view is rendered.
			 * @public
			 */
			onBeforeRendering: function() {
				this._deregisterOrientationChange();
			},

			/**
			 * Called after the view is rendered.
			 * @public
			 */
			onAfterRendering: function() {
				this._registerOrientationChange();
			},

			/**
			 * Called when the controller is destroyed.
			 * @public
			 */
			onExit: function() {
				this._deregisterOrientationChange();
			},

			/**
			 * Filter for controls in the master search field when the title of a control section was pressed
 			 */
			onPress: function(oEvent) {
				var sFilter = oEvent.oSource.getFilter();
				var oSearchField = this.getOwnerComponent().byId("controlsMaster").byId("searchField");
				oSearchField.setValue(sFilter);
				oSearchField.fireLiveChange({
					newValue: sFilter
				});
				// tablet or small screen devices: show master page
				setTimeout(function () {
					this.getSplitApp().showMaster();
				}.bind(this), 0);
				// phone: navigate to master list
				if (Device.system.phone) {
					this.getRouter().navTo("controlsMaster", {});
				}
			}
		});
	}
);
{'fraction_non_alphanumeric': 0.13312064965197215, 'fraction_numerical': 0.0008700696055684454, 'mean_word_length': 2.8709315375982043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658139', 'n_tokens_mistral': 1296, 'n_tokens_neox': 975, 'n_words': 246}