git-svn-id: https://svn.coded.pt/svn/SIPRP@1862 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
João Maurício 12 years ago
parent 6c37b48035
commit 95f7536cec

@ -391,7 +391,7 @@
$('body').modalmanager('removeLoading');
//this on restores the body scrollbar
$('body').removeClass('modal-open');
//$('body').removeClass('modal-open');
});
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
@ -407,20 +407,18 @@
$rootScope.$on('response', function(event, args){
//var response = args.response.response.ServerResponse;
var response = args.response;
//if(response != undefined && response != null && response.length > 0)
//{
// $scope.ServerResponse = response;
// $scope.FirstMessage = response[0];
if(response != undefined && response != null && response.messages.length > 0)
{
$scope.ServerResponse = response;
// $scope.FirstMessage.MessageType = globals.utils.getMessageTypeCSS($scope.FirstMessage.MessageType);
$scope.FirstMessage = response.messages[0];
// $scope.MessageCount = response.length;
$scope.FirstMessage.type = globals.utils.getMessageTypeCSS($scope.FirstMessage.type);
// //TODO: etc...
//}
$scope.MessageCount = response.messages.length;
}
if($scope.notification != null)
{
@ -429,10 +427,10 @@
$scope.notification = noty({
layout: 'topRight',
text: 'your message goes here',
text: $scope.FirstMessage.messageData,
maxVisible: 1,
template:
'<div ng-click="viewServerResponse()" class="bg-' + 'success' + ' noty_message">' +
'<div ng-click="viewServerResponse()" class="bg-' + $scope.FirstMessage.type + ' noty_message">' +
'<span ng-show="MessageCount > 1" class="label label-default pull-left noty-label">+{{MessageCount-1}}</span>' +
'<span class="noty_text"></span>' +
'<div class="noty_close"></div>' +
@ -450,6 +448,20 @@
$compile($scope.notification.$bar[0])($scope);
});
$scope.viewServerResponse = function(){
if($scope.notification != null)
{
$scope.notification.close();
}
//TODO: show all messages modal window ?
//$scope.windowViewServerResponse.show();
//$scope.windowViewServerResponse.viewController.list($scope.ServerResponse);
};
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//fires whenever a new module is rendered, if broadcastCreation is true on method renderModule

@ -46,7 +46,7 @@
$scope.$parent.loadModule({Controller: 'Form1'}, function(className, scope, isNewModule){
scope.edit(null);
scope.edit(selected);
});
};

@ -24,7 +24,7 @@ $(function(){
// ---> views-all.html
// ---> GetViewsHtml.aspx
$.get('views-all.html', function( data ) {
$.get('GetViewsHtml.aspx', function( data ) {
var body = $('body');
var viewCache = $('<div id="view-cache"></div>');

@ -89,22 +89,22 @@
this.upsert = function(selected, editing){
var modelInstance = educando.models[me.model],
var modelInstance = evoapp.models[me.model],
callbackFn = arguments[2], //angular.isFunction(arguments[1]) ? arguments[1] : null;
isNewRecord = false;
//var hashKey = selected['$$hashKey'] != undefined ? selected['$$hashKey'] : null;
var isArray = angular.isArray(editing);
//var isArray = angular.isArray(editing);
if(isArray)
{
editing = modelService.collectionToModel(me.model, editing, 'upsert');
}
else
{
editing = modelService.toModel(me.model, editing, 'upsert');
}
//if(isArray)
//{
// editing = modelService.collectionToModel(me.model, editing, 'upsert');
//}
//else
//{
// editing = modelService.toModel(me.model, editing, 'upsert');
//}
$http({
method: 'POST',
@ -141,13 +141,26 @@
}).
error(function(response, status, headers, config) {
var res = {
success: false,
data: null,
messages: [
{
type: 'ERROR',
messageData: 'Ocorreu um erro de sistema.'
}
]
};
$rootScope.$broadcast('response', {response: res});
callback(callbackFn, [response, selected, editing, isNewRecord]);
});
};
this.destroy = function(editing){
var modelInstance = educando.models[me.model],
var modelInstance = evoapp.models[me.model],
callbackFn = arguments[1];
//isArray = angular.isArray(editing);

@ -9,7 +9,33 @@
return fn.apply(this, fnArgs);
};
var getMessageTypeCSS = function(messageType){
switch(messageType)
{
case 'ERROR':
case 'SECURITYEXCEPTION':
messageType = 'danger';
break;
case 'INFO':
messageType = 'success';
break;
case 'QUESTION':
messageType = 'success';
break;
case 'WARNING':
messageType = 'warning';
break;
}
return messageType;
};
return {
passArguments: passArguments
passArguments: passArguments,
getMessageTypeCSS: getMessageTypeCSS
};
});

@ -208,18 +208,6 @@ code {
margin-top: 25px;
}
/* https://github.com/twbs/bootstrap/issues/10063 */
/* Bootstrap: `.modal-open` class offsetting body unnecessarily by 15px */
/*body.modal-open,
.modal-open .navbar-fixed-top,
.modal-open .navbar-fixed-bottom {
margin-right: 0px!important;
}*/
/*.modal-open {
overflow: scroll!important;
}*/
/* Scroll to Top */
a.scroll-to-top {
-moz-border-radius: 7px 7px 0 0;
@ -265,5 +253,9 @@ ul .datatable-selected-row, ul .datatable-selected-row li
background-color:#ebeef5!important;
}
/* http://stackoverflow.com/questions/19288546/how-can-i-prevent-body-scrollbar-and-shifting-when-twitter-bootstrap-modal-dialo */
body.modal-open {
overflow: auto;
}

@ -9,7 +9,10 @@
<link href="css/theme.css" rel="stylesheet" />
<link href="js/jquery-ui-datetimepicker/jquery-ui-timepicker-addon.css" rel="stylesheet" />
<link href="js/jquery-ui-bootstrap-theme/css/custom-theme/jquery-ui-1.10.0.custom.css" rel="stylesheet" />
<link href="js/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet" />
<link href="js/bootstrap-modal/css/bootstrap-modal-bs3patch.css" rel="stylesheet" />
<link href="js/select2/select2.css" rel="stylesheet" />
<link href="js/select2/select2-bootstrap.css" rel="stylesheet" />

@ -11,25 +11,25 @@
body.modal-open,
.modal-open .navbar-fixed-top,
.modal-open .navbar-fixed-bottom {
margin-right: 0;
margin-right: 0;
}
.modal {
left: 50%;
bottom: auto;
right: auto;
padding: 0;
width: 500px;
margin-left: -250px;
background-color: #ffffff;
border: 1px solid #999999;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
background-clip: padding-box;
left: 50%;
bottom: auto;
right: auto;
padding: 0;
width: 500px;
margin-left: -250px;
background-color: #ffffff;
border: 1px solid #999999;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
background-clip: padding-box;
}
.modal.container {
max-width: none;
max-width: none;
}

@ -53,7 +53,7 @@
position: 'relative'
});
this.$closeButton.html('<a href="#" class="m-r-n-sm m-t-n-sm"><i class="icon-close icon-remove "></i></a>');
this.$closeButton.html('<span class="m-r-n-sm m-t-n-sm"><i class="glyphicon glyphicon-remove"></i></span>');
this.$closeButton.css({
position: 'absolute',

Loading…
Cancel
Save