init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
776
KretaWeb/Scripts/KendoHelper/KretaWindowHelper.js
Normal file
776
KretaWeb/Scripts/KendoHelper/KretaWindowHelper.js
Normal file
|
@ -0,0 +1,776 @@
|
|||
var KretaWindowHelper = (function () {
|
||||
var kretaWindowHelper = function () {};
|
||||
|
||||
var MIN_HEIGHT = 125;
|
||||
var MIN_WIDTH = 320;
|
||||
|
||||
kretaWindowHelper.getWindowConfigContainer = function () {
|
||||
return {
|
||||
actions: null,
|
||||
content: null,
|
||||
resizable: false,
|
||||
closeFunction: null,
|
||||
width: '90%',
|
||||
height: '90%',
|
||||
maxWidth: null,
|
||||
maxHeight: null,
|
||||
minWidth: MIN_WIDTH + 'px',
|
||||
minHeight: MIN_HEIGHT + 'px',
|
||||
title: ''
|
||||
};
|
||||
};
|
||||
|
||||
kretaWindowHelper.createWindow = function (id, config) {
|
||||
var element = getOrCreateWindowElement(id);
|
||||
var position = getPosition();
|
||||
var modal = element.data('kendoWindow');
|
||||
|
||||
if (!modal) {
|
||||
modal = createModal(element, position, config);
|
||||
} else {
|
||||
modal.setOptions({ position: position });
|
||||
}
|
||||
return modal;
|
||||
};
|
||||
|
||||
kretaWindowHelper.confirmWindow = function (
|
||||
title,
|
||||
content,
|
||||
jsFunction,
|
||||
jsFunctionParameter,
|
||||
jsFunctionClose,
|
||||
okString,
|
||||
closeString,
|
||||
isNestedConfirm,
|
||||
showCloseButton,
|
||||
isNote,
|
||||
isNoteRequired,
|
||||
noteCaption,
|
||||
width,
|
||||
height
|
||||
) {
|
||||
var wind = $('#KretaGeneratedConfrimWindowNest').data('kendoWindow');
|
||||
if (wind != undefined) {
|
||||
wind.destroy();
|
||||
}
|
||||
var confirmWindowId = 'KretaGeneratedConfrimWindow';
|
||||
if (isNestedConfirm) {
|
||||
confirmWindowId += 'Nest';
|
||||
}
|
||||
if ($('#' + confirmWindowId).length > 0) {
|
||||
return false;
|
||||
}
|
||||
var actions = [];
|
||||
if (showCloseButton) {
|
||||
actions = ['Close'];
|
||||
}
|
||||
var kendoWindow = $('<div id ="' + confirmWindowId + '" />').kendoWindow({
|
||||
title: title,
|
||||
actions: actions,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(height)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: height
|
||||
});
|
||||
}
|
||||
if (!CommonUtils.isNullOrUndefined(width)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
width: width
|
||||
});
|
||||
}
|
||||
|
||||
var okBtnMsg = Globalization.Igen,
|
||||
closeBtnMsg = Globalization.Nem;
|
||||
if (typeof okString !== 'undefined') {
|
||||
okBtnMsg = okString;
|
||||
}
|
||||
if (typeof closeString !== 'undefined') {
|
||||
closeBtnMsg = closeString;
|
||||
}
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer" id="' +
|
||||
confirmWindowId +
|
||||
'"><div class="modalOuter"><div class="modalContent"><div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;"><span><i class="fa fa-info confirmWindowIcon"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>';
|
||||
|
||||
if (isNote) {
|
||||
data += "<div class='modalConfirmNote'>";
|
||||
data +=
|
||||
"<div class='noteCaption'>" +
|
||||
noteCaption +
|
||||
"</div><input class='k-textbox' type='text' id='modalNote' /> <div class='noteValidation'>" +
|
||||
Globalization.KotelezoMegadni +
|
||||
'</div>';
|
||||
data += '</div>';
|
||||
}
|
||||
|
||||
data +=
|
||||
'<div class="modalFooter modalFooterStatic"><div style="float:right; padding-left: 5px;">';
|
||||
data +=
|
||||
'<div class="k-button k-button-icontext closeYesConfirm" style="padding: 10px 14px;"><span></span>' +
|
||||
okBtnMsg +
|
||||
'</div>';
|
||||
data +=
|
||||
' <div class="k-button k-button-icontext closeNoConfirm" style="padding: 10px 14px;"><span></span>' +
|
||||
closeBtnMsg +
|
||||
'</div>';
|
||||
data += '</div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeNoConfirm')
|
||||
.click(function () {
|
||||
if (CommonUtils.isFunction(jsFunctionClose)) {
|
||||
jsFunctionClose();
|
||||
}
|
||||
var wind = kendoWindow.data('kendoWindow');
|
||||
if (wind != undefined) {
|
||||
wind.destroy();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeYesConfirm')
|
||||
.click(function () {
|
||||
if (isNote) {
|
||||
var note = $('#modalNote').val();
|
||||
if (isNoteRequired && CommonUtils.isNullOrWhiteSpace(note)) {
|
||||
$('#modalNote').addClass('required');
|
||||
$('div.noteValidation').addClass('noteRequired');
|
||||
return;
|
||||
}
|
||||
|
||||
if (CommonUtils.parseBool(isNestedConfirm)) {
|
||||
jsFunction(jsFunctionParameter, note);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
jsFunction(jsFunctionParameter, note);
|
||||
}, 1);
|
||||
}
|
||||
} else if (CommonUtils.isFunction(jsFunction)) {
|
||||
if (CommonUtils.parseBool(isNestedConfirm)) {
|
||||
jsFunction(jsFunctionParameter);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
jsFunction(jsFunctionParameter);
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
var wind = kendoWindow.data('kendoWindow');
|
||||
if (wind != undefined) {
|
||||
wind.destroy();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.errorHandlerWindow = function (
|
||||
title,
|
||||
content,
|
||||
closejsFunction,
|
||||
reportErrorJsFunction,
|
||||
name
|
||||
) {
|
||||
var element;
|
||||
if (!CommonUtils.isUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer"><div class="modalOuter"><div class="modalContent"><div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;"><span><i class="fa fa-exclamation feedBackWindowIconError"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>' +
|
||||
'<div class="modalFooter modalFooterStatic">' +
|
||||
'<div style="float:left; padding-right: 5px;"><a class="k-button k-button-icontext reportError" href="javascript:void(null)">' +
|
||||
Globalization.Hibabejelentese +
|
||||
'</a></div>' +
|
||||
'<div style="float:right; padding-left: 5px;"><a class="k-button k-button-icontext closeFeedback" href="javascript:void(null)">' +
|
||||
Globalization.Vissza +
|
||||
'</a></div>' +
|
||||
'</div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.reportError')
|
||||
.click(function () {
|
||||
if (CommonUtils.isFunction(reportErrorJsFunction)) {
|
||||
reportErrorJsFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(closejsFunction)) {
|
||||
closejsFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.feedbackWindow = function (
|
||||
title,
|
||||
content,
|
||||
isError,
|
||||
jsFunction,
|
||||
backButtonText,
|
||||
name,
|
||||
newHeight,
|
||||
closeButtonId
|
||||
) {
|
||||
var element;
|
||||
if (!CommonUtils.isNullOrUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(newHeight)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: newHeight
|
||||
});
|
||||
}
|
||||
|
||||
var closeId = CommonUtils.isNullOrUndefined(closeButtonId)
|
||||
? ''
|
||||
: ' id ="' + closeButtonId + '"';
|
||||
var backText = CommonUtils.isNullOrUndefined(backButtonText)
|
||||
? Globalization.Vissza
|
||||
: backButtonText;
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer">' +
|
||||
'<div class="modalOuter">' +
|
||||
'<div class="modalContent">' +
|
||||
'<div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;">' +
|
||||
'<span><i class="fa ' +
|
||||
(isError == true
|
||||
? 'fa-exclamation feedBackWindowIconError'
|
||||
: 'fa-check feedBackWindowIconSuccess') +
|
||||
'"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>' +
|
||||
'<div class="modalFooter modalFooterStatic">' +
|
||||
'<div style="float:right; padding-left: 5px;"><a class="k-button k-button-icontext closeFeedback" href="javascript:void(null)"' +
|
||||
closeId +
|
||||
'>' +
|
||||
backText +
|
||||
'</a></div></div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(jsFunction)) {
|
||||
jsFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.feedbackWindowWithLink = function (
|
||||
title,
|
||||
content,
|
||||
linkText,
|
||||
linkUrl,
|
||||
isError,
|
||||
jsFunction,
|
||||
backButtonText,
|
||||
name,
|
||||
newHeight
|
||||
) {
|
||||
var element;
|
||||
if (!CommonUtils.isUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(newHeight)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: newHeight
|
||||
});
|
||||
}
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer"><div class="modalOuter"><div class="modalContent"><div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;"><span><i class="fa ' +
|
||||
(isError == true
|
||||
? 'fa-exclamation feedBackWindowIconError'
|
||||
: 'fa-check feedBackWindowIconSuccess') +
|
||||
'"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>';
|
||||
data +=
|
||||
'<div class="modalFooter modalFooterStatic" style="height: 64px;"><div style="float:right; padding-left: 5px;">';
|
||||
data +=
|
||||
'<div class="BtnCancel" style="float: right; padding-right: 5px;"><a class="k-button k-button-icontext closeFeedback" href="javascript:void(null)">' +
|
||||
(CommonUtils.isUndefined(backButtonText)
|
||||
? Globalization.Vissza
|
||||
: backButtonText) +
|
||||
'</a></div>';
|
||||
data +=
|
||||
'<div class="BtnOk" style="float: right;"><a class="k-button k-button-icontext" href="' +
|
||||
linkUrl +
|
||||
'">' +
|
||||
(CommonUtils.isUndefined(linkText)
|
||||
? Globalization.TovabbiInfo
|
||||
: linkText) +
|
||||
'</a></div>';
|
||||
data += '</div></div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(jsFunction)) {
|
||||
jsFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.warningWindow = function (
|
||||
title,
|
||||
content,
|
||||
jsFunction,
|
||||
name,
|
||||
newHeight,
|
||||
customButtonText = null
|
||||
) {
|
||||
var element;
|
||||
if (!CommonUtils.isUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var buttonText = '';
|
||||
if (CommonUtils.isNullOrUndefined(customButtonText)) {
|
||||
buttonText = Globalization.Vissza;
|
||||
} else {
|
||||
buttonText = customButtonText;
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(newHeight)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: newHeight
|
||||
});
|
||||
}
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer"><div class="modalOuter"><div class="modalContent"><div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;"><span><i class="fa fa-exclamation-triangle warningWindowIcon"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>';
|
||||
data +=
|
||||
'<div class="modalFooter modalFooterStatic"><div style="float:right; padding-left: 5px;"><a class="k-button k-button-icontext closeWarning" href="javascript:void(null)">' +
|
||||
buttonText +
|
||||
'</a></div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeWarning')
|
||||
.click(function () {
|
||||
if (CommonUtils.isFunction(jsFunction)) {
|
||||
jsFunction();
|
||||
}
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.defaultWindow = function (title, content, name, newHeight) {
|
||||
var element;
|
||||
if (!CommonUtils.isUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(newHeight)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: newHeight
|
||||
});
|
||||
}
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer"><div class="modalOuter"><div class="modalContent"><div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;"><span> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>';
|
||||
data +=
|
||||
'<div class="modalFooter modalFooterStatic"><div style="float:right; padding-left: 5px;"><a class="k-button k-button-icontext closeFeedback" href="javascript:void(null)">' +
|
||||
Globalization.Vissza +
|
||||
'</a></div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.closeFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
kretaWindowHelper.destroyAllWindow = function () {
|
||||
$('.k-window-content').each(function () {
|
||||
$(this).data('kendoWindow').destroy();
|
||||
});
|
||||
};
|
||||
|
||||
kretaWindowHelper.getKendoWindowData = function (id) {
|
||||
var modal = $('#' + id).data('kendoWindow');
|
||||
return modal;
|
||||
};
|
||||
|
||||
kretaWindowHelper.setWindowHeight = function (id, height) {
|
||||
var kendoWindowData = kretaWindowHelper.getKendoWindowData(id);
|
||||
kendoWindowData.setOptions({
|
||||
height: height
|
||||
});
|
||||
};
|
||||
|
||||
kretaWindowHelper.openWindow = function (modal, center) {
|
||||
openWindow(modal, center);
|
||||
};
|
||||
|
||||
kretaWindowHelper.destroyWindow = function (id) {
|
||||
destroyWindow(id);
|
||||
};
|
||||
|
||||
kretaWindowHelper.successFeedBackWindow = function (
|
||||
jsFunction,
|
||||
customMessageText
|
||||
) {
|
||||
if (!GlobalSystemParams.SuccessFeedBackWindowNeeded) {
|
||||
if (CommonUtils.isUndefined(customMessageText)) {
|
||||
customMessageText = Globalization.SikeresMentes;
|
||||
}
|
||||
|
||||
KretaWindowHelper.notification(customMessageText, 'success');
|
||||
}
|
||||
|
||||
if (CommonUtils.isFunction(jsFunction)) {
|
||||
jsFunction();
|
||||
}
|
||||
};
|
||||
|
||||
kretaWindowHelper.notification = function (customMessageText, type) {
|
||||
var element = getOrCreateWindowElement('kretaNotification');
|
||||
|
||||
element.kendoNotification({
|
||||
show: notificationShow
|
||||
});
|
||||
|
||||
var widget = element.data('kendoNotification');
|
||||
|
||||
widget.show(customMessageText, type);
|
||||
};
|
||||
|
||||
function notificationShow(e) {
|
||||
var highest = 10000;
|
||||
$('body')
|
||||
.children()
|
||||
.each(function () {
|
||||
var current = parseInt($(this).css('z-index'), 10);
|
||||
if (current && highest < current) highest = current;
|
||||
});
|
||||
|
||||
e.element.parent().css('z-index', highest + 1);
|
||||
}
|
||||
|
||||
function getOrCreateWindowElement(id) {
|
||||
var element = $('#' + id);
|
||||
|
||||
if (!element.length) {
|
||||
element = $('<div></div>', { id: id }).appendTo('body');
|
||||
} else {
|
||||
element.remove();
|
||||
element = $('<div></div>', { id: id }).appendTo('body');
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
function getPosition() {
|
||||
var position = {
|
||||
top: function () {
|
||||
return 0;
|
||||
},
|
||||
left: function () {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
return position;
|
||||
}
|
||||
|
||||
function createModal(element, position, config) {
|
||||
modal = element
|
||||
.kendoWindow({
|
||||
title: config.title,
|
||||
width: config.width,
|
||||
height: config.height,
|
||||
minWidth: config.minWidth,
|
||||
minHeight: config.minHeight,
|
||||
maxHeight: config.maxHeight == null ? undefined : config.maxHeight,
|
||||
maxWidth: config.maxWidth == null ? undefined : config.maxWidth,
|
||||
actions: config.actions ? config.actions : ['Maximize', 'Close'],
|
||||
visible: false,
|
||||
modal: true,
|
||||
resizable: config.resizable,
|
||||
position: position,
|
||||
close: function () {
|
||||
if (CommonUtils.isFunction(config.closeFunction)) {
|
||||
config.closeFunction();
|
||||
}
|
||||
element.empty();
|
||||
this.destroy();
|
||||
}
|
||||
})
|
||||
.data('kendoWindow')
|
||||
.content(config.content);
|
||||
|
||||
$.validator.unobtrusive.parse('form');
|
||||
|
||||
return modal;
|
||||
}
|
||||
|
||||
function openWindow(modal, center) {
|
||||
if (modal) {
|
||||
if (center) {
|
||||
modal.center();
|
||||
}
|
||||
modal.open();
|
||||
}
|
||||
}
|
||||
|
||||
function destroyWindow(id) {
|
||||
var modal = $('#' + id).data('kendoWindow');
|
||||
if (modal) {
|
||||
modal.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
kretaWindowHelper.feedbackWindowWithThreeButton = function (
|
||||
title,
|
||||
content,
|
||||
isError,
|
||||
firstButtonText,
|
||||
secondButtonText,
|
||||
thirdButtonText,
|
||||
jsFirstFunction,
|
||||
jsSecondFunction,
|
||||
jsThirdFunction,
|
||||
firstButtonId,
|
||||
secondButtonId,
|
||||
thirdButtonId,
|
||||
name,
|
||||
newHeight,
|
||||
firstFnData,
|
||||
secondFnData,
|
||||
thirdFnData
|
||||
) {
|
||||
var element;
|
||||
if (!CommonUtils.isNullOrUndefined(name)) {
|
||||
element = $('<div />', {
|
||||
name: name
|
||||
});
|
||||
} else {
|
||||
element = $('<div />');
|
||||
}
|
||||
|
||||
var kendoWindow = element.kendoWindow({
|
||||
title: title,
|
||||
actions: [],
|
||||
resizable: false,
|
||||
modal: true,
|
||||
minHeight: MIN_HEIGHT,
|
||||
minWidth: MIN_WIDTH
|
||||
});
|
||||
|
||||
if (!CommonUtils.isNullOrUndefined(newHeight)) {
|
||||
kendoWindow.data('kendoWindow').setOptions({
|
||||
height: newHeight
|
||||
});
|
||||
}
|
||||
|
||||
var firstId = CommonUtils.isNullOrUndefined(firstButtonId)
|
||||
? ''
|
||||
: ' id ="' + firstButtonId + '"';
|
||||
var firstText = CommonUtils.isNullOrUndefined(firstButtonText)
|
||||
? Globalization.Vissza
|
||||
: firstButtonText;
|
||||
var secondId = CommonUtils.isNullOrUndefined(secondButtonId)
|
||||
? ''
|
||||
: ' id ="' + secondButtonId + '"';
|
||||
var secondText = CommonUtils.isNullOrUndefined(secondButtonText)
|
||||
? Globalization.Vissza
|
||||
: secondButtonText;
|
||||
var thirdId = CommonUtils.isNullOrUndefined(thirdButtonId)
|
||||
? ''
|
||||
: ' id ="' + thirdButtonId + '"';
|
||||
var thirdText = CommonUtils.isNullOrUndefined(thirdButtonText)
|
||||
? Globalization.Vissza
|
||||
: thirdButtonText;
|
||||
|
||||
var data =
|
||||
'<div class="modalContainer">' +
|
||||
'<div class="modalOuter">' +
|
||||
'<div class="modalContent">' +
|
||||
'<div style="padding: 20px; min-width: ' +
|
||||
MIN_WIDTH +
|
||||
'px; max-width: 1000px;">' +
|
||||
'<span><i class="fa ' +
|
||||
(isError == undefined
|
||||
? ''
|
||||
: isError == true
|
||||
? 'fa-exclamation feedBackWindowIconError'
|
||||
: 'fa-check feedBackWindowIconSuccess') +
|
||||
'"></i> </span>' +
|
||||
content +
|
||||
'</div></div></div></div>' +
|
||||
'<div class="modalFooter modalFooterStatic">' +
|
||||
'<div style="float:right; padding-left: 5px;"><a class="k-button k-button-icontext firstFeedback" href="javascript:void(null)"' +
|
||||
firstId +
|
||||
'>' +
|
||||
firstText +
|
||||
'</a>' +
|
||||
'<a style="margin-left: 10px; margin-right: 10px;" class="k-button k-button-icontext secondFeedback" href="javascript:void(null)"' +
|
||||
secondId +
|
||||
'>' +
|
||||
secondText +
|
||||
'</a>' +
|
||||
'<a class="k-button k-button-icontext thirdFeedback" href="javascript:void(null)"' +
|
||||
thirdId +
|
||||
'>' +
|
||||
thirdText +
|
||||
'</a>' +
|
||||
'</div></div>';
|
||||
|
||||
kendoWindow.data('kendoWindow').content(data).center().open();
|
||||
|
||||
kendoWindow
|
||||
.find('.firstFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(jsFirstFunction)) {
|
||||
if (firstFnData !== undefined) {
|
||||
jsFirstFunction(firstFnData);
|
||||
}
|
||||
jsFirstFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
kendoWindow
|
||||
.find('.secondFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(jsSecondFunction)) {
|
||||
if (secondFnData !== undefined) {
|
||||
jsSecondFunction(secondFnData);
|
||||
}
|
||||
jsSecondFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
kendoWindow
|
||||
.find('.thirdFeedback')
|
||||
.click(function () {
|
||||
kendoWindow.data('kendoWindow').destroy();
|
||||
if (CommonUtils.isFunction(jsThirdFunction)) {
|
||||
if (thirdFnData !== undefined) {
|
||||
jsThirdFunction(thirdFnData);
|
||||
}
|
||||
jsThirdFunction();
|
||||
}
|
||||
})
|
||||
.end();
|
||||
};
|
||||
|
||||
return kretaWindowHelper;
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue