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
065435e8
Commit
065435e8
authored
Jul 26, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: prevent re-loading existing gadgets on first page
parent
c3b633ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
13 deletions
+12
-13
js/app.js
js/app.js
+7
-1
js/plugins/renderjs/renderjs.js
js/plugins/renderjs/renderjs.js
+3
-2
modules/items/items.css
modules/items/items.css
+1
-0
modules/items/items.js
modules/items/items.js
+1
-10
No files found.
js/app.js
View file @
065435e8
...
...
@@ -154,7 +154,7 @@ define([
RenderJs
.
bindReady
(
function
()
{
var
gadget
=
RenderJs
.
GadgetIndex
.
getGadgetById
(
page
.
attr
(
'
id
'
));
if
(
gadget
.
isEnhanced
()
===
false
)
{
page
.
trigger
(
"
create
"
);
//
page.trigger("create");
gadget
.
setEnhanced
(
true
);
}
});
...
...
@@ -264,6 +264,12 @@ define([
return
;
}
// so now we do it here...
if
(
gadget
.
isEnhanced
()
===
false
)
{
gadget
.
dom
.
parent
().
trigger
(
"
create
"
);
gadget
.
setEnhanced
(
true
);
}
gadget_props
=
gadget
[
"
state
"
];
gadget_cleaned_id
=
gadget_id
.
split
(
"
__
"
).
slice
(
-
1
)[
0
];
...
...
js/plugins/renderjs/renderjs.js
View file @
065435e8
...
...
@@ -115,13 +115,13 @@ var RenderJs = (function () {
// async
if
(
async
)
{
async
(
data
,
function
(
markup
){
gadget
.
append
(
markup
);
gadget
.
empty
().
append
(
markup
);
if
(
callback
)
{
callback
(
self
);
}
});
}
else
{
gadget
.
append
(
data
);
gadget
.
empty
().
append
(
data
);
if
(
callback
)
{
callback
(
self
);
}
...
...
@@ -177,6 +177,7 @@ var RenderJs = (function () {
gadget_js
[
key
]
=
value
;
});
}
if
(
url
!==
undefined
&&
url
!==
""
)
{
cacheable
=
gadget
.
attr
(
"
data-gadget-cacheable
"
);
cache_id
=
gadget
.
attr
(
"
data-gadget-cache-id
"
);
...
...
modules/items/items.css
View file @
065435e8
...
...
@@ -12,6 +12,7 @@
width
:
100%
;
overflow
:
hidden
!important
;
border
:
1px
solid
#D5D5D5
;
background
:
white
;
}
.items_listview
li
{
float
:
left
;
...
...
modules/items/items.js
View file @
065435e8
...
...
@@ -125,16 +125,7 @@ define([
spec
.
source
=
source
;
spec
.
callback_mockup
=
callback_mockup
;
// if unbound, bind and run once, if bound, just run
if
(
spec
.
gadget
.
sourceSet
===
undefined
)
{
spec
.
gadget
.
sourceSet
=
true
;
$
(
document
).
on
(
"
pagebeforeshow
"
,
spec
.
pageId
,
function
(
e
)
{
priv
.
generateItems
(
spec
);
});
priv
.
generateItems
(
spec
);
}
else
{
priv
.
generateItems
(
spec
);
}
priv
.
generateItems
(
spec
);
};
that
.
callback
=
function
(
self
)
{
...
...
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