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
ff6d7e11
Commit
ff6d7e11
authored
7 years ago
by
Odran PHILIBERT
Browse files
Options
Downloads
Patches
Plain Diff
Modification en JQuery pour le module Note
parent
4e1e09d7
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/notes/js/functions.js
+36
-32
36 additions, 32 deletions
modules/notes/js/functions.js
with
36 additions
and
32 deletions
modules/notes/js/functions.js
+
36
−
32
View file @
ff6d7e11
...
...
@@ -2,41 +2,38 @@ function showNotesForm(path, width, height) {
if
(
typeof
(
width
)
===
'
undefined
'
){
var
width
=
'
800
'
;
}
}
if
(
typeof
(
height
)
===
'
undefined
'
){
var
height
=
'
480
'
;
}
new
Ajax
.
Request
(
path
,
{
method
:
'
post
'
,
parameters
:
{
url
:
path
},
onSuccess
:
function
(
answer
)
{
eval
(
"
response =
"
+
answer
.
responseText
);
$j
.
ajax
({
url
:
path
,
type
:
'
POST
'
,
success
:
function
(
answer
)
{
eval
(
"
response =
"
+
answer
);
if
(
response
.
status
==
0
){
var
modal_content
=
convertToTextVisibleNewLine
(
response
.
content
);
createModal
(
modal_content
,
'
form_notes
'
,
height
,
width
);
}
else
{
window
.
top
.
$
(
'
main_error
'
).
innerHTML
=
response
.
error
;
window
.
top
.
$
j
(
'
main_error
'
).
html
(
response
.
error
)
;
}
},
error
:
function
(
error
)
{
alert
(
error
);
}
});
}
function
validNotesForm
(
path
,
form_id
)
{
new
Ajax
.
Request
(
path
,
{
asynchronous
:
false
,
method
:
'
post
'
,
parameters
:
Form
.
serialize
(
form_id
),
encoding
:
'
UTF-8
'
,
onSuccess
:
function
(
answer
){
eval
(
"
response =
"
+
answer
.
responseText
);
$j
.
ajax
({
url
:
path
,
type
:
'
POST
'
,
data
:
Form
.
serialize
(
form_id
),
success
:
function
(
answer
)
{
eval
(
"
response =
"
+
answer
);
if
(
response
.
status
==
0
){
if
(
typeof
window
.
parent
[
'
angularSignatureBookComponent
'
]
!=
"
undefined
"
)
{
window
.
parent
.
angularSignatureBookComponent
.
componentAfterNotes
();
...
...
@@ -46,28 +43,35 @@ function validNotesForm (path, form_id) {
}
else
{
alert
(
response
.
error
);
}
},
error
:
function
(
error
)
{
alert
(
error
);
}
});
}
function
addTemplateToNote
(
templateNotes
,
path
)
{
new
Ajax
.
Request
(
path
,
{
method
:
'
post
'
,
parameters
:
{
templateId
:
templateNotes
},
onSuccess
:
function
(
answer
)
{
eval
(
"
response =
"
+
answer
.
responseText
);
$j
.
ajax
({
url
:
path
,
type
:
'
POST
'
,
data
:
{
templateId
:
templateNotes
},
success
:
function
(
answer
)
{
eval
(
"
response =
"
+
answer
);
if
(
response
.
status
==
0
)
{
var
strContent
=
response
.
content
;
var
reg
=
new
RegExp
(
/
\\
n/gi
);
var
strContentReplace
=
strContent
.
replace
(
reg
,
'
\n
'
);
$
(
'
notes
'
).
val
ue
=
$
(
'
notes
'
).
val
ue
+
'
'
+
strContentReplace
;
$
j
(
'
#
notes
'
).
val
(
$j
(
'
#
notes
'
).
val
()
+
'
'
+
strContentReplace
)
;
}
else
{
window
.
top
.
$
(
'
main_error
'
).
innerHTML
=
response
.
error
;
window
.
top
.
$
j
(
'
main_error
'
).
html
(
response
.
error
)
;
}
},
error
:
function
(
error
)
{
alert
(
error
);
}
});
}
\ No newline at end of file
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