зеркало из https://github.com/mozilla/pjs.git
speed up initialization of the dialog by forwarding the scope into the initialization method for a searchterm
This commit is contained in:
Родитель
a09d4ba3cf
Коммит
286197e18c
|
@ -17,10 +17,13 @@
|
||||||
Components.classes['mozilla.mail.search.validityManager.1'].getService(Components.interfaces.nsIMsgSearchValidityManager);
|
Components.classes['mozilla.mail.search.validityManager.1'].getService(Components.interfaces.nsIMsgSearchValidityManager);
|
||||||
]]>
|
]]>
|
||||||
</property>
|
</property>
|
||||||
<property name="searchScope">
|
<property name="searchScope" onget="return this.internalScope;">
|
||||||
<!-- scope ID - retrieve the table -->
|
<!-- scope ID - retrieve the table -->
|
||||||
<setter>
|
<setter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
// if scope isn't changing this is a noop
|
||||||
|
if (this.internalScope == val) return;
|
||||||
|
|
||||||
this.internalScope = val;
|
this.internalScope = val;
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
var targets = this.targets;
|
var targets = this.targets;
|
||||||
|
@ -31,11 +34,6 @@
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</setter>
|
</setter>
|
||||||
<getter>
|
|
||||||
<![CDATA[
|
|
||||||
return this.internalScope;
|
|
||||||
]]>
|
|
||||||
</getter>
|
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<property name="validityTable" readonly="true" onget="return this.validityManager.getTable(this.searchScope)"/>
|
<property name="validityTable" readonly="true" onget="return this.validityManager.getTable(this.searchScope)"/>
|
||||||
|
@ -84,6 +82,7 @@
|
||||||
<method name="refreshList">
|
<method name="refreshList">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
// dump("Refreshing " + this.tagName + " id=" + this.id + "\n");
|
||||||
var menuItemIds = this.valueIds;
|
var menuItemIds = this.valueIds;
|
||||||
var menuItemStrings = this.valueStrings;
|
var menuItemStrings = this.valueStrings;
|
||||||
|
|
||||||
|
@ -175,6 +174,7 @@
|
||||||
<property name="parentValue">
|
<property name="parentValue">
|
||||||
<setter>
|
<setter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
if (this.searchAttribute == val) return;
|
||||||
this.searchAttribute = val;
|
this.searchAttribute = val;
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
]]>
|
]]>
|
||||||
|
@ -277,6 +277,7 @@
|
||||||
<method name="initialize">
|
<method name="initialize">
|
||||||
<argument name="filter"/>
|
<argument name="filter"/>
|
||||||
<argument name="termIndex"/>
|
<argument name="termIndex"/>
|
||||||
|
<argument name="scope"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var attrib = new Object;
|
var attrib = new Object;
|
||||||
|
@ -290,7 +291,10 @@
|
||||||
var searchOperator=this.searchoperator;
|
var searchOperator=this.searchoperator;
|
||||||
var searchValue=this.searchvalue;
|
var searchValue=this.searchvalue;
|
||||||
|
|
||||||
if (searchAttribute) searchAttribute.value = attrib.value;
|
if (searchAttribute) {
|
||||||
|
searchAttribute.searchScope = scope;
|
||||||
|
searchAttribute.value = attrib.value;
|
||||||
|
}
|
||||||
if (searchOperator) searchOperator.value = op.value;
|
if (searchOperator) searchOperator.value = op.value;
|
||||||
if (searchValue) searchValue.value = value.value;
|
if (searchValue) searchValue.value = value.value;
|
||||||
]]>
|
]]>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче