From b1d629f303d006b377b9503ab9abbe49bf104731 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 9 Oct 2013 16:23:11 +0200 Subject: [PATCH] Some proper node lookup display --- public_html/modules/nodes/lookup.php | 1 + public_html/static/css/openng.css | 26 +++++++++++ public_html/static/js/openng.js | 4 +- public_html/templates/nodes/lookup.tpl | 46 ++++++++++++++++--- scss/openng.scss | 63 ++++++++++++++++++++++++++ 5 files changed, 132 insertions(+), 8 deletions(-) diff --git a/public_html/modules/nodes/lookup.php b/public_html/modules/nodes/lookup.php index f82640a..78ec60b 100644 --- a/public_html/modules/nodes/lookup.php +++ b/public_html/modules/nodes/lookup.php @@ -35,6 +35,7 @@ try $sData = array( "contents" => NewTemplater::Render("nodes/lookup", $locale->strings, array( + "id" => $sNode->sId, "name" => $sNode->sName, "notes" => $sNode->sNotes, "properties" => $sProperties diff --git a/public_html/static/css/openng.css b/public_html/static/css/openng.css index 06bfd0c..28861f7 100644 --- a/public_html/static/css/openng.css +++ b/public_html/static/css/openng.css @@ -215,3 +215,29 @@ i.notification { .notification-popup ul, .error-popup ul { margin: 4px 0px; padding-left: 48px; } + +.window-inner .header, .window-inner h1, .window-inner h2 { + margin: 4px 0px; } +.window-inner .lower-header, .window-inner h2 { + margin-top: 7px; } +.window-inner h1 { + font-size: 20px; } +.window-inner h2 { + font-size: 16px; } +.window-inner .unit-content { + padding: 6px; } +.window-inner a.source-ref { + float: right; + margin-right: -4px; + text-decoration: none; + color: gray; + font-size: 13px; } + .window-inner a.source-ref:hover { + color: black; } +.window-inner table { + font-size: 13px; + width: 100%; } +.window-inner td.property-name { + width: 40%; + text-align: right; + font-weight: bold; } diff --git a/public_html/static/js/openng.js b/public_html/static/js/openng.js index d549990..80f1cfa 100644 --- a/public_html/static/js/openng.js +++ b/public_html/static/js/openng.js @@ -132,8 +132,8 @@ function callbackNodeCreated(form, data) function openWindowNodeDetails(id) { new JsdeWindow({ - width: 480, - height: 300, + width: 680, + height: 420, x: 100, y: 100, title: "Node lookup", diff --git a/public_html/templates/nodes/lookup.tpl b/public_html/templates/nodes/lookup.tpl index d5d06c4..5175100 100644 --- a/public_html/templates/nodes/lookup.tpl +++ b/public_html/templates/nodes/lookup.tpl @@ -1,9 +1,43 @@
-
-

{%?name}

-

- {%?notes} -

+
+
+

{%?name}

+

+ {%?notes} +

+

+ Node ID: {%?id} +

+ + + + + + + + + + {%foreach property in properties} + + + + + {%/foreach} + +
NameValue
{%?property[name]} + {%?property[value]} + {%if isempty|property[source] == false} + + {%/if} +
+
+
+
+
+

Relationships

+

+ No relationships were found. +

+
-
test2
diff --git a/scss/openng.scss b/scss/openng.scss index 826bdb6..4ec5b3e 100644 --- a/scss/openng.scss +++ b/scss/openng.scss @@ -313,3 +313,66 @@ i.notification margin: 4px 0px; padding-left: 48px; } + +.window-inner +{ + .header + { + margin: 4px 0px; + } + + .lower-header + { + margin-top: 7px; + } + + h1 + { + @extend .header; + font-size: 20px; + } + + h2 + { + @extend .header; + @extend .lower-header; + font-size: 16px; + } + + .unit-content + { + padding: 6px; + } + + a.source-ref + { + float: right; + margin-right: -4px; + text-decoration: none; + color: gray; + font-size: 13px; + + &:hover + { + color: black; + } + } + + table + { + font-size: 13px; + width: 100%; + } + + td.property-name + { + width: 40%; + text-align: right; + font-weight: bold; + } + + .node-lookup + { + + } +}