Bug 1484680 - Remove treenode-checkbox binding. r=philipp

This commit is contained in:
Arshad Khan 2018-08-20 18:30:13 +05:30
Родитель 642f2935a2
Коммит 7bc7ccccb8
5 изменённых файлов: 10 добавлений и 18 удалений

Просмотреть файл

@ -40,7 +40,7 @@
<binding id="agenda-checkbox-richlist-item"
extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
<content>
<xul:treenode-checkbox class="agenda-checkbox" anonid="agenda-checkbox-widget"
<xul:checkbox class="agenda-checkbox treenode-checkbox" anonid="agenda-checkbox-widget"
flex="1"
xbl:inherits="selected,label,hidden,disabled"/>
</content>

Просмотреть файл

@ -2,9 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
treenode-checkbox {
-moz-binding: url("chrome://calendar/content/widgets/calendar-widgets.xml#treenode-checkbox");
}
modebox,
modevbox {

Просмотреть файл

@ -48,10 +48,6 @@
</implementation>
</binding>
<!-- this binding directly extends to a checkbox but is visualized as
a treenode in a treecontrol-->
<binding id="treenode-checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox"/>
<!-- this binding directly extends to a xul:box element and enriches this with some functionality: It is designed
to be displayed only 1) in given application modes (e.g "task" mode, "calendar" mode) and 2) only in relation
to the "checked" attribute of command or a checkbox control.
@ -60,7 +56,7 @@
- The attribute "broadcaster" points to the id of a broadcaster that is supposed to be notified (by the application)
as soon as the mode changes. When this happens the modebox" will be notified and will check if it should
collapse itself or not.
- The attribute "refcontrol" points to a control either a "command", "checkbox" or a "treenode-checkbox" or other
- The attribute "refcontrol" points to a control either a "command", "checkbox" or other
elements that support a "checked" attribute that is often used to denote whether a modebox is supposed to be
displayed or not. If "refcontrol" is set to the id of a command you can there set the oncommend attribute like:
"oncommand='document.getElementById('my-mode-pane').togglePane(event)'. In case it is a checkbox element or derived
@ -82,8 +78,7 @@
}
if (this.hasAttribute("refcontrol")) {
this.mRefControl = document.getElementById(this.getAttribute("refcontrol"));
if (this.mRefControl && ((this.mRefControl.localName == "treenode-checkbox") ||
(this.mRefControl.localName == "checkbox"))) {
if (this.mRefControl && (this.mRefControl.localName == "checkbox")) {
this.mControlHandler = {
binding: this,
handleEvent: function(aEvent, aHandled) {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
treenode-checkbox {
checkbox.treenode-checkbox {
-moz-box-align: center;
padding-top: 4px;
padding-inline-start: 4px;
@ -10,7 +10,7 @@ treenode-checkbox {
font-weight: bold;
}
treenode-checkbox > .checkbox-check {
checkbox.treenode-checkbox > .checkbox-check {
-moz-appearance: none;
-moz-box-align: center;
border: none;
@ -21,11 +21,11 @@ treenode-checkbox > .checkbox-check {
fill: currentColor;
}
treenode-checkbox[checked="true"] > .checkbox-check {
checkbox.treenode-checkbox[checked="true"] > .checkbox-check {
background-image: url("chrome://global/skin/icons/twisty-expanded.svg");
}
treenode-checkbox:-moz-locale-dir(rtl) > .checkbox-check {
checkbox.treenode-checkbox:-moz-locale-dir(rtl) > .checkbox-check {
background-image: url("chrome://global/skin/icons/twisty-collapsed-rtl.svg");
}
@ -41,7 +41,7 @@ treenode-checkbox:-moz-locale-dir(rtl) > .checkbox-check {
margin: 0 !important;
}
treenode-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
checkbox.treenode-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
font-weight: bold;
border-bottom: 1px solid -moz-Dialog;
}

Просмотреть файл

@ -150,7 +150,7 @@
<separator id="minimonth-splitter" minwidth="100"/>
<vbox id="calendar-panel" flex="1">
<modevbox id="task-filter-pane" mode="task" broadcaster="modeBroadcaster" refcontrol="calendar_toggle_filter_command">
<treenode-checkbox id="task-tree-filter-header"
<checkbox id="task-tree-filter-header"
checked="true"
class="treenode-checkbox"
label="&calendar.task.filter.title.label;"/>
@ -173,7 +173,7 @@
</modevbox>
<modevbox id="calendar-list-pane" flex="1" mode="calendar,task" broadcaster="modeBroadcaster"
refcontrol="calendar_toggle_calendarlist_command">
<treenode-checkbox id="calendar-list-header"
<checkbox id="calendar-list-header"
checked="true"
class="treenode-checkbox"
ondrop="return document.getElementById('calendar-list-tree-widget').foreignDrop(event)"