mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-09 16:44:11 +01:00
Linkify 'restart' in :addons.
--HG-- extra : transplant_source : %EA%88%BD%A9%8FB%DD%24%A4%CC%3E%F9I%87%FB%8A7%C8%11%CC
This commit is contained in:
@@ -37,6 +37,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
let elem = event.originalTarget;
|
||||
dactyl.help(elem.getAttribute("tag") || elem.textContent);
|
||||
};
|
||||
this.commands["dactyl.restart"] = function (event) {
|
||||
dactyl.restart();
|
||||
};
|
||||
},
|
||||
|
||||
cleanup: function () {
|
||||
|
||||
@@ -145,6 +145,7 @@ var Addon = Class("Addon", {
|
||||
this.nodes = {
|
||||
commandTarget: this
|
||||
};
|
||||
XML.ignoreWhitespace = true;
|
||||
util.xmlToDom(
|
||||
<li highlight="Addon" key="row" xmlns:dactyl={NS} xmlns={XHTML}>
|
||||
<span highlight="AddonName" key="name">
|
||||
@@ -189,6 +190,9 @@ var Addon = Class("Addon", {
|
||||
compare: function compare(other) String.localeCompare(this.name, other.name),
|
||||
|
||||
get statusInfo() {
|
||||
XML.ignoreWhitespace = XML.prettyPrinting = false;
|
||||
default xml namespace = XHTML;
|
||||
|
||||
let info = this.isActive ? <span highlight="Enabled">enabled</span>
|
||||
: <span highlight="Disabled">disabled</span>;
|
||||
|
||||
@@ -205,7 +209,7 @@ var Addon = Class("Addon", {
|
||||
pending = ["Enabled", "upgraded"];
|
||||
if (pending)
|
||||
return <>{info} (<span highlight={pending[0]}>{pending[1]}</span>
|
||||
 on restart)</>;
|
||||
 on <a href="#" dactyl:command="dactyl.restart" xmlns:dactyl={NS}>restart</a>)</>;
|
||||
return info;
|
||||
},
|
||||
|
||||
@@ -269,6 +273,7 @@ var AddonList = Class("AddonList", {
|
||||
|
||||
message: Class.memoize(function () {
|
||||
|
||||
XML.ignoreWhitespace = true;
|
||||
util.xmlToDom(<ul highlight="Addons" key="list" xmlns={XHTML}>
|
||||
<li highlight="AddonHead">
|
||||
<span>Name</span>
|
||||
@@ -535,7 +540,6 @@ var addonErrors = array.toObject([
|
||||
[AddonManager.ERROR_CORRUPT_FILE, "The file appears to be corrupt"],
|
||||
[AddonManager.ERROR_FILE_ACCESS, "There was an error accessing the filesystem"]]);
|
||||
|
||||
|
||||
endModule();
|
||||
|
||||
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
||||
|
||||
@@ -83,6 +83,9 @@ input[type=file][dactyl|highlight~=HintElem] {
|
||||
url-prefix(dactyl:),
|
||||
url-prefix(resource://dactyl) {
|
||||
|
||||
*:-moz-any-link {
|
||||
color: green;
|
||||
}
|
||||
*:-moz-any-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user