Use <div> instead of <button> in sidebar

This commit is contained in:
Mattias Erming 2014-09-22 11:54:38 -07:00
parent 69af79a635
commit 4f5465df82
7 changed files with 4511 additions and 19 deletions

View File

@ -134,14 +134,16 @@ button {
width: 220px; width: 220px;
} }
#sidebar button, #sidebar button,
#sidebar .chan,
#sidebar .sign-out { #sidebar .sign-out {
border: 1px solid transparent; border: 1px solid transparent;
border-radius: 2px; border-radius: 2px;
color: #bcc4d3;
color: #99a2b4; color: #99a2b4;
cursor: pointer;
font-size: 14px; font-size: 14px;
} }
#sidebar button:hover, #sidebar button:hover,
#sidebar .chan:hover,
#sidebar .active { #sidebar .active {
color: #fff; color: #fff;
} }

13
client/js/libs.min.js vendored

File diff suppressed because one or more lines are too long

4491
client/js/libs/jquery/jquery-ui.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -374,7 +374,7 @@ $(function() {
} }
var top = 1; var top = 1;
sidebar.on("click", "button", function() { sidebar.on("click", ".chan, button", function() {
var self = $(this); var self = $(this);
var target = self.data("target"); var target = self.data("target");
if (!target) { if (!target) {
@ -427,11 +427,7 @@ $(function() {
var chan = $(this).closest(".chan"); var chan = $(this).closest(".chan");
if (chan.hasClass("lobby")) { if (chan.hasClass("lobby")) {
cmd = "/quit"; cmd = "/quit";
var server = chan var server = chan.find(".name").html();
.clone()
.remove("span")
.text()
.trim();
if (!confirm("Disconnect from " + server + "?")) { if (!confirm("Disconnect from " + server + "?")) {
return false; return false;
} }

View File

@ -1,7 +1,7 @@
(function() { (function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['chan'] = template({"1":function(depth0,helpers,partials,data) { templates['chan'] = template({"1":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<button data-id=\"" var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div data-id=\""
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-target=\"#chan-" + "\" data-target=\"#chan-"
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
@ -14,9 +14,9 @@ templates['chan'] = template({"1":function(depth0,helpers,partials,data) {
+ "\">"; + "\">";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.unread : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.unread : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "</span>\n <span class=\"close\"></span>\n " return buffer + "</span>\n <span class=\"close\"></span>\n <span class=\"name\">"
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "\n</button>\n"; + "</span>\n</div>\n";
},"2":function(depth0,helpers,partials,data) { },"2":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return escapeExpression(((helper = (helper = helpers.unread || (depth0 != null ? depth0.unread : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"unread","hash":{},"data":data}) : helper))); return escapeExpression(((helper = (helper = helpers.unread || (depth0 != null ? depth0.unread : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"unread","hash":{},"data":data}) : helper)));

View File

@ -1,7 +1,7 @@
{{#each channels}} {{#each channels}}
<button data-id="{{id}}" data-target="#chan-{{id}}" data-title="{{name}}" class="chan {{type}}"> <div data-id="{{id}}" data-target="#chan-{{id}}" data-title="{{name}}" class="chan {{type}}">
<span class="badge" data-count="{{unread}}">{{#if unread}}{{unread}}{{/if}}</span> <span class="badge" data-count="{{unread}}">{{#if unread}}{{unread}}{{/if}}</span>
<span class="close"></span> <span class="close"></span>
{{name}} <span class="name">{{name}}</span>
</button> </div>
{{/each}} {{/each}}

View File

@ -1,7 +1,7 @@
{ {
"name": "shout", "name": "shout",
"description": "A web IRC client", "description": "A web IRC client",
"version": "0.32.3", "version": "0.32.4",
"author": "Mattias Erming", "author": "Mattias Erming",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {