projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
52284cf
)
re-order check for loaded jquery-ui.js lib
author
Wolfram Schneider
<wosch@indexdata.dk>
Thu, 10 Jul 2014 12:02:35 +0000
(12:02 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Thu, 10 Jul 2014 12:02:35 +0000
(12:02 +0000)
src/mkws-popup.js
patch
|
blob
|
history
diff --git
a/src/mkws-popup.js
b/src/mkws-popup.js
index
fd6153a
..
44736cc
100644
(file)
--- a/
src/mkws-popup.js
+++ b/
src/mkws-popup.js
@@
-2,31
+2,29
@@
*
*/
*
*/
-"use strict";
-
+//"use strict";
// $(document).ready(function () {
mkws.registerWidgetType('Popup', function() {
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
// $(document).ready(function () {
mkws.registerWidgetType('Popup', function() {
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
- if (!$.ui) {
- alert("Error: jquery-ui.js is missing, did you include it after jQuery core in the HTML file?");
- return;
- }
-
- var popup_window = $(this.node); // mkws.registerWidgetType('Popup',....)
+ var popup_window = $(this.node); // mkws.registerWidgetType('Popup',....)
// var popup_window = $(".mkwsPopup"); // $(document).ready()
// var popup_window = $(".mkwsPopup"); // $(document).ready()
-
if (!popup_window) {
if (!popup_window) {
- debug("no popup found, skip");
+ debug("no popup found, skip...");
return;
} else {
return;
} else {
- debug("found popup windows: " + popup_window.length);
+ debug("number of popup windows found: " + popup_window.length);
+ }
+
+ if (!$.ui) {
+ alert("Error: jquery-ui.js is missing, did you include it after jQuery core in the HTML file?");
+ return;
}
// more than one widget on a page are possible
}
// more than one widget on a page are possible
- popup_window.each(function (i) {
+ popup_window.each(function(i) {
var that = $(this);
var width = parseInt(that.attr("popup_width") || "800");
var that = $(this);
var width = parseInt(that.attr("popup_width") || "800");
@@
-43,17
+41,17
@@
mkws.registerWidgetType('Popup', function() {
modal: modal ? true : false,
resizable: true,
buttons: {
modal: modal ? true : false,
resizable: true,
buttons: {
- Cancel: function () {
+ Cancel: function() {
that.dialog("close");
}
},
that.dialog("close");
}
},
- close: function () {}
+ close: function() {}
});
// open at search query submit
var id_botton = that.attr("popup_button");
if (id_botton) {
});
// open at search query submit
var id_botton = that.attr("popup_button");
if (id_botton) {
- $(id_botton).button().click(function () {
+ $(id_botton).button().click(function() {
that.dialog("open");
});
}
that.dialog("open");
});
}