You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/10/25 23:33:49 UTC
[01/12] git commit: [CB-4592] [Blackberry10] Added beep support
Updated Branches:
refs/heads/dev d422ec37d -> 0be2596e4
[CB-4592] [Blackberry10] Added beep support
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/8eab4539
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/8eab4539
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/8eab4539
Branch: refs/heads/dev
Commit: 8eab4539e233989dbaf24f6c78e3e94402535c7a
Parents: 9824622
Author: Kristoffer Flores <kf...@blackberry.com>
Authored: Fri Aug 23 14:14:42 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Fri Sep 13 08:43:44 2013 -0400
----------------------------------------------------------------------
plugin.xml | 11 +++++++----
src/blackberry10/index.js | 4 ----
www/blackberry10/beep.js | 42 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/8eab4539/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 4e8a52a..3d47847 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,18 +20,18 @@
<param name="android-package" value="org.apache.cordova.dialogs.Notification"/>
</feature>
</config-file>
-
+
<source-file src="src/android/Notification.java" target-dir="src/org/apache/cordova/dialogs" />
<!-- android specific notification apis -->
<js-module src="www/android/notification.js" name="notification_android">
<merges target="navigator.notification" />
</js-module>
-
+
</platform>
<!-- ios -->
- <platform name="ios">
+ <platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="Notification">
<param name="ios-package" value="CDVNotification"/>
@@ -40,7 +40,7 @@
<header-file src="src/ios/CDVNotification.h" />
<source-file src="src/ios/CDVNotification.m" />
<resource-file src="src/ios/CDVNotification.bundle" />
- <framework src="AudioToolbox.framework" weak="true" />
+ <framework src="AudioToolbox.framework" weak="true" />
</platform>
<!-- blackberry10 -->
@@ -49,6 +49,9 @@
<config-file target="www/config.xml" parent="/widget">
<feature name="Notification" value="Notification"/>
</config-file>
+ <js-module src="www/blackberry10/beep.js" name="beep">
+ <clobbers target="window.navigator.notification.beep" />
+ </js-module>
</platform>
<!-- wp7 -->
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/8eab4539/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/src/blackberry10/index.js b/src/blackberry10/index.js
index fad04f7..b218eab 100644
--- a/src/blackberry10/index.js
+++ b/src/blackberry10/index.js
@@ -83,9 +83,5 @@ module.exports = {
} else {
showDialog(args, "JavaScriptPrompt", result);
}
- },
- beep: function (success, fail, args, env) {
- var result = new PluginResult(args, env);
- result.error("Beep not supported");
}
};
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/8eab4539/www/blackberry10/beep.js
----------------------------------------------------------------------
diff --git a/www/blackberry10/beep.js b/www/blackberry10/beep.js
new file mode 100644
index 0000000..6d4a77a
--- /dev/null
+++ b/www/blackberry10/beep.js
@@ -0,0 +1,42 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+var beep,
+ count = 0,
+ beepObj = new Audio('file:///usr/share/sounds/notification_text_message_im_received.wav');
+
+beep = function (quantity) {
+ var callback = function () {
+ if (--count > 0) {
+ beepObj.play();
+ } else {
+ beepObj.removeEventListener("ended", callback);
+ delete beepObj;
+ }
+ };
+
+ count += quantity;
+ if (count === quantity) {
+ beepObj.addEventListener("ended", callback);
+ beepObj.play();
+ }
+};
+
+module.exports = beep;
[12/12] git commit: Merge branch 'dev' of
https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs into dev
Posted by st...@apache.org.
Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs into dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/0be2596e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/0be2596e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/0be2596e
Branch: refs/heads/dev
Commit: 0be2596e423fff5d7f2d045142ab3407cddcda42
Parents: 1dccb6b d422ec3
Author: Steven Gill <st...@gmail.com>
Authored: Fri Oct 25 14:33:42 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Fri Oct 25 14:33:42 2013 -0700
----------------------------------------------------------------------
plugin.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0be2596e/plugin.xml
----------------------------------------------------------------------
[10/12] git commit: new plugin execute arguments supported
Posted by st...@apache.org.
new plugin execute arguments supported
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/77a73ece
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/77a73ece
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/77a73ece
Branch: refs/heads/dev
Commit: 77a73ece0fc90a8a60d12eabf0b7aa3db112f29d
Parents: 25e6a24
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Fri Oct 25 11:19:15 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Fri Oct 25 11:19:15 2013 +0200
----------------------------------------------------------------------
src/firefoxos/notification.js | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/77a73ece/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index e31eef7..7362934 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -65,16 +65,26 @@ var Notification = {
vibrate: function(milliseconds) {
navigator.vibrate(milliseconds);
},
- alert: function(successCallback, errorCallback, message, title, buttonName) {
+ alert: function(successCallback, errorCallback, args) {
+ var message = args[0];
+ var title = args[1];
+ var _buttonLabels = [args[2]];
var _callback = (successCallback || _empty);
- var _buttonLabels = [buttonName];
modal(message, _callback, title, _buttonLabels);
},
- confirm: function(successCallback, errorCallback, message, title, buttonLabels) {
+ confirm: function(successCallback, errorCallback, args) {
+ var message = args[0];
+ var title = args[1];
+ var buttonLabels = args[2];
var _callback = (successCallback || _empty);
modal(message, _callback, title, buttonLabels);
},
- prompt: function(successCallback, errorCallback, message, title, buttonLabels, defaultText) {
+ prompt: function(successCallback, errorCallback, args) {
+ console.log(args);
+ var message = args[0];
+ var title = args[1];
+ var buttonLabels = args[2];
+ var defaultText = args[3];
var _tempcallback = (successCallback || _empty);
function _callback(labelIndex) {
var content = document.getElementById('prompt-input').value;
[07/12] git commit: img files copied inside plugin
Posted by st...@apache.org.
img files copied inside plugin
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/f8855583
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/f8855583
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/f8855583
Branch: refs/heads/dev
Commit: f88555832250b88b9b6e8dcf27acff29af712450
Parents: 8f337f0
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Wed Oct 23 09:44:50 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Wed Oct 23 09:44:50 2013 +0200
----------------------------------------------------------------------
plugin.xml | 6 ++++++
www/firefoxos/danger-press.png | Bin 0 -> 1015 bytes
www/firefoxos/danger.png | Bin 0 -> 1031 bytes
www/firefoxos/default.png | Bin 0 -> 1014 bytes
www/firefoxos/gradient.png | Bin 0 -> 3713 bytes
www/firefoxos/notification.css | 18 +++++++-----------
www/firefoxos/pattern.png | Bin 0 -> 6851 bytes
www/firefoxos/recommend.png | Bin 0 -> 1020 bytes
8 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index d4bc774..1d45011 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -22,6 +22,12 @@
</config-file>
<asset src="www/firefoxos/notification.css" target="css/notification.css" />
+ <asset src="www/firefoxos/danger-press.png" target="css/danger-press.png" />
+ <asset src="www/firefoxos/danger.png" target="css/danger.png" />
+ <asset src="www/firefoxos/default.png" target="css/default.png" />
+ <asset src="www/firefoxos/gradient.png" target="css/gradient.png" />
+ <asset src="www/firefoxos/pattern.png" target="css/pattern.png" />
+ <asset src="www/firefoxos/recommend.png" target="css/recommend.png" />
<js-module src="src/firefoxos/notification.js" name="dialogs-impl">
<runs />
</js-module>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/danger-press.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/danger-press.png b/www/firefoxos/danger-press.png
new file mode 100644
index 0000000..d7529b5
Binary files /dev/null and b/www/firefoxos/danger-press.png differ
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/danger.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/danger.png b/www/firefoxos/danger.png
new file mode 100644
index 0000000..400e3ae
Binary files /dev/null and b/www/firefoxos/danger.png differ
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/default.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/default.png b/www/firefoxos/default.png
new file mode 100644
index 0000000..2ff298a
Binary files /dev/null and b/www/firefoxos/default.png differ
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/gradient.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/gradient.png b/www/firefoxos/gradient.png
new file mode 100644
index 0000000..b288545
Binary files /dev/null and b/www/firefoxos/gradient.png differ
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/notification.css
----------------------------------------------------------------------
diff --git a/www/firefoxos/notification.css b/www/firefoxos/notification.css
index 1ad5036..285a67c 100644
--- a/www/firefoxos/notification.css
+++ b/www/firefoxos/notification.css
@@ -1,12 +1,8 @@
-/* ----------------------------------
- * Confirm
- * ---------------------------------- */
-
/* Main dialog setup */
form[role="dialog"] {
background:
- url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/pattern.png) repeat left top,
- url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/gradient.png) no-repeat left top / 100% 100%;
+ url(../img/pattern.png) repeat left top,
+ url(../img/gradient.png) no-repeat left top / 100% 100%;
overflow: hidden;
position: absolute;
z-index: 100;
@@ -62,7 +58,7 @@ form[role="dialog"] menu {
padding: 1.5rem;
padding-bottom: 0.5rem;
border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
- background: #2d2d2d url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/pattern.png) repeat left top;
+ background: #2d2d2d url(../img/pattern.png) repeat left top;
display: block;
overflow: hidden;
position: absolute;
@@ -87,7 +83,7 @@ form[role="dialog"] menu button {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
- background: #fafafa url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/default.png) repeat-x left bottom/ auto 100%;
+ background: #fafafa url(../img/default.png) repeat-x left bottom/ auto 100%;
border: 0.1rem solid #a6a6a6;
border-radius: 0.3rem;
font: 500 1.6rem/3.8rem 'MozTT', Sans-serif;
@@ -108,7 +104,7 @@ a.recommend[role="button"]:active {
/* Recommend */
form[role="dialog"] menu button.recommend {
- background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/recommend.png);
+ background-image: url(../img/recommend.png);
background-color: #00caf2;
border-color: #008eab;
}
@@ -116,7 +112,7 @@ form[role="dialog"] menu button.recommend {
/* Danger */
form[role="dialog"] menu button.danger,
a.danger[role="button"] {
- background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/danger.png);
+ background-image: url(../img/danger.png);
background-color: #b70404;
color: #fff;
text-shadow: none;
@@ -125,7 +121,7 @@ a.danger[role="button"] {
/* Danger Press */
form[role="dialog"] menu button.danger:active {
- background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/danger-press.png);
+ background-image: url(../img/danger-press.png);
background-color: #890707;
}
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/pattern.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/pattern.png b/www/firefoxos/pattern.png
new file mode 100644
index 0000000..af03f56
Binary files /dev/null and b/www/firefoxos/pattern.png differ
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f8855583/www/firefoxos/recommend.png
----------------------------------------------------------------------
diff --git a/www/firefoxos/recommend.png b/www/firefoxos/recommend.png
new file mode 100644
index 0000000..42aed39
Binary files /dev/null and b/www/firefoxos/recommend.png differ
[09/12] git commit: new plugin style
Posted by st...@apache.org.
new plugin style
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/25e6a24d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/25e6a24d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/25e6a24d
Branch: refs/heads/dev
Commit: 25e6a24d6c624efb91d83c5a308306028e1586e9
Parents: 01db31e
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Fri Oct 25 10:03:34 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Fri Oct 25 10:03:34 2013 +0200
----------------------------------------------------------------------
src/firefoxos/notification.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/25e6a24d/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index cde4eae..e31eef7 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -1,6 +1,3 @@
-
-var firefoxos = require('cordova/platform');
-
function _empty() {}
function modal(message, callback, title, buttonLabels, domObjects) {
@@ -96,4 +93,5 @@ var Notification = {
}
};
-firefoxos.registerPlugin('Notification', Notification);
+module.exports = Notification;
+require('cordova/firefoxos/commandProxy').add('Notification', Notification);
[05/12] git commit: prompt added
Posted by st...@apache.org.
prompt added
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/81ee294d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/81ee294d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/81ee294d
Branch: refs/heads/dev
Commit: 81ee294dae47142a087afadf6634f2820a860cd1
Parents: 531b10c
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Fri Sep 27 14:33:08 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Fri Sep 27 14:33:08 2013 +0200
----------------------------------------------------------------------
src/firefoxos/notification.js | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/81ee294d/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index d7dee29..bba2d66 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -3,7 +3,7 @@ var firefoxos = require('cordova/platform');
function _empty() {}
-function modal(message, callback, title, buttonLabels) {
+function modal(message, callback, title, buttonLabels, domObjects) {
// create a modal window
var box = document.createElement('div');
box.classList.add('fxos-modal-window');
@@ -17,6 +17,10 @@ function modal(message, callback, title, buttonLabels) {
var boxMessage = document.createElement('p');
boxMessage.appendChild(document.createTextNode(message));
box.appendChild(boxMessage);
+ // inject what's needed
+ if (domObjects) {
+ box.appendChild(domObjects);
+ }
// add buttons and assign callbackButton on click
for (var index = 0; index < buttonLabels.length; index++) {
// TODO: first button is the default one (listens to Enter
@@ -53,6 +57,23 @@ var Notification = {
confirm: function(successCallback, errorCallback, message, title, buttonLabels) {
var _callback = (successCallback || _empty);
modal(message, _callback, title, buttonLabels);
+ },
+ prompt: function(successCallback, errorCallback, message, title, buttonLabels, defaultText) {
+ var _tempcallback = (successCallback || _empty);
+ function _callback(labelIndex) {
+ var content = document.getElementById('prompt-input').value;
+ successCallback(labelIndex, content);
+ }
+ var inputParagraph = document.createElement('p');
+ inputParagraph.classList.add('input');
+ var inputElement = document.createElement('input');
+ inputElement.setAttribute('type', 'text');
+ inputElement.id = 'prompt-input';
+ if (defaultText) {
+ inputElement.setAttribute('placeholder', defaultText);
+ }
+ inputParagraph.appendChild(inputElement);
+ modal(message, _callback, title, buttonLabels, inputParagraph);
}
};
[06/12] git commit: style added
Posted by st...@apache.org.
style added
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/8f337f09
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/8f337f09
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/8f337f09
Branch: refs/heads/dev
Commit: 8f337f09b99419fac8c54302eaee2e9fcc3d6d11
Parents: 81ee294
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Tue Oct 22 16:11:55 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Tue Oct 22 16:11:55 2013 +0200
----------------------------------------------------------------------
src/firefoxos/notification.js | 47 +++++---
www/firefoxos/notification.css | 216 ++++++++++++++++++++++++++++++++++--
2 files changed, 240 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/8f337f09/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index bba2d66..cde4eae 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -4,38 +4,57 @@ var firefoxos = require('cordova/platform');
function _empty() {}
function modal(message, callback, title, buttonLabels, domObjects) {
+ /*
+ <form role="dialog">
+ <section>
+ <h1>Some Title</h1>
+ <p>Can't find a proper question for that ...</p>
+ </section>
+ <menu>
+ <button>Cancel</button>
+ <button class="danger">Delete</button>
+ <button class="recommend">Recommend</button>
+ <button>Standard</button>
+ </menu>
+ </form>
+ */
// create a modal window
- var box = document.createElement('div');
- box.classList.add('fxos-modal-window');
+ var box = document.createElement('form');
+ box.setAttribute('role', 'dialog');
+ // prepare and append empty section
+ var section = document.createElement('section');
+ box.appendChild(section);
// add title
- if (title) {
- var boxtitle = document.createElement('h3');
- boxtitle.appendChild(document.createTextNode(title));
- box.appendChild(boxtitle);
- }
+ var boxtitle = document.createElement('h1');
+ boxtitle.appendChild(document.createTextNode(title));
+ section.appendChild(boxtitle);
// add message
var boxMessage = document.createElement('p');
boxMessage.appendChild(document.createTextNode(message));
- box.appendChild(boxMessage);
+ section.appendChild(boxMessage);
// inject what's needed
if (domObjects) {
- box.appendChild(domObjects);
+ section.appendChild(domObjects);
}
// add buttons and assign callbackButton on click
+ var menu = document.createElement('menu');
+ box.appendChild(menu);
for (var index = 0; index < buttonLabels.length; index++) {
- // TODO: first button is the default one (listens to Enter
- // key)
// TODO: last button listens to the cancel key
- addButton(buttonLabels[index], index);
+ addButton(buttonLabels[index], index, (index === 0));
}
document.body.appendChild(box);
- function addButton(label, index) {
+ function addButton(label, index, recommended) {
var button = document.createElement('button');
button.appendChild(document.createTextNode(label));
button.labelIndex = index;
button.addEventListener('click', callbackButton, false);
- box.appendChild(button);
+ if (recommended) {
+ // TODO: default one listens to Enter key
+ button.classList.add('recommend');
+ }
+ menu.appendChild(button);
}
// call callback and destroy modal
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/8f337f09/www/firefoxos/notification.css
----------------------------------------------------------------------
diff --git a/www/firefoxos/notification.css b/www/firefoxos/notification.css
index d645d9f..1ad5036 100644
--- a/www/firefoxos/notification.css
+++ b/www/firefoxos/notification.css
@@ -1,10 +1,208 @@
-.fxos-modal-window {
- background-color: rgba(0, 0, 0, .5);
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- text-align: center;
- padding-top: 3em;
+/* ----------------------------------
+ * Confirm
+ * ---------------------------------- */
+
+/* Main dialog setup */
+form[role="dialog"] {
+ background:
+ url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/pattern.png) repeat left top,
+ url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/gradient.png) no-repeat left top / 100% 100%;
+ overflow: hidden;
+ position: absolute;
+ z-index: 100;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 1.5rem 0 7rem;
+ font-family: "MozTT", Sans-serif;
+ font-size: 0;
+ /* Using font-size: 0; we avoid the unwanted visual space (about 3px)
+ created by white-spaces and break lines in the code betewen inline-block elements */
+ color: #fff;
+ text-align: left;
}
+
+form[role="dialog"]:before {
+ content: "";
+ display: inline-block;
+ vertical-align: middle;
+ width: 0.1rem;
+ height: 100%;
+ margin-left: -0.1rem;
+}
+
+form[role="dialog"] > section {
+ font-weight: lighter;
+ font-size: 2.2rem;
+ color: #FAFAFA;
+ padding: 0 1.5rem;
+ -moz-box-sizing: padding-box;
+ width: 100%;
+ display: inline-block;
+ overflow-y: scroll;
+ max-height: 100%;
+ vertical-align: middle;
+ white-space: normal;
+}
+
+form[role="dialog"] h1 {
+ font-weight: normal;
+ font-size: 1.6rem;
+ line-height: 1.5em;
+ color: #fff;
+ margin: 0;
+ padding: 0 1.5rem 1rem;
+ border-bottom: 0.1rem solid #686868;
+}
+
+/* Menu & buttons setup */
+form[role="dialog"] menu {
+ margin: 0;
+ padding: 1.5rem;
+ padding-bottom: 0.5rem;
+ border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
+ background: #2d2d2d url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/pattern.png) repeat left top;
+ display: block;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ text-align: center;
+}
+
+form[role="dialog"] menu button::-moz-focus-inner {
+ border: none;
+ outline: none;
+}
+form[role="dialog"] menu button {
+ width: 100%;
+ height: 3.8rem;
+ margin: 0 0 1rem;
+ padding: 0 1.5rem;
+ -moz-box-sizing: border-box;
+ display: inline-block;
+ vertical-align: middle;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ background: #fafafa url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/default.png) repeat-x left bottom/ auto 100%;
+ border: 0.1rem solid #a6a6a6;
+ border-radius: 0.3rem;
+ font: 500 1.6rem/3.8rem 'MozTT', Sans-serif;
+ color: #333;
+ text-align: center;
+ text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
+ text-decoration: none;
+ outline: none;
+}
+
+/* Press (default & recommend) */
+form[role="dialog"] menu button:active,
+form[role="dialog"] menu button.recommend:active,
+a.recommend[role="button"]:active {
+ border-color: #008aaa;
+ color: #333;
+}
+
+/* Recommend */
+form[role="dialog"] menu button.recommend {
+ background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/recommend.png);
+ background-color: #00caf2;
+ border-color: #008eab;
+}
+
+/* Danger */
+form[role="dialog"] menu button.danger,
+a.danger[role="button"] {
+ background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/danger.png);
+ background-color: #b70404;
+ color: #fff;
+ text-shadow: none;
+ border-color: #820000;
+}
+
+/* Danger Press */
+form[role="dialog"] menu button.danger:active {
+ background-image: url(https://raw.github.com/arcturus/firefox-os-notifications/master/style/confirm/images/ui/danger-press.png);
+ background-color: #890707;
+}
+
+/* Disabled */
+form[role="dialog"] > menu > button[disabled] {
+ background: #5f5f5f;
+ color: #4d4d4d;
+ text-shadow: none;
+ border-color: #4d4d4d;
+ pointer-events: none;
+}
+
+
+form[role="dialog"] menu button:nth-child(even) {
+ margin-left: 1rem;
+}
+
+form[role="dialog"] menu button,
+form[role="dialog"] menu button:nth-child(odd) {
+ margin: 0 0 1rem 0;
+}
+
+form[role="dialog"] menu button {
+ width: calc((100% - 1rem) / 2);
+}
+
+form[role="dialog"] menu button.full {
+ width: 100%;
+}
+
+/* Specific component code */
+form[role="dialog"] p {
+ word-wrap: break-word;
+ margin: 1rem 0 0;
+ padding: 0 1.5rem 1rem;
+ line-height: 3rem;
+}
+
+form[role="dialog"] p img {
+ float: left;
+ margin-right: 2rem;
+}
+
+form[role="dialog"] p strong {
+ font-weight: lighter;
+}
+
+form[role="dialog"] p small {
+ font-size: 1.4rem;
+ font-weight: normal;
+ color: #cbcbcb;
+ display: block;
+}
+
+form[role="dialog"] dl {
+ border-top: 0.1rem solid #686868;
+ margin: 1rem 0 0;
+ overflow: hidden;
+ padding-top: 1rem;
+ font-size: 1.6rem;
+ line-height: 2.2rem;
+}
+
+form[role="dialog"] dl > dt {
+ clear: both;
+ float: left;
+ width: 7rem;
+ padding-left: 1.5rem;
+ font-weight: 500;
+ text-align: left;
+}
+
+form[role="dialog"] dl > dd {
+ padding-right: 1.5rem;
+ font-weight: 300;
+ text-overflow: ellipsis;
+ vertical-align: top;
+ overflow: hidden;
+}
+
[04/12] git commit: styling from James
Posted by st...@apache.org.
styling from James
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/531b10ca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/531b10ca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/531b10ca
Branch: refs/heads/dev
Commit: 531b10ca1a87c3d4c5c2bc84f0ddd132d129d472
Parents: 1f8a91f
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Sat Sep 21 16:58:41 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Sat Sep 21 16:58:41 2013 +0200
----------------------------------------------------------------------
www/firefoxos/notification.css | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/531b10ca/www/firefoxos/notification.css
----------------------------------------------------------------------
diff --git a/www/firefoxos/notification.css b/www/firefoxos/notification.css
index 2954083..d645d9f 100644
--- a/www/firefoxos/notification.css
+++ b/www/firefoxos/notification.css
@@ -1,2 +1,10 @@
-
-dy { background-color: red; }
+.fxos-modal-window {
+ background-color: rgba(0, 0, 0, .5);
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ text-align: center;
+ padding-top: 3em;
+}
[03/12] git commit: fixed "exec" calls addedd css, but not working yet
Posted by st...@apache.org.
fixed "exec" calls
addedd css, but not working yet
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/1f8a91f9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/1f8a91f9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/1f8a91f9
Branch: refs/heads/dev
Commit: 1f8a91f928c1836dac80c291cc006d77f01cc137
Parents: cd576b9
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Sep 19 14:10:59 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Sep 19 14:10:59 2013 +0200
----------------------------------------------------------------------
plugin.xml | 7 ++--
src/firefoxos/dialogs.js | 76 -------------------------------------
src/firefoxos/notification.js | 59 ++++++++++++++++++++++++++++
www/firefoxos/notification.css | 2 +
www/notification.js | 2 +-
5 files changed, 66 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1f8a91f9/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 0253a35..d4bc774 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -16,12 +16,13 @@
<!-- firefoxos -->
<platform name="firefoxos">
<config-file target="config.xml" parent="/*">
- <feature name="Dialogs">
- <param name="firefoxos-package" value="Dialogs" />
+ <feature name="Notification">
+ <param name="firefoxos-package" value="Notification" />
</feature>
</config-file>
- <js-module src="src/firefoxos/dialogs.js" name="dialogs-impl">
+ <asset src="www/firefoxos/notification.css" target="css/notification.css" />
+ <js-module src="src/firefoxos/notification.js" name="dialogs-impl">
<runs />
</js-module>
</platform>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1f8a91f9/src/firefoxos/dialogs.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/dialogs.js b/src/firefoxos/dialogs.js
deleted file mode 100644
index 3a16ed2..0000000
--- a/src/firefoxos/dialogs.js
+++ /dev/null
@@ -1,76 +0,0 @@
-
-var firefoxos = require('cordova/platform');
-
-function modal(message, callback, tittle, buttonLabels, cancelButton) {
- // create a modal window
- var box = document.createElement('div');
- box.classList.add('fxos-modal-window');
- // add title
- if (tittle) {
- var boxTittle = document.createElement('h3');
- boxTittle.appendChild(document.createTextNode(tittle));
- box.appendChild(boxTittle);
- }
- // add message
- var boxMessage = document.createElement('p');
- boxMessage.appendChild(document.createTextNode(message));
- box.appendChild(boxMessage);
- // add buttons and assign callbackButton on click
- // TODO: find a way handle different languages
- if (cancelButton) {
- addButton('Cancel', -1, true);
- // TODO: listen escape key
- }
- if (buttonLabels.length == 0) {
- // only OK button
- addButton('OK');
- // TODO: listen to Enter Key
- } else {
- for (var index = 0; index < buttonLabels.length; index++) {
- // TODO: first button is the default one (listens to Enter
- // key)
- addButton(buttonLabels[index], index);
- }
- }
- document.body.appendChild(box);
-
- function addButton(label, index, cancelButton) {
- var button = document.createElement('button');
- button.appendChild(document.createTextNode(label));
- if (cancelButton) {
- button.classList.add('cancel');
- }
- if (!index) {
- index = 0;
- }
- if (cancelButton) {
- index = -1;
- }
- button.labelIndex = index;
- button.addEventListener('click', callbackButton, false);
- box.appendChild(button);
- }
-
- // call callback and destroy modal
- function callbackButton() {
- callback(this.labelIndex);
- // destroy window
- box.parentNode.removeChild(box);
- }
-}
-
-var Dialogs = {
- vibrate: function(milliseconds) {
- navigator.vibrate(milliseconds);
- },
- alert: function(message, alertCallback, tittle, buttonName) {
- // TODO: display tittle and buttonName
- modal(message, alertCallback, tittle, [buttonName]);
- },
- confirm: function(message, confirmCallback, tittle, buttonLabels) {
- // TODO: display tittle and multiple buttons
- modal(message, confirmCallback, tittle, buttonLabels, true);
- }
-};
-
-firefoxos.registerPlugin('Dialogs', Dialogs);
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1f8a91f9/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
new file mode 100644
index 0000000..d7dee29
--- /dev/null
+++ b/src/firefoxos/notification.js
@@ -0,0 +1,59 @@
+
+var firefoxos = require('cordova/platform');
+
+function _empty() {}
+
+function modal(message, callback, title, buttonLabels) {
+ // create a modal window
+ var box = document.createElement('div');
+ box.classList.add('fxos-modal-window');
+ // add title
+ if (title) {
+ var boxtitle = document.createElement('h3');
+ boxtitle.appendChild(document.createTextNode(title));
+ box.appendChild(boxtitle);
+ }
+ // add message
+ var boxMessage = document.createElement('p');
+ boxMessage.appendChild(document.createTextNode(message));
+ box.appendChild(boxMessage);
+ // add buttons and assign callbackButton on click
+ for (var index = 0; index < buttonLabels.length; index++) {
+ // TODO: first button is the default one (listens to Enter
+ // key)
+ // TODO: last button listens to the cancel key
+ addButton(buttonLabels[index], index);
+ }
+ document.body.appendChild(box);
+
+ function addButton(label, index) {
+ var button = document.createElement('button');
+ button.appendChild(document.createTextNode(label));
+ button.labelIndex = index;
+ button.addEventListener('click', callbackButton, false);
+ box.appendChild(button);
+ }
+
+ // call callback and destroy modal
+ function callbackButton() {
+ callback(this.labelIndex);
+ box.parentNode.removeChild(box);
+ }
+}
+
+var Notification = {
+ vibrate: function(milliseconds) {
+ navigator.vibrate(milliseconds);
+ },
+ alert: function(successCallback, errorCallback, message, title, buttonName) {
+ var _callback = (successCallback || _empty);
+ var _buttonLabels = [buttonName];
+ modal(message, _callback, title, _buttonLabels);
+ },
+ confirm: function(successCallback, errorCallback, message, title, buttonLabels) {
+ var _callback = (successCallback || _empty);
+ modal(message, _callback, title, buttonLabels);
+ }
+};
+
+firefoxos.registerPlugin('Notification', Notification);
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1f8a91f9/www/firefoxos/notification.css
----------------------------------------------------------------------
diff --git a/www/firefoxos/notification.css b/www/firefoxos/notification.css
new file mode 100644
index 0000000..2954083
--- /dev/null
+++ b/www/firefoxos/notification.css
@@ -0,0 +1,2 @@
+
+dy { background-color: red; }
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1f8a91f9/www/notification.js
----------------------------------------------------------------------
diff --git a/www/notification.js b/www/notification.js
index c16c367..ae4e77d 100644
--- a/www/notification.js
+++ b/www/notification.js
@@ -63,7 +63,7 @@ module.exports = {
// Some platforms take an array of button label names.
// Other platforms take a comma separated list.
// For compatibility, we convert to the desired type based on the platform.
- if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone") {
+ if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "firefoxos") {
if (typeof _buttonLabels === 'string') {
var buttonLabelString = _buttonLabels;
_buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here
[02/12] git commit: first (blind) try
Posted by st...@apache.org.
first (blind) try
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/cd576b9b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/cd576b9b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/cd576b9b
Branch: refs/heads/dev
Commit: cd576b9b4d2ce6bd71c00b3873c7f8e9d0187917
Parents: 8eab453
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Wed Sep 18 16:42:19 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Wed Sep 18 16:42:19 2013 +0200
----------------------------------------------------------------------
plugin.xml | 13 ++++++++
src/firefoxos/dialogs.js | 76 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/cd576b9b/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 3d47847..0253a35 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -13,6 +13,19 @@
<merges target="navigator.notification" />
</js-module>
+ <!-- firefoxos -->
+ <platform name="firefoxos">
+ <config-file target="config.xml" parent="/*">
+ <feature name="Dialogs">
+ <param name="firefoxos-package" value="Dialogs" />
+ </feature>
+ </config-file>
+
+ <js-module src="src/firefoxos/dialogs.js" name="dialogs-impl">
+ <runs />
+ </js-module>
+ </platform>
+
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/cd576b9b/src/firefoxos/dialogs.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/dialogs.js b/src/firefoxos/dialogs.js
new file mode 100644
index 0000000..3a16ed2
--- /dev/null
+++ b/src/firefoxos/dialogs.js
@@ -0,0 +1,76 @@
+
+var firefoxos = require('cordova/platform');
+
+function modal(message, callback, tittle, buttonLabels, cancelButton) {
+ // create a modal window
+ var box = document.createElement('div');
+ box.classList.add('fxos-modal-window');
+ // add title
+ if (tittle) {
+ var boxTittle = document.createElement('h3');
+ boxTittle.appendChild(document.createTextNode(tittle));
+ box.appendChild(boxTittle);
+ }
+ // add message
+ var boxMessage = document.createElement('p');
+ boxMessage.appendChild(document.createTextNode(message));
+ box.appendChild(boxMessage);
+ // add buttons and assign callbackButton on click
+ // TODO: find a way handle different languages
+ if (cancelButton) {
+ addButton('Cancel', -1, true);
+ // TODO: listen escape key
+ }
+ if (buttonLabels.length == 0) {
+ // only OK button
+ addButton('OK');
+ // TODO: listen to Enter Key
+ } else {
+ for (var index = 0; index < buttonLabels.length; index++) {
+ // TODO: first button is the default one (listens to Enter
+ // key)
+ addButton(buttonLabels[index], index);
+ }
+ }
+ document.body.appendChild(box);
+
+ function addButton(label, index, cancelButton) {
+ var button = document.createElement('button');
+ button.appendChild(document.createTextNode(label));
+ if (cancelButton) {
+ button.classList.add('cancel');
+ }
+ if (!index) {
+ index = 0;
+ }
+ if (cancelButton) {
+ index = -1;
+ }
+ button.labelIndex = index;
+ button.addEventListener('click', callbackButton, false);
+ box.appendChild(button);
+ }
+
+ // call callback and destroy modal
+ function callbackButton() {
+ callback(this.labelIndex);
+ // destroy window
+ box.parentNode.removeChild(box);
+ }
+}
+
+var Dialogs = {
+ vibrate: function(milliseconds) {
+ navigator.vibrate(milliseconds);
+ },
+ alert: function(message, alertCallback, tittle, buttonName) {
+ // TODO: display tittle and buttonName
+ modal(message, alertCallback, tittle, [buttonName]);
+ },
+ confirm: function(message, confirmCallback, tittle, buttonLabels) {
+ // TODO: display tittle and multiple buttons
+ modal(message, confirmCallback, tittle, buttonLabels, true);
+ }
+};
+
+firefoxos.registerPlugin('Dialogs', Dialogs);
[08/12] git commit: smaller fonts styling input
Posted by st...@apache.org.
smaller fonts
styling input
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/01db31ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/01db31ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/01db31ea
Branch: refs/heads/dev
Commit: 01db31eaec7ceaebdd280b286e83b15d5587d167
Parents: f885558
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Wed Oct 23 12:56:28 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Wed Oct 23 12:56:28 2013 +0200
----------------------------------------------------------------------
www/firefoxos/notification.css | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/01db31ea/www/firefoxos/notification.css
----------------------------------------------------------------------
diff --git a/www/firefoxos/notification.css b/www/firefoxos/notification.css
index 285a67c..af940de 100644
--- a/www/firefoxos/notification.css
+++ b/www/firefoxos/notification.css
@@ -30,7 +30,7 @@ form[role="dialog"]:before {
form[role="dialog"] > section {
font-weight: lighter;
- font-size: 2.2rem;
+ font-size: 1.8rem;
color: #FAFAFA;
padding: 0 1.5rem;
-moz-box-sizing: padding-box;
@@ -74,7 +74,7 @@ form[role="dialog"] menu button::-moz-focus-inner {
}
form[role="dialog"] menu button {
width: 100%;
- height: 3.8rem;
+ height: 2.4rem;
margin: 0 0 1rem;
padding: 0 1.5rem;
-moz-box-sizing: border-box;
@@ -86,7 +86,7 @@ form[role="dialog"] menu button {
background: #fafafa url(../img/default.png) repeat-x left bottom/ auto 100%;
border: 0.1rem solid #a6a6a6;
border-radius: 0.3rem;
- font: 500 1.6rem/3.8rem 'MozTT', Sans-serif;
+ font: 500 1.2rem/2.4rem 'MozTT', Sans-serif;
color: #333;
text-align: center;
text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
@@ -202,3 +202,26 @@ form[role="dialog"] dl > dd {
overflow: hidden;
}
+/* input areas */
+input[type="text"],
+input[type="password"],
+input[type="email"],
+input[type="tel"],
+input[type="search"],
+input[type="url"],
+input[type="number"],
+textarea {
+ -moz-box-sizing: border-box;
+ display: block;
+ overflow: hidden;
+ width: 100%;
+ height: 3rem;
+ resize: none;
+ padding: 0 1rem;
+ font-size: 1.6rem;
+ line-height: 3rem;
+ border: 0.1rem solid #ccc;
+ border-radius: 0.3rem;
+ box-shadow: none; /* override the box-shadow from the system (performance issue) */
+ background: #fff url(input_areas/images/ui/shadow.png) repeat-x;
+}
[11/12] git commit: Merge branch 'master' of
github.com:zalun/cordova-plugin-dialogs into ff
Posted by st...@apache.org.
Merge branch 'master' of github.com:zalun/cordova-plugin-dialogs into ff
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/1dccb6bf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/1dccb6bf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/1dccb6bf
Branch: refs/heads/dev
Commit: 1dccb6bf30d948f7fc604b8b679ad32c4b9bc555
Parents: 5b2060f 77a73ec
Author: Steven Gill <st...@gmail.com>
Authored: Fri Oct 25 13:55:14 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Fri Oct 25 13:55:14 2013 -0700
----------------------------------------------------------------------
plugin.xml | 20 ++++
src/firefoxos/notification.js | 107 +++++++++++++++++
www/firefoxos/danger-press.png | Bin 0 -> 1015 bytes
www/firefoxos/danger.png | Bin 0 -> 1031 bytes
www/firefoxos/default.png | Bin 0 -> 1014 bytes
www/firefoxos/gradient.png | Bin 0 -> 3713 bytes
www/firefoxos/notification.css | 227 ++++++++++++++++++++++++++++++++++++
www/firefoxos/pattern.png | Bin 0 -> 6851 bytes
www/firefoxos/recommend.png | Bin 0 -> 1020 bytes
www/notification.js | 2 +-
10 files changed, 355 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/1dccb6bf/plugin.xml
----------------------------------------------------------------------