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
dca54136
Commit
dca54136
authored
Jan 08, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added layout_level to gadget state so it's available on updates
parent
2dc6df34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
25 deletions
+16
-25
js/erp5_loader.js
js/erp5_loader.js
+16
-25
No files found.
js/erp5_loader.js
View file @
dca54136
...
...
@@ -230,7 +230,7 @@
}
}
}
else
{
util
.
loader
(
""
,
"
global_dict.
status_dict.failed
"
,
"
ban-circle
"
);
util
.
loader
(
""
,
"
status_dict.failed
"
,
"
ban-circle
"
);
}
// since we are jquerying, close (all) popups
...
...
@@ -238,7 +238,7 @@
$
(
"
.ui-popup
"
).
popup
(
"
close
"
);
})
.
then
(
function
()
{
util
.
loader
(
""
,
"
global_dict.
status_dict.saving
"
);
util
.
loader
(
""
,
"
status_dict.saving
"
);
// register the user
return
app
.
register
(
obj
.
id
)
...
...
@@ -254,7 +254,7 @@
if
(
gadget
.
getAttribute
(
"
data-depend
"
)
===
"
login_state
"
)
{
util
.
loader
(
""
,
"
global_dict.
status_dict.updating
"
);
util
.
loader
(
""
,
"
status_dict.updating
"
);
// update gadget
app
.
setContent
(
...
...
@@ -266,7 +266,8 @@
},
{
"
fragment_list
"
:
gadget
.
state
.
fragment_list
,
"
mode
"
:
gadget
.
state
.
view
"
mode
"
:
gadget
.
state
.
view
,
"
layout_level
"
:
gadget
.
state
.
layout_level
},
undefined
,
true
...
...
@@ -4098,7 +4099,7 @@
storage
.
remove
=
function
(
config
)
{
var
store
,
items
,
i
,
kill
;
util
.
loader
(
""
,
"
global_dict.
status_dict.removing
"
);
util
.
loader
(
""
,
"
status_dict.removing
"
);
store
=
storage
.
items
;
kill
=
config
.
state
.
query
.
last
||
config
.
state
.
query
.
_id
;
...
...
@@ -4194,7 +4195,7 @@
delete
obj
.
identifier
;
}
util
.
loader
(
""
,
"
global_dict.
status_dict.saving
"
);
util
.
loader
(
""
,
"
status_dict.saving
"
);
// TODO: a post should always include all required fields
// TODO: find a way to set default fields, like timestamp etc
...
...
@@ -4214,7 +4215,7 @@
app
.
setLoginStatus
(
answer
.
response
,
config
.
portal_type_source
);
break
;
}
util
.
loader
(
""
,
"
global_dict.
status_dict.saved
"
,
"
check
"
);
util
.
loader
(
""
,
"
status_dict.saved
"
,
"
check
"
);
return
pass_id
;
}
})
...
...
@@ -4314,7 +4315,7 @@
// update gadget
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
.
then
(
function
(
reply
)
{
...
...
@@ -4470,7 +4471,7 @@
app
.
timer
=
window
.
setTimeout
(
function
()
{
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
.
then
(
function
(
reply
)
{
...
...
@@ -4624,7 +4625,7 @@
// update gadget
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
.
then
(
function
(
reply
)
{
...
...
@@ -5263,7 +5264,7 @@
{
"
data-enhanced
"
:
"
true
"
},
{
"
text
"
:
home
?
"
Home
"
:
title
,
"
data-i18n
"
:
home
?
"
page_dict.home.titl
e
"
:
(
translation_failed
"
data-i18n
"
:
home
?
"
global_dict.hom
e
"
:
(
translation_failed
?
null
:
"
page_dict.
"
+
title
.
split
(
"
?
"
)[
0
]
+
"
.title
"
)
}
);
...
...
@@ -5521,7 +5522,6 @@
var
pass
=
reply
.
pass
,
reference
,
last
;
if
(
pass
.
skip
===
undefined
)
{
// create or update state object
if
(
pass
.
create
===
false
)
{
...
...
@@ -5539,6 +5539,7 @@
"
type
"
:
pass
.
type
,
"
method
"
:
pass
.
constructor
,
"
fragment_list
"
:
pass
.
fragment_list
,
"
layout_level
"
:
pass
.
layout_level
,
"
id
"
:
pass
.
id
,
"
view
"
:
pass
.
mode
};
...
...
@@ -5622,7 +5623,7 @@
if
(
store
&&
items
.
length
>
0
)
{
// show some status
util
.
loader
(
""
,
"
global_dict.
status_dict.storing
"
);
util
.
loader
(
""
,
"
status_dict.storing
"
);
// as store will also be called directly and may require field
// definitions for validating what is being stored, we may fetch
...
...
@@ -6121,7 +6122,7 @@
// TODO: not bulletproof i18n handling... we expect i18n to be defined
if
(
typeof
data
.
toPage
===
"
object
"
)
{
if
(
$
.
mobile
.
firstPage
[
0
].
id
===
data
.
toPage
[
0
].
id
)
{
app
.
setPageTitle
(
"
page_dict.home.titl
e
"
);
app
.
setPageTitle
(
"
global_dict.hom
e
"
);
}
}
...
...
@@ -6795,7 +6796,7 @@
/* ERROR HANDLER */
/* ====================================================================== */
/**
* Capture errors
, log to console and trigger bugticker
* Capture errors
to do .... something
* @method error
* @param {object} err Error object
*/
...
...
@@ -6811,16 +6812,6 @@
/* ====================================================================== */
/* ENTRY POINT */
/* ====================================================================== */
/**
* There are 5 "modules" in this app
* factory => generates UI content
* storage => storage handler
* app => application manager
* map => map storage data to factory
* util => helper functions
* flux => hapless attempt at security
**/
app
.
contentLoaded
(
window
,
function
()
{
// Don't wipe if opened in a popup (like in oAuth redirect_uri)
...
...
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