loleaflet/src/control/Control.Dialog.js |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit 843dab3476c0407272dade24cd4012ce5c26c620
Author: Mihai Varga <mihai.va...@collabora.com>
Date:   Thu Aug 6 18:07:38 2015 +0300

    loleaflet: dialog control

diff --git a/loleaflet/src/control/Control.Dialog.js 
b/loleaflet/src/control/Control.Dialog.js
new file mode 100644
index 0000000..98a6b48
--- /dev/null
+++ b/loleaflet/src/control/Control.Dialog.js
@@ -0,0 +1,18 @@
+/*
+ * L.Control.Dialog used for displaying alerts
+ */
+
+L.Control.Dialog = L.Control.extend({
+       onAdd: function (map) {
+               map.on('error', this._onError, this);
+               return document.createElement('div');
+       },
+
+       _onError: function (e) {
+               vex.dialog.alert(e.msg);
+       }
+});
+
+L.control.dialog = function (options) {
+       return new L.Control.Dialog(options);
+};
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to