Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Simon Hunt
2015-12-11 10:32:09 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9f5e97d048379e025123c6744fb43ce0f0dac64c
9f5e97d0
1 parent
603e8d9a
GUI: clean up coding style.
Change-Id: I1dcb036a12896bab88dfe2752c098fe5e8dfc009
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
web/gui/src/main/webapp/app/fw/util/keys.js
web/gui/src/main/webapp/app/onos.css
web/gui/src/main/webapp/app/fw/util/keys.js
View file @
9f5e97d
...
...
@@ -21,7 +21,11 @@
'use strict'
;
// references to injected services
var
$log
,
fs
,
ts
,
ns
,
qhs
;
var
$log
,
$timeout
,
fs
,
ts
,
ns
,
qhs
;
// constants
var
eeggMin
=
'shiftO'
,
eeggMax
=
'shiftONOS'
;
// internal state
var
enabled
=
true
,
...
...
@@ -32,20 +36,21 @@
viewKeys
:
{},
viewFn
:
null
,
viewGestures
:
[]
};
var
eegg
=
''
,
eeggMax
=
'shiftONOS'
,
eeggMin
=
'shiftO'
;
},
eegg
=
''
;
function
layEgg
(
lastKey
)
{
eegg
+=
lastKey
;
if
(
eeggMax
.
indexOf
(
eegg
)
==
0
)
{
if
(
eeggMax
==
eegg
)
{
d3
.
select
(
'body'
).
append
(
'div'
).
attr
(
'id'
,
'eegg'
).
append
(
'img'
).
attr
(
'src'
,
'data/img/eegg.png'
);
setTimeout
(
function
()
{
d3
.
select
(
'#eegg'
).
remove
();
},
3000
);
function
layEgg
(
key
)
{
eegg
+=
key
;
if
(
eeggMax
.
indexOf
(
eegg
)
===
0
)
{
if
(
eegg
===
eeggMax
)
{
d3
.
select
(
'body'
).
append
(
'div'
).
attr
(
'id'
,
'eegg'
)
.
append
(
'img'
).
attr
(
'src'
,
'data/img/eegg.png'
);
$timeout
(
function
()
{
d3
.
select
(
'#eegg'
).
remove
();
},
3000
);
eegg
=
''
;
}
return
true
;
}
else
if
(
eeggMin
!=
eegg
)
{
}
if
(
eegg
!==
eeggMin
)
{
eegg
=
''
;
}
return
false
;
...
...
@@ -218,10 +223,11 @@
angular
.
module
(
'onosUtil'
)
.
factory
(
'KeyService'
,
[
'$log'
,
'FnService'
,
'ThemeService'
,
'NavService'
,
[
'$log'
,
'
$timeout'
,
'
FnService'
,
'ThemeService'
,
'NavService'
,
function
(
_$log_
,
_fs_
,
_ts_
,
_ns_
)
{
function
(
_$log_
,
_
$timeout_
,
_
fs_
,
_ts_
,
_ns_
)
{
$log
=
_$log_
;
$timeout
=
_$timeout_
;
fs
=
_fs_
;
ts
=
_ts_
;
ns
=
_ns_
;
...
...
web/gui/src/main/webapp/app/onos.css
View file @
9f5e97d
...
...
@@ -67,6 +67,6 @@ body.dark {
transform
:
translate
(
-50%
,
-50%
);
box-shadow
:
2px
2px
24px
5px
#888
;
background-color
:
#eee
;
margin
:
0
px
;
margin
:
0
;
padding
:
10px
;
}
...
...
Please
register
or
login
to post a comment