Zotero.Search.getSearchCondition(s) -> getCondition(s)
This commit is contained in:
parent
1952fbccd4
commit
59773f3f6d
3 changed files with 10 additions and 10 deletions
|
@ -48,7 +48,7 @@
|
|||
while(conditionsBox.hasChildNodes())
|
||||
conditionsBox.removeChild(conditionsBox.firstChild);
|
||||
|
||||
var conditions = this.search.getSearchConditions();
|
||||
var conditions = this.search.getConditions();
|
||||
|
||||
for(var id in conditions)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@
|
|||
|
||||
// Default to an empty 'title' condition
|
||||
if (!ref) {
|
||||
ref = this.search.getSearchCondition(this.search.addCondition("title","contains",""))
|
||||
ref = this.search.getCondition(this.search.addCondition("title","contains",""))
|
||||
}
|
||||
|
||||
condition.initWithParentAndCondition(this, ref);
|
||||
|
|
|
@ -84,7 +84,7 @@ Zotero.defineProperty(Zotero.Search.prototype, 'synced', {
|
|||
set: function(val) this._set('synced', val)
|
||||
});
|
||||
Zotero.defineProperty(Zotero.Search.prototype, 'conditions', {
|
||||
get: function() this.getSearchConditions()
|
||||
get: function() this.getConditions()
|
||||
});
|
||||
|
||||
Zotero.Search.prototype._set = function (field, value) {
|
||||
|
@ -286,7 +286,7 @@ Zotero.Search.prototype.clone = function (libraryID) {
|
|||
var s = new Zotero.Search();
|
||||
s.libraryID = libraryID === undefined ? this.libraryID : libraryID;
|
||||
|
||||
var conditions = this.getSearchConditions();
|
||||
var conditions = this.getConditions();
|
||||
|
||||
for each(var condition in conditions) {
|
||||
var name = condition.mode ?
|
||||
|
@ -471,7 +471,7 @@ Zotero.Search.prototype.removeCondition = Zotero.Promise.coroutine(function* (se
|
|||
* Returns an array with 'condition', 'operator', 'value', 'required'
|
||||
* for the given searchConditionID
|
||||
*/
|
||||
Zotero.Search.prototype.getSearchCondition = function(searchConditionID){
|
||||
Zotero.Search.prototype.getCondition = function(searchConditionID){
|
||||
this._requireData('conditions');
|
||||
return this._conditions[searchConditionID];
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ Zotero.Search.prototype.getSearchCondition = function(searchConditionID){
|
|||
* Returns a multidimensional array of conditions/operator/value sets
|
||||
* used in the search, indexed by searchConditionID
|
||||
*/
|
||||
Zotero.Search.prototype.getSearchConditions = function(){
|
||||
Zotero.Search.prototype.getConditions = function(){
|
||||
this._requireData('conditions');
|
||||
var conditions = [];
|
||||
for (var id in this._conditions) {
|
||||
|
@ -851,7 +851,7 @@ Zotero.Search.prototype.serialize = function() {
|
|||
fields: {
|
||||
name: this.name,
|
||||
},
|
||||
conditions: this.getSearchConditions()
|
||||
conditions: this.getConditions()
|
||||
};
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -4711,7 +4711,7 @@ Zotero.Sync.Server.Data = new function() {
|
|||
searchElem.setAttribute('dateAdded', search.dateAdded);
|
||||
searchElem.setAttribute('dateModified', search.dateModified);
|
||||
|
||||
var conditions = search.getSearchConditions();
|
||||
var conditions = search.getConditions();
|
||||
if (conditions) {
|
||||
for each(var condition in conditions) {
|
||||
var conditionElem = doc.createElement('condition');
|
||||
|
@ -4770,7 +4770,7 @@ Zotero.Sync.Server.Data = new function() {
|
|||
if (mode) {
|
||||
name = name + '/' + mode;
|
||||
}
|
||||
if (search.getSearchCondition(conditionID)) {
|
||||
if (search.getCondition(conditionID)) {
|
||||
search.updateCondition(
|
||||
conditionID,
|
||||
name,
|
||||
|
@ -4793,7 +4793,7 @@ Zotero.Sync.Server.Data = new function() {
|
|||
}
|
||||
|
||||
conditionID++;
|
||||
while (search.getSearchCondition(conditionID)) {
|
||||
while (search.getCondition(conditionID)) {
|
||||
search.removeCondition(conditionID);
|
||||
conditionID++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue