1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License.
3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // You may obtain a copy of the License at
11 // you may not use this file except in compliance with the License.
12 // Licensed under the Apache License, Version 2.0 (the "License");
14 goog.provide('i18n.input.chrome.inputview.layouts.CompactSpaceRow');
16 goog.require('i18n.input.chrome.inputview.ConditionName');
17 goog.require('i18n.input.chrome.inputview.layouts.util');
20 goog.scope(function() {
21 var layouts = i18n.input.chrome.inputview.layouts;
22 var util = layouts.util;
26 * Creates the compact keyboard spaceKey row.
27 * @param {boolean} isNordic True if the space key row is generated for compact
29 * @return {!Object} The compact spaceKey row.
31 layouts.CompactSpaceRow.create = function(
33 var digitSwitcher = util.createKey({
34 'widthInWeight': 1.078125
36 var globeOrSymbolKey = util.createKey({
37 'condition': i18n.input.chrome.inputview.ConditionName.SHOW_GLOBE_OR_SYMBOL,
40 var menuKey = util.createKey({
41 'condition': i18n.input.chrome.inputview.ConditionName.SHOW_MENU,
44 var slashKey = util.createKey({
47 var space = util.createKey({
50 var comma = util.createKey({
53 var period = util.createKey({
56 var hide = util.createKey({
57 'widthInWeight': 1.078125
60 menuKey['spec']['giveWeightTo'] = space['spec']['id'];
61 globeOrSymbolKey['spec']['giveWeightTo'] = space['spec']['id'];
63 var spaceKeyRow = util.createLinearLayout({
65 'children': [digitSwitcher, globeOrSymbolKey, menuKey, slashKey, space,