Added support for repeated dialog options with title
authorAlexander Ebert <ebert@woltlab.com>
Wed, 14 Sep 2016 15:46:08 +0000 (17:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 14 Sep 2016 15:46:08 +0000 (17:46 +0200)
wcfsetup/install/files/js/WCF.js

index c51640244211d4f6f0735b7f439db3d960790fd9..eeeb519c8360e8a1a347f5cecd84005387a46b5e 100755 (executable)
@@ -7013,7 +7013,12 @@ jQuery.fn.extend({
                                        document.body.appendChild(this[0]);
                                }
                                
-                               UiDialog.openStatic(id, null, (args.length === 1 && typeof args[0] === 'object') ? args[0] : {});
+                               var options = (args.length === 1 && typeof args[0] === 'object') ? args[0] : {};
+                               UiDialog.openStatic(id, null, options);
+                               
+                               if (options.hasOwnProperty('title')) {
+                                       UiDialog.setTitle(id, options.title);
+                               }
                        }
                }).bind(this));