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
228a98ef
Commit
228a98ef
authored
Apr 23, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: add new classList method (not used yet)
parent
b6fc9c68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
js/erp5_loader.js
js/erp5_loader.js
+16
-1
No files found.
js/erp5_loader.js
View file @
228a98ef
...
@@ -5764,6 +5764,22 @@
...
@@ -5764,6 +5764,22 @@
return
new
RegExp
(
"
(?:^|
\\
s)
"
+
className
+
"
(?!
\\
S)
"
,
"
g
"
);
return
new
RegExp
(
"
(?:^|
\\
s)
"
+
className
+
"
(?!
\\
S)
"
,
"
g
"
);
};
};
// /**
// * Property to set whether classlist is supported
// * @property support_classList
// */
// // TODO: add to support module/Modernizr
// util.no_support_classList = document.documentElement.classList === undefined;
//
// util.testForString = util.no_support_classList ?
// function(el, clss) {
// return el.className && new RegExp("(^|\\s)" +
// clss + "(\\s|$)").test(el.className);
// } :
// function(el, clss) {
// return el.classList.contains(clss);
// };
/**
/**
* Test for a class name
* Test for a class name
* @method testForString
* @method testForString
...
@@ -5772,7 +5788,6 @@
...
@@ -5772,7 +5788,6 @@
* @param {boolean} nowrap Whether to wrap in space
* @param {boolean} nowrap Whether to wrap in space
* @return {boolean} result True/False
* @return {boolean} result True/False
*/
*/
// WARNING: requires IE8- requires shim
util
.
testForString
=
function
(
search_string
,
full_string
,
nowrap
)
{
util
.
testForString
=
function
(
search_string
,
full_string
,
nowrap
)
{
var
s
=
nowrap
?
""
:
"
"
;
var
s
=
nowrap
?
""
:
"
"
;
return
(
s
+
full_string
+
s
).
indexOf
(
s
+
search_string
+
s
)
>
-
1
;
return
(
s
+
full_string
+
s
).
indexOf
(
s
+
search_string
+
s
)
>
-
1
;
...
...
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