projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.PopupWindow -> .WmkwsPopup
[mkws-moved-to-github.git]
/
src
/
mkws-popup.js
diff --git
a/src/mkws-popup.js
b/src/mkws-popup.js
index
48b5059
..
ca38e5d
100644
(file)
--- a/
src/mkws-popup.js
+++ b/
src/mkws-popup.js
@@
-4,7
+4,7
@@
// "use strict";
$(document).ready(function () {
// "use strict";
$(document).ready(function () {
- // mkws.registerWidgetType('PopupWindow', function() {
+// mkws.registerWidgetType('WmkwsPopup', function() {
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
@@
-14,7
+14,7
@@
$(document).ready(function () {
return;
}
return;
}
- var popup_window = $(".PopupWindow");
+ var popup_window = $(".WmkwsPopup");
if (!popup_window) {
debug("no popup found, skip");
return;
if (!popup_window) {
debug("no popup found, skip");
return;
@@
-22,6
+22,7
@@
$(document).ready(function () {
debug("found popup windows: " + popup_window.length);
}
debug("found popup windows: " + popup_window.length);
}
+ // more than one widget on a page are possible
popup_window.each(function (i) {
var that = $(this);
popup_window.each(function (i) {
var that = $(this);
@@
-45,5
+46,13
@@
$(document).ready(function () {
},
close: function () {}
});
},
close: function () {}
});
+
+ // open at search query submit
+ var id_botton = that.attr("popup_button");
+ if (id_botton) {
+ $(id_botton).button().click(function () {
+ that.dialog("open");
+ });
+ }
});
});
});
});