Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/187141

Change subject: WIP: replace confirmation dialog with OOjs-UI dialog.
......................................................................

WIP: replace confirmation dialog with OOjs-UI dialog.

Change-Id: Ida5bf916f442326f4123295290001344eb20a600
---
M Collection.php
M js/check_load_from_localstorage.js
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/41/187141/1

diff --git a/Collection.php b/Collection.php
index 181f7cc..a43c915 100644
--- a/Collection.php
+++ b/Collection.php
@@ -235,7 +235,7 @@
        'ext.collection.checkLoadFromLocalStorage' => $collResourceTemplate + 
array(
                'scripts' => 'check_load_from_localstorage.js',
                'styles' => 'bookcreator.css',
-               'dependencies' => 'jquery.jStorage'
+               'dependencies' => array( 'jquery.jStorage', 'oojs-ui' )
        )
 );
 
diff --git a/js/check_load_from_localstorage.js 
b/js/check_load_from_localstorage.js
index 723aa55..0ba6461 100644
--- a/js/check_load_from_localstorage.js
+++ b/js/check_load_from_localstorage.js
@@ -20,6 +20,11 @@
                        var txt = collection_dialogtxt;
                        txt = txt.replace(/%TITLE%/, c.title ? '("' + c.title + 
'")' : '');
                        txt = txt.replace(/%NUMPAGES%/, num_pages);
+                       var wm = new OO.ui.WindowManager();
+                       $('body').append(wm.$element);
+                       var md = new OO.ui.MessageDialog();
+                       md.setManager(wm);
+                       md.open({ title: c.title || '', message: txt });
                        if (confirm(txt)) {
                                $.post(script_url, {
                                        'action': 'ajax',

-- 
To view, visit https://gerrit.wikimedia.org/r/187141
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida5bf916f442326f4123295290001344eb20a600
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to