Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
626c6885
Commit
626c6885
authored
Jul 31, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gadgets/details: disabled item caching until after debug
parent
97b06fdc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
31 deletions
+37
-31
modules/ui/details/details.css
modules/ui/details/details.css
+3
-0
modules/ui/details/details.html
modules/ui/details/details.html
+0
-6
modules/ui/details/details.js
modules/ui/details/details.js
+34
-25
No files found.
modules/ui/details/details.css
View file @
626c6885
...
...
@@ -3,6 +3,9 @@
vertical-align
:
top
;
width
:
45%
;
}
.details_element_last
{
float
:
right
;
}
@media
(
max-width
:
40em
)
{
.details_element
{
width
:
100%
;
...
...
modules/ui/details/details.html
View file @
626c6885
...
...
@@ -80,12 +80,6 @@
}'
>
</div>
<!-- item details -->
<div
id=
"description"
data-gadget=
"modules/description/description.html"
data-gadget-module=
"description"
>
</div>
</div>
<!-- footer -->
...
...
modules/ui/details/details.js
View file @
626c6885
...
...
@@ -65,7 +65,6 @@ define([
id
=
response
.
_id
;
App
.
cacheItems
[
id
]
=
[
response
,
now
];
App
.
activeItem
=
id
;
// memory
priv
.
cleanupMemory
(
App
.
cacheItems
);
...
...
@@ -80,30 +79,40 @@ define([
// response object
that
.
data
=
source
;
that
.
before
=
function
(
source
,
callback_mockup
)
{
var
spec
=
{};
spec
.
gadget
=
RenderJs
.
getSelfGadget
();
// TODO: this is for page event bindings. Once JQM content replaces
// page, remove this and make the gadget the content section to
// be updated.
spec
.
page
=
App
.
util
.
closest
(
spec
.
gadget
.
dom
.
get
(
0
),
"
div[data-role='page']
"
);
spec
.
pageId
=
"
#
"
+
spec
.
page
.
id
;
spec
.
source
=
source
;
spec
.
callback_mockup
=
callback_mockup
;
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
);
}
};
// TODO: this does not work.. if it's run on BEFORE, the 2nd reloaded page
// does not trigger getRecursiveGadgets
// if run on AFTER, the page does not load when loaded directly.
// Either way, this is crap. We should be able to fetch the item from the
// URL here, jIO get, keep the response in memory and have all gadgets on
// this page query memory vs every gadget making the same call to jIO.
// FIX!!!
// TODO: this should also fetch the full document along with attachments,
// while all other request should only work with the "meta" data.
// that.before = function (source, callback_mockup) {
// var spec = {};
//
// spec.gadget = RenderJs.getSelfGadget();
// // TODO: this is for page event bindings. Once JQM content replaces
// // page, remove this and make the gadget the content section to
// // be updated.
// spec.page = App.util.closest(spec.gadget.dom.get(0), "div[data-role='page']");
// spec.pageId = "#" + spec.page.id;
// spec.source = source;
// spec.callback_mockup = callback_mockup;
//
// 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
)
{
if
(
App
===
undefined
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment