Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sd-doc
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Skripnikov
sd-doc
Commits
b4055873
You need to sign in or sign up before continuing.
Commit
b4055873
authored
Jan 24, 2018
by
Valentin Skripnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
ea33c879
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
294 additions
and
1 deletion
+294
-1
guide/_static/html/integration/extfp-usecases/uc4/index.css
guide/_static/html/integration/extfp-usecases/uc4/index.css
+85
-0
guide/_static/html/integration/extfp-usecases/uc4/index.html
guide/_static/html/integration/extfp-usecases/uc4/index.html
+48
-0
guide/_static/html/integration/extfp-usecases/uc4/index.js
guide/_static/html/integration/extfp-usecases/uc4/index.js
+146
-0
guide/integration.rst
guide/integration.rst
+1
-0
guide/integration/extfp-usecases/uc2.rst
guide/integration/extfp-usecases/uc2.rst
+1
-1
guide/integration/extfp-usecases/uc4.rst
guide/integration/extfp-usecases/uc4.rst
+13
-0
No files found.
guide/_static/html/integration/extfp-usecases/uc4/index.css
0 → 100644
View file @
b4055873
body
,
div
,
span
,
input
,
button
{
font-family
:
"Droid Sans"
,
arial
,
serif
;
font-size
:
14px
;
box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
}
.hidden
{
display
:
none
;
}
.portal_button
{
background-color
:
#df6c6d
;
border-color
:
#df6c6d
;
color
:
#ffffff
;
padding-left
:
20px
;
padding-right
:
20px
;
height
:
30px
;
border
:
none
;
margin-left
:
10px
;
margin-right
:
10px
;
}
.portal-center
{
text-align
:
center
;
vertical-align
:
top
}
.portal-toolbar
{
padding
:
10px
;
color
:
#6e8ebd
}
#form_player_container
{
/*border: 3px solid #6e8ebd;*/
outline
:
1px
#ffffff
solid
;
margin-left
:
auto
;
margin-right
:
auto
;
width
:
1000px
;
min-height
:
400px
;
background-color
:
#ffffff
;
padding-top
:
20px
;
padding-bottom
:
60px
;
margin-bottom
:
20px
;
}
#form_player_div
{
width
:
1000px
;
min-height
:
200px
;
}
#search_input
{
background-color
:
#6e8ebd
;
border
:
1px
#6e8ebd
solid
;
height
:
30px
;
width
:
200px
;
padding-left
:
10px
}
#send_button
{
margin-left
:
auto
;
margin-right
:
auto
;
width
:
200px
;
margin-bottom
:
20px
;
}
#message
{
background-color
:
#ffffff
;
border
:
3px
solid
#df6c6d
;
outline
:
1px
#932121
solid
;
z-index
:
2
;
position
:
absolute
;
top
:
100px
;
left
:
30%
;
color
:
#303030
;
padding
:
10px
;
max-width
:
40%
;
min-width
:
40%
;
}
#message_text
{
color
:
#303030
;
}
guide/_static/html/integration/extfp-usecases/uc4/index.html
0 → 100644
View file @
b4055873
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<script>
FORM_PLAYER_URL_PREFIX
=
"
http://demoextfp.synergy.tm/Synergy/
"
;
</script>
<!-- LOCALIZATION LIBRARY -->
<script
src=
"http://demoextfp.synergy.tm/Synergy/js/i18next.min.js"
type=
"application/javascript"
></script>
<!-- JS FORMS -->
<link
rel=
"stylesheet"
href=
"http://demoextfp.synergy.tm/Synergy/js/form.player.css"
/>
<script
src=
"http://demoextfp.synergy.tm/Synergy/js/vendor.js"
type=
"text/javascript"
></script>
<script
src=
"http://demoextfp.synergy.tm/Synergy/js/form.player.js"
type=
"text/javascript"
></script>
<!-- PORTAL SCRIPTS AND STYLESHEET -->
<script
src=
"index.js"
type=
"text/javascript"
></script>
<link
href=
"index.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"z-index: 0"
class=
"portal-center"
>
<div
class=
"portal-toolbar"
id=
"portal_toolbar"
>
<span>
Введите номер заявки
</span><input
type=
"text"
id=
"search_input"
/>
<button
id=
"search_button"
class=
"portal_button search_button"
value=
"SEARCH"
onclick=
"portal.searchData()"
>
SEARCH
</button>
<button
id=
"create_button"
class=
"portal_button create_button"
value=
"CREATE"
onclick=
"portal.createPlayer()"
>
CREATE
</button>
</div>
<div
id=
"form_player_container"
>
<div
id=
"form_player_div"
>
</div>
</div>
<button
id=
"send_button"
class=
"portal_button hidden"
value=
"SEND"
onclick=
"portal.saveData()"
>
SEND
</button>
</div>
<div
id=
"message"
class=
"hidden"
>
<span
id=
"message_text"
></span>
</div>
</body>
</html>
guide/_static/html/integration/extfp-usecases/uc4/index.js
0 → 100644
View file @
b4055873
'
use strict
'
;
var
synergyURL
=
"
http://demoextfp.synergy.tm/Synergy/
"
;
var
tokenServiceURL
=
"
http://demoextfp.synergy.tm/TokenService/rest/tokenService/getToken
"
;
AS
.
OPTIONS
.
locale
=
"
ru
"
;
AS
.
OPTIONS
.
coreUrl
=
"
http://demoextfp.synergy.tm/Synergy/
"
;
var
portal
=
{
player
:
null
,
/**
* показать сообщение об ошибке
* @param{string} message
*/
showMessage
:
function
(
message
)
{
jQuery
(
"
#message_text
"
).
html
(
message
);
jQuery
(
"
#message
"
).
show
();
},
/**
* скрыть панель сообщений
*/
hideMessage
:
function
()
{
jQuery
(
"
#message
"
).
hide
();
},
/**
* очистить текущий проигрыватель форм
*/
clearPlayer
:
function
()
{
if
(
portal
.
player
)
{
portal
.
player
.
destroy
();
}
jQuery
(
"
#send_button
"
).
hide
();
portal
.
player
=
null
;
},
/**
* добавить новый проигрыватель форм
*/
createPlayer
:
function
(
dataId
)
{
portal
.
clearPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
AS
.
FORMS
.
bus
.
on
(
AS
.
FORMS
.
EVENT_TYPE
.
formShow
,
function
(
event
,
model
,
view
)
{
model
.
on
(
AS
.
FORMS
.
EVENT_TYPE
.
dataLoad
,
function
()
{
});
if
(
view
.
editable
)
{
jQuery
(
"
#send_button
"
).
show
();
jQuery
(
"
#send_button
"
).
removeAttr
(
'
disabled
'
,
'
disabled
'
);
}
});
portal
.
player
.
view
.
setEditable
(
_
.
isUndefined
(
dataId
));
portal
.
player
.
showFormData
(
"
c0fab75a-f668-4c92-a582-989c4d2bb9e7
"
,
0
,
dataId
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
portal
.
player
.
model
.
on
(
"
valueChange
"
,
function
()
{
portal
.
hideMessage
();
});
},
/**
* искать форму по указанному номеру
*/
searchData
:
function
()
{
var
counterValue
=
jQuery
(
"
#search_input
"
).
val
();
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/asforms/search?formUUID=c0fab75a-f668-4c92-a582-989c4d2bb9e7&search=
"
+
encodeURIComponent
(
counterValue
)
+
"
&field=counter&type=exact
"
,
function
(
data
)
{
if
(
data
===
null
||
!
(
data
instanceof
Array
)
||
data
.
length
===
0
)
{
portal
.
showMessage
(
"
Заявка с указанным номером не найдена
"
);
return
;
}
var
dataId
=
data
[
0
];
portal
.
createPlayer
(
dataId
);
});
},
/**
* сохранить данные, получить их, отобразить номер счетчика для дальнейшего поиска
*/
saveData
:
function
()
{
var
errors
=
portal
.
player
.
model
.
getErrors
();
if
(
errors
.
length
>
0
)
{
portal
.
showMessage
(
"
Введите все обязательные поля
"
);
return
;
}
jQuery
(
"
#send_button
"
).
attr
(
'
disabled
'
,
'
disabled
'
);
var
counterValue
=
portal
.
player
.
model
.
getModelWithId
(
'
counter
'
).
getValue
();
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
"
rest/api/registry/create_doc?registryID=c0c98b79-c217-46f0-88f2-3f2a1e9a3587
"
,
function
(
result
)
{
if
(
result
.
errorCode
!=
0
)
{
portal
.
showMessage
(
"
Во время сохранения данных по форме произошли ошибки. Обратитесь к администратору
"
);
return
;
}
portal
.
player
.
model
.
asfDataId
=
result
.
dataUUID
;
portal
.
player
.
saveFormData
(
function
(
result
)
{
if
(
_
.
isUndefined
(
result
))
{
portal
.
showMessage
(
"
Во время сохранения данных по форме произошли ошибки. Обратитесь к администратору
"
);
return
;
}
AS
.
FORMS
.
ApiUtils
.
simpleAsyncGet
(
'
rest/api/asforms/data/
'
+
result
,
function
(
data
)
{
data
.
data
.
forEach
(
function
(
value
)
{
if
(
value
.
id
===
'
counter
'
)
{
counterValue
=
value
.
value
;
portal
.
showMessage
(
"
Ваша заявка была принята в обработку. Номер заявки -
"
+
counterValue
);
}
});
});
portal
.
clearPlayer
();
});
});
}
};
$
(
document
).
ready
(
function
()
{
jQuery
.
ajax
({
method
:
"
GET
"
,
url
:
tokenServiceURL
+
"
?url=
"
+
synergyURL
,
success
:
function
(
data
)
{
AS
.
OPTIONS
.
login
=
"
$key
"
;
AS
.
OPTIONS
.
password
=
data
;
portal
.
createPlayer
();
}
});
jQuery
(
document
).
mouseup
(
function
(
e
)
{
var
container
=
jQuery
(
"
#message
"
);
if
(
!
container
.
is
(
e
.
target
)
&&
container
.
has
(
e
.
target
).
length
===
0
)
{
container
.
hide
();
}
});
});
guide/integration.rst
View file @
b4055873
...
...
@@ -943,6 +943,7 @@ ARTA Synergy при загрузке внешнего web-модуля буде
integration
/
extfp
-
usecases
/
uc1
integration
/
extfp
-
usecases
/
uc2
integration
/
extfp
-
usecases
/
uc3
integration
/
extfp
-
usecases
/
uc4
Ссылки
на
модули
системы
и
их
внутренние
элементы
-------------------------------------------------
...
...
guide/integration/extfp-usecases/uc2.rst
View file @
b4055873
...
...
@@ -11,4 +11,4 @@
.. raw:: html
<iframe src="../../_static/html/integration/extfp-usecases/uc2/index.html" scrolling='no' height="
93
0px" width="100%" style="border:1px solid grey;"></iframe>
<iframe src="../../_static/html/integration/extfp-usecases/uc2/index.html" scrolling='no' height="
100
0px" width="100%" style="border:1px solid grey;"></iframe>
guide/integration/extfp-usecases/uc4.rst
0 → 100644
View file @
b4055873
Вариант 4. Дополнительная валидация формы
-----------------------------------------
Расширение варианта 1. Дополнительная валидация: значение поля «Итоговая сумма»
должно быть не больше значения поля «Предварительная сумма».
Иначе сразу по мере ввода некорректного значения поле подсвечивается красным
и появляется оранжевая подпись под ним с текстом:
Значение данного поля не должно превышать значения поля "Предварительная сумма"
.. raw:: html
<iframe src="../../_static/html/integration/extfp-usecases/uc4/index.html" scrolling='no' height="930px" width="100%" style="border:1px solid grey;"></iframe>
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