-
Notifications
You must be signed in to change notification settings - Fork 19
/
dialog_help.js
35 lines (28 loc) · 1.03 KB
/
dialog_help.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$(function() {
$('a[gl-help-popup]').each(function() {
var $link = $(this);
$link.one('click', function() {
var $loading = $('<div style="margin: auto; padding-top: 90px; width: 32px; height: 32px">'
+ '<img src="' + geeklog.layout_url + '/images/loading.gif" alt="loading"' + geeklog.xhtml + '></div>');
var $dialog = $('<div></div>')
.append($loading.clone());
var buttons_obj = new Object();
buttons_obj[geeklog.lang.close] = function() {
$dialog.dialog("close");
};
$dialog
.load($link.attr('href')+ ' #content')
.dialog({
title: $link.attr("title"),
width: 500,
height: 300,
buttons: buttons_obj,
});
$link.click(function() {
$dialog.dialog("open");
return false;
});
return false;
});
});
});