Better webui, 'pi' counts opcodes and remove /new and htmlgraph

pi honors number of instructions, not bytes
Remove htmlgraph and lungo webui
More work on the enyo webui
This commit is contained in:
pancake 2013-01-25 03:22:09 +01:00
parent 98da9c80f5
commit 1f6174c6ae
48 changed files with 136 additions and 4091 deletions

View file

@ -211,7 +211,7 @@ static int cmd_print(void *data, const char *input) {
}
break;
case 'i':
r_core_print_disasm_instructions (core, len, l);
r_core_print_disasm_instructions (core, core->blocksize, l);
break;
case 'D':
case 'd':

View file

@ -631,9 +631,6 @@ R_API int r_core_config_init(RCore *core) {
#endif
r_config_desc (cfg, "cfg.editor", "Select default editor program");
free (p);
if (r_file_exists ("/usr/bin/htmlgraph.sh"))
r_config_set (cfg, "cmd.graph", "!htmlgraph.sh a.dot");
else
if (r_file_exists ("/usr/bin/xdot"))
r_config_set (cfg, "cmd.graph", "!xdot a.dot");
else

View file

@ -879,6 +879,7 @@ R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int len) {
R_API int r_core_print_disasm_instructions (RCore *core, int len, int l) {
RAsmOp asmop;
char *opstr, *tmpopstr;
int i, j, ret, err = 0;
const ut8 *buf = core->block;
int bs = core->blocksize;
@ -887,11 +888,10 @@ R_API int r_core_print_disasm_instructions (RCore *core, int len, int l) {
int decode = r_config_get_i (core->config, "asm.decode");
ut64 at;
// TODO: add support for anal hints
if (len>core->blocksize)
r_core_block_size (core, len);
if (l==0) l = len;
for (i=j=0; i<bs && i<len && j<len; i+=ret, j++) {
for (i=j=0; i<bs && i<len && j<l; i+=ret, j++) {
at = core->offset +i;
if (hint) {
r_anal_hint_free (hint);
@ -902,19 +902,23 @@ R_API int r_core_print_disasm_instructions (RCore *core, int len, int l) {
ret = r_asm_disassemble (core->assembler,
&asmop, buf+i, core->blocksize-i);
//r_cons_printf ("0x%08"PFMT64x" ", core->offset+i);
if (hint && hint->length)
ret = hint->length;
if (hint && hint->opcode) {
opstr = strdup (hint->opcode);
} else {
if (decode) {
r_anal_op (core->anal, &analop, at, buf+i, core->blocksize-i);
tmpopstr = r_anal_op_to_string (core->anal, &analop);
opstr = (tmpopstr)? tmpopstr: strdup (asmop.buf_asm);
} else opstr = strdup (asmop.buf_asm);
}
if (ret<1) {
ret = err = 1;
r_cons_printf ("???\n");
} else {
if (decode) {
char *tmpopstr, *opstr;
r_anal_op (core->anal, &analop, at,
buf+i, core->blocksize-i);
tmpopstr = r_anal_op_to_string (core->anal, &analop);
opstr = (tmpopstr)? tmpopstr: strdup (asmop.buf_asm);
r_cons_printf ("%s\n", opstr);
free (opstr);
} else r_cons_printf ("%s\n", asmop.buf_asm);
r_cons_printf ("%s\n", opstr);
free (opstr);
}
}
if (hint) r_anal_hint_free (hint);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

View file

@ -1,158 +0,0 @@
#!/bin/sh
#
# e scr.html=true
# e cmd.graph=!htmlgraph.sh
# af
# agv $$
#
D=`dirname $0`
P=`basename $0`
L=`readlink $D/$P`
if [ -n "$L" ]; then
D=`dirname $L`
P=`basename $L`
fi
# TODO: handle this correctly
if [ -n "$1" ]; then DOTFILE="$1" ; fi
if [ -n "${DOTFILE}" -a ! -e "${DOTFILE}" ] ; then
echo "cannot find ${DOTFILE}"
exit 1
fi
T=`mktemp /tmp/htmlg.XXXXXX`.html
cat <<EOF >>$T
<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>js-graph.it homepage</title>
<script type="text/javascript" src="jsgraph.js"></script>
<link rel="stylesheet" type="text/css" href="jsgraph.css" />
<style>
p{
white-space: pre;
font-family: monospace;
display: block;
}
body{
overflow:hidden;
}
</style>
<script>
<!--
function onLoad()
{
setMenu();
resizeCanvas();
initPageObjects();
}
/**
* Resizes the main canvas to the maximum visible height.
*/
function resizeCanvas()
{
var divElement = document.getElementById("mainCanvas");
var screenHeight = window.innerHeight || document.body.offsetHeight;
divElement.style.height = (screenHeight - 16) + "px";
}
/**
* sets the active menu scanning for a menu item which url is a prefix
* of the one of the current page ignoring file extension.
* Nice trick!
*/
function setMenu()
{
var url = document.location.href;
// strip extension
url = stripExtension(url);
var ulElement = document.getElementById("menu");
var links = ulElement.getElementsByTagName("A");
var i;
for(i = 0; i < links.length; i++)
{
if(url.indexOf(stripExtension(links[i].href)) == 0)
{
links[i].className = "active_menu";
return;
}
}
}
/**
* Strips the file extension and everything after from a url
*/
function stripExtension(url)
{
var lastDotPos = url.lastIndexOf('.');
if(lastDotPos > 0)
return url.substring(0, lastDotPos - 1);
else
return url;
}
/**
* this function opens a popup to show samples during explanations.
*/
function openSample(url)
{
var popup = window.open(url, "sampleWindow", "width=400,height=300");
popup.focus();
return false;
}
//-->
</script>
</head>
<body onload="onLoad();">
<!--
<table class="main_table" style="height: 100%;">
<tr>
<td colspan=3>
<a href=''>File</a> | Edit
</td>
</tr>
<tr>
<td width="1" style="vertical-align: top;" class="menu">
<ul id="menu">
<select>
<option>Functions</option>
<option>Exports</option>
<option>Imports</option>
</select>
</ul>
</td>
<td style="vertical-align: top; padding: 0px;">
-->
<div id="mainCanvas" class="canvas" style="width: 100%; height: 400px;">
EOF
cat ${DOTFILE} >> $T
cat <<EOF >> $T
<!--
</td>
<td width="1" style="vertical-align: top;" class="menu">
<ul id="menu"> </ul>
</td>
</tr>
</table>
-->
</body>
</html>
EOF
cd /tmp
cp -f $D/* .
if [ -e /usr/bin/open ]; then
open $T
elif [ -e /usr/bin/xdg-open ]; then
xdg-open $T
else
firefox $T
fi

View file

@ -1,183 +0,0 @@
.draggable
{
position: absolute;
cursor: move;
z-index: 1;
}
.connector
{
background-color: black;
}
.dock_point
{
height: 1px;
width: 1px;
overflow: hidden;
padding: 0px !important;
border: none !important;
margin: 0px !important;
position: absolute;
font-size: 1px;
visibility: hidden;
}
/* */
.draggable
{
position: absolute;
}
div.block, h1.block, h2.block, p.block
{
border: 1px solid #9DA3B3;
background-color: #E0E8FF;
padding: 5px;
}
div.canvas
{
border: 1px solid #262A37;
background-color: white;
background-image: url('gradient.jpg');
background-repeat: no-repeat;
background-position: top right;
padding: 0px;
}
.highlighter
{
border: 1px solid #CFDF62 !important;
background-color: #F1FF90 !important;
margin-bottom: 2px !important;
padding: 0px !important;
z-index: 3;
}
.highlighter .highlighter
{
border: 1px solid #7DAB76 !important;
background-color: #BAFFB0 !important;
margin-left: 2px !important;
margin-right: 2px !important;
}
html
{
padding: 0px;
margin: 0px;
}
body
{
font-family: verdana;
font-size: 11px;
color: #33333F;
padding: 3px;
margin: 0px;
background-color: white;
}
h1
{
color: #FF7521;
margin: 0px;
font-size: 20px;
}
h2
{
font-size: 15px;
margin: 0px;
}
p, div
{
font-size: 11px;
margin: 0px;
}
a
{
text-decoration: none;
color: #FF9900;
}
.middle-label, .source-label, .destination-label
{
font-size: 11px;
font-weight: bold;
padding: 5px;
}
div.connector
{
background-color: #ff9900;
z-index: 1000;
}
table.main_table
{
width: 100%;
border-collapse: separate;
}
td.menu
{
padding: 5px;
}
.menu ul
{
margin: 0px;
padding: 0px;
list-style-type: none;
list-style-position: outside;
}
.menu li
{
border: none;
padding: 0px;
font-size: 12px;
margin-bottom: 3px;
}
.menu li a
{
display: block;
border: 1px solid #262A37;
width: 100px;
color: #262A37;
text-decoration: none;
padding: 1px;
background-color: #E0E8FF;
}
.menu li a.active_menu
{
color: #FF9900;
border-color: #FF9900;
}
.menu li a:hover
{
color: #FF9900;
border-color: #FF9900;
}
.block ol, .block ul
{
margin-top: 3px;
margin-bottom: 3px;
margin-left: 0px;
padding-left: 25px;
}
.code
{
font-family: monospace;
line-height: 1.5em !important;
}

File diff suppressed because it is too large Load diff

1
prefix/bin/rabin2 Symbolic link
View file

@ -0,0 +1 @@
../../binr/rabin2/rabin2

1
prefix/bin/radare2 Symbolic link
View file

@ -0,0 +1 @@
../../binr/radare2/radare2

1
prefix/bin/rahash2 Symbolic link
View file

@ -0,0 +1 @@
../../binr/rahash2/rahash2

1
prefix/bin/rax2 Symbolic link
View file

@ -0,0 +1 @@
../../binr/rax2/rax2

1
prefix/lib/libr_asm.dylib Symbolic link
View file

@ -0,0 +1 @@
../../libr/asm/libr_asm.dylib

1
prefix/lib/libr_bin.dylib Symbolic link
View file

@ -0,0 +1 @@
../../libr/bin/libr_bin.dylib

View file

@ -1,6 +1,10 @@
a {
color: #3030a0;
}
.app-panels > * {
width: 320px;
background-color: #EAEAEA;
background-color: #eaeaea;
box-shadow: -4px -4px 4px rgba(0,0,0,0.3);
}
@ -40,3 +44,12 @@
width: 90%;
display: inline-block;
}
/* TODO: :hover change mouse pointer */
.moreless {
background-color:#d0d0d0;
width:90%;
height:24px;
padding-left:10px;
border:0px;
}

File diff suppressed because one or more lines are too long

View file

@ -1,11 +1,22 @@
enyo.kind({
var r2ui = {};
r2ui.seek = function (addr) {
/* XXX. this is only for disasm */
r2.cmd ("s "+addr);
r2ui._dis.seek (addr);
r2ui._dis.scrollTo (0, 0);
}
enyo.kind ({
name: "Disassembler",
kind: "Scroller",
tag: "div",
style:"margin-left:16px",
data: [ "pop eax", "push ecx", "jmp 0x80040", "call 0x80404", "xor eax, eax", "int 0x80" ],
style:"margin:0px;background-color:#a0a0a0",
data: null,
components: [
{tag: "pre", allowHtml: true, name: "text", content: "TODO : Disasm"},
{tag: "div", content: "^", classes: "moreless", ontap: "less"},
{tag: "pre", allowHtml: true, name: "text", content: ".."},
{tag: "div", content: "v", classes: "moreless", ontap: "more"},
/*
{kind: "List", count:3, name: "list", style:"height:400px", realtimeFit:false, onSetupItem: "setupItem", components: [
{kind: "onyx.Item", layoutKind: "HFlexLayout", style:"padding:0px", components: [
@ -14,14 +25,44 @@ enyo.kind({
]}
*/
],
min: 0,
max: 0,
base: "entry0",
less: function() {
var self = this;
var text = this.$.text;
this.min += 256;
r2.get_disasm (this.base+"-"+this.min, 256, function (x) {
x = r2.filter_asm (x, "pd");
var oldy = r2ui._dis.getScrollBounds().height;
text.setContent (x+text.getContent());
var newy = r2ui._dis.getScrollBounds().height;
r2ui._dis.scrollTo (0, newy-oldy);
});
},
more: function() {
var text = this.$.text;
this.max += 256;
r2.get_disasm (this.base+"+"+this.max, 256, function (x) {
x = r2.filter_asm (x, "pd");
text.setContent (text.getContent() + x);
});
},
seek: function(addr) {
var text = this.$.text;
this.base = addr;
this.min = this.max = 0;
r2.get_disasm (addr, 256, function (x) {
x = r2.filter_asm (x, "pd");
text.setContent (x);
});
},
create: function() {
this.inherited (arguments);
// this.$.list.setCount (this.data.length) ;
var text = this.$.text;
r2.get_disasm ("entry0", 1024, function (x) {
x = r2.filter_asm (x, "pd");
text.setContent (x);
});
this.seek ("entry0");
r2ui._dis = this;
//this.refresh ();
},
setupItem: function (inSender, inIndex) {

View file

@ -2,22 +2,32 @@ enyo.kind ({
name: "LeftPanel",
classes: "onyx-toolbar",
kind: "Scroller",
fit:true,
style: "width: 220px;height:100%",
fit: true,
/* touch:true, */
style: "width: 220px;height:100%;margin:0px;",
accelerated: true,
horizontal: "hidden",
//strategyKind: "TranslateScrollStrategy",
create: function() {
this.inherited (arguments);
this.$.strategy.setTranslateOptimized = true;
},
components: [
{tag: "h2", content: "crackme01", style: "margin-left:12px; margin-top:0px;margin-bottom:50px;height:10px;width:190px,overflow:hidden" },
{kind: "Group", onActivate:"buttonActivated", classes: "enyo-border-box group", defaultKind: "onyx.Button", highlander: true, components: [
{content: "Disassembler", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Disassembler", active: true},
{content: "Assembler", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Assembler" },
{content: "Hexdump", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Hexdump" },
{content: "Graph", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Graph" },
{content: "Search", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Search" },
{content: "Console", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Console" },
{content: "Logs", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Logs" },
{content: "Script", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Script" },
{content: "Settings", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Settings" },
{content: "About", classes: "onyx-dark menu-button" , ontap: "openPanel", name:"About"},
]}
{tag: "center", components:[
{tag: "h2", content: "radare2", style: "margin:0px;margin-bottom:20px;" },
{kind: "Group", onActivate:"buttonActivated", classes: "enyo-border-box group", defaultKind: "onyx.Button", highlander: true, components: [
{content: "Disassembler", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Disassembler", active: true},
{content: "Assembler", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Assembler" },
{content: "Hexdump", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Hexdump" },
{content: "Graph", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Graph" },
{content: "Search", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Search" },
{content: "Console", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Console" },
{content: "Logs", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Logs" },
{content: "Script", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Script" },
{content: "Settings", classes: "onyx-dark menu-button", ontap:"openPanel", name: "Settings" },
{content: "About", classes: "onyx-dark menu-button" , ontap: "openPanel", name:"About"},
]}
]},
],
openPanel: function (x) {
if (enyo.Panels.isScreenNarrow())

View file

@ -1,3 +1,4 @@
enyo.kind ({
name: "MainPanel",
classes: "onyx",
@ -64,7 +65,7 @@ enyo.kind ({
]}
]}
]},
{kind: "Panels", name:"samplePanels", fit:true, draggable: false,
{kind: "Panels", name:"panels", fit:true, draggable: false,
realtimeFit: true, classes: "enyo-border-box", components: [
{kind:"Disassembler", name: "pageDisassembler"},
{kind:"Assembler", name:"pageAssembler"},
@ -80,9 +81,9 @@ enyo.kind ({
],
create: function() {
this.inherited(arguments);
//this.$.samplePanels.setArrangerKind ("CardArranger");
//this.$.panels.setArrangerKind ("CardArranger");
// if (enyo.Panels.isScreenNarrow()) {
this.$.samplePanels.setIndex(0);
this.$.panels.setIndex(0);
},
ra: null,
openSidebar: function() {
@ -95,7 +96,7 @@ enyo.kind ({
this.inherited(arguments);
},
openPage: function(idx) {
var str, sp = this.$.samplePanels;
var str, sp = this.$.panels;
eval ("var x = this.$.page"+idx);
// TODO: this is just a hack
switch (idx) {
@ -116,17 +117,17 @@ enyo.kind ({
seekStack: [],
nextSeek: function() {
var addr = '?';
alert ("nxt "+addr);
//alert ("nxt "+addr);
},
prevSeek: function() {
var addr = this.seekStack.pop ();
alert ("pop "+addr);
//alert ("pop "+addr);
},
gotoSeek: function() {
var addr = this.$.input.getValue();
this.seekStack.push ();
/*
var sp = this.$.samplePanels;
var sp = this.$.panels;
//this.openPage (this.$.input.getValue());
//sp.components[3].setContent ("JAJAJ");
this.$.page3.setContent ("content-a");

View file

@ -51,7 +51,7 @@ r2.disassemble = function (offset, bytes, fn) {
r2.get_disasm = function (offset, length, cb) {
// TODO: honor offset and length
r2.cmd ("b 512;pd", cb);
r2.cmd ("pD "+length+"@"+offset, cb);
}
r2.config_set = function (fn) {
@ -247,18 +247,18 @@ r2.filter_asm = function (x, display) {
return false;
}
if (haveDisasm (display)) {
x = x.replace (/function:/g,"<span style=color:red>function:</span>");
x = x.replace (/function:/g,"<span style=color:green>function:</span>");
x = x.replace (/;(\s+)/g, ";");
x = x.replace (/;(.*)/g, "// <span style='color:red'>$1</span>");
x = x.replace (/;(.*)/g, "// <span style='color:white'>$1</span>");
x = x.replace (/(bl|call)/g, "<b style='color:green'>call</b>");
x = x.replace (/(jmp|bne|beq|jnz|jae|jge|jbe|jg|je|jl|jz|jb|ja|jne)/g, "<b style='color:green'>$1</b>");
x = x.replace (/(dword|qword|word|byte|movzx|movsxd|cmovz|mov\ |lea\ )/g, "<b style='color:orange'>$1</b>");
x = x.replace (/(dword|qword|word|byte|movzx|movsxd|cmovz|mov\ |lea\ )/g, "<b style='color:#1070d0'>$1</b>");
x = x.replace (/(hlt|leave|retn|ret)/g, "<b style='color:red'>$1</b>");
x = x.replace (/(add|sub|mul|div|shl|shr|and|not|xor|inc|dec|sar|sal)/g, "<b style='color:orange'>$1</b>");
x = x.replace (/(push|pop)/g, "<b style='color:magenta'>$1</b>");
x = x.replace (/(test|cmp)/g, "<b style='color:green'>$1</b>");
x = x.replace (/(add|sub|mul|div|shl|shr|and|not|xor|inc|dec|sar|sal)/g, "<b style='color:#d06010'>$1</b>");
x = x.replace (/(push|pop)/g, "<b style='color:#40a010'>$1</b>");
x = x.replace (/(test|cmp)/g, "<b style='color:#c04080'>$1</b>");
x = x.replace (/nop/g, "<b style='color:blue'>nop</b>");
x = x.replace (/(sym|fcn|imp|loc).(.*)/g, "<a href='javascript:r2ui.seek(\"$1.$2\")'>$1.$2</a>");
x = x.replace (/(sym|fcn|imp|loc).([^<(\\\/ \|)\->]+)/g, "<a href='javascript:r2ui.seek(\"$1.$2\")'>$1.$2</a>");
}
x = x.replace (/0x([a-zA-Z0-9]*)/g, "<a href='javascript:r2ui.seek(\"0x$1\")'>0x$1</a>");
// registers

View file

@ -2,6 +2,7 @@ enyo.kind ({
name: "RightPanel",
classes: "onyx-toolbar",
kind: "Scroller",
horizontal: false,
style: "width:25px",
ra: null,
components: [
@ -31,7 +32,7 @@ enyo.kind ({
{kind: "onyx.Button", name: "msg", style: "width:100%", fit:true, active: true, ontap: "rowTap"}
]}
]},
{tag: "pre", style:"font-size:10px", allowHtml:true, name: "output", content:".." }
{tag: "pre", style:"font-size:12px", allowHtml:true, name: "output", content:".." }
]}
],
rowTap: function () {

View file

@ -1,3 +1,5 @@
/* not used. must be deprecated or merged */
var r2ui = {}
r2ui.consoleExec = function () {
var xx = document.getElementById ('consoleBody');
@ -171,10 +173,10 @@ function filter_asm(x) {
x = x.replace (/;(.*)/g, "// <span style='color:red'>$1</span>");
x = x.replace (/(bl|call)/g, "<b style='color:green'>call</b>");
x = x.replace (/(jmp|bne|beq|jnz|jae|jge|jbe|jg|je|jl|jz|jb|ja|jne)/g, "<b style='color:green'>$1</b>");
x = x.replace (/(dword|qword|word|byte|movzx|movsxd|cmovz|mov\ |lea\ )/g, "<b style='color:orange'>$1</b>");
x = x.replace (/(dword|qword|word|byte|movzx|movsxd|cmovz|mov\ |lea\ )/g, "<b style='color:grey'>$1</b>");
x = x.replace (/(hlt|leave|retn|ret)/g, "<b style='color:red'>$1</b>");
x = x.replace (/(add|sub|mul|div|shl|shr|and|not|xor|inc|dec|sar|sal)/g, "<b style='color:orange'>$1</b>");
x = x.replace (/(push|pop)/g, "<b style='color:magenta'>$1</b>");
x = x.replace (/(add|sub|mul|div|shl|shr|and|not|xor|inc|dec|sar|sal)/g, "<b style='color:grey'>$1</b>");
x = x.replace (/(push|pop)/g, "<b style='color:black'>$1</b>");
x = x.replace (/(test|cmp)/g, "<b style='color:green'>$1</b>");
x = x.replace (/nop/g, "<b style='color:blue'>nop</b>");
x = x.replace (/(sym|fcn|imp|loc).(.*)/g, "<a href='javascript:r2ui.seek(\"$1.$2\")'>$1.$2</a>");

View file

@ -13,9 +13,11 @@ div.block, h1.block, h2.block, p.block {
div.canvas {
border: 0px solid #262A37;
background-color: black;
/*
background-image: url('gradient.jpg');
background-repeat: no-repeat;
background-position: top right;
*/
padding: 0px;
}

View file

@ -1,65 +0,0 @@
#main article li.contrast {
font-size: 0.95em;
}
#main article li.feature strong {
margin-top: 8px;
margin-bottom: 10px;
display: block;
}
#touchevents-console {
background: #292f34;
color: white;
font-size: 3.0em;
line-height: 2.2em;
text-align: center;
}
li {
padding-top: 128px !important;
padding-bottom: 128px !important;
}
#touchevents .list li:not(.anchor) {
padding: 64px 8px;
}
#scroll h1 {
line-height: 44px;
background: black;
color: white;
text-indent: 10px;
}
#scroll img {
min-width: 256px;
min-height: 128px;
background: #333;
}
#scroll .anchor img {
width: 100%;
margin-bottom: 4px;
}
#scroll .horizontal img {
height: 100%;
margin-right: 4px;
}
/* **** */
.scroller {
width:100%;
background-color:#302050;
height:32px !important;
color: #a0a0c0;
cursor: pointer;
border-color:yellow;
border-width:3px !important;
}
.scroller:hover {
width:100%;
background-color:#503070;
color: #808080;
cursor: pointer;
}

View file

@ -1,59 +0,0 @@
<aside id="features" class="left">
<header data-title="Menu">
<nav class="right box">
<a href="#settings" data-router="section" data-async="app/settings.html" class="buttons" data-icon="settings"></a>
</nav>
</header>
<article class="list scroll active" >
<ul>
<!-- Basic Layout -->
<li>
<a href="#assembler" data-router="section" data-title="Assembler" data-async="app/asm.html">
<strong>Assembler</strong>
</a>
</li>
<li>
<a href="#disasm" data-router="section" data-title="Disassembly" data-async="app/disasm.html">
<strong>Disassembly</strong>
</a>
</li>
<!-- Layout & Navigation -->
<li>
<a href="#hexdump" data-router="section" data-async="app/hexdump.html">
<strong>Hexdump</strong>
</a>
</li>
<li>
<a href="#console" data-router="section" data-async="app/console.html">
<strong>Console</strong>
<!-- <div class="tag right">5</div> -->
</a>
</li>
<li>
<a href="#logs" data-router="section" data-async="app/logs.html">
<strong>Logs</strong>
<!-- <div class="tag right">5</div> -->
</a>
</li>
<li>
<a href="#sections" data-router="section" data-async="app/sections.html">
<strong>Sections</strong>
<div class="tag right">7</div>
</a>
</li>
<li>
<a href="#symbols" data-router="section" data-async="app/symbols.html">
<strong>Symbols</strong>
<div class="tag right">24</div>
</a>
</li>
<li>
<a href="#settings" data-router="section" data-async="app/settings.html">
<strong>Settings</strong>
<!-- <div class="tag right">5</div> -->
</a>
</li>
</ul>
</article>
</aside>

View file

@ -1,37 +0,0 @@
<section id="assembler" class="list scroll" style="overflow:hidden">
<header data-title="Assembler">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
</header>
<article id="assembler-article" class="active list scroll" style="background-color:white;font-size:12px">
<ul>
<li>
<form action="javascript:r2ui.assembleOpcode()">
<input autocapitalize="off" style="height:32px;width:99%"
type="text" placeholder="" id="assembleOpcode" value="nop"></input>
</form>
</li>
<ul>
<li>
<form action="javascript:r2ui.assembleBytes()">
<input autocapitalize="off" style="height:32px;width:99%"
type="text" placeholder="" id="assembleBytes" value="90"></input>
</form>
</li>
<li>
<div class="two columns right">
<a href="javascript:r2ui.assembleWrite()" class="button big red" data-label="Write" data-icon="pencil"></a>
</div>
<div class="four columns left">
<form action="javascript:r2ui.assembleWrite()">
<input autocapitalize="off" style="height:32px;width:99%"
type="text" placeholder="" id="assembleOffset" value="entry0"></input>
</form>
</div>
<br /><br />&nbsp;
</li>
</ul>
</article>
</section>

View file

@ -1,24 +0,0 @@
<section id="console" class="list scroll" style="overflow:hidden">
<header data-title="Console">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
</header>
<article id="hexdump-normal" class="active list scroll indented" style="background-color: white;">
<table style="width:100%;height:90%;margin:5px">
<tr style="height:34px"><td>
<form action="javascript:r2ui.consoleExec()">
<input autocapitalize="off" style="height:32px;width:99%"
type="text" placeholder="" id="consoleEntry"></input>
</form>
</td></tr>
<tr style="width:100%;height:100%"><td>
<div style="background-color:#202020;width:100%;height:100%">
<pre id="consoleBody" style="color:white;margin:0px;">
</pre>
</div>
</td></tr>
</table>
</article>
</section>

View file

@ -1,39 +0,0 @@
<section id="disasm" class="list scroll" style="overflow:hidden">
<img src="icon.png" onload="r2ui.initDisasm()"></img>
<header data-title="Disassembly">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
<nav class="right">
<a href="javascript:r2ui.initDisasm()" class="button" data-icon="refresh" data-label=""></a>
</nav>
<nav class="right">
<a href="javascript:r2ui.initDisasm()" class="button" data-icon="right" data-label=""></a>
</nav>
<nav class="right">
<a href="javascript:r2ui.seek('entry0',function(x) {r2ui.initDisasm()});" class="button" data-icon="home" data-label=""></a>
</nav>
<nav class="right">
<a href="javascript:r2ui.initDisasm()" class="button" data-icon="left" data-label=""></a>
</nav>
</header>
<article id="disasm-article" class="active list scroll" style="background-color:white;font-size:12px">
<div id="less" class="scroller" onclick="less()">
<center> (previous page) </center>
</div>
<pre style="margin:10px;font-family:monospace" id="disasmBody">
<br /><br />
<br /><br />
<center>
<h1><a href="javascript:r2ui.initDisasm()">init</a></h1>
</center>
<br /><br />
<br /><br />
</pre>
<div id="more" class="scroller" onclick="more()">
<center> (next page) </center>
</div>
</article>
</section>

View file

@ -1,14 +0,0 @@
<section id="hexdump" class="list scroll" style="overflow:hidden">
<img src="icon.png" onload="r2ui.initHexdump()"> </img>
<header data-title="Hexdump">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
<nav class="right">
<a href="javascript:r2ui.initHexdump()" class="button" data-icon="refresh" data-label=""></a>
</nav>
</header>
<article id="hexdump-normal" class="active list scroll indented" style="background-color: white">
<pre style="margin-left:15px" id="hexdumpBody"></pre>
</article>
</section>

View file

@ -1,27 +0,0 @@
<section id="logs" class="list scroll" style="overflow:hidden">
<header data-title="Logs">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
<nav class="right">
<a href="#" data-router="article" class="button" data-icon="multiply" data-label="reset"></a>
</nav>
</header>
<article id="logs-normal" class="active list scroll indented" style="background-color: white;">
<table style="width:100%;height:90%;margin:5px">
<tr style="height:34px"><td>
<form action="javascript:r2ui.sendMessage()">
<input autocapitalize="off" style="height:32px;width:99%"
type="text" placeholder="" id="logsEntry"></input>
</form>
</td></tr>
<tr style="width:100%;height:100%"><td>
<div style="background-color:#202020;width:100%;height:100%">
<pre id="logsBody" style="color:white;margin:0px;">
</pre>
</div>
</td></tr>
</table>
</article>
</section>

View file

@ -1,14 +0,0 @@
<section id="sections" class="list scroll" style="overflow:hidden">
<img src="icon.png" onload="r2ui.initSections()"></img>
<header data-title="Sections">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
</header>
<article id="sectionsBody" class="active list scroll" style="background-color:white">
<!-- filled by js -->
<br /><br /><center>
<a href="javascript:r2ui.initSections()">init</a>
</center>
</article>
</section>

View file

@ -1,87 +0,0 @@
<section id="settings" class="list scroll" style="overflow:hidden">
<header data-title="Settings">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
</header>
<article id="settings-main" class="active list scroll" style="background-color:white;">
<form style="margin:10px">
<br />
<p style="font-size:28px;font-weight:bold">CPU</p>
<br />
<table width="300" style="left-margin:5px"> <tr>
<td style="font-size:18px">arch</td>
<td> <label class="select">
<select class="custom">
<option value="x86">x86</option>
<option value="ppc">ppc</option>
<option value="arm">arm</option>
<option value="mips">mips</option>
</select>
</label>
</td></tr>
<tr> <td style="font-size:18px">bits</td>
<td> <label class="select">
<select class="custom">
<option value="8">8</option>
<option value="16">16</option>
<option value="32">32</option>
<option value="64">64</option>
</select>
</label>
</td></tr>
<tr> <td style="font-size:18px">endian</td>
<td> <label class="select">
<select class="custom">
<option value="0">little</option>
<option value="1">big</option>
</select>
</label>
</td></tr>
</table>
<br />
<p style="font-size:28px;font-weight:bold">Disassembly</p>
<br />
<table width="300">
<tr><td style="font-size:18px">show bytes</td>
<td> <input type="range" min="0" max="1" class="checkbox left" value="0"></input>
</td></tr>
<tr><td style="font-size:18px">show offset</td>
<td> <input type="range" min="0" max="1" class="checkbox left active" value="1"></input>
</td></tr>
<tr><td style="font-size:18px">show lines</td>
<td> <input type="range" min="0" max="1" class="checkbox left" value="0"></input>
</td></tr>
</table>
<br />
<p style="font-size:28px;font-weight:bold">About</p>
<br />
<p style="font-size:18px">
author: <a target="_blank" href="http://twitter.com/trufae">pancake</a><br />
<br />
version: 0.9.3git<br />
<br />
website: <a target="_blank" href="http://www.radare.org/">www.radare.org</a><br />
</p>
<!--
<br />
<div class="one row">
<input type="range" min="0" max="1" class="checkbox left" value="0">
</input>
<input type="range" min="0" max="1" class="checkbox right active" value="1">
</input>
</div>
<div id="progress-normal" data-progress="25%"></div>
<div class="four columns left">
<a href="#" class="button big theme" data-label="Accept" data-icon="check"></a>
</div>
<div class="four columns right">
<a href="#" class="button big red" data-label="Cancel" data-icon="close"></a>
</div>
-->
</form>
</article>
</section>

View file

@ -1,15 +0,0 @@
<section id="symbols" class="list scroll" style="overflow:hidden">
<img src="icon.png" onload="r2ui.initSymbols()"></img>
<header data-title="Symbols">
<nav class="box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
</header>
<article id="symbolsBody" class="active list scroll" style="background-color:white">
<br /><br />
<center>
<a href="javascript:r2ui.initSymbols()">load</a>
</center>
<!-- filled by js -->
</article>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,101 +0,0 @@
<html>
<head>
<meta charset="utf-8"></meta>
<title>r2wui</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="./style.css" />
<link rel="stylesheet" href="./app.css" />
<link rel="stylesheet" href="./lungo.css" />
<link rel="stylesheet" href="./lungo.icon.css" />
<link rel="stylesheet" href="./lungo.icon.brand.css" />
<link rel="stylesheet" href="./lungo.theme.default.css" />
<link href="icon.png" sizes="57x57" rel="apple-touch-icon">
<script src="r2.js"> </script>
<script src="r2ui.js"> </script>
<!-- <script src="window.js"> </script> -->
</head>
<body class="app" onload="init()">
<section id="main" data-transition="slide">
<header class="">
<nav class="left box">
<a href="#features" data-router="aside" data-icon="menu"></a>
</nav>
<div class="left">
<div class="centered title with-subtitle">
r2wui
<font style="font-size:10px">radare2 web frontend</font>
</div>
</div>
</header>
<article id="settings" data-transition="slide" class="active list scroll" style="background-color:white;overflow:hidden">
<br />
<br />
<center>
<img src="icon.png">
<br />
<h1><a href="/old">click here to use the old ui</a></b></h1>
<br /><br />
<h1><a href="/enyo">click here to use the enyo ui</a></b></h1>
</center>
</article>
<script src="./quo.js"></script>
<script src="./lungo.js"></script>
<script>
Lungo.init ({
name: 'r2wui',
version: 0.1,
resources: [
'app/aside.html'
]
});
</script>
<!-- windows
<div id="exampleB" style="position:fixed!important;top:200px;left:10;width:250px;height:350px;background-color:#e0e0e0;border: 1px solid black;z-index:999">
<div id="exampleBHandle" style="height:20px;left:0px;top:0px;cursor:move;width:248px;background-color:#20a0e0;font-weight:bold;color:white;z-index:1000;border:1px solid black">&nbsp;Registers</div>
<div style="margin:5px">
<br /><br />
<pre>
eax = 0x33441100
ebx = 0x00000000
ecx = 0x00000005
edx = 0x08049204
esp = 0x0bff428a
ebp = 0x0bff428a
eip = 0x08048520
</pre>
<div class="two columns left" style="width:100px">
<a href="#" class="button big theme" data-label="" data-icon="right">Step</a>
</div>
<div class="two columns right" style="width:120px">
<a href="#" class="button big red" data-label="" data-icon="plus">Continue</a>
</div>
</div>
</div>
<script type="text/javascript">
var exampA = null;
var exampB = null;
function initialize() {
exampA = new dragObject("exampleB", null,
new Position(0,0), new Position(0,0),
null, null, exampleAEnd, false);
exampA.StartListening();
exampB = new dragObject("exampleB", "exampleBHandle");
exampB.StartListening();
}
function exampleAEnd() {
// alert("Drag Ended.");
}
initialize ();
</script>
-->
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,41 +0,0 @@
/*
http://www.github.com/tapquo/lungo/blob/master/LICENSE.txt
@version 2.0
@link https://github.com/TapQuo/Lungo.js
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
var Lungo=Lungo||{};Lungo.VERSION="2.0";Lungo.Attributes||(Lungo.Attributes={});Lungo.Element||(Lungo.Element={});Lungo.Data||(Lungo.Data={});Lungo.Sugar||(Lungo.Sugar={});Lungo.View||(Lungo.View={});Lungo.Boot||(Lungo.Boot={});Lungo.Device||(Lungo.Device={});Lungo.ready||(Lungo.ready=Quo().ready);Lungo.init=function(b){b&&b.resources&&Lungo.Resource.load(b.resources);Lungo.Boot.Events.init();Lungo.Boot.Data.init();Lungo.Boot.Layout.init()};Lungo.Core=function(b,i){var a=Array.prototype,l=function(c,f){return i.isOwnProperty(c,f)},g=function(c){return i.toType(c)},m=function(c){return a.slice.call(c,0)};return{log:function(c,f){b.Core.isMobile()||console[c===1?"log":c===2?"warn":"error"](f)},execute:function(){var c=m(arguments),f=c.shift();g(f)==="function"&&f.apply(null,c)},bind:function(c,f){return function(){return f.apply(c,m(arguments))}},mix:function(){for(var c=c||{},f=0,h=arguments.length;f<h;f++){var d=arguments[f],k;for(k in d)if(l(d,
k))c[k]=d[k]}return c},isOwnProperty:l,toType:g,toArray:m,isMobile:function(){return i.isMobile()},environment:function(){return i.environment()},orderByProperty:function(c,f,h){var d=h==="desc"?-1:1;return c.sort(function(k,n){return k[f]<n[f]?-d:k[f]>n[f]?d:0})},parseUrl:function(c){var f=c.lastIndexOf("#");if(f>0)c=c.substring(f);else if(f===-1)c="#"+c;return c},findByProperty:function(c,f,h){for(var d=null,k=0,n=c.length;k<n;k++){var p=c[k];if(p[f]==h){d=p;break}}return d}}}(Lungo,Quo);Lungo.dom=function(b){return $$(b)};Lungo.Service=function(b,i){var a={MINUTE:"minute",HOUR:"hour",DAY:"day"},l=function(g,m){var c=false,f=b.Data.Storage.persistent("lungojs_service_cache");if(f){f=f[g];c=(new Date).getTime();f=(new Date(f)).getTime();var h=c-f;c=m.split(" ");f=c[1];h=h/1E3/60;if(f.indexOf(a.HOUR)>=0)h/=60;else if(f.indexOf(a.DAY)>=0)h=h/60/24;c=h<c[0]?true:false}return c};return{get:function(g,m,c,f){return i.get(g,m,c,f)},post:function(g,m,c,f){return i.post(g,m,c,f)},json:function(g,m,c){return i.json(g,m,c)},cache:function(g,
m,c,f,h){var d=g+i.serializeParameters(m);if(l(d,c)){if(g=b.Data.Storage.persistent(d))return f.call(f,g)}else return i.get(g,m,function(k){var n=b.Data.Storage.persistent("lungojs_service_cache")||{};n[d]=new Date;b.Data.Storage.persistent("lungojs_service_cache",n);b.Data.Storage.persistent(d,k);f.call(f,k)},h)},Settings:i.ajaxSettings}}(Lungo,Quo);Lungo.Constants={ELEMENT:{SECTION:"section",ARTICLE:"article",ASIDE:"aside",BODY:"body",DIV:"div",LIST:"<ul></ul>",LI:"li"},QUERY:{LIST_IN_ELEMENT:"article.list, aside.list",ELEMENT_SCROLLABLE:"aside.scroll, article.scroll"},CLASS:{ACTIVE:"active",ASIDE:"aside",SHOW:"show",HIDE:"hide",HIDING:"hiding",RIGHT:"right",LEFT:"left",HORIZONTAL:"horizontal",SMALL:"small"},TRIGGER:{LOAD:"load",UNLOAD:"unload"},TRANSITION:{DURATION:350},ATTRIBUTE:{ID:"id",HREF:"href",TITLE:"title",ARTICLE:"article",CLASS:"class",
WIDTH:"width",HEIGHT:"height",PIXEL:"px",PERCENT:"%",ROUTER:"router",FIRST:"first",LAST:"last",EMPTY:""},BINDING:{START:"{{",END:"}}",KEY:"value",SELECTOR:"{{value}}"},ERROR:{DATABASE:"ERROR: Connecting to Data.Sql.",DATABASE_TRANSACTION:"ERROR: Data.Sql >> ",ROUTER:"ERROR: The target does not exists >>",LOADING_RESOURCE:"ERROR: Loading resource: "}};Lungo.Events=function(b){return{init:function(i){for(event in i){var a=event.indexOf(" ");if(a>0){var l=event.substring(0,a);a=event.substring(a+1);b.dom(a).on(l,i[event])}}}}}(Lungo);Lungo.Notification=function(b,i){var a=[],l=null,g=null,m=b.Constants.BINDING,c={BODY:"body",NOTIFICATION:".notification",MODAL:".notification .window",MODAL_HREF:".notification .window a",WINDOW_CLOSABLE:".notification > [data-action=close], .notification > .error, .notification > .success",CONFIRM_BUTTONS:".notification .confirm a.button"},f={MODAL:"modal",VISIBLE:"visible",SHOW:"show",WORKING:"working",INPUT:"input"},h=function(){g.removeClass("show");setTimeout(function(){l.style("display","none").removeClass("html").removeClass("confirm").removeClass("notify").removeClass("growl")},
150)},d=function(e,j){l.show();g.removeClass(f.SHOW);g.removeClass("error").removeClass("success").removeClass("html").removeClass("growl");g.addClass(j);g.html(e);setTimeout(function(){g.addClass(f.SHOW)},1)},k=function(e,j){e!==i&&e!==0&&setTimeout(function(){h();j&&setTimeout(j,200)},e*1E3)},n=function(e,j,o){j=!j?"&nbsp;":j;return'<span class="icon '+o+'"></span><strong class="text bold">'+e+"</strong><small>"+j+"</small>"},p=function(e,j){return'<a href="#" data-callback="'+j+'" class="button anchor large text thin">'+
e.label+"</a>"};b.dom(c.BODY).append('<div class="notification"><div class="window"></div></div>');l=b.dom(c.NOTIFICATION);g=l.children(".window");(function(){b.dom(c.CONFIRM_BUTTONS).tap(function(){var e=b.dom(this);(e=a[e.data("callback")].callback)&&e.call(e);h()});b.dom(c.WINDOW_CLOSABLE).tap(h)})();return{show:function(e,j,o,q){e=e!==i?n(e,null,j):b.Attributes.Data.loading.html.replace(m.START+m.KEY+m.END,"icon white");d(e,"growl");k(o,q)},hide:h,error:function(e,j,o,q,t){d(n(e,j,o),"error");
q&&k(q,t)},success:function(e,j,o,q,t){d(n(e,j,o),"success");q&&k(q,t)},confirm:function(e){a=e;var j=n(e.title,e.description,e.icon);j+=p(e.accept,"accept");j+=p(e.cancel,"cancel");d(j,"confirm")},html:function(e,j){e+=j?'<a href="#" class="button large anchor" data-action="close">Close</a>':"";d(e,"html")}}}(Lungo);Lungo.Fallback=function(b){return{fixPositionInAndroid:function(){env=b.Core.environment();env.isMobile&&env.os.name==="Android"&&env.os.version<"3"?b.dom(document.body).data("position","absolute"):b.dom(document.body).data("position","fixed")}}}(Lungo);Lungo.Resource=function(b,i){var a=b.Constants.ELEMENT,l=b.Constants.ERROR,g=function(c){try{var f=m(c);b.Core.toType(f)==="string"&&b.dom(a.BODY).append(f)}catch(h){b.Core.log(3,h.message)}},m=function(c){return i.ajax({url:c,async:false,dataType:"html",error:function(){console.error(l.LOADING_RESOURCE+c)}})};return{load:function(c){if(b.Core.toType(c)==="array")for(var f=0,h=c.length;f<h;f++)g(c[f]);else g(c)}}}(Lungo,Quo);(function(b,i){var a=b.document,l=a.documentElement,g="ontouchmove"in a,m="WebkitOverflowScrolling"in l.style||!g&&b.screen.width>1200||function(){var e=b.navigator.userAgent,j=e.match(/AppleWebKit\/([0-9]+)/),o=j&&j[1],q=j&&o>=534;return e.match(/Android ([0-9]+)/)&&RegExp.$1>=3&&q||e.match(/ Version\/([0-9]+)/)&&RegExp.$1>=0&&b.blackberry&&q||e.indexOf(/PlayBook/)>-1&&RegExp.$1>=0&&q||e.match(/Fennec\/([0-9]+)/)&&RegExp.$1>=4||e.match(/wOSBrowser\/([0-9]+)/)&&RegExp.$1>=233&&q||e.match(/NokiaBrowser\/([0-9\.]+)/)&&
parseFloat(RegExp.$1)===7.3&&j&&o>=533}(),c=function(e,j,o,q){return o*((e=e/q-1)*e*e+1)+j},f=false,h,d=function(e,j){var o=0,q=e.scrollLeft,t=e.scrollTop,r={top:"+0",left:"+0",duration:100,easing:b.overthrow.easing},v,w;if(j)for(var z in r)if(j[z]!==i)r[z]=j[z];if(typeof r.left==="string"){r.left=parseFloat(r.left);v=r.left+q}else{v=r.left;r.left-=q}if(typeof r.top==="string"){r.top=parseFloat(r.top);w=r.top+t}else{w=r.top;r.top-=t}h=setInterval(function(){if(o++<r.duration){e.scrollLeft=r.easing(o,
q,r.left,r.duration);e.scrollTop=r.easing(o,t,r.top,r.duration)}else{if(v!==e.scrollLeft)e.scrollLeft=v;if(w!==e.scrollTop)e.scrollTop=w;n()}},1);return{top:w,left:v,duration:r.duration,easing:r.easing}},k=function(e,j){return!j&&e.className&&e.className.indexOf("scroll")>-1&&e||k(e.parentNode)},n=function(){clearInterval(h)},p=function(){if(!f){f=true;if(m||g)l.className+=" scroll-enabled";b.overthrow.forget=function(){l.className=l.className.replace("scroll-enabled","");a.removeEventListener&&a.removeEventListener("touchstart",
z,false);b.overthrow.easing=c;f=false};if(!(m||!g)){var e,j=[],o=[],q,t,r=function(){var s=(j[0]-j[j.length-1])*8,u=(o[0]-o[o.length-1])*8,y=Math.max(Math.abs(u),Math.abs(s))/8;s=(s>0?"+":"")+s;u=(u>0?"+":"")+u;if(!isNaN(y)&&y>0&&(Math.abs(u)>80||Math.abs(s)>80))d(e,{left:u,top:s,duration:y})},v,w=function(s){v=e.querySelectorAll("textarea, input");for(var u=0,y=v.length;u<y;u++)v[u].style.pointerEvents=s},z=function(s){n();j=[];q=null;o=[];t=null;e=k(s.target);if(!(!e||e===l||s.touches.length>1)){w("none");
var u=e.scrollTop,y=e.scrollLeft,H=e.offsetHeight,I=e.offsetWidth,J=s.touches[0].pageY,K=s.touches[0].pageX,L=e.scrollHeight,M=e.scrollWidth,F=function(x){var A=u+J-x.touches[0].pageY,B=y+K-x.touches[0].pageX,D=A>=(j.length?j[0]:0),E=B>=(o.length?o[0]:0);if(A>0&&A<L-H||B>0&&B<M-I)x.preventDefault();else if(a.createEvent){x=e.parentNode||e.touchchild||e;var C;if(x!==e){C=a.createEvent("HTMLEvents");C.initEvent("touchend",true,true);e.dispatchEvent(C);x.touchchild=e;e=x;x.dispatchEvent(s)}}if(q&&D!==
q){j=[];q=null}if(t&&E!==t){o=[];t=null}q=D;t=E;e.scrollTop=A;e.scrollLeft=B;j.unshift(A);o.unshift(B);j.length>3&&j.pop();o.length>3&&o.pop()},G=function(){r();w("auto");setTimeout(function(){w("none")},450);e.removeEventListener("touchmove",F,false);e.removeEventListener("touchend",G,false)};e.addEventListener("touchmove",F,false);e.addEventListener("touchend",G,false)}};a.addEventListener("touchstart",z,false)}}};b.overthrow={set:p,forget:function(){},easing:c,toss:d,intercept:n,closest:k,support:m?
"native":g&&"polyfilled"||"none"};p()})(this);Lungo.Router=function(b){var i=b.Constants.CLASS,a=b.Constants.ELEMENT,l=b.Constants.TRIGGER,g=b.Constants.ATTRIBUTE,m=function(h){h=b.Core.parseUrl(h);var d=b.Element.Cache.section;if(h!=="#"+d.attr("id")?true:false){var k=d.siblings(a.SECTION+h);if(k.length>0){if(target_transition=k.data("transition")){d.data("transition-origin",d.data("transition"));f(d,target_transition)}d.removeClass(i.SHOW).addClass(i.HIDE);k.removeClass(i.HIDE).addClass(i.SHOW);b.Element.Cache.section=k;b.Element.Cache.article=
k.find(a.ARTICLE+"."+i.ACTIVE);b.Router.History.add(h);c(d,k)}}},c=function(h,d){h.trigger(l.UNLOAD);d.trigger(l.LOAD)},f=function(h,d){h.data("transition",d)};return{section:m,article:function(h,d,k){d=b.Core.parseUrl(d);var n=b.Element.Cache.article;if(d!=="#"+n.attr("id")?true:false){m(h);h=b.Element.Cache.section.find(a.ARTICLE+d);if(h.length>0){if(n.parent("section").attr("id")!==h.parent("section").attr("id"))n=b.Element.Cache.section.children(a.ARTICLE);n.removeClass(i.ACTIVE).trigger(l.UNLOAD);
h.addClass(i.ACTIVE).trigger(l.LOAD);b.Element.Cache.article=h;b.View.Article.switchNavItems(d);b.View.Article.switchReferenceItems(d,b.Element.Cache.section);k&&b.View.Article.title(k.data(g.TITLE))}}},aside:function(h,d){d=b.Core.parseUrl(d);b.View.Aside.toggle(d)},back:function(){var h=b.Element.Cache.section;h.removeClass(i.SHOW).addClass(i.HIDING);setTimeout(function(){h.removeClass(i.HIDING)},b.Constants.TRANSITION.DURATION);b.Router.History.removeLast();target=h.siblings(a.SECTION+b.Router.History.current());
f(target,target.data("transition-origin"));target.removeClass(i.HIDE).addClass(i.SHOW);b.Element.Cache.section=target;c(h,target)}}}(Lungo);Lungo.Router.History=function(){var b=[],i=function(){return b[b.length-1]};return{add:function(a){a!==i()&&b.push(a)},current:i,removeLast:function(){b.length-=1}}}();Lungo.View.Article=function(b){var i=b.Constants.CLASS,a=b.Constants.ATTRIBUTE,l={NAVIGATION_ITEM:'a[href][data-router="article"]',REFERENCE_LINK:" a[href][data-article]",TITLE_OF_ARTICLE:"header .title, footer .title",ASIDE_REFERENCE_LIST:"li a.active, li.active"};return{title:function(g){g&&b.Element.Cache.section.find(l.TITLE_OF_ARTICLE).text(g)},switchReferenceItems:function(g,m){g=g.replace("#","");for(var c=m.find(l.REFERENCE_LINK),f=0,h=c.length;f<h;f++){var d=b.dom(c[f]);d.data(a.ARTICLE)===
g?d.show():d.hide()}},switchNavItems:function(g){b.Element.Cache.section.find(l.NAVIGATION_ITEM).removeClass(i.ACTIVE);g='a[href="'+g+'"][data-router="article"]';b.Element.Cache.section.find(g).addClass(i.ACTIVE);if(b.Element.Cache.aside){aside=b.Element.Cache.aside;aside.find(l.ASIDE_REFERENCE_LIST).removeClass(i.ACTIVE);aside.find(g).addClass(i.ACTIVE).parent().addClass(i.ACTIVE)}}}}(Lungo);Lungo.View.Aside=function(b){var i=b.Constants.ELEMENT,a=b.Constants.CLASS,l=b.Constants.ATTRIBUTE,g=function(c){var f=null,h=b.Element.Cache.asides.length;if(h==1){if("#"+b.Element.Cache.asides[0].id==c)f=b.dom(b.Element.Cache.asides[0])}else if(h>1)f=b.Element.Cache.asides.siblings(i.ASIDE+c);return f},m=function(c){c=c.attr(l.CLASS);var f="";if(c){f+=c.indexOf(a.RIGHT)>-1?a.RIGHT+" ":"";f+=c.indexOf(a.SMALL)>-1?a.SMALL+" ":""}return f};return{toggle:function(c){if(aside=g(c))aside.hasClass(a.SHOW)?
b.View.Aside.hide():b.View.Aside.show(aside);aside=null},show:function(c){if(b.Core.toType(c)=="string")c=g(b.Core.parseUrl(c));if(c){b.Element.Cache.aside=c;var f=m(c);c.addClass(a.SHOW);b.Element.Cache.section.addClass(f).addClass(a.ASIDE)}},hide:function(){var c=b.Element.Cache.aside;if(c){b.Element.Cache.section.removeClass(a.ASIDE).removeClass(a.RIGHT).removeClass(a.SMALL);var f=m(c);f&&b.Element.Cache.section.removeClass(f);setTimeout(function(){c.removeClass(a.SHOW);b.Element.Cache.aside=null},
350)}}}}(Lungo);Lungo.Element.Cache={sections:null,section:null,article:null,asides:null,aside:null,navigation:null};Lungo.Element.Carousel=function(b,i){var a={index:0,speed:300,callback:i,container:b,element:b.children[0],slide:undefined,slides:[],slides_length:0,width:0,start:{},isScrolling:undefined,deltaX:0},l=function(){a.slides=a.element.children;a.slides_length=a.slides.length;if(a.slides_length<2)return null;a.width="getBoundingClientRect"in a.container?a.container.getBoundingClientRect().width:a.container.offsetWidth;if(!a.width)return null;a.element.style.width=a.slides.length*a.width+"px";for(var c=
a.slides.length;c--;){var f=a.slides[c];f.style.width=a.width+"px";f.style.display="table-cell";f.style.verticalAlign="top"}g(a.index,0);a.container.style.visibility="visible"},g=function(c,f){var h=a.element.style;if(f==undefined)f=a.speed;h.webkitTransitionDuration=h.MozTransitionDuration=h.msTransitionDuration=h.OTransitionDuration=h.transitionDuration=f+"ms";h.MozTransform=h.webkitTransform="translate3d("+-(c*a.width)+"px,0,0)";h.msTransform=h.OTransform="translateX("+-(c*a.width)+"px)";a.index=
c},m=function(){a.callback&&a.callback.apply(a.callback,[a.index,a.slides[a.index]])};l();a.element.addEventListener("touchstart",function(c){a.start={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY,time:Number(new Date)};a.isScrolling=undefined;a.deltaX=0;a.element.style.MozTransitionDuration=a.element.style.webkitTransitionDuration=0;c.stopPropagation()},false);a.element.addEventListener("touchmove",function(c){if(!(c.touches.length>1||c.scale&&c.scale!==1)){a.deltaX=c.touches[0].pageX-a.start.pageX;
if(typeof a.isScrolling=="undefined")a.isScrolling=!!(a.isScrolling||Math.abs(a.deltaX)<Math.abs(c.touches[0].pageY-a.start.pageY));if(!a.isScrolling){c.preventDefault();a.deltaX/=!a.index&&a.deltaX>0||a.index==a.slides_length-1&&a.deltaX<0?Math.abs(a.deltaX)/a.width+1:1;a.element.style.MozTransform=a.element.style.webkitTransform="translate3d("+(a.deltaX-a.index*a.width)+"px,0,0)";c.stopPropagation()}}},false);a.element.addEventListener("touchend",function(c){var f=Number(new Date)-a.start.time<
250&&Math.abs(a.deltaX)>20||Math.abs(a.deltaX)>a.width/2,h=!a.index&&a.deltaX>0||a.index==a.slides_length-1&&a.deltaX<0;a.isScrolling||g(a.index+(f&&!h?a.deltaX<0?1:-1:0),a.speed);c.stopPropagation()},false);a.element.addEventListener("webkitTransitionEnd",m,false);a.element.addEventListener("msTransitionEnd",m,false);a.element.addEventListener("oTransitionEnd",m,false);a.element.addEventListener("transitionend",m,false);window.addEventListener("resize",l,false);return{prev:function(){a.index&&g(a.index-
1,a.speed)},next:function(){a.index<a.slides_length-1?g(a.index+1,a.speed):g(0,a.speed)},position:function(){return a.index}}};Lungo.Element.count=function(b,i){var a=Lungo.dom(b);a.children(".bubble.count").remove();if(a&&i){html=Lungo.Attributes.Data.count.html.replace(Lungo.Constants.BINDING.SELECTOR,i);a.append(html)}};Lungo.Element.loading=function(b,i){var a=Lungo.dom(b);if(a){var l=null;if(i)l=Lungo.Attributes.Data.loading.html.replace(Lungo.Constants.BINDING.SELECTOR,i);a.html(l)}};Lungo.Element.progress=function(b,i){var a=Lungo.dom(b);if(a){i+=Lungo.Constants.ATTRIBUTE.PERCENT;a.find(".value").style(Lungo.Constants.ATTRIBUTE.WIDTH,i)}};Lungo.Element.Pull=function(b,i){var a=0,l=false,g=$$(b),m=g.siblings('div[data-control="pull"]'),c;c=Lungo.Core.mix({onPull:"Pull down to refresh",onRelease:"Release to...",onRefresh:"Loading...",callback:undefined},i);var f=function(){h(0,true);setTimeout(function(){l=false;document.removeEventListener("touchmove",e,false)},300);a=0},h=function(j,o){var q=j>80?80:j;o&&g.addClass("pull");g.style("-webkit-transform","translate(0, "+q+"px)");o&&setTimeout(function(){g.removeClass("pull")},300)},d=
function(){l=true;document.addEventListener("touchmove",e,false);k(c.onRefresh);n(true);h(60,true);c.callback&&c.callback.apply(this)},k=function(j){m.find("strong").html(j)},n=function(j){j?m.addClass("refresh"):m.removeClass("refresh")},p=function(j){j?m.addClass("rotate"):m.removeClass("rotate")},e=function(j){j.preventDefault()};(function(){var j=false,o={};g.bind("touchstart",function(q){if(g[0].scrollTop<=1){j=true;o=$$.isMobile()?q.touches[0].pageY:q.pageY}}).bind("touchmove",function(q){if(!l&&
j){current_y=$$.isMobile()?q.touches[0].pageY:q.pageY;a=current_y-o;if(a>=0){g.style("overflow-y","hidden");h(a,false);n(false);if(a>60){k(c.onRelease);p(true)}else{k(c.onPull);p(false)}}}}).bind("touchend",function(){if(j){g.style("overflow-y","scroll");a>60?d():f()}INI_TOUCH={};j=false})})();return{hide:f}};Lungo.Data.Cache=function(b,i){var a={},l=function(m){return arguments.length===1?a[m]:a[arguments[0]]?a[arguments[0]][arguments[1]]:i},g=function(m){return a[m]?true:false};return{set:function(m,c){a[m]=g(m)?b.Core.mix(l(m),c):c},get:l,remove:function(m){if(arguments.length===1)delete a[m];else delete a[arguments[0]][arguments[1]]},exists:g}}(Lungo);Lungo.Data.Sql=function(b){var i=b.Constants.ERROR,a={name:"lungo_db",version:"1.0",size:65536,schema:[]},l=null,g=function(d,k){b.Core.log(1,"lng.Data.Sql >> "+d);l.transaction(function(n){n.executeSql(d,[],function(p,e){c(k,e)},function(p){p.executedQuery=d;h.apply(null,arguments)})})},m=function(d,k){var n="",p;for(p in d)if(b.Core.isOwnProperty(d,p)){var e=d[p];if(n)n+=" "+k+" ";n+=p+"=";n+=isNaN(e)?'"'+e+'"':e}return n},c=function(d,k){b.Core.toType(d)==="function"&&setTimeout(d,100,k)},f=function(d,
k){var n="",p="",e;for(e in k)if(b.Core.isOwnProperty(k,e)){var j=k[e];n+=n?", "+e:e;if(p)p+=", ";p+=isNaN(j)||j==""?'"'+j+'"':j}g("INSERT INTO "+d+" ("+n+") VALUES ("+p+")")},h=function(d,k){throw Error(i.DATABASE_TRANSACTION+k.code+": "+k.message+" \n Executed query: "+d.executedQuery);};return{init:function(d){a=b.Core.mix(a,d);if(l=openDatabase(a.name,a.version,a.name,a.size)){d=a.schema;var k=d.length;if(k)for(var n=0;n<k;n++){var p=d[n];p.drop===true&&g("DROP TABLE IF EXISTS "+p.name);var e=
p.name;p=p.fields;var j="",o=void 0;for(o in p)if(b.Core.isOwnProperty(p,o)){if(j)j+=", ";j+=o+" "+p[o]}g("CREATE TABLE IF NOT EXISTS "+e+" ("+j+");")}}else throw Error(i.DATABASE);},select:function(d,k,n){k=k?" WHERE "+m(k,"AND"):"";g("SELECT * FROM "+d+k,function(p){for(var e=[],j=0,o=p.rows.length;j<o;j++)e.push(p.rows.item(j));c(n,e)})},insert:function(d,k){if(b.Core.toType(k)==="object")f(d,k);else for(row in k)f(d,k[row])},update:function(d,k,n){d="UPDATE "+d+" SET "+m(k,",");if(n)d+=" WHERE "+
m(n,"AND");g(d)},drop:function(d,k){var n=k?" WHERE "+m(k,"AND"):"";g("DELETE FROM "+d+n+";")},execute:g}}(Lungo);Lungo.Data.Storage=function(){var b={PERSISTENT:"localStorage",SESSION:"sessionStorage"},i=function(a,l,g){a=window[a];if(g){a=a;g=g;g=JSON.stringify(g);a.setItem(l,g)}else if(g===null)a.removeItem(l);else{value=a.getItem(l);return JSON.parse(value)}};return{session:function(a,l){return i(b.SESSION,a,l)},persistent:function(a,l){return i(b.PERSISTENT,a,l)}}}(Lungo);Lungo.Attributes.Data={count:{selector:"*",html:'<span class="tag theme count">{{value}}</span>'},pull:{selector:"section",html:'<div class="{{value}}" data-control="pull" data-icon="down" data-loading="black"> <strong>title</strong> </div>'},progress:{selector:"*",html:'<div class="progress"> <span class="bar"><span class="value" style="width:{{value}};"></span></span> </div>'},label:{selector:"*",html:"<abbr>{{value}}</abbr>"},
icon:{selector:"*",html:'<span class="icon {{value}}"></span>'},image:{selector:"*",html:'<img src="{{value}}" class="icon" />'},title:{selector:"header",html:'<span class="title centered">{{value}}</span>'},loading:{selector:"*",html:'<div class="loading {{value}}"> <span class="top"></span> <span class="right"></span> <span class="bottom"></span> <span class="left"></span> </div>'},back:{selector:"header",
html:'<nav class="left"><a href="#back" data-router="section" class="left"><span class="icon {{value}}"></span></a></nav>'}};Lungo.Boot.Events=function(b){var i=b.Constants.ATTRIBUTE,a=b.Constants.ELEMENT,l={HREF_TARGET:"a[href][data-router]",HREF_TARGET_FROM_ASIDE:"aside a[href][data-router]",INPUT_CHECKBOX:"input[type=range].checkbox"},g=function(d){d.preventDefault();d=b.dom(this);d.data("async")?h(d):f(d)},m=function(d){d.preventDefault();b.View.Aside.hide()},c=function(d){d.preventDefault();d=b.dom(this);var k=d.val()>0?0:1;d.toggleClass("active").attr("value",k)},f=function(d){switch(d.data(i.ROUTER)){case a.SECTION:d=
d.attr(i.HREF);d=b.Core.parseUrl(d);d==="#back"?b.Router.back():b.Router.section(d);break;case a.ARTICLE:var k=b.Router.History.current(),n=d.attr(i.HREF);b.Router.article(k,n,d);break;case a.ASIDE:k=b.Router.History.current();d=d.attr(i.HREF);b.Router.aside(k,d)}},h=function(d){b.Notification.show();b.Resource.load(d.data("async"));d[0].removeAttribute("data-async");b.Boot.Data.init(d.attr(i.HREF));setTimeout(function(){f(d);b.Notification.hide()},b.Constants.TRANSITION.DURATION*2)};return{init:function(){b.dom(l.HREF_TARGET_FROM_ASIDE).tap(m);
b.dom(l.HREF_TARGET).tap(g);b.dom(l.INPUT_CHECKBOX).touch(c)}}}(Lungo);Lungo.Boot.Data=function(b){var i=b.Constants.BINDING,a=function(l,g){attribute=b.Attributes.Data[g];l.find(attribute.selector+"[data-"+g+"]").each(function(m,c){var f=b.dom(c),h=f.data(g);h=attribute.html.replace(i.START+i.KEY+i.END,h);f.prepend(h)})};return{init:function(l){l=b.dom(l||document.body);if(l.length>0)for(var g in b.Attributes.Data)b.Core.isOwnProperty(b.Attributes.Data,g)&&a(l,g)}}}(Lungo);Lungo.Boot.Layout=function(b){var i=b.Constants.ELEMENT,a=b.Constants.CLASS,l=b.Constants.ATTRIBUTE,g=b.Constants.QUERY,m=function(h,d){for(var k=b.dom(h),n=0,p=k.length;n<p;n++){var e=b.dom(k[n]);b.Core.execute(d,e)}},c=function(h){if(h.children().length===0){h.attr(l.ID);h.append(i.LIST)}},f=function(h){h[0].addEventListener("touchstart",function(){scrollTop=this.scrollTop;if(scrollTop<=1)this.scrollTop=1;if(scrollTop+this.offsetHeight>=this.scrollHeight)this.scrollTop=this.scrollHeight-this.offsetHeight-
1},false)};return{init:function(){b.Element.Cache.asides=b.dom(i.ASIDE);b.Fallback.fixPositionInAndroid();var h=b.dom(i.SECTION).first().addClass(a.SHOW);b.Element.Cache.section=h;b.Element.Cache.article=h.children(i.ARTICLE+"."+a.ACTIVE);h="#"+h.attr(l.ID);b.Router.History.add(h);m(g.LIST_IN_ELEMENT,c);m(g.ELEMENT_SCROLLABLE,f)}}}(Lungo);

View file

@ -1,567 +0,0 @@
/**
* Stylesheet
*
* @namespace Lungo.Theme
* @class Default
*
* @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
@import url("http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700");
/* -------------------------- THEME -------------------------- */
body {
background-color: #222;
font-family: "Helvetica Neue", "Open Sans", Helvetica, Arial, sans-serif;
font-weight: 400;
font-size: 13px;
line-height: 1.3em;
letter-spacing: -0.05em;
}
.theme,
li.theme,
a.theme {
background-color: THEME-light;
}
.theme:active,
li.theme:active,
a.theme:active {
background-color: #0093d5;
}
[data-control="pull"] {
color: #666;
-webkit-text-shadow: 0 1px 0 #fff;
-moz-text-shadow: 0 1px 0 #fff;
text-shadow: 0 1px 0 #fff;
}
/* -------------------------- LAYOUT COLORS -------------------------- */
section > header {
background-color: #0093d5;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #03b1ff, inset 0 -1px 0 #007db5;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #03b1ff, inset 0 -1px 0 #007db5;
box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #03b1ff, inset 0 -1px 0 #007db5;
color: #fff;
}
section > footer,
section nav.groupbar {
background-color: #222;
-webkit-box-shadow: inset 0 3px 0 #1d1d1d;
-moz-box-shadow: inset 0 3px 0 #1d1d1d;
box-shadow: inset 0 3px 0 #1d1d1d;
}
section > article,
section > [data-control="pull"] {
background-color: #f4f5f5;
}
section > article.splash,
section > [data-control="pull"].splash {
background: #0093d5;
color: #fff;
}
section.aside {
-webkit-box-shadow: -1px 0 2px rgba(0,0,0,0.2);
-moz-box-shadow: -1px 0 2px rgba(0,0,0,0.2);
box-shadow: -1px 0 2px rgba(0,0,0,0.2);
}
section.aside.right {
-webkit-box-shadow: 1px 0 2px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 0 2px rgba(0,0,0,0.2);
box-shadow: 1px 0 2px rgba(0,0,0,0.2);
}
aside {
background-color: #1d1d1d;
color: #fff;
}
aside > header,
aside > footer {
background-color: #181818;
}
aside > header {
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #222, inset 0 -1px 0 #141414;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #222, inset 0 -1px 0 #141414;
box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 #222, inset 0 -1px 0 #141414;
}
/* -------------------------- NAVIGATION -------------------------- */
section > header > nav a {
color: #fff;
}
section > header > nav.box:not(.right) a {
-webkit-box-shadow: 1px 0 0 #03b1ff, inset -1px 0 0 #007db5;
-moz-box-shadow: 1px 0 0 #03b1ff, inset -1px 0 0 #007db5;
box-shadow: 1px 0 0 #03b1ff, inset -1px 0 0 #007db5;
}
section > header > nav.box.right a {
-webkit-box-shadow: -1px 0 0 #03b1ff, inset 1px 0 0 #007db5;
-moz-box-shadow: -1px 0 0 #03b1ff, inset 1px 0 0 #007db5;
box-shadow: -1px 0 0 #03b1ff, inset 1px 0 0 #007db5;
}
section > header > nav.box a:active {
background: #007db5;
}
section > nav.groupbar > a.active {
-webkit-box-shadow: inset 0 -3px 0 #0093d5;
-moz-box-shadow: inset 0 -3px 0 #0093d5;
box-shadow: inset 0 -3px 0 #0093d5;
}
section > footer > nav > a,
nav.groupbar > a {
color: #888;
}
section > footer > nav > a.active,
nav.groupbar > a.active {
color: #fff;
}
section > footer > nav > a {
-webkit-box-shadow: 1px 0 0 #1d1d1d;
-moz-box-shadow: 1px 0 0 #1d1d1d;
box-shadow: 1px 0 0 #1d1d1d;
}
section > footer > nav > a.active {
color: #fff;
background-color: #1d1d1d;
-webkit-box-shadow: inset 0 3px 0 #0093d5;
-moz-box-shadow: inset 0 3px 0 #0093d5;
box-shadow: inset 0 3px 0 #0093d5;
}
aside nav a.active .icon {
color: #fff;
}
aside nav a:not(.active) .icon {
color: #888;
}
aside nav.box:not(.right) a {
-webkit-box-shadow: 1px 0 0 #222, inset -1px 0 0 #141414;
-moz-box-shadow: 1px 0 0 #222, inset -1px 0 0 #141414;
box-shadow: 1px 0 0 #222, inset -1px 0 0 #141414;
}
aside nav.box.right a {
-webkit-box-shadow: -1px 0 0 #222, inset 1px 0 0 #141414;
-moz-box-shadow: -1px 0 0 #222, inset 1px 0 0 #141414;
box-shadow: -1px 0 0 #222, inset 1px 0 0 #141414;
}
aside nav.box a:active {
background: #141414;
}
/* -------------------------- LISTS -------------------------- */
section .list li {
background: #fff;
}
section .list li:not(.anchor) {
border-bottom: inset 1px #ebebeb;
}
section .list li.secondary {
-webkit-box-shadow: inset 4px 0px 0px #bfbfbf;
-moz-box-shadow: inset 4px 0px 0px #bfbfbf;
box-shadow: inset 4px 0px 0px #bfbfbf;
}
section .list li.accept {
-webkit-box-shadow: inset 4px 0px 0px #3fb58e;
-moz-box-shadow: inset 4px 0px 0px #3fb58e;
box-shadow: inset 4px 0px 0px #3fb58e;
}
section .list li.cancel {
-webkit-box-shadow: inset 4px 0px 0px #ee6557;
-moz-box-shadow: inset 4px 0px 0px #ee6557;
box-shadow: inset 4px 0px 0px #ee6557;
}
section .list li,
section .list li a {
color: #333;
}
section .list li.anchor,
section .list li a.anchor {
background: #222;
}
section .list li.dark,
section .list li a.dark {
background: #595959;
}
section .list li.selectable:active,
section .list li a.selectable:active,
section .list li.theme,
section .list li a.theme,
section .list li.active,
section .list li a.active {
background: #03b1ff;
}
section .list li.light,
section .list li a.light {
background: #ebebeb;
color: #7a7a7a;
}
section .list li.dark,
section .list li a.dark,
section .list li.selectable:active,
section .list li a.selectable:active,
section .list li.theme,
section .list li a.theme,
section .list li.anchor,
section .list li a.anchor,
section .list li.dark small,
section .list li a.dark small,
section .list li.selectable:active small,
section .list li a.selectable:active small,
section .list li.theme small,
section .list li a.theme small,
section .list li.anchor small,
section .list li a.anchor small,
section .list li.dark .right:not(.tag),
section .list li a.dark .right:not(.tag),
section .list li.selectable:active .right:not(.tag),
section .list li a.selectable:active .right:not(.tag),
section .list li.theme .right:not(.tag),
section .list li a.theme .right:not(.tag),
section .list li.anchor .right:not(.tag),
section .list li a.anchor .right:not(.tag) {
color: #fff;
}
section .list li small,
section .list li a small,
section .list li .right:not(.tag),
section .list li a .right:not(.tag) {
color: #7a7a7a;
}
.list:not(.indented) li.dark,
.list:not(.indented) li.theme,
.list:not(.indented) li.light {
border-bottom-color: rgba(0,0,0,0.1);
}
aside .list li {
background: none;
}
aside .list li:not(:first-child) {
border-top: solid 1px #222;
}
aside .list li:not(:last-child) {
border-bottom: solid 1px #141414;
}
aside .list li.active {
background: #0093d5;
border-color: transparent;
}
aside .list li.active strong,
aside .list li.active small,
aside .list li.active .icon {
color: #fff;
}
aside .list li strong {
color: #999;
}
aside .list li small,
aside .list li .icon {
color: #666;
}
/* -------------------------- TAG -------------------------- */
.tag {
color: #fff;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
font-weight: 700 !important;
}
.tag.count {
background-color: #0093d5;
}
.tag header .count {
background-color: THEME-dark !important;
}
footer .tag {
-webkit-box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.5);
box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.5);
}
/* -------------------------- NOTIFICATION -------------------------- */
.notification {
color: #fff;
}
.notification .window.growl {
background: rgba(0,0,0,0.8);
}
.notification .window:not(.growl) {
background: #e6e6e6;
color: #222;
-webkit-box-shadow: 0 0 8px #000;
-moz-box-shadow: 0 0 8px #000;
box-shadow: 0 0 8px #000;
}
.notification .window:not(.growl) button,
.notification .window:not(.growl) .button {
background: #fff !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
color: #007db5 !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border: none !important;
margin-bottom: 1px;
}
.notification .window:not(.growl).error {
background: #dd2916;
color: #fff;
}
.notification .window:not(.growl).success {
background: #2f886b;
color: #fff;
}
/* -------------------------- BUTTONS -------------------------- */
a.button,
button {
-webkit-border-radius: FORM-border-radius;
-moz-border-radius: FORM-border-radius;
border-radius: FORM-border-radius;
color: #fff;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
border: solid 1px rgba(0,0,0,0.1);
}
a.button:active,
button:active {
-webkit-box-shadow: inset 0 0 128px rgba(0,0,0,0.25);
-moz-box-shadow: inset 0 0 128px rgba(0,0,0,0.25);
box-shadow: inset 0 0 128px rgba(0,0,0,0.25);
border-color: none;
}
a.button.secondary,
button.secondary {
color: #666 !important;
}
a.button[disabled],
button[disabled] {
background-color: #000;
}
button,
.button,
.tag {
background-color: #007db5;
}
button.secondary,
.button.secondary,
.tag.secondary {
background-color: #bfbfbf;
}
button.accept,
.button.accept,
.tag.accept {
background-color: #3fb58e;
}
button.cancel,
.button.cancel,
.tag.cancel {
background-color: #ee6557;
}
/* -------------------------- BUTTONS -------------------------- */
form label,
.form label {
color: #aaa;
font-weight: 300;
}
form fieldset,
.form fieldset {
background: #fff;
border-bottom: solid 1px #eee;
}
form fieldset .icon,
.form fieldset .icon {
color: #ccc;
}
form input[type="text"],
.form input[type="text"],
form input[type="password"],
.form input[type="password"],
form input[type="date"],
.form input[type="date"],
form input[type="datetime"],
.form input[type="datetime"],
form input[type="email"],
.form input[type="email"],
form input[type="number"],
.form input[type="number"],
form input[type="search"],
.form input[type="search"],
form input[type="tel"],
.form input[type="tel"],
form input[type="time"],
.form input[type="time"],
form input[type="url"],
.form input[type="url"],
form select,
.form select,
form textarea,
.form textarea {
background-color: #fff;
color: rgba(0,0,0,0.75);
border: 1px solid #ddd;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
form input[type="text"].error,
.form input[type="text"].error,
form input[type="password"].error,
.form input[type="password"].error,
form input[type="date"].error,
.form input[type="date"].error,
form input[type="datetime"].error,
.form input[type="datetime"].error,
form input[type="email"].error,
.form input[type="email"].error,
form input[type="number"].error,
.form input[type="number"].error,
form input[type="search"].error,
.form input[type="search"].error,
form input[type="tel"].error,
.form input[type="tel"].error,
form input[type="time"].error,
.form input[type="time"].error,
form input[type="url"].error,
.form input[type="url"].error,
form select.error,
.form select.error,
form textarea.error,
.form textarea.error,
form input[type="text"]:required,
.form input[type="text"]:required,
form input[type="password"]:required,
.form input[type="password"]:required,
form input[type="date"]:required,
.form input[type="date"]:required,
form input[type="datetime"]:required,
.form input[type="datetime"]:required,
form input[type="email"]:required,
.form input[type="email"]:required,
form input[type="number"]:required,
.form input[type="number"]:required,
form input[type="search"]:required,
.form input[type="search"]:required,
form input[type="tel"]:required,
.form input[type="tel"]:required,
form input[type="time"]:required,
.form input[type="time"]:required,
form input[type="url"]:required,
.form input[type="url"]:required,
form select:required,
.form select:required,
form textarea:required,
.form textarea:required {
border-color: color_alert;
color: color_alert;
background-color: rgba(198,15,19,0.1);
}
form input[type="text"]:focus,
.form input[type="text"]:focus,
form input[type="password"]:focus,
.form input[type="password"]:focus,
form input[type="date"]:focus,
.form input[type="date"]:focus,
form input[type="datetime"]:focus,
.form input[type="datetime"]:focus,
form input[type="email"]:focus,
.form input[type="email"]:focus,
form input[type="number"]:focus,
.form input[type="number"]:focus,
form input[type="search"]:focus,
.form input[type="search"]:focus,
form input[type="tel"]:focus,
.form input[type="tel"]:focus,
form input[type="time"]:focus,
.form input[type="time"]:focus,
form input[type="url"]:focus,
.form input[type="url"]:focus,
form select:focus,
.form select:focus,
form textarea:focus,
.form textarea:focus {
background: #fafafa;
border-color: #0093d5;
color: rgba(0,0,0,0.75);
}
form input[type="text"][disabled],
.form input[type="text"][disabled],
form input[type="password"][disabled],
.form input[type="password"][disabled],
form input[type="date"][disabled],
.form input[type="date"][disabled],
form input[type="datetime"][disabled],
.form input[type="datetime"][disabled],
form input[type="email"][disabled],
.form input[type="email"][disabled],
form input[type="number"][disabled],
.form input[type="number"][disabled],
form input[type="search"][disabled],
.form input[type="search"][disabled],
form input[type="tel"][disabled],
.form input[type="tel"][disabled],
form input[type="time"][disabled],
.form input[type="time"][disabled],
form input[type="url"][disabled],
.form input[type="url"][disabled],
form select[disabled],
.form select[disabled],
form textarea[disabled],
.form textarea[disabled] {
background: #eee;
border-color: #aaa;
color: #999;
}
form .select:after,
.form .select:after {
background: #d0d4c6;
color: #fff;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
}
form input[type=range],
.form input[type=range] {
-webkit-box-shadow: 'inset 0 1px 2px rgba(0,0,0,0.1)';
-moz-box-shadow: 'inset 0 1px 2px rgba(0,0,0,0.1)';
box-shadow: 'inset 0 1px 2px rgba(0,0,0,0.1)';
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
form input[type=range]:not(.checkbox),
.form input[type=range]:not(.checkbox) {
background-color: #ddd;
}
form input[type=range]:not(.checkbox):active,
.form input[type=range]:not(.checkbox):active {
background-color: #03b1ff;
}
form input[type=range].checkbox,
.form input[type=range].checkbox {
background-color: #aaa;
color: rgba(255,255,255,0.6);
}
form input[type=range].checkbox.active,
.form input[type=range].checkbox.active {
background-color: #03b1ff;
}
form input[type=range]::-webkit-slider-thumb,
.form input[type=range]::-webkit-slider-thumb {
-webkit-border-radius: FORM-border-radius;
-moz-border-radius: FORM-border-radius;
border-radius: FORM-border-radius;
background: #eee;
-webkit-box-shadow: inset 0 0 1px #bbb;
-moz-box-shadow: inset 0 0 1px #bbb;
box-shadow: inset 0 0 1px #bbb;
}
form input[type=range]::-webkit-slider-thumb::after,
.form input[type=range]::-webkit-slider-thumb::after {
background: #fff;
}
form .progress .bar,
.form .progress .bar {
background-color: #ddd;
}
form .progress .bar .value,
.form .progress .bar .value {
background-color: #03b1ff;
}

View file

@ -1,26 +0,0 @@
/* QuoJS 2.2.0 | http://quojs.tapquo.com | Copyright (C) 2011,2012 Javi Jiménez Villar (@soyjavi) */
(function(){var a;a=function(){var i,h,b;h=[];b=function(f,n){f=f||h;f.__proto__=b.prototype;f.selector=n||"";return f};i=function(f,n){var p;if(f){p=i.getDOMObject(f,n);if(n)f+=" "+n;return b(p,f)}else return b()};i.extend=function(f){Array.prototype.slice.call(arguments,1).forEach(function(n){var p,s;s=[];for(p in n)s.push(f[p]=n[p]);return s});return f};b.prototype=i.fn={};return i}();window.Quo=a;"$$"in window||(window.$$=a)}).call(this);(function(){(function(a){var i,h,b,f,n,p,s,r;i=[];f=Object.prototype;b=/^\s*<(\w+|!)[^>]*>/;n=document.createElement("table");p=document.createElement("tr");h={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:p,th:p,"*":document.createElement("div")};a.toType=function(j){return f.toString.call(j).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};a.isOwnProperty=function(j,m){return f.hasOwnProperty.call(j,m)};a.getDOMObject=function(j,m){var l,d,c;l=null;d=[1,9,11];c=a.toType(j);if(c==="array")l=
s(j);else if(c==="string"&&b.test(j)){l=a.fragment(j.trim(),RegExp.$1);j=null}else if(c==="string"){l=a.query(document,j);if(m)l=l.length===1?a.query(l[0],m):a.map(function(){return a.query(l,m)})}else if(d.indexOf(j.nodeType)>=0||j===window){l=[j];j=null}return l};a.map=function(j,m){var l,d,c;c=[];l=void 0;if(a.toType(j)==="array")for(l=0;l<j.length;){d=m(j[l],l);d!=null&&c.push(d);l++}else for(l in j){d=m(j[l],l);d!=null&&c.push(d)}return r(c)};a.each=function(j,m){var l;l=void 0;if(a.toType(j)===
"array")for(l=0;l<j.length;){if(m.call(j[l],l,j[l])===false)break;l++}else for(l in j)if(m.call(j[l],l,j[l])===false)break;return j};a.mix=function(){var j,m,l,d,c;l={};j=0;for(d=arguments.length;j<d;){m=arguments[j];for(c in m)if(a.isOwnProperty(m,c)&&m[c]!==undefined)l[c]=m[c];j++}return l};a.fragment=function(j,m){var l;if(m==null)m="*";m in h||(m="*");l=h[m];l.innerHTML=""+j;return a.each(Array.prototype.slice.call(l.childNodes),function(){return l.removeChild(this)})};a.fn.map=function(j){return a.map(this,
function(m,l){return j.call(m,l,m)})};a.fn.instance=function(j){return this.map(function(){return this[j]})};a.fn.filter=function(j){return a([].filter.call(this,function(m){return m.parentNode&&a.query(m.parentNode,j).indexOf(m)>=0}))};a.fn.forEach=i.forEach;a.fn.indexOf=i.indexOf;s=function(j){return j.filter(function(m){return m!==void 0&&m!==null})};r=function(j){return j.length>0?[].concat.apply([],j):j}})(Quo)}).call(this);(function(){(function(a){a.fn.attr=function(i,h){return a.toType(i)==="string"&&h===void 0?this[0].getAttribute(i):this.each(function(){return this.setAttribute(i,h)})};a.fn.data=function(i,h){return this.attr("data-"+i,h)};a.fn.val=function(i){return a.toType(i)==="string"?this.each(function(){return this.value=i}):this.length>0?this[0].value:null};a.fn.show=function(){return this.style("display","block")};a.fn.hide=function(){return this.style("display","none")};a.fn.height=function(){return this.offset().height};
a.fn.width=function(){return this.offset().width};a.fn.offset=function(){var i;i=this[0].getBoundingClientRect();return{left:i.left+window.pageXOffset,top:i.top+window.pageYOffset,width:i.width,height:i.height}};a.fn.remove=function(){return this.each(function(){if(this.parentNode!=null)return this.parentNode.removeChild(this)})}})(Quo)}).call(this);(function(){(function(a){var i,h,b,f,n,p,s;b=null;i=/WebKit\/([\d.]+)/;h={Android:/(Android)\s+([\d.]+)/,ipad:/(iPad).*OS\s([\d_]+)/,iphone:/(iPhone\sOS)\s([\d_]+)/,blackberry:/(BlackBerry).*Version\/([\d.]+)/,webos:/(webOS|hpwOS)[\s\/]([\d.]+)/};a.isMobile=function(){b=b||n();return b.isMobile};a.environment=function(){return b=b||n()};a.isOnline=function(){return navigator.onLine};n=function(){var r,j;j=navigator.userAgent;r={};r.browser=f(j);r.os=p(j);r.isMobile=!!r.os;r.screen=s();return r};f=
function(r){var j;return(j=r.match(i))?j[0]:r};p=function(r){var j,m,l;j=null;for(m in h)if(l=r.match(h[m])){j={name:m==="iphone"||m==="ipad"?"ios":m,version:l[2].replace("_",".")};break}return j};s=function(){return{width:window.innerWidth,height:window.innerHeight}}})(Quo)}).call(this);(function(){(function(a){var i;a.fn.text=function(h){return h||a.toType(h)==="number"?this.each(function(){return this.textContent=h}):this[0].textContent};a.fn.html=function(h){var b;b=a.toType(h);return h||b==="number"||b==="null"?this.each(function(){if(b==="string"||b==="number"||b==="null")return this.innerHTML=h;else{this.innerHTML=null;return this.appendChild(h)}}):this[0].innerHTML};a.fn.append=function(h){return this.each(function(){if(a.toType(h)==="string"){if(h)return this.appendChild(i(h))}else return this.insertBefore(h)})};
a.fn.prepend=function(h){return this.each(function(){var b;if(a.toType(h)==="string")return this.innerHTML=h+this.innerHTML;else{b=this.parentNode;return b.insertBefore(h,b.firstChild)}})};a.fn.replaceWith=function(h){return this.each(function(){var b;if(a.toType(h)==="string")h=i(h);(b=this.parentNode)&&b.insertBefore(h,this);return a(this).remove()})};a.fn.empty=function(){return this.each(function(){this.innerHTML=null})};i=function(h){var b;b=document.createElement("div");b.innerHTML=h;return b.firstChild}})(Quo)}).call(this);(function(){(function(a){var i,h;a.query=function(b,f){var n;n=b.querySelectorAll(f);return n=Array.prototype.slice.call(n)};a.fn.find=function(b){var f;f=this.length===1?Quo.query(this[0],b):this.map(function(){return Quo.query(this,b)});return a(f)};a.fn.parent=function(b){var f;f=b?h(this):this.instance("parentNode");return i(f,b)};a.fn.siblings=function(b){var f;f=this.map(function(n,p){return Array.prototype.slice.call(p.parentNode.children).filter(function(s){return s!==p})});return i(f,b)};
a.fn.children=function(b){var f;f=this.map(function(){return Array.prototype.slice.call(this.children)});return i(f,b)};a.fn.get=function(b){return b===undefined?this:this[b]};a.fn.first=function(){return a(this[0])};a.fn.last=function(){return a(this[this.length-1])};a.fn.closest=function(b,f){var n,p;p=this[0];n=a(b);for(n.length||(p=null);p&&n.indexOf(p)<0;)p=p!==f&&p!==document&&p.parentNode;return a(p)};a.fn.each=function(b){this.forEach(function(f,n){return b.call(f,n,f)});return this};h=function(b){var f;
for(f=[];b.length>0;)b=a.map(b,function(n){if((n=n.parentNode)&&n!==document&&f.indexOf(n)<0){f.push(n);return n}});return f};i=function(b,f){return f===undefined?a(b):a(b).filter(f)}})(Quo)}).call(this);(function(){(function(a){var i,h;a.fn.addClass=function(b){return this.each(function(){if(!h(b,this.className)){this.className+=" "+b;return this.className=this.className.trim()}})};a.fn.removeClass=function(b){return this.each(function(){if(b){if(h(b,this.className))return this.className=this.className.replace(b," ").replace(/\s+/g," ").trim()}else return this.className=""})};a.fn.toggleClass=function(b){return this.each(function(){if(h(b,this.className))return this.className=this.className.replace(b,
" ");else{this.className+=" "+b;return this.className=this.className.trim()}})};a.fn.hasClass=function(b){return h(b,this[0].className)};a.fn.style=function(b,f){return f?this.each(function(){return this.style[b]=f}):this[0].style[b]||i(this[0],b)};h=function(b,f){return f.split(/\s+/g).indexOf(b)>=0};i=function(b,f){return document.defaultView.getComputedStyle(b,"")[f]}})(Quo)}).call(this);(function(){(function(a){var i,h,b,f,n,p,s,r,j,m,l;i={TYPE:"GET",MIME:"json"};b={script:"text/javascript, application/javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"};h=0;a.ajaxSettings={type:i.TYPE,async:true,success:{},error:{},context:null,dataType:i.MIME,headers:{},xhr:function(){return new window.XMLHttpRequest},crossDomain:false,timeout:0};a.ajax=function(d){var c,e,k;e=a.mix(a.ajaxSettings,d);if(e.type===i.TYPE)e.url+=a.serializeParameters(e.data,
"?");else e.data=a.serializeParameters(e.data);if(f(e.url))return a.jsonp(e);k=e.xhr();k.onreadystatechange=function(){if(k.readyState===4){clearTimeout(c);return j(k,e)}};k.open(e.type,e.url,e.async);r(k,e);if(e.timeout>0)c=setTimeout(function(){return l(k,e)},e.timeout);try{k.send(e.data)}catch(q){k=q;p("Resource not found",k,e)}return e.async?k:n(k,e)};a.jsonp=function(d){var c,e,k,q;if(d.async){e="jsonp"+ ++h;k=document.createElement("script");q={abort:function(){a(k).remove();if(e in window)return window[e]=
{}}};c=void 0;window[e]=function(v){clearTimeout(c);a(k).remove();delete window[e];return m(v,q,d)};k.src=d.url.replace(/=\?/,"="+e);a("head").append(k);if(d.timeout>0)c=setTimeout(function(){return l(q,d)},d.timeout);return q}else return console.error("QuoJS.ajax: Unable to make jsonp synchronous call.")};a.get=function(d,c,e,k){return a.ajax({url:d,data:c,success:e,dataType:k})};a.post=function(d,c,e,k){return s("POST",d,c,e,k)};a.put=function(d,c,e,k){return s("PUT",d,c,e,k)};a["delete"]=function(d,
c,e,k){return s("DELETE",d,c,e,k)};a.json=function(d,c,e){return a.ajax({url:d,data:c,success:e,dataType:i.MIME})};a.serializeParameters=function(d,c){var e,k;if(c==null)c="";k=c;for(e in d)if(d.hasOwnProperty(e)){if(k!==c)k+="&";k+=e+"="+d[e]}return k===c?"":k};j=function(d,c){if(d.status>=200&&d.status<300||d.status===0)c.async&&m(n(d,c),d,c);else p("QuoJS.ajax: Unsuccesful request",d,c)};m=function(d,c,e){e.success.call(e.context,d,c)};p=function(d,c,e){e.error.call(e.context,d,c,e)};r=function(d,
c){var e;if(c.contentType)c.headers["Content-Type"]=c.contentType;if(c.dataType)c.headers.Accept=b[c.dataType];for(e in c.headers)d.setRequestHeader(e,c.headers[e])};l=function(d,c){d.onreadystatechange={};d.abort();p("QuoJS.ajax: Timeout exceeded",d,c)};s=function(d,c,e,k,q){return a.ajax({type:d,url:c,data:e,success:k,dataType:q,contentType:"application/x-www-form-urlencoded"})};n=function(d,c){var e;if(e=d.responseText)if(c.dataType===i.MIME)try{e=JSON.parse(e)}catch(k){e=k;p("QuoJS.ajax: Parse Error",
d,c)}else if(c.dataType==="xml")e=d.responseXML;return e};f=function(d){return/=\?/.test(d)}})(Quo)}).call(this);(function(){(function(a){var i,h;i=/complete|loaded|interactive/;h={touch:"touchstart",tap:"tap"};["touch","tap"].forEach(function(b){a.fn[b]=function(f){return a(document.body).delegate(this.selector,h[b],f)};return this});a.fn.on=function(b,f,n){return f===undefined||a.toType(f)==="function"?this.bind(b,f):this.delegate(f,b,n)};a.fn.off=function(b,f,n){return f===undefined||a.toType(f)==="function"?this.unbind(b,f):this.undelegate(f,b,n)};a.fn.ready=function(b){i.test(document.readyState)?b(a):
a.fn.addEvent(document,"DOMContentLoaded",function(){return b(a)});return this}})(Quo)}).call(this);(function(){(function(a){var i,h,b,f,n,p,s,r,j,m,l;i=1;f={};b={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};h={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",tap:"click",doubletap:"dblclick",orientationchange:"resize"};a.Event=function(d,c){var e,k;e=document.createEvent("Events");e.initEvent(d,true,true,null,null,null,null,null,null,null,null,null,null,null,null);if(c)for(k in c)e[k]=c[k];return e};
a.fn.bind=function(d,c){return this.each(function(){m(this,d,c)})};a.fn.unbind=function(d,c){return this.each(function(){l(this,d,c)})};a.fn.delegate=function(d,c,e){return this.each(function(k,q){m(q,c,e,d,function(v){return function(y){var x,u;if(u=a(y.target).closest(d,q).get(0)){x=a.extend(n(y),{currentTarget:u,liveFired:q});return v.apply(u,[x].concat([].slice.call(arguments,1)))}}})})};a.fn.undelegate=function(d,c,e){return this.each(function(){l(this,c,e,d)})};a.fn.trigger=function(d,c){if(a.toType(d)===
"string")d=a.Event(d,c);return this.each(function(){this.dispatchEvent(d)})};a.fn.addEvent=function(d,c,e){return d.addEventListener?d.addEventListener(c,e,false):d.attachEvent?d.attachEvent("on"+c,e):d["on"+c]=e};a.fn.removeEvent=function(d,c,e){return d.removeEventListener?d.removeEventListener(c,e,false):d.detachEvent?d.detachEvent("on"+c,e):d["on"+c]=null};m=function(d,c,e,k,q){var v;c=s(c);v=j(d);v=f[v]||(f[v]=[]);q=q&&q(e,c);c={event:c,callback:e,selector:k,proxy:p(q,e,d),delegate:q,index:v.length};
v.push(c);return a.fn.addEvent(d,c.event,c.proxy)};l=function(d,c,e,k){var q;c=s(c);q=j(d);return r(q,c,e,k).forEach(function(v){delete f[q][v.index];return a.fn.removeEvent(d,v.event,v.proxy)})};j=function(d){return d._id||(d._id=i++)};s=function(d){return(a.isMobile()?d:h[d])||d};p=function(d,c,e){c=d||c;return function(k){var q;q=c.apply(e,[k].concat(k.data));q===false&&k.preventDefault();return q}};r=function(d,c,e,k){return(f[d]||[]).filter(function(q){return q&&(!c||q.event===c)&&(!e||q.fn===
e)&&(!k||q.selector===k)})};n=function(d){var c;c=a.extend({originalEvent:d},d);a.each(b,function(e,k){c[e]=function(){this[k]=function(){return true};return d[e].apply(d,arguments)};return c[k]=function(){return false}});return c}})(Quo)}).call(this);(function(){(function(a){var i,h,b,f,n,p,s,r,j,m,l,d,c,e,k,q,v,y,x,u;b={};h=[];i=[];f=void 0;["doubleTap","hold","swipe","swiping","swipeLeft","swipeRight","swipeUp","swipeDown","rotate","rotating","rotateLeft","rotateRight","pinch","pinching","pinchIn","pinchOut","drag","dragLeft","dragRight","dragUp","dragDown"].forEach(function(g){a.fn[g]=function(o){return this.on(g,o)}});a(document).ready(function(){return e()});e=function(){var g;g=a(document.body);g.bind("touchstart",v);g.bind("touchmove",
q);g.bind("touchend",k);return g.bind("touchcancel",r)};v=function(g){var o,t,w;t=Date.now();o=t-(b.last||t);f&&clearTimeout(f);w=l(g);g=w.length;h=m(w,g);b.el=a(y(w[0].target));b.fingers=g;b.last=t;if(g===1){b.isDoubleTap=o>0&&o<=250;return setTimeout(d,650)}else if(g===2){b.initial_angle=parseInt(n(h),10);b.initial_distance=parseInt(j(h),10);b.angle_difference=0;return b.distance_difference=0}};q=function(g){var o,t;if(b.el){t=l(g);o=t.length;if(o===b.fingers){i=m(t,o);c(g)&&u("swiping");if(o===
2){s();p();g.preventDefault()}}else r()}return true};c=function(){var g,o;g=false;if(i[0]){g=Math.abs(h[0].x-i[0].x)>30;o=Math.abs(h[0].y-i[0].y)>30;g=b.el&&(g||o)}return g};k=function(){var g;if(b.isDoubleTap){u("doubleTap");return r()}else if(b.fingers===1)if(c()){u("swipe");g=x(h[0].x,i[0].x,h[0].y,i[0].y);u("swipe"+g);return r()}else{u("tap");return f=setTimeout(r,250)}else if(b.fingers===2){g=false;if(b.angle_difference!==0){u("rotate",{angle:b.angle_difference});g=b.angle_difference>0?"rotateRight":
"rotateLeft";u(g,{angle:b.angle_difference});g=true}if(b.distance_difference!==0){u("pinch",{angle:b.distance_difference});g=b.distance_difference>0?"pinchOut":"pinchIn";u(g,{distance:b.distance_difference});g=true}if(!g&&i[0])if(Math.abs(h[0].x-i[0].x)>10||Math.abs(h[0].y-i[0].y)>10){u("drag");g=x(h[0].x,i[0].x,h[0].y,i[0].y);u("drag"+g)}return r()}};m=function(g,o){var t,w;w=[];for(t=0;t<o;){w.push({x:g[t].pageX,y:g[t].pageY});t++}return w};s=function(){var g,o,t;g=parseInt(n(i),10);g=parseInt(b.initial_angle-
g,10);if(Math.abs(g)>20||b.angle_difference!==0){o=0;for(t=b.angle_difference<0?"-":"+";Math.abs(g-b.angle_difference)>90&&o++<10;)eval("diff "+t+"= 180;");b.angle_difference=parseInt(g,10);return u("rotating",{angle:b.angle_difference})}};p=function(){var g;g=parseInt(j(i),10);g=b.initial_distance-g;if(Math.abs(g)>10){b.distance_difference=g;return u("pinching",{distance:g})}};u=function(g,o){if(b.el){o=o||{};if(i[0]){o.iniTouch=b.fingers>1?h:h[0];o.currentTouch=b.fingers>1?i:i[0]}return b.el.trigger(g,
o)}};r=function(){h=[];i=[];b={};return clearTimeout(f)};n=function(g){var o;o=g[0];g=g[1];o=Math.atan((g.y-o.y)*-1/(g.x-o.x))*(180/Math.PI);return o<0?o+180:o};j=function(g){var o;o=g[0];g=g[1];return Math.sqrt((g.x-o.x)*(g.x-o.x)+(g.y-o.y)*(g.y-o.y))*-1};l=function(g){return a.isMobile()?g.touches:[g]};y=function(g){return"tagName"in g?g:g.parentNode};x=function(g,o,t,w){return Math.abs(g-o)>=Math.abs(t-w)?g-o>0?"Left":"Right":t-w>0?"Up":"Down"};d=function(){if(b.last&&Date.now()-b.last>=650)return u("hold")}})(Quo)}).call(this);

View file

@ -1,127 +0,0 @@
var r2 = {};
r2.root = ""; // prefix path
function Ajax (method, uri, body, fn) {
var x = new XMLHttpRequest ();
x.open (method, uri, false);
x.setRequestHeader ('Accept', 'text/plain');
x.onreadystatechange = function (y) {
if (x.status == 200) {
if (fn) fn (x.responseText);
} else console.error ("ajax "+x.status)
}
x.send (body);
}
r2.get_opcodes = function (off, n, cb) {
r2.cmd ("pdj @"+off+"!"+n, function (json) {
var o = JSON.parse (json);
cb (o);
});
}
r2.get_bytes = function (off, n, cb) {
r2.cmd ("pcj @"+off+"!"+n, function (json) {
var o = JSON.parse (json);
cb (o);
});
}
r2.get_info = function (cb) {
r2.cmd ("ij", function (json) {
cb (JSON.parse (json));
});
}
r2.bin_imports = function (cb) {
r2.cmd ("iij", function (json) {
cb (JSON.parse (json));
});
}
r2.bin_symbols = function (cb) {
r2.cmd ("isj", function (json) {
cb (JSON.parse (json));
});
}
r2.bin_sections = function (cb) {
r2.cmd ("iSj", function (json) {
var o = JSON.parse (json);
cb (o);
});
}
r2.cmd = function (c, cb) {
Ajax ('GET', r2.root+"/cmd/"+encodeURI (c), '', function (x) {
if (cb) cb (x);
});
}
r2.alive = function (cb) {
r2.cmd ("b", function (o) {
var ret = false;
if (o && o.length () > 0)
ret = true;
if (cb) cb (o);
});
}
r2.get_logger = function (obj) {
if (typeof (obj) != "object")
obj = {};
obj.last = 0;
obj.events = {};
obj.interval = null;
r2.cmd ("ll", function (x) {
obj.last = +x;
});
obj.load = function (cb) {
r2.cmd ("lj "+(obj.last+1), function (ret) {
var json = JSON.parse (ret);
if (cb) cb (json);
});
}
obj.clear = function (cb) {
// XXX: fix l-N
r2.cmd ("l-", cb); //+obj.last, cb);
}
obj.send = function (msg, cb) {
r2.cmd ("l "+msg, cb);
}
obj.refresh = function (cb) {
obj.load (function (ret) {
//obj.last = 0;
for (var i = 0; i< ret.length; i++) {
var message = ret[i];
obj.events["message"] ({
"id": message[0],
"text": message[1]
});
if (message[0] > obj.last)
obj.last = message[0];
}
if (cb) cb ();
});
}
obj.autorefresh = function (n) {
if (!n) {
if (obj.interval)
obj.interval.stop ();
return;
}
function to() {
obj.refresh (function () {
//obj.clear ();
});
setTimeout (to, n*1000);
return true;
}
obj.interval = setTimeout (to, n*1000);
}
obj.on = function (ev, cb) {
obj.events[ev] = cb;
return obj;
}
return obj;
}

View file

@ -1,14 +0,0 @@
.code {
padding-left:10px;
font-family:monospace;
font-size:10px;
}
.comment {
background-color:#c0c0ff !important;
color:blue;
padding-left:10px;
font-family:monospace;
font-size:10px;
white-space: pre-wrap;
}

View file

@ -1,13 +0,0 @@
<html>
<body style="border:0;margin:0;background-color:#303030">
<table style="spacing:0;spacing:0px;border:0px;padding:0px;width:100%;height:100%">
<tr height="100%">
<td>
<iframe style="width:100%;height:100%;scroll:overflow" src="/new/"></iframe>
</td><td style="margin:0px;border:0">
<iframe style="width:100%;height:100%;scroll:overflow" src="/new/#hex"></iframe>
<td>
<tr>
<table>
</body>
</html>

View file

@ -1,265 +0,0 @@
/* http://www.switchonthecode.com/tutorials/javascript-draggable-elements */
function hookEvent(element, eventName, callback) {
if(typeof(element) == "string")
element = document.getElementById(element);
if(element == null)
return;
if(element.addEventListener) {
element.addEventListener(eventName, callback, false);
} else if(element.attachEvent)
element.attachEvent("on" + eventName, callback);
}
function unhookEvent(element, eventName, callback) {
if(typeof(element) == "string")
element = document.getElementById(element);
if(element == null)
return;
if(element.removeEventListener)
element.removeEventListener(eventName, callback, false);
else if(element.detachEvent)
element.detachEvent("on" + eventName, callback);
}
function cancelEvent(e) {
e = e ? e : window.event;
if(e.stopPropagation)
e.stopPropagation();
if(e.preventDefault)
e.preventDefault();
e.cancelBubble = true;
e.cancel = true;
e.returnValue = false;
return false;
}
function Position(x, y) {
this.X = x;
this.Y = y;
this.Add = function(val)
{
var newPos = new Position(this.X, this.Y);
if(val != null)
{
if(!isNaN(val.X))
newPos.X += val.X;
if(!isNaN(val.Y))
newPos.Y += val.Y
}
return newPos;
}
this.Subtract = function(val) {
var newPos = new Position(this.X, this.Y);
if(val != null)
{
if(!isNaN(val.X))
newPos.X -= val.X;
if(!isNaN(val.Y))
newPos.Y -= val.Y
}
return newPos;
}
this.Min = function(val)
{
var newPos = new Position(this.X, this.Y)
if(val == null)
return newPos;
if(!isNaN(val.X) && this.X > val.X)
newPos.X = val.X;
if(!isNaN(val.Y) && this.Y > val.Y)
newPos.Y = val.Y;
return newPos;
}
this.Max = function(val)
{
var newPos = new Position(this.X, this.Y)
if(val == null)
return newPos;
if(!isNaN(val.X) && this.X < val.X)
newPos.X = val.X;
if(!isNaN(val.Y) && this.Y < val.Y)
newPos.Y = val.Y;
return newPos;
}
this.Bound = function(lower, upper)
{
var newPos = this.Max(lower);
return newPos.Min(upper);
}
this.Check = function()
{
var newPos = new Position(this.X, this.Y);
if(isNaN(newPos.X))
newPos.X = 0;
if(isNaN(newPos.Y))
newPos.Y = 0;
return newPos;
}
this.Apply = function(element)
{
if(typeof(element) == "string")
element = document.getElementById(element);
if(element == null)
return;
if(!isNaN(this.X))
element.style.left = this.X + 'px';
if(!isNaN(this.Y))
element.style.top = this.Y + 'px';
}
}
function absoluteCursorPostion(eventObj)
{
eventObj = eventObj ? eventObj : window.event;
if(isNaN(window.scrollX))
return new Position(eventObj.clientX + document.documentElement.scrollLeft + document.body.scrollLeft,
eventObj.clientY + document.documentElement.scrollTop + document.body.scrollTop);
else
return new Position(eventObj.clientX + window.scrollX, eventObj.clientY + window.scrollY);
}
function dragObject(element, attachElement, lowerBound, upperBound, startCallback, moveCallback, endCallback, attachLater)
{
if(typeof(element) == "string")
element = document.getElementById(element);
if(element == null)
return;
if(lowerBound != null && upperBound != null)
{
var temp = lowerBound.Min(upperBound);
upperBound = lowerBound.Max(upperBound);
lowerBound = temp;
}
var cursorStartPos = null;
var elementStartPos = null;
var dragging = false;
var listening = false;
var disposed = false;
function touch2move (x) {
var ev = {}
ev.target = x.target;
ev.clientX = x.targetTouches[0].pageX;
ev.clientY = x.targetTouches[0].pageY;
return ev;
}
function dragTouchStart(eventObj) {
if (x.touches.length >1) return;
dragStart(touch2move (x));
}
function dragTouchGo(eventObj) {
if (x.touches.length >1) return;
dragGo(touch2move (x));
}
function dragStart(eventObj)
{
if(dragging || !listening || disposed) return;
dragging = true;
if(startCallback != null)
startCallback(eventObj, element);
cursorStartPos = absoluteCursorPostion(eventObj);
elementStartPos = new Position(parseInt(element.style.left), parseInt(element.style.top));
elementStartPos = elementStartPos.Check();
hookEvent(document, "mousemove", dragGo);
hookEvent(document, "touchmove", dragTouchGo);
hookEvent(document, "mouseup", dragStopHook);
return cancelEvent(eventObj);
}
function dragGo(eventObj)
{
if(!dragging || disposed) return;
var newPos = absoluteCursorPostion(eventObj);
newPos = newPos.Add(elementStartPos).Subtract(cursorStartPos);
newPos = newPos.Bound(lowerBound, upperBound)
newPos.Apply(element);
if(moveCallback != null)
moveCallback(newPos, element);
return cancelEvent(eventObj);
}
function dragStopHook(eventObj)
{
dragStop();
return cancelEvent(eventObj);
}
function dragStop()
{
if(!dragging || disposed) return;
unhookEvent(document, "mousemove", dragGo);
unhookEvent(document, "mouseup", dragStopHook);
cursorStartPos = null;
elementStartPos = null;
if(endCallback != null)
endCallback(element);
dragging = false;
}
this.Dispose = function()
{
if(disposed) return;
this.StopListening(true);
element = null;
attachElement = null
lowerBound = null;
upperBound = null;
startCallback = null;
moveCallback = null
endCallback = null;
disposed = true;
}
this.StartListening = function()
{
if(listening || disposed) return;
listening = true;
hookEvent(attachElement, "mousedown", dragStart);
hookEvent(attachElement, "touchstart", dragTouchStart);
}
this.StopListening = function(stopCurrentDragging)
{
if(!listening || disposed) return;
unhookEvent(attachElement, "mousedown", dragStart);
unhookEvent(attachElement, "touchend", dragTouchStart);
listening = false;
if(stopCurrentDragging && dragging)
dragStop();
}
this.IsDragging = function(){ return dragging; }
this.IsListening = function() { return listening; }
this.IsDisposed = function() { return disposed; }
if(typeof(attachElement) == "string")
attachElement = document.getElementById(attachElement);
if(attachElement == null)
attachElement = element;
if(!attachLater)
this.StartListening();
}