Commit 626c6885 authored by Sven Franck's avatar Sven Franck

Gadgets/details: disabled item caching until after debug

parent 97b06fdc
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
vertical-align: top; vertical-align: top;
width: 45%; width: 45%;
} }
.details_element_last {
float: right;
}
@media (max-width: 40em) { @media (max-width: 40em) {
.details_element { .details_element {
width: 100%; width: 100%;
......
...@@ -80,12 +80,6 @@ ...@@ -80,12 +80,6 @@
}'> }'>
</div> </div>
<!-- item details -->
<div id="description"
data-gadget="modules/description/description.html"
data-gadget-module="description">
</div>
</div> </div>
<!-- footer --> <!-- footer -->
......
...@@ -65,7 +65,6 @@ define([ ...@@ -65,7 +65,6 @@ define([
id = response._id; id = response._id;
App.cacheItems[id] = [response, now]; App.cacheItems[id] = [response, now];
App.activeItem = id;
// memory // memory
priv.cleanupMemory(App.cacheItems); priv.cleanupMemory(App.cacheItems);
...@@ -80,30 +79,40 @@ define([ ...@@ -80,30 +79,40 @@ define([
// response object // response object
that.data = source; that.data = source;
that.before = function (source, callback_mockup) { // TODO: this does not work.. if it's run on BEFORE, the 2nd reloaded page
var spec = {}; // does not trigger getRecursiveGadgets
// if run on AFTER, the page does not load when loaded directly.
spec.gadget = RenderJs.getSelfGadget(); // Either way, this is crap. We should be able to fetch the item from the
// TODO: this is for page event bindings. Once JQM content replaces // URL here, jIO get, keep the response in memory and have all gadgets on
// page, remove this and make the gadget the content section to // this page query memory vs every gadget making the same call to jIO.
// be updated. // FIX!!!
spec.page = App.util.closest(spec.gadget.dom.get(0), "div[data-role='page']"); // TODO: this should also fetch the full document along with attachments,
spec.pageId = "#" + spec.page.id; // while all other request should only work with the "meta" data.
spec.source = source;
spec.callback_mockup = callback_mockup; // that.before = function (source, callback_mockup) {
// var spec = {};
if (!spec.page.getAttribute("events_details")) { //
spec.page.setAttribute("events_details", true); // spec.gadget = RenderJs.getSelfGadget();
$(document).on("pagebeforeshow.details", spec.pageId, function (e, data) { // // TODO: this is for page event bindings. Once JQM content replaces
// TODO: if we allow to reload, we also need to trigger refresh on // // page, remove this and make the gadget the content section to
// so we need to reload this every time a page is shown. question // // be updated.
// is how to trigger a refresh on this element ONLY // spec.page = App.util.closest(spec.gadget.dom.get(0), "div[data-role='page']");
priv.storeItem(spec); // spec.pageId = "#" + spec.page.id;
}); // spec.source = source;
// and run intial // spec.callback_mockup = callback_mockup;
priv.storeItem(spec); //
} // if (!spec.page.getAttribute("events_details")) {
}; // spec.page.setAttribute("events_details", true);
// $(document).on("pagebeforeshow.details", spec.pageId, function (e, data) {
// // TODO: if we allow to reload, we also need to trigger refresh on
// // so we need to reload this every time a page is shown. question
// // is how to trigger a refresh on this element ONLY
// priv.storeItem(spec);
// });
// // and run intial
// priv.storeItem(spec);
// }
// };
that.after = function (self) { that.after = function (self) {
if (App === undefined) { if (App === undefined) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment