. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 52.223.31.75 / Your IP : 172.31.6.220 [ Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE Domains : 4 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/ripara.co/admin/js/ |
Upload File : |
materialAdmin
// =========================================================================
// API Rest D2P
// =========================================================================
/* OLD VERSION
.factory('APIService', ['$http',function($http) {
var promise;
var myService = {
async: function(url) {
//
// if ( !promise ) {
// $http returns a promise, which has a then function, which also returns a promise
promise = $http.get('./API/?'+url).then(function (response) {
// The then function here is an opportunity to modify the response
return response.data;
});
// }
// Return the promise to the controller
return promise;
}
};
return myService;
}])
*/
/*
var fd = new FormData();
fd.append('file', file);
$http.post(uploadUrl, fd, {
transformRequest: angular.identity,
headers: {'Content-Type': undefined}
})
.success(function(){
})
.error(function(){
});
*/
.factory('APIService', ['$http',function($http) {
var promise;
var myService = {
async: function(parametri) {
//
if(parametri.upload || parametri.uploadimg){
var fd = new FormData();
for(x in parametri){
//setto il valore per il form
fd.append(x, parametri[x]);
}
var confData = {
transformRequest: angular.identity,
headers : {'Content-Type': undefined},
}
promise = $http.post('./API/index.php', fd, confData).then(function successCallback(response) {
return response.data;
}, function errorCallback(response) {
return response.data;
});
return promise;
}else{
var param = [];
for(x in parametri){
//setto il valore per il json
param[param.length] = { name:x, value:parametri[x] }
}
var sendData = {
url: './API/index.php',
method: 'POST',
headers : {'Content-Type': 'application/json;charset=utf-8'},
data: param
}
// $http returns a promise, which has a then function, which also returns a promise
promise = $http(sendData).then(function successCallback(response) {
return response.data;
}, function errorCallback(response) {
return response.data;
});
return promise;
}
}
};
return myService;
}])
.service('animationService', function($timeout){
//Animation List
this.attentionSeekers = [
{ animation: 'bounce', target: 'attentionSeeker' },
{ animation: 'flash', target: 'attentionSeeker' },
{ animation: 'pulse', target: 'attentionSeeker' },
{ animation: 'rubberBand', target: 'attentionSeeker' },
{ animation: 'shake', target: 'attentionSeeker' },
{ animation: 'swing', target: 'attentionSeeker' },
{ animation: 'tada', target: 'attentionSeeker' },
{ animation: 'wobble', target: 'attentionSeeker' }
]
this.flippers = [
{ animation: 'flip', target: 'flippers' },
{ animation: 'flipInX', target: 'flippers' },
{ animation: 'flipInY', target: 'flippers' },
{ animation: 'flipOutX', target: 'flippers' },
{ animation: 'flipOutY', target: 'flippers' }
]
this.lightSpeed = [
{ animation: 'lightSpeedIn', target: 'lightSpeed' },
{ animation: 'lightSpeedOut', target: 'lightSpeed' }
]
this.special = [
{ animation: 'hinge', target: 'special' },
{ animation: 'rollIn', target: 'special' },
{ animation: 'rollOut', target: 'special' }
]
this.bouncingEntrance = [
{ animation: 'bounceIn', target: 'bouncingEntrance' },
{ animation: 'bounceInDown', target: 'bouncingEntrance' },
{ animation: 'bounceInLeft', target: 'bouncingEntrance' },
{ animation: 'bounceInRight', target: 'bouncingEntrance' },
{ animation: 'bounceInUp', target: 'bouncingEntrance' }
]
this.bouncingExits = [
{ animation: 'bounceOut', target: 'bouncingExits' },
{ animation: 'bounceOutDown', target: 'bouncingExits' },
{ animation: 'bounceOutLeft', target: 'bouncingExits' },
{ animation: 'bounceOutRight', target: 'bouncingExits' },
{ animation: 'bounceOutUp', target: 'bouncingExits' }
]
this.rotatingEntrances = [
{ animation: 'rotateIn', target: 'rotatingEntrances' },
{ animation: 'rotateInDownLeft', target: 'rotatingEntrances' },
{ animation: 'rotateInDownRight', target: 'rotatingEntrances' },
{ animation: 'rotateInUpLeft', target: 'rotatingEntrances' },
{ animation: 'rotateInUpRight', target: 'rotatingEntrances' }
]
this.rotatingExits = [
{ animation: 'rotateOut', target: 'rotatingExits' },
{ animation: 'rotateOutDownLeft', target: 'rotatingExits' },
{ animation: 'rotateOutDownRight', target: 'rotatingExits' },
{ animation: 'rotateOutUpLeft', target: 'rotatingExits' },
{ animation: 'rotateOutUpRight', target: 'rotatingExits' }
]
this.fadeingEntrances = [
{ animation: 'fadeIn', target: 'fadeingEntrances' },
{ animation: 'fadeInDown', target: 'fadeingEntrances' },
{ animation: 'fadeInDownBig', target: 'fadeingEntrances' },
{ animation: 'fadeInLeft', target: 'fadeingEntrances' },
{ animation: 'fadeInLeftBig', target: 'fadeingEntrances' },
{ animation: 'fadeInRight', target: 'fadeingEntrances' },
{ animation: 'fadeInRightBig', target: 'fadeingEntrances' },
{ animation: 'fadeInUp', target: 'fadeingEntrances' },
{ animation: 'fadeInBig', target: 'fadeingEntrances' }
]
this.fadeingExits = [
{ animation: 'fadeOut', target: 'fadeingExits' },
{ animation: 'fadeOutDown', target: 'fadeingExits' },
{ animation: 'fadeOutDownBig', target: 'fadeingExits' },
{ animation: 'fadeOutLeft', target: 'fadeingExits' },
{ animation: 'fadeOutLeftBig', target: 'fadeingExits' },
{ animation: 'fadeOutRight', target: 'fadeingExits' },
{ animation: 'fadeOutRightBig', target: 'fadeingExits' },
{ animation: 'fadeOutUp', target: 'fadeingExits' },
{ animation: 'fadeOutUpBig', target: 'fadeingExits' }
]
this.zoomEntrances = [
{ animation: 'zoomIn', target: 'zoomEntrances' },
{ animation: 'zoomInDown', target: 'zoomEntrances' },
{ animation: 'zoomInLeft', target: 'zoomEntrances' },
{ animation: 'zoomInRight', target: 'zoomEntrances' },
{ animation: 'zoomInUp', target: 'zoomEntrances' }
]
this.zoomExits = [
{ animation: 'zoomOut', target: 'zoomExits' },
{ animation: 'zoomOutDown', target: 'zoomExits' },
{ animation: 'zoomOutLeft', target: 'zoomExits' },
{ animation: 'zoomOutRight', target: 'zoomExits' },
{ animation: 'zoomOutUp', target: 'zoomExits' }
]
//Animate
this.ca = '';
this.setAnimationJam = function(animation, target, hidden, testo) {
if (animation === "hinge") {
animationDuration = 2100;
}
else {
animationDuration = 1200;
}
if(testo){
angular.element('#'+target).text(testo);
}else{
angular.element('#'+target).text('Ops! C\'è qualcosa che non và');
}
if(!hidden){
angular.element('#'+target).removeClass("hidden");
}
angular.element('#'+target).addClass(animation);
$timeout(function(){
angular.element('#'+target).removeClass(animation);
//
if(hidden){
angular.element('#'+target).addClass("hidden");
}
}, animationDuration,
function(){
});
}
})