Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
c3438368
Commit
c3438368
authored
7 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
[REFACTORING] Clean up basket JS
parent
718acc8a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/basket/js/functions.js
+3
-53
3 additions, 53 deletions
modules/basket/js/functions.js
with
3 additions
and
53 deletions
modules/basket/js/functions.js
+
3
−
53
View file @
c3438368
//document.write('<script type="text/javascript" src="js/scrollbox.js"></script>');
function
show_config_action
(
id_action
,
inside_scrollbox
,
show_when_disabled
)
{
//var div_to_show = $('action_'+id_action);
var
chkbox
=
$
(
'
checkbox_
'
+
id_action
)
var
chkbox
=
$
(
'
checkbox_
'
+
id_action
);
if
(
chkbox
&&
(
chkbox
.
disabled
==
false
||
show_when_disabled
==
true
)
)
{
...
...
@@ -25,7 +22,7 @@
var
actions_uses
=
$
(
id_action
+
'
_actions_uses
'
);
actions_uses
.
style
.
display
=
'
none
'
;
}
for
(
i
=
0
;
i
<
childs
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
childs
.
length
;
i
++
)
{
if
(
childs
[
i
].
id
==
'
action_
'
+
id_action
)
{
...
...
@@ -42,17 +39,6 @@
}
function
check_this_box
(
id_box
)
{
var
to_check
=
$
(
id_box
);
if
(
to_check
&&
to_check
.
disabled
==
false
)
{
to_check
.
checked
=
'
checked
'
;
}
}
function
manage_actions
(
id
,
inside_scrollbox
,
path_manage_script
)
{
var
hide_other_actions
=
false
;
...
...
@@ -141,7 +127,7 @@
{
var
childs
=
main_div
.
firstChild
.
childNodes
;
}
for
(
i
=
0
;
i
<
childs
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
childs
.
length
;
i
++
)
{
childs
[
i
].
style
.
display
=
'
none
'
;
}
...
...
@@ -179,7 +165,6 @@ function check_form_baskets(id_form)
{
if
(
reg_user
.
test
(
elems
[
i
].
value
))
{
//return 1; // Ok
found
=
true
;
}
else
...
...
@@ -216,7 +201,6 @@ function check_form_baskets(id_form)
function
check_form_baskets_secondary
(
id_form
)
{
var
form
=
$
(
id_form
);
var
reg_user
=
new
RegExp
(
"
^.+, .+ (.+)$
"
);
if
(
typeof
(
form
)
!=
'
undefined
'
)
{
var
found
=
false
;
var
elems
=
document
.
getElementsByTagName
(
'
INPUT
'
);
...
...
@@ -246,7 +230,6 @@ function check_form_baskets_secondary(id_form)
function
valid_actions_param
(
id_form
)
{
var
frm
=
$
(
id_form
);
//var reg_chosen = new RegExp("_chosen$");
var
selects
=
frm
.
getElementsByTagName
(
'
select
'
);
//Array
for
(
var
i
=
0
;
i
<
selects
.
length
;
i
++
)
{
...
...
@@ -257,39 +240,6 @@ function valid_actions_param(id_form)
}
}
function
moveInWF
(
way
,
collId
,
resId
,
role
,
userId
)
{
if
(
way
!=
''
&&
collId
!=
''
&&
resId
!=
''
&&
role
!=
''
&&
userId
!=
''
)
{
//~ console.log(way);
//~ console.log(collId);
//~ console.log(resId);
//~ console.log(role);
//~ console.log(userId);
new
Ajax
.
Request
(
'
index.php?display=true&module=basket&page=ajaxMoveInWF&display=true
'
,
{
method
:
'
post
'
,
asynchronous
:
false
,
parameters
:
{
way
:
way
,
collId
:
collId
,
resId
:
resId
,
role
:
role
,
userId
:
userId
},
onSuccess
:
function
(
answer
)
{
eval
(
'
response=
'
+
answer
.
responseText
);
if
(
response
.
status
>
0
)
{
window
.
alert
(
response
.
error_txt
);
}
else
{
//$('send').click();
}
}
}
);
}
}
function
simpleAjaxReturn
(
url
){
new
Ajax
.
Request
(
url
,
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment