Internal helper, navigate to selected component under current
187889
def nav_to_selected
      # clear nav_select
      ns = self.nav_select
      self.nav_select = nil

      # specified component is a direct child
      if self.children.include?(ns)
        remove_focus
        @focus = focusable.index(ns)
        #handle_focused
        #update_focus
        #focused.activate!

      # not a direct child, navigate down to layout
      # containing it
      else
        child = self.layout_containing(ns)
        child.nav_select = ns
        ch = child.handle_input(true)
      end
    end
148413
function initSelect( elem, parsed, extra){
  var self = this;
  var wc = this.$watch(parsed, function(newValue){
    var children = elem.getElementsByTagName('option');
    for(var i =0, len = children.length ; i < len; i++){
      if(children[i].value == newValue){
        elem.selectedIndex = i;
        break;
      }
    }
  }, STABLE);

  function handler(){
    parsed.set(self, this.value);
    wc.last = this.value;
    self.$update();
  }
  // var isChanging = true 
  // var __change = function(){
  //   if(isChanging) return;
  //   isChanging = true;
  //   setTimeout(handler,0)
  // }

  dom.on( elem, "change", handler );

  
  if(parsed.get(self) === undefined && elem.value){
    parsed.set(self, elem.value);
  }

  return function destroy(){
    dom.off(elem, "change", handler);
    // @TODO remove __change function 
    // elem.__change = null;
  }
}
893476
def handle_input(from_parent=false)
      @focus ||= 0

      # focus on first component
      ch = handle_focused unless nav_select

      # Repeat until quit
      until quit_nav?(ch)

        # Navigate to the specified component (nav_select)
        if self.nav_select 
          # it is a descendent of this one
          if self.contains?(self.nav_select)
            nav_to_selected

          # specified component is not a descendent,
          else
            nav_to_parent
            return nil
          end

        elsif ENTER_CONTROLS.include?(ch)
          focused.activate!

        elsif MOVEMENT_CONTROLS.include?(ch)
          handle_movement(ch, from_parent)

        elsif mev = process_mouse(ch)
          handle_mouse(mev)

        else
          dispatch(:entry, ch)

        end

        return ch unless sanitize_focus!(from_parent)
        ch = handle_focused unless nav_select ||
                                   shutdown?  ||
                                   deactivate?
      end

      ch
    end
863910
function handler(e) {
      if (!vNode.context) return

      // some components may have related popup item, on which we shall prevent the click outside event handler.
      var elements = e.path || (e.composedPath && e.composedPath())
      elements && elements.length > 0 && elements.unshift(e.target)
      
      if (el.contains(e.target) || isPopup(vNode.context.popupItem, elements)) return

      el.__vueClickOutside__.callback(e)
    }
893795
function delegate(callback, el) {
        var currentElement = el;

        do {
            if (!isClickTarget(currentElement)) continue;
            callback(currentElement);
            return;
        } while(currentElement.nodeName.toUpperCase() !== 'BODY' && (currentElement = currentElement.parentNode));
    }
753795
function RecentActivityPanel(props) {
  const { title, expanded, onPanelToggle } = props;
  const toggleButton = {
    label: <ToggleIcon expanded={expanded} />,
    onClick: onPanelToggle,
    placement: 'right'
  };
  if (!props.currentContact) {
    return null;
  }
  const containerClass = classnames(styles.container, props.className);
  return (
    <div className={containerClass}>
      <div className={styles.header} onClick={onPanelToggle}>
        <Header buttons={[toggleButton]} className={styles.header}>{title}</Header>
      </div>
      <RecentActivityView {...props} />
    </div>
  );
}
938242
function Toolbar(props, context) {
	const { ui } = props;

	return <div className="tools">
			<FilterSelector ui={ ui } />
			<SortSelector ui={ ui } />
		</div>
}
672289
function(event, internal) {

                    var currentOption,
                        currentDataSelectedText;

                    // If the user called the change method
                    if(!internal) {

                        currentOption = self.list.find('li[data-val="' + self.originalElem.value + '"]');

                        // If there is a dropdown option with the same value as the original select box element
                        if(currentOption.length) {

                            self.listItems.eq(self.currentFocus).removeClass(self.focusClass);

                            self.currentFocus = +currentOption.attr("data-id");

                        }

                    }

                    currentOption = self.listItems.eq(self.currentFocus);

                    currentDataSelectedText = currentOption.attr("data-selectedtext");

                    currentDataText = currentOption.attr("data-text");

                    currentText = currentDataText ?  currentDataText: currentOption.find("a").text();

                    // Sets the new dropdown list text to the value of the current option
                    self._setText(self.dropdownText, currentDataSelectedText || currentText);

                    self.dropdownText.attr("data-val", self.originalElem.value);

                    if(currentOption.find("i").attr("class")) {

                        self.dropdownImage.attr("class", currentOption.find("i").attr("class")).addClass("selectboxit-default-icon");

                        self.dropdownImage.attr("style", currentOption.find("i").attr("style"));
                    }

                    // Triggers a custom changed event on the original select box
                    self.triggerEvent("changed");

                }
312927
function Component_find(name, components) {
        return components.filter(function (item) {
            return item.name === name;
        }).shift();
    }
571595
function (e) {
							var t = _t(e);
							// is the current target one of the activeElements? and is the
							// related target NOT a descendant of it?
							for (var i = 0; i < activeElements.length; i++) {
								if (t == activeElements[i] && !matchesSelector((e.relatedTarget || e.toElement), "*", t)) {
									t.__tamee.over = false;
									activeElements.splice(i, 1);
									meeHelper("mouseexit", e, obj, t);
								}
							}
						}
380320
def _enter_handler(self, event):
        """"""
        iid = self.current_iid
        if iid is None or iid == self.active:
            return
        self.update_state(iid, "hover")
689527
def manage_component_path(component)
      current_params = try(:params) || {}
      EngineRouter.admin_proxy(component).root_path(locale: current_params[:locale])
    end
931612
function moveSelection(forward, reset) {
		var p, _p, cur;
		
		if (!$('[key]', self.cwd).length) {
			return;
		}
		
		if (self.fm.selected.length == 0) {
			p = $('[key]:'+(forward ? 'first' : 'last'), self.cwd);
			self.fm.select(p);
		} else if (reset) {
			p  = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			_p = p[forward ? 'next' : 'prev']('[key]');
			if (_p.length) {
				p = _p;
			}
			self.fm.select(p, true);
		} else {
			if (self.pointer) {
				cur = $('[key="'+self.pointer+'"].ui-selected', self.cwd);
			}
			if (!cur || !cur.length) {
				cur = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			}
			p = cur[forward ? 'next' : 'prev']('[key]');

			if (!p.length) {
				p = cur;
			} else {
				if (!p.hasClass('ui-selected')) {
					self.fm.select(p);
				} else {
					if (!cur.hasClass('ui-selected')) {
						self.fm.unselect(p);
					} else {
						_p = cur[forward ? 'prev' : 'next']('[key]')
						if (!_p.length || !_p.hasClass('ui-selected')) {
							self.fm.unselect(cur);
						} else {
							while ((_p = forward ? p.next('[key]') : p.prev('[key]')) && p.hasClass('ui-selected')) {
								p = _p;
							}
							self.fm.select(p);
						}
					}
				}
			} 
		}
		self.pointer = p.attr('key');
		self.fm.checkSelectedPos(forward);
	}
366073
def _current_component(view_func, dashboard=None, panel=None):
    """"""
    @functools.wraps(view_func, assigned=available_attrs(view_func))
    def dec(request, *args, **kwargs):
        if dashboard:
            request.horizon['dashboard'] = dashboard
        if panel:
            request.horizon['panel'] = panel
        return view_func(request, *args, **kwargs)
    return dec
349114
function LI(props) {
  return (
    <MenuItem
      style={{cursor: 'pointer', userSelect: 'none'}}
      highlightedStyle={{background: 'gray'}}
      onItemChosen={e => {
        console.log(`selected ${props.children}, byKeyboard: ${String(e.byKeyboard)}`);
      }}
      {...props}
    />
  );
}
886872
function () {
			this.router = UIComponent.getRouterFor(this);
			this.router.attachRoutePatternMatched(this.onRouteMatched, this);
			this._component = Component.getOwnerComponentFor(this.getView());
			// click handler for @link tags in JSdoc fragments
			this.getView().attachBrowserEvent("click", this.onJSDocLinkClick, this);

			this.getView().addEventDelegate({
				onBeforeFirstShow: jQuery.proxy(this._applyViewConfigurations, this)
			});
		}
443657
public void toolsMenuClick(int index, Object value, boolean isToggled) {
		System.out.println(index + ":" + value + ":" + isToggled);
		switch (index) {
		case 0:
			// Call the xml parser to load your new components
			// screen.parseLayout("Interface/MainMenu.gui.xml", this);
			// screenShotState.takeScreenshot();
			app.getStateManager().detach(this);
			takeScreenshot();
			break;
		case 1:
			LoggingViewerAppState log = app.getStateManager().getState(LoggingViewerAppState.class);
			if (log == null) {
				log = new LoggingViewerAppState();
				app.getStateManager().attach(this);
			}
			if (log.isShown()) {
				log.hide();
			} else {
				log.show();
			}
			break;
		case 2:
			// Event Launcher
			if (eventLauncherPanel == null) {
				DevicesAppState devicesAppState = app.getStateManager().getState(DevicesAppState.class);
				if (devicesAppState != null) {
					EventLauncherPanel.createAndShowGUI(devicesAppState);
				}
			} else {
				eventLauncherPanel.setVisible(eventLauncherPanel.isVisible());
			}
			break;
		}
	}