Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16636 from wilsonpage/bug/975192
Browse files Browse the repository at this point in the history
Bug 975192 - [B2G][Camera] No option to cancel out of taking a new photo...
  • Loading branch information
wilsonpage committed Feb 26, 2014
2 parents 6003c31 + bfd634d commit d62991e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
5 changes: 5 additions & 0 deletions apps/camera/js/controllers/controls.js
Expand Up @@ -59,6 +59,11 @@ ControlsController.prototype.configure = function() {
this.controls.set('cancel', isCancellable);
this.controls.set('switchable', isSwitchable);
this.controls.set('mode', initialMode);

debug('cancelable: %s', isCancellable);
debug('switchable: %s', isSwitchable);
debug('gallery: %s', showGallery);
debug('mode: %s', initialMode);
};

ControlsController.prototype.disableButtons = function() {
Expand Down
12 changes: 2 additions & 10 deletions apps/camera/js/lib/setting.js
Expand Up @@ -14,12 +14,6 @@ var model = require('vendor/model');

module.exports = Setting;

/**
* Locals
*/

var noop = function() {};

// Mixin Model methods
model(Setting.prototype);

Expand Down Expand Up @@ -230,14 +224,12 @@ Setting.prototype.save = function() {
* @param {Function} done
* @public
*/
Setting.prototype.fetch = function(done) {
done = done || noop;
if (!this.get('persistent')) { return done(); }
Setting.prototype.fetch = function() {
if (!this.get('persistent')) { return; }
debug('fetch value key: %s', this.key);
var value = localStorage.getItem('setting:' + this.key);
debug('fetched %s value: %s', this.key, value);
if (value) { this.select(value, { silent: true }); }
done();
};

/**
Expand Down
6 changes: 2 additions & 4 deletions apps/camera/js/main.js
Expand Up @@ -21,7 +21,6 @@ require(['config/require', 'config'], function() {
var settings = new Settings(config.get());
var GeoLocation = require('lib/geo-location');
var Activity = require('lib/activity');
var allDone = require('lib/all-done');
var Storage = require('lib/storage');
var controllers = {
hud: require('controllers/hud'),
Expand Down Expand Up @@ -67,9 +66,8 @@ require(['config/require', 'config'], function() {

// Async jobs to be
// done before boot...
var done = allDone()(app.boot);
app.activity.check(done());
app.settings.fetch(done());
app.settings.fetch();
app.activity.check(app.boot);
});

require(['boot']);
Expand Down
4 changes: 1 addition & 3 deletions apps/camera/js/views/controls.js
Expand Up @@ -74,9 +74,7 @@ module.exports = View.extend({
'<a class="gallery-button test-gallery js-btn" name="gallery">' +
'<span class="icon-gallery rotates"></span>' +
'</a>' +
'<a class="cancel-pick test-cancel-pick js-btn" name="cancel">' +
'<span></span>' +
'</a>' +
'<a class="cancel-pick test-cancel-pick js-btn" name="cancel"></a>' +
'<span class="video-timer test-video-timer js-video-timer">00:00</span>' +
'</div>';
},
Expand Down
11 changes: 3 additions & 8 deletions apps/camera/style/controls.css
Expand Up @@ -66,24 +66,19 @@
* @recording=true
*/

.controls[cancel=true] .gallery-button,
.controls[recording=true] .gallery-button {
display: none;
}

/** Gallery Button Icon
---------------------------------------------------------*/

.gallery-button span {
/*background-image: url(images/grid.png);*/
}

/** Cancel Pick Button
---------------------------------------------------------*/

.cancel-pick {
display: none;
width: 100%;
height: 100%;
background: url(images/actionicon_cancel.png) center no-repeat;
}

/**
Expand All @@ -98,7 +93,7 @@
---------------------------------------------------------*/

.cancel-pick span {
background-image: url(images/actionicon_cancel.png);

}

/** Video Timer
Expand Down

0 comments on commit d62991e

Please sign in to comment.