Commit 5c026282 authored by Arthur Verschaeve's avatar Arthur Verschaeve

Closure: remove count from clear completed button

Ref #1234
parent ebc152e2
...@@ -160,7 +160,6 @@ function redraw() { ...@@ -160,7 +160,6 @@ function redraw() {
var remainingCount = items.length - (doneCount); var remainingCount = items.length - (doneCount);
toggleAll.checked = remainingCount === 0; toggleAll.checked = remainingCount === 0;
itemCountControl.setContent(remainingCount.toString()); itemCountControl.setContent(remainingCount.toString());
clearCompletedControl.setContent(doneCount.toString());
clearCompletedControl.setVisible(doneCount > 0); clearCompletedControl.setVisible(doneCount > 0);
goog.style.setElementShown(main, items.length > 0); goog.style.setElementShown(main, items.length > 0);
goog.style.setElementShown(footer, items.length > 0); goog.style.setElementShown(footer, items.length > 0);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -43,17 +43,6 @@ todomvc.view.ClearCompletedControlRenderer.prototype.canDecorate = ...@@ -43,17 +43,6 @@ todomvc.view.ClearCompletedControlRenderer.prototype.canDecorate =
return false; return false;
}; };
/**
* @param {Element} element Element to populate.
* @param {goog.ui.ControlContent} content Text caption or DOM.
*/
todomvc.view.ClearCompletedControlRenderer.prototype.setContent =
function(element, content) {
element.innerHTML = todomvc.view.clearCompletedInner({
number: content
});
};
/** /**
* Updates the appearance of the control in response to a state change. * Updates the appearance of the control in response to a state change.
* *
......
...@@ -34,16 +34,7 @@ ...@@ -34,16 +34,7 @@
/** /**
* A todo list clear completed template * A todo list clear completed template
* @param number the count of items
*/ */
{template .clearCompleted} {template .clearCompleted}
<button id="clear-completed">{call .clearCompletedInner data="all"/}</button> <button id="clear-completed">Clear completed</button>
{/template}
/**
* A todo list clear completed template
* @param number the count of items
*/
{template .clearCompletedInner}
Clear completed ({$number})
{/template} {/template}
...@@ -15,11 +15,9 @@ button { ...@@ -15,11 +15,9 @@ button {
font-weight: inherit; font-weight: inherit;
color: inherit; color: inherit;
-webkit-appearance: none; -webkit-appearance: none;
-ms-appearance: none;
appearance: none; appearance: none;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
font-smoothing: antialiased; font-smoothing: antialiased;
} }
...@@ -33,7 +31,6 @@ body { ...@@ -33,7 +31,6 @@ body {
margin: 0 auto; margin: 0 auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
font-smoothing: antialiased; font-smoothing: antialiased;
font-weight: 300; font-weight: 300;
} }
...@@ -83,7 +80,6 @@ input[type="checkbox"] { ...@@ -83,7 +80,6 @@ input[type="checkbox"] {
color: rgba(175, 47, 47, 0.15); color: rgba(175, 47, 47, 0.15);
-webkit-text-rendering: optimizeLegibility; -webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility; -moz-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
...@@ -102,11 +98,9 @@ input[type="checkbox"] { ...@@ -102,11 +98,9 @@ input[type="checkbox"] {
padding: 6px; padding: 6px;
border: 1px solid #999; border: 1px solid #999;
box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
-ms-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
font-smoothing: antialiased; font-smoothing: antialiased;
} }
...@@ -191,7 +185,6 @@ label[for='toggle-all'] { ...@@ -191,7 +185,6 @@ label[for='toggle-all'] {
margin: auto 0; margin: auto 0;
border: none; /* Mobile Safari */ border: none; /* Mobile Safari */
-webkit-appearance: none; -webkit-appearance: none;
-ms-appearance: none;
appearance: none; appearance: none;
} }
...@@ -323,19 +316,10 @@ html #clear-completed:active { ...@@ -323,19 +316,10 @@ html #clear-completed:active {
line-height: 20px; line-height: 20px;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
visibility: hidden;
position: relative; position: relative;
} }
#clear-completed::after { #clear-completed:hover {
visibility: visible;
content: 'Clear completed';
position: absolute;
right: 0;
white-space: nowrap;
}
#clear-completed:hover::after {
text-decoration: underline; text-decoration: underline;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment