You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
4.1 KiB
131 lines
4.1 KiB
function ShowAlertMessage() {
|
|
notify({
|
|
type: "alert", //alert | success | error | warning | info
|
|
title: "Alert",
|
|
message: "jQuery Notify.js Demo. Super simple Notify plugin.",
|
|
position: {
|
|
x: "right", //right | left | center
|
|
y: "top" //top | bottom | center
|
|
},
|
|
icon: '<img src="images/paper_plane.png" />', //<i>
|
|
size: "normal", //normal | full | small
|
|
overlay: false, //true | false
|
|
closeBtn: true, //true | false
|
|
overflowHide: false, //true | false
|
|
spacing: 20, //number px
|
|
theme: "default", //default | dark-theme
|
|
autoHide: true, //true | false
|
|
delay: 2500, //number ms
|
|
onShow: null, //function
|
|
onClick: null, //function
|
|
onHide: null, //function
|
|
template: '<div class="notify"><div class="notify-text"></div></div>'
|
|
});
|
|
};
|
|
|
|
function ShowAlertMessage(message, type, title, url, positionX, positionY, imageURL, autoHide) {
|
|
if (imageURL == '' || imageURL == undefined) {
|
|
if (type == 'success')
|
|
imageURL = '/images/icons/success.png';
|
|
if (type == 'error')
|
|
imageURL = '/images/icons/error.png';
|
|
if (type == 'info')
|
|
imageURL = '/images/icons/info.png';
|
|
}
|
|
|
|
if (url == '' || url == undefined) {
|
|
onHide = null;
|
|
}
|
|
|
|
if (title == '' || title == undefined) {
|
|
if (type == 'success')
|
|
title = 'Success';
|
|
if (type == 'error')
|
|
title = 'Error';
|
|
if (type == 'info')
|
|
title = 'Information';
|
|
}
|
|
|
|
if (positionX == '' || positionX == undefined)
|
|
positionX = 'right';
|
|
if (positionY == '' || positionY == undefined)
|
|
positionY = 'top';
|
|
|
|
if (autoHide == '' || autoHide == undefined)
|
|
autoHide = true;
|
|
|
|
$.notify({
|
|
type: type, //alert | success | error | warning | info
|
|
title: title,
|
|
autoHide: autoHide,
|
|
delay: 3000,
|
|
theme: "dark-theme",
|
|
position: {
|
|
x: positionX, //right | left | center
|
|
y: positionY //top | bottom | center
|
|
},
|
|
onClick: (url == '' || url == undefined) ? null : RedirectFunction(url),
|
|
icon: '<img src="' + imageURL + '" />',
|
|
message: message
|
|
});
|
|
};
|
|
|
|
function RedirectFunction(url) {
|
|
$(location).attr("href", url);
|
|
}
|
|
|
|
function ShowSuccessMessage(message) {
|
|
notify({
|
|
type: "success", //alert | success | error | warning | info
|
|
title: "Success",
|
|
autoHide: true,
|
|
delay: 5000,
|
|
theme: "dark-theme",
|
|
position: {
|
|
x: "right", //right | left | center
|
|
y: "bottom" //top | bottom | center
|
|
},
|
|
icon: '<img src="/Plugins/jQueryAlert/images/paper_plane.png" />',
|
|
message: message
|
|
});
|
|
};
|
|
|
|
function ShowWarningBox() {
|
|
notify({
|
|
type: "warning", //alert | success | error | warning | info
|
|
title: "Warning",
|
|
theme: "dark-theme",
|
|
position: {
|
|
x: "right", //right | left | center
|
|
y: "top" //top | bottom | center
|
|
},
|
|
icon: '<img src="images/paper_plane.png" />',
|
|
message: "jQuery Notify.js Demo. Super simple Notify plugin."
|
|
});
|
|
};
|
|
function ShowErrorBox() {
|
|
notify({
|
|
type: "error", //alert | success | error | warning | info
|
|
title: "Error",
|
|
theme: "dark-theme",
|
|
position: {
|
|
x: "right", //right | left | center
|
|
y: "top" //top | bottom | center
|
|
},
|
|
icon: '<img src="images/paper_plane.png" />',
|
|
message: "jQuery Notify.js Demo. Super simple Notify plugin."
|
|
});
|
|
};
|
|
function ShowInfoBox() {
|
|
notify({
|
|
type: "info", //alert | success | error | warning | info
|
|
title: "Info",
|
|
theme: "dark-theme",
|
|
position: {
|
|
x: "right", //right | left | center
|
|
y: "top" //top | bottom | center
|
|
},
|
|
icon: '<img src="/Plugins/jQueryAlert/images/paper_plane.png" />',
|
|
message: "jQuery Notify.js Demo. Super simple Notify plugin."
|
|
});
|
|
};
|