Skip to content

Commit 4e9946d

Browse files
authored
feat(windows)!: remove deprecated platform (#185)
1 parent 5d7923a commit 4e9946d

File tree

7 files changed

+5
-392
lines changed

7 files changed

+5
-392
lines changed

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ function, which is typically less customizable.
8383
- Android
8484
- Browser
8585
- iOS
86-
- Windows
8786

8887
## navigator.notification.confirm
8988

@@ -127,20 +126,13 @@ indexing, so the value is `1`, `2`, `3`, etc.
127126
- Android
128127
- Browser
129128
- iOS
130-
- Windows
131129

132130
### Android Quirks
133131

134132
- Android supports a maximum of three buttons, and ignores any more than that.
135133

136134
- Android dialog title cannot exceed 2 lines of content, it will ignore any more than this.
137135

138-
### Windows Quirks
139-
140-
- On Windows8/8.1 it is not possible to add more than three buttons to MessageDialog instance.
141-
142-
- On Windows Phone 8.1 it's not possible to show dialog with more than two buttons.
143-
144136
## navigator.notification.prompt
145137

146138
Displays a native dialog box that is more customizable than the browser's `prompt` function.
@@ -188,18 +180,13 @@ contains the following properties:
188180
- Android
189181
- Browser
190182
- iOS
191-
- Windows
192183

193184
### Android Quirks
194185

195186
- Android supports a maximum of three buttons, and ignores any more than that.
196187

197188
- On Android 3.0 and later, buttons are displayed in reverse order for devices that use the Holo theme.
198189

199-
### Windows Quirks
200-
201-
- On Windows prompt dialog is html-based due to lack of such native api.
202-
203190
## navigator.notification.beep
204191

205192
The device plays a beep sound.
@@ -218,7 +205,6 @@ The device plays a beep sound.
218205
- Android
219206
- Browser
220207
- iOS
221-
- Windows 8
222208

223209
### Android Quirks
224210

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"platforms": [
99
"android",
1010
"browser",
11-
"ios",
12-
"windows"
11+
"ios"
1312
]
1413
},
1514
"repository": "github:apache/cordova-plugin-dialogs",
@@ -20,8 +19,7 @@
2019
"ecosystem:cordova",
2120
"cordova-android",
2221
"cordova-browser",
23-
"cordova-ios",
24-
"cordova-windows"
22+
"cordova-ios"
2523
],
2624
"scripts": {
2725
"test": "npm run lint",

plugin.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,4 @@
7070
<resource-file src="src/ios/CDVNotification.bundle" />
7171
<framework src="AudioToolbox.framework" weak="true" />
7272
</platform>
73-
74-
<!-- windows -->
75-
<platform name="windows">
76-
<js-module src="src/windows/NotificationProxy.js" name="NotificationProxy">
77-
<runs />
78-
</js-module>
79-
80-
<asset src="www/windows/notification.css" target="css/notification.css" />
81-
</platform>
8273
</plugin>

src/windows/NotificationProxy.js

Lines changed: 0 additions & 275 deletions
This file was deleted.

tests/tests.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,10 @@ exports.defineManualTests = function (contentEl, createActionButton) {
215215
'alert'
216216
);
217217

218-
// WP8.1 detection is necessary since it doesn't support confirm dialogs with more than 2 buttons
219-
var isRunningOnWP81 = cordova.platformId === 'windows' && navigator.userAgent.indexOf('Windows Phone') > -1;
220-
221218
createActionButton(
222219
'Confirm Dialog - Deprecated',
223220
function () {
224-
var buttons = isRunningOnWP81 ? 'Yes,No' : 'Yes,No,Maybe';
221+
var buttons = 'Yes,No,Maybe';
225222
confirmDialogA('You pressed confirm.', 'Confirm Dialog', buttons);
226223
},
227224
'confirm_deprecated'
@@ -230,7 +227,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
230227
createActionButton(
231228
'Confirm Dialog',
232229
function () {
233-
var buttons = isRunningOnWP81 ? ['Yes', 'Actually, No'] : ['Yes', 'No', 'Maybe, Not Sure'];
230+
var buttons = ['Yes', 'No', 'Maybe, Not Sure'];
234231
confirmDialogB('You pressed confirm.', 'Confirm Dialog', buttons);
235232
},
236233
'confirm'

www/notification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function convertButtonLabels (buttonLabels) {
134134
// Some platforms take an array of button label names.
135135
// Other platforms take a comma separated list.
136136
// For compatibility, we convert to the desired type based on the platform.
137-
if (platform.id === 'android' || platform.id === 'ios' || platform.id === 'windows') {
137+
if (platform.id === 'android' || platform.id === 'ios') {
138138
if (typeof buttonLabels === 'string') {
139139
buttonLabels = buttonLabels.split(','); // not crazy about changing the var type here
140140
}

0 commit comments

Comments
 (0)