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
579284d3
Commit
579284d3
authored
Oct 16, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started check/checkallvisible/checkall
parent
d9696888
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
41 deletions
+62
-41
js/erp5_loader.js
js/erp5_loader.js
+62
-41
No files found.
js/erp5_loader.js
View file @
579284d3
...
...
@@ -139,6 +139,48 @@
init
.
sort
(
e
,
"
desc_abc
"
,
"
sort
"
,
"
sort-by-alphabet-alt
"
);
break
;
}
},
/**
* selecting single checkbox
* @method sort
* @param {object} e Event
*/
check
:
function
(
e
)
{
},
/**
* select all rows
* @method sort
* @param {object} e Event
*/
check_all
:
function
(
e
)
{
// // check all 3-state (none|all visible|all)
// if (config.checkbox.show) {
// $parent.on("change", ".tick_all", function (e) {
// var checkbox = e.target,
// label = checkbox.previousSibling;
//
// if (checkbox.checked) {
// if (checkbox.indeterminate === false) {
// checkbox.setAttribute("flag", true);
// }
// } else {
// if (checkbox.getAttribute("flag")) {
// checkbox.removeAttribute("flag");
// checkbox.indeterminate = true;
// checkbox.checked = true;
// label.className = label.className.replace(priv.filterForClass("ui-icon-checkbox-on"), ' ui-icon-globe');
// e.preventDefault();
// return false;
// } else {
// checkbox.indeterminate = false;
// label.className = label.className.replace(priv.filterForClass("ui-icon-globe") , '');
// }
// }
// });
// }
}
};
...
...
@@ -389,14 +431,15 @@
config
=
{
"
type
"
:
"
input
"
,
"
direct
"
:
{
"
id
"
:
settings
.
portal_type_title
+
"
_
ti
ck_all
"
,
"
id
"
:
settings
.
portal_type_title
+
"
_
che
ck_all
"
,
"
className
"
:
"
action
"
},
"
attributes
"
:
{
"
type
"
:
"
checkbox
"
,
"
value
"
:
"
Select All/Unselect All
"
,
"
data-iconpos
"
:
"
notext
"
,
"
data-reference
"
:
"
select_all
"
"
data-reference
"
:
settings
.
base_element
.
direct
.
id
,
"
data-action
"
:
"
check_all
"
},
"
logic
"
:
{}
}
...
...
@@ -520,7 +563,8 @@
"
type
"
:
"
checkbox
"
,
"
value
"
:
"
Select
"
+
item
.
title
||
item
.
id
,
"
data-iconpos
"
:
"
notext
"
,
"
data-reference
"
:
"
select_item
"
"
data-action
"
:
"
check
"
,
"
data-reference
"
:
item
.
id
},
"
logic
"
:
{}
},
...
...
@@ -1861,40 +1905,6 @@
// }
// }
//
// // check all 3-state (none|all visible|all)
// if (config.checkbox.show) {
// $parent.on("change", ".tick_all", function (e) {
// var checkbox = e.target,
// label = checkbox.previousSibling;
//
// if (checkbox.checked) {
// if (checkbox.indeterminate === false) {
// checkbox.setAttribute("flag", true);
// }
// } else {
// if (checkbox.getAttribute("flag")) {
// checkbox.removeAttribute("flag");
// checkbox.indeterminate = true;
// checkbox.checked = true;
// label.className = label.className.replace(priv.filterForClass("ui-icon-checkbox-on"), ' ui-icon-globe');
// e.preventDefault();
// return false;
// } else {
// checkbox.indeterminate = false;
// label.className = label.className.replace(priv.filterForClass("ui-icon-globe") , '');
// }
// }
// });
// }
//
// });
...
...
@@ -2718,22 +2728,33 @@
// global actions
.
on
(
"
click change
"
,
"
.action
"
,
function
(
e
)
{
var
action
,
handler
,
test
,
target
,
href
,
element
,
form
,
valid
,
val
;
var
action
,
handler
,
test
,
target
,
href
,
element
,
form
,
valid
,
val
,
tag
;
tag
=
e
.
target
.
tagName
;
// stop links triggering
if
(
e
.
type
===
"
click
"
)
{
e
.
preventDefault
();
if
(
e
.
type
===
"
click
"
&&
e
.
target
.
tagName
===
"
SELECT
"
)
{
if
(
e
.
type
===
"
click
"
&&
tag
===
"
SELECT
"
)
{
return
;
}
}
if
(
e
.
type
===
"
change
"
)
{
if
(
e
.
type
===
"
change
"
&&
tag
===
"
SELECT
"
)
{
val
=
e
.
target
.
options
[
e
.
target
.
selectedIndex
].
value
;
}
// JQM bug on selects
// TODO: remove once fixed
if
(
e
.
target
.
tagName
===
"
SPAN
"
||
e
.
target
.
tagName
===
"
OPTION
"
)
{
if
(
tag
===
"
SPAN
"
||
tag
===
"
OPTION
"
)
{
return
;
}
// map
...
...
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