Merge branch 'develop' into bug/646614
Conflicts: linkdrop/lib/helpers.py
12
f1.spec.in
|
@ -30,8 +30,8 @@ BuildArch: noarch
|
|||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: python%{pyver}-devel python%{pyver}-setuptools
|
||||
BuildRequires: /usr/bin/rsync, /usr/bin/cut, /bin/sed, /usr/bin/awk
|
||||
BuildRequires: python%{pyver}-paste-deploy, python%{pyver}-paste-script
|
||||
BuildRequires: /usr/bin/rsync, /usr/bin/cut, /bin/sed, /usr/bin/awk, /usr/bin/make
|
||||
BuildRequires: %{f1_name_prefix}python%{pyver}-paste-deploy, %{f1_name_prefix}python%{pyver}-paste-script
|
||||
|
||||
Requires: python%{pyver}
|
||||
|
||||
|
@ -48,14 +48,22 @@ and love. F1 is made by Mozilla Messaging.
|
|||
%setup -q -n linkdrop-%{version}
|
||||
|
||||
%build
|
||||
export PYTHONPATH=$(pwd):%{f1_prefix}%{python_sitelib}:%{f1_prefix}%{python_sitearch}
|
||||
CFLAGS="%{optflags}" %{__python}%{pyver} setup.py build
|
||||
|
||||
%install
|
||||
export PYTHONPATH=$(pwd):%{f1_prefix}%{python_sitelib}:%{f1_prefix}%{python_sitearch}
|
||||
rm -rf %{buildroot}
|
||||
%{__python}%{pyver} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --prefix %{f1_prefix} --record=INSTALLED_FILES
|
||||
%{__install} -m 755 -d %{buildroot}%{_var}/www/f1
|
||||
rsync -a web/ %{buildroot}%{_var}/www/f1/
|
||||
|
||||
#XXX: Not ready yet
|
||||
#%check
|
||||
#export PYTHONPATH=$(pwd):%{f1_prefix}%{python_sitelib}:%{f1_prefix}%{python_sitearch}
|
||||
#%{__make} test NOSE="nosetests-%{python_version}" PYTHON="%{__python}%{pyver}"
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ from ConfigParser import ConfigParser
|
|||
from mako.lookup import TemplateLookup
|
||||
from pylons.configuration import PylonsConfig
|
||||
from pylons.error import handle_mako_error
|
||||
from paste.deploy.converters import asbool
|
||||
|
||||
import linkdrop.lib.app_globals as app_globals
|
||||
from linkdrop.config.routing import make_map
|
||||
|
@ -39,7 +38,7 @@ def load_environment(global_conf, app_conf):
|
|||
object
|
||||
"""
|
||||
config = PylonsConfig()
|
||||
|
||||
|
||||
# Pylons paths
|
||||
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
paths = dict(root=root,
|
||||
|
@ -63,7 +62,7 @@ def load_environment(global_conf, app_conf):
|
|||
|
||||
import linkdrop.lib.helpers as h
|
||||
config['pylons.h'] = h
|
||||
|
||||
|
||||
# Setup cache object as early as possible
|
||||
import pylons
|
||||
pylons.cache._push_object(config['pylons.app_globals'].cache)
|
||||
|
@ -78,5 +77,5 @@ def load_environment(global_conf, app_conf):
|
|||
|
||||
# CONFIGURATION OPTIONS HERE (note: all config options will override
|
||||
# any Pylons config options)
|
||||
|
||||
|
||||
return config
|
||||
|
|
|
@ -29,6 +29,7 @@ refer to the routes manual at http://routes.groovie.org/docs/
|
|||
"""
|
||||
from routes import Mapper
|
||||
|
||||
|
||||
def make_map(config):
|
||||
"""Create, configure and return the routes Mapper"""
|
||||
map = Mapper(directory=config['pylons.paths']['controllers'],
|
||||
|
@ -45,7 +46,8 @@ def make_map(config):
|
|||
map.connect('/docs', controller='docs', action="index")
|
||||
map.connect('/send', controller='send', action="send")
|
||||
map.connect('/account/get', controller='account', action="get")
|
||||
map.connect('/account/get/full', controller='account', action="get", domain="full")
|
||||
map.connect('/account/get/full', controller='account', action="get",
|
||||
domain="full")
|
||||
map.connect('/contacts/{domain}', controller='contacts', action="get")
|
||||
|
||||
map.connect('/{controller}/{action}')
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#
|
||||
|
||||
import logging
|
||||
import urllib, json
|
||||
import urllib
|
||||
import json
|
||||
from datetime import datetime
|
||||
from uuid import uuid1
|
||||
import hashlib
|
||||
|
@ -40,6 +41,7 @@ from linkoauth.base import AccessException
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountController(BaseController):
|
||||
"""
|
||||
Accounts
|
||||
|
@ -48,7 +50,7 @@ Accounts
|
|||
OAuth authorization api.
|
||||
|
||||
"""
|
||||
__api_controller__ = True # for docs
|
||||
__api_controller__ = True # for docs
|
||||
|
||||
def _create_account(self, domain, userid, username):
|
||||
acct_hash = hashlib.sha1(
|
||||
|
@ -107,6 +109,6 @@ OAuth authorization api.
|
|||
raise resp.exception
|
||||
|
||||
def _redirectException(self, e):
|
||||
err = urllib.urlencode([('error',str(e))])
|
||||
err = urllib.urlencode([('error', str(e))])
|
||||
url = config.get('oauth_failure').split('#')
|
||||
return redirect('%s?%s#%s' % (url[0], err, url[1]))
|
||||
|
|
|
@ -37,6 +37,7 @@ from linkdrop.lib.metrics import metrics
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ContactsController(BaseController):
|
||||
"""
|
||||
Contacts
|
||||
|
@ -45,8 +46,7 @@ Contacts
|
|||
A proxy for retrieving contacts from a service.
|
||||
|
||||
"""
|
||||
__api_controller__ = True # for docs
|
||||
|
||||
__api_controller__ = True # for docs
|
||||
|
||||
@api_response
|
||||
@json_exception_response
|
||||
|
@ -82,18 +82,17 @@ Max results to be returned per request, used with startindex for paging.
|
|||
Name of the group to return.
|
||||
"""),
|
||||
],
|
||||
response={'type': 'object', 'doc': 'Portable Contacts Collection'}
|
||||
)
|
||||
response={'type': 'object', 'doc': 'Portable Contacts Collection'})
|
||||
def get(self, domain):
|
||||
group = request.POST.get('group', None)
|
||||
startIndex = int(request.POST.get('startindex','0'))
|
||||
maxResults = int(request.POST.get('maxresults','25'))
|
||||
startIndex = int(request.POST.get('startindex', '0'))
|
||||
maxResults = int(request.POST.get('maxresults', '25'))
|
||||
account_data = request.POST.get('account', None)
|
||||
provider = get_provider(domain)
|
||||
if provider is None:
|
||||
error = {
|
||||
'message': "'domain' is invalid",
|
||||
'code': constants.INVALID_PARAMS
|
||||
'code': constants.INVALID_PARAMS,
|
||||
}
|
||||
return {'result': None, 'error': error}
|
||||
|
||||
|
@ -105,7 +104,7 @@ Name of the group to return.
|
|||
error = {'provider': domain,
|
||||
'message': ("not logged in or no user account "
|
||||
"for that domain"),
|
||||
'status': 401
|
||||
'status': 401,
|
||||
}
|
||||
return {'result': None, 'error': error}
|
||||
|
||||
|
@ -118,7 +117,7 @@ Name of the group to return.
|
|||
error = {'provider': domain,
|
||||
'message': ("not logged in or no user account "
|
||||
"for that domain"),
|
||||
'status': 401
|
||||
'status': 401,
|
||||
}
|
||||
result = None
|
||||
metrics.track(request, 'contacts-oauth-keys-missing',
|
||||
|
@ -127,7 +126,7 @@ Name of the group to return.
|
|||
error = {'provider': domain,
|
||||
'message': ("The service is temporarily unavailable "
|
||||
"- please try again later."),
|
||||
'status': 503
|
||||
'status': 503,
|
||||
}
|
||||
if e.debug_message:
|
||||
error['debug_message'] = e.debug_message
|
||||
|
|
|
@ -34,11 +34,12 @@ from pylons import config
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def reST_to_html_fragment(a_str):
|
||||
parts = core.publish_parts(
|
||||
source=a_str,
|
||||
writer_name='html')
|
||||
return parts['body_pre_docinfo']+parts['fragment']
|
||||
return parts['body_pre_docinfo'] + parts['fragment']
|
||||
|
||||
|
||||
def import_module(partname, fqname, parent):
|
||||
|
@ -54,7 +55,8 @@ def import_module(partname, fqname, parent):
|
|||
try:
|
||||
m = imp.load_module(fqname, fp, pathname, stuff)
|
||||
finally:
|
||||
if fp: fp.close()
|
||||
if fp:
|
||||
fp.close()
|
||||
if parent:
|
||||
setattr(parent, partname, m)
|
||||
return m
|
||||
|
@ -64,7 +66,7 @@ def getmodule(module_name):
|
|||
# XXX this should be generic and be able to discover controllers that
|
||||
# are loaded into a pylons app
|
||||
import linkdrop.controllers
|
||||
fqname = "linkdrop.controllers."+module_name
|
||||
fqname = "linkdrop.controllers." + module_name
|
||||
try:
|
||||
return import_module(module_name, fqname, linkdrop.controllers)
|
||||
except ImportError, e:
|
||||
|
@ -83,6 +85,7 @@ def getclass(module, classname):
|
|||
return None
|
||||
return class_
|
||||
|
||||
|
||||
class DocsController(BaseController):
|
||||
"""
|
||||
API Documentation
|
||||
|
@ -92,7 +95,7 @@ Returns structured information about the Raindrop API, for use in user
|
|||
interfaces that want to show an API reference.
|
||||
|
||||
"""
|
||||
__api_controller__ = True # for docs
|
||||
__api_controller__ = True # for docs
|
||||
|
||||
@api_response
|
||||
@json_exception_response
|
||||
|
@ -105,9 +108,7 @@ Returns a json object containing documentation
|
|||
""",
|
||||
response={'type': 'object',
|
||||
'doc': ('An object that describes the API '
|
||||
'methods and parameters.')}
|
||||
)
|
||||
|
||||
'methods and parameters.')})
|
||||
def index(self):
|
||||
# iterate through our routes and get the controller classes
|
||||
mapper = config['routes.map']
|
||||
|
@ -123,7 +124,7 @@ Returns a json object containing documentation
|
|||
action = module_names[module_name]['methods'].get(
|
||||
m.defaults['action'], None)
|
||||
if action:
|
||||
action.setdefault('routes',[]).append(m.routepath)
|
||||
action.setdefault('routes', []).append(m.routepath)
|
||||
continue
|
||||
|
||||
# this is the first hit for this controller import the
|
||||
|
@ -134,7 +135,7 @@ Returns a json object containing documentation
|
|||
if not module:
|
||||
continue
|
||||
|
||||
classname = module_name.title()+'Controller'
|
||||
classname = module_name.title() + 'Controller'
|
||||
class_ = getclass(module, classname)
|
||||
if not class_:
|
||||
continue
|
||||
|
@ -144,7 +145,7 @@ Returns a json object containing documentation
|
|||
class_data = {
|
||||
'controller': classname,
|
||||
'doc': doc,
|
||||
'methods': {}
|
||||
'methods': {},
|
||||
}
|
||||
for (name, method) in inspect.getmembers(class_):
|
||||
if name[0] == "_":
|
||||
|
@ -160,6 +161,6 @@ Returns a json object containing documentation
|
|||
module_names[module_name] = class_data
|
||||
action = class_data['methods'].get(m.defaults['action'], None)
|
||||
if action:
|
||||
action.setdefault('routes',[]).append(m.routepath)
|
||||
action.setdefault('routes', []).append(m.routepath)
|
||||
|
||||
return module_names
|
||||
|
|
|
@ -29,6 +29,7 @@ from webhelpers.html.builder import literal
|
|||
|
||||
from linkdrop.lib.base import BaseController
|
||||
|
||||
|
||||
class ErrorController(BaseController):
|
||||
"""Generates error documents as and when they are required.
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ Send
|
|||
The 'send' namespace is used to send updates to our supported services.
|
||||
|
||||
"""
|
||||
__api_controller__ = True # for docs
|
||||
__api_controller__ = True # for docs
|
||||
|
||||
@api_response
|
||||
@json_exception_response
|
||||
|
@ -71,7 +71,8 @@ Domain of service to share to (google.com for gmail, facebook.com, twitter.com)
|
|||
Message entered by user
|
||||
"""),
|
||||
api_arg('username', 'string', False, None, None, """
|
||||
Optional username, required if more than one account is configured for a domain.
|
||||
Optional username, required if more than one account is configured for """
|
||||
"""a domain.
|
||||
"""),
|
||||
api_arg('userid', 'string', False, None, None, """
|
||||
Optional userid, required if more than one account is configured for a domain.
|
||||
|
@ -103,8 +104,7 @@ Site provided description of the shared item, not supported by all services.
|
|||
api_arg('name', 'string', False, None, None, """
|
||||
"""),
|
||||
],
|
||||
response={'type': 'list', 'doc': 'raw data list'}
|
||||
)
|
||||
response={'type': 'list', 'doc': 'raw data list'})
|
||||
def send(self):
|
||||
result = {}
|
||||
error = None
|
||||
|
@ -121,14 +121,14 @@ Site provided description of the shared item, not supported by all services.
|
|||
if not domain:
|
||||
error = {
|
||||
'message': "'domain' is not optional",
|
||||
'code': constants.INVALID_PARAMS
|
||||
'code': constants.INVALID_PARAMS,
|
||||
}
|
||||
return {'result': result, 'error': error}
|
||||
provider = get_provider(domain)
|
||||
if provider is None:
|
||||
error = {
|
||||
'message': "'domain' is invalid",
|
||||
'code': constants.INVALID_PARAMS
|
||||
'code': constants.INVALID_PARAMS,
|
||||
}
|
||||
return {'result': result, 'error': error}
|
||||
|
||||
|
@ -139,7 +139,7 @@ Site provided description of the shared item, not supported by all services.
|
|||
error = {'provider': domain,
|
||||
'message': ("not logged in or no user "
|
||||
"account for that domain"),
|
||||
'status': 401
|
||||
'status': 401,
|
||||
}
|
||||
return {'result': result, 'error': error}
|
||||
|
||||
|
@ -172,7 +172,7 @@ Site provided description of the shared item, not supported by all services.
|
|||
error = {'provider': domain,
|
||||
'message': ("not logged in or no user account "
|
||||
"for that domain"),
|
||||
'status': 401
|
||||
'status': 401,
|
||||
}
|
||||
|
||||
metrics.track(request, 'send-oauth-keys-missing', domain=domain)
|
||||
|
@ -182,7 +182,7 @@ Site provided description of the shared item, not supported by all services.
|
|||
error = {'provider': domain,
|
||||
'message': ("The service is temporarily unavailable "
|
||||
"- please try again later."),
|
||||
'status': 503
|
||||
'status': 503,
|
||||
}
|
||||
if e.debug_message:
|
||||
error['debug_message'] = e.debug_message
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#
|
||||
|
||||
|
||||
# Guard the import of cProfile such that 2.4 people without lsprof can still use
|
||||
# this script.
|
||||
# Guard the import of cProfile such that 2.4 people without lsprof can still
|
||||
# use this script.
|
||||
try:
|
||||
from cProfile import Profile
|
||||
except ImportError:
|
||||
|
@ -32,6 +32,7 @@ except ImportError:
|
|||
except ImportError:
|
||||
from profile import Profile
|
||||
|
||||
|
||||
class ContextualProfile(Profile):
|
||||
""" A subclass of Profile that adds a context manager for Python
|
||||
2.5 with: statements and a decorator.
|
||||
|
@ -59,8 +60,8 @@ class ContextualProfile(Profile):
|
|||
self.disable()
|
||||
|
||||
def __call__(self, func):
|
||||
""" Decorate a function to start the profiler on function entry and stop
|
||||
it on function exit.
|
||||
""" Decorate a function to start the profiler on function entry and
|
||||
stop it on function exit.
|
||||
"""
|
||||
def f(*args, **kwds):
|
||||
self.enable_by_count()
|
||||
|
@ -80,11 +81,13 @@ class ContextualProfile(Profile):
|
|||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
self.disable_by_count()
|
||||
|
||||
|
||||
# avoid having to remove all @profile decorators if you want to do
|
||||
# a quick change to call profiling
|
||||
def profile_wrapper(func):
|
||||
from decorator import decorator
|
||||
_profiler = __builtin__.__dict__['_profiler'] # make pyflakes happy
|
||||
_profiler = __builtin__.__dict__['_profiler'] # make pyflakes happy
|
||||
|
||||
def wrap(_f, *args, **kwds):
|
||||
if _profiler:
|
||||
if not hasattr(_f, '_prof_wrapped'):
|
||||
|
@ -98,6 +101,7 @@ import __builtin__
|
|||
__builtin__.__dict__['_profiler'] = None
|
||||
__builtin__.__dict__['profile'] = profile_wrapper
|
||||
|
||||
|
||||
class ProfilerMiddleware():
|
||||
"""WSGI Middleware which profiles the subsequent handlers and outputs
|
||||
cachegrind files.
|
||||
|
@ -132,10 +136,10 @@ class ProfilerMiddleware():
|
|||
def __init__(self, app, g_config, config):
|
||||
self.app = app
|
||||
self.profile_type = config.get('type', 'call')
|
||||
self.profile_print = bool(int(config.get('pprint','0')))
|
||||
self.profile_print = bool(int(config.get('pprint', '0')))
|
||||
self.profile_sort = config.get('sort', 'time')
|
||||
self.profile_grind = bool(int(config.get('grind','0')))
|
||||
self.profile_builtin = bool(int(config.get('builtin','0')))
|
||||
self.profile_grind = bool(int(config.get('grind', '0')))
|
||||
self.profile_builtin = bool(int(config.get('builtin', '0')))
|
||||
self.profile_data_dir = config.get('dir', None)
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
|
@ -145,10 +149,12 @@ class ProfilerMiddleware():
|
|||
"""
|
||||
catch_response = []
|
||||
body = []
|
||||
|
||||
def replace_start_response(status, headers, exc_info=None):
|
||||
catch_response.extend([status, headers])
|
||||
start_response(status, headers, exc_info)
|
||||
return body.append
|
||||
|
||||
def run_app():
|
||||
app_iter = self.app(environ, replace_start_response)
|
||||
try:
|
||||
|
@ -164,7 +170,9 @@ class ProfilerMiddleware():
|
|||
except ImportError:
|
||||
calltree_enabled = False
|
||||
|
||||
import sys, os, time
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
pstat_fn = None
|
||||
cg_fn = None
|
||||
|
@ -233,6 +241,7 @@ class ProfilerMiddleware():
|
|||
data.close()
|
||||
return body
|
||||
|
||||
|
||||
def make_profile_middleware(app, global_conf, **kw):
|
||||
"""
|
||||
Wrap the application in a component that will profile each
|
||||
|
@ -240,6 +249,7 @@ def make_profile_middleware(app, global_conf, **kw):
|
|||
"""
|
||||
return ProfilerMiddleware(app, global_conf, kw)
|
||||
|
||||
|
||||
class DBGPMiddleware():
|
||||
"""WSGI Middleware which loads the PyDBGP debugger.
|
||||
|
||||
|
@ -274,9 +284,10 @@ class DBGPMiddleware():
|
|||
# breaks on the next executed line
|
||||
client.brk(self.host, self.port, self.idekey)
|
||||
|
||||
# we might want to do this, but you end up in some random middleware
|
||||
# and it's not the best experience. Instead, break here, go
|
||||
# set some breakpoints where you want to debug, the continue
|
||||
# we might want to do this, but you end up in some random
|
||||
# middleware and it's not the best experience. Instead, break
|
||||
# here, go set some breakpoints where you want to debug, the
|
||||
# continue
|
||||
|
||||
#c = client.backendCmd(self.idekey)
|
||||
#c.stdin_enabled = 0
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
from beaker.cache import CacheManager
|
||||
from beaker.util import parse_cache_config_options
|
||||
|
||||
|
||||
class Globals(object):
|
||||
"""Globals acts as a container for objects available throughout the
|
||||
life of the application
|
||||
|
|
|
@ -27,5 +27,6 @@ Provides the BaseController class for subclassing.
|
|||
"""
|
||||
from pylons.controllers import WSGIController
|
||||
|
||||
|
||||
class BaseController(WSGIController):
|
||||
pass
|
||||
|
|
|
@ -7,5 +7,3 @@ INVALID_REQUEST = -32600
|
|||
METHOD_NOT_FOUND = -32601
|
||||
INVALID_PARAMS = -32602
|
||||
INTERNAL_ERROR = -32603
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ from linkdrop.lib.metrics import metrics
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_redirect_response(url, code=302, additional_headers=[]):
|
||||
"""Raises a redirect exception to the specified URL
|
||||
|
||||
|
@ -54,20 +55,21 @@ def get_redirect_response(url, code=302, additional_headers=[]):
|
|||
"""
|
||||
exc = status_map[code]
|
||||
resp = exc(location=url)
|
||||
for k,v in additional_headers:
|
||||
for k, v in additional_headers:
|
||||
resp.headers.add(k, v)
|
||||
return resp
|
||||
|
||||
## {{{ http://code.activestate.com/recipes/52281/ (r1) PSF License
|
||||
import sgmllib, string
|
||||
import sgmllib
|
||||
import string
|
||||
|
||||
|
||||
class StrippingParser(sgmllib.SGMLParser):
|
||||
|
||||
# These are the HTML tags that we will leave intact
|
||||
valid_tags = ('b', 'a', 'i', 'br', 'p')
|
||||
|
||||
from htmlentitydefs import entitydefs # replace entitydefs from sgmllib
|
||||
entitydefs # make pyflakes happy
|
||||
from htmlentitydefs import entitydefs # replace entitydefs from sgmllib
|
||||
entitydefs # make pyflakes happy
|
||||
|
||||
def __init__(self):
|
||||
sgmllib.SGMLParser.__init__(self)
|
||||
|
@ -82,7 +84,7 @@ class StrippingParser(sgmllib.SGMLParser):
|
|||
self.result = "%s&#%s;" % (self.result, name)
|
||||
|
||||
def handle_entityref(self, name):
|
||||
if self.entitydefs.has_key(name):
|
||||
if name in self.entitydefs:
|
||||
x = ';'
|
||||
else:
|
||||
# this breaks unstandard entities that end with ';'
|
||||
|
@ -98,7 +100,7 @@ class StrippingParser(sgmllib.SGMLParser):
|
|||
and string.lower(v[0:10]) != 'javascript'):
|
||||
self.result = '%s %s="%s"' % (self.result, k, v)
|
||||
endTag = '</%s>' % tag
|
||||
self.endTagList.insert(0,endTag)
|
||||
self.endTagList.insert(0, endTag)
|
||||
self.result = self.result + '>'
|
||||
|
||||
def unknown_endtag(self, tag):
|
||||
|
@ -137,10 +139,11 @@ def json_exception_response(func, *args, **kwargs):
|
|||
'result': None,
|
||||
'error': {
|
||||
'name': e.__class__.__name__,
|
||||
'message': str(e)
|
||||
'message': str(e),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@decorator
|
||||
def api_response(func, *args, **kwargs):
|
||||
pylons = get_pylons(args)
|
||||
|
@ -151,18 +154,19 @@ def api_response(func, *args, **kwargs):
|
|||
pylons.response.headers['Content-Type'] = 'text/plain'
|
||||
return pprint.pformat(data)
|
||||
elif format == 'xml':
|
||||
|
||||
# a quick-dirty dict serializer
|
||||
def ser(d):
|
||||
r = ""
|
||||
for k,v in d.items():
|
||||
for k, v in d.items():
|
||||
if isinstance(v, dict):
|
||||
r += "<%s>%s</%s>" % (k, ser(v), k)
|
||||
elif isinstance(v, list):
|
||||
for i in v:
|
||||
#print k,i
|
||||
r += ser({k:i})
|
||||
r += ser({k: i})
|
||||
else:
|
||||
r += "<%s>%s</%s>" % (k, escape("%s"%v), k)
|
||||
r += "<%s>%s</%s>" % (k, escape("%s" % v), k)
|
||||
return r
|
||||
pylons.response.headers['Content-Type'] = 'text/xml'
|
||||
return ('<?xml version="1.0" encoding="UTF-8"?>'
|
||||
|
@ -171,6 +175,7 @@ def api_response(func, *args, **kwargs):
|
|||
res = json.dumps(data)
|
||||
return res
|
||||
|
||||
|
||||
def api_entry(**kw):
|
||||
"""Decorator to add tags to functions.
|
||||
"""
|
||||
|
@ -180,14 +185,17 @@ def api_entry(**kw):
|
|||
if not getattr(f, "__doc__") and 'doc' in kw:
|
||||
doc = kw['doc'] + "\n"
|
||||
if 'name' in kw:
|
||||
doc = kw['name'] + "\n" + "="*len(kw['name']) +"\n\n" + doc
|
||||
doc = kw['name'] + "\n" + "=" * len(kw['name']) + "\n\n" + doc
|
||||
args = []
|
||||
for m in kw.get('urlargs', []):
|
||||
line = " %(name)-20s %(type)-10s %(doc)s" % m
|
||||
opts = []
|
||||
if m['required']: opts.append("required")
|
||||
if m['default']: opts.append("default=%s" % m['default'])
|
||||
if m['allowed']: opts.append("options=%r" % m['allowed'])
|
||||
if m['required']:
|
||||
opts.append("required")
|
||||
if m['default']:
|
||||
opts.append("default=%s" % m['default'])
|
||||
if m['allowed']:
|
||||
opts.append("options=%r" % m['allowed'])
|
||||
if opts:
|
||||
line = "%s (%s)" % (line, ','.join(opts),)
|
||||
args.append(line)
|
||||
|
@ -196,9 +204,12 @@ def api_entry(**kw):
|
|||
for m in kw.get('queryargs', []):
|
||||
line = " %(name)-20s %(type)-10s %(doc)s" % m
|
||||
opts = []
|
||||
if m['required']: opts.append("required")
|
||||
if m['default']: opts.append("default=%s" % m['default'])
|
||||
if m['allowed']: opts.append("options=%r" % m['allowed'])
|
||||
if m['required']:
|
||||
opts.append("required")
|
||||
if m['default']:
|
||||
opts.append("default=%s" % m['default'])
|
||||
if m['allowed']:
|
||||
opts.append("options=%r" % m['allowed'])
|
||||
if opts:
|
||||
line = "%s (%s)" % (line, ','.join(opts),)
|
||||
args.append(line)
|
||||
|
@ -210,25 +221,29 @@ def api_entry(**kw):
|
|||
for m in kw['bodyargs']:
|
||||
line = " %(name)-20s %(type)-10s %(doc)s" % m
|
||||
opts = []
|
||||
if m['required']: opts.append("required")
|
||||
if m['default']: opts.append("default=%s" % m['default'])
|
||||
if m['allowed']: opts.append("options=%r" % m['allowed'])
|
||||
if m['required']:
|
||||
opts.append("required")
|
||||
if m['default']:
|
||||
opts.append("default=%s" % m['default'])
|
||||
if m['allowed']:
|
||||
opts.append("options=%r" % m['allowed'])
|
||||
if opts:
|
||||
line = "%s (%s)" % (line, ','.join(opts),)
|
||||
args.append(line)
|
||||
d = d+ ("**Request Body**: A JSON object with the "
|
||||
d = d + ("**Request Body**: A JSON object with the "
|
||||
"following fields:\n")
|
||||
d = d+ "\n".join(args) + "\n\n"
|
||||
d = d + "\n".join(args) + "\n\n"
|
||||
elif 'body' in kw:
|
||||
d = d+ ("**Request Body**: %(type)-10s %(doc)s\n\n"
|
||||
d = d + ("**Request Body**: %(type)-10s %(doc)s\n\n"
|
||||
% kw['body'])
|
||||
if 'response' in kw:
|
||||
d = d+ ("**Response Body**: %(type)-10s %(doc)s\n\n"
|
||||
d = d + ("**Response Body**: %(type)-10s %(doc)s\n\n"
|
||||
% kw['response'])
|
||||
f.__doc__ = doc + d
|
||||
return f
|
||||
return decorate
|
||||
|
||||
|
||||
def api_arg(name, type=None, required=False, default=None, allowed=None,
|
||||
doc=None):
|
||||
return {
|
||||
|
@ -237,11 +252,12 @@ def api_arg(name, type=None, required=False, default=None, allowed=None,
|
|||
'required': required,
|
||||
'default': default,
|
||||
'allowed': allowed,
|
||||
'doc': doc or ''
|
||||
'doc': doc or '',
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
|
||||
@api_entry(
|
||||
name="contacts",
|
||||
body={'type': "json", 'doc': "A json object"},
|
||||
|
@ -273,23 +289,23 @@ http://portablecontacts.net/draft-spec.html
|
|||
['equals', 'contains', 'startswith', 'present'],
|
||||
'Filter operation'),
|
||||
api_arg('filterValue', 'string', False, None, None,
|
||||
'A value to compare using filterOp (not used with present)'),
|
||||
'A value to compare using filterOp '
|
||||
'(not used with present)'),
|
||||
api_arg('startIndex', 'int', False, 0, None,
|
||||
'The start index of the query, used for paging'),
|
||||
api_arg('count', 'int', False, 20, None,
|
||||
'The number of results to return, used with paging'),
|
||||
api_arg('sortBy', 'string', False, 'ascending',
|
||||
['ascending','descending'],
|
||||
['ascending', 'descending'],
|
||||
'A list of conversation ids'),
|
||||
api_arg('sortOrder', 'string', False, 'ascending',
|
||||
['ascending','descending'], 'A list of conversation ids'),
|
||||
['ascending', 'descending'], 'A list of conversation ids'),
|
||||
api_arg('fields', 'list', False, None, None,
|
||||
'A list of fields to return'),
|
||||
],
|
||||
response={'type': 'object',
|
||||
'doc': ('An object that describes the API methods '
|
||||
'and parameters.')}
|
||||
)
|
||||
'and parameters.')})
|
||||
def foo():
|
||||
pass
|
||||
print foo.__doc__
|
||||
|
|
|
@ -29,9 +29,10 @@ from pylons import config
|
|||
import logging
|
||||
log = logging.getLogger('__name__')
|
||||
|
||||
|
||||
def shorten_link(long_url):
|
||||
longUrl = cgi.escape(long_url.encode('utf-8'))
|
||||
bitly_userid= config.get('bitly.userid')
|
||||
bitly_userid = config.get('bitly.userid')
|
||||
bitly_key = config.get('bitly.key')
|
||||
bitly_result = urllib.urlopen(
|
||||
"http://api.bit.ly/v3/shorten?"
|
||||
|
|
|
@ -8,6 +8,7 @@ from paste.httpheaders import ETAG
|
|||
|
||||
version_re = re.compile("/\d+.\d+.\d+/", re.U)
|
||||
|
||||
|
||||
class StaticURLParser(object):
|
||||
"""
|
||||
based on Paste.urlparser.StaticURLParser, however we handle an internal
|
||||
|
@ -51,8 +52,8 @@ class StaticURLParser(object):
|
|||
# @@: Cache?
|
||||
return self.__class__(full, root_directory=self.root_directory,
|
||||
version=self.version,
|
||||
cache_max_age=self.cache_max_age)(environ,
|
||||
start_response)
|
||||
cache_max_age=self.cache_max_age)(
|
||||
environ, start_response)
|
||||
if environ.get('PATH_INFO') and environ.get('PATH_INFO') != '/':
|
||||
return self.error_extra_path(environ, start_response)
|
||||
if_none_match = environ.get('HTTP_IF_NONE_MATCH')
|
||||
|
@ -64,7 +65,7 @@ class StaticURLParser(object):
|
|||
## ETAG.update(headers, '"%s"' % mytime)
|
||||
ETAG.update(headers, mytime)
|
||||
start_response('304 Not Modified', headers)
|
||||
return [''] # empty body
|
||||
return [''] # empty body
|
||||
|
||||
fa = self.make_app(full)
|
||||
if self.cache_max_age:
|
||||
|
@ -106,6 +107,7 @@ class StaticURLParser(object):
|
|||
def __repr__(self):
|
||||
return '<%s %r>' % (self.__class__.__name__, self.directory)
|
||||
|
||||
|
||||
def make_static(global_conf, document_root, cache_max_age=None, version="dev"):
|
||||
"""
|
||||
Return a WSGI application that serves a directory (configured
|
||||
|
@ -117,4 +119,3 @@ def make_static(global_conf, document_root, cache_max_age=None, version="dev"):
|
|||
cache_max_age = int(cache_max_age)
|
||||
return StaticURLParser(
|
||||
document_root, cache_max_age=cache_max_age, version=version)
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ for log_name in logging.getLogger().manager.loggerDict.keys():
|
|||
|
||||
environ = {}
|
||||
|
||||
|
||||
# Note the base for our test cases is *not* a unittest.TestCase as some
|
||||
# nose features don't work with such classes.
|
||||
class TestController(object):
|
||||
|
|
|
@ -61,8 +61,6 @@ from webob.exc import HTTPBadRequest
|
|||
from webob import Response
|
||||
|
||||
|
||||
|
||||
|
||||
random.seed()
|
||||
_RE_CODE = re.compile('[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}')
|
||||
|
||||
|
@ -526,6 +524,7 @@ def get_url(url, method='GET', data=None, user=None, password=None, timeout=5,
|
|||
|
||||
from wsgiref.util import is_hop_by_hop
|
||||
|
||||
|
||||
def proxy(request, scheme, netloc, timeout=5):
|
||||
"""Proxies and return the result from the other server.
|
||||
|
||||
|
|
|
@ -13,10 +13,8 @@ from nose.tools import eq_
|
|||
class TestContactsInvalidParams(TestController):
|
||||
def getFullRequest(self, *except_for):
|
||||
account = {"oauth_token": "foo", "oauth_token_secret": "bar",
|
||||
"profile": {"emails": [
|
||||
{'value': 'me@example.com'}
|
||||
],
|
||||
"displayName": "Me",
|
||||
"profile": {"emails": [{'value': 'me@example.com'}],
|
||||
"displayName": "Me",
|
||||
},
|
||||
}
|
||||
result = {'domain': 'google.com',
|
||||
|
@ -40,7 +38,7 @@ class TestContactsInvalidParams(TestController):
|
|||
domain=domain),
|
||||
params=request)
|
||||
|
||||
assert response.status_int==expected_http_code, response.status_int
|
||||
assert response.status_int == expected_http_code, response.status_int
|
||||
try:
|
||||
got = json.loads(response.body)
|
||||
except ValueError:
|
||||
|
@ -75,4 +73,3 @@ class TestContactsInvalidParams(TestController):
|
|||
def testMissingOAuth(self):
|
||||
for service in testable_services:
|
||||
yield self.checkMissingOAuth, service, "oauth_token"
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import json
|
|||
|
||||
from linkdrop.lib import constants
|
||||
|
||||
#from linkdrop.tests import *
|
||||
from linkdrop.tests import TestController
|
||||
from linkdrop.tests import testable_services
|
||||
from linkdrop.tests import url
|
||||
|
@ -14,9 +13,7 @@ from nose.tools import eq_
|
|||
class TestSendInvalidParams(TestController):
|
||||
def getFullRequest(self, *except_for):
|
||||
account = {"oauth_token": "foo", "oauth_token_secret": "bar",
|
||||
"profile": {"emails": [
|
||||
{'value': 'me@example.com'}
|
||||
],
|
||||
"profile": {"emails": [{'value': 'me@example.com'}],
|
||||
"displayName": "Me",
|
||||
},
|
||||
}
|
||||
|
@ -38,7 +35,7 @@ class TestSendInvalidParams(TestController):
|
|||
response = self.app.post(url(controller='send', action='send'),
|
||||
params=request)
|
||||
|
||||
assert response.status_int==expected_http_code, response.status_int
|
||||
assert response.status_int == expected_http_code, response.status_int
|
||||
try:
|
||||
got = json.loads(response.body)
|
||||
except ValueError:
|
||||
|
|
|
@ -10,11 +10,13 @@ from pprint import pformat
|
|||
from linkdrop.tests import TestController
|
||||
from linkdrop.tests import url
|
||||
|
||||
|
||||
def assert_dicts_equal(got, expected):
|
||||
if got != expected:
|
||||
raise AssertionError("\n%s\n!=\n%s" % (pformat(got),
|
||||
pformat(expected)))
|
||||
|
||||
|
||||
# Somewhat analogous to a protocap.ProtocolCapturingBase object - but
|
||||
# instead of capturing, it replays an earlier capture.
|
||||
# In general, the request we make to the service is ignored - we just
|
||||
|
@ -26,8 +28,10 @@ class ProtocolReplayer(object):
|
|||
def save_capture(self, reason=""):
|
||||
pass
|
||||
|
||||
|
||||
class HttpReplayer(ProtocolReplayer):
|
||||
to_playback = []
|
||||
|
||||
def request(self, *args, **kw):
|
||||
fp = self.to_playback.pop(0)
|
||||
resp = httplib.HTTPResponse(socket.socket())
|
||||
|
@ -38,8 +42,11 @@ class HttpReplayer(ProtocolReplayer):
|
|||
|
||||
|
||||
from linkoauth.google_ import SMTP
|
||||
|
||||
|
||||
class SmtpReplayer(SMTP, ProtocolReplayer):
|
||||
to_playback = None
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
self.next_playback = self.to_playback.readline()
|
||||
SMTP.__init__(self, *args, **kw)
|
||||
|
@ -49,9 +56,9 @@ class SmtpReplayer(SMTP, ProtocolReplayer):
|
|||
pass
|
||||
|
||||
def set_debuglevel(self, debuglevel):
|
||||
pass # don't want the print statements during testing.
|
||||
pass # don't want the print statements during testing.
|
||||
|
||||
def connect(self, host='localhost', port = 0):
|
||||
def connect(self, host='localhost', port=0):
|
||||
return self.getreply()
|
||||
|
||||
def _get_next_comms(self):
|
||||
|
@ -110,6 +117,7 @@ class CannedRequest(object):
|
|||
def __repr__(self):
|
||||
return "<canned request at '%s'>" % (self.path,)
|
||||
|
||||
|
||||
def genCanned(glob_pattern="*"):
|
||||
import linkdrop.tests.services
|
||||
corpus_dir = os.path.join(linkdrop.tests.services.__path__[0], 'corpus')
|
||||
|
@ -136,16 +144,16 @@ class ServiceReplayTestCase(TestController):
|
|||
# expected and expected-f1-data.json has what we want.
|
||||
pass
|
||||
else:
|
||||
assert response.status_int==expected['status'], (
|
||||
assert response.status_int == expected['status'], (
|
||||
response.status_int, expected['status'])
|
||||
for exp_header_name, exp_header_val in expected.get(
|
||||
'headers', {}).iteritems():
|
||||
got = response.headers.get(exp_header_name, None)
|
||||
assert got==exp_header_val, (got, exp_header_val)
|
||||
assert got == exp_header_val, (got, exp_header_val)
|
||||
return
|
||||
|
||||
# No expected-f1-response.json - do the expected-f1-data thang...
|
||||
assert response.status_int==200, response.status
|
||||
assert response.status_int == 200, response.status
|
||||
try:
|
||||
got = json.loads(response.body)
|
||||
except ValueError:
|
||||
|
@ -164,7 +172,7 @@ class ServiceReplayTestCase(TestController):
|
|||
if sub is None:
|
||||
continue
|
||||
for subname, subval in sub.items():
|
||||
if subval=="*":
|
||||
if subval == "*":
|
||||
# indicates any value is acceptable.
|
||||
assert subname in got[top], ("no attribute [%r][%r]"
|
||||
% (top, subname))
|
||||
|
@ -173,16 +181,16 @@ class ServiceReplayTestCase(TestController):
|
|||
assert_dicts_equal(got, expected)
|
||||
|
||||
def getResponse(self, req_type, request):
|
||||
if req_type=="send":
|
||||
if req_type == "send":
|
||||
response = self.app.post(url(controller='send', action='send'),
|
||||
params=request)
|
||||
elif req_type=="contacts":
|
||||
elif req_type == "contacts":
|
||||
# send the 'contacts' request.
|
||||
domain = request.pop('domain')
|
||||
response = self.app.post(url(controller='contacts',
|
||||
action='get', domain=domain),
|
||||
params=request)
|
||||
elif req_type=="auth":
|
||||
elif req_type == "auth":
|
||||
# this is a little gross - we need to hit "authorize"
|
||||
# direct, then assume we got redirected to the service,
|
||||
# which then redirected us back to 'verify'
|
||||
|
@ -205,12 +213,12 @@ class ServiceReplayTestCase(TestController):
|
|||
|
||||
class FacebookReplayTestCase(ServiceReplayTestCase):
|
||||
def getDefaultRequest(self, req_type):
|
||||
if req_type=="send" or req_type=="contacts":
|
||||
if req_type == "send" or req_type == "contacts":
|
||||
return {'domain': 'facebook.com',
|
||||
'account': ('{"oauth_token": "foo", '
|
||||
'"oauth_token_secret": "bar"}'),
|
||||
}
|
||||
if req_type=="auth":
|
||||
if req_type == "auth":
|
||||
return {'domain': 'facebook.com', 'username': 'foo',
|
||||
'userid': 'bar'}
|
||||
raise AssertionError(req_type)
|
||||
|
@ -218,7 +226,7 @@ class FacebookReplayTestCase(ServiceReplayTestCase):
|
|||
|
||||
class YahooReplayTestCase(ServiceReplayTestCase):
|
||||
def getDefaultRequest(self, req_type):
|
||||
if req_type=="send" or req_type=="contacts":
|
||||
if req_type == "send" or req_type == "contacts":
|
||||
account = {"oauth_token": "foo", "oauth_token_secret": "bar",
|
||||
"profile": {
|
||||
"verifiedEmail": "me@yahoo.com",
|
||||
|
@ -229,37 +237,33 @@ class YahooReplayTestCase(ServiceReplayTestCase):
|
|||
'to': 'you@example.com',
|
||||
'account': json.dumps(account),
|
||||
}
|
||||
if req_type=="auth":
|
||||
if req_type == "auth":
|
||||
return {'domain': 'yahoo.com', 'username': 'foo', 'userid': 'bar'}
|
||||
raise AssertionError(req_type)
|
||||
|
||||
|
||||
class GoogleReplayTestCase(ServiceReplayTestCase):
|
||||
def getDefaultRequest(self, req_type):
|
||||
if req_type=="send":
|
||||
if req_type == "send":
|
||||
account = {"oauth_token": "foo", "oauth_token_secret": "bar",
|
||||
"profile": {"emails": [
|
||||
{'value': 'me@example.com'}
|
||||
],
|
||||
"displayName": "Me",
|
||||
"profile": {"emails": [{'value': 'me@example.com'}],
|
||||
"displayName": "Me",
|
||||
},
|
||||
}
|
||||
return {'domain': 'google.com',
|
||||
'account':json.dumps(account),
|
||||
'account': json.dumps(account),
|
||||
'to': 'you@example.com',
|
||||
}
|
||||
if req_type=="contacts":
|
||||
if req_type == "contacts":
|
||||
account = {"oauth_token": "foo", "oauth_token_secret": "bar",
|
||||
"profile": {"emails": [
|
||||
{'value': 'me@example.com'}
|
||||
],
|
||||
"profile": {"emails": [{'value': 'me@example.com'}],
|
||||
"displayName": "Me",
|
||||
},
|
||||
}
|
||||
return {'username': 'me',
|
||||
'userid': '123',
|
||||
'keys': "1,2,3",
|
||||
'account':json.dumps(account),
|
||||
'account': json.dumps(account),
|
||||
'domain': 'google.com',
|
||||
}
|
||||
raise AssertionError(req_type)
|
||||
|
@ -296,13 +300,14 @@ def teardownReplayers():
|
|||
|
||||
|
||||
host_to_test = {
|
||||
'graph.facebook.com' : FacebookReplayTestCase,
|
||||
'graph.facebook.com': FacebookReplayTestCase,
|
||||
'www.google.com': GoogleReplayTestCase,
|
||||
'smtp.gmail.com': GoogleReplayTestCase,
|
||||
'mail.yahooapis.com': YahooReplayTestCase,
|
||||
'social.yahooapis.com': YahooReplayTestCase,
|
||||
}
|
||||
|
||||
|
||||
def queueForReplay(canned):
|
||||
if canned.protocol == "smtp":
|
||||
fname = os.path.join(canned.path, "smtp-trace")
|
||||
|
@ -320,6 +325,7 @@ def queueForReplay(canned):
|
|||
else:
|
||||
raise AssertionError(canned.protocol)
|
||||
|
||||
|
||||
def runOne(canned):
|
||||
testClass = host_to_test[canned.host]
|
||||
test = testClass()
|
||||
|
@ -332,6 +338,7 @@ def runOne(canned):
|
|||
finally:
|
||||
teardownReplayers()
|
||||
|
||||
|
||||
def testAll():
|
||||
for canned in genCanned():
|
||||
yield runOne, canned
|
||||
|
|
|
@ -30,6 +30,7 @@ from linkdrop.config.environment import load_environment
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_app(command, conf, vars):
|
||||
"""Place any commands to setup linkdrop here"""
|
||||
# Don't reload the app if it was loaded under the testing environment
|
||||
|
|
|
@ -11,8 +11,8 @@ import = %(here)s/private.ini
|
|||
smtp_server = localhost
|
||||
error_email_from = paste@localhost
|
||||
|
||||
oauth_failure = /0.3.5/auth.html#oauth_failure
|
||||
oauth_success = /0.3.5/auth.html#oauth_success
|
||||
oauth_failure = /0.3.7/auth.html#oauth_failure
|
||||
oauth_success = /0.3.7/auth.html#oauth_success
|
||||
|
||||
# Register with twitter at http://dev.twitter.com/apps/new
|
||||
oauth.twitter.com.request = https://twitter.com/oauth/request_token
|
||||
|
|
2
setup.py
|
@ -28,7 +28,7 @@ except ImportError:
|
|||
use_setuptools()
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION='0.3.5'
|
||||
VERSION='0.3.7'
|
||||
|
||||
setup(
|
||||
name='linkdrop',
|
||||
|
|
|
@ -11,8 +11,8 @@ import = %(here)s/private.ini
|
|||
smtp_server = localhost
|
||||
error_email_from = paste@localhost
|
||||
|
||||
oauth_failure = /0.3.5/auth.html#oauth_failure
|
||||
oauth_success = /0.3.5/auth.html#oauth_success
|
||||
oauth_failure = /0.3.7/auth.html#oauth_failure
|
||||
oauth_success = /0.3.7/auth.html#oauth_success
|
||||
|
||||
# Register with twitter at http://dev.twitter.com/apps/new
|
||||
oauth.twitter.com.request = https://twitter.com/oauth/request_token
|
||||
|
|
|
@ -24,27 +24,37 @@ while (my $line = <$f>) {
|
|||
}
|
||||
}
|
||||
|
||||
print STDERR Dumper (\%requires); use Data::Dumper;
|
||||
|
||||
my $requires = <<"EOF";
|
||||
# Automatically added from setup.py by $0
|
||||
EOF
|
||||
|
||||
# These are os-provided packages
|
||||
my %included = (
|
||||
'coverage' => 1,
|
||||
'httplib2' => 1,
|
||||
'nose' => 1,
|
||||
);
|
||||
|
||||
my %excluded = (
|
||||
'linkoauth' => 1,
|
||||
#XXX: Not ready yet
|
||||
'pylons' => 1,
|
||||
);
|
||||
|
||||
foreach my $req (sort keys %requires) {
|
||||
next if exists $excluded{$req};
|
||||
|
||||
my $reqs;
|
||||
|
||||
if (exists $included{$req}) {
|
||||
$req = "python%{pyver}-$req";
|
||||
$reqs = "python%{pyver}-$req";
|
||||
}
|
||||
else {
|
||||
$req = $prefix . $req;
|
||||
$reqs = $prefix . $req;
|
||||
}
|
||||
$requires .= <<"EOF";
|
||||
Requires: $req
|
||||
Requires: $reqs
|
||||
BuildRequires: $reqs
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- ***** 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):
|
||||
- -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Firefox Share OAuthorization</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
|
||||
<script src="/0.3.7/scripts/requireplugins-jquery.js" charset="utf-8"></script>
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
height: 100%;
|
||||
color: #0A0A0A;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.connecting {
|
||||
margin-top: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.connecting img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#oauth {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -150px;
|
||||
margin-top: -95px;
|
||||
width: 300px;
|
||||
background-image: url("/0.3.7/i/f1Logo.png");
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
padding: 100px 0 0 0;
|
||||
}
|
||||
|
||||
#oauth .text {
|
||||
display: block;
|
||||
margin: 0 0 7px 0;
|
||||
}
|
||||
|
||||
#oauth .subtext {
|
||||
margin-left: 7px;
|
||||
color: #666666;
|
||||
font-family: "Lucida Grande", Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.controls {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
button {
|
||||
height: 30px;
|
||||
border-width: 1px 1px 1px 0;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
|
||||
-moz-border-radius: 0 2px 2px 0;
|
||||
-webkit-border-radius: 0 2px 2px 0;
|
||||
border-radius: 0 2px 2px 0;
|
||||
|
||||
background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd));
|
||||
}
|
||||
|
||||
button:active {
|
||||
-moz-box-shadow: 0 0 1px #666666 inset;
|
||||
-webkit-box-shadow: 0 0 1px #666666 inset;
|
||||
box-shadow: 0 0 1px #666666 inset;
|
||||
|
||||
background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc));
|
||||
}
|
||||
|
||||
input {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
font-family: "Lucida Grande", Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
|
||||
-moz-border-radius: 2px 0 0 2px;
|
||||
-moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
-moz-box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25) inset, 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
input.google {
|
||||
background-image: url("/0.3.7/i/sprite.png");
|
||||
background-position: 5px -159px;
|
||||
background-repeat: no-repeat;
|
||||
padding: 0 0 0 26px;
|
||||
}
|
||||
|
||||
.hbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: horizontal;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.hbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: vertical;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.vbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
-webkit-box-direction: reverse;
|
||||
-moz-box-direction: reverse;
|
||||
box-direction: reverse;
|
||||
}
|
||||
|
||||
.boxFlex0 {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
}
|
||||
|
||||
.boxFlex1, .boxFlex {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.boxFlex2 {
|
||||
-webkit-box-flex: 2;
|
||||
-moz-box-flex: 2;
|
||||
box-flex: 2;
|
||||
}
|
||||
|
||||
.boxGroup1 {
|
||||
-webkit-box-flex-group: 1;
|
||||
-moz-box-flex-group: 1;
|
||||
box-flex-group: 1;
|
||||
}
|
||||
|
||||
.boxGroup2 {
|
||||
-webkit-box-flex-group: 2;
|
||||
-moz-box-flex-group: 2;
|
||||
box-flex-group: 2;
|
||||
}
|
||||
|
||||
.start {
|
||||
-webkit-box-pack: start;
|
||||
-moz-box-pack: start;
|
||||
box-pack: start;
|
||||
}
|
||||
|
||||
.end {
|
||||
-webkit-box-pack: end;
|
||||
-moz-box-pack: end;
|
||||
box-pack: end;
|
||||
}
|
||||
|
||||
.center {
|
||||
-webkit-box-pack: center;
|
||||
-moz-box-pack: center;
|
||||
box-pack: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
require(["require", "jquery", "blade/url", "services", "jquery.cookie"],
|
||||
function (require, $, url, services) {
|
||||
var target = window.location.href.split('#')[1];
|
||||
if (target && (target === 'oauth_success' || target === 'oauth_failure')) {
|
||||
|
||||
//TODO: ideally lock down the domain be location.hostname, but
|
||||
//a problem for 127 addresses?
|
||||
// XXX hacky way to handle fennec, since we didn't open a window,
|
||||
// catch the exception when using window.opener and redirect
|
||||
var data = {
|
||||
target: target,
|
||||
account: JSON.parse($.cookie("account_tokens"))
|
||||
};
|
||||
window.opener.postMessage(JSON.stringify(data), '*');
|
||||
// clear the cookie, we no longer want it around
|
||||
$.cookie("account_tokens", "", {"path": "/"});
|
||||
window.close();
|
||||
}
|
||||
|
||||
var search = window.location.href.split('?')[1];
|
||||
if (search) {
|
||||
search = search.split('#')[0];
|
||||
|
||||
var args = url.queryToObject(search),
|
||||
domain = args.domain;
|
||||
|
||||
$(function () {
|
||||
if (domain) {
|
||||
// add a force login param to the form if asked.
|
||||
if (args.forceLogin) {
|
||||
var forceLogin = services.domains[domain].forceLogin;
|
||||
if (forceLogin) {
|
||||
$('<input type="hidden" name="' +
|
||||
forceLogin.name +
|
||||
'" value="' + forceLogin.value + '">').appendTo('[name="authForm"]');
|
||||
}
|
||||
}
|
||||
|
||||
$("#domain").attr("value", args['domain']);
|
||||
|
||||
if (args['domain'] == 'googleapps.com') {
|
||||
// show UI for googleapp
|
||||
$('#oauth').removeClass('hidden');
|
||||
$('#message').addClass('hidden');
|
||||
$('#submitbtn').click(function (evt) {
|
||||
$('#oauth').addClass('hidden');
|
||||
$('#message').removeClass('hidden');
|
||||
document.authForm.submit();
|
||||
});
|
||||
} else {
|
||||
document.authForm.submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="settings">
|
||||
|
||||
<div id="oauth" class="authorize hidden">
|
||||
<form name="authForm" action="/api/account/authorize" method="POST">
|
||||
<input type="hidden" name="domain" id="domain" value="">
|
||||
<span class="text">Enter your Google Apps domain</span>
|
||||
<div class="controls hbox">
|
||||
<input class="boxFlex google" name="openid_identifier" id="openid_identifier" value="">
|
||||
<input class="boxFlex google" type="hidden" name="end_point_success" value="/0.3.7/auth.html#oauth_success">
|
||||
<input class="boxFlex google" type="hidden" name="end_point_auth_failure" value="/0.3.7/auth.html#oauth_failure">
|
||||
<button id='submitbtn' type="submit">submit</button>
|
||||
</div>
|
||||
<span class="subtext">ex: yourappdomain.com</span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div style="clear: both"/>
|
||||
</div>
|
||||
|
||||
<div id='message' class="connecting"><img src="i/loader-w.gif"> connecting...</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
({
|
||||
baseUrl: "scripts/",
|
||||
paths: {
|
||||
"index": "../index",
|
||||
"jquery": "requireplugins-jquery"
|
||||
},
|
||||
name: "index",
|
||||
exclude: ['jquery'],
|
||||
out: './index.js'
|
||||
})
|
После Ширина: | Высота: | Размер: 1.1 KiB |
После Ширина: | Высота: | Размер: 469 B |
После Ширина: | Высота: | Размер: 716 B |
После Ширина: | Высота: | Размер: 494 B |
После Ширина: | Высота: | Размер: 142 B |
После Ширина: | Высота: | Размер: 139 B |
После Ширина: | Высота: | Размер: 136 B |
После Ширина: | Высота: | Размер: 139 B |
После Ширина: | Высота: | Размер: 389 B |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 4.4 KiB |
После Ширина: | Высота: | Размер: 448 B |
После Ширина: | Высота: | Размер: 43 B |
После Ширина: | Высота: | Размер: 1.5 KiB |
После Ширина: | Высота: | Размер: 10 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 107 B |
После Ширина: | Высота: | Размер: 106 B |
После Ширина: | Высота: | Размер: 347 B |
После Ширина: | Высота: | Размер: 324 B |
После Ширина: | Высота: | Размер: 111 B |
После Ширина: | Высота: | Размер: 352 B |
После Ширина: | Высота: | Размер: 340 B |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 503 B |
После Ширина: | Высота: | Размер: 96 B |
После Ширина: | Высота: | Размер: 70 B |
После Ширина: | Высота: | Размер: 506 B |
После Ширина: | Высота: | Размер: 203 B |
После Ширина: | Высота: | Размер: 176 B |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 468 B |
После Ширина: | Высота: | Размер: 2.7 KiB |
После Ширина: | Высота: | Размер: 67 KiB |
После Ширина: | Высота: | Размер: 62 KiB |
После Ширина: | Высота: | Размер: 3.4 KiB |
После Ширина: | Высота: | Размер: 27 KiB |
После Ширина: | Высота: | Размер: 23 KiB |
После Ширина: | Высота: | Размер: 5.2 KiB |
После Ширина: | Высота: | Размер: 27 KiB |
После Ширина: | Высота: | Размер: 1.2 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 3.4 KiB |
После Ширина: | Высота: | Размер: 390 B |
После Ширина: | Высота: | Размер: 494 B |
|
@ -0,0 +1,172 @@
|
|||
<!-- ***** 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):
|
||||
- -->
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:og="http://opengraphprotocol.org/schema/"
|
||||
xmlns:fb="http://www.facebook.com/2008/fbml">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/0.3.7/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="/0.3.7/jquery.fancybox-1.3.4.css">
|
||||
<link rel="stylesheet" type="text/css" href="resource://ffshare/chrome/skin/web/installed.css">
|
||||
|
||||
<title>Mozilla F1</title>
|
||||
<script type="text/javascript" data-main="/0.3.7/index.js" src="/0.3.7/scripts/requireplugins-jquery.js"></script>
|
||||
<link rel="icon" type="image/x-icon" href="/0.3.7/favicon.png" />
|
||||
|
||||
<!-- https://github.com/mozilla/f1/wiki/Page-Meta-Properties -->
|
||||
|
||||
<link rel="shortlink" href="http://bit.ly/mozillaF1"/>
|
||||
<link rel="canonical" href="http://f1.mozillamessaging.com/"/>
|
||||
|
||||
<meta property="og:title" content="Mozilla F1"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:url" content="http://f1.mozillamessaging.com/"/>
|
||||
<meta property="og:image" content="http://f1.mozillamessaging.com/i/f1LogoVert.png"/>
|
||||
<meta property="og:site_name" content="Mozilla F1"/>
|
||||
<meta property="og:description"
|
||||
content="F1 is a browser extension that allows you to share links in a
|
||||
fast and fun way. Share links from within the browser, from any
|
||||
webpage, using the same services you already know and love."/>
|
||||
|
||||
<meta property="fb:app_id" content="173375079345318,146290642084944"/>
|
||||
|
||||
<meta name="title" content="Mozilla F1"/>
|
||||
<meta name="description"
|
||||
content="F1 is a browser extension that allows you to share links in a
|
||||
fast and fun way. Share links from within the browser, from any
|
||||
webpage, using the same services you already know and love."/>
|
||||
|
||||
<meta name="application-url" content="http://f1.mozillamessaging.com/"/>
|
||||
|
||||
<link rel="image_src" href="http://f1.mozillamessaging.com/i/f1LogoVert.png"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="header" class="row">
|
||||
<div class="c2 logo">
|
||||
/ <a href="http://mozillalabs.com/messaging/">F1 Blog »</a>
|
||||
</div>
|
||||
<div class="c1 dl">
|
||||
<button id="downloadFF4" class="download downloadXpi">
|
||||
Install Mozilla F1
|
||||
<span class="meta">available for Firefox 4 beta</span>
|
||||
</button>
|
||||
<button id="firefox" class="download">
|
||||
Get Firefox 4 beta to use <br>this add-on
|
||||
</button>
|
||||
<a id="no36" href="#info36">*Firefox 3.6 is no longer supported</a>
|
||||
<div id="noButtonFF4">
|
||||
<img src="/0.3.7/i/check.png"> status: installed
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row headline">
|
||||
<div class="c1 description">
|
||||
<h1>Share links fast.</h1>
|
||||
<h2>So, what’s F1?</h2>
|
||||
F1 is a browser extension that allows you to share links in a fast and fun way. Share links from within the browser, from any webpage, using the same services you already know and love. Mozilla F1 is made by Mozilla Messaging.
|
||||
<button class="fancybox">watch demo</button>
|
||||
</div>
|
||||
<div class="c2">
|
||||
<img src="/i/panel/f1panel.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<hr>
|
||||
<div class="c2 description">
|
||||
<img src="/i/panel/f1accounts.png">
|
||||
</div>
|
||||
<div class="c1 description">
|
||||
<h2>Share with your<br> favorite services</h2>
|
||||
With support for Facebook, Twitter, Gmail, Google Apps, Yahoo Mail and LinkedIn, we have your favorite services covered—and we're adding more services with every release.
|
||||
</div>
|
||||
</div>
|
||||
<div class="row about">
|
||||
<hr>
|
||||
<div class="c3 description">
|
||||
<h2>Once you've installed F1 sharing is as easy as...</h2>
|
||||
</div>
|
||||
<div class="c1 description steps">
|
||||
<span class="step">1</span> Hit the F1 icon in the URL bar
|
||||
<img src="i/panel/step-01.png">
|
||||
</div>
|
||||
<div class="c1 description steps">
|
||||
<span class="step">2</span> Choose your service in the menu
|
||||
<img src="i/panel/step-022.png">
|
||||
</div>
|
||||
<div class="c1 description steps">
|
||||
<span class="step">3</span> Express yourself and hit share!
|
||||
<img src="i/panel/step-03.png">
|
||||
</div>
|
||||
</div>
|
||||
<div id="info36" class="row">
|
||||
<div class="c3">
|
||||
<strong>*Firefox 3.6 support</strong>: F1 uses some advanced technology
|
||||
and UI capabilities that are not possible in Firefox 3.6 and earlier.
|
||||
If you installed the previous version of F1 that works with Firefox 3.6,
|
||||
it will continue to work while Firefox 4 is in beta. Once Firefox 4 is
|
||||
released, the older 3.6 compatible extension will be phased out.
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer" class="row">
|
||||
<div class="c3">
|
||||
<a href="http://mozillamessaging.com">Mozilla Messaging 2011</a> | <a href="/0.3.7/service/privacy.html">Privacy Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<iframe id="installFrame" src="/0.3.7/blank.html"></iframe>
|
||||
|
||||
<!-- START OF SmartSource Data Collector TAG -->
|
||||
<!-- Copyright (c) 1996-2011 WebTrends Inc. All rights reserved. -->
|
||||
<!-- Version: 9.3.0 -->
|
||||
<!-- Tag Builder Version: 3.1 -->
|
||||
<!-- Created: 3/15/2011 5:10:56 PM -->
|
||||
<script src="/0.3.7/scripts/webtrends.js" type="text/javascript"></script>
|
||||
<!-- ----------------------------------------------------------------------------------- -->
|
||||
<!-- Warning: The two script blocks below must remain inline. Moving them to an external -->
|
||||
<!-- JavaScript include file can cause serious problems with cross-domain tracking. -->
|
||||
<!-- ----------------------------------------------------------------------------------- -->
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var _tag=new WebTrends();
|
||||
_tag.dcsGetId();
|
||||
//]]>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
_tag.dcsCustom=function(){
|
||||
// Add custom parameters here.
|
||||
//_tag.DCSext.param_name=param_value;
|
||||
}
|
||||
_tag.dcsCollect();
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsjd66bq10000k73ngwoin8k_7d1l/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=9.3.0&WT.dcssip=www.mozillamessaging.com"/></div>
|
||||
</noscript>
|
||||
<!-- END OF SmartSource Data Collector TAG -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
define("hashDispatch",[],function(){return function(b){function g(){var i=location.href.split("#")[1]||"_default",l,f;f=i.indexOf(":");if(f!==-1){l=i.substring(f+1,i.length);i=i.substring(0,f)}if(i in b)b[i](l);else b._catchAll&&b._catchAll(i,l)}g();window.addEventListener("hashchange",g,false)}});
|
||||
(function(b){var g,i,l,f,x,m,D,o,A,B,r=0,e={},p=[],q=0,d={},n=[],F=null,u=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,z=0,v="",s,k,j=false,C=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){i.hide();u.onerror=u.onload=null;F&&F.abort();g.empty()},O=function(){if(false===e.onError(p,r,e)){i.hide();j=false}else{e.titleShow=false;e.width="auto";e.height="auto";g.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
|
||||
E()}},I=function(){var a=p[r],c,h,t,G,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(p,r,e);if(w===false)j=false;else{if(typeof w=="object")e=b.extend(e,w);t=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(t===""&&e.orig&&e.titleFromAlt)t=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
|
||||
c=="#")c=null;if(e.type){h=e.type;if(!c)c=e.content}else if(e.content)h="html";else if(c)h=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(h){if(h=="inline"){a=c.substr(c.indexOf("#"));h=b(a).length>0?"inline":"ajax"}e.type=h;e.href=c;e.title=t;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
|
||||
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);g.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(m.children())});switch(h){case "html":g.html(e.content);E();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){j=false;return}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(m.children())}).bind("fancybox-cancel",
|
||||
function(){b(this).replaceWith(g.children())});b(a).appendTo(g);E();break;case "image":j=false;b.fancybox.showActivity();u=new Image;u.onerror=function(){O()};u.onload=function(){j=true;u.onerror=u.onload=null;X()};u.src=c;break;case "swf":e.scrolling="no";G='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+'"></param>';P="";b.each(e.swf,function(y,H){G+='<param name="'+y+'" value="'+H+'"></param>';P+=" "+y+'="'+
|
||||
H+'"'});G+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";g.html(G);E();break;case "ajax":j=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;F=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(y){y.status>0&&O()},success:function(y,H,Q){if((typeof Q=="object"?Q:F).status==200){if(typeof e.ajax.win=="function"){w=e.ajax.win(c,y,H,Q);if(w===false){i.hide();return}else if(typeof w=="string"||typeof w==
|
||||
"object")y=w}g.html(y);E()}}}));break;case "iframe":R();break}}else O()}},E=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";g.wrapInner('<div style="width:'+a+";height:"+c+";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');
|
||||
e.width=g.width();e.height=g.height();R()},X=function(){e.width=u.width;e.height=u.height;b("<img />").attr({id:"fancybox-img",src:u.src,alt:e.title}).appendTo(g);R()},R=function(){var a,c;i.hide();if(f.is(":visible")&&false===d.onCleanup(n,q,d)){b.event.trigger("fancybox-cancel");j=false}else{j=true;b(m.add(l)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());n=p;q=r;d=e;if(d.overlayShow){l.css({"background-color":d.overlayColor,
|
||||
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!l.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});l.show()}}else l.hide();k=Y();Z();if(f.is(":visible")){b(D.add(A).add(B)).hide();a=f.position();s={top:a.top,left:a.left,width:f.width(),height:f.height()};c=s.width==k.width&&s.height==
|
||||
k.height;m.fadeTo(d.changeFade,0.3,function(){var h=function(){m.html(g.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");m.empty().removeAttr("filter").css({"border-width":d.padding,width:k.width-d.padding*2,height:e.autoDimensions?"auto":k.height-z-d.padding*2});if(c)h();else{C.prop=0;b(C).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:h})}})}else{f.removeAttr("style");m.css("border-width",d.padding);if(d.transitionIn=="elastic"){s=V();m.html(g.contents());
|
||||
f.show();if(d.opacity)k.opacity=0;C.prop=0;b(C).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&z>0&&o.show();m.css({width:k.width-d.padding*2,height:e.autoDimensions?"auto":k.height-z-d.padding*2}).html(g.contents());f.css(k).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},$=function(a){if(a&&a.length){if(d.titlePosition=="float")return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+
|
||||
a+'</td><td id="fancybox-title-float-right"></td></tr></table>';return'<div id="fancybox-title-'+d.titlePosition+'">'+a+"</div>"}return false},Z=function(){v=d.title||"";z=0;o.empty().removeAttr("style").removeClass();if(d.titleShow!==false){v=b.isFunction(d.titleFormat)?d.titleFormat(v,n,q,d):$(v);if(!(!v||v==="")){o.addClass("fancybox-title-"+d.titlePosition).html(v).appendTo("body").show();switch(d.titlePosition){case "inside":o.css({width:k.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
|
||||
z=o.outerHeight(true);o.appendTo(x);k.height+=z;break;case "over":o.css({marginLeft:d.padding,width:k.width-d.padding*2,bottom:d.padding}).appendTo(x);break;case "float":o.css("left",parseInt((o.width()-k.width-40)/2,10)*-1).appendTo(f);break;default:o.css({width:k.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f);break}}}o.hide()},aa=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();
|
||||
b.fancybox.close()}else if((a.keyCode==37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&n.length>1||q!==0)A.show();if(d.cyclic&&n.length>1||q!=n.length-1)B.show()}else{A.hide();B.hide()}},S=function(){if(!b.support.opacity){m.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&
|
||||
m.css("height","auto");f.css("height","auto");v&&v.length&&o.show();d.showCloseButton&&D.show();aa();d.hideOnContentClick&&m.bind("click",b.fancybox.close);d.hideOnOverlayClick&&l.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+
|
||||
e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(m);f.show();j=false;b.fancybox.center();d.onComplete(n,q,d);ba()},ba=function(){var a,c;if(n.length-1>q){a=n[q+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(q>0){a=n[q-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(s.width+(k.width-s.width)*a,10),height:parseInt(s.height+(k.height-s.height)*a,10),top:parseInt(s.top+(k.top-s.top)*a,10),left:parseInt(s.left+(k.left-
|
||||
s.left)*a,10)};if(typeof k.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);m.css({width:c.width-d.padding*2,height:c.height-z*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},Y=function(){var a=U(),c={},h=d.autoScale,t=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+t;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*
|
||||
parseFloat(d.height)/100,10):d.height+t;if(h&&(c.width>a[0]||c.height>a[1]))if(e.type=="image"||e.type=="swf"){h=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-t)/h+t,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-t)*h+t,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},ca=function(a){var c=a.offset();
|
||||
c.top+=parseInt(a.css("paddingTop"),10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){a=ca(a);c={width:a.width+d.padding*2,height:a.height+d.padding*2,top:a.top-d.padding-20,left:a.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+
|
||||
a[0]*0.5,10)}}return c},da=function(){if(i.is(":visible")){b("div",i).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!j){j=true;b(this).blur();p=[];r=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")p.push(this);else{p=b("a[rel="+c+"], area[rel="+c+"]");r=p.index(this)}I()}});return this};
|
||||
b.fancybox=function(a,c){if(!j){j=true;c=typeof c!=="undefined"?c:{};p=[];r=parseInt(c.index,10)||0;if(b.isArray(a)){for(var h=0,t=a.length;h<t;h++)if(typeof a[h]=="object")b(a[h]).data("fancybox",b.extend({},c,a[h]));else a[h]=b({}).data("fancybox",b.extend({content:a[h]},c));p=jQuery.merge(p,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},c,a));else a=b({}).data("fancybox",b.extend({content:a},c));p.push(a)}if(r>p.length||r<0)r=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);
|
||||
i.show();K=setInterval(da,66)};b.fancybox.hideActivity=function(){i.hide()};b.fancybox.next=function(){return b.fancybox.pos(q+1)};b.fancybox.prev=function(){return b.fancybox.pos(q-1)};b.fancybox.pos=function(a){if(!j){a=parseInt(a);p=n;if(a>-1&&a<n.length){r=a;I()}else if(d.cyclic&&n.length>1){r=a>=n.length?0:n.length-1;I()}}};b.fancybox.cancel=function(){if(!j){j=true;b.event.trigger("fancybox-cancel");N();e.onCancel(p,r,e);j=false}};b.fancybox.close=function(){function a(){l.fadeOut("fast");o.empty().hide();
|
||||
f.hide();b.event.trigger("fancybox-cleanup");m.empty();d.onClosed(n,q,d);n=e=[];q=r=0;d=e={};j=false}if(!(j||f.is(":hidden"))){j=true;if(d&&false===d.onCleanup(n,q,d))j=false;else{N();b(D.add(A).add(B)).hide();b(m.add(l)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");m.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&o.empty();f.stop();if(d.transitionOut=="elastic"){s=V();var c=
|
||||
f.position();k={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)k.opacity=1;o.empty().hide();C.prop=1;b(C).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){l.is(":visible")&&l.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,h;if(!j){h=a===true?1:0;c=U();!h&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-
|
||||
20,c[3]+(c[1]-m.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-m.width()-40)*0.5-d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(g=b('<div id="fancybox-tmp"></div>'),i=b('<div id="fancybox-loading"><div></div></div>'),l=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));x=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
|
||||
x.append(m=b('<div id="fancybox-content"></div>'),D=b('<a id="fancybox-close"></a>'),o=b('<div id="fancybox-title"></div>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));D.click(b.fancybox.close);i.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});
|
||||
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(j)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){i.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(x)}}};
|
||||
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
|
||||
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);define("jquery.fancybox-1.3.4",function(){});
|
||||
define("index",["require","jquery","hashDispatch","jquery.fancybox-1.3.4"],function(b,g){g(function(){var i=!!navigator.buildID,l=i&&navigator.userAgent.match(/Firefox\/([^\s]+)/);if(i&&l){l=parseFloat(l[1]);i=l>3.99}if(!i){g("#downloadFF4").hide();g("#no36").show();g("#info36").show();g("#firefox").show()}g(".fancybox").fancybox({type:"iframe",href:"http://player.vimeo.com/video/21374067?title=0&byline=0&portrait=0&autoplay=true",width:700,height:468,autoScale:false,autoDimensions:false});
|
||||
g("body").delegate("#firefox","click",function(){location="http://www.mozilla.com/en-US/firefox/beta/"}).delegate(".downloadXpi","click",function(f){var x=location.href;location=x.indexOf("staging")!==-1||x.indexOf("linkdrop")!==-1?"/ffshare.xpi":"https://addons.mozilla.org/services/install.php?addon_id=252539&addon_name=F1%20by%20Mozilla%20Labs&src=external-f1home";f.preventDefault()})})});
|
|
@ -0,0 +1,359 @@
|
|||
/*
|
||||
* FancyBox - jQuery Plugin
|
||||
* Simple and fancy lightbox alternative
|
||||
*
|
||||
* Examples and documentation at: http://fancybox.net
|
||||
*
|
||||
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
||||
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
||||
*
|
||||
* Version: 1.3.4 (11/11/2010)
|
||||
* Requires: jQuery v1.3+
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
#fancybox-loading {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-top: -20px;
|
||||
margin-left: -20px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
z-index: 1104;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-loading div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 40px;
|
||||
height: 480px;
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
}
|
||||
|
||||
#fancybox-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-tmp {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-wrap {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 20px 10px 10px 20px;
|
||||
z-index: 1101;
|
||||
outline: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-outer {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#fancybox-content {
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 1102;
|
||||
border: 0px solid #fff;
|
||||
}
|
||||
|
||||
#fancybox-hide-sel-frame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
z-index: 1101;
|
||||
}
|
||||
|
||||
#fancybox-close {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -25px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: transparent url('i/fancybox/fancybox.png') -40px 0px;
|
||||
cursor: pointer;
|
||||
z-index: 1103;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-error {
|
||||
color: #444;
|
||||
font: normal 12px/20px Arial;
|
||||
padding: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#fancybox-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
line-height: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#fancybox-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#fancybox-left, #fancybox-right {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
height: 100%;
|
||||
width: 35%;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
background: transparent url('i/fancybox/blank.gif');
|
||||
z-index: 1102;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fancybox-left {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#fancybox-right {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#fancybox-left-ico, #fancybox-right-ico {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -9999px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
cursor: pointer;
|
||||
z-index: 1102;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#fancybox-left-ico {
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -30px;
|
||||
}
|
||||
|
||||
#fancybox-right-ico {
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -60px;
|
||||
}
|
||||
|
||||
#fancybox-left:hover, #fancybox-right:hover {
|
||||
visibility: visible; /* IE6 */
|
||||
}
|
||||
|
||||
#fancybox-left:hover span {
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
#fancybox-right:hover span {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.fancybox-bg {
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#fancybox-bg-n {
|
||||
top: -20px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-image: url('i/fancybox/fancybox-x.png');
|
||||
}
|
||||
|
||||
#fancybox-bg-ne {
|
||||
top: -20px;
|
||||
right: -20px;
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -162px;
|
||||
}
|
||||
|
||||
#fancybox-bg-e {
|
||||
top: 0;
|
||||
right: -20px;
|
||||
height: 100%;
|
||||
background-image: url('i/fancybox/fancybox-y.png');
|
||||
background-position: -20px 0px;
|
||||
}
|
||||
|
||||
#fancybox-bg-se {
|
||||
bottom: -20px;
|
||||
right: -20px;
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -182px;
|
||||
}
|
||||
|
||||
#fancybox-bg-s {
|
||||
bottom: -20px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-image: url('i/fancybox/fancybox-x.png');
|
||||
background-position: 0px -20px;
|
||||
}
|
||||
|
||||
#fancybox-bg-sw {
|
||||
bottom: -20px;
|
||||
left: -20px;
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -142px;
|
||||
}
|
||||
|
||||
#fancybox-bg-w {
|
||||
top: 0;
|
||||
left: -20px;
|
||||
height: 100%;
|
||||
background-image: url('i/fancybox/fancybox-y.png');
|
||||
}
|
||||
|
||||
#fancybox-bg-nw {
|
||||
top: -20px;
|
||||
left: -20px;
|
||||
background-image: url('i/fancybox/fancybox.png');
|
||||
background-position: -40px -122px;
|
||||
}
|
||||
|
||||
#fancybox-title {
|
||||
font-family: Helvetica;
|
||||
font-size: 12px;
|
||||
z-index: 1102;
|
||||
}
|
||||
|
||||
.fancybox-title-inside {
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fancybox-title-outside {
|
||||
padding-top: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fancybox-title-over {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: #FFF;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#fancybox-title-over {
|
||||
padding: 10px;
|
||||
background-image: url('i/fancybox/fancy_title_over.png');
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fancybox-title-float {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -20px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
#fancybox-title-float-wrap {
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#fancybox-title-float-wrap td {
|
||||
border: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#fancybox-title-float-left {
|
||||
padding: 0 0 0 15px;
|
||||
background: url('i/fancybox/fancybox.png') -40px -90px no-repeat;
|
||||
}
|
||||
|
||||
#fancybox-title-float-main {
|
||||
color: #FFF;
|
||||
line-height: 29px;
|
||||
font-weight: bold;
|
||||
padding: 0 0 3px 0;
|
||||
background: url('i/fancybox/fancybox-x.png') 0px -40px;
|
||||
}
|
||||
|
||||
#fancybox-title-float-right {
|
||||
padding: 0 0 0 15px;
|
||||
background: url('i/fancybox/fancybox.png') -55px -90px no-repeat;
|
||||
}
|
||||
|
||||
/* IE6 */
|
||||
|
||||
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_close.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_nav_left.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_nav_right.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
|
||||
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_left.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_main.png', sizingMethod='scale'); }
|
||||
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_title_right.png', sizingMethod='scale'); }
|
||||
|
||||
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
||||
height: expression(this.parentNode.clientHeight + "px");
|
||||
}
|
||||
|
||||
#fancybox-loading.fancybox-ie6 {
|
||||
position: absolute; margin-top: 0;
|
||||
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
||||
}
|
||||
|
||||
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_loading.png', sizingMethod='scale'); }
|
||||
|
||||
/* IE6, IE7, IE8 */
|
||||
|
||||
.fancybox-ie .fancybox-bg { background: transparent !important; }
|
||||
|
||||
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
|
||||
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Autocomplete test</title>
|
||||
<script src="../scripts/requireplugins-jquery.js"></script>
|
||||
<script src="../scripts/jquery-ui-1.8.7.min.js"></script>
|
||||
<script>
|
||||
var options = {
|
||||
a: [
|
||||
'alpha',
|
||||
'amature'
|
||||
],
|
||||
b: [
|
||||
'bass',
|
||||
'bicycle'
|
||||
]
|
||||
},
|
||||
options2 = [
|
||||
'alpha',
|
||||
'amature',
|
||||
'bass',
|
||||
'bicycle'
|
||||
];
|
||||
|
||||
//HTML5-style autocomplete, does not do want is desired though.
|
||||
$(function () {
|
||||
var ac = $('.ac')[0],
|
||||
dynamic = $('#dynamic')[0];
|
||||
|
||||
$('body').delegate('.ac', 'input', function (evt) {
|
||||
var value = ac.value,
|
||||
args = value.split(','),
|
||||
others = args.slice(0, args.length - 1).join(',') || '',
|
||||
last = args[args.length - 1],
|
||||
list = options[last.charAt(0)],
|
||||
html = '';
|
||||
|
||||
if (list) {
|
||||
list.forEach(function (item) {
|
||||
html += '<option value="' + (others ? others + ',' : '') + item + '">' + (others ? others + ',' : '') + item + '</option>';
|
||||
})
|
||||
dynamic.innerHTML = html;
|
||||
}
|
||||
|
||||
console.log("INPUT: ", evt);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form>
|
||||
<input class="ac" list="dynamic" name="dynamicAc">
|
||||
<datalist id="dynamic">
|
||||
</datalist>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
После Ширина: | Высота: | Размер: 17 KiB |
После Ширина: | Высота: | Размер: 607 B |
После Ширина: | Высота: | Размер: 302 B |
После Ширина: | Высота: | Размер: 235 B |
|
@ -0,0 +1,581 @@
|
|||
/* ***** 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):
|
||||
* */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
position: relative;
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: top;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 11px;
|
||||
font-family: "lucida grande";
|
||||
max-height: 128px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
background-position: bottom center;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #515151;
|
||||
}
|
||||
|
||||
#twitter, #facebook, #gmail, #settings {
|
||||
/* background-image: -moz-linear-gradient(top, #d0d0d0 0%, #a8a8a8 100%); */
|
||||
background-color: #a7a7a7;
|
||||
/*
|
||||
border-top: 1px solid #515151;
|
||||
-moz-box-shadow: 0 2px 0 -1px #e3e3e3 inset;
|
||||
*/
|
||||
}
|
||||
|
||||
ul.nav {
|
||||
-moz-box-shadow:0 2px 0 -1px #CDCDCD inset;
|
||||
background-color:#A7A7A7;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
ul.nav .username {
|
||||
font-size: 11px;
|
||||
line-height: 24px;
|
||||
padding: 0 10px;
|
||||
margin: 4px 10px;
|
||||
border-left: 1px dotted #888;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul.nav .username img {
|
||||
border: 1px solid #fff;
|
||||
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.25);
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
ul.nav .username .userId {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 0 #bbb;
|
||||
}
|
||||
|
||||
ul.nav .navWrap {
|
||||
width: 960px;
|
||||
/*
|
||||
background-image: url("i/logo.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
*/
|
||||
position: relative;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
}
|
||||
|
||||
ul.nav li {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
list-style-type: none;
|
||||
margin: 3px 0;
|
||||
font-size: 11px;
|
||||
line-height: 24px;
|
||||
background-image: -moz-linear-gradient(center top , #FDFDFD 0%, #AAAAAA 100%);
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
-moz-box-shadow: 0 1px 0 #CDCDCD;
|
||||
}
|
||||
|
||||
ul.nav li:hover {
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected {
|
||||
background-image: -moz-linear-gradient(center top , #bbb 0%, #aaa 100%);
|
||||
-moz-box-shadow: 0 0 3px #666 inset,0 1px 0 #CDCDCD;
|
||||
}
|
||||
|
||||
ul.nav li:first-child {
|
||||
z-index: 1;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(2) {
|
||||
z-index: 2;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(3) {
|
||||
z-index: 1;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
ul.nav li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li a.icon {
|
||||
width: 36px;
|
||||
height: 24px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.nav li a.icon.twitter {
|
||||
background-image: url("../share/i/twitterIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.facebook {
|
||||
background-image: url("../share/i/facebookIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.gmail {
|
||||
background-image: url("../share/i/gmailIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.settings {
|
||||
background-image: url("../share/i/settingsIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li.debug {
|
||||
position: absolute;
|
||||
right: 46px;
|
||||
top: 0;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.nav li.debug span.name {
|
||||
display: block;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.debug a.icon {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
ul.nav li.settings,
|
||||
ul.nav li.settings.ui-tabs-selected {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
-moz-border-radius: 3px;
|
||||
}
|
||||
|
||||
ul.nav li.settings:hover span.name,
|
||||
ul.nav li.settings.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected {
|
||||
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.icon,
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
ul.nav span.name {
|
||||
display: block;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.twitter,
|
||||
ul.nav li:hover a.twitter {
|
||||
background-image: url("../share/i/twitterIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.facebook,
|
||||
ul.nav li:hover a.facebook {
|
||||
background-image: url("../share/i/facebookIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.gmail,
|
||||
ul.nav li:hover a.gmail {
|
||||
background-image: url(".../share/i/gmailIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
div.user {
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.user.inactive {
|
||||
opacity: 0.5;
|
||||
background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed;
|
||||
-moz-border-radius: 1%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.user .username {
|
||||
color: #444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.image {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
height: 71px;
|
||||
padding: 4px;
|
||||
border: 1px solid #999;
|
||||
margin: 0 5px 0 0;
|
||||
-moz-border-radius: 3px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
div.thumb {
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
height: 61px;
|
||||
width: 90px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul.info {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
font-size: 11px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
.info .description {
|
||||
color: #000;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.thumb .title {
|
||||
color: #3B5998;
|
||||
text-decoration: underline;
|
||||
font-size: small;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thumb .description {
|
||||
color: #808080;
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 2px 15px;
|
||||
font-family: "helvetica neue", helvetica, arial, sans-serif;
|
||||
font-size: 11px;
|
||||
line-height:24px;
|
||||
background-image: -moz-linear-gradient(top,#fdfdfd 0%,#aaa 100%);
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #5C5C5C #888 #666;
|
||||
-moz-border-radius: 3px;
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.share {
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
-moz-box-shadow: 0 1px 0 #cdcdcd;
|
||||
border-left: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
button:hover, button:active {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
*/
|
||||
|
||||
button:active {
|
||||
-moz-box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 0 3px rgba(0,0,0,0.75) inset;
|
||||
}
|
||||
|
||||
textarea, input[type="text"] {
|
||||
-moz-box-shadow: 0 2px 2px -2px #555 inset, 0 1px 0 #cdcdcd;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #5c5c5c #929292 #929292;
|
||||
font-family: "lucida grande"
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
-moz-border-radius: 3px;
|
||||
}
|
||||
|
||||
textarea.message {
|
||||
min-height: 71px;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
textarea:focus, input[type="text"]:focus {
|
||||
|
||||
}
|
||||
|
||||
.inputs {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
height: 26px;
|
||||
width: 238px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
input[type="text"]#to {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.entry {
|
||||
padding: 5px 0;
|
||||
width: 960px;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
position: relative;
|
||||
min-height: 71px;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation {
|
||||
padding: 1px 5px;
|
||||
-moz-border-radius: 10px;
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%);
|
||||
border: 1px solid #bebebe;
|
||||
color: green;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
bottom: 5px;
|
||||
z-index: 1;
|
||||
color: green;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#settings .entry ul li {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#settings .entry ul li button {
|
||||
margin: 0 10px 0 0;
|
||||
width: 128px;
|
||||
}
|
||||
|
||||
.entry h1 {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
/* hbox and vbox classes */
|
||||
|
||||
.hbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: horizontal;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.hbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: vertical;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.vbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
-webkit-box-direction: reverse;
|
||||
-moz-box-direction: reverse;
|
||||
box-direction: reverse;
|
||||
}
|
||||
|
||||
.boxFlex0 {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
}
|
||||
|
||||
.boxFlex1, .boxFlex {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.boxFlex2 {
|
||||
-webkit-box-flex: 2;
|
||||
-moz-box-flex: 2;
|
||||
box-flex: 2;
|
||||
}
|
||||
|
||||
.boxGroup1 {
|
||||
-webkit-box-flex-group: 1;
|
||||
-moz-box-flex-group: 1;
|
||||
box-flex-group: 1;
|
||||
}
|
||||
|
||||
.boxGroup2 {
|
||||
-webkit-box-flex-group: 2;
|
||||
-moz-box-flex-group: 2;
|
||||
box-flex-group: 2;
|
||||
}
|
||||
|
||||
.start {
|
||||
-webkit-box-pack: start;
|
||||
-moz-box-pack: start;
|
||||
box-pack: start;
|
||||
}
|
||||
|
||||
.end {
|
||||
-webkit-box-pack: end;
|
||||
-moz-box-pack: end;
|
||||
box-pack: end;
|
||||
}
|
||||
|
||||
.center {
|
||||
-webkit-box-pack: center;
|
||||
-moz-box-pack: center;
|
||||
box-pack: center;
|
||||
}
|
||||
/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
|
||||
/* clearfix */
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<!-- ***** 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):
|
||||
- -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="nativeShare.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#tabs").tabs(/* { fx: { opacity: 'toggle', duration: 0 } } */);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ui-tabs .ui-tabs-hide { display: none; }
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="tabs" class="tabs-left">
|
||||
|
||||
<ul class="nav clearfix">
|
||||
<div class="navWrap clearfix">
|
||||
<li><a class="icon twitter" title="share on twitter" href="#twitter"><span class="name">Twitter</span></a></li>
|
||||
<li><a class="icon facebook" title="share on facebook" href="#facebook"><span class="name">Facebook</span></a></li>
|
||||
<li><a class="icon gmail" title="share on Gmail" href="#gmail"><span class="name">Gmail</span></a></li>
|
||||
<li class="settings"><a class="icon settings" href="#settings"><span class="name"><img src="i/settings.png"></span></a></li>
|
||||
<div class="username"><img src="i/bryanAvatar.jpg"><span class="userId">@clarkbw</span></div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div id="twitter">
|
||||
<div class="entry hbox">
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="facebook">
|
||||
<div class="entry hbox">
|
||||
<div class="thumbnail">
|
||||
<div class="thumb"></div>
|
||||
<ul class="info">
|
||||
<li class="title">Title</li>
|
||||
<li class="description">Description</li>
|
||||
</ul>
|
||||
</div>
|
||||
<textarea class="message boxFlex"></textarea>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gmail">
|
||||
<div class="entry hbox">
|
||||
<div class="inputs">
|
||||
<input id="to" type="text" value="to"/>
|
||||
<input id="subject" type="text" value="subject"/>
|
||||
</div>
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="settings">
|
||||
<div class="entry">
|
||||
<h1>Settings</h1>
|
||||
<ul>
|
||||
<li><button>Add Twitter</button></li>
|
||||
<li><button>Add Facebook</button></li>
|
||||
<li><button>Add GMail</button></li>
|
||||
<li><button>Add FFFFound</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,630 @@
|
|||
/* ***** 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):
|
||||
* */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
position: relative;
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: top;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 11px;
|
||||
font-family: "lucida grande";
|
||||
max-height: 128px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
background-position: bottom center;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
color: #00A0FF;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #777;
|
||||
background-color: #ddd;
|
||||
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
|
||||
background-image:-moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%);
|
||||
}
|
||||
|
||||
#twitter, #facebook, #gmail, #settings {
|
||||
}
|
||||
|
||||
ul.nav {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
ul.nav .username {
|
||||
font-size: 11px;
|
||||
line-height: 24px;
|
||||
padding: 0 10px;
|
||||
margin: 4px 10px;
|
||||
border-left: 1px dotted #888;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul.nav .username img {
|
||||
border: 1px solid #fff;
|
||||
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.25);
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
ul.nav .username .userId {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
/* text-shadow: 1px 1px 0 #bbb; */
|
||||
}
|
||||
|
||||
ul.nav .navWrap {
|
||||
position: relative;
|
||||
/*
|
||||
width: 960px;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
*/
|
||||
}
|
||||
|
||||
ul.nav li {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
list-style-type: none;
|
||||
margin: 3px 0;
|
||||
font-size: 11px;
|
||||
line-height: 24px;
|
||||
background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%);
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
-moz-box-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
ul.nav li:hover {
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected {
|
||||
-moz-box-shadow:0 0 1px #666666 inset, 0 1px 0 #FFFFFF;
|
||||
background-image:-moz-linear-gradient(center top , #EEEEEE 0%, #CCCCCC 100%);
|
||||
}
|
||||
|
||||
ul.nav li:first-child {
|
||||
z-index: 1;
|
||||
-moz-border-radius: 2px 0 0 2px;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(2) {
|
||||
z-index: 2;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(3) {
|
||||
z-index: 1;
|
||||
-moz-border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
ul.nav li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li a.icon {
|
||||
width: 36px;
|
||||
height: 24px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.nav li a.icon.twitter {
|
||||
background-image: url("../share/i/twitterIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.facebook {
|
||||
background-image: url("../share/i/facebookIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.gmail {
|
||||
background-image: url("../share/i/gmailIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.settings {
|
||||
background-image: url("../share/i/settingsIcon.png");
|
||||
}
|
||||
|
||||
ul.nav li.debug {
|
||||
position: absolute;
|
||||
right: 46px;
|
||||
top: 0;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.nav li.debug span.name {
|
||||
display: block;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.debug a.icon {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
ul.nav li.settings,
|
||||
ul.nav li.settings.ui-tabs-selected {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
-moz-border-radius: 2px;
|
||||
}
|
||||
|
||||
ul.nav li.settings:hover span.name,
|
||||
ul.nav li.settings.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.icon,
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
ul.nav span.name {
|
||||
display: block;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.twitter,
|
||||
ul.nav li:hover a.twitter {
|
||||
background-image: url("../share/i/twitterIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.facebook,
|
||||
ul.nav li:hover a.facebook {
|
||||
background-image: url("../share/i/facebookIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.gmail,
|
||||
ul.nav li:hover a.gmail {
|
||||
background-image: url("../share/i/gmailIconColor.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
div.user {
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.user.inactive {
|
||||
opacity: 0.5;
|
||||
background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed;
|
||||
-moz-border-radius: 1%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.user .username {
|
||||
color: #444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.image {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
height: 71px;
|
||||
padding: 4px;
|
||||
border: 1px solid #bbb;
|
||||
margin: 0 5px 0 0;
|
||||
-moz-border-radius: 2px;
|
||||
background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #DDDDDD 100%);
|
||||
}
|
||||
|
||||
div.thumb {
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
height: 61px;
|
||||
width: 90px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul.info {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
font-size: 11px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
.info .description {
|
||||
color: #444;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.thumb .title {
|
||||
color: #3B5998;
|
||||
text-decoration: underline;
|
||||
font-size: small;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thumb .description {
|
||||
color: #808080;
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 2px 15px;
|
||||
background-image: -moz-linear-gradient(center top , #FAFAFA 0%, #DDDDDD 100%);
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
-moz-border-radius: 2px;
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
-moz-box-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
button.share {
|
||||
-moz-border-radius: 0 2px 2px 0;
|
||||
border-left: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
button:active {
|
||||
background-image: -moz-linear-gradient(center top , #EEEEEE 0%, #CCCCCC 100%);
|
||||
-moz-box-shadow:0 0 1px #666666 inset, 0 1px 0 #FFFFFF;
|
||||
}
|
||||
|
||||
textarea, input[type="text"] {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
font-family: "lucida grande"
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
-moz-border-radius: 2px;
|
||||
-moz-box-shadow:0 3px 3px -3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
textarea.message {
|
||||
min-height: 71px;
|
||||
-moz-border-radius: 2px 0 0 2px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
textarea:focus, input[type="text"]:focus {
|
||||
}
|
||||
|
||||
.inputs {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
height: 26px;
|
||||
width: 238px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
input[type="text"]#to {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.entry {
|
||||
padding: 5px 10px;
|
||||
width: 100%;
|
||||
/*
|
||||
width: 960px;
|
||||
left: 50%;
|
||||
margin-left: -480px;
|
||||
*/
|
||||
position: relative;
|
||||
min-height: 71px;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation {
|
||||
padding: 1px 5px;
|
||||
-moz-border-radius: 10px;
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%);
|
||||
border: 1px solid #bebebe;
|
||||
color: green;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
bottom: 5px;
|
||||
z-index: 1;
|
||||
color: green;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#settings .entry ul {
|
||||
min-width: 660px;
|
||||
}
|
||||
|
||||
#settings .entry ul li {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 220px;
|
||||
min-height: 71px;
|
||||
}
|
||||
|
||||
#settings .entry ul li:nth-child(1) {
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#settings .entry ul li:nth-child(2) {
|
||||
padding: 0 10px 0;
|
||||
}
|
||||
|
||||
#settings .entry ul li:nth-child(3) {
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
#settings .entry ul li button {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
#settings .entry ul li h1 {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.entry h1 {
|
||||
font-weight: bold;
|
||||
margin: 0 0 5px 0;
|
||||
color: #0a0a0a;
|
||||
padding: 5px 0 0 0;
|
||||
/* border-top: 1px dotted #888; */
|
||||
}
|
||||
|
||||
.entry h1 a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.entry h1 img {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
#settings .entry .settings {
|
||||
width: 253px;
|
||||
margin: 0 0 0 10px;
|
||||
padding: 0 0 0 10px;
|
||||
border-left: 1px dotted #888;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#settings .entry .success {
|
||||
width: 100%;
|
||||
line-height: 24px;
|
||||
color: #54B851;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#settings .entry .success span.check {
|
||||
width: 24px;
|
||||
background-color: #54B851;
|
||||
color: #fff;
|
||||
-moz-border-radius: 12px;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
/* hbox and vbox classes */
|
||||
|
||||
.hbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: horizontal;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.hbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: vertical;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.vbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
-webkit-box-direction: reverse;
|
||||
-moz-box-direction: reverse;
|
||||
box-direction: reverse;
|
||||
}
|
||||
|
||||
.boxFlex0 {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
}
|
||||
|
||||
.boxFlex1, .boxFlex {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.boxFlex2 {
|
||||
-webkit-box-flex: 2;
|
||||
-moz-box-flex: 2;
|
||||
box-flex: 2;
|
||||
}
|
||||
|
||||
.boxGroup1 {
|
||||
-webkit-box-flex-group: 1;
|
||||
-moz-box-flex-group: 1;
|
||||
box-flex-group: 1;
|
||||
}
|
||||
|
||||
.boxGroup2 {
|
||||
-webkit-box-flex-group: 2;
|
||||
-moz-box-flex-group: 2;
|
||||
box-flex-group: 2;
|
||||
}
|
||||
|
||||
.start {
|
||||
-webkit-box-pack: start;
|
||||
-moz-box-pack: start;
|
||||
box-pack: start;
|
||||
}
|
||||
|
||||
.end {
|
||||
-webkit-box-pack: end;
|
||||
-moz-box-pack: end;
|
||||
box-pack: end;
|
||||
}
|
||||
|
||||
.center {
|
||||
-webkit-box-pack: center;
|
||||
-moz-box-pack: center;
|
||||
box-pack: center;
|
||||
}
|
||||
/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
|
||||
/* clearfix */
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- ***** 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):
|
||||
- -->
|
||||
<html>
|
||||
<head>
|
||||
<title>F1</title>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="neutralShare.css">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#tabs").tabs({ fx: { opacity: 'toggle', duration: 200 } });
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.ui-tabs .ui-tabs-hide { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="tabs" class="tabs-left">
|
||||
|
||||
<ul class="nav clearfix">
|
||||
<div class="navWrap clearfix">
|
||||
<li><a class="icon twitter" title="share on twitter" href="#twitter"><span class="name">Twitter</span></a></li>
|
||||
<li><a class="icon facebook" title="share on facebook" href="#facebook"><span class="name">Facebook</span></a></li>
|
||||
<li><a class="icon gmail" title="share on Gmail" href="#gmail"><span class="name">Gmail</span></a></li>
|
||||
<li class="settings"><a class="icon settings" href="#settings"><span class="name"><img src="i/settings.png"></span></a></li>
|
||||
<div class="username"><img src="i/bryanAvatar.jpg"><span class="userId">@clarkbw</span></div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div id="twitter">
|
||||
<div class="entry hbox">
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="facebook">
|
||||
<div class="entry hbox">
|
||||
<div class="thumbnail">
|
||||
<div class="thumb"></div>
|
||||
<ul class="info">
|
||||
<li class="title">Title</li>
|
||||
<li class="description">Description</li>
|
||||
</ul>
|
||||
</div>
|
||||
<textarea class="message boxFlex"></textarea>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gmail">
|
||||
<div class="entry hbox">
|
||||
<div class="inputs">
|
||||
<input id="to" type="text" value="to"/>
|
||||
<input id="subject" type="text" value="subject"/>
|
||||
</div>
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button class="share">share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="settings">
|
||||
<div class="entry hbox">
|
||||
<ul class="boxFlex">
|
||||
<li>
|
||||
<h1><img src="../share/i/twitterIcon.png"> Twitter</h1>
|
||||
<button>Add Twitter</button>
|
||||
</li>
|
||||
<li>
|
||||
<h1><img src="../share/i/facebookIcon.png"> Facebook</h1>
|
||||
<button>Add Facebook</button>
|
||||
</li>
|
||||
<li>
|
||||
<h1><img src="../share/i/gmailIcon.png"> Gmail - <a href="#">manage</a> | <a href="#">add account</a></h1>
|
||||
<div class="success">
|
||||
<span title="gmail is properly configured!" class="check">✔</span> 3 accounts configured
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="settings">
|
||||
<h1>Advanced settings</h1>
|
||||
Don't see what you need? Try the <a href="#">account manager</a> to get into the nitty gritty.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,568 @@
|
|||
/* ***** 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):
|
||||
* */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
position: relative;
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: top;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 14px;
|
||||
font-family: "helvetica neue", helvetica, arial, sans-serif;
|
||||
max-height: 128px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
background-position: bottom center;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
-moz-box-shadow: 0 -5px 2px -4px #DDDDDD inset;
|
||||
height: 125px;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #ccc;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
ul.nav {
|
||||
background-image: url("i/background.gif");
|
||||
-moz-box-shadow: 0 -2px 3px rgba(0,0,0,0.5) inset;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
ul.nav .username {
|
||||
height: 24px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
position: absolute;
|
||||
right: 35px;
|
||||
top: 6px;
|
||||
}
|
||||
|
||||
ul.nav .username img {
|
||||
border: 1px solid #fff;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
ul.nav .navWrap {
|
||||
width: 962px;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
margin-left:-481px;
|
||||
border-left: 1px solid #222;
|
||||
border-right: 1px solid #222;
|
||||
}
|
||||
|
||||
ul.nav li {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
list-style-type: none;
|
||||
background-color: #444;
|
||||
margin: 10px 0 0 0px;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-moz-box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
ul.nav li:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(n+2) {
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(1) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(2) {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
ul.nav li:nth-child(3) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
ul.nav li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li a.icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0 5px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.nav li a.icon.twitter {
|
||||
background-image: url("../share/i/twitter_w.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.facebook {
|
||||
background-image: url("../share/i/facebook_w.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.gmail {
|
||||
background-image: url("../share/i/gmail_w.png");
|
||||
}
|
||||
|
||||
ul.nav li a.icon.settings {
|
||||
background-image: url("i/settings.png");
|
||||
background-position: top left;
|
||||
}
|
||||
|
||||
ul.nav li.debug {
|
||||
position: absolute;
|
||||
right: 46px;
|
||||
top: 0;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.nav li.debug span.name {
|
||||
display: block;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.debug a.icon {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
ul.nav li.settings,
|
||||
ul.nav li.settings.ui-tabs-selected {
|
||||
position: absolute;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
-moz-box-shadow: none;
|
||||
right: 15px;
|
||||
top: 0;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.nav li.settings:hover span.name,
|
||||
ul.nav li.settings.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected {
|
||||
background-color: #fff;
|
||||
background-image: -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%);
|
||||
width: 128px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
ul.nav li a.icon,
|
||||
ul.nav li span.name {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.icon,
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ul.nav li span.name {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected span.name {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
ul.nav span.name {
|
||||
display: block;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected.settings {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected.settings span.name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.twitter {
|
||||
background-image: url(".../share/i/twitter_b.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.facebook {
|
||||
background-image: url("../share/i/facebook_b.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a.gmail {
|
||||
background-image: url("../share/i/gmail_b.png");
|
||||
}
|
||||
|
||||
ul.nav li.ui-tabs-selected a {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td.user {
|
||||
width: 140px;
|
||||
padding-right: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td.thumb {
|
||||
width: 220px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
td.message {
|
||||
width: 300px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
td.button {
|
||||
padding: 1px 20px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
div.user {
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.user.inactive {
|
||||
opacity: 0.5;
|
||||
background: -moz-repeating-linear-gradient(top left -45deg, #aaa, #aaa 5px, #fff 5px, #fff 10px) #aaa no-repeat fixed;
|
||||
-moz-border-radius: 1%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.user .username {
|
||||
color: #444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.image {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
div.thumb {
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
height: 71px;
|
||||
width: 90px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
ul.info {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
font-size: 12px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.info .description {
|
||||
color: #666;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.thumb .title {
|
||||
color: #3B5998;
|
||||
text-decoration: underline;
|
||||
font-size: small;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thumb .description {
|
||||
color: #808080;
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 2px 15px;
|
||||
font-family: "helvetica neue", helvetica, arial, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height:24px;
|
||||
background-image: -moz-linear-gradient(top,#fafafa 0%,#e6e6e6 100%);
|
||||
border: 1px solid #bebebe;
|
||||
-moz-box-shadow: 0 0 0 1px #fff inset;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover, button:active {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
button:active {
|
||||
-moz-box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 0 3px rgba(0,0,0,0.75) inset;
|
||||
}
|
||||
|
||||
textarea, input[type="text"] {
|
||||
-moz-box-shadow: 0 0 2px #CCCCCC inset;
|
||||
/* background-image: -moz-linear-gradient(center top , #FFFFFF 0%, #F2F2F2 100%); */
|
||||
border: 1px solid #BEBEBE;
|
||||
font-family: "helvetica neue",helvetica,arial,sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea:focus, input[type="text"]:focus {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
.inputs {
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
height: 30px;
|
||||
width: 234px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
input[type="text"]#to {
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.entry {
|
||||
padding: 10px;
|
||||
width: 962px;
|
||||
left: 50%;
|
||||
margin-left: -481px;
|
||||
position: relative;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
min-height: 70px;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation {
|
||||
padding: 1px 5px;
|
||||
-moz-border-radius: 10px;
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e6e6e6 100%);
|
||||
border: 1px solid #bebebe;
|
||||
color: green;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
bottom: 5px;
|
||||
z-index: 1;
|
||||
color: green;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.entry .urlConfirmation span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#settings .entry ul li {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#settings .entry ul li button {
|
||||
margin: 0 10px 0 0;
|
||||
width: 128px;
|
||||
}
|
||||
|
||||
.entry h1 {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
/* START hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
/* hbox and vbox classes */
|
||||
|
||||
.hbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: horizontal;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.hbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: vertical;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.vbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
-webkit-box-direction: reverse;
|
||||
-moz-box-direction: reverse;
|
||||
box-direction: reverse;
|
||||
}
|
||||
|
||||
.boxFlex0 {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
}
|
||||
|
||||
.boxFlex1, .boxFlex {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.boxFlex2 {
|
||||
-webkit-box-flex: 2;
|
||||
-moz-box-flex: 2;
|
||||
box-flex: 2;
|
||||
}
|
||||
|
||||
.boxGroup1 {
|
||||
-webkit-box-flex-group: 1;
|
||||
-moz-box-flex-group: 1;
|
||||
box-flex-group: 1;
|
||||
}
|
||||
|
||||
.boxGroup2 {
|
||||
-webkit-box-flex-group: 2;
|
||||
-moz-box-flex-group: 2;
|
||||
box-flex-group: 2;
|
||||
}
|
||||
|
||||
.start {
|
||||
-webkit-box-pack: start;
|
||||
-moz-box-pack: start;
|
||||
box-pack: start;
|
||||
}
|
||||
|
||||
.end {
|
||||
-webkit-box-pack: end;
|
||||
-moz-box-pack: end;
|
||||
box-pack: end;
|
||||
}
|
||||
|
||||
.center {
|
||||
-webkit-box-pack: center;
|
||||
-moz-box-pack: center;
|
||||
box-pack: center;
|
||||
}
|
||||
/* END hbox/vbox normalization from http://alex.dojotoolkit.org/2009/08/css-3-progress/ */
|
||||
|
||||
/* clearfix */
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<!-- ***** 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):
|
||||
- -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="share.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#tabs").tabs({ fx: { opacity: 'toggle', duration: 200 } });
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ui-tabs .ui-tabs-hide { display: none; }
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="tabs" class="tabs-left">
|
||||
|
||||
<ul class="nav clearfix">
|
||||
<div class="navWrap clearfix">
|
||||
<li><a class="icon twitter" href="#twitter"><span class="name">Twitter</span></a></li>
|
||||
<li><a class="icon facebook" href="#facebook"><span class="name">Facebook</span></a></li>
|
||||
<li><a class="icon gmail" href="#gmail"><span class="name">Gmail</span></a></li>
|
||||
<li class="settings"><a class="icon settings" href="#settings"><span class="name"><img src="i/settings.png"></span></a></li>
|
||||
<div class="username">@clarkbw <img src="i/bryanAvatar.jpg"></div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div id="twitter">
|
||||
<div class="entry hbox">
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="facebook">
|
||||
<div class="entry hbox">
|
||||
<div class="thumbnail">
|
||||
<div class="thumb"></div>
|
||||
<ul class="info">
|
||||
<li class="title">Title</li>
|
||||
<li class="description">Description</li>
|
||||
</ul>
|
||||
</div>
|
||||
<textarea class="message boxFlex"></textarea>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gmail">
|
||||
<div class="entry hbox">
|
||||
<div class="inputs">
|
||||
<input id="to" type="text" value="to"/>
|
||||
<input id="subject" type="text" value="subject"/>
|
||||
</div>
|
||||
<div class="boxFlex">
|
||||
<textarea class="message"></textarea>
|
||||
<span class="urlConfirmation"><span>re-insert link</span></span>
|
||||
</div>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="settings">
|
||||
<div class="entry">
|
||||
<h1>Settings</h1>
|
||||
<ul>
|
||||
<li><button>Add Twitter</button></li>
|
||||
<li><button>Add Facebook</button></li>
|
||||
<li><button>Add GMail</button></li>
|
||||
<li><button>Add FFFFound</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
После Ширина: | Высота: | Размер: 3.3 KiB |
После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -0,0 +1,231 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>F1: Sidebar</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.textOverflow.js"></script>
|
||||
<script type="text/javascript" src="js/init.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<div id="panel1" class="flip">
|
||||
|
||||
<header class="hbox">
|
||||
<h1 class="boxFlex">Share</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="settings"><a class="configureToggle" href="#">configure</a></li>
|
||||
<li><span class="close"></span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section id="pageInfo" class="hbox">
|
||||
<div class="thumbnail"><img src="i/thumb.jpg"></div>
|
||||
<h2 class="boxFlex overflow pageTitle">F1 by Mozilla Labs</h2>
|
||||
</section>
|
||||
|
||||
<section id="twitter" class="account selected">
|
||||
<div class="accountToggle hbox open">
|
||||
<span class="arrow"></span>
|
||||
<span class="icon twitter"></span>
|
||||
<h3 class="boxFlex overflow">Twitter</h3>
|
||||
<span class="username">_andychung</span>
|
||||
</div>
|
||||
<div class="accountPanel">
|
||||
<div class="padding">
|
||||
<label>type your message:</label>
|
||||
<textarea class="compose"></textarea>
|
||||
<div class="accountActions hbox">
|
||||
<span class="count boxFlex">140</span>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="facebook" class="account">
|
||||
<div class="accountToggle hbox">
|
||||
<span class="arrow"></span>
|
||||
<span class="icon facebook"></span>
|
||||
<h3 class="boxFlex overflow">Facebook</h3>
|
||||
<span class="username">Andy Chung</span>
|
||||
</div>
|
||||
<div class="accountPanel">
|
||||
<div class="padding">
|
||||
<div class="facebookActions hbox">
|
||||
<div class="to">
|
||||
<label>send to:</label>
|
||||
<div class="dropdownContainer">
|
||||
<select class="facebookDropdown">
|
||||
<option selected value="1">my wall</option>
|
||||
<option value="2">group wall</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group boxFlex">
|
||||
<label>type in the name of group:</label>
|
||||
<input type="text">
|
||||
</div>
|
||||
<div class="list">
|
||||
<label>list</label>
|
||||
<button></button>
|
||||
</div>
|
||||
</div>
|
||||
<label>type your message:</label>
|
||||
<textarea class="compose"></textarea>
|
||||
<div class="accountActions hbox">
|
||||
<span class="count boxFlex">420</span>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="google" class="account">
|
||||
<div class="accountToggle hbox">
|
||||
<span class="arrow"></span>
|
||||
<span class="icon google"></span>
|
||||
<h3 class="boxFlex overflow">Google Mail</h3>
|
||||
<span class="username">animalyouth@gmail.com</span>
|
||||
</div>
|
||||
<div class="accountPanel">
|
||||
<div class="padding">
|
||||
<div class="to">
|
||||
<label>to: <em>(enter emails separated by comma)</em></label>
|
||||
<input type="text">
|
||||
</div>
|
||||
<div class="subject">
|
||||
<label>subject:</label>
|
||||
<input type="text">
|
||||
</div>
|
||||
<label>type your message:</label>
|
||||
<textarea class="compose"></textarea>
|
||||
<div class="accountActions hbox">
|
||||
<span class="count boxFlex"></span>
|
||||
<button>share</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div style="position:absolute;bottom:0;">
|
||||
<section id="news" class="hbox">
|
||||
<div>
|
||||
<span class="icon rss"></span>
|
||||
</div>
|
||||
<div class="boxFlex">
|
||||
<h3>Latest from the F1 team</h3>
|
||||
<div class="story">"F1 goes live!"</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- begin settings panel -->
|
||||
<div id="panel2" class="flip">
|
||||
|
||||
<header class="hbox">
|
||||
<h1 class="boxFlex">Share configuration</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="settings"><a class="configureToggle" href="#">return to sharing</a></li>
|
||||
<li><span class="close"></span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<ul id="tabs" class="clearfix">
|
||||
<li class="manage selected">manage</li>
|
||||
<li class="add">add account</li>
|
||||
<li class="settings">settings</li>
|
||||
</ul>
|
||||
|
||||
<div id="accountPanels">
|
||||
|
||||
<section id="manageAccounts" class="configuration">
|
||||
<h2>manage your accounts</h2>
|
||||
<ul class="accountList">
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon twitter"></span>
|
||||
<span class="username">_andychung</span>
|
||||
</h3>
|
||||
<button>remove</button>
|
||||
</li>
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon facebook"></span>
|
||||
<span class="username">Andy Chung</span>
|
||||
</h3>
|
||||
<button>remove</button>
|
||||
</li>
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon google"></span>
|
||||
<span class="username">animalyouth@gmail.com</span>
|
||||
</h3>
|
||||
<button>remove</button>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section id="addAccounts" class="configuration">
|
||||
<h2>add more accounts</h2>
|
||||
<ul class="accountList">
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon twitter"></span>
|
||||
Twitter
|
||||
</h3>
|
||||
<button>add</button>
|
||||
</li>
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon facebook"></span>
|
||||
Facebook
|
||||
</h3>
|
||||
<button>add</button>
|
||||
</li>
|
||||
<li class="accountType hbox">
|
||||
<h3 class="accountName boxFlex overflow">
|
||||
<span class="icon google"></span>
|
||||
Google Mail
|
||||
</h3>
|
||||
<button>add</button>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section id="accountSettings" class="configuration">
|
||||
<h2>F1 settings</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="pref"><input id="bookmark" type="checkbox"> <label for="bookmark">Always bookmark the links I share</label></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="pref"><input id="signature" type="checkbox"> <label for="signature">Include F1 email signature</label></div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<section id="save" class="configuration">
|
||||
<div class="done hbox">
|
||||
<span class="boxFlex"></span>
|
||||
<button class="save">done</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,103 @@
|
|||
$(document).ready(function($) {
|
||||
|
||||
// set panel min-height to full browser height
|
||||
$(window).bind("load resize", function(){
|
||||
var h = $(window).height();
|
||||
$("#wrapper, #panel1, #panel2").css({ "min-height" : (h) });
|
||||
});
|
||||
|
||||
// create ellipsis for gecko
|
||||
$(function() {
|
||||
$(".overflow").textOverflow(null,true);
|
||||
});
|
||||
|
||||
// simple accordian menu
|
||||
$(".accountToggle").click(function() {
|
||||
$(".accountPanel:visible").slideUp(200);
|
||||
if ($(this).next().is(":hidden")) {
|
||||
$(this).next().slideDown(200);
|
||||
}
|
||||
});
|
||||
|
||||
$(".accountPanel").hide();
|
||||
$(".open").trigger("click");
|
||||
|
||||
$(".accountToggle").click(function() {
|
||||
$(this).parent().toggleClass("selected");
|
||||
$(this).parent().siblings().removeClass("selected");
|
||||
});
|
||||
|
||||
// hide and display facebook form
|
||||
$(".group, .list").hide();
|
||||
|
||||
$("select.facebookDropdown").change(function () {
|
||||
if ($(".group, .list").is(":hidden")) {
|
||||
$(".group, .list").css({ "display" : "block" });
|
||||
}
|
||||
else {
|
||||
$(".group, .list").css({ "display" : "none" });
|
||||
}
|
||||
});
|
||||
|
||||
// account manager simple tabs
|
||||
$("ul#tabs li").click(function() {
|
||||
$(this).addClass("selected");
|
||||
$(this).siblings().removeClass("selected");
|
||||
});
|
||||
|
||||
$("ul#tabs li.manage").click(function() {
|
||||
if ($("section#manageAccounts").is(":hidden")) {
|
||||
$("section#manageAccounts").fadeIn(200);
|
||||
$("section#manageAccounts").siblings().fadeOut(0);
|
||||
}
|
||||
else {
|
||||
$("section#manageAccounts").noop();
|
||||
}
|
||||
});
|
||||
|
||||
$("ul#tabs li.add").click(function() {
|
||||
if ($("section#addAccounts").is(":hidden")) {
|
||||
$("section#addAccounts").fadeIn(200);
|
||||
$("section#addAccounts").siblings().fadeOut(0);
|
||||
}
|
||||
else {
|
||||
$("section#addAccounts").noop();
|
||||
}
|
||||
});
|
||||
|
||||
$("ul#tabs li.settings").click(function() {
|
||||
if ($("section#accountSettings").is(":hidden")) {
|
||||
$("section#accountSettings").fadeIn(200);
|
||||
$("section#accountSettings").siblings().fadeOut(0);
|
||||
}
|
||||
else {
|
||||
$("section#manageAccounts").noop();
|
||||
}
|
||||
});
|
||||
|
||||
$("section#addAccounts, section#accountSettings").hide();
|
||||
|
||||
// 3d flip with fade fallback
|
||||
$(function() {
|
||||
if (jQuery.browser.webkit) {
|
||||
$("a.configureToggle").bind("click", function() {
|
||||
$("#panel1").toggleClass("front_flip");
|
||||
$("#panel2").toggleClass("back_flip");
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("a.configureToggle").bind("click", function() {
|
||||
if ($("#panel1").is(":visible")) {
|
||||
$("#panel1").fadeOut(100);
|
||||
$("#panel2").fadeIn(100);
|
||||
}
|
||||
else {
|
||||
$("#panel1").fadeIn(100);
|
||||
$("#panel2").fadeOut(100);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// done!
|
||||
});
|
|
@ -0,0 +1,108 @@
|
|||
/*!
|
||||
* jQuery Text Overflow v0.7
|
||||
*
|
||||
* Licensed under the new BSD License.
|
||||
* Copyright 2009-2010, Bram Stein
|
||||
* All rights reserved.
|
||||
*/
|
||||
/*global jQuery, document, setInterval*/
|
||||
(function ($) {
|
||||
var style = document.documentElement.style,
|
||||
hasTextOverflow = ('textOverflow' in style || 'OTextOverflow' in style),
|
||||
|
||||
domSplit = function (root, maxIndex) {
|
||||
var index = 0, result = [],
|
||||
domSplitAux = function (nodes) {
|
||||
var i = 0, tmp;
|
||||
|
||||
if (index > maxIndex) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < nodes.length; i += 1) {
|
||||
if (nodes[i].nodeType === 1) {
|
||||
tmp = nodes[i].cloneNode(false);
|
||||
result[result.length - 1].appendChild(tmp);
|
||||
result.push(tmp);
|
||||
domSplitAux(nodes[i].childNodes);
|
||||
result.pop();
|
||||
} else if (nodes[i].nodeType === 3) {
|
||||
if (index + nodes[i].length < maxIndex) {
|
||||
result[result.length - 1].appendChild(nodes[i].cloneNode(false));
|
||||
} else {
|
||||
tmp = nodes[i].cloneNode(false);
|
||||
tmp.textContent = $.trim(tmp.textContent.substring(0, maxIndex - index));
|
||||
result[result.length - 1].appendChild(tmp);
|
||||
}
|
||||
index += nodes[i].length;
|
||||
} else {
|
||||
result.appendChild(nodes[i].cloneNode(false));
|
||||
}
|
||||
}
|
||||
};
|
||||
result.push(root.cloneNode(false));
|
||||
domSplitAux(root.childNodes);
|
||||
return $(result.pop().childNodes);
|
||||
};
|
||||
|
||||
$.extend($.fn, {
|
||||
textOverflow: function (str, autoUpdate) {
|
||||
var more = str || '…';
|
||||
|
||||
if (!hasTextOverflow) {
|
||||
return this.each(function () {
|
||||
var element = $(this),
|
||||
|
||||
// the clone element we modify to measure the width
|
||||
clone = element.clone(),
|
||||
|
||||
// we save a copy so we can restore it if necessary
|
||||
originalElement = element.clone(),
|
||||
originalText = element.text(),
|
||||
originalWidth = element.width(),
|
||||
low = 0, mid = 0,
|
||||
high = originalText.length,
|
||||
reflow = function () {
|
||||
if (originalWidth !== element.width()) {
|
||||
element.replaceWith(originalElement);
|
||||
element = originalElement;
|
||||
originalElement = element.clone();
|
||||
element.textOverflow(str, false);
|
||||
originalWidth = element.width();
|
||||
}
|
||||
};
|
||||
|
||||
element.after(clone.hide().css({
|
||||
'position': 'absolute',
|
||||
'width': 'auto',
|
||||
'overflow': 'visible',
|
||||
'max-width': 'inherit'
|
||||
}));
|
||||
|
||||
if (clone.width() > originalWidth) {
|
||||
while (low < high) {
|
||||
mid = Math.floor(low + ((high - low) / 2));
|
||||
clone.empty().append(domSplit(originalElement.get(0), mid)).append(more);
|
||||
if (clone.width() < originalWidth) {
|
||||
low = mid + 1;
|
||||
} else {
|
||||
high = mid;
|
||||
}
|
||||
}
|
||||
|
||||
if (low < originalText.length) {
|
||||
element.empty().append(domSplit(originalElement.get(0), low - 1)).append(more);
|
||||
}
|
||||
}
|
||||
clone.remove();
|
||||
|
||||
if (autoUpdate) {
|
||||
setInterval(reflow, 200);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
|
@ -0,0 +1,625 @@
|
|||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*
|
||||
general
|
||||
*/
|
||||
|
||||
body {
|
||||
font-family: "Lucida Grande", Verdana, Sans-serif;
|
||||
font-size: 11px;
|
||||
line-height: 110%;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
max-width: 400px;
|
||||
min-width: 200px;
|
||||
position: relative;
|
||||
border-right: 1px solid #404040;
|
||||
-webkit-perspective: 1500;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
height: 24px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #aaa;
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
||||
background-image: -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd));
|
||||
}
|
||||
|
||||
button:active {
|
||||
-moz-box-shadow: 0 0 1px #666666 inset;
|
||||
-webkit-box-shadow: 0 0 1px #666666 inset;
|
||||
box-shadow: 0 0 1px #666666 inset;
|
||||
|
||||
background-image: -moz-linear-gradient(center top , #eee 0%, #ccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc));
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 13px;
|
||||
color: #535f6d;
|
||||
text-shadow: 1px 1px 0 rgba(255,255,255, 0.5);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
line-height: 14px;
|
||||
color: #535f6d;
|
||||
}
|
||||
|
||||
/*
|
||||
panel settings
|
||||
*/
|
||||
|
||||
#panel1,
|
||||
#panel2 {
|
||||
width: 100%;
|
||||
color: #535f6d;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#panel1 {
|
||||
background-color: #d4dde5;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#panel1 a,
|
||||
#panel2 a {
|
||||
color: #535f6d;
|
||||
}
|
||||
|
||||
#panel2 {
|
||||
background-color: #E9EEF2;
|
||||
z-index: 1;
|
||||
-webkit-transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
/*
|
||||
header section
|
||||
*/
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
padding: 8px 5px 10px 10px;
|
||||
background-color: #d4dde5;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
header a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
header a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
header nav ul li {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
header nav ul li.settings {
|
||||
border-width: 0 1px 0 0;
|
||||
border-style: solid;
|
||||
border-color: #535f6d;
|
||||
}
|
||||
|
||||
header span.close {
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
background-image: url("i/sprite.png");
|
||||
background-position: center 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
header span.close:active {
|
||||
background-position: center -13px;
|
||||
}
|
||||
|
||||
/*
|
||||
page info
|
||||
*/
|
||||
section#pageInfo {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
section#pageInfo .thumbnail {
|
||||
border: 1px solid #a6afb6;
|
||||
-moz-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5);
|
||||
-webkit-box-shadow: 1px 1px 0 rgba(255,255,255, 0.5);
|
||||
box-shadow: 1px 1px 0 rgba(255,255,255, 0.5);
|
||||
}
|
||||
|
||||
section#pageInfo .thumbnail img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
section#pageInfo h2 {
|
||||
line-height: 60px;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
/*
|
||||
generic styles for account panels
|
||||
*/
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
section.account {
|
||||
color: #535F6D;
|
||||
display: block;
|
||||
border-width: 1px 0;
|
||||
border-color: #a6afb6;
|
||||
border-style: solid;
|
||||
margin-top: -1px;
|
||||
background-image: -moz-linear-gradient(top, #d4dde5 0%, #c6d1da 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d4dde5), color-stop(100%, #c6d1da));
|
||||
}
|
||||
|
||||
section.account:hover,
|
||||
section.account.selected {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
section.account.selected {
|
||||
background-color: #e9eef2;
|
||||
}
|
||||
|
||||
section.account .username {
|
||||
display: none;
|
||||
}
|
||||
|
||||
section.account.selected .username {
|
||||
display: block;
|
||||
}
|
||||
|
||||
section.account .accountToggle {
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
span.arrow,
|
||||
span.icon {
|
||||
display: inline-block;
|
||||
background-image: url("i/sprite.png");
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
span.arrow {
|
||||
width: 12px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
span.icon {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
section.account .accountToggle span.arrow {
|
||||
background-position: center -102px;
|
||||
}
|
||||
|
||||
section.account.selected .accountToggle span.arrow {
|
||||
background-position: center -120px;
|
||||
}
|
||||
|
||||
section.account .accountPanel {
|
||||
display: block;
|
||||
}
|
||||
|
||||
section.account .accountPanel .padding {
|
||||
padding: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
section.account textarea,
|
||||
section.account input[type="text"] {
|
||||
width: 100%;
|
||||
font-family: "Lucida Grande", Verdana, Sans-serif;
|
||||
font-size: 11px;
|
||||
padding: 5px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #A6AFB6;
|
||||
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset;
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset;
|
||||
}
|
||||
|
||||
section.account textarea:focus,
|
||||
section.account input[type="text"]:focus {
|
||||
-moz-box-shadow: 0 0 0 2px #C2ECFF inset;
|
||||
-webkit-box-shadow: 0 0 0 2px #C2ECFF inset;
|
||||
box-shadow: 0 0 0 2px #C2ECFF inset;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: none;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
section.account textarea {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
section.account input[type="text"] {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
section.account .accountActions {
|
||||
width: 100%;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
section.account span.count {
|
||||
line-height: 24px;
|
||||
color: #535F6D;
|
||||
}
|
||||
|
||||
section.account label {
|
||||
display: block;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
/*
|
||||
twitter styles
|
||||
*/
|
||||
span.icon.twitter {
|
||||
background-position: center -35px;
|
||||
}
|
||||
|
||||
/*
|
||||
facebook styles
|
||||
*/
|
||||
section#facebook.account .facebookActions {
|
||||
margin: 0 0 10px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .to {
|
||||
width: 100px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .to .dropdownContainer {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .to select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .list label {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .list button {
|
||||
border-left: none;
|
||||
width: 24px;
|
||||
background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #fafafa 0%, #ddd 100%);
|
||||
background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #ddd));
|
||||
background-position: center -157px, center top;
|
||||
background-repeat: no-repeat;
|
||||
-moz-border-radius: 0 2px 2px 0;
|
||||
-webkit-border-radius: 0 2px 2px 0;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
section#facebook.account .facebookActions .list button:active {
|
||||
background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #eee 0%, #ccc 100%);
|
||||
background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #ccc));
|
||||
}
|
||||
|
||||
span.icon.facebook {
|
||||
background-position: center -59px;
|
||||
}
|
||||
|
||||
/*
|
||||
google styles
|
||||
*/
|
||||
section#google.account .subject {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
span.icon.google {
|
||||
background-position: center -82px;
|
||||
}
|
||||
|
||||
/*
|
||||
account configuration
|
||||
*/
|
||||
|
||||
ul#tabs {
|
||||
width: 100%;
|
||||
padding: 10px 10px 0 10px;
|
||||
list-style-type: none;
|
||||
background-color: #D4DDE5;
|
||||
}
|
||||
|
||||
ul#tabs li {
|
||||
padding: 7px 20px;
|
||||
margin: 0 3px 0 0;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background-color: #E9EEF2;
|
||||
border-width: 1px 1px 0 1px;
|
||||
border-style: solid;
|
||||
border-color: #A6AFB6;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul#tabs li.selected {
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#accountPanels {
|
||||
padding: 10px 0 0;
|
||||
border-top: 1px solid #a6afb6;
|
||||
position: relative;
|
||||
z-index: 90;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
section.configuration {
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
section.configuration h2 {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
section.configuration ul {
|
||||
background-color: #fff;
|
||||
border: 1px solid #A6AFB6;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
section.configuration ul li {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #A6AFB6;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
section.configuration ul li:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
section.configuration h3 {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
section.configuration h3 .username {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
section.configuration input[type="checkbox"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
section.configuration .done {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
section#news {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
section#news span.icon.rss {
|
||||
background-position: center -183px;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
section#news .story {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
/*
|
||||
hbox & vbox
|
||||
*/
|
||||
|
||||
.hbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: horizontal;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.hbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-align: stretch;
|
||||
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-align: stretch;
|
||||
|
||||
display: box;
|
||||
box-orient: vertical;
|
||||
box-align: stretch;
|
||||
}
|
||||
|
||||
.vbox > * {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
-webkit-box-direction: reverse;
|
||||
-moz-box-direction: reverse;
|
||||
box-direction: reverse;
|
||||
}
|
||||
|
||||
.boxFlex0 {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
box-flex: 0;
|
||||
}
|
||||
|
||||
.boxFlex1, .boxFlex {
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
box-flex: 1;
|
||||
}
|
||||
|
||||
.boxFlex2 {
|
||||
-webkit-box-flex: 2;
|
||||
-moz-box-flex: 2;
|
||||
box-flex: 2;
|
||||
}
|
||||
|
||||
.boxGroup1 {
|
||||
-webkit-box-flex-group: 1;
|
||||
-moz-box-flex-group: 1;
|
||||
box-flex-group: 1;
|
||||
}
|
||||
|
||||
.boxGroup2 {
|
||||
-webkit-box-flex-group: 2;
|
||||
-moz-box-flex-group: 2;
|
||||
box-flex-group: 2;
|
||||
}
|
||||
|
||||
.start {
|
||||
-webkit-box-pack: start;
|
||||
-moz-box-pack: start;
|
||||
box-pack: start;
|
||||
}
|
||||
|
||||
.end {
|
||||
-webkit-box-pack: end;
|
||||
-moz-box-pack: end;
|
||||
box-pack: end;
|
||||
}
|
||||
|
||||
.center {
|
||||
-webkit-box-pack: center;
|
||||
-moz-box-pack: center;
|
||||
box-pack: center;
|
||||
}
|
||||
|
||||
/*
|
||||
clearfix
|
||||
*/
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
}
|
||||
|
||||
/*
|
||||
webkit specific styles
|
||||
*/
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
|
||||
#wrapper {
|
||||
background-color: #404040;
|
||||
}
|
||||
|
||||
.overflow {
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.flip {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-transition: -webkit-transform 0.7s ease-in-out;
|
||||
}
|
||||
|
||||
.front_flip {
|
||||
-webkit-transform: rotateY(-180deg);
|
||||
z-index: 900;
|
||||
}
|
||||
|
||||
.back_flip {
|
||||
-webkit-transform: rotateY(0deg) !important;
|
||||
z-index: 1000;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
<!-- ***** 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):
|
||||
- -->
|
||||
|
||||
<!-- A hacky sample to attempt a send and handle auth failure automatically
|
||||
then attempt a resend
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Send a message</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
|
||||
<script src="../../scripts/requireplugins-jquery.js" charset="utf-8"></script>
|
||||
<script>require(["index.js"]);</script>
|
||||
<style>
|
||||
html, body {
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="settings">
|
||||
|
||||
<div class="row">
|
||||
<div class="c4 logo">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- send form -->
|
||||
<div class="section send">
|
||||
<form name="messageForm" id="messageForm" action="#">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<input name="message">
|
||||
Send via
|
||||
<input type="radio" name="domain" value="twitter.com">Twitter
|
||||
<input type="radio" name="domain" value="facebook.com">Facebook
|
||||
<input type="radio" name="domain" value="noservice.com">No Service
|
||||
|
||||
<input type="hidden" name="end_point_success" value="/scratch/send/#success">
|
||||
<input type="hidden" name="end_point_failure" value="/scratch/send/#failure">
|
||||
<input type="hidden" name="end_point_auth_failure" value="/scratch/send/#auth_failure">
|
||||
<button>send</button>
|
||||
|
||||
</div>
|
||||
<div class="c1">
|
||||
<div class="usernameError error invisible">Please enter your Twitter name</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- send success section -->
|
||||
<div class="section success hidden">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<h4 class="success">Success!</h4>
|
||||
<p>Your message was sent</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- auth failure section
|
||||
|
||||
This is the end_point for when the *send* request fails auth (but not
|
||||
when the explicit auth request fails) - when this happens we do the
|
||||
explicit auth.
|
||||
-->
|
||||
<div class="section auth_failure hidden">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<p>Authorizing...</p>
|
||||
<!-- the js code arranges to submit the auth form below... -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section auth_form hidden"> <!-- this is never made visible -->
|
||||
<form name="authForm" id="authForm" action="/api/account/authorize" method="POST">
|
||||
<div class="row">
|
||||
<input type="hidden" name="domain">
|
||||
<input type="hidden" name="end_point_success" value="/scratch/send/#auth_success">
|
||||
<input type="hidden" name="end_point_auth_failure" value="/scratch/send/#final_auth_failure">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- final auth failure section
|
||||
This is the end_point for when the explicit auth request fails - we have
|
||||
given up here...
|
||||
-->
|
||||
<div class="section final_auth_failure hidden">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<p>Failed to authorize...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- auth success section
|
||||
This is the end_point for when the explicit auth request succeeds - we
|
||||
then attempt to retry the send.
|
||||
-->
|
||||
<div class="section auth_success hidden">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<p>Sending...</p>
|
||||
<!-- the JS code re-submits the send form -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- general failure section - an error other than auth failure...-->
|
||||
<div id="resultMsg" class="section failure hidden">
|
||||
<div class="row">
|
||||
<div class="c1">
|
||||
<p id="resultReason">Sorry - we failed for obscure reasons...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,481 @@
|
|||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
|
@ -0,0 +1,35 @@
|
|||
The Stay-Puft Marshmallow Font
|
||||
|
||||
Copyright (c) 2003 by John Stracke
|
||||
|
||||
Not a very impressive piece of work, but fun. I sat down to fiddle
|
||||
with pfaedit, and started seeing what I could do freehand, with
|
||||
minimal splines. The result was all rounded (not surprising), sort of
|
||||
marshmallowy, and I started thinking of it as the Stay-Puft
|
||||
Marshmallow Font (see Ghostbusters if you don't get it). Once I had a
|
||||
name, I felt compelled to round out the font (ISO 8859-1, at least).
|
||||
The outcome looks sort of like Comic Sans MS. It's kind of cute, and
|
||||
might be good for frivolous stuff such as birthday cards. I've used
|
||||
it on my National Academy of Silly Walks merchandise
|
||||
(http://www.cafepress.com/sillywalks/).
|
||||
|
||||
It is released under the terms of the GNU Lesser General Public
|
||||
License (see COPYING.LIB). Where the LGPL refers to "source code", I
|
||||
take that to refer to the file called StayPuft.sfd, which is a file
|
||||
for editing with pfaedit (http://pfaedit.sourceforge.net/), an outline
|
||||
font editor program. Thus, according to the LGPL, if you distribute
|
||||
this font, you must make StayPuft.sfd available to the recipient(s)
|
||||
under the terms the LGPL specifies for source availability. Each of
|
||||
the download links below is an archive (tarfile or zipfile) which
|
||||
includes StayPuft.sfd, the LGPL, a readme, and at least one font file
|
||||
(e.g., Isabella.ttf for TrueType files). I chose the LGPL instead of
|
||||
the GPL because, arguably, using the GPL might mean that PostScript
|
||||
and PDF files with this font embedded would be GPLed (they're like
|
||||
programs that link to a static library).
|
||||
|
||||
The font has ASCII, Latin-1, and a few other useful characters: left
|
||||
and right quotation marks (single and double), ellipsis, long dash,
|
||||
and Euro. I don't intend to round it out as much as I did with
|
||||
Isabella (http://www.thibault.org/fonts/isabella/); this is a much
|
||||
less interesting project. Anyone who wants to donate extra
|
||||
letterforms is welcome, of course.
|