~abreu-alexandre/webbrowser-app/fix-navigation-filtering

« back to all changes in this revision

Viewing changes to src/app/ConfirmDialog.qml

  • Committer: Tarmac
  • Author(s): daker, Adnane Belmadiaf
  • Date: 2013-09-24 11:51:36 UTC
  • mfrom: (323.2.2 fix.1169758)
  • Revision ID: tarmac-20130924115136-tx6yvvriokkaakau
Added support for confirm dialogs. Fixes: https://bugs.launchpad.net/bugs/1169758.

Approved by PS Jenkins bot, Olivier Tilloy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This file is part of webbrowser-app.
 
5
 *
 
6
 * webbrowser-app is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; version 3.
 
9
 *
 
10
 * webbrowser-app is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
import QtQuick 2.0
 
20
import Ubuntu.Components 0.1
 
21
import Ubuntu.Components.Popups 0.1 as Popups
 
22
 
 
23
Popups.Dialog {
 
24
    title: i18n.tr("JavaScript Confirmation")
 
25
    text: model.message
 
26
 
 
27
    Button {
 
28
        text: i18n.tr("OK")
 
29
        onClicked: model.accept()
 
30
    }
 
31
 
 
32
    Button {
 
33
        text: i18n.tr("Cancel")
 
34
        onClicked: model.reject()
 
35
    }
 
36
 
 
37
    Component.onCompleted: show()
 
38
}
 
 
b'\\ No newline at end of file'