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
49724873
Commit
49724873
authored
Apr 23, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: replaced unused with required actions ...
parent
3362afae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
36 deletions
+49
-36
js/erp5_loader.js
js/erp5_loader.js
+49
-36
No files found.
js/erp5_loader.js
View file @
49724873
...
@@ -2966,6 +2966,55 @@
...
@@ -2966,6 +2966,55 @@
// content.set..., no need for dynamic content and pointer
// content.set..., no need for dynamic content and pointer
map
.
actions
=
{
map
.
actions
=
{
/**
* POST an object
* @method new
* @param {object} obj Action Object
**/
"
new
"
:
function
(
obj
)
{
storage
.
write
(
obj
)
.
then
(
function
(
response
)
{
app
.
util
.
loader
(
""
,
"
status_dict.saved
"
,
"
check
"
);
app
.
navigate
(
obj
,
response
);
})
.
fail
(
function
(
error
)
{
switch
(
error
.
status
)
{
case
408
:
app
.
util
.
loader
(
""
,
"
status_dict.timeout
"
,
"
clock-o
"
);
break
;
case
400
:
app
.
util
.
loader
(
""
,
"
validation_dict.general
"
,
"
ban
"
);
break
;
default
:
app
.
util
.
loader
(
""
,
"
status_dict.error
"
,
"
ban
"
);
break
;
}
});
},
/**
* GET an object
* @method get
* @param {object} obj Action Object
**/
"
get
"
:
function
(
obj
)
{
storage
.
fetch
(
obj
);
},
/**
* PUT an object
* @method update
* @param {object} obj Action Object
**/
"
update
"
:
function
(
obj
)
{
storage
.
write
(
obj
)
.
then
(
function
(
response
)
{
app
.
util
.
loader
(
""
,
"
status_dict.saved
"
,
"
check
"
);
app
.
navigate
(
obj
,
response
);
})
.
fail
(
function
(
error
)
{
switch
(
error
.
status
)
{
case
408
:
app
.
util
.
loader
(
""
,
"
status_dict.timeout
"
,
"
clock-o
"
);
break
;
case
400
:
app
.
util
.
loader
(
""
,
"
validation_dict.general
"
,
"
ban
"
);
break
;
default
:
app
.
util
.
loader
(
""
,
"
status_dict.error
"
,
"
ban
"
);
break
;
}
});
},
/**
/**
* Look up single value from dict
* Look up single value from dict
* @method translateLookup
* @method translateLookup
...
@@ -3115,42 +3164,6 @@
...
@@ -3115,42 +3164,6 @@
}
}
},
},
/**
* Show jumps popup
* @method jump
* @param {object} obj Action Object
**/
"
browse
"
:
function
(
obj
)
{
factory
.
util
.
setDynamicPointer
(
obj
,
"
browse
"
);
},
/**
* Show task popup
* @method tasks
* @param {object} obj Action Object
**/
"
tasks
"
:
function
(
obj
)
{
factory
.
util
.
setDynamicPointer
(
obj
,
"
tasks
"
);
},
/**
* Show application popup
* @method login
* @param {object} obj Action Object
**/
"
login
"
:
function
(
obj
)
{
factory
.
util
.
setDynamicPointer
(
obj
,
"
login
"
);
},
/**
* Show export popup
* @method export
* @param {object} obj Action Object
**/
"
export
"
:
function
(
obj
)
{
factory
.
util
.
setDynamicPointer
(
obj
,
"
export
"
);
},
/**
/**
* Generic pagination method changing number of records displayed
* Generic pagination method changing number of records displayed
* @method limit
* @method limit
...
...
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