Commit 2aaa9b5a authored by Alina Habibulina's avatar Alina Habibulina

+ blue message

parent 03942d7d
...@@ -111,6 +111,26 @@ ...@@ -111,6 +111,26 @@
border-radius: 50%; border-radius: 50%;
background: #49b785; background: #49b785;
position: absolute; position: absolute;
z-index: 10000; z-index: 1000;
}
#rectangle{
width: 300px;
height: 50px;
position: absolute;
top: 30px;
left: 530px;
z-index: 10;
background: #F0FFFF;
border-style: solid solid solid solid;
border-radius: 10px;
border-width: 4px;
border-color: #B0C4DE;
} }
#msg{
font-family: "Сomic Sans MS";
font-size: 16px;
position: relative;
top: 34%;
}
...@@ -30,5 +30,11 @@ ...@@ -30,5 +30,11 @@
</div> </div>
</div> </div>
</div> </div>
<!--MsgRect-->
<div class="MsgRect">
<div id="rectangle">
<div class="msg" id="msg" align="center"></>
</div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
AS.OPTIONS.locale = "ru"; AS.OPTIONS.locale = "ru";
AS.OPTIONS.coreUrl = "http://intern-dev.arta.kz/Synergy/"; AS.OPTIONS.coreUrl = "http://intern-dev.arta.kz/Synergy/";
function CreateAuthForm(){ function CreateAuthForm(){
$(".saveBtn").hide(); $(".saveBtn").hide();
...@@ -59,6 +58,17 @@ function CreateAuthForm(){ ...@@ -59,6 +58,17 @@ function CreateAuthForm(){
authFunc(); authFunc();
}; };
function ShowMessage(message){
if(message.length > 30){
$(".msg").css({'top': '20%'})
} else $(".msg").css({'top': '34%'})
$(".MsgRect").show();
document.getElementById("msg").innerHTML = message;
setTimeout(function(){
$(".MsgRect").hide();
}, 3000);
};
var portal = { var portal = {
player : null, player : null,
...@@ -74,11 +84,11 @@ var portal = { ...@@ -74,11 +84,11 @@ var portal = {
AS.FORMS.ApiUtils.simpleAsyncGet('rest/api/registry/create_doc?registryCode=registry_timesheets', function(result){ AS.FORMS.ApiUtils.simpleAsyncGet('rest/api/registry/create_doc?registryCode=registry_timesheets', function(result){
if(result.errorCode != "0") { if(result.errorCode != "0") {
AS.SERVICES.hideWaitWindow(); AS.SERVICES.hideWaitWindow();
alert("Ошибка во время создания документа.."); ShowMessage("Ошибка во время создания документа..");
return; return;
} else { } else {
AS.SERVICES.hideWaitWindow(); AS.SERVICES.hideWaitWindow();
alert("Документ успешно создан!"); ShowMessage("Документ успешно создан!");
portal.player.view.setEditable(true); portal.player.view.setEditable(true);
portal.player.showFormData(result.documentID, 0, result.dataUUID); portal.player.showFormData(result.documentID, 0, result.dataUUID);
portal.player.view.appendTo($('#form_player_div')); portal.player.view.appendTo($('#form_player_div'));
...@@ -89,7 +99,7 @@ var portal = { ...@@ -89,7 +99,7 @@ var portal = {
var errors = portal.player.model.getErrors(); var errors = portal.player.model.getErrors();
if(errors.length > 0) { if(errors.length > 0) {
AS.SERVICES.hideWaitWindow(); AS.SERVICES.hideWaitWindow();
alert("Введите все обязательные поля"); ShowMessage("Введите все обязательные поля");
return; return;
} }
...@@ -97,10 +107,10 @@ var portal = { ...@@ -97,10 +107,10 @@ var portal = {
portal.player.saveFormData(function(data){ portal.player.saveFormData(function(data){
if(_.isUndefined(data)){ if(_.isUndefined(data)){
AS.SERVICES.hideWaitWindow(); AS.SERVICES.hideWaitWindow();
alert("Во время сохранения данных возникла ошибка"); ShowMessage("Во время сохранения данных возникла ошибка");
} else { } else {
AS.SERVICES.hideWaitWindow(); AS.SERVICES.hideWaitWindow();
alert("Данные сохранены"); ShowMessage("Данные сохранены");
} }
}); });
} }
...@@ -179,6 +189,7 @@ $(document).ready(function(){ ...@@ -179,6 +189,7 @@ $(document).ready(function(){
$(".error").hide(); $(".error").hide();
$(".saveBtn").hide(); $(".saveBtn").hide();
$(".container").hide(); $(".container").hide();
$(".MsgRect").hide();
$(".saveBtn").on("click", function(event){ $(".saveBtn").on("click", function(event){
AS.SERVICES.showWaitWindow(); AS.SERVICES.showWaitWindow();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment