Add "temporary group" checkbox

This commit is contained in:
YUKI Hiroshi 2013-08-21 13:51:03 +09:00
parent 79555c9b3d
commit c9b3bcd5d0
14 changed files with 41 additions and 17 deletions

View File

@ -15,22 +15,26 @@
<image class="icon background-image"/> <image class="icon background-image"/>
</box> </box>
<vbox class="label-container" flex="1"> <vbox class="label-container" flex="1">
<deck id="deck"> <hbox align="center">
<hbox align="center"> <deck id="deck" flex="1">
<image class="icon"/> <hbox align="center">
<label id="label" <image class="icon"/>
flex="1" <label id="label"
crop="end" flex="1"
value="&group.default;" crop="end"
tooltiptext="&group.default;"/> value="&group.default;"
</hbox> tooltiptext="&group.default;"/>
<hbox align="center"> </hbox>
<image class="icon"/> <hbox align="center">
<textbox id="editor" <image class="icon"/>
flex="1" <textbox id="editor"
value="&group.default;"/> flex="1"
</hbox> value="&group.default;"/>
</deck> </hbox>
</deck>
<checkbox id="temporary" label="&group.temporary;"
oncommand="groupTab.temporary = this.checked;"/>
</hbox>
<vbox id="tree" <vbox id="tree"
flex="1"/> flex="1"/>
</vbox> </vbox>

View File

@ -198,3 +198,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "b"> <!ENTITY context.bookmarkTabSubtree.accesskey "b">
<!ENTITY group.default "Ny gruppe"> <!ENTITY group.default "Ny gruppe">
<!ENTITY group.temporary "Temporary Group">

View File

@ -196,3 +196,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "Neue Gruppe"> <!ENTITY group.default "Neue Gruppe">
<!ENTITY group.temporary "Temporary Group">

View File

@ -184,3 +184,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "New Group"> <!ENTITY group.default "New Group">
<!ENTITY group.temporary "Temporary Group">

View File

@ -195,3 +195,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "Nuevo Grupo"> <!ENTITY group.default "Nuevo Grupo">
<!ENTITY group.temporary "Temporary Group">

View File

@ -189,3 +189,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "Nouveau groupe"> <!ENTITY group.default "Nouveau groupe">
<!ENTITY group.temporary "Temporary Group">

View File

@ -193,3 +193,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "l"> <!ENTITY context.bookmarkTabSubtree.accesskey "l">
<!ENTITY group.default "New Group"> <!ENTITY group.default "New Group">
<!ENTITY group.temporary "Temporary Group">

View File

@ -183,3 +183,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "新しいグループ"> <!ENTITY group.default "新しいグループ">
<!ENTITY group.temporary "一時的なグループ">

View File

@ -188,3 +188,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "A"> <!ENTITY context.bookmarkTabSubtree.accesskey "A">
<!ENTITY group.default "Nowa grupa"> <!ENTITY group.default "Nowa grupa">
<!ENTITY group.temporary "Temporary Group">

View File

@ -189,3 +189,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "з"> <!ENTITY context.bookmarkTabSubtree.accesskey "з">
<!ENTITY group.default "Новая группа"> <!ENTITY group.default "Новая группа">
<!ENTITY group.temporary "Temporary Group">

View File

@ -197,3 +197,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "B"> <!ENTITY context.bookmarkTabSubtree.accesskey "B">
<!ENTITY group.default "Ny grupp"> <!ENTITY group.default "Ny grupp">
<!ENTITY group.temporary "Temporary Group">

View File

@ -196,3 +196,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "新建组"> <!ENTITY group.default "新建组">
<!ENTITY group.temporary "Temporary Group">

View File

@ -184,3 +184,4 @@
<!ENTITY context.bookmarkTabSubtree.accesskey "t"> <!ENTITY context.bookmarkTabSubtree.accesskey "t">
<!ENTITY group.default "新增群組"> <!ENTITY group.default "新增群組">
<!ENTITY group.temporary "Temporary Group">

View File

@ -79,6 +79,10 @@ GroupTab.prototype = {
{ {
return this.document.getElementById('deck'); return this.document.getElementById('deck');
}, },
get temporaryCheck()
{
return this.document.getElementById('temporary');
},
get title() get title()
{ {
@ -110,7 +114,9 @@ GroupTab.prototype = {
return /(?:^|[\?&;])temporary=(?:1|yes|true)/i.test(this.locationSearch); return /(?:^|[\?&;])temporary=(?:1|yes|true)/i.test(this.locationSearch);
}, },
set temporary(aValue) { set temporary(aValue) {
this._updateURI({ temporary: !!aValue }); aValue = !!aValue;
this._updateURI({ temporary: aValue });
this.temporaryCheck.checked = aValue;
return aValue; return aValue;
}, },
@ -164,6 +170,8 @@ GroupTab.prototype = {
this.editor.value = title; this.editor.value = title;
} }
this.temporaryCheck.checked = this.temporary;
this.window.addEventListener('load', this, false); this.window.addEventListener('load', this, false);
this.window.groupTab = this; this.window.groupTab = this;