Merge sidebar js, css
This commit is contained in:
parent
52ed8c18ca
commit
73dc69605b
2 changed files with 60 additions and 6 deletions
|
@ -128,9 +128,10 @@
|
|||
.sidebar .link-right { color: white; text-decoration: none; border-bottom: 1px solid #666; text-transform: uppercase; }
|
||||
.sidebar .link-right:hover { border-color: #CCC; }
|
||||
.sidebar .link-right:active { background-color: #444 }
|
||||
.sidebar .link-outline { outline: 1px solid #eee6; padding: 2px 13px; border-bottom: none; font-size: 80%; }
|
||||
/* SIDEBAR */
|
||||
|
||||
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; z-index: 2; }
|
||||
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; top: 0px; z-index: 2;}
|
||||
.sidebar { background-color: #212121; position: fixed; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -o-backface-visibility: hidden; -ms-backface-visibility: hidden; backface-visibility: hidden ; right: -1200px; height: 100%; width: 1200px; } /*box-shadow: inset 0px 0px 10px #000*/
|
||||
.sidebar .content { margin: 30px; font-family: "Segoe UI Light", "Segoe UI", "Helvetica Neue"; color: white; width: 375px; height: 300px; font-weight: 200; -webkit-transition: all 1s; -moz-transition: all 1s; -o-transition: all 1s; -ms-transition: all 1s; transition: all 1s ; opacity: 0 }
|
||||
.sidebar-container.loaded .content { opacity: 1; -webkit-transform: none ; -moz-transform: none ; -o-transform: none ; -ms-transform: none ; transform: none }
|
||||
|
|
|
@ -114,12 +114,12 @@
|
|||
})(this);
|
||||
$(window).on("hashchange", (function(_this) {
|
||||
return function() {
|
||||
if (window.top.location.hash === "#ZeroNet:Console") {
|
||||
if (window.top.location.hash.startsWith("#ZeroNet:Console")) {
|
||||
return _this.open();
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
if (window.top.location.hash === "#ZeroNet:Console") {
|
||||
if (window.top.location.hash.startsWith("#ZeroNet:Console")) {
|
||||
setTimeout(((function(_this) {
|
||||
return function() {
|
||||
return _this.open();
|
||||
|
@ -151,12 +151,17 @@
|
|||
tab_type = ref[j];
|
||||
tab = $("<a></a>", {
|
||||
href: "#",
|
||||
"data-filter": tab_type.filter
|
||||
"data-filter": tab_type.filter,
|
||||
"data-title": tab_type.title
|
||||
}).text(tab_type.title);
|
||||
if (tab_type.filter === this.tab_active) {
|
||||
tab.addClass("active");
|
||||
}
|
||||
tab.on("click", this.handleTabClick);
|
||||
if (window.top.location.hash.endsWith(tab_type.title)) {
|
||||
this.log("Triggering click on", tab);
|
||||
tab.trigger("click");
|
||||
}
|
||||
this.tabs.append(tab);
|
||||
}
|
||||
this.container.on("mousedown touchend touchcancel", (function(_this) {
|
||||
|
@ -342,6 +347,7 @@
|
|||
$("a", this.tabs).removeClass("active");
|
||||
elem.addClass("active");
|
||||
this.changeFilter(this.tab_active);
|
||||
window.top.location.hash = "#ZeroNet:Console:" + elem.data("title");
|
||||
return false;
|
||||
};
|
||||
|
||||
|
@ -353,6 +359,7 @@
|
|||
|
||||
}).call(this);
|
||||
|
||||
|
||||
/* ---- Menu.coffee ---- */
|
||||
|
||||
|
||||
|
@ -435,6 +442,40 @@
|
|||
|
||||
}).call(this);
|
||||
|
||||
/* ---- Prototypes.coffee ---- */
|
||||
|
||||
|
||||
(function() {
|
||||
String.prototype.startsWith = function(s) {
|
||||
return this.slice(0, s.length) === s;
|
||||
};
|
||||
|
||||
String.prototype.endsWith = function(s) {
|
||||
return s === '' || this.slice(-s.length) === s;
|
||||
};
|
||||
|
||||
String.prototype.capitalize = function() {
|
||||
if (this.length) {
|
||||
return this[0].toUpperCase() + this.slice(1);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
String.prototype.repeat = function(count) {
|
||||
return new Array(count + 1).join(this);
|
||||
};
|
||||
|
||||
window.isEmpty = function(obj) {
|
||||
var key;
|
||||
for (key in obj) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
/* ---- RateLimit.coffee ---- */
|
||||
|
||||
|
||||
|
@ -1104,7 +1145,20 @@ window.initScrollable = function () {
|
|||
})(this));
|
||||
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
return _this.wrapper.ws.cmd("siteSetOwned", [_this.tag.find("#checkbox-owned").is(":checked")]);
|
||||
var owned;
|
||||
owned = _this.tag.find("#checkbox-owned").is(":checked");
|
||||
return _this.wrapper.ws.cmd("siteSetOwned", [owned], function(res_set_owned) {
|
||||
_this.log("Owned", owned);
|
||||
if (owned) {
|
||||
return _this.wrapper.ws.cmd("siteRecoverPrivatekey", [], function(res_recover) {
|
||||
if (res_recover === "ok") {
|
||||
return _this.wrapper.notifications.add("recover", "done", "Private key recovered from master seed", 5000);
|
||||
} else {
|
||||
return _this.log("Unable to recover private key: " + res_recover.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#checkbox-autodownloadoptional").off("click touchend").on("click touchend", (function(_this) {
|
||||
|
@ -1370,7 +1424,6 @@ window.initScrollable = function () {
|
|||
|
||||
}).call(this);
|
||||
|
||||
|
||||
/* ---- morphdom.js ---- */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue