mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement page session restore
This commit is contained in:
parent
6e9ea25ffd
commit
14b1620dc9
3 changed files with 154 additions and 13 deletions
|
|
@ -103,10 +103,8 @@ impl Item {
|
|||
match Database::delete(transaction, &record.id) {
|
||||
Ok(_) => {
|
||||
// Delegate clean action to the item childs
|
||||
self.page.clean(transaction, &record.id)?;
|
||||
self.widget.clean(transaction, &record.id)?;
|
||||
|
||||
/* @TODO
|
||||
self.page.clean(transaction, &record.id)?;*/
|
||||
}
|
||||
Err(e) => return Err(e.to_string()),
|
||||
}
|
||||
|
|
@ -151,11 +149,9 @@ impl Item {
|
|||
);
|
||||
|
||||
// Delegate restore action to the item childs
|
||||
item.page.restore(transaction, &record.id)?;
|
||||
item.widget.restore(transaction, &record.id)?;
|
||||
|
||||
/* @TODO
|
||||
self.page.restore(transaction, &id)?; */
|
||||
|
||||
// Result
|
||||
items.push(item);
|
||||
}
|
||||
|
|
@ -185,10 +181,8 @@ impl Item {
|
|||
let id = Database::last_insert_id(transaction);
|
||||
|
||||
// Delegate save action to childs
|
||||
self.page.save(transaction, &id)?;
|
||||
self.widget.save(transaction, &id)?;
|
||||
|
||||
/* @TODO
|
||||
self.page.save(transaction, &id)?; */
|
||||
}
|
||||
Err(e) => return Err(e.to_string()),
|
||||
}
|
||||
|
|
@ -221,11 +215,9 @@ impl Item {
|
|||
}
|
||||
|
||||
// Delegate migration to childs
|
||||
Page::migrate(&tx)?;
|
||||
Widget::migrate(&tx)?;
|
||||
|
||||
/* @TODO
|
||||
Page::migrate(&tx)? */
|
||||
|
||||
// Success
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue