Permalink
Browse files

Add a placeholder for the search input.

  • Loading branch information...
1 parent c7b3376 commit 4cbbbfcc23a26a4714673be463da57c5054ed4ad @arcusfelis committed Dec 29, 2012
View
@@ -129,7 +129,8 @@
</div>
</div>
- <input type="text" id="search-field" />
+ <input type="text" id="search-field"
+ placeholder="Press &quot;/&quot; to search" />
<div id="search-pane" class="pane">
<div id="search-results">
<div id="modules" class="sub-block active-block">
View
@@ -166,7 +166,8 @@
</div>
</div>
- <input type="text" id="search-field" />
+ <input type="text" id="search-field"
+ placeholder="Press &quot;/&quot; to search" />
<div id="search-pane" class="pane">
<div id="search-results">
<div id="applications" class="sub-block active-block cb-block">
@@ -478,6 +478,7 @@ relatio.initDetail = function(nodeSetId) {
break;
}
+ cc = u.rewriteCharCode(cc, kc);
switch (cc) {
case charCodes.ZERO:
View
@@ -782,7 +782,11 @@ relatio.keyBoard.keyCodes = {
SHIFT: 16,
TAB: 9,
PAGEDOWN: 34,
- PAGEUP: 33
+ PAGEUP: 33,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40
};
relatio.keyBoard.charCodes = {
H: 72,
@@ -834,6 +838,32 @@ relatio.utils.nextNode = function(offset, id, ids)
};
+// Set key aliases.
+relatio.utils.rewriteCharCode = function(cc, kc)
+{
+ var K = relatio.keyBoard.keyCodes;
+ var C = relatio.keyBoard.charCodes;
+ switch (kc)
+ {
+ case K.LEFT:
+ cc = C.h;
+ break;
+
+ case K.RIGHT:
+ cc = C.l;
+ break;
+
+ case K.UP:
+ cc = C.k;
+ break;
+
+ case K.DOWN:
+ cc = C.j;
+ break;
+ }
+ return cc;
+};
+
(function($) {
$.expr[":"].onScreen = function(elem) {
var $window = $(window),
@@ -621,6 +621,7 @@ relatio.initWorld = function() {
break;
}
+ cc = u.rewriteCharCode(cc, kc);
switch (cc) {
case charCodes.ZERO:
@@ -756,6 +757,7 @@ relatio.initWorld = function() {
}
if ($("input[type=text]:focus").length)
return true;
+
switch (cc) {
case charCodes.WHITESPACE:
@@ -931,6 +933,7 @@ relatio.initWorld = function() {
break;
}
+ cc = u.rewriteCharCode(cc, kc);
switch (cc) {
case charCodes.w:
@@ -1360,7 +1363,6 @@ relatio.initWorld = function() {
timeout: 3000});
return false;
}
- return; // TODO
$.ajax({
async: false,
@@ -1375,6 +1377,7 @@ relatio.initWorld = function() {
var data = JSON.parse(json);
var id = data.node_set_id;
// console.log("Save the node set under id = " + id);
+ // Redirect the user on the next page.
window.location.assign("detail.html?id=" + id);
}
}
@@ -79,7 +79,7 @@ generate_xml(Nodes) ->
inferno_server:add_application(Info, kernel, Dir3),
inferno_server:add_application(Info, mnesia, Dir4),
inferno_server:add_application(Info, snmp, Dir5),
- erlang:register(inferno_server, self()),
+ erlang:register(inferno_server, Info),
Info;
Info ->
Info

0 comments on commit 4cbbbfc

Please sign in to comment.