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
11e1631f
Commit
11e1631f
authored
Dec 18, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console.log all JIO calls
parent
0247423b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
js/erp5_loader.js
js/erp5_loader.js
+21
-18
No files found.
js/erp5_loader.js
View file @
11e1631f
...
...
@@ -1317,9 +1317,9 @@
placeholder
=
spec
.
placeholder_dict
||
{};
// no auth
console
.
log
(
"
so what is answer
"
)
console
.
log
(
answer
)
console
.
log
(
answer
===
null
)
//
console.log("so what is answer")
//
console.log(answer)
//
console.log(answer === null)
if
(
answer
===
null
)
{
target
=
factory
.
util
.
wrapInForm
(
spec
);
...
...
@@ -3768,14 +3768,8 @@
"
pass
"
:
{
"
type
"
:
config
.
gadget
.
state
.
type
,
"
reply
"
:
true
}
})
.
then
(
function
(
answer
)
{
console
.
log
(
"
soo....
"
)
console
.
log
(
answer
)
// TODO: This is not the correct place to run all status updates!
if
(
answer
.
response
.
result
===
"
success
"
)
{
console
.
log
(
"
swithing
"
)
console
.
log
(
config
)
console
.
log
(
config
.
gadget
)
console
.
log
(
"
mh
"
)
switch
(
config
.
gadget
.
getAttribute
(
"
data-set
"
))
{
case
"
login_state
"
:
app
.
setLoginStatus
(
answer
.
response
,
config
.
portal_type_source
);
...
...
@@ -4267,8 +4261,7 @@
"
issued
"
:
stamp
,
"
expires
"
:
auth
?
auth
.
expires_in
:
3600
}
console
.
log
(
"
so...
"
)
console
.
log
(
flux
)
// need to update the .... button
// TODO: make a login gadget, store dependend buttons in state
links
=
util
.
getHeader
().
getElementsByTagName
(
"
A
"
);
...
...
@@ -4704,8 +4697,6 @@
config
.
deeplink
=
true
;
config
.
layout_identifier
=
clean_hash
.
split
(
"
::
"
)[
0
];
}
console
.
log
(
"
parsed link
"
)
console
.
log
(
config
)
return
config
;
};
...
...
@@ -4853,6 +4844,7 @@
return
factory
[
content_dict
.
type
](
content_dict
,
spec
,
create
)
case
"
gadget
"
:
console
.
log
(
"
setContent: 'Rendering' a gadget. If no portal type is defined, nothing is loaded
"
);
// no portal_type, no dynamic data
if
(
content_dict
.
portal_type_source
===
undefined
&&
content_dict
.
href
===
undefined
)
{
...
...
@@ -5193,7 +5185,8 @@
method
=
"
put
"
;
obj
.
_id
=
obj
.
identifier
;
}
console
.
log
(
"
storing an item, METHOD =
"
+
(
method
||
"
post
"
)
+
"
STORAGE = items
"
);
console
.
log
(
obj
)
promises
[
i
]
=
store
[
method
||
"
post
"
](
obj
)
.
then
(
function
(
answer
)
{
return
answer
;
...
...
@@ -5342,7 +5335,6 @@
if
(
pass
.
auth
)
{
return
app
.
checkLoginStatus
(
true
,
pass
)
.
then
(
function
(
new_pass
)
{
return
{
"
pass
"
:
new_pass
}
...
...
@@ -5369,7 +5361,8 @@
// need to make a promise to not break the chain
return
RSVP
.
resolve
({
"
pass
"
:
parcel
.
pass
});
}
console
.
log
(
"
app.fetchConfiguration > GETATTACHMENT, STORAGE =
"
+
parcel
.
storage
);
console
.
log
({
"
_id
"
:
parcel
.
file
,
"
_attachment
"
:
parcel
.
attachment
});
store
=
storage
[
parcel
.
storage
];
return
store
.
getAttachment
({
...
...
@@ -5414,6 +5407,8 @@
*/
// NOTE: until we have real data we load fake data on application init!
app
.
fetchData
=
function
(
parcel
)
{
console
.
log
(
"
app.fetchData > trying items, ALLDOCS, STORAGE =
"
+
parcel
.
storage
)
console
.
log
(
parcel
.
query
)
return
storage
[
parcel
.
storage
].
allDocs
(
parcel
.
query
)
.
then
(
function
(
response
)
{
return
{
...
...
@@ -5465,10 +5460,19 @@
util
.
error
({
"
error
"
:
"
getFromDisk: no storage defined
"
});
return
RSVP
.
all
([]);
}
console
.
log
(
"
getFromDisk: Store sample data, METHOD = put, STORAGE =
"
+
app
.
default_dict
.
storage_dict
.
settings
)
console
.
log
({
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
)});
return
storage_location
.
put
({
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
)
})
.
then
(
function
()
{
console
.
log
(
"
getFromDisk: Store sample data as attachment, METHOD: putAttachment, Storage =
"
+
app
.
default_dict
.
storage_dict
.
settings
)
console
.
log
({
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
),
"
_attachment
"
:
(
property_dict
.
attachment
||
app
.
default_dict
.
storage_dict
.
configuration
),
"
_data
"
:
JSON
.
stringify
(
response
),
"
_mimetype
"
:
"
application/json
"
});
return
storage_location
.
putAttachment
({
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
),
"
_attachment
"
:
(
property_dict
.
attachment
||
app
.
default_dict
.
storage_dict
.
configuration
),
...
...
@@ -5574,8 +5578,7 @@
}
else
{
destination
=
config
.
layout_identifier
;
}
console
.
log
(
"
RUNNING WITH
"
)
console
.
log
(
destination
)
return
app
.
fetchConfiguration
({
"
storage
"
:
app
.
default_dict
.
storage_dict
.
settings
,
"
file
"
:
"
pages
"
,
...
...
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