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
14cebc93
Commit
14cebc93
authored
Jul 22, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added deferred callback to all modules
parent
75741309
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
419 additions
and
53 deletions
+419
-53
modules/address/address.js
modules/address/address.js
+14
-2
modules/basket/basket.js
modules/basket/basket.js
+14
-2
modules/browser/browser.js
modules/browser/browser.js
+14
-2
modules/confirm/confirm.js
modules/confirm/confirm.js
+14
-2
modules/description/description.js
modules/description/description.js
+14
-2
modules/details/details.js
modules/details/details.js
+14
-2
modules/footer/footer.js
modules/footer/footer.js
+14
-2
modules/gallery/gallery.js
modules/gallery/gallery.js
+14
-2
modules/index/index.html
modules/index/index.html
+96
-1
modules/item/item.js
modules/item/item.js
+14
-2
modules/items/items.js
modules/items/items.js
+14
-2
modules/login/login.js
modules/login/login.js
+14
-2
modules/media/media.js
modules/media/media.js
+14
-2
modules/payment/payment.js
modules/payment/payment.js
+14
-2
modules/refine/refine.js
modules/refine/refine.js
+14
-2
modules/register/register.js
modules/register/register.js
+14
-2
modules/search/search.js
modules/search/search.js
+14
-2
modules/searchbar/searchbar.js
modules/searchbar/searchbar.js
+15
-8
modules/seo/seo.js
modules/seo/seo.js
+14
-2
modules/shipment/shipment.js
modules/shipment/shipment.js
+14
-2
modules/sorting/sorting.js
modules/sorting/sorting.js
+14
-2
modules/summary/summary.js
modules/summary/summary.js
+14
-2
modules/teaser/teaser.js
modules/teaser/teaser.js
+14
-2
modules/terms/terms.js
modules/terms/terms.js
+14
-2
No files found.
modules/address/address.js
View file @
14cebc93
...
...
@@ -8,8 +8,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/basket/basket.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/browser/browser.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/confirm/confirm.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/description/description.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/details/details.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/footer/footer.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/gallery/gallery.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/index/index.html
View file @
14cebc93
...
...
@@ -26,5 +26,100 @@
}'
>
</div>
<!-- content -->
<div
data-role=
"content"
class=
"ui-content"
>
<!-- teaser -->
<div
id=
"teaser"
data-gadget=
"modules/teaser/teaser.html"
data-gadget-module=
"teaser"
></div>
<!-- quicksearch -->
<div
id=
"quicksearch"
class=
"searchbar_wrap"
data-gadget=
"modules/searchbar/searchbar.html"
data-gadget-module=
"searchbar"
data-gadget-property=
'{
"state": [
{
"quicksearch": {
"_elements": [
["ui-filter", "attr", "data-i18n", "[placeholder]quicksearch.browse"],
["ui-filter", "attr", "data-i18n-target", "input"]
],
"_config": {
"datasource": {"module": "storage"}
},
"_links": {
"self": {"href": ""},
"datasource": {"href": "modules/storage/storage.html#queryStorage?method=default"},
"show": {"href": "search.html#queryStorage?method=default"}
}
}
}
]
}'
>
</div>
<!-- gallery widget -->
<div
id=
"gallery"
data-gadget=
"modules/gallery/gallery.html"
data-gadget-module=
"gallery"
></div>
<!-- top sellers -->
<div
id=
"topsellers"
data-gadget=
"modules/items/items.html"
data-gadget-module=
"items"
data-gadget-property=
'{
"state": [
{
"topsellers": {
"_elements": [
["items_title", "attr", "data-i18n", "topsellers.info"],
["items_show", "attr", "data-i18n", "topsellers.show"],
["items_show", "attr", "href", "search.html?show=topsellers"]
],
"_config": {
"datasource": {"module": "storage", "pointer": "topsellers"}
},
"_links": {
"self": {"href": ""},
"datasource": {"href": "modules/storage/storage.html#queryStorage?method=topsellers"},
"show": {"href": "search.html#queryStorage?method=topsellers"}
}
}
}
]
}'
>
</div>
<!-- top brands
<div id="topbrands"
data-gadget="modules/items/items.html"
data-gadget-module="items"
data-gadget-property='{
"state": [
{
"topbrands": {
"_elements": [
["items_title", "attr", "data-i18n", "topbrands.info"],
["items_show", "attr", "data-i18n", "topbrands.show"],
["items_show", "attr", "href", "search.html?show=topbrands"]
],
"_config": {
"datasource": {"module": "storage", "pointer": "topbrands"}
},
"_links": {
"self": {"href": ""},
"datasource": {"href": "modules/storage/storage.html#queryStorage?method=topbrands"},
"show": {"href": "search.html#queryStorage?method=topsellers"}
}
}
}
]
}'
></div>-->
<!-- seo story -->
<div
id=
"seo"
data-gadget=
"modules/seo/seo.html"
data-gadget-module=
"seo"
></div>
</div>
<!-- footer -->
<div
id=
"footer"
data-role=
"footer"
data-position=
"fixed"
data-gadget=
"modules/footer/footer.html"
data-gadget-module=
"footer"
></div>
</body>
</html>
\ No newline at end of file
modules/item/item.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/items/items.js
View file @
14cebc93
...
...
@@ -60,8 +60,20 @@ define([
};
response
.
callback
=
function
(
self
)
{
// renderGadget
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/login/login.js
View file @
14cebc93
...
...
@@ -8,8 +8,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/media/media.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/payment/payment.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/refine/refine.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/register/register.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/search/search.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/searchbar/searchbar.js
View file @
14cebc93
...
...
@@ -73,8 +73,8 @@ define([
//);
};
response
.
callback
=
function
(
gadget
)
{
var
filter
=
gadget
.
dom
.
find
(
"
.searchbar_filter
"
);
response
.
callback
=
function
(
self
)
{
var
filter
=
self
.
dom
.
find
(
"
.searchbar_filter
"
);
filter
.
on
(
"
filterbarbeforefilter
"
,
function
(
e
,
data
)
{
var
value
=
data
.
input
.
value
;
...
...
@@ -96,16 +96,23 @@ define([
// question will be how to store information...
// if we follow the DC scheme, we have some core metadata and the
// rest must be stored in an attachment.
}
});
// renderGadget
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/seo/seo.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/shipment/shipment.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/sorting/sorting.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/summary/summary.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/teaser/teaser.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
modules/terms/terms.js
View file @
14cebc93
...
...
@@ -7,8 +7,20 @@ define([
response
.
data
=
source
;
response
.
callback
=
function
(
self
)
{
if
(
window
.
App
===
undefined
)
{
def
=
new
$
.
Deferred
;
def
.
done
(
function
(
gadget
)
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
gadget
);
});
window
.
fallbackLoader
.
deferreds
.
push
(
def
);
window
.
fallbackLoader
.
args
.
push
(
self
);
}
else
{
// prefix instance-ids, pass JSON
window
.
App
.
renderGadgets
(
self
);
}
};
// return response object
...
...
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