|
|
|
|
24
|
</layout>
|
24
|
</layout>
|
25
|
<program>
|
25
|
<program>
|
26
|
<![CDATA[
|
26
|
<![CDATA[
|
27
|
- this.displayStatus("Ready.");
|
|
|
|
|
27
|
+ this.displayStatus(TTR("newroasted", "Ready."));
|
28
|
var itemname = findChildObject(this, 'name');
|
28
|
var itemname = findChildObject(this, 'name');
|
29
|
var newItemButton = findChildObject(this, 'ok');
|
29
|
var newItemButton = findChildObject(this, 'ok');
|
30
|
var window = this;
|
30
|
var window = this;
|
|
|
|
|
43
|
drop2.clear();
|
43
|
drop2.clear();
|
44
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
44
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
45
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
45
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
46
|
- window.displayStatus("Item removed.");
|
|
|
|
|
46
|
+ window.displayStatus(TTR("newroasted", "Item removed."));
|
47
|
});
|
47
|
});
|
48
|
restoreButton.clicked.connect(function() {
|
48
|
restoreButton.clicked.connect(function() {
|
49
|
var q = "INSERT INTO current_items (item) VALUES (:id)";
|
49
|
var q = "INSERT INTO current_items (item) VALUES (:id)";
|
|
|
|
|
56
|
drop2.clear();
|
56
|
drop2.clear();
|
57
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
57
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
58
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
58
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
59
|
- window.displayStatus("Item restored.");
|
|
|
|
|
59
|
+ window.displayStatus(TTR("newroasted", "Item restored."));
|
60
|
});
|
60
|
});
|
61
|
newItemButton.clicked.connect(function() {
|
61
|
newItemButton.clicked.connect(function() {
|
62
|
var q = "INSERT INTO items (id, name, reference, unit, quantity, category) VALUES (default, :name, NULL, 'lb', 0, 'Coffee: Roasted') RETURNING id";
|
62
|
var q = "INSERT INTO items (id, name, reference, unit, quantity, category) VALUES (default, :name, NULL, 'lb', 0, 'Coffee: Roasted') RETURNING id";
|
|
|
|
|
76
|
drop2.clear();
|
76
|
drop2.clear();
|
77
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
77
|
drop1.addSqlOptions("SELECT id, name FROM items WHERE id IN (SELECT item FROM current_items) ORDER BY name");
|
78
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
78
|
drop2.addSqlOptions("SELECT id, name FROM items WHERE category = 'Coffee: Roasted' AND id NOT IN (SELECT item FROM current_items) ORDER BY name");
|
79
|
- window.displayStatus("Item added.");
|
|
|
|
|
79
|
+ window.displayStatus(TTR("newroasted", "Item added."));
|
80
|
});
|
80
|
});
|
81
|
]]>
|
81
|
]]>
|
82
|
</program>
|
82
|
</program>
|