Use the "wait for" option properly. fix #3224

This commit is contained in:
Ruud
2014-05-09 11:46:32 +02:00
parent 24b822aecd
commit c2dcd2f67d
4 changed files with 9 additions and 11 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ class ProfilePlugin(Plugin):
order = 0
for type in kwargs.get('types', []):
profile['qualities'].append(type.get('quality'))
profile['wait_for'].append(tryInt(type.get('wait_for')))
profile['wait_for'].append(tryInt(kwargs.get('wait_for', 0)))
profile['finish'].append((tryInt(type.get('finish')) == 1) if order > 0 else True)
profile['3d'].append(tryInt(type.get('3d')))
order += 1
@@ -41,7 +41,7 @@ var Profile = new Class({
new Element('span', {'text':'Wait'}),
new Element('input.inlay.xsmall', {
'type':'text',
'value': data.types && data.types.length > 0 ? data.types[0].wait_for : 0
'value': data.wait_for && data.wait_for.length > 0 ? data.wait_for[0] : 0
}),
new Element('span', {'text':'day(s) for a better quality.'})
),
@@ -63,8 +63,7 @@ var Profile = new Class({
data.types.include({
'quality': quality,
'finish': data.finish[nr] || false,
'3d': data['3d'] ? data['3d'][nr] || false : false,
'wait_for': data.wait_for[nr] || 0
'3d': data['3d'] ? data['3d'][nr] || false : false
})
});
}
@@ -126,8 +125,7 @@ var Profile = new Class({
data.types.include({
'quality': type.getElement('select').get('value'),
'finish': +type.getElement('input.finish[type=checkbox]').checked,
'3d': +type.getElement('input.3d[type=checkbox]').checked,
'wait_for': 0
'3d': +type.getElement('input.3d[type=checkbox]').checked
});
});
@@ -340,8 +338,7 @@ Profile.Type = new Class({
return {
'quality': self.qualities.get('value'),
'finish': +self.finish.checked,
'3d': +self['3d'].checked,
'wait_for': 0
'3d': +self['3d'].checked
}
},