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
2016-01-26 13:54:06 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b1d35e8d0adbf60200fbc943d3457498735043ac
b1d35e8d
1 parent
3fd2f94d
ee: added coding function.
Change-Id: I7b44121573637e121c43164f66566249a273882c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
web/gui/src/main/webapp/app/fw/util/fn.js
web/gui/src/main/webapp/app/fw/util/fn.js
View file @
b1d35e8
...
...
@@ -26,6 +26,9 @@
// internal state
var
debugFlags
=
{};
// function references
var
fcc
=
String
.
fromCharCode
,
cca
=
String
.
prototype
.
charCodeAt
;
function
_parseDebugFlags
(
dbgstr
)
{
var
bits
=
dbgstr
?
dbgstr
.
split
(
","
)
:
[];
...
...
@@ -226,6 +229,28 @@
return
s
?
s
[
0
].
toUpperCase
()
+
s
.
slice
(
1
)
:
s
;
}
// return encoding structure for given parameters
function
eecode
(
h
,
w
)
{
var
m
=
65
,
x
=
90
,
d
=
x
-
m
+
1
,
s
=
x
+
m
,
o
=
[],
n
,
i
,
c
,
e
;
for
(
i
=
0
,
n
=
w
.
length
;
i
<
n
;
i
++
)
{
c
=
cca
.
call
(
w
,
i
);
e
=
s
-
c
+
h
;
e
=
e
>
x
?
e
-
d
:
e
;
o
.
push
(
e
);
}
return
{
o
:
w
,
d
:
o
.
join
(
''
),
e
:
fcc
.
apply
(
o
,
o
)
};
}
// return the parameter without a px suffix
function
noPx
(
num
)
{
return
Number
(
num
.
replace
(
/px$/
,
''
));
...
...
@@ -292,6 +317,7 @@
sameObjProps
:
sameObjProps
,
containsObj
:
containsObj
,
cap
:
cap
,
eecode
:
eecode
,
noPx
:
noPx
,
noPxStyle
:
noPxStyle
,
endsWith
:
endsWith
,
...
...
Please
register
or
login
to post a comment