Skip to content

Commit 0af9fb6

Browse files
committed
Fix for if tablename contains spaces, dialogs are broken
1 parent f25809a commit 0af9fb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

js/taskbar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var taskbar = {
1515
},
1616
openDialog: function (id, url, w, h) {
1717
var dlg = null;
18-
id = 'dialog-' + id;
18+
id = 'dialog-' + id.replace(/ /g,'-');
1919
obj = this.findDialog(id);
2020
if (obj) { // && dlg.status == 1) {
2121
// confirm current operation abort.. if user cancels, return;
@@ -43,7 +43,7 @@ var taskbar = {
4343
},
4444

4545
openModal: function (id, url, w, h) {
46-
id = 'dialog-' + id;
46+
id = 'dialog-' + id.replace(/ /g,'-');
4747
dlg = this.createDialog(id, url, w, h, true);
4848

4949
dlg.find('.dialog_contents').attr('src', 'javascript:false');
@@ -75,7 +75,7 @@ var taskbar = {
7575

7676
createDialog: function(id, url, w, h, modal) {
7777
var dlg = $("#dialog-template").clone();
78-
var dlg_id = id;
78+
var dlg_id = id.replace(/ /g,'-');
7979
dlg.attr('id', dlg_id);
8080
dlg.find('.dialog_contents').attr('id', dlg_id + '-contents');
8181
dlg.dialog({

0 commit comments

Comments
 (0)