- function init_popup(obj) {
- var config = obj ? obj : {};
-
- var height = config.height || 760;
- var width = config.width || 880;
- var id_button = config.id_button || "input.mkwsButton";
- var id_popup = config.id_popup || ".mkwsPopup";
-
- debug("popup height: " + height + ", width: " + width);
-
- // make sure that jquery-ui was loaded afte jQuery core lib, e.g.:
- // <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
- if (!$.ui) {
- debug("Error: jquery-ui.js is missing, did you include it after jQuery core in the HTML file?");
- return;
- }
-
- $(id_popup).dialog({
- closeOnEscape: true,
- autoOpen: false,
- height: height,
- width: width,
- modal: true,
- resizable: true,
- buttons: {
- Cancel: function() {
- $(this).dialog("close");
- }
- },
- close: function() { }
- });
-
- $(id_button)
- .button()
- .click(function() {
- $(id_popup).dialog("open");
- });
- };
-
- $.extend({
-
- // service-proxy or pazpar2
- pazpar2: function(config) {
- if (config == null || typeof config != 'object') {
- config = {};
- }
- var id_popup = config.id_popup || ".mkwsPopup";
- id_popup = id_popup.replace(/^[#\.]/, "");
-
- // simple layout
- var div = '\
+ $(id_popup).dialog({
+ closeOnEscape: true,
+ autoOpen: false,
+ height: height,
+ width: width,
+ modal: true,
+ resizable: true,
+ buttons: {
+ Cancel: function() {
+ $(this).dialog("close");
+ }
+ },
+ close: function() { }
+ });
+
+ $(id_button)
+ .button()
+ .click(function() {
+ $(id_popup).dialog("open");
+ });
+ };
+
+ $.extend({
+
+ // service-proxy or pazpar2
+ pazpar2: function(config) {
+ if (config == null || typeof config != 'object') {
+ config = {};
+ }
+ var id_popup = config.id_popup || ".mkwsPopup";
+ id_popup = id_popup.replace(/^[#\.]/, "");
+
+ // simple layout
+ var div = '\