Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue #557, Issue #552 #613

Closed
wants to merge 3 commits into from

2 participants

@mlantz

@gtanner Added the missing button from the previous attempt at fixing Issue #557. @brentlintner fixed the eula, Issue #552, as well as the camera-cancel button.

Matt Lantz added some commits
Matt Lantz Issue #552
Quick z-index shift to avoid conflicting views.
0c47689
Matt Lantz Issue #557
Added cancel button to overlay window
00e7e37
@brentlintner

I cherry picked 0c47689 into next. Still waiting on comments from other commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 5, 2012
  1. Issue #552

    Matt Lantz authored
    Quick z-index shift to avoid conflicting views.
  2. Issue #557

    Matt Lantz authored
    Added cancel button to overlay window
Commits on Nov 28, 2012
  1. Merge branch 'next' of https://github.com/blackberry/Ripple-UI into b…

    Matt Lantz authored
    …ug-fixes
This page is out of date. Refresh to see the latest.
View
5 lib/client/platform/cordova/2.0.0/bridge/capture.js
@@ -18,11 +18,14 @@ var camera = ripple('ui/plugins/camera'),
event = ripple('event');
module.exports = {
- captureImage: function (success) {
+ captureImage: function (success, error, args) {
event.once("captured-image", function (uri, file) {
file.fullPath = uri;
success([file]);
});
+ event.once("image-capture-cancelled", function () {
+ error({code: "CAPTURE_NO_MEDIA_FILES"});
+ });
camera.show();
}
};
View
7 lib/client/ui/plugins/camera.js
@@ -19,6 +19,7 @@ var ui = ripple('ui'),
upload = document.getElementById('file-upload'),
select = document.getElementById('select-file'),
take = document.getElementById('take-file'),
+ optOut = document.getElementById('camera-cancel'),
result = document.getElementById("camera-result");
function getType() {
@@ -55,6 +56,12 @@ module.exports = {
event.trigger('captured-' + getType(), [result.firstChild.src, upload.files[0]]);
module.exports.hide();
});
+
+ optOut.addEventListener('click', function () {
+ console.log('capture-image cancelled');
+ event.trigger('image-capture-cancelled');
+ ui.hideOverlay("camera-window");
+ });
},
show: function (type) {
type = type || "image";
View
3  lib/client/ui/plugins/camera/overlay.html
@@ -24,5 +24,8 @@
<button id="take-file" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
<span class="ui-button-text">Use Selected File</span>
</button>
+ <button id="camera-cancel" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+ <span class="ui-button-text">Cancel</span>
+ </button>
</section>
</section>
Something went wrong with that request. Please try again.