summaryrefslogtreecommitdiff
path: root/Cydia.app/menes
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-10-14 02:59:16 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:08:50 +0000
commitaffeffc797be156742cbd8efe899ba74dd719b0d (patch)
tree3059ee1d346bf0d989b330309e1c80da476192b9 /Cydia.app/menes
parentc390d3ab34d681832980e545b276467787a70d0a (diff)
Checkpointing Cydia before futzing with cydia://package-cion/.
Diffstat (limited to 'Cydia.app/menes')
-rw-r--r--Cydia.app/menes/menes.js51
-rw-r--r--Cydia.app/menes/style.css33
2 files changed, 75 insertions, 9 deletions
diff --git a/Cydia.app/menes/menes.js b/Cydia.app/menes/menes.js
index f0070bc..f314227 100644
--- a/Cydia.app/menes/menes.js
+++ b/Cydia.app/menes/menes.js
@@ -5,7 +5,6 @@ var _assert = function (expr) {
throw message;
}
}
-
// Compatibility {{{
if (typeof Array.prototype.push != "function")
Array.prototype.push = function (value) {
@@ -39,6 +38,16 @@ var $ = function (arg, doc) {
}
};
+$.xml = function (value) {
+ return value
+ .replace(/&/, "&amp;")
+ .replace(/</, "&lt;")
+ .replace(/>/, "&gt;")
+ .replace(/"/, "&quot;")
+ .replace(/'/, "&apos;")
+ ;
+}
+
$.type = function (value) {
var type = typeof value;
@@ -120,7 +129,7 @@ $.prototype = {
},
append: function (html) {
- $.each(this, function (node) {
+ $.each(this, $.type(html) == "string" ? function (node) {
var doc = $.document(node);
// XXX: implement wrapper system
@@ -131,9 +140,19 @@ $.prototype = {
var child = div.childNodes[0];
node.appendChild(child);
}
+ } : function (node) {
+ $.each(html, function (value) {
+ node.appendChild(value);
+ });
});
},
+ clone: function (deep) {
+ return $($.map(this, function (node) {
+ return node.cloneNode(deep);
+ }));
+ },
+
descendants: function (expression) {
var descendants = $([]);
@@ -154,6 +173,25 @@ $.prototype = {
return $($.map(this, function (node) {
return node.parentNode;
}));
+ },
+
+ xpath: function (expression) {
+ var value = $([]);
+
+ $.each(this, function (node) {
+ var doc = $.document(node);
+ var result = doc.evaluate(expression, node, null, XPathResult.ANY_TYPE, null);
+
+ if (result.resultType == XPathResult.UNORDERED_NODE_ITERATOR_TYPE)
+ for (;;) {
+ var next = result.iterateNext();
+ if (next == null)
+ break;
+ value.add([next]);
+ }
+ });
+
+ return value;
}
};
@@ -212,6 +250,15 @@ $.inject({
}
},
+ id: {
+ get: function (node) {
+ return node.id;
+ },
+ set: function (node, value) {
+ node.id = value;
+ }
+ },
+
src: {
get: function (node) {
return node.src;
diff --git a/Cydia.app/menes/style.css b/Cydia.app/menes/style.css
index 2be2531..ce6cd53 100644
--- a/Cydia.app/menes/style.css
+++ b/Cydia.app/menes/style.css
@@ -85,7 +85,7 @@ hr {
}
.dialog > .panel {
- background: #c8c8c8 url(pinstripes.png);
+ background: #c7ced5 url(pinstripes.png);
padding: 1px 0 1px 0;
}
@@ -103,6 +103,10 @@ strong {
font-weight: bold
}
+pre {
+ letter-spacing: -2px;
+}
+
/* #toolbar {{{ */
.dialog > .toolbar {
background: url(toolbar.png) #6d84a2 repeat-x;
@@ -173,7 +177,7 @@ strong {
.dialog > .panel > fieldset > div {
border-top: 1px solid #999999;
min-height: 19px;
- padding: 11px 17px;
+ padding: 12px 17px 11px 17px;
}
.dialog > .panel > fieldset > a:first-child,
@@ -196,11 +200,17 @@ strong {
text-align: center;
}
-.dialog > .panel > fieldset > div > p:first-child {
+.dialog > .panel > fieldset > div > ul {
+ margin-left: -20px;
+}
+
+.dialog > .panel > fieldset > div > p:first-child,
+.dialog > .panel > fieldset > div > ul:first-child {
margin-top: 0;
}
-.dialog > .panel > fieldset > div > p:last-child {
+.dialog > .panel > fieldset > div > p:last-child,
+.dialog > .panel > fieldset > div > ul:last-child {
margin-bottom: 0;
}
@@ -212,7 +222,7 @@ strong {
.dialog > .panel > fieldset > div > select {
font-size: 16px;
- margin: -4px -10px -5px 86px;
+ margin: -5px -10px -5px 86px;
width: 190px;
}
@@ -222,8 +232,8 @@ strong {
color: #193250;
font-size: 16px;
height: 45px;
- margin: -12px -18px;
- padding: 12px 10px 0 111px;
+ margin: -13px -18px;
+ padding: 13px 10px 0 111px;
width: 302px;
}
@@ -241,6 +251,7 @@ strong {
.dialog > .panel > fieldset > a > label,
.dialog > .panel > fieldset > div > label {
font-weight: bold;
+ padding: 1px 0 0 0;
position: absolute;
}
@@ -251,6 +262,14 @@ strong {
.dialog > .panel > fieldset > a > label + div,
.dialog > .panel > fieldset > div > label + div {
color: #335588;
+ float: right;
text-align: right;
}
+
+.dialog > .panel > img {
+ display: block;
+ margin: 9px auto 4px auto;
+ height: auto;
+ width: 300px;
+}
/* }}} */