aboutsummaryrefslogtreecommitdiffstats
path: root/ui/imports/ui/components/auto-search-result-line
diff options
context:
space:
mode:
Diffstat (limited to 'ui/imports/ui/components/auto-search-result-line')
-rw-r--r--ui/imports/ui/components/auto-search-result-line/auto-search-result-line.html16
-rw-r--r--ui/imports/ui/components/auto-search-result-line/auto-search-result-line.js51
-rw-r--r--ui/imports/ui/components/auto-search-result-line/auto-search-result-line.styl23
3 files changed, 90 insertions, 0 deletions
diff --git a/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.html b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.html
new file mode 100644
index 0000000..247e1ea
--- /dev/null
+++ b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.html
@@ -0,0 +1,16 @@
+<!--
+########################################################################################
+# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others #
+# #
+# All rights reserved. This program and the accompanying materials #
+# are made available under the terms of the Apache License, Version 2.0 #
+# which accompanies this distribution, and is available at #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+########################################################################################
+ -->
+<template name="AutoSearchResultLine">
+ <li class="os-auto-search-result-line">
+ <span class="sm-header-subline"><span class="sm-object-name">{{ objectName }}</span> - <span class="sm-object-type">{{ objectType }}</span></span>
+ <span class="sm-detail-subline">{{ namePath }}</span>
+ </li>
+</template>
diff --git a/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.js b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.js
new file mode 100644
index 0000000..23272de
--- /dev/null
+++ b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.js
@@ -0,0 +1,51 @@
+/////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others /
+// /
+// All rights reserved. This program and the accompanying materials /
+// are made available under the terms of the Apache License, Version 2.0 /
+// which accompanies this distribution, and is available at /
+// http://www.apache.org/licenses/LICENSE-2.0 /
+/////////////////////////////////////////////////////////////////////////////////////////
+/*
+ * Template Component: AutoSearchResultLine
+ */
+
+//import { Meteor } from 'meteor/meteor';
+import { Template } from 'meteor/templating';
+//import { ReactiveDict } from 'meteor/reactive-dict';
+
+import './auto-search-result-line.html';
+
+/*
+ * Lifecycles
+ */
+
+Template.AutoSearchResultLine.onCreated(function() {
+});
+
+/*
+Template.AutoSearchResultLine.rendered = function() {
+};
+*/
+
+/*
+ * Events
+ */
+
+Template.AutoSearchResultLine.events({
+ 'click': function(event, instance) {
+ event.stopPropagation();
+ event.preventDefault();
+
+ instance.data.onClick(instance.data.namePath);
+ }
+});
+
+/*
+ * Helpers
+ */
+
+Template.AutoSearchResultLine.helpers({
+});
+
+
diff --git a/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.styl b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.styl
new file mode 100644
index 0000000..df6caa5
--- /dev/null
+++ b/ui/imports/ui/components/auto-search-result-line/auto-search-result-line.styl
@@ -0,0 +1,23 @@
+.os-auto-search-result-line
+ cursor: pointer;
+ line-height: 1.1;
+ font-size: 1.1em;
+ padding: 5px 15px;
+ margin: 0 auto;
+ color: brand-blue
+ border-bottom: 1px solid #e8e8e8;
+
+ &:hover
+ background-color: #f2f2f2;
+
+ .sm-header-subline
+ display: block;
+ margin-bottom: 5px;
+
+ .sm-detail-subline
+ display: block;
+ white-space: nowrap;
+ color: spark-grey
+
+.os-auto-search-result-line:last-child
+ border-bottom: none;