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
0e051f88
Commit
0e051f88
authored
Nov 03, 2017
by
Valentin Skripnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
5e771ef8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
206 additions
and
3 deletions
+206
-3
docs/_static/html/forms/widgets/waitwindow.html
docs/_static/html/forms/widgets/waitwindow.html
+171
-0
docs/forms/widgets-examples/waitwindow.rst
docs/forms/widgets-examples/waitwindow.rst
+28
-0
docs/forms/widgets.rst
docs/forms/widgets.rst
+7
-3
No files found.
docs/_static/html/forms/widgets/waitwindow.html
0 → 100644
View file @
0e051f88
<!DOCTYPE html>
<html>
<head
lang=
"en"
>
<meta
charset=
"UTF-8"
>
<title>
WaitWindow Widget
</title>
<script>
FORM_PLAYER_URL_PREFIX
=
"
http://192.168.3.16:8080/Synergy/
"
;
<!--
служебная
переменная
для
корректной
работы
компонента
"
HTD-редактор
"
-->
</script>
<link
rel=
"stylesheet"
href=
"http://192.168.3.16:8080/Synergy/js/form.player.css"
/>
<!--стандартный стиль компонентов формы-->
<script
src=
"http://192.168.3.16:8080/Synergy/js/vendor.js"
type=
"text/javascript"
></script>
<!--ссылка на сторонние библиотеки-->
<script
src=
"http://192.168.3.16:8080/Synergy/js/form.player.js"
type=
"text/javascript"
></script>
<!--ссылка на проигрыватель форм-->
<style>
#app-wait-div
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.05
);
display
:
none
;
z-index
:
1000
;
}
.loader
,
.loader
:before
,
.loader
:after
{
border-radius
:
50%
;
width
:
2em
;
height
:
2em
;
-webkit-animation-fill-mode
:
both
;
animation-fill-mode
:
both
;
-webkit-animation
:
load7
1.8s
infinite
ease-in-out
;
animation
:
load7
1.8s
infinite
ease-in-out
;
}
.loader
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
margin-top
:
-3em
;
margin-left
:
-1em
;
color
:
darkorange
;
font-size
:
10px
;
text-indent
:
-9999em
;
-webkit-transform
:
translateZ
(
0
);
-ms-transform
:
translateZ
(
0
);
transform
:
translateZ
(
0
);
-webkit-animation-delay
:
-0.16s
;
animation-delay
:
-0.16s
;
}
.loader
:before
,
.loader
:after
{
content
:
''
;
position
:
absolute
;
top
:
0
;
}
.loader
:before
{
left
:
-3.5em
;
-webkit-animation-delay
:
-0.32s
;
animation-delay
:
-0.32s
;
}
.loader
:after
{
left
:
3.5em
;
}
@-webkit-keyframes
load7
{
0
%,
80
%,
100
%
{
box-shadow
:
0
2em
0
-1em
;
}
40
%
{
box-shadow
:
0
2em
0
0
;
}
}
@keyframes
load7
{
0
%,
80
%,
100
%
{
box-shadow
:
0
2em
0
-1em
;
}
40
%
{
box-shadow
:
0
2em
0
0
;
}
}
</style>
</head>
<body>
<div
id=
"form_player_container"
>
<div
id=
"form_player_div"
></div>
</div>
<div
id=
"app-wait-div"
>
<div
class=
"loader"
>
Загрузка...
</div>
</div>
<script>
'
use strict
'
;
AS
.
OPTIONS
.
locale
=
"
ru
"
;
AS
.
OPTIONS
.
coreUrl
=
"
http://192.168.3.16:8080/Synergy/
"
;
AS
.
SERVICES
.
showWaitWindow
=
function
()
{
$
(
"
#app-wait-div
"
).
show
();
};
AS
.
SERVICES
.
hideWaitWindow
=
function
()
{
$
(
"
#app-wait-div
"
).
hide
();
};
var
portal
=
{
player
:
null
,
/**
* очистить текущий проигрыватель форм
*/
clearPlayer
:
function
()
{
if
(
portal
.
player
)
{
portal
.
player
.
destroy
();
}
},
/**
* добавить новый проигрыватель форм
*/
createPlayer
:
function
(
formCode
)
{
portal
.
clearPlayer
();
portal
.
player
=
AS
.
FORMS
.
createPlayer
();
portal
.
player
.
showFormByCode
(
formCode
);
portal
.
player
.
view
.
setEditable
(
true
);
portal
.
player
.
view
.
appendTo
(
$
(
'
#form_player_div
'
));
AS
.
FORMS
.
bus
.
on
(
AS
.
FORMS
.
EVENT_TYPE
.
formShow
,
function
(
event
,
model
,
view
)
{
if
(
model
.
formCode
===
formCode
)
{
model
.
on
(
AS
.
FORMS
.
EVENT_TYPE
.
dataLoad
,
function
()
{
portal
.
main
(
portal
.
player
.
view
.
getViewWithId
(
"
textbox-cmp
"
),
portal
.
player
.
model
.
getModelWithId
(
"
textbox-cmp
"
));
});
}
});
},
main
:
function
(
view
,
model
)
{
setTimeout
(
function
run
()
{
AS
.
SERVICES
.
showWaitWindow
();
setTimeout
(
AS
.
SERVICES
.
hideWaitWindow
,
3000
);
setTimeout
(
run
,
6000
);
},
100
);
}
};
$
(
document
).
ready
(
function
()
{
AS
.
OPTIONS
.
login
=
"
admin
"
;
AS
.
OPTIONS
.
password
=
"
nimda
"
;
portal
.
createPlayer
(
"
sd-doc-widget-examples
"
);
});
</script>
</body>
</html>
docs/forms/widgets-examples/waitwindow.rst
0 → 100644
View file @
0e051f88
.. _widgets-examples-waitwindow:
Пример использования AS.SERVICES.showWaitWindow/hideWaitWindow
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. raw:: html
<iframe src="../../_static/html/forms/widgets/waitwindow.html" scrolling='no' frameBorder="0" height="200px" width="100%"></iframe>
Исходный код функции
.. code-block:: js
AS.SERVICES.showWaitWindow = function () {
$("#app-wait-div").show();
};
AS.SERVICES.hideWaitWindow = function () {
$("#app-wait-div").hide();
};
Полный исходный код
.. literalinclude:: ../../_static/html/forms/widgets/waitwindow.html
:language: html
:emphasize-lines: 115-121
:encoding: utf-8
docs/forms/widgets.rst
View file @
0e051f88
...
...
@@ -39,7 +39,7 @@
.. js:function:: AS.SERVICES.showWaitWindow()
Показать окно ожидания
. Блокирует доступ к элементам интерфейса.
Показать окно ожидания
.. warning:: Если приложение запущено внутри Synergy (например ВМК), то будет
показано стандартное окно ожидания |окно-ожидания|
...
...
@@ -48,8 +48,12 @@
В противном случае метод необходимо реализовать самостоятельно!
:ref:`widgets-examples-waitwindow`
.. js:function:: AS.SERVICES.hideWaitWindow()
Скрыть окно ожидания.
Скрыть окно ожидания
:ref:`widgets-examples-waitwindow`
.. js:function::
unAuthorized
.. js:function::
AS.SERVICES.unAuthorized()
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