Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @helper PopUpViewer(string url)
- {
- <input id="popupCall" value="popupcall" onclick="doFunction();" type="button" />
- <script>
- var ie8 = window.ActiveXObject || "ActiveXObject" in window;
- var popupTemplate = kendo.template([
- '<div class="modal #=fadeClass# #=modalClass# #=modalId#" id="clientModal" tabindex="-1" role="dialog" aria-labelledby="clientModal" aria-hidden="true">',
- '<div class="modal-dialog modal-lg">',
- '<div class="modal-content">',
- '<div class="modal-header">',
- '<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>',
- '<h4 class="modal-title" id="myModalLabel">#: modalTitle#</h4>',
- '</div>',
- '<div class="modal-body">',
- '#= modalBody #',
- '</div>',
- '<div class="modal-footer">',
- '<button type="button" class="btn btn-default" data-dismiss="modal">Zamknij</button>',
- '</div>',
- '</div>', // modal-content
- '</div>', // modal-dialog
- '</div>' // modal
- ].join(''));
- function doFunction() {
- $.ajax({
- url: '@url',
- async: true,
- cache: false,
- type: "GET",
- success: function (data, textStatus) {
- Ag.Components.Modal.show(popupTemplate({
- modalTitle: ':-)',
- modalBody: data,
- fadeClass: (ie8 ? '' : 'fade'),
- modalId: ('modal-id-' + ((Math.random() * 4294967296) | 0)),
- modalClass: ''
- }), { title: "PopUp" });
- }
- });
- }
- </script>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement