Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:mozilla/f1 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rafrombrc committed Apr 22, 2011
2 parents 113cc88 + f3986c0 commit 91e7003
Show file tree
Hide file tree
Showing 21 changed files with 885 additions and 1,249 deletions.
20 changes: 11 additions & 9 deletions web/dev/1/scripts/Select.css
Expand Up @@ -5,30 +5,34 @@
.Select {
position:relative;
display: inline-block;
overflow: hidden;
padding-right: 15px;
z-index: 100;
border: 1px solid #A6AFB6;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset;
border: 1px solid #303030;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
height: 24px;
cursor: pointer;
background-color: white;
color: #e2e2e2;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #767676), color-stop(100%, #545454));
background-image: -moz-linear-gradient(center top , #767676 0%, #545454 100%);
text-align: left;
border-radius: 4px;
}

.Select.open {
overflow: visible;
padding-right: 0;
border: 0;
}

.Select ul {
list-style: none;
z-index: 100;
background-color: white;
}

.Select.open ul {
position: absolute;
top: -30px;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #767676), color-stop(100%, #545454));
background-image: -moz-linear-gradient(center top , #767676 0%, #545454 100%);
border: 1px solid gray;
}

Expand Down Expand Up @@ -59,7 +63,7 @@
.Select.open li.selected:hover,
.Select.open li:hover {
color:white;
background-color: #535F6D;
background-color: #2b2b2b;
}

.Select .triangle {
Expand All @@ -71,8 +75,6 @@
line-height: 24px;
padding: 0 2px;
z-index: 101;
color: #A6AFB6;
background-color: white;
background-image: url("/share/i/sprite.png");
background-position: center -362px;
background-repeat: no-repeat;
Expand Down
133 changes: 133 additions & 0 deletions web/dev/1/scripts/fakeStorage.js
@@ -0,0 +1,133 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Raindrop.
*
* The Initial Developer of the Original Code is
* Mozilla Messaging, Inc..
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* */

/*jslint indent: 2 */
/*global define: false, localStorage: false, location: false, console: false,
window: false */
"use strict";

/**
* This module sets up a localStorage storage provider, to allow dev/testing
* the UI without needing the chrome storage. It is only loaded if the
* page that includes it explicitly loads it, currently done by setting
* the URL fragment ID to #test.
*/

define(['dispatch'], function (dispatch) {

var sub = dispatch.sub,
dataStore = (localStorage.chromeTestStore &&
JSON.parse(localStorage.chromeTestStore)) || {},
origin = location.protocol + "//" + location.host,
subs;

// Helpers that deal with the target window subscriptions.
function targetPub(topic, data) {
dispatch.pub(topic, data);
}

function saveStore() {
localStorage.chromeTestStore = JSON.stringify(dataStore);
}

subs = {
panelReady: function () {
targetPub('shareState', {
status: 0,
open: true,
options: {
version: '0.7.2',
title: 'Firefox web browser',
description: 'All about firefox',
medium: null,
source: null,
url: 'http://www.mozilla.com/en-US/firefox/fx/',
canonicalUrl: null,
shortUrl: null,
previews: [{
http_url: 'http://mozcom-cdn.mozilla.net/img/firefox-100.jpg'
}],
siteName: '',
prefs: {
system: 'dev',
bookmarking: true,
use_accel_key: true
}
}
});
},

storeGet: function (key) {
var value = dataStore[key];
//JSON wants null.
if (value === undefined) {
value = null;
}
targetPub('storeGetReturn', {
key: key,
value: value
});
},

storeSet: function (data) {
dataStore[data.key] = data.value;
saveStore();
targetPub('storeNotifyChange', {
key: data.key,
value: data.value
});
},

storeRemove: function (key) {
delete dataStore[key];
saveStore();
targetPub('storeNotifyChange', {
key: key,
value: null
});
}
};

// register all events.
window.addEventListener('message', function (evt) {
if (evt.origin === origin) {
var message;
try {
message = JSON.parse(evt.data);
} catch (e) {
console.error('Could not JSON parse: ' + evt.data);
}

if (message && message.topic) {
if (subs[message.topic]) {
subs[message.topic](message.data);
} else {
// actually quite a few of these, uncomment if you want a play
// by play of topics going through the window.
//console.log("Unhandled topic: " + message.topic, message.data);
}
}
}
}, false);

});
8 changes: 4 additions & 4 deletions web/dev/1/scripts/services.js
Expand Up @@ -105,10 +105,10 @@ function (object) {
},
shareTypes: [{
type: 'public',
name: 'public'
name: 'Public timeline'
}, {
type: 'direct',
name: 'direct message',
name: 'Direct Message',
showTo: true,
toLabel: 'type in name of recipient'
}],
Expand Down Expand Up @@ -173,7 +173,7 @@ function (object) {
name: 'pape_max_auth_age',
value: 0
}
}),
}) /*, Commenting out google apps, yahoo and linked in for now
'googleapps.com': new EmailSvcBase('Google Apps', {
shareTypes: [{
type: 'direct',
Expand Down Expand Up @@ -238,7 +238,7 @@ function (object) {
'widgets/AccountPanel': 'widgets/AccountPanelLinkedIn',
'Contacts': 'ContactsLinkedIn'
}
})
}) */
},
domainList: [],

Expand Down
6 changes: 0 additions & 6 deletions web/dev/1/scripts/shareOptions.js
Expand Up @@ -51,16 +51,10 @@ define(['blade/url'], function (url) {
}
}

options.prefs = options.prefs || {};

if (!options.title) {
options.title = options.url;
}

if (!options.prefs.system) {
options.prefs.system = 'prod';
}

source = options.source;

//If the source is larger than ~4KB then it will exceed the GET size
Expand Down
7 changes: 0 additions & 7 deletions web/dev/1/scripts/storage.js
Expand Up @@ -30,13 +30,6 @@ define(['dispatch'], function (dispatch) {
callbacks = {},
store;

// Temporary workaround to allow separate tab of settings to still have
// access to the chrome storage. Not a good idea to do long term.
if (opener && !opener.closed && opener.require &&
(store = opener.require('storage'))) {
return store;
}

store = {
get: function (key, callback) {
var keyCallbacks;
Expand Down

0 comments on commit 91e7003

Please sign in to comment.