diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..030d82329 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 + +[{Gemfile,Rakefile,Guardfile,Procfile}] +trim_trailing_whitespace = true + +[*.{js,hbs,rb,rake,ru,erb,haml,scss,sh,md}] +trim_trailing_whitespace = true + +[*.yml] +trim_trailing_whitespace = false diff --git a/.foreman b/.foreman index a39123f3a..d85990e35 100644 --- a/.foreman +++ b/.foreman @@ -1,2 +1,2 @@ port: 3000 -formation: web=1,sidekiq=0 +formation: xmpp=0,web=1,sidekiq=0 diff --git a/.gitignore b/.gitignore index 4daa11583..87b17afd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# xmpp certificates, keys and user data +config/vines/*.crt +config/vines/*.key + #trademark sillyness app/views/home/_show.* app/views/terms/terms.* @@ -10,6 +14,7 @@ config/heroku.yml config/initializers/secret_token.rb config/redis.conf config/deploy_config.yml +config/schedule.rb .bundle vendor/bundle/ vendor/cache/ @@ -29,6 +34,11 @@ spec/fixtures/*.y*ml spec/fixtures/*.fixture.* coverage/ xml_locales/ +public/404.html +public/422.html +public/500.html + +# Sprites app/assets/images/branding-*.png app/assets/images/icons-*.png app/assets/images/social_media_logos-*.png @@ -58,7 +68,6 @@ tmp/ *.swp *~ *# -bin/* nbproject patches-* capybara-*.html @@ -69,3 +78,6 @@ dump.rdb #IDE diaspora.iml + +# Dolphin's directory's preferences files +*.directory diff --git a/.hound.yml b/.hound.yml new file mode 100644 index 000000000..9c0f49ddb --- /dev/null +++ b/.hound.yml @@ -0,0 +1,9 @@ +java_script: + enabled: true + config_file: config/.jshint.json + ignore_file: config/.jshint_ignore +ruby: + enabled: true + config_file: .rubocop.yml +scss: + enabled: false diff --git a/.jshintignore b/.jshintignore new file mode 120000 index 000000000..e650afb05 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +config/.jshint_ignore \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 120000 index 000000000..2c12c8897 --- /dev/null +++ b/.jshintrc @@ -0,0 +1 @@ +config/.jshint.json \ No newline at end of file diff --git a/.pairs b/.pairs deleted file mode 100644 index f9b826a51..000000000 --- a/.pairs +++ /dev/null @@ -1,15 +0,0 @@ -pairs: - dg: Daniel Grippi; daniel - rs: Raphael Sofaer; raphael - iz: Ilya Zhitomirskiy; ilya - ms: Maxwell Salzberg; maxwell - dh: Dan Hansen; ohaibbq - sm: Sarah Mei; sarah - mjs: Michael Sofaer; michael - jd: Jeff Dickey; dickeytk - dc: Dennis Collinson - tf: Tim Frazer - kf: Kevin Fitzpatrick -email: - prefix: pair - domain: joindiaspora.com diff --git a/.powenv b/.powenv deleted file mode 100644 index fa534d482..000000000 --- a/.powenv +++ /dev/null @@ -1 +0,0 @@ -export NEW_HOTNESS=yessir diff --git a/.powrc b/.powrc deleted file mode 100644 index 52c4a5737..000000000 --- a/.powrc +++ /dev/null @@ -1,4 +0,0 @@ -if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then - source "$rvm_path/scripts/rvm" - source ".rvmrc" -fi diff --git a/.rspec b/.rspec index 7b862b57b..174e25596 100644 --- a/.rspec +++ b/.rspec @@ -3,4 +3,3 @@ --color --tag ~performance --order random ---drb diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..2148bb5d0 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,130 @@ +AllCops: + RunRailsCops: true + +# Commonly used screens these days easily fit more than 80 characters. +Metrics/LineLength: + Max: 120 + +# Too short methods lead to extraction of single-use methods, which can make +# the code easier to read (by naming things), but can also clutter the class +Metrics/MethodLength: + Max: 20 + +# The guiding principle of classes is SRP, SRP can't be accurately measured by LoC +Metrics/ClassLength: + Max: 1500 + +# No space makes the method definition shorter and differentiates +# from a regular assignment. +Style/SpaceAroundEqualsInParameterDefault: + EnforcedStyle: no_space + +# Single quotes being faster is hardly measurable and only affects parse time. +# Enforcing double quotes reduces the times where you need to change them +# when introducing an interpolation. Use single quotes only if their semantics +# are needed. +Style/StringLiterals: + EnforcedStyle: double_quotes + +# We do not need to support Ruby 1.9, so this is good to use. +Style/SymbolArray: + Enabled: true + +# Most readable form. +Style/AlignHash: + EnforcedHashRocketStyle: table + EnforcedColonStyle: table + +# Mixing the styles looks just silly. +# REVIEW: Enable once https://github.com/bbatsov/rubocop/commit/760ce1ed2cf10beda5e163f934c03a6fb6daa38e +# is released. +#Style/HashSyntax: +# EnforcedStyle: ruby19_no_mixed_keys + +# has_key? and has_value? are far more readable than key? and value? +Style/DeprecatedHashMethods: + Enabled: false + +# String#% is by far the least verbose and only object oriented variant. +Style/FormatString: + EnforcedStyle: percent + +Style/CollectionMethods: + Enabled: true + PreferredMethods: + # inject seems more common in the community. + reduce: "inject" + + +# Either allow this style or don't. Marking it as safe with parenthesis +# is silly. Let's try to live without them for now. +Style/ParenthesesAroundCondition: + AllowSafeAssignment: false +Lint/AssignmentInCondition: + AllowSafeAssignment: false + +# A specialized exception class will take one or more arguments and construct the message from it. +# So both variants make sense. +Style/RaiseArgs: + Enabled: false + +# Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain. +# The argument that fail should be used to abort the program is wrong too, +# there's Kernel#abort for that. +Style/SignalException: + EnforcedStyle: only_raise + +# Suppressing exceptions can be perfectly fine, and be it to avoid to +# explicitly type nil into the rescue since that's what you want to return, +# or suppressing LoadError for optional dependencies +Lint/HandleExceptions: + Enabled: false + +Style/SpaceInsideBlockBraces: + # The space here provides no real gain in readability while consuming + # horizontal space that could be used for a better parameter name. + # Also {| differentiates better from a hash than { | does. + SpaceBeforeBlockParameters: false + +# No trailing space differentiates better from the block: +# foo} means hash, foo } means block. +Style/SpaceInsideHashLiteralBraces: + EnforcedStyle: no_space + +# { ... } for multi-line blocks is okay, follow Weirichs rule instead: +# https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc +Style/Blocks: + Enabled: false + +# do / end blocks should be used for side effects, +# methods that run a block for side effects and have +# a useful return value are rare, assign the return +# value to a local variable for those cases. +Style/MethodCalledOnDoEndBlock: + Enabled: true + +# Enforcing the names of variables? To single letter ones? Just no. +Style/SingleLineBlockParams: + Enabled: false + +# Shadowing outer local variables with block parameters is often useful +# to not reinvent a new name for the same thing, it highlights the relation +# between the outer variable and the parameter. The cases where it's actually +# confusing are rare, and usually bad for other reasons already, for example +# because the method is too long. +Lint/ShadowingOuterLocalVariable: + Enabled: false + +# Check with yard instead. +Style/Documentation: + Enabled: false + +# This is just silly. Calling the argument `other` in all cases makes no sense. +Style/OpMethod: + Enabled: false + +# There are valid cases, for example debugging Cucumber steps, +# also they'll fail CI anyway +Lint/Debugger: + Enabled: false + diff --git a/.ruby-version b/.ruby-version index cd5ac039d..879b416e6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.0 +2.1 diff --git a/.travis.yml b/.travis.yml index 852b2cab3..56e74410e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,8 @@ -branches: - only: - - 'master' - - 'develop' - language: ruby + rvm: - - 2.0.0 - - 1.9.3 + - 2.1 + - 2.0 env: - DB=postgres BUILD_TYPE=other @@ -14,13 +10,22 @@ env: - DB=postgres BUILD_TYPE=cucumber - DB=mysql BUILD_TYPE=cucumber +sudo: false +cache: + bundler: true + directories: + - app/assets/images + +branches: + only: + - 'master' + - 'develop' + +before_install: gem install bundler +bundler_args: "--without development production heroku --jobs 3 --retry 3" -bundler_args: "--without development production heroku" script: "./script/ci/build.sh" -addons: - firefox: "26.0" - notifications: irc: channels: diff --git a/Changelog.md b/Changelog.md index 396e70d44..652eb5d9d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,219 @@ +# 0.5.0.0 + +## Major Sidekiq update +This release includes a major upgrade of the background processing system Sidekiq. To upgrade cleanly: + +1. Stop diaspora* +2. Run `RAILS_ENV=production bundle exec sidekiq` and wait 5-10 minutes, then stop it again (hit `CTRL+C`) +3. Do a normal upgrade of diaspora* +4. Start diaspora* + +## Rails 4 - Manual action required +Please edit `config/initializers/secret_token.rb`, replacing `secret_token` with +`secret_key_base`. + +```ruby +# Old +Rails.application.config.secret_token = '***********...' + +# New +Diaspora::Application.config.secret_key_base = '*************...' +``` + +You also need to take care to set `RAILS_ENV` and to clear the cache while precompiling assets: `RAILS_ENV=production bundle exec rake tmp:cache:clear assets:precompile` + +## Supported Ruby versions +This release drops official support for the Ruby 1.9 series. This means we will no longer test against this Ruby version or take care to choose libraries +that work with it. However that doesn't mean we won't accept patches that improve running diaspora* on it. + +At the same time we adopt support for the Ruby 2.1 series and recommend running on the latest Ruby version of that branch. We continue to support the Ruby 2.0 +series and run our comprehensive test suite against it. + +## Change in defaults.yml +The default for including jQuery from a CDN has changed. If you want to continue to include it from a CDN, please explicitly set the `jquery_cdn` setting to `true` in diaspora.yml. + +## Change in database.yml +For MySQL databases, replace `charset: utf8` with `encoding: utf8mb4` and change `collation` from `utf8_bin` to `utf8mb4_bin` in the file `config/database.yml`. +This is enables full UTF8 support (4bytes characters), including standard emoji characters. +See `database.yml.example` for reference. +Please make sure to stop Diaspora prior running this migration! + +## Experimental chat feature +This release adds experimental integration with XMPP for real-time chat. Please see [our wiki](https://wiki.diasporafoundation.org/Vines) for further informations. + +## Change in statistics.json schema +The way services are shown in the `statistics.json` route is changing. The keys relating to showing whether services are enabled or not are moving to their own container as `"services": {....}`, instead of having them all in the root level of the JSON. + +The keys will still be available in the root level within the 0.5 release. The old keys will be removed in the 0.6 release. + +## New maintenance feature to automatically expire inactive accounts +Removing of old inactive users can now be done automatically by background processing. The amount of inactivity is set by `after_days`. A warning email will be sent to the user and after an additional `warn_days`, the account will be automatically closed. + +This maintenance is not enabled by default. Podmins can enable it by for example copying over the new settings under `settings.maintenance` to their `diaspora.yml` file and setting it enabled. The default setting is to expire accounts that have been inactive for 2 years (no login). + +## Camo integration to proxy external assets +It is now possible to enable an automatic proxying of external assets, for example images embedded via Markdown or OpenGraph thumbnails loaded from insecure third party servers through a [Camo proxy](https://github.com/atmos/camo). + +This is disabled by default since it requires the installation of additional packages and might cause some traffic. Check the [wiki page](https://wiki.diasporafoundation.org/Installation/Camo) for more information and detailed installation instructions. + +## Paypal unhosted button and currency +Podmins can now set the currency for donations, and use an unhosted button if they can't use +a hosted one. Note: you need to **copy the new settings from diaspora.yml.example to your +diaspora.yml file**. The existing settings from 0.4.x and before will not work any more. + +## Custom splash page changes +diaspora* no longer adds a `div.container` to wrap custom splash pages. This adds the ability for podmins to write home pages using Bootstrap's fluid design. Podmins who added a custom splash page in `app/views/home/_show.{html,mobile}.haml` need to wrap the contents into a `div.container` to keep the old design. You will find updated examples [in our wiki](https://wiki.diasporafoundation.org/Custom_splash_page). + +## Refactor +* Redesign contacts page [#5153](https://github.com/diaspora/diaspora/pull/5153) +* Improve profile page design on mobile [#5084](https://github.com/diaspora/diaspora/pull/5084) +* Port test suite to RSpec 3 [#5170](https://github.com/diaspora/diaspora/pull/5170) +* Port tag stream to Bootstrap [#5138](https://github.com/diaspora/diaspora/pull/5138) +* Consolidate migrations, if you need a migration prior 2013, checkout the latest release in the 0.4.x series first [#5173](https://github.com/diaspora/diaspora/pull/5173) +* Add tests for mobile sign up [#5185](https://github.com/diaspora/diaspora/pull/5185) +* Display new conversation form on conversations/index [#5178](https://github.com/diaspora/diaspora/pull/5178) +* Port profile page to Backbone [#5180](https://github.com/diaspora/diaspora/pull/5180) +* Pull punycode.js from rails-assets.org [#5263](https://github.com/diaspora/diaspora/pull/5263) +* Redesign profile page and port to Bootstrap [#4657](https://github.com/diaspora/diaspora/pull/4657) +* Unify stream selection links in the left sidebar [#5271](https://github.com/diaspora/diaspora/pull/5271) +* Refactor schema of statistics.json regarding services [#5296](https://github.com/diaspora/diaspora/pull/5296) +* Pull jquery.idle-timer.js from rails-assets.org [#5310](https://github.com/diaspora/diaspora/pull/5310) +* Pull jquery.placeholder.js from rails-assets.org [#5299](https://github.com/diaspora/diaspora/pull/5299) +* Pull jquery.textchange.js from rails-assets.org [#5297](https://github.com/diaspora/diaspora/pull/5297) +* Pull jquery.hotkeys.js from rails-assets.org [#5368](https://github.com/diaspora/diaspora/pull/5368) +* Reduce amount of useless background job retries and pull public posts when missing [#5209](https://github.com/diaspora/diaspora/pull/5209) +* Updated Weekly User Stats admin page to show data for the most recent week including reversing the order of the weeks in the drop down to show the most recent. [#5331](https://github.com/diaspora/diaspora/pull/5331) +* Convert some cukes to RSpec tests [#5289](https://github.com/diaspora/diaspora/pull/5289) +* Hidden overflow for long names on tag pages [#5279](https://github.com/diaspora/diaspora/pull/5279) +* Always reshare absolute root of a post [#5276](https://github.com/diaspora/diaspora/pull/5276) +* Convert remaining SASS stylesheets to SCSS [#5342](https://github.com/diaspora/diaspora/pull/5342) +* Update rack-protection [#5403](https://github.com/diaspora/diaspora/pull/5403) +* Cleanup diaspora.yml [#5426](https://github.com/diaspora/diaspora/pull/5426) +* Replace `opengraph_parser` with `open_graph_reader` [#5462](https://github.com/diaspora/diaspora/pull/5462) +* Make sure conversations without any visibilities left are deleted [#5478](https://github.com/diaspora/diaspora/pull/5478) +* Change tooltip for delete button in conversations view [#5477](https://github.com/diaspora/diaspora/pull/5477) +* Replace a modifier-rescue with a specific rescue [#5491](https://github.com/diaspora/diaspora/pull/5491) +* Port contacts page to backbone [#5473](https://github.com/diaspora/diaspora/pull/5473) +* Replace CSS vendor prefixes automatically [#5532](https://github.com/diaspora/diaspora/pull/5532) +* Use sentence case consistently throughout UI [#5588](https://github.com/diaspora/diaspora/pull/5588) +* Hide sign up button when registrations are disabled [#5612](https://github.com/diaspora/diaspora/pull/5612) +* Standardize capitalization throughout the UI [#5588](https://github.com/diaspora/diaspora/pull/5588) +* Display photos on the profile page as thumbnails [#5521](https://github.com/diaspora/diaspora/pull/5521) +* Unify not connected pages (sign in, sign up, forgot password) [#5391](https://github.com/diaspora/diaspora/pull/5391) +* Port remaining stream pages to Bootstrap [#5715](https://github.com/diaspora/diaspora/pull/5715) +* Port notification dropdown to Backbone [#5707](https://github.com/diaspora/diaspora/pull/5707) [#5761](https://github.com/diaspora/diaspora/pull/5761) +* Add rounded corners for avatars [#5733](https://github.com/diaspora/diaspora/pull/5733) +* Move registration form to a partial [#5764](https://github.com/diaspora/diaspora/pull/5764) +* Add tests for liking and unliking posts [#5741](https://github.com/diaspora/diaspora/pull/5741) +* Rewrite slide effect in conversations as css transition for better performance [#5776](https://github.com/diaspora/diaspora/pull/5776) +* Various cleanups and improvements in the frontend code [#5781](https://github.com/diaspora/diaspora/pull/5781) [#5769](https://github.com/diaspora/diaspora/pull/5769) [#5763](https://github.com/diaspora/diaspora/pull/5763) [#5762](https://github.com/diaspora/diaspora/pull/5762) [#5758](https://github.com/diaspora/diaspora/pull/5758) [#5755](https://github.com/diaspora/diaspora/pull/5755) [#5747](https://github.com/diaspora/diaspora/pull/5747) [#5734](https://github.com/diaspora/diaspora/pull/5734) [#5786](https://github.com/diaspora/diaspora/pull/5786) [#5768](https://github.com/diaspora/diaspora/pull/5798) +* Add specs and validations to the role model [#5792](https://github.com/diaspora/diaspora/pull/5792) +* Replace 'Make something' text by diaspora ball logo on registration page [#5743](https://github.com/diaspora/diaspora/pull/5743) + +## Bug fixes +* orca cannot see 'Add Contact' button [#5158](https://github.com/diaspora/diaspora/pull/5158) +* Move submit button to the right in conversations view [#4960](https://github.com/diaspora/diaspora/pull/4960) +* Handle long URLs and titles in OpenGraph descriptions [#5208](https://github.com/diaspora/diaspora/pull/5208) +* Fix deformed getting started popover [#5227](https://github.com/diaspora/diaspora/pull/5227) +* Use correct locale for invitation subject [#5232](https://github.com/diaspora/diaspora/pull/5232) +* Initial support for IDN emails +* Fix services settings reported by statistics.json [#5256](https://github.com/diaspora/diaspora/pull/5256) +* Only collapse empty comment box [#5328](https://github.com/diaspora/diaspora/pull/5328) +* Fix pagination for people/guid/contacts [#5304](https://github.com/diaspora/diaspora/pull/5304) +* Fix poll creation on Bootstrap pages [#5334](https://github.com/diaspora/diaspora/pull/5334) +* Show error message on invalid reset password attempt [#5325](https://github.com/diaspora/diaspora/pull/5325) +* Fix translations on mobile password reset pages [#5318](https://github.com/diaspora/diaspora/pull/5318) +* Handle unset user agent when signing out [#5316](https://github.com/diaspora/diaspora/pull/5316) +* More robust URL parsing for oEmbed and OpenGraph [#5347](https://github.com/diaspora/diaspora/pull/5347) +* Fix Publisher doesn't expand while uploading images [#3098](https://github.com/diaspora/diaspora/issues/3098) +* Drop unneeded and too open crossdomain.xml +* Fix hidden aspect dropdown on getting started page [#5407](https://github.com/diaspora/diaspora/pulls/5407) +* Fix a few issues on Bootstrap pages [#5401](https://github.com/diaspora/diaspora/pull/5401) +* Improve handling of the `more` link on mobile stream pages [#5400](https://github.com/diaspora/diaspora/pull/5400) +* Fix prefilling publisher after getting started [#5442](https://github.com/diaspora/diaspora/pull/5442) +* Fix overflow in profile sidebar [#5450](https://github.com/diaspora/diaspora/pull/5450) +* Fix code overflow in SPV and improve styling for code tags [#5422](https://github.com/diaspora/diaspora/pull/5422) +* Correctly validate if local recipients actually want to receive a conversation [#5449](https://github.com/diaspora/diaspora/pull/5449) +* Improve consistency of poll answer ordering [#5471](https://github.com/diaspora/diaspora/pull/5471) +* Fix broken aspect selectbox on asynchronous search results [#5488](https://github.com/diaspora/diaspora/pull/5488) +* Replace %{third_party_tools} by the appropriate hyperlink in tags FAQ [#5509](https://github.com/diaspora/diaspora/pull/5509) +* Repair downloading the profile image from Facebook [#5493](https://github.com/diaspora/diaspora/pull/5493) +* Fix localization of post and comment timestamps on mobile [#5482](https://github.com/diaspora/diaspora/issues/5482) +* Fix mobile JS loading to quieten errors. Fixes also service buttons on mobile bookmarklet. +* Don't error out when adding a too long location to the profile [#5614](https://github.com/diaspora/diaspora/pull/5614) +* Correctly decrease unread count for conversations [#5646](https://github.com/diaspora/diaspora/pull/5646) +* Fix automatic scroll for conversations [#5646](https://github.com/diaspora/diaspora/pull/5646) +* Fix missing translation on privacy settings page [#5671](https://github.com/diaspora/diaspora/pull/5671) +* Fix code overflow for the mobile website [#5675](https://github.com/diaspora/diaspora/pull/5675) +* Strip Unicode format characters prior post processing [#5680](https://github.com/diaspora/diaspora/pull/5680) +* Disable email notifications for closed user accounts [#5640](https://github.com/diaspora/diaspora/pull/5640) +* Total user statistic no longer includes closed accounts [#5041](https://github.com/diaspora/diaspora/pull/5041) +* Don't add a space when rendering a mention [#5711](https://github.com/diaspora/diaspora/pull/5711) +* Fix flickering hovercards [#5714](https://github.com/diaspora/diaspora/pull/5714) [#5876](https://github.com/diaspora/diaspora/pull/5876) +* Improved stripping markdown in post titles [#5730](https://github.com/diaspora/diaspora/pull/5730) +* Remove border from reply form for conversations [#5744](https://github.com/diaspora/diaspora/pull/5744) +* Fix overflow for headings, blockquotes and other elements [#5731](https://github.com/diaspora/diaspora/pull/5731) +* Correct photo count on profile page [#5751](https://github.com/diaspora/diaspora/pull/5751) +* Fix mobile sign up from an invitation [#5754](https://github.com/diaspora/diaspora/pull/5754) +* Set max-width for tag following button on tag page [#5752](https://github.com/diaspora/diaspora/pull/5752) +* Display error messages for failed password change [#5580](https://github.com/diaspora/diaspora/pull/5580) +* Display correct error message for too long tags [#5783](https://github.com/diaspora/diaspora/pull/5783) +* Fix displaying reshares in the stream on mobile [#5790](https://github.com/diaspora/diaspora/pull/5790) +* Remove bottom margin from lists that are the last element of a post. [#5721](https://github.com/diaspora/diaspora/pull/5721) +* Fix pagination design on conversations page [#5791](https://github.com/diaspora/diaspora/pull/5791) +* Prevent inserting posts into the wrong stream [#5838](https://github.com/diaspora/diaspora/pull/5838) +* Update help section [#5857](https://github.com/diaspora/diaspora/pull/5857) [#5859](https://github.com/diaspora/diaspora/pull/5859) +* Fix asset precompilation check in script/server [#5863](https://github.com/diaspora/diaspora/pull/5863) +* Convert MySQL databases to utf8mb4 [#5530](https://github.com/diaspora/diaspora/pull/5530) [#5624](https://github.com/diaspora/diaspora/pull/5624) [#5865](https://github.com/diaspora/diaspora/pull/5865) +* Don't upcase labels on mobile sign up/sign in [#5872](https://github.com/diaspora/diaspora/pull/5872) + +## Features +* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105) +* Better character limit message [#5151](https://github.com/diaspora/diaspora/pull/5151) +* Remember whether a AccountDeletion was performed [#5156](https://github.com/diaspora/diaspora/pull/5156) +* Increased the number of notifications shown in drop down bar to 15 [#5129](https://github.com/diaspora/diaspora/pull/5129) +* Increase possible captcha length [#5169](https://github.com/diaspora/diaspora/pull/5169) +* Display visibility icon in publisher aspects dropdown [#4982](https://github.com/diaspora/diaspora/pull/4982) +* Add a link to the reported comment in the admin panel [#5337](https://github.com/diaspora/diaspora/pull/5337) +* Strip search query from leading and trailing whitespace [#5317](https://github.com/diaspora/diaspora/pull/5317) +* Add the "network" key to statistics.json and set it to "Diaspora" [#5308](https://github.com/diaspora/diaspora/pull/5308) +* Infinite scrolling in the notifications dropdown [#5237](https://github.com/diaspora/diaspora/pull/5237) +* Maintenance feature to automatically expire inactive accounts [#5288](https://github.com/diaspora/diaspora/pull/5288) +* Add LibreJS markers to JavaScript [5320](https://github.com/diaspora/diaspora/pull/5320) +* Ask for confirmation when leaving a submittable publisher [#5309](https://github.com/diaspora/diaspora/pull/5309) +* Allow page-specific styling via individual CSS classes [#5282](https://github.com/diaspora/diaspora/pull/5282) +* Change diaspora logo in the header on hover [#5355](https://github.com/diaspora/diaspora/pull/5355) +* Display diaspora handle in search results [#5419](https://github.com/diaspora/diaspora/pull/5419) +* Show a message on the ignored users page when there are none [#5434](https://github.com/diaspora/diaspora/pull/5434) +* Truncate too long OpenGraph descriptions [#5387](https://github.com/diaspora/diaspora/pull/5387) +* Make the source code URL configurable [#5410](https://github.com/diaspora/diaspora/pull/5410) +* Prefill publisher on the tag pages [#5442](https://github.com/diaspora/diaspora/pull/5442) +* Don't include the content of non-public posts into notification mails [#5494](https://github.com/diaspora/diaspora/pull/5494) +* Allow to set unhosted button and currency for paypal donation [#5452](https://github.com/diaspora/diaspora/pull/5452) +* Add followed tags in the mobile menu [#5468](https://github.com/diaspora/diaspora/pull/5468) +* Replace Pagedown with markdown-it [#5526](https://github.com/diaspora/diaspora/pull/5526) +* Do not truncate notification emails anymore [#4342](https://github.com/diaspora/diaspora/issues/4342) +* Allows users to export their data in gzipped JSON format from their user settings page [#5499](https://github.com/diaspora/diaspora/pull/5499) +* Strip EXIF data from newly uploaded images [#5510](https://github.com/diaspora/diaspora/pull/5510) +* Hide user setting if the community spotlight is not enabled on the pod [#5562](https://github.com/diaspora/diaspora/pull/5562) +* Add HTML view for pod statistics [#5464](https://github.com/diaspora/diaspora/pull/5464) +* Added/Moved hide, block user, report and delete button in SPV [#5547](https://github.com/diaspora/diaspora/pull/5547) +* Added keyboard shortcuts r(reshare), m(expand Post), o(open first link in post) [#5602](https://github.com/diaspora/diaspora/pull/5602) +* Added dropdown to add/remove people from/to aspects in mobile view [#5594](https://github.com/diaspora/diaspora/pull/5594) +* Dynamically compute minimum and maximum valid year for birthday field [#5639](https://github.com/diaspora/diaspora/pull/5639) +* Show hovercard on mentions [#5652](https://github.com/diaspora/diaspora/pull/5652) +* Make help sections linkable [#5667](https://github.com/diaspora/diaspora/pull/5667) +* Add invitation link to contacts page [#5655](https://github.com/diaspora/diaspora/pull/5655) +* Add year to notifications page [#5676](https://github.com/diaspora/diaspora/pull/5676) +* Give admins the ability to lock & unlock accounts [#5643](https://github.com/diaspora/diaspora/pull/5643) +* Add reshares to the stream view immediately [#5699](https://github.com/diaspora/diaspora/pull/5699) +* Update and improve help section [#5665](https://github.com/diaspora/diaspora/pull/5665), [#5706](https://github.com/diaspora/diaspora/pull/5706) +* Expose participation controls in the stream view [#5511](https://github.com/diaspora/diaspora/pull/5511) +* Reimplement photo export [#5685](https://github.com/diaspora/diaspora/pull/5685) +* Add participation controls in the single post view [#5722](https://github.com/diaspora/diaspora/pull/5722) +* Display polls on reshares [#5782](https://github.com/diaspora/diaspora/pull/5782) +* Remove footer from stream pages [#5816](https://github.com/diaspora/diaspora/pull/5816) + # 0.4.1.3 * Update Redcarped, fixes [OSVDB-120415](http://osvdb.org/show/osvdb/120415). @@ -19,7 +235,7 @@ This release brings a new ToS feature that allows pods to easily display to user terms: enable: true -When enabled, the footer and sidebar will have a link to terms page, and signup will have a disclaimer indicating that creating an account means the user accepts the terms of use. +When enabled, the footer and sidebar will have a link to terms page, and sign up will have a disclaimer indicating that creating an account means the user accepts the terms of use. While the project itself doesn't restrict what kind of terms pods run on, we realize not all podmins want to spend time writing them from scratch. Thus there is a basic ToS template included that will be used unless a custom one available. @@ -134,7 +350,7 @@ Read more in [#4249](https://github.com/diaspora/diaspora/pull/4249) and [#4883] * Reorder and reword items on user settings page [#4912](https://github.com/diaspora/diaspora/pull/4912) * SPV: Improve padding and interaction counts [#4426](https://github.com/diaspora/diaspora/pull/4426) * Remove auto 'mark as read' for notifications [#4810](https://github.com/diaspora/diaspora/pull/4810) -* Improve set read/unread in notifications dropdown [#4869](https://github.com/diaspora/diaspora/pull/4869) +* Improve set read/unread in notifications dropdown [#4869](https://github.com/diaspora/diaspora/pull/4869) * Refactor publisher: trigger events for certain actions, introduce 'disabled' state [#4932](https://github.com/diaspora/diaspora/pull/4932) ## Bug fixes @@ -1022,7 +1238,7 @@ The new configuration system allows all possible settings to be overriden by env ### Environment variable changes: -#### deprectated +#### deprecated * REDISTOGO_URL in favour of REDIS_URL or ENVIRONMENT_REDIS @@ -1081,4 +1297,3 @@ The single-post view will also be revamped/reverted, but that didn't make it int ## Cleanup in maintenance scripts and automated build environment - diff --git a/Gemfile b/Gemfile index e9d70aef2..42688dc40 100644 --- a/Gemfile +++ b/Gemfile @@ -1,218 +1,275 @@ -source 'https://rubygems.org' +source "https://rubygems.org" -gem 'rails', '3.2.20' +gem "rails", "4.2.1" + +# Legacy Rails features, remove me! + +# caches_page +gem "actionpack-action_caching" +gem "actionpack-page_caching" + +# responders (class level) +gem "responders", "2.1.0" # Appserver -gem 'unicorn', '4.8.3', :require => false +gem "unicorn", "4.8.3", require: false # API and JSON -gem 'acts_as_api', '0.4.2' -gem 'json', '1.8.1' +gem "acts_as_api", "0.4.2" +gem "json", "1.8.2" # Authentication -gem 'devise', '3.2.4' -gem 'devise_lastseenable', '0.0.4' +gem "devise", "3.4.1" +gem "devise_lastseenable", "0.0.4" +gem "devise-token_authenticatable", "~> 0.3.0" # Captcha -gem 'galetahub-simple_captcha', '0.1.5', :require => 'simple_captcha' +gem "simple_captcha2", "0.3.4", require: "simple_captcha" # Background processing -gem 'sidekiq', '2.17.7' -gem 'sinatra', '1.3.3' +gem "sidekiq", "3.3.3" +gem "sinatra", "1.4.6" + +# Scheduled processing + +gem "sidetiq", "0.6.3" + +# Compression + +gem "uglifier", "2.7.1" # Configuration -gem 'configurate', '0.0.8' +gem "configurate", "0.2.0" # Cross-origin resource sharing -gem 'rack-cors', '0.2.9', :require => 'rack/cors' +gem "rack-cors", "0.3.1", require: "rack/cors" + +# CSS + +gem "bootstrap-sass", "2.3.2.2" +gem "compass-rails", "2.0.4" +gem "sass-rails", "5.0.1" +gem "autoprefixer-rails", "5.1.7.1" # Database -ENV['DB'] ||= 'mysql' +ENV["DB"] ||= "mysql" -gem 'mysql2', '0.3.16' if ENV['DB'] == 'all' || ENV['DB'] == 'mysql' -gem 'pg', '0.17.1' if ENV['DB'] == 'all' || ENV['DB'] == 'postgres' +gem "mysql2", "0.3.18" if ENV["DB"] == "all" || ENV["DB"] == "mysql" +gem "pg", "0.18.1" if ENV["DB"] == "all" || ENV["DB"] == "postgres" -gem 'activerecord-import', '0.3.1' -gem 'foreigner', '1.6.1' +gem "activerecord-import", "0.7.0" # File uploading -gem 'carrierwave', '0.10.0' -gem 'fog', '1.22.1' -gem 'mini_magick', '3.7.0' -gem 'remotipart', '1.2.1' +gem "carrierwave", "0.10.0" +gem "fog", "1.28.0" +gem "mini_magick", "4.2.0" +gem "remotipart", "1.2.1" # GUID generation -gem 'uuid', '2.3.7' +gem "uuid", "2.3.7" + +# Icons + +gem "entypo-rails", "2.2.2" + +# JavaScript + +gem "backbone-on-rails", "1.1.2" +gem "handlebars_assets", "0.20.1" +gem "jquery-rails", "3.1.2" +gem "js_image_paths", "0.0.2" +gem "js-routes", "1.0.0" + +source "https://rails-assets.org" do + gem "rails-assets-jquery", "1.11.1" # Should be kept in sync with jquery-rails + + gem "rails-assets-markdown-it", "4.2.0" + gem "rails-assets-markdown-it-hashtag", "0.3.0" + gem "rails-assets-markdown-it-diaspora-mention", "0.3.0" + gem "rails-assets-markdown-it-sanitizer", "0.3.0" + gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.0" + gem "rails-assets-markdown-it-sub", "1.0.0" + gem "rails-assets-markdown-it-sup", "1.0.0" + + # jQuery plugins + + gem "rails-assets-jeresig--jquery.hotkeys", "0.2.0" + gem "rails-assets-jquery-idletimer", "1.0.1" + gem "rails-assets-jquery-placeholder", "2.1.1" + gem "rails-assets-jquery-textchange", "0.2.3" + gem "rails-assets-perfect-scrollbar", "0.5.9" +end # Localization -gem 'http_accept_language', '1.0.2' -gem 'i18n-inflector-rails', '1.0.7' -gem 'rails-i18n', '0.7.4' +gem "http_accept_language", "2.0.5" +gem "i18n-inflector-rails", "1.0.7" +gem "rails-i18n", "4.0.4" # Mail -gem 'markerb', '1.0.2' -gem 'messagebus_ruby_api', '1.0.3' +gem "markerb", "1.0.2" +gem "messagebus_ruby_api", "1.0.3" # Parsing -gem 'nokogiri', '1.6.1' -gem 'rails_autolink', '1.1.5' -gem 'redcarpet', '3.2.3' -gem 'roxml', '3.1.6' -gem 'ruby-oembed', '0.8.9' -gem 'opengraph_parser', '0.2.3' - - -# Please remove when migrating to Rails 4 -gem 'strong_parameters', '0.2.3' - +gem "nokogiri", "1.6.6.2" +gem "redcarpet", "3.2.3" +gem "twitter-text", "1.11.0" +gem "roxml", "3.1.6" +gem "ruby-oembed", "0.8.12" +gem "open_graph_reader", "0.5.0" # Services -gem 'omniauth', '1.2.1' -gem 'omniauth-facebook', '1.6.0' -gem 'omniauth-tumblr', '1.1' -gem 'omniauth-twitter', '1.0.1' -gem 'twitter', '4.8.1' -gem 'omniauth-wordpress','0.2.1' +gem "omniauth", "1.2.2" +gem "omniauth-facebook", "1.6.0" +gem "omniauth-tumblr", "1.1" +gem "omniauth-twitter", "1.0.1" +gem "twitter", "4.8.1" +gem "omniauth-wordpress", "0.2.1" + +# Serializers + +gem "active_model_serializers", "0.9.3" + +# XMPP chat dependencies +gem "diaspora-vines", "~> 0.1.27" +gem "rails-assets-diaspora_jsxc", "~> 0.1.1", source: "https://rails-assets.org" # Tags -gem 'acts-as-taggable-on', '3.2.6' +gem "acts-as-taggable-on", "3.5.0" # URIs and HTTP -gem 'addressable', '2.3.6', :require => 'addressable/uri' -gem 'faraday', '0.8.9' -gem 'faraday_middleware', '0.9.0' -gem 'typhoeus', '0.6.8' +gem "addressable", "2.3.7", require: "addressable/uri" +gem "faraday", "0.9.1" +gem "faraday_middleware", "0.9.1" +gem "faraday-cookie_jar", "0.0.6" +gem "typhoeus", "0.7.1" # Views -gem 'gon', '5.0.4' -gem 'haml', '4.0.5' -gem 'mobile-fu', '1.2.2' -gem 'will_paginate', '3.0.5' -gem 'rails-timeago', '2.4.0' +gem "gon", "5.2.3" +gem "haml", "4.0.6" +gem "mobile-fu", "1.3.1" +gem "will_paginate", "3.0.7" +gem "rails-timeago", "2.11.0" # Workarounds # https://github.com/rubyzip/rubyzip#important-note -gem 'zip-zip' +gem "zip-zip" -### GROUPS #### +# Prevent occasions where minitest is not bundled in +# packaged versions of ruby. See following issues/prs: +# https://github.com/gitlabhq/gitlabhq/issues/3826 +# https://github.com/gitlabhq/gitlabhq/pull/3852 +# https://github.com/discourse/discourse/pull/238 +gem "minitest" -group :assets do +# Windows and OSX have an execjs compatible runtime built-in, Linux users should +# install Node.js or use "therubyracer". +# +# See https://github.com/sstephenson/execjs#readme for more supported runtimes - # Icons - gem 'entypo-rails', '2.2.1' - - # CSS - - gem 'bootstrap-sass', '2.2.2.0' - gem 'compass-rails', '1.1.7' - gem 'sass-rails', '3.2.6' - - # Compression - - gem 'uglifier', '2.5.0' - - # JavaScript - - gem 'backbone-on-rails', '1.1.1' - gem 'handlebars_assets', '0.12.0' - gem 'jquery-rails', '3.0.4' - - # Windows and OSX have an execjs compatible runtime built-in, Linux users should - # install Node.js or use 'therubyracer'. - # - # See https://github.com/sstephenson/execjs#readme for more supported runtimes - - # gem 'therubyracer', :platform => :ruby -end - -group :production do # we don't install these on travis to speed up test runs +# gem "therubyracer", :platform => :ruby +group :production do # we don"t install these on travis to speed up test runs # Administration - gem 'rails_admin', '0.4.9' + gem "rails_admin", "0.6.7" # Analytics - gem 'rack-google-analytics', '0.14.0', :require => 'rack/google-analytics' - gem 'rack-piwik', '0.2.2', :require => 'rack/piwik' + gem "rack-google-analytics", "1.2.0" + gem "rack-piwik", "0.3.0", require: "rack/piwik" # Click-jacking protection - gem 'rack-protection', '1.2' + gem "rack-protection", "1.5.3" # Process management - gem 'foreman', '0.62' + gem "foreman", "0.62" # Redirects - gem 'rack-rewrite', '1.5.0', :require => false - gem 'rack-ssl', '1.3.3', :require => 'rack/ssl' + gem "rack-rewrite", "1.5.1", require: false + gem "rack-ssl", "1.4.1", require: "rack/ssl" # Third party asset hosting - gem 'asset_sync', '1.0.0', :require => false + gem "asset_sync", "1.1.0", require: false end group :development do # Automatic test runs - gem 'guard-cucumber', '1.4.1' - gem 'guard-rspec', '4.2.9' - gem 'rb-fsevent', '0.9.4', :require => false - gem 'rb-inotify', '0.9.4', :require => false + gem "guard-cucumber", "1.5.4" + gem "guard-jshintrb", "1.1.1" + gem "guard-rspec", "4.5.0" + gem "guard-rubocop", "1.2.0" + gem "guard", "2.12.5", require: false + gem "rb-fsevent", "0.9.4", require: false + gem "rb-inotify", "0.9.5", require: false + + # Linters + gem "jshintrb", "0.3.0" + gem "rubocop", "0.29.1" # Preloading environment - gem 'guard-spork', '1.5.1' - gem 'spork', '1.0.0rc4' + gem "spring", "1.3.3" + gem "spring-commands-rspec", "1.0.4" + gem "spring-commands-cucumber", "1.0.1" + + # Debugging + gem "pry" + gem "pry-debundle" + gem "pry-byebug" end group :test do # RSpec (unit tests, some integration tests) - gem 'fixture_builder', '0.3.6' - gem 'fuubar', '1.3.3' - gem 'rspec-instafail', '0.2.4', :require => false - gem 'test_after_commit', '0.2.3' + gem "fixture_builder", "0.3.6" + gem "fuubar", "2.0.0" + gem "rspec-instafail", "0.2.6", require: false + gem "test_after_commit", "0.4.1" # Cucumber (integration tests) - gem 'capybara', '2.2.1' - gem 'database_cleaner', '1.3.0' - gem 'selenium-webdriver', '2.42.0' + gem "capybara", "2.4.4" + gem "database_cleaner" , "1.4.1" + gem "selenium-webdriver", "2.45.0" # General helpers - gem 'factory_girl_rails', '4.4.1' - gem 'timecop', '0.7.1' - gem 'webmock', '1.18.0', :require => false + gem "factory_girl_rails", "4.5.0" + gem "timecop", "0.7.3" + gem "webmock", "1.20.4", require: false + gem "shoulda-matchers", "2.8.0", require: false end - group :development, :test do # RSpec (unit tests, some integration tests) - gem "rspec-rails", '2.14.2' + gem "rspec-rails", "3.2.1" # Cucumber (integration tests) - gem 'cucumber-rails', '1.4.1', :require => false + gem "cucumber-rails", "1.4.2", require: false # Jasmine (client side application tests (JS)) - gem 'jasmine', '1.3.2' - gem 'sinon-rails', '1.9.0' + gem "jasmine", "2.2.0" + gem "jasmine-jquery-rails", "2.0.3" + gem "rails-assets-jasmine-ajax", "3.1.0", source: "https://rails-assets.org" + gem "sinon-rails", "1.10.3" end diff --git a/Gemfile.lock b/Gemfile.lock index 86b6f0bc3..87cfbd191 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,47 +1,74 @@ GEM remote: https://rubygems.org/ + remote: https://rails-assets.org/ specs: - actionmailer (3.2.20) - actionpack (= 3.2.20) - mail (~> 2.5.4) - actionpack (3.2.20) - activemodel (= 3.2.20) - activesupport (= 3.2.20) - builder (~> 3.0.0) + CFPropertyList (2.3.1) + actionmailer (4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.1) + actionview (= 4.2.1) + activesupport (= 4.2.1) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionpack-action_caching (1.1.1) + actionpack (>= 4.0.0, < 5.0) + actionpack-page_caching (1.0.2) + actionpack (>= 4.0.0, < 5) + actionview (4.2.1) + activesupport (= 4.2.1) + builder (~> 3.1) erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.20) - activesupport (= 3.2.20) - builder (~> 3.0.0) - activerecord (3.2.20) - activemodel (= 3.2.20) - activesupport (= 3.2.20) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activerecord-import (0.3.1) - activerecord (~> 3.0) - activeresource (3.2.20) - activemodel (= 3.2.20) - activesupport (= 3.2.20) - activesupport (3.2.20) - i18n (~> 0.6, >= 0.6.4) - multi_json (~> 1.0) - acts-as-taggable-on (3.2.6) - activerecord (>= 3, < 5) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + active_model_serializers (0.9.3) + activemodel (>= 3.2) + activejob (4.2.1) + activesupport (= 4.2.1) + globalid (>= 0.3.0) + activemodel (4.2.1) + activesupport (= 4.2.1) + builder (~> 3.1) + activerecord (4.2.1) + activemodel (= 4.2.1) + activesupport (= 4.2.1) + arel (~> 6.0) + activerecord-import (0.7.0) + activerecord (>= 3.0) + activeresource (4.0.0) + activemodel (~> 4.0) + activesupport (~> 4.0) + rails-observers (~> 0.1.1) + activesupport (4.2.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) acts_as_api (0.4.2) activemodel (>= 3.0.0) activesupport (>= 3.0.0) rack (>= 1.1.0) - addressable (2.3.6) - arel (3.0.3) - asset_sync (1.0.0) + addressable (2.3.7) + arel (6.0.0) + asset_sync (1.1.0) activemodel fog (>= 1.8.0) - backbone-on-rails (1.1.1.0) + unf + ast (2.0.0) + astrolabe (1.3.0) + parser (>= 2.2.0.pre.3, < 3.0) + autoprefixer-rails (5.1.7.1) + execjs + json + backbone-on-rails (1.1.2.0) actionmailer actionpack activemodel @@ -50,11 +77,13 @@ GEM ejs jquery-rails railties - bcrypt (3.1.7) - bootstrap-sass (2.2.2.0) + bcrypt (3.1.10) + bootstrap-sass (2.3.2.2) sass (~> 3.2) - builder (3.0.4) - capybara (2.2.1) + builder (3.2.2) + byebug (4.0.3) + columnize (= 0.9.0) + capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) @@ -65,202 +94,321 @@ GEM activesupport (>= 3.2.0) json (>= 1.7) mime-types (>= 1.16) - celluloid (0.15.2) - timers (~> 1.1.0) - childprocess (0.5.3) + celluloid (0.16.0) + timers (~> 4.0.0) + childprocess (0.5.5) ffi (~> 1.0, >= 1.0.11) - chunky_png (1.3.1) + chunky_png (1.3.4) coderay (1.1.0) - coffee-rails (3.2.2) + coffee-rails (4.1.0) coffee-script (>= 2.2.0) - railties (~> 3.2.0) - coffee-script (2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.3.0) coffee-script-source execjs - coffee-script-source (1.7.0) - compass (0.12.6) + coffee-script-source (1.9.1) + columnize (0.9.0) + compass (1.0.3) chunky_png (~> 1.2) - fssm (>= 0.2.7) - sass (~> 3.2.19) - compass-rails (1.1.7) - compass (>= 0.12.2) - sprockets (<= 2.11.0) - configurate (0.0.8) - connection_pool (2.0.0) - crack (0.4.1) - safe_yaml (~> 0.9.0) - cucumber (1.3.15) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + compass-rails (2.0.4) + compass (~> 1.0.0) + sass-rails (<= 5.0.1) + sprockets (< 2.13) + configurate (0.2.0) + connection_pool (2.1.3) + crack (0.4.2) + safe_yaml (~> 1.0.0) + cucumber (1.3.19) builder (>= 2.1.2) diff-lcs (>= 1.1.3) gherkin (~> 2.12) multi_json (>= 1.7.5, < 2.0) - multi_test (>= 0.1.1) - cucumber-rails (1.4.1) + multi_test (>= 0.1.2) + cucumber-rails (1.4.2) capybara (>= 1.1.2, < 3) cucumber (>= 1.3.8, < 2) - mime-types (~> 1.16) + mime-types (>= 1.16, < 3) nokogiri (~> 1.5) rails (>= 3, < 5) - database_cleaner (1.3.0) - devise (3.2.4) + database_cleaner (1.4.1) + devise (3.4.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) + responders thread_safe (~> 0.1) warden (~> 1.2.3) + devise-token_authenticatable (0.3.0) + devise (~> 3.4.0) devise_lastseenable (0.0.4) devise - devise - rails (>= 3.0.4) rails (>= 3.0.4) warden - warden + diaspora-vines (0.1.27) + activerecord (~> 4.1) + bcrypt (~> 3.1) + em-hiredis (~> 0.3.0) + eventmachine (>= 1.0.5, < 1.1) + http_parser.rb (~> 0.6) + nokogiri (~> 1.6) diff-lcs (1.2.5) + domain_name (0.5.23) + unf (>= 0.0.5, < 1.0.0) eco (1.0.0) coffee-script eco-source execjs eco-source (1.1.0.rc.1) ejs (1.1.1) - entypo-rails (2.2.1) + em-hiredis (0.3.0) + eventmachine (~> 1.0) + hiredis (~> 0.5.0) + entypo-rails (2.2.2) railties (>= 3.1, <= 5) erubis (2.7.0) - ethon (0.7.0) + ethon (0.7.3) ffi (>= 1.3.0) - excon (0.34.0) - execjs (2.1.0) - factory_girl (4.4.0) + eventmachine (1.0.7) + excon (0.44.4) + execjs (2.4.0) + factory_girl (4.5.0) activesupport (>= 3.0.0) - factory_girl_rails (4.4.1) - factory_girl (~> 4.4.0) + factory_girl_rails (4.5.0) + factory_girl (~> 4.5.0) railties (>= 3.0.0) - faraday (0.8.9) - multipart-post (~> 1.2.0) - faraday_middleware (0.9.0) - faraday (>= 0.7.4, < 0.9) - ffi (1.9.3) + faraday (0.9.1) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) + faraday_middleware (0.9.1) + faraday (>= 0.7.4, < 0.10) + ffi (1.9.8) + fission (0.5.0) + CFPropertyList (~> 2.2) fixture_builder (0.3.6) activerecord (>= 2) activesupport (>= 2) - fog (1.22.1) - fog-brightbox - fog-core (~> 1.22) + fog (1.28.0) + fog-atmos + fog-aws (~> 0.0) + fog-brightbox (~> 0.4) + fog-core (~> 1.27, >= 1.27.3) + fog-ecloud fog-json + fog-profitbricks + fog-radosgw (>= 0.0.2) + fog-riakcs + fog-sakuracloud (>= 0.0.4) + fog-serverlove + fog-softlayer + fog-storm_on_demand + fog-terremark + fog-vmfusion + fog-voxel + fog-xml (~> 0.1.1) ipaddress (~> 0.5) nokogiri (~> 1.5, >= 1.5.11) - fog-brightbox (0.0.2) + fog-atmos (0.1.0) fog-core + fog-xml + fog-aws (0.1.1) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-brightbox (0.7.1) + fog-core (~> 1.22) fog-json - fog-core (1.22.0) + inflecto (~> 0.0.2) + fog-core (1.29.0) builder - excon (~> 0.33) + excon (~> 0.38) formatador (~> 0.2) mime-types net-scp (~> 1.1) net-ssh (>= 2.1.3) + fog-ecloud (0.0.2) + fog-core + fog-xml fog-json (1.0.0) multi_json (~> 1.0) - font-awesome-rails (3.2.1.2) + fog-profitbricks (0.0.2) + fog-core + fog-xml + nokogiri + fog-radosgw (0.0.3) + fog-core (>= 1.21.0) + fog-json + fog-xml (>= 0.0.1) + fog-riakcs (0.1.0) + fog-core + fog-json + fog-xml + fog-sakuracloud (1.0.0) + fog-core + fog-json + fog-serverlove (0.1.1) + fog-core + fog-json + fog-softlayer (0.4.1) + fog-core + fog-json + fog-storm_on_demand (0.1.0) + fog-core + fog-json + fog-terremark (0.0.4) + fog-core + fog-xml + fog-vmfusion (0.0.1) + fission + fog-core + fog-voxel (0.0.2) + fog-core + fog-xml + fog-xml (0.1.1) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.3.0.0) railties (>= 3.2, < 5.0) - foreigner (1.6.1) - activerecord (>= 3.0.0) foreman (0.62.0) thor (>= 0.13.6) formatador (0.2.5) - fssm (0.2.10) - fuubar (1.3.3) - rspec (>= 2.14.0, < 3.1.0) + fuubar (2.0.0) + rspec (~> 3.0) ruby-progressbar (~> 1.4) - galetahub-simple_captcha (0.1.5) gherkin (2.12.2) multi_json (~> 1.3) - gon (5.0.4) + globalid (0.3.3) + activesupport (>= 4.1.0) + gon (5.2.3) actionpack (>= 2.3.0) json - guard (2.6.1) + multi_json + request_store (>= 1.0.5) + guard (2.12.5) formatador (>= 0.2.4) listen (~> 2.7) lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) pry (>= 0.9.12) + shellany (~> 0.0) thor (>= 0.18.1) - guard-cucumber (1.4.1) - cucumber (>= 1.2.0) - guard (>= 1.1.0) - guard-rspec (4.2.9) + guard-compat (1.2.1) + guard-cucumber (1.5.4) + cucumber (>= 1.3.0) + guard-compat (~> 1.0) + nenv (~> 0.1) + guard-jshintrb (1.1.1) + guard (~> 2.0) + jshintrb + guard-rspec (4.5.0) guard (~> 2.1) - rspec (>= 2.14, < 4.0) - guard-spork (1.5.1) - childprocess (>= 0.2.3) - guard (>= 1.1) - spork (>= 0.8.4) - haml (4.0.5) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.2.0) + guard (~> 2.0) + rubocop (~> 0.20) + haml (4.0.6) tilt - handlebars_assets (0.12.0) - execjs (>= 1.2.9) - sprockets (>= 2.0.3) - tilt - hashie (2.1.1) + handlebars_assets (0.20.1) + execjs (~> 2.0) + multi_json (~> 1.0) + sprockets (~> 2.0) + tilt (~> 1.2) + hashie (3.4.0) hike (1.2.3) - http_accept_language (1.0.2) - i18n (0.6.11) + hiredis (0.5.2) + hitimes (1.2.2) + http-cookie (1.0.2) + domain_name (~> 0.5) + http_accept_language (2.0.5) + http_parser.rb (0.6.0) + i18n (0.7.0) i18n-inflector (2.6.7) i18n (>= 0.4.1) i18n-inflector-rails (1.0.7) actionpack (>= 3.0.0) i18n-inflector (~> 2.6) railties (>= 3.0.0) + ice_cube (0.11.1) + inflecto (0.0.2) ipaddress (0.8.0) - jasmine (1.3.2) - jasmine-core (~> 1.3.1) - rack (~> 1.0) - rspec (>= 1.3.1) - selenium-webdriver (>= 0.1.3) - jasmine-core (1.3.1) - journey (1.0.4) - jquery-rails (3.0.4) + jasmine (2.2.0) + jasmine-core (~> 2.2) + phantomjs + rack (>= 1.2.1) + rake + jasmine-core (2.2.0) + jasmine-jquery-rails (2.0.3) + jquery-rails (3.1.2) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (3.0.1) - jquery-rails - railties (>= 3.1.0) - json (1.8.1) - jwt (1.0.0) - kaminari (0.15.1) + jquery-ui-rails (5.0.3) + railties (>= 3.2.16) + js-routes (1.0.0) + railties (>= 3.2) + sprockets-rails + js_image_paths (0.0.2) + rails (~> 4.0) + jshintrb (0.3.0) + execjs + multi_json (>= 1.3) + rake + json (1.8.2) + jwt (1.4.1) + kaminari (0.16.3) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - kgio (2.9.2) - listen (2.7.5) + kgio (2.9.3) + listen (2.9.0) celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - lumberjack (1.0.6) - macaddr (1.6.1) - systemu (~> 2.5.0) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) + loofah (2.0.1) + nokogiri (>= 1.5.9) + lumberjack (1.0.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.3) + mime-types (>= 1.16, < 3) markerb (1.0.2) redcarpet (>= 2.0) messagebus_ruby_api (1.0.3) method_source (0.8.2) - mime-types (1.25.1) - mini_magick (3.7.0) - subexec (~> 0.2.1) - mini_portile (0.5.3) - mobile-fu (1.2.2) + mime-types (2.4.3) + mini_magick (4.2.0) + mini_portile (0.6.2) + minitest (5.5.1) + mobile-fu (1.3.1) rack-mobile-detect rails - multi_json (1.10.1) - multi_test (0.1.1) + multi_json (1.11.0) + multi_test (0.1.2) multi_xml (0.5.5) - multipart-post (1.2.0) - mysql2 (0.3.16) + multipart-post (2.0.0) + mysql2 (0.3.18) + nenv (0.2.0) nested_form (0.3.2) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (2.9.1) - nokogiri (1.6.1) - mini_portile (~> 0.5.0) + net-ssh (2.9.2) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + notiffany (0.0.6) + nenv (~> 0.1) + shellany (~> 0.0) oauth (0.4.7) oauth2 (0.9.4) faraday (>= 0.8, < 0.10) @@ -268,8 +416,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) - omniauth (1.2.1) - hashie (>= 1.2, < 3) + omniauth (1.2.2) + hashie (>= 1.2, < 4) rack (~> 1.0) omniauth-facebook (1.6.0) omniauth-oauth2 (~> 1.1) @@ -288,178 +436,257 @@ GEM omniauth-oauth (~> 1.0) omniauth-wordpress (0.2.1) omniauth-oauth2 (~> 1.1.0) - opengraph_parser (0.2.3) - addressable - nokogiri + open_graph_reader (0.5.0) + faraday (~> 0.9.0) + nokogiri (~> 1.6) orm_adapter (0.5.0) - polyglot (0.3.5) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) + parser (2.2.0.3) + ast (>= 1.1, < 3.0) + phantomjs (1.9.8.0) + powerpack (0.1.0) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-cors (0.2.9) - rack-google-analytics (0.14.0) + pry-byebug (3.1.0) + byebug (~> 4.0) + pry (~> 0.10) + pry-debundle (0.8) + pry + rack (1.6.0) + rack-cors (0.3.1) + rack-google-analytics (1.2.0) actionpack activesupport rack-mobile-detect (0.4.0) rack - rack-piwik (0.2.2) - rack-pjax (0.7.0) + rack-piwik (0.3.0) + rack-pjax (0.8.0) nokogiri (~> 1.5) - rack (~> 1.3) - rack-protection (1.2.0) + rack (~> 1.1) + rack-protection (1.5.3) rack - rack-rewrite (1.5.0) - rack-ssl (1.3.3) + rack-rewrite (1.5.1) + rack-ssl (1.4.1) rack - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) - rails (3.2.20) - actionmailer (= 3.2.20) - actionpack (= 3.2.20) - activerecord (= 3.2.20) - activeresource (= 3.2.20) - activesupport (= 3.2.20) - bundler (~> 1.0) - railties (= 3.2.20) - rails-i18n (0.7.4) - i18n (~> 0.5) - rails-timeago (2.4.0) + rails (4.2.1) + actionmailer (= 4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + activemodel (= 4.2.1) + activerecord (= 4.2.1) + activesupport (= 4.2.1) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.1) + sprockets-rails + rails-assets-diaspora_jsxc (0.1.1) + rails-assets-jquery (~> 1.11.1) + rails-assets-jquery-colorbox (~> 1.5.14) + rails-assets-jquery-fullscreen (~> 1.1.4) + rails-assets-jquery-ui (~> 1.10.4) + rails-assets-jquery.slimscroll (~> 1.3.3) + rails-assets-jasmine (2.2.1) + rails-assets-jasmine-ajax (3.1.0) + rails-assets-jasmine (~> 2.0) + rails-assets-jeresig--jquery.hotkeys (0.2.0) + rails-assets-jquery (>= 1.4.2) + rails-assets-jquery (1.11.1) + rails-assets-jquery-colorbox (1.5.15) + rails-assets-jquery (>= 1.3.2) + rails-assets-jquery-fullscreen (1.1.4) + rails-assets-jquery-idletimer (1.0.1) + rails-assets-jquery-placeholder (2.1.1) + rails-assets-jquery (>= 1.6) + rails-assets-jquery-textchange (0.2.3) + rails-assets-jquery + rails-assets-jquery-ui (1.10.4) + rails-assets-jquery (>= 1.6) + rails-assets-jquery.slimscroll (1.3.3) + rails-assets-jquery (>= 1.7) + rails-assets-markdown-it--markdown-it-for-inline (0.1.0) + rails-assets-markdown-it (4.2.0) + rails-assets-markdown-it-diaspora-mention (0.3.0) + rails-assets-markdown-it-hashtag (0.3.0) + rails-assets-markdown-it-sanitizer (0.3.0) + rails-assets-markdown-it-sub (1.0.0) + rails-assets-markdown-it-sup (1.0.0) + rails-assets-perfect-scrollbar (0.5.9) + rails-assets-jquery (>= 1.10) + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.6) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.2) + loofah (~> 2.0) + rails-i18n (4.0.4) + i18n (~> 0.6) + railties (~> 4.0) + rails-observers (0.1.2) + activemodel (~> 4.0) + rails-timeago (2.11.0) actionpack (>= 3.1) activesupport (>= 3.1) - rails_admin (0.4.9) - bootstrap-sass (~> 2.2) - builder (~> 3.0) - coffee-rails (>= 3.1, < 5) - font-awesome-rails (~> 3.0) + rails_admin (0.6.7) + builder (~> 3.1) + coffee-rails (~> 4.0) + font-awesome-rails (>= 3.0, < 5) haml (~> 4.0) - jquery-rails (>= 2.1, < 4) - jquery-ui-rails (~> 3.0) + jquery-rails (>= 3.0, < 5) + jquery-ui-rails (~> 5.0) kaminari (~> 0.14) nested_form (~> 0.3) - rack-pjax (~> 0.6) - rails (~> 3.1) + rack-pjax (~> 0.7) + rails (~> 4.0) remotipart (~> 1.0) - safe_yaml (~> 0.6) - sass-rails (~> 3.1) - rails_autolink (1.1.5) - rails (> 3.1) - railties (3.2.20) - actionpack (= 3.2.20) - activesupport (= 3.2.20) - rack-ssl (~> 1.3.2) + safe_yaml (~> 1.0) + sass-rails (>= 4.0, < 6) + railties (4.2.1) + actionpack (= 4.2.1) + activesupport (= 4.2.1) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) + thor (>= 0.18.1, < 2.0) + rainbow (2.0.0) raindrops (0.13.0) - rake (10.3.2) + rake (10.4.2) rb-fsevent (0.9.4) - rb-inotify (0.9.4) + rb-inotify (0.9.5) ffi (>= 0.5.0) - rdoc (3.12.2) - json (~> 1.4) redcarpet (3.2.3) - redis (3.1.0) + redis (3.2.1) redis-namespace (1.5.1) redis (~> 3.0, >= 3.0.4) remotipart (1.2.1) + request_store (1.1.0) + responders (2.1.0) + railties (>= 4.2.0, < 5) roxml (3.1.6) activesupport (>= 2.3.0) nokogiri (>= 1.3.3) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.8) - rspec-expectations (2.14.5) - diff-lcs (>= 1.1.3, < 2.0) - rspec-instafail (0.2.4) - rspec-mocks (2.14.6) - rspec-rails (2.14.2) - actionpack (>= 3.0) - activemodel (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - ruby-oembed (0.8.9) - ruby-progressbar (1.5.1) - rubyzip (1.1.4) - safe_yaml (0.9.7) - sass (3.2.19) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) - selenium-webdriver (2.42.0) - childprocess (>= 0.5.0) + rspec (3.2.0) + rspec-core (~> 3.2.0) + rspec-expectations (~> 3.2.0) + rspec-mocks (~> 3.2.0) + rspec-core (3.2.2) + rspec-support (~> 3.2.0) + rspec-expectations (3.2.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.2.0) + rspec-instafail (0.2.6) + rspec + rspec-mocks (3.2.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.2.0) + rspec-rails (3.2.1) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.2.0) + rspec-expectations (~> 3.2.0) + rspec-mocks (~> 3.2.0) + rspec-support (~> 3.2.0) + rspec-support (3.2.2) + rubocop (0.29.1) + astrolabe (~> 1.3) + parser (>= 2.2.0.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.4) + ruby-oembed (0.8.12) + ruby-progressbar (1.7.5) + rubyzip (1.1.7) + safe_yaml (1.0.4) + sass (3.4.13) + sass-rails (5.0.1) + railties (>= 4.0.0, < 5.0) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (~> 1.1) + selenium-webdriver (2.45.0) + childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) - websocket (~> 1.0.4) - sidekiq (2.17.7) - celluloid (>= 0.15.2) - connection_pool (>= 1.0.0) + websocket (~> 1.0) + shellany (0.0.1) + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (3.3.3) + celluloid (>= 0.16.0) + connection_pool (>= 2.1.1) json redis (>= 3.0.6) redis-namespace (>= 1.3.1) + sidetiq (0.6.3) + celluloid (>= 0.14.1) + ice_cube (= 0.11.1) + sidekiq (>= 3.0.0) + simple_captcha2 (0.3.4) + rails (>= 4.1) simple_oauth (0.2.0) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) - sinon-rails (1.9.0) + sinatra (1.4.6) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + sinon-rails (1.10.3) railties (>= 3.1) - slop (3.5.0) - spork (1.0.0rc4) - sprockets (2.2.3) + slop (3.6.0) + spring (1.3.3) + spring-commands-cucumber (1.0.1) + spring (>= 0.9.1) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + sprockets (2.12.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - strong_parameters (0.2.3) - actionpack (~> 3.0) - activemodel (~> 3.0) - activesupport (~> 3.0) - railties (~> 3.0) - subexec (0.2.3) - systemu (2.5.2) - test_after_commit (0.2.3) + sprockets-rails (2.2.4) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (>= 2.8, < 4.0) + systemu (2.6.5) + test_after_commit (0.4.1) + activerecord (>= 3.2) thor (0.19.1) - thread_safe (0.3.4) + thread_safe (0.3.5) tilt (1.4.1) - timecop (0.7.1) - timers (1.1.0) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) + timecop (0.7.3) + timers (4.0.1) + hitimes twitter (4.8.1) faraday (~> 0.8, < 0.10) multi_json (~> 1.0) simple_oauth (~> 0.2) - typhoeus (0.6.8) - ethon (>= 0.7.0) - tzinfo (0.3.42) - uglifier (2.5.0) + twitter-text (1.11.0) + unf (~> 0.1.0) + typhoeus (0.7.1) + ethon (>= 0.7.1) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (2.7.1) execjs (>= 0.3.0) json (>= 1.8.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.6) unicorn (4.8.3) kgio (~> 2.6) rack raindrops (~> 0.7) uuid (2.3.7) macaddr (~> 1.0) - rack (>= 1.0) warden (1.2.3) rack (>= 1.0) - webmock (1.18.0) + webmock (1.20.4) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket (1.0.7) - will_paginate (3.0.5) + websocket (1.2.1) + will_paginate (3.0.7) xpath (2.0.0) nokogiri (~> 1.3) zip-zip (0.3) @@ -469,87 +696,123 @@ PLATFORMS ruby DEPENDENCIES - activerecord-import (= 0.3.1) - acts-as-taggable-on (= 3.2.6) + actionpack-action_caching + actionpack-page_caching + active_model_serializers (= 0.9.3) + activerecord-import (= 0.7.0) + acts-as-taggable-on (= 3.5.0) acts_as_api (= 0.4.2) - addressable (= 2.3.6) - asset_sync (= 1.0.0) - backbone-on-rails (= 1.1.1) - bootstrap-sass (= 2.2.2.0) - capybara (= 2.2.1) + addressable (= 2.3.7) + asset_sync (= 1.1.0) + autoprefixer-rails (= 5.1.7.1) + backbone-on-rails (= 1.1.2) + bootstrap-sass (= 2.3.2.2) + capybara (= 2.4.4) carrierwave (= 0.10.0) - compass-rails (= 1.1.7) - configurate (= 0.0.8) - cucumber-rails (= 1.4.1) - database_cleaner (= 1.3.0) - devise (= 3.2.4) + compass-rails (= 2.0.4) + configurate (= 0.2.0) + cucumber-rails (= 1.4.2) + database_cleaner (= 1.4.1) + devise (= 3.4.1) + devise-token_authenticatable (~> 0.3.0) devise_lastseenable (= 0.0.4) - entypo-rails (= 2.2.1) - factory_girl_rails (= 4.4.1) - faraday (= 0.8.9) - faraday_middleware (= 0.9.0) + diaspora-vines (~> 0.1.27) + entypo-rails (= 2.2.2) + factory_girl_rails (= 4.5.0) + faraday (= 0.9.1) + faraday-cookie_jar (= 0.0.6) + faraday_middleware (= 0.9.1) fixture_builder (= 0.3.6) - fog (= 1.22.1) - foreigner (= 1.6.1) + fog (= 1.28.0) foreman (= 0.62) - fuubar (= 1.3.3) - galetahub-simple_captcha (= 0.1.5) - gon (= 5.0.4) - guard-cucumber (= 1.4.1) - guard-rspec (= 4.2.9) - guard-spork (= 1.5.1) - haml (= 4.0.5) - handlebars_assets (= 0.12.0) - http_accept_language (= 1.0.2) + fuubar (= 2.0.0) + gon (= 5.2.3) + guard (= 2.12.5) + guard-cucumber (= 1.5.4) + guard-jshintrb (= 1.1.1) + guard-rspec (= 4.5.0) + guard-rubocop (= 1.2.0) + haml (= 4.0.6) + handlebars_assets (= 0.20.1) + http_accept_language (= 2.0.5) i18n-inflector-rails (= 1.0.7) - jasmine (= 1.3.2) - jquery-rails (= 3.0.4) - json (= 1.8.1) + jasmine (= 2.2.0) + jasmine-jquery-rails (= 2.0.3) + jquery-rails (= 3.1.2) + js-routes (= 1.0.0) + js_image_paths (= 0.0.2) + jshintrb (= 0.3.0) + json (= 1.8.2) markerb (= 1.0.2) messagebus_ruby_api (= 1.0.3) - mini_magick (= 3.7.0) - mobile-fu (= 1.2.2) - mysql2 (= 0.3.16) - nokogiri (= 1.6.1) - omniauth (= 1.2.1) + mini_magick (= 4.2.0) + minitest + mobile-fu (= 1.3.1) + mysql2 (= 0.3.18) + nokogiri (= 1.6.6.2) + omniauth (= 1.2.2) omniauth-facebook (= 1.6.0) omniauth-tumblr (= 1.1) omniauth-twitter (= 1.0.1) omniauth-wordpress (= 0.2.1) - opengraph_parser (= 0.2.3) - rack-cors (= 0.2.9) - rack-google-analytics (= 0.14.0) - rack-piwik (= 0.2.2) - rack-protection (= 1.2) - rack-rewrite (= 1.5.0) - rack-ssl (= 1.3.3) - rails (= 3.2.20) - rails-i18n (= 0.7.4) - rails-timeago (= 2.4.0) - rails_admin (= 0.4.9) - rails_autolink (= 1.1.5) + open_graph_reader (= 0.5.0) + pry + pry-byebug + pry-debundle + rack-cors (= 0.3.1) + rack-google-analytics (= 1.2.0) + rack-piwik (= 0.3.0) + rack-protection (= 1.5.3) + rack-rewrite (= 1.5.1) + rack-ssl (= 1.4.1) + rails (= 4.2.1) + rails-assets-diaspora_jsxc (~> 0.1.1)! + rails-assets-jasmine-ajax (= 3.1.0)! + rails-assets-jeresig--jquery.hotkeys (= 0.2.0)! + rails-assets-jquery (= 1.11.1)! + rails-assets-jquery-idletimer (= 1.0.1)! + rails-assets-jquery-placeholder (= 2.1.1)! + rails-assets-jquery-textchange (= 0.2.3)! + rails-assets-markdown-it (= 4.2.0)! + rails-assets-markdown-it--markdown-it-for-inline (= 0.1.0)! + rails-assets-markdown-it-diaspora-mention (= 0.3.0)! + rails-assets-markdown-it-hashtag (= 0.3.0)! + rails-assets-markdown-it-sanitizer (= 0.3.0)! + rails-assets-markdown-it-sub (= 1.0.0)! + rails-assets-markdown-it-sup (= 1.0.0)! + rails-assets-perfect-scrollbar (= 0.5.9)! + rails-i18n (= 4.0.4) + rails-timeago (= 2.11.0) + rails_admin (= 0.6.7) rb-fsevent (= 0.9.4) - rb-inotify (= 0.9.4) + rb-inotify (= 0.9.5) redcarpet (= 3.2.3) remotipart (= 1.2.1) + responders (= 2.1.0) roxml (= 3.1.6) - rspec-instafail (= 0.2.4) - rspec-rails (= 2.14.2) - ruby-oembed (= 0.8.9) - sass-rails (= 3.2.6) - selenium-webdriver (= 2.42.0) - sidekiq (= 2.17.7) - sinatra (= 1.3.3) - sinon-rails (= 1.9.0) - spork (= 1.0.0rc4) - strong_parameters (= 0.2.3) - test_after_commit (= 0.2.3) - timecop (= 0.7.1) + rspec-instafail (= 0.2.6) + rspec-rails (= 3.2.1) + rubocop (= 0.29.1) + ruby-oembed (= 0.8.12) + sass-rails (= 5.0.1) + selenium-webdriver (= 2.45.0) + shoulda-matchers (= 2.8.0) + sidekiq (= 3.3.3) + sidetiq (= 0.6.3) + simple_captcha2 (= 0.3.4) + sinatra (= 1.4.6) + sinon-rails (= 1.10.3) + spring (= 1.3.3) + spring-commands-cucumber (= 1.0.1) + spring-commands-rspec (= 1.0.4) + test_after_commit (= 0.4.1) + timecop (= 0.7.3) twitter (= 4.8.1) - typhoeus (= 0.6.8) - uglifier (= 2.5.0) + twitter-text (= 1.11.0) + typhoeus (= 0.7.1) + uglifier (= 2.7.1) unicorn (= 4.8.3) uuid (= 2.3.7) - webmock (= 1.18.0) - will_paginate (= 3.0.5) + webmock (= 1.20.4) + will_paginate (= 3.0.7) zip-zip diff --git a/Guardfile b/Guardfile index 6da0408e0..ec3eade0c 100644 --- a/Guardfile +++ b/Guardfile @@ -1,38 +1,45 @@ -# A sample Guardfile -# More info at https://github.com/guard/guard#readme -# also, http://asciicasts.com/episodes/264-guard -guard 'rspec', :all_on_start => false, :all_after_pass => false do - watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } - watch('spec/spec_helper.rb') { "spec" } +guard :rspec, cmd: "bin/spring rspec", all_on_start: false, all_after_pass: false do + watch(/^spec\/.+_spec\.rb$/) + watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" } + watch(/spec\/spec_helper.rb/) { "spec" } # Rails example - watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } - watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } + watch(/^spec\/.+_spec\.rb$/) + watch(/^app\/(.+)\.rb$/) {|m| "spec/#{m[1]}_spec.rb" } + watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" } + watch(%r{^app/controllers/(.+)_(controller)\.rb$}) {|m| + ["spec/routing/#{m[1]}_routing_spec.rb", + "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", + "spec/acceptance/#{m[1]}_spec.rb"] + } watch(%r{^spec/support/(.+)\.rb$}) { "spec" } - watch('spec/spec_helper.rb') { "spec" } - watch('config/routes.rb') { "spec/routing" } - watch('app/controllers/application_controller.rb') { "spec/controllers" } + watch("spec/spec_helper.rb") { "spec" } + watch("config/routes.rb") { "spec/routing" } + watch("app/controllers/application_controller.rb") { "spec/controllers" } + # Capybara request specs - watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } + watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) {|m| "spec/requests/#{m[1]}_spec.rb" } end -guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :all_on_start => false, :all_after_pass => false, :wait => 70 do - watch('config/application.rb') - watch('config/environment.rb') - watch(%r{^config/environments/.+\.rb$}) - watch(%r{^config/initializers/.+\.rb$}) - watch('Gemfile') - watch('Gemfile.lock') - watch('spec/spec_helper.rb') { :rspec } - watch('test/test_helper.rb') { :test_unit } - watch(%r{features/support/}) { :cucumber } +guard(:cucumber, + command_prefix: "bin/spring", + bundler: false, + all_on_start: false, + all_after_pass: false) do + watch(/^features\/.+\.feature$/) + watch(%r{^features/support/.+$}) { "features" } + watch(%r{^features/step_definitions/(.+)_steps\.rb$}) {|m| + Dir[File.join("**/#{m[1]}.feature")][0] || "features" + } end -guard 'cucumber', :all_on_start => false, :all_after_pass => false do - watch(%r{^features/.+\.feature$}) - watch(%r{^features/support/.+$}) { 'features' } - watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } +guard :rubocop, all_on_start: false, keep_failed: false do + watch(/(?:app|config|db|lib|features|spec)\/.+\.rb$/) + watch(/(config.ru|Gemfile|Guardfile|Rakefile)$/) +end + +guard :jshintrb do + watch(/^app\/assets\/javascripts\/.+\.js$/) + watch(/^lib\/assets\/javascripts\/.+\.js$/) + watch(/^spec\/javascripts\/.+\.js$/) end diff --git a/Procfile b/Procfile index 109ee2337..4119cf536 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,3 @@ -web: bundle exec unicorn_rails -c config/unicorn.rb -p $PORT -sidekiq: bundle exec sidekiq +web: bin/bundle exec unicorn_rails -c config/unicorn.rb -p $PORT +sidekiq: bin/bundle exec sidekiq +xmpp: bin/bundle exec vines start diff --git a/README.md b/README.md index ba5e33104..d3d76092e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # diaspora* -### a privacy aware, distributed, open source social network +### a privacy-aware, distributed, open source social network **master:** [![Build Status master](https://secure.travis-ci.org/diaspora/diaspora.png?branch=master)](http://travis-ci.org/diaspora/diaspora) **develop:** [![Build Status develop](https://secure.travis-ci.org/diaspora/diaspora.png?branch=develop)](http://travis-ci.org/diaspora/diaspora) | diff --git a/app/assets/images/branding/header-logo_hover.png b/app/assets/images/branding/header-logo_hover.png new file mode 100644 index 000000000..dae58b943 Binary files /dev/null and b/app/assets/images/branding/header-logo_hover.png differ diff --git a/app/assets/images/close_label.png b/app/assets/images/close_label.png deleted file mode 100644 index 53aa1d3ce..000000000 Binary files a/app/assets/images/close_label.png and /dev/null differ diff --git a/app/assets/images/facebox/loading.gif b/app/assets/images/facebox/loading.gif old mode 100755 new mode 100644 diff --git a/app/assets/images/icons/circle.png b/app/assets/images/icons/circle.png deleted file mode 100644 index 944a88391..000000000 Binary files a/app/assets/images/icons/circle.png and /dev/null differ diff --git a/app/assets/images/icons/create_participation.png b/app/assets/images/icons/create_participation.png new file mode 100644 index 000000000..7496495b9 Binary files /dev/null and b/app/assets/images/icons/create_participation.png differ diff --git a/app/assets/images/icons/destroy_participation.png b/app/assets/images/icons/destroy_participation.png new file mode 100644 index 000000000..f13d187a6 Binary files /dev/null and b/app/assets/images/icons/destroy_participation.png differ diff --git a/app/assets/images/icons/menu.png b/app/assets/images/icons/menu.png old mode 100755 new mode 100644 diff --git a/public/peeping-tom.png b/app/assets/images/peeping-tom.png similarity index 100% rename from public/peeping-tom.png rename to app/assets/images/peeping-tom.png diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js index efb3232a8..de6913f21 100644 --- a/app/assets/javascripts/app/app.js +++ b/app/assets/javascripts/app/app.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require_self //= require_tree ./helpers @@ -12,6 +14,8 @@ //= require_tree ./collections //= require_tree ./views +//= require perfect-scrollbar + var app = { collections: {}, models: {}, @@ -31,13 +35,11 @@ var app = { events: _.extend({}, Backbone.Events), user: function(userAttrs) { - if(userAttrs) { return this._user = new app.models.User(userAttrs) } - return this._user || false - }, - - baseImageUrl: function(baseUrl){ - if(baseUrl) { return this._baseImageUrl = baseUrl } - return this._baseImageUrl || "assets/" + if(userAttrs) { + this._user = new app.models.User(userAttrs); + return this._user; + } + return this._user || false; }, initialize: function() { @@ -53,25 +55,25 @@ var app = { }, hasPreload : function(prop) { - return !!(window.gon.preloads && window.gon.preloads[prop]) //returning boolean variable so that parsePreloads, which cleans up properly is used instead + return !!(window.gon.preloads && window.gon.preloads[prop]); //returning boolean variable so that parsePreloads, which cleans up properly is used instead }, setPreload : function(prop, val) { - window.gon.preloads = window.gon.preloads || {} - window.gon.preloads[prop] = val + window.gon.preloads = window.gon.preloads || {}; + window.gon.preloads[prop] = val; }, parsePreload : function(prop) { if(!app.hasPreload(prop)) { return } - var preload = window.gon.preloads[prop] - delete window.gon.preloads[prop] //prevent dirty state across navigates + var preload = window.gon.preloads[prop]; + delete window.gon.preloads[prop]; //prevent dirty state across navigates - return(preload) + return(preload); }, setupDummyPreloads: function() { - if (window.gon == undefined) { + if (window.gon === undefined) { window.gon = {preloads:{}}; } }, @@ -89,8 +91,8 @@ var app = { }, setupFacebox: function() { - $.facebox.settings.closeImage = app.baseImageUrl()+'facebox/closelabel.png'; - $.facebox.settings.loadingImage = app.baseImageUrl()+'facebox/loading.gif'; + $.facebox.settings.closeImage = ImagePaths.get('facebox/closelabel.png'); + $.facebox.settings.loadingImage = ImagePaths.get('facebox/loading.gif'); $.facebox.settings.opacity = 0.75; }, @@ -102,14 +104,13 @@ var app = { evt.preventDefault(); var link = $(this); - $(".stream_title").text(link.text()) - app.router.navigate(link.attr("href").substring(1) ,true) + $(".stream_title").text(link.text()); + app.router.navigate(link.attr("href").substring(1) ,true); }); }, setupGlobalViews: function() { app.hovercard = new app.views.Hovercard(); - app.aspectMembershipsBlueprint = new app.views.AspectMembershipBlueprint(); $('.aspect_membership_dropdown').each(function(){ new app.views.AspectMembership({el: this}); }); @@ -119,7 +120,7 @@ var app = { /* mixpanel wrapper function */ instrument : function(type, name, object, callback) { if(!window.mixpanel) { return } - window.mixpanel[type](name, object, callback) + window.mixpanel[type](name, object, callback); }, setupDisabledLinks: function() { @@ -132,3 +133,4 @@ var app = { $(function() { app.initialize(); }); +// @license-end diff --git a/app/assets/javascripts/app/collections/aspect_memberships.js b/app/assets/javascripts/app/collections/aspect_memberships.js new file mode 100644 index 000000000..dc3c0410b --- /dev/null +++ b/app/assets/javascripts/app/collections/aspect_memberships.js @@ -0,0 +1,6 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.collections.AspectMemberships = Backbone.Collection.extend({ + model: app.models.AspectMembership +}); +// @license-end diff --git a/app/assets/javascripts/app/collections/aspects.js b/app/assets/javascripts/app/collections/aspects.js index 33c9cb56c..1e284274b 100644 --- a/app/assets/javascripts/app/collections/aspects.js +++ b/app/assets/javascripts/app/collections/aspects.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Aspects = Backbone.Collection.extend({ model: app.models.Aspect, @@ -23,4 +25,5 @@ app.collections.Aspects = Backbone.Collection.extend({ var separator = Diaspora.I18n.t("comma") + ' '; return this.selectedAspects('name').join(separator).replace(/,\s([^,]+)$/, ' ' + Diaspora.I18n.t("and") + ' $1') || Diaspora.I18n.t("my_aspects"); } -}) +}); +// @license-end diff --git a/app/assets/javascripts/app/collections/comments.js b/app/assets/javascripts/app/collections/comments.js index 06ae95fe2..f096363e0 100644 --- a/app/assets/javascripts/app/collections/comments.js +++ b/app/assets/javascripts/app/collections/comments.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Comments = Backbone.Collection.extend({ model: app.models.Comment, url: function() { return _.result(this.post, 'url') + '/comments'; }, @@ -14,11 +16,12 @@ app.collections.Comments = Backbone.Collection.extend({ var deferred = comment.save({}, { url: '/posts/'+this.post.id+'/comments', success: function() { - comment.set({author: app.currentUser.toJSON(), parent: self.post }) - self.add(comment) + comment.set({author: app.currentUser.toJSON(), parent: self.post }); + self.add(comment); } }); return deferred; } }); +// @license-end diff --git a/app/assets/javascripts/app/collections/contacts.js b/app/assets/javascripts/app/collections/contacts.js new file mode 100644 index 000000000..d0592155f --- /dev/null +++ b/app/assets/javascripts/app/collections/contacts.js @@ -0,0 +1,21 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.collections.Contacts = Backbone.Collection.extend({ + model: app.models.Contact, + + comparator : function(con1, con2) { + if( !con1.person || !con2.person ) return 1; + + if(app.aspect) { + var inAspect1 = con1.inAspect(app.aspect.get('id')); + var inAspect2 = con2.inAspect(app.aspect.get('id')); + if( inAspect1 && !inAspect2 ) return -1; + if( !inAspect1 && inAspect2 ) return 1; + } + + var n1 = con1.person.get('name'); + var n2 = con2.person.get('name'); + return n1.localeCompare(n2); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/collections/likes.js b/app/assets/javascripts/app/collections/likes.js index 01831d4f9..76168237b 100644 --- a/app/assets/javascripts/app/collections/likes.js +++ b/app/assets/javascripts/app/collections/likes.js @@ -1,7 +1,10 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Likes = Backbone.Collection.extend({ model: app.models.Like, initialize : function(models, options) { - this.url = "/posts/" + options.post.id + "/likes" //not delegating to post.url() because when it is in a stream collection it delegates to that url + this.url = "/posts/" + options.post.id + "/likes"; //not delegating to post.url() because when it is in a stream collection it delegates to that url } }); +// @license-end diff --git a/app/assets/javascripts/app/collections/photos.js b/app/assets/javascripts/app/collections/photos.js index 40c960b23..978858304 100644 --- a/app/assets/javascripts/app/collections/photos.js +++ b/app/assets/javascripts/app/collections/photos.js @@ -1,8 +1,10 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Photos = Backbone.Collection.extend({ url : "/photos", model: function(attrs, options) { - var modelClass = app.models.Photo + var modelClass = app.models.Photo; return new modelClass(attrs, options); }, @@ -10,3 +12,4 @@ app.collections.Photos = Backbone.Collection.extend({ return resp.photos; } }); +// @license-end diff --git a/app/assets/javascripts/app/collections/posts.js b/app/assets/javascripts/app/collections/posts.js index 47c60b682..fc5fe1bbe 100644 --- a/app/assets/javascripts/app/collections/posts.js +++ b/app/assets/javascripts/app/collections/posts.js @@ -1,4 +1,8 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Posts = Backbone.Collection.extend({ model: app.models.Post, url : "/posts" }); +// @license-end + diff --git a/app/assets/javascripts/app/collections/reshares.js b/app/assets/javascripts/app/collections/reshares.js index d2c74c8e5..28ce59c24 100644 --- a/app/assets/javascripts/app/collections/reshares.js +++ b/app/assets/javascripts/app/collections/reshares.js @@ -1,4 +1,8 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.Reshares = Backbone.Collection.extend({ model: app.models.Reshare, url : "/reshares" }); +// @license-end + diff --git a/app/assets/javascripts/app/collections/tag_followings.js b/app/assets/javascripts/app/collections/tag_followings.js index 870878ba7..091827827 100644 --- a/app/assets/javascripts/app/collections/tag_followings.js +++ b/app/assets/javascripts/app/collections/tag_followings.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.collections.TagFollowings = Backbone.Collection.extend({ model: app.models.TagFollowing, @@ -17,3 +19,5 @@ app.collections.TagFollowings = Backbone.Collection.extend({ } }); +// @license-end + diff --git a/app/assets/javascripts/app/helpers/date_formatter.js b/app/assets/javascripts/app/helpers/date_formatter.js index beb2d468a..395e55f65 100644 --- a/app/assets/javascripts/app/helpers/date_formatter.js +++ b/app/assets/javascripts/app/helpers/date_formatter.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + (function(){ app.helpers.dateFormatter = { parse:function (dateString) { @@ -12,5 +14,6 @@ return timestamp || 0; } - } + }; })(); +// @license-end diff --git a/app/assets/javascripts/app/helpers/direction_detector.js b/app/assets/javascripts/app/helpers/direction_detector.js new file mode 100644 index 000000000..2449aeead --- /dev/null +++ b/app/assets/javascripts/app/helpers/direction_detector.js @@ -0,0 +1,95 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +(function() { + app.helpers.txtDirection = { + setCssFor: function(str, on_element) { + if( this.isRTL(str) ) { + $(on_element).css('direction', 'rtl'); + } else { + $(on_element).css('direction', 'ltr'); + } + }, + + classFor: function(str) { + if( this.isRTL(str) ) return 'rtl'; + return 'ltr'; + }, + + isRTL: function(str) { + if(typeof str !== "string" || str.length < 1) { + return false; + } + + var charCode = this._fixedCharCodeAt(str, 0); + if(charCode >= 1536 && charCode <= 1791) // Sarabic, Persian, ... + return true; + + else if(charCode >= 65136 && charCode <= 65279) // Arabic present 1 + return true; + + else if(charCode >= 64336 && charCode <= 65023) // Arabic present 2 + return true; + + else if(charCode>=1424 && charCode<=1535) // Hebrew + return true; + + else if(charCode>=64256 && charCode<=64335) // Hebrew present + return true; + + else if(charCode>=68096 && charCode<=68184) // Kharoshthi + return true; + + else if(charCode>=67840 && charCode<=67871) // Phoenician + return true; + + else if(charCode>=1792 && charCode<=1871) // Syriac + return true; + + else if(charCode>=1920 && charCode<=1983) // Thaana + return true; + + else if(charCode>=1984 && charCode<=2047) // NKo + return true; + + else if(charCode>=11568 && charCode<=11647) // Tifinagh + return true; + + return false; + }, + + // source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt + _fixedCharCodeAt: function(str, idx) { + str += ''; + var code, + end = str.length; + + var surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + while ((surrogatePairs.exec(str)) != null) { + var li = surrogatePairs.lastIndex; + if (li - 2 < idx) { + idx++; + } + else { + break; + } + } + + if (idx >= end || idx < 0) { + return NaN; + } + + code = str.charCodeAt(idx); + + var hi, low; + if (0xD800 <= code && code <= 0xDBFF) { + hi = code; + low = str.charCodeAt(idx+1); + // Go one further, since one of the "characters" is part of a surrogate pair + return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; + } + return code; + } + }; +})(); +// @license-end + diff --git a/app/assets/javascripts/app/helpers/handlebars-helpers.js b/app/assets/javascripts/app/helpers/handlebars-helpers.js index a289b5a64..c428bfdd7 100644 --- a/app/assets/javascripts/app/helpers/handlebars-helpers.js +++ b/app/assets/javascripts/app/helpers/handlebars-helpers.js @@ -1,26 +1,67 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + Handlebars.registerHelper('t', function(scope, values) { - return Diaspora.I18n.t(scope, values.hash) + return Diaspora.I18n.t(scope, values.hash); +}); + +Handlebars.registerHelper('txtDirClass', function(str) { + return app.helpers.txtDirection.classFor(str); }); Handlebars.registerHelper('imageUrl', function(path){ - return app.baseImageUrl() + path; + return ImagePaths.get(path); }); -Handlebars.registerHelper('linkToPerson', function(context, block) { +Handlebars.registerHelper('urlTo', function(path_helper, id, data){ + if( !data ) { + // only one argument given to helper, mangle parameters + data = id; + return Routes[path_helper+'_path'](data.hash); + } + return Routes[path_helper+'_path'](id, data.hash); +}); + +Handlebars.registerHelper('linkToAuthor', function(context, block) { + if( !context ) context = this; var html = ""; html += block.fn(context); html += ""; - return html + return html; +}); + +Handlebars.registerHelper('linkToPerson', function(context, block) { + if( !context ) context = this; + var html = ""; + html += block.fn(context); + html += ""; + + return html; +}); + +// relationship indicator for profile page +Handlebars.registerHelper('sharingMessage', function(person) { + var i18n_scope = 'people.helper.is_not_sharing'; + var icon = "circle"; + if( person.is_sharing ) { + i18n_scope = 'people.helper.is_sharing'; + icon = "entypo check"; + } + + var title = Diaspora.I18n.t(i18n_scope, {name: person.name}); + var html = ''+ + ' '+ + ''; + return html; }); // allow hovercards for users that are not the current user. // returns the html class name used to trigger hovercards. Handlebars.registerHelper('hovercardable', function(person) { - if( app.currentUser.get('guid') != person.guid ) { + if( app.currentUser.get('guid') !== person.guid ) { return 'hovercardable'; } return ''; @@ -29,18 +70,65 @@ Handlebars.registerHelper('hovercardable', function(person) { Handlebars.registerHelper('personImage', function(person, size, imageClass) { /* we return here if person.avatar is blank, because this happens when a * user is unauthenticated. we don't know why this happens... */ - if( _.isUndefined(person.avatar) ) { return } + if( !person.avatar && + !(person.profile && person.profile.avatar) ) return; + var avatar = person.avatar || person.profile.avatar; + var name = ( person.name ) ? person.name : 'avatar'; size = ( !_.isString(size) ) ? "small" : size; imageClass = ( !_.isString(imageClass) ) ? size : imageClass; - return _.template('', { - 'src': person.avatar[size], + return _.template('<%= title %>')({ + 'src': avatar[size], 'img_class': imageClass, - 'title': _.escape(person.name) + 'title': _.escape(name) }); }); Handlebars.registerHelper('localTime', function(timestamp) { return new Date(timestamp).toLocaleString(); -}); \ No newline at end of file +}); + +Handlebars.registerHelper('fmtTags', function(tags) { + var links = _.map(tags, function(tag) { + return '' + + ' #' + tag + + ''; + }).join(' '); + return new Handlebars.SafeString(links); +}); + +Handlebars.registerHelper('fmtText', function(text) { + return new Handlebars.SafeString(app.helpers.textFormatter(text)); +}); + +Handlebars.registerHelper('isCurrentPage', function(path_helper, id, options){ + var currentPage = "/"+Backbone.history.fragment; + if (currentPage === Handlebars.helpers.urlTo(path_helper, id, options.data)) { + return options.fn(this); + } else { + return options.inverse(this); + } +}); + +Handlebars.registerHelper('isCurrentProfilePage', function(id, diaspora_handle, options){ + var username = diaspora_handle.split("@")[0]; + return Handlebars.helpers.isCurrentPage('person', id, options) || + Handlebars.helpers.isCurrentPage('user_profile', username, options); +}); + +Handlebars.registerHelper('aspectMembershipIndicator', function(contact,in_aspect) { + if(!app.aspect || !app.aspect.get('id')) return '
'; + + var html = '' + if (data.type === "photo") { + return ''; } else { - return data.html || "" + return data.html || ""; } } - } -})(); \ No newline at end of file + }; +})(); +// @license-end diff --git a/app/assets/javascripts/app/helpers/open_graph.js b/app/assets/javascripts/app/helpers/open_graph.js index cc22e312f..f106b681f 100644 --- a/app/assets/javascripts/app/helpers/open_graph.js +++ b/app/assets/javascripts/app/helpers/open_graph.js @@ -1,8 +1,12 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + (function(){ app.helpers.openGraph = { html : function (open_graph_cache) { - if (!open_graph_cache) { return "" } - return '' - } - } + if (!open_graph_cache) { return ""; } + return ''; + }, + }; })(); +// @license-end + diff --git a/app/assets/javascripts/app/helpers/text_formatter.js b/app/assets/javascripts/app/helpers/text_formatter.js index 9f27029c6..5bdfd5830 100644 --- a/app/assets/javascripts/app/helpers/text_formatter.js +++ b/app/assets/javascripts/app/helpers/text_formatter.js @@ -1,144 +1,66 @@ - -// cache url regex globally, for direct acces when testing -$(function() { - Diaspora.url_regex = /(^|\s)\b((?:(?:https?|ftp):(?:\/{1,3})|www\.)(?:[^"<>\)\s]|\(([^\s()<>]+|(\([^\s()<>]+\)))\))+)(?=\s|$)/gi; -}); +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later (function(){ - //make it so I take text and mentions rather than the modelapp.helpers.textFormatter( - var textFormatter = function textFormatter(text, model) { - var mentions = model.get("mentioned_people"); + app.helpers.textFormatter = function(text, mentions) { + mentions = mentions ? mentions : []; - return textFormatter.mentionify( - textFormatter.hashtagify( - textFormatter.markdownify(text) - ), mentions - ) - }; + var md = window.markdownit({ + breaks: true, + html: true, + linkify: true, + typographer: true + }); - textFormatter.markdownify = function markdownify(text){ - var converter = Markdown.getSanitizingConverter(); + var inlinePlugin = window.markdownitForInline; + md.use(inlinePlugin, "utf8_symbols", "text", function (tokens, idx) { + tokens[idx].content = tokens[idx].content.replace(/<->/g, "↔") + .replace(/<-/g, "←") + .replace(/->/g, "→") + .replace(/<3/g, "♥"); + }); - // punycode non-ascii chars in urls - converter.hooks.chain("preConversion", function(text) { - - // add < > around plain urls, effectively making them "autolinks" - text = text.replace(Diaspora.url_regex, function() { - var url = arguments[2]; - if( url.match(/^[^\w]/) ) return url; // evil witchcraft, noop - return arguments[1]+"<"+url+">"; - }); - - // process links - // regex copied from: https://code.google.com/p/pagedown/source/browse/Markdown.Converter.js#1198 (and slightly expanded) - var linkRegex = /(\[.*\]:\s)?(<|\()((?:(https?|ftp):\/\/[^\/'">\s]|www)[^'">\s]+?)([>\)]{1,2})/gi; - text = text.replace(linkRegex, function() { - var unicodeUrl = arguments[3]; - var urlSuffix = arguments[5]; - - unicodeUrl = ( unicodeUrl.match(/^www/) ) ? ('http://' + unicodeUrl) : unicodeUrl; - - // handle parentheses, especially in case the link ends with ')' - if( urlSuffix.indexOf(')') != -1 && urlSuffix.indexOf('>') != -1 ) { - unicodeUrl += ')'; - urlSuffix = '>'; - } - - // url*DE*code as much as possible - try { - while( unicodeUrl.indexOf("%") !== -1 && unicodeUrl != decodeURI(unicodeUrl) ) { - unicodeUrl = decodeURI(unicodeUrl); - } - } - catch(e){} - - // markdown doesn't like '(' or ')' anywhere, except where it wants - var workingUrl = unicodeUrl.replace(/\(/, "%28").replace(/\)/, "%29"); - - var addr = parse_url(unicodeUrl); - if( !addr.host ) addr.host = ""; // must not be 'undefined' - - var asciiUrl = // rebuild the url - (!addr.scheme ? '' : addr.scheme + - ( (addr.scheme.toLowerCase()=="mailto") ? ':' : '://')) + - (!addr.user ? '' : addr.user + - (!addr.pass ? '' : ':'+addr.pass) + '@') + - punycode.toASCII(addr.host) + - (!addr.port ? '' : ':' + addr.port) + - (!addr.path ? '' : encodeURI(addr.path) ) + - (!addr.query ? '' : '?' + encodeURI(addr.query) ) + - (!addr.fragment ? '' : '#' + encodeURI(addr.fragment) ); - if( !arguments[1] || arguments[1] == "") { // inline link - if(arguments[2] == "<") return "["+workingUrl+"]("+asciiUrl+")"; // without link text - else return arguments[2]+asciiUrl+urlSuffix; // with link text - } else { // reference style link - return arguments[1]+asciiUrl; + md.use(inlinePlugin, "link_new_window_and_missing_http", "link_open", function (tokens, idx) { + tokens[idx].attrs.forEach(function(attribute, index, array) { + if( attribute[0] === "href" ) { + array[index][1] = attribute[1].replace(/^www\./, "http://www."); } }); - - return text; + tokens[idx].attrPush([ "target", "_blank" ]); }); - // make nice little utf-8 symbols - converter.hooks.chain("preConversion", function(text) { - var input_strings = [ - "<->", "->", "<-", - "(c)", "(r)", "(tm)", - "<3" - ]; - var output_symbols = [ - "↔", "→", "←", - "©", "®", "™", - "♥" - ]; - // quote function from: http://stackoverflow.com/a/494122 - var quote = function(str) { - return str.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); - }; - - _.each(input_strings, function(str, idx) { - var r = new RegExp(quote(str), "gi"); - text = text.replace(r, output_symbols[idx]); - }); - return text; + var hashtagPlugin = window.markdownitHashtag; + md.use(hashtagPlugin, { + // compare tag_text_regexp in app/models/acts_as_taggable_on-tag.rb + hashtagRegExp: "[" + PosixBracketExpressions.alnum + "_\\-]+|<3", + // compare tag_strings in lib/diaspora/taggabe.rb + preceding: "^|\\s" }); - converter.hooks.chain("postConversion", function (text) { - return text.replace(/(\"(?:(?:http|https):\/\/)?[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?\")(\>)/g, '$1 target="_blank">') + var mentionPlugin = window.markdownitDiasporaMention; + md.use(mentionPlugin, { + mentions: mentions, + allowHovercards: true, + currentUserId: app.currentUser.get("guid") }); - return converter.makeHtml(text) + var subPlugin = window.markdownitSub; + md.use(subPlugin); + var supPlugin = window.markdownitSup; + md.use(supPlugin); + var sanitizerPlugin = window.markdownitSanitizer; + md.use(sanitizerPlugin); + + // xmpp: should behave like mailto: + md.linkify.add("xmpp:","mailto:"); + // mumble:// should behave like http://: + md.linkify.add("mumble:","http:"); + md.linkify.set({ fuzzyLink: false }); + + // Bootstrap table markup + md.renderer.rules.table_open = function () { return "\n"; }; + + return md.render(text); }; - - textFormatter.hashtagify = function hashtagify(text){ - var utf8WordCharcters =/(]*>.*?<\/a>)|(\s|^|>)#([\u0080-\uFFFF|\w|-]+|<3)/g; - - return text.replace(utf8WordCharcters, function(result, linkTag, preceeder, tagText) { - if(linkTag) - return linkTag; - else - return preceeder + "#" + tagText + ""; - }); - }; - - textFormatter.mentionify = function mentionify(text, mentions) { - var mentionRegex = /@\{([^;]+); ([^\}]+)\}/g - return text.replace(mentionRegex, function(mentionText, fullName, diasporaId) { - var person = _.find(mentions, function(person){ - return (diasporaId == person.diaspora_id || person.handle) //jquery.mentionsInput gives us person.handle - }) - if(person) { - var url = person.url || "/people/" + person.guid //jquery.mentionsInput gives us person.url - , personText = "" + fullName + "" - } else { - personText = fullName; - } - - return personText - }) - } - - app.helpers.textFormatter = textFormatter; })(); +// @license-end diff --git a/app/assets/javascripts/app/helpers/timeago.js b/app/assets/javascripts/app/helpers/timeago.js new file mode 100644 index 000000000..ddea02057 --- /dev/null +++ b/app/assets/javascripts/app/helpers/timeago.js @@ -0,0 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later +(function(){ + app.helpers.timeago = function(el) { + el.find('time.timeago').each(function(i,e) { + $(e).attr('title', new Date($(e).attr('datetime')).toLocaleString()); + }).timeago().tooltip(); + }; +})(); +// @license-end diff --git a/app/assets/javascripts/app/helpers/truncate.js b/app/assets/javascripts/app/helpers/truncate.js new file mode 100644 index 000000000..7cfa6aa59 --- /dev/null +++ b/app/assets/javascripts/app/helpers/truncate.js @@ -0,0 +1,14 @@ +(function() { + app.helpers.truncate = function(passedString, length) { + if (passedString === null || passedString === undefined) { + return passedString; + } + + if (passedString.length > length) { + var lastBlank = passedString.lastIndexOf(' ', length); + var trimstring = passedString.substring(0, Math.min(length, lastBlank)); + return new Handlebars.SafeString(trimstring + " ..."); + } + return new Handlebars.SafeString(passedString); + }; +})(); diff --git a/app/assets/javascripts/app/models.js b/app/assets/javascripts/app/models.js index 657618450..286e990c6 100644 --- a/app/assets/javascripts/app/models.js +++ b/app/assets/javascripts/app/models.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later // Mixin to provide date formatting and "createdAt" method // other attributes can be accessed by calling this.timeOf("timestamp-field") @@ -14,3 +15,5 @@ app.models.formatDateMixin = { } }; +// @license-end + diff --git a/app/assets/javascripts/app/models/aspect.js b/app/assets/javascripts/app/models/aspect.js index ec53e034a..7ff651d84 100644 --- a/app/assets/javascripts/app/models/aspect.js +++ b/app/assets/javascripts/app/models/aspect.js @@ -1,5 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Aspect = Backbone.Model.extend({ toggleSelected: function(){ this.set({'selected' : !this.get('selected')}, {async: false}); } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/aspect_membership.js b/app/assets/javascripts/app/models/aspect_membership.js index 73a213f45..ddb503702 100644 --- a/app/assets/javascripts/app/models/aspect_membership.js +++ b/app/assets/javascripts/app/models/aspect_membership.js @@ -1,7 +1,11 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /** * this model represents the assignment of an aspect to a person. * (only valid for the context of the current user) */ app.models.AspectMembership = Backbone.Model.extend({ urlRoot: "/aspect_memberships" -}); \ No newline at end of file +}); +// @license-end + diff --git a/app/assets/javascripts/app/models/block.js b/app/assets/javascripts/app/models/block.js index ef7e8f1ef..2c6ea5eb1 100644 --- a/app/assets/javascripts/app/models/block.js +++ b/app/assets/javascripts/app/models/block.js @@ -1,3 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Block = Backbone.Model.extend({ urlRoot : "/blocks" }); +// @license-end + diff --git a/app/assets/javascripts/app/models/comment.js b/app/assets/javascripts/app/models/comment.js index c4c35ce71..f2778f718 100644 --- a/app/assets/javascripts/app/models/comment.js +++ b/app/assets/javascripts/app/models/comment.js @@ -1,3 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Comment = Backbone.Model.extend({ urlRoot: "/comments" }); +// @license-end + diff --git a/app/assets/javascripts/app/models/contact.js b/app/assets/javascripts/app/models/contact.js new file mode 100644 index 000000000..5457f2c4e --- /dev/null +++ b/app/assets/javascripts/app/models/contact.js @@ -0,0 +1,13 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.models.Contact = Backbone.Model.extend({ + initialize : function() { + this.aspect_memberships = new app.collections.AspectMemberships(this.get('aspect_memberships')); + if( this.get('person') ) this.person = new app.models.Person(this.get('person')); + }, + + inAspect : function(id) { + return this.aspect_memberships.any(function(membership){ return membership.get('aspect').id === id; }); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/models/like.js b/app/assets/javascripts/app/models/like.js index 81e71a61e..2f64ebd75 100644 --- a/app/assets/javascripts/app/models/like.js +++ b/app/assets/javascripts/app/models/like.js @@ -1 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Like = Backbone.Model.extend({ }); +// @license-end + diff --git a/app/assets/javascripts/app/models/person.js b/app/assets/javascripts/app/models/person.js new file mode 100644 index 000000000..0cfcc9f66 --- /dev/null +++ b/app/assets/javascripts/app/models/person.js @@ -0,0 +1,53 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.models.Person = Backbone.Model.extend({ + url: function() { + return Routes.person_path(this.get('guid')); + }, + + initialize: function() { + if( this.get('profile') ) + this.profile = new app.models.Profile(this.get('profile')); + }, + + isSharing: function() { + var rel = this.get('relationship'); + return (rel === 'mutual' || rel === 'sharing'); + }, + + isReceiving: function() { + var rel = this.get('relationship'); + return (rel === 'mutual' || rel === 'receiving'); + }, + + isMutual: function() { + return (this.get('relationship') === 'mutual'); + }, + + isBlocked: function() { + return (this.get('relationship') === 'blocked'); + }, + + block: function() { + var self = this; + var block = new app.models.Block({block: {person_id: this.id}}); + + // return the jqXHR with Promise interface + return block.save() + .done(function() { app.events.trigger('person:block:'+self.id); }); + }, + + unblock: function() { + var self = this; + if( !this.get('block') ) { + var def = $.Deferred(); + return def.reject(); + } + + var block = new app.models.Block({id: this.get('block').id}); + return block.destroy() + .done(function() { app.events.trigger('person:unblock:'+self.id); }); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/models/photo.js b/app/assets/javascripts/app/models/photo.js index a856faca1..c7a4efe92 100644 --- a/app/assets/javascripts/app/models/photo.js +++ b/app/assets/javascripts/app/models/photo.js @@ -1,6 +1,10 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Photo = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, { urlRoot : "/photos", initialize : function() {}, })); +// @license-end + diff --git a/app/assets/javascripts/app/models/poll_participation.js b/app/assets/javascripts/app/models/poll_participation.js index 36b560dbe..bc8ed46cd 100644 --- a/app/assets/javascripts/app/models/poll_participation.js +++ b/app/assets/javascripts/app/models/poll_participation.js @@ -1,5 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.PollParticipation = Backbone.Model.extend({ urlRoot: function(){ return '/posts/' + this.get('post_id') + "/poll_participations"; } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/post.js b/app/assets/javascripts/app/models/post.js index 74a3cec90..30da8f71c 100644 --- a/app/assets/javascripts/app/models/post.js +++ b/app/assets/javascripts/app/models/post.js @@ -1,18 +1,20 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, { urlRoot : "/posts", initialize : function() { - this.interactions = new app.models.Post.Interactions(_.extend({post : this}, this.get("interactions"))) - this.delegateToInteractions() + this.interactions = new app.models.Post.Interactions(_.extend({post : this}, this.get("interactions"))); + this.delegateToInteractions(); }, delegateToInteractions : function(){ - this.comments = this.interactions.comments - this.likes = this.interactions.likes + this.comments = this.interactions.comments; + this.likes = this.interactions.likes; this.comment = function(){ - this.interactions.comment.apply(this.interactions, arguments) - } + this.interactions.comment.apply(this.interactions, arguments); + }; }, interactedAt : function() { @@ -20,11 +22,12 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, }, reshare : function(){ - return this._reshare = this._reshare || new app.models.Reshare({root_guid : this.get("guid")}); + this._reshare = this._reshare || new app.models.Reshare({root_guid : this.get("guid")}); + return this._reshare; }, reshareAuthor : function(){ - return this.get("author") + return this.get("author"); }, blockAuthor: function() { @@ -36,7 +39,7 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, }, toggleFavorite : function(options){ - this.set({favorite : !this.get("favorite")}) + this.set({favorite : !this.get("favorite")}); /* guard against attempting to save a model that a user doesn't own */ if(options.save){ this.save() } @@ -44,27 +47,29 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, headline : function() { var headline = this.get("text").trim() - , newlineIdx = headline.indexOf("\n") - return (newlineIdx > 0 ) ? headline.substr(0, newlineIdx) : headline + , newlineIdx = headline.indexOf("\n"); + return (newlineIdx > 0 ) ? headline.substr(0, newlineIdx) : headline; }, body : function(){ var body = this.get("text").trim() - , newlineIdx = body.indexOf("\n") - return (newlineIdx > 0 ) ? body.substr(newlineIdx+1, body.length) : "" + , newlineIdx = body.indexOf("\n"); + return (newlineIdx > 0 ) ? body.substr(newlineIdx+1, body.length) : ""; }, //returns a promise preloadOrFetch : function(){ - var action = app.hasPreload("post") ? this.set(app.parsePreload("post")) : this.fetch() - return $.when(action) + var action = app.hasPreload("post") ? this.set(app.parsePreload("post")) : this.fetch(); + return $.when(action); }, hasPhotos : function(){ - return this.get("photos") && this.get("photos").length > 0 + return this.get("photos") && this.get("photos").length > 0; }, hasText : function(){ - return $.trim(this.get("text")) !== "" + return $.trim(this.get("text")) !== ""; } })); +// @license-end + diff --git a/app/assets/javascripts/app/models/post/interactions.js b/app/assets/javascripts/app/models/post/interactions.js index f4740be81..d992440f7 100644 --- a/app/assets/javascripts/app/models/post/interactions.js +++ b/app/assets/javascripts/app/models/post/interactions.js @@ -1,136 +1,139 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //require ../post app.models.Post.Interactions = Backbone.Model.extend({ url : function(){ - return this.post.url() + "/interactions" + return this.post.url() + "/interactions"; }, initialize : function(options){ - this.post = options.post - this.comments = new app.collections.Comments(this.get("comments"), {post : this.post}) + this.post = options.post; + this.comments = new app.collections.Comments(this.get("comments"), {post : this.post}); this.likes = new app.collections.Likes(this.get("likes"), {post : this.post}); this.reshares = new app.collections.Reshares(this.get("reshares"), {post : this.post}); }, parse : function(resp){ - this.comments.reset(resp.comments) - this.likes.reset(resp.likes) - this.reshares.reset(resp.reshares) + this.comments.reset(resp.comments); + this.likes.reset(resp.likes); + this.reshares.reset(resp.reshares); var comments = this.comments , likes = this.likes - , reshares = this.reshares + , reshares = this.reshares; return { comments : comments, likes : likes, reshares : reshares, fetched : true - } + }; }, likesCount : function(){ - return (this.get("fetched") ? this.likes.models.length : this.get("likes_count") ) + return (this.get("fetched") ? this.likes.models.length : this.get("likes_count") ); }, resharesCount : function(){ - return this.get("fetched") ? this.reshares.models.length : this.get("reshares_count") + return this.get("fetched") ? this.reshares.models.length : this.get("reshares_count"); }, commentsCount : function(){ - return this.get("fetched") ? this.comments.models.length : this.get("comments_count") + return this.get("fetched") ? this.comments.models.length : this.get("comments_count"); }, userLike : function(){ - return this.likes.select(function(like){ return like.get("author").guid == app.currentUser.get("guid")})[0] + return this.likes.select(function(like){ return like.get("author").guid === app.currentUser.get("guid")})[0]; }, userReshare : function(){ return this.reshares.select(function(reshare){ - return reshare.get("author") && reshare.get("author").guid == app.currentUser.get("guid")})[0] + return reshare.get("author") && reshare.get("author").guid === app.currentUser.get("guid")})[0]; }, toggleLike : function() { if(this.userLike()) { - this.unlike() + this.unlike(); } else { - this.like() + this.like(); } }, like : function() { var self = this; this.likes.create({}, {success : function(){ - self.trigger("change") - self.set({"likes_count" : self.get("likes_count") + 1}) - }}) + self.trigger("change"); + self.set({"likes_count" : self.get("likes_count") + 1}); + }}); - app.instrument("track", "Like") + app.instrument("track", "Like"); }, unlike : function() { var self = this; - this.userLike().destroy({success : function(model, resp) { - self.trigger('change') - self.set({"likes_count" : self.get("likes_count") - 1}) + this.userLike().destroy({success : function() { + self.trigger('change'); + self.set({"likes_count" : self.get("likes_count") - 1}); }}); - app.instrument("track", "Unlike") + app.instrument("track", "Unlike"); }, comment : function (text) { var self = this; this.comments.make(text).fail(function () { - flash = new Diaspora.Widgets.FlashMessages; + var flash = new Diaspora.Widgets.FlashMessages(); flash.render({ success: false, notice: Diaspora.I18n.t("failed_to_post_message") }); }).done(function() { - self.trigger('change') //updates after sync + self.trigger('change'); //updates after sync }); - this.trigger("change") //updates count in an eager manner + this.trigger("change"); //updates count in an eager manner - app.instrument("track", "Comment") + app.instrument("track", "Comment"); }, reshare : function(){ var interactions = this , reshare = this.post.reshare() - , flash = new Diaspora.Widgets.FlashMessages; + , flash = new Diaspora.Widgets.FlashMessages(); - reshare.save({}, { - success : function(resp){ + reshare.save() + .done(function(reshare) { flash.render({ success: true, notice: Diaspora.I18n.t("reshares.successful") }); - }, - error: function(resp){ + interactions.reshares.add(reshare); + if (app.stream && /^\/(?:stream|activity|aspects)/.test(app.stream.basePath())) { + app.stream.addNow(reshare); + } + interactions.trigger("change"); + }) + .fail(function(){ flash.render({ success: false, notice: Diaspora.I18n.t("reshares.duplicate") }); - } - }).done(function(){ - interactions.reshares.add(reshare) - }).done(function(){ - interactions.trigger("change") }); - app.instrument("track", "Reshare") + app.instrument("track", "Reshare"); }, userCanReshare : function(){ - var isReshare = this.post.get("post_type") == "Reshare" + var isReshare = this.post.get("post_type") === "Reshare" , rootExists = (isReshare ? this.post.get("root") : true) , publicPost = this.post.get("public") - , userIsNotAuthor = this.post.get("author").diaspora_id != app.currentUser.get("diaspora_id") - , userIsNotRootAuthor = rootExists && (isReshare ? this.post.get("root").author.diaspora_id != app.currentUser.get("diaspora_id") : true) + , userIsNotAuthor = this.post.get("author").diaspora_id !== app.currentUser.get("diaspora_id") + , userIsNotRootAuthor = rootExists && (isReshare ? this.post.get("root").author.diaspora_id !== app.currentUser.get("diaspora_id") : true) , notReshared = !this.userReshare(); return publicPost && app.currentUser.authenticated() && userIsNotAuthor && userIsNotRootAuthor && notReshared; } }); +// @license-end diff --git a/app/assets/javascripts/app/models/profile.js b/app/assets/javascripts/app/models/profile.js index c0134017d..59c543145 100644 --- a/app/assets/javascripts/app/models/profile.js +++ b/app/assets/javascripts/app/models/profile.js @@ -1,20 +1,24 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Profile = Backbone.Model.extend({ urlRoot : "/profiles" }, { preloadOrFetch : function(id){ - return app.hasPreload("person") ? this.preload() : this.findByGuid(id) + return app.hasPreload("person") ? this.preload() : this.findByGuid(id); }, preload : function(){ - var person = new app.models.Profile(app.parsePreload("person")) - person.deferred = $.when(true) - return person + var person = new app.models.Profile(app.parsePreload("person")); + person.deferred = $.when(true); + return person; }, findByGuid : function(personId){ - var person = new app.models.Profile({ id : personId}) - person.deferred = person.fetch() - return person + var person = new app.models.Profile({ id : personId}); + person.deferred = person.fetch(); + return person; } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/report.js b/app/assets/javascripts/app/models/report.js index d2d734221..4309a71b8 100644 --- a/app/assets/javascripts/app/models/report.js +++ b/app/assets/javascripts/app/models/report.js @@ -1,4 +1,8 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Report = Backbone.Model.extend({ urlRoot: '/report', type: 'POST' }); +// @license-end + diff --git a/app/assets/javascripts/app/models/reshare.js b/app/assets/javascripts/app/models/reshare.js index 7a4b83ff7..a236f2384 100644 --- a/app/assets/javascripts/app/models/reshare.js +++ b/app/assets/javascripts/app/models/reshare.js @@ -1,16 +1,20 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.Reshare = app.models.Post.extend({ urlRoot : "/reshares", rootPost : function(){ this._rootPost = this._rootPost || new app.models.Post(this.get("root")); - return this._rootPost + return this._rootPost; }, reshare : function(){ - return this.rootPost().reshare() + return this.rootPost().reshare(); }, reshareAuthor : function(){ - return this.rootPost().reshareAuthor() + return this.rootPost().reshareAuthor(); } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/status_message.js b/app/assets/javascripts/app/models/status_message.js index bce96553d..f8469662a 100644 --- a/app/assets/javascripts/app/models/status_message.js +++ b/app/assets/javascripts/app/models/status_message.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.StatusMessage = app.models.Post.extend({ url : function(){ return this.isNew() ? '/status_messages' : '/posts/' + this.get("id"); @@ -15,6 +17,8 @@ app.models.StatusMessage = app.models.Post.extend({ photos : this.photos && this.photos.pluck("id"), services : this.get("services"), poll : this.get("poll") - } + }; } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/stream.js b/app/assets/javascripts/app/models/stream.js index 4cf5ff737..8ac6c3ebf 100644 --- a/app/assets/javascripts/app/models/stream.js +++ b/app/assets/javascripts/app/models/stream.js @@ -1,49 +1,54 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require ../collections/posts //= require ../collections/photos app.models.Stream = Backbone.Collection.extend({ initialize : function(models, options){ - var collectionClass = options && options.collection || app.collections.Posts; + var collectionClass = app.collections.Posts; + if( options ) { + options.collection && (collectionClass = options.collection); + options.basePath && (this.streamPath = options.basePath); + } this.items = new collectionClass([], this.collectionOptions()); }, collectionOptions :function(){ var order = this.sortOrder(); - return { comparator : function(item) { return -item[order](); } } + return { comparator : function(item) { return -item[order](); } }; }, url : function(){ - return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath() + return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath(); }, _fetchOpts: function(opts) { var defaultOpts = { remove: false // tell backbone to keep existing items in the collection }; - return _.extend({}, defaultOpts, opts); + return _.extend({ url: this.url() }, defaultOpts, opts); }, fetch: function() { if( this.isFetching() ) return false; - var url = this.url(); - this.deferred = this.items.fetch(this._fetchOpts({url : url})) + this.deferred = this.items.fetch( this._fetchOpts() ) .done(_.bind(this.triggerFetchedEvents, this)); }, isFetching : function() { - return (this.deferred && this.deferred.state() == "pending"); + return (this.deferred && this.deferred.state() === "pending"); }, triggerFetchedEvents : function(resp){ this.trigger("fetched", this); // all loaded? var respItems = this.items.parse(resp); - if(respItems && (respItems.author || respItems.length == 0)) { + if(respItems && (respItems.author || respItems.length === 0)) { this.trigger("allItemsLoaded", this); } }, basePath : function(){ - return document.location.pathname; + return this.streamPath || document.location.pathname; }, timeFilteredPath : function(){ @@ -52,11 +57,11 @@ app.models.Stream = Backbone.Collection.extend({ maxTime: function(){ var lastPost = _.last(this.items.models); - return lastPost[this.sortOrder()]() + return lastPost[this.sortOrder()](); }, sortOrder : function() { - return this.basePath().match(/activity/) ? "interactedAt" : "createdAt" + return this.basePath().match(/activity/) ? "interactedAt" : "createdAt"; }, /* This function is for adding a large number of posts one by one. @@ -66,7 +71,7 @@ app.models.Stream = Backbone.Collection.extend({ * stream for the changes to take effect in the infinite stream view */ add : function(models){ - this.items.add(models) + this.items.add(models); }, /* This function is for adding a single post. It immediately triggers @@ -79,12 +84,13 @@ app.models.Stream = Backbone.Collection.extend({ }, preloadOrFetch : function(){ //hai, plz test me THNX - return $.when(app.hasPreload("stream") ? this.preload() : this.fetch()) + return $.when(app.hasPreload("stream") ? this.preload() : this.fetch()); }, preload : function(){ - this.items.reset(app.parsePreload("stream")) - this.deferred = $.when(true) - this.trigger("fetched") + this.items.reset(app.parsePreload("stream")); + this.deferred = $.when(true); + this.trigger("fetched"); } }); +// @license-end diff --git a/app/assets/javascripts/app/models/stream_aspects.js b/app/assets/javascripts/app/models/stream_aspects.js index 4dc97899e..e64d3ea5b 100644 --- a/app/assets/javascripts/app/models/stream_aspects.js +++ b/app/assets/javascripts/app/models/stream_aspects.js @@ -1,7 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.StreamAspects = app.models.Stream.extend({ url : function(){ - return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath() + return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath(); }, initialize : function(models, options){ @@ -19,6 +21,15 @@ app.models.StreamAspects = app.models.Stream.extend({ var url = this.url(); var ids = this.aspects_ids; this.deferred = this.items.fetch(this._fetchOpts({url : url, data : { 'a_ids': ids }})) - .done(_.bind(this.triggerFetchedEvents, this)); + .done(_.bind(this.fetchDone, this)); + }, + + fetchDone: function() { + this.triggerFetchedEvents(); + if (app.aspects) { + app.aspects.trigger('aspectStreamFetched'); + } } }); +// @license-end + diff --git a/app/assets/javascripts/app/models/tag_following.js b/app/assets/javascripts/app/models/tag_following.js index b2ab35977..a64820116 100644 --- a/app/assets/javascripts/app/models/tag_following.js +++ b/app/assets/javascripts/app/models/tag_following.js @@ -1,3 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.TagFollowing = Backbone.Model.extend({ urlRoot: "/tag_followings" }); +// @license-end + diff --git a/app/assets/javascripts/app/models/user.js b/app/assets/javascripts/app/models/user.js index b08f281f8..fabf5817d 100644 --- a/app/assets/javascripts/app/models/user.js +++ b/app/assets/javascripts/app/models/user.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.models.User = Backbone.Model.extend({ toggleNsfwState : function() { if(!app.currentUser.authenticated()){ return false } @@ -10,14 +12,16 @@ app.models.User = Backbone.Model.extend({ }, expProfileUrl : function(){ - return "/people/" + app.currentUser.get("guid") + "?ex=true" + return "/people/" + app.currentUser.get("guid") + "?ex=true"; }, isServiceConfigured : function(providerName) { - return _.include(this.get("configured_services"), providerName) + return _.include(this.get("configured_services"), providerName); }, isAuthorOf: function(model) { - return this.authenticated() && model.get("author").id == this.id; + return this.authenticated() && model.get("author").id === this.id; } }); +// @license-end + diff --git a/app/assets/javascripts/app/pages/contacts.js b/app/assets/javascripts/app/pages/contacts.js new file mode 100644 index 000000000..996a5898b --- /dev/null +++ b/app/assets/javascripts/app/pages/contacts.js @@ -0,0 +1,75 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.pages.Contacts = Backbone.View.extend({ + + el: "#contacts_container", + + events: { + "click #contacts_visibility_toggle" : "toggleContactVisibility", + "click #chat_privilege_toggle" : "toggleChatPrivilege", + "click #change_aspect_name" : "showAspectNameForm", + "keyup #contact_list_search" : "searchContactList" + }, + + initialize: function(opts) { + this.visibility_toggle = $("#contacts_visibility_toggle .entypo"); + this.chat_toggle = $("#chat_privilege_toggle .entypo"); + this.stream = opts.stream; + this.stream.render(); + $("#people_stream.contacts .header .entypo").tooltip({ 'placement': 'bottom'}); + $(document).on('ajax:success', 'form.edit_aspect', this.updateAspectName); + }, + + toggleChatPrivilege: function() { + if (this.chat_toggle.hasClass("enabled")) { + this.chat_toggle.tooltip("destroy") + .removeClass("enabled") + .removeAttr("data-original-title") + .attr("title", Diaspora.I18n.t("contacts.aspect_chat_is_not_enabled")) + .tooltip({'placement': 'bottom'}); + } else { + this.chat_toggle.tooltip("destroy") + .addClass("enabled") + .removeAttr("data-original-title") + .attr("title", Diaspora.I18n.t("contacts.aspect_chat_is_enabled")) + .tooltip({'placement': 'bottom'}); + } + }, + + toggleContactVisibility: function() { + if (this.visibility_toggle.hasClass("lock-open")) { + this.visibility_toggle.removeClass("lock-open") + .addClass("lock") + .tooltip("destroy") + .removeAttr("data-original-title") + .attr("title", Diaspora.I18n.t("contacts.aspect_list_is_not_visible")) + .tooltip({'placement': 'bottom'}); + } + else { + this.visibility_toggle.removeClass("lock") + .addClass("lock-open") + .tooltip("destroy") + .removeAttr("data-original-title") + .attr("title", Diaspora.I18n.t("contacts.aspect_list_is_visible")) + .tooltip({'placement': 'bottom'}); + } + }, + + showAspectNameForm: function() { + $(".header > h3").hide(); + $(".header > #aspect_name_form").show(); + }, + + updateAspectName: function(evt,data){ + $(".header #aspect_name").text(data['name']); + $("#aspect_nav [data-aspect-id='"+data['id']+"'] .name").text(data['name']); + $(".header > #aspect_name_form").hide(); + $(".header > h3").show(); + }, + + searchContactList: function(e) { + this.stream.search($(e.target).val()); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js new file mode 100644 index 000000000..767c9f3a2 --- /dev/null +++ b/app/assets/javascripts/app/pages/profile.js @@ -0,0 +1,130 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.pages.Profile = app.views.Base.extend({ + events: { + 'click #block_user_button': 'blockPerson', + 'click #unblock_user_button': 'unblockPerson' + }, + + subviews: { + '#profile': 'sidebarView', + '.profile_header': 'headerView', + '#main_stream': 'streamView' + }, + + tooltipSelector: '.profile_button .profile-header-icon, .sharing_message_container', + + initialize: function(opts) { + if( !this.model ) { + this._populateModel(opts); + } + + if( app.hasPreload('photos') ) + this.photos = app.parsePreload('photos'); // we don't interact with it, so no model + if( app.hasPreload('contacts') ) + this.contacts = app.parsePreload('contacts'); // we don't interact with it, so no model + + this.streamCollection = _.has(opts, 'streamCollection') ? opts.streamCollection : null; + this.streamViewClass = _.has(opts, 'streamView') ? opts.streamView : null; + + this.model.on('change', this.render, this); + this.model.on('sync', this._done, this); + + // bind to global events + var id = this.model.get('id'); + app.events.on('person:block:'+id, this.reload, this); + app.events.on('person:unblock:'+id, this.reload, this); + app.events.on('aspect:create', this.reload, this); + app.events.on('aspect_membership:update', this.reload, this); + }, + + _populateModel: function(opts) { + if( app.hasPreload('person') ) { + this.model = new app.models.Person(app.parsePreload('person')); + } else if(opts && opts.person_id) { + this.model = new app.models.Person({guid: opts.person_id}); + this.model.fetch(); + } else { + throw new Error("unable to load person"); + } + }, + + sidebarView: function() { + if( !this.model.has('profile') ) return false; + return new app.views.ProfileSidebar({ + model: this.model, + }); + }, + + headerView: function() { + if( !this.model.has('profile') ) return false; + return new app.views.ProfileHeader({ + model: this.model, + photos: this.photos, + contacts: this.contacts + }); + }, + + streamView: function() { + if( !this.model.has('profile') ) return false; + if( this.model.isBlocked() ) { + $('#main_stream').empty().html( + '
'+ + Diaspora.I18n.t('profile.ignoring', {name: this.model.get('name')}) + + '
'); + return false; + } + + // a collection is set, this means we want to view photos + var route = this.streamCollection ? 'person_photos_path' : 'person_stream_path'; + var view = this.streamViewClass ? this.streamViewClass : app.views.Stream; + + app.stream = new app.models.Stream(null, { + basePath: Routes[route](app.page.model.get('guid')), + collection: this.streamCollection + }); + app.stream.fetch(); + + if( this.model.get('is_own_profile') ) { + app.publisher = new app.views.Publisher({collection : app.stream.items}); + } + + return new view({model: app.stream}); + }, + + blockPerson: function() { + if( !confirm(Diaspora.I18n.t('ignore_user')) ) return; + + var block = this.model.block(); + block.fail(function() { + Diaspora.page.flashMessages.render({ + success: false, + notice: Diaspora.I18n.t('ignore_failed') + }); + }); + + return false; + }, + + unblockPerson: function() { + var block = this.model.unblock(); + block.fail(function() { + Diaspora.page.flashMessages.render({ + success: false, + notice: Diaspora.I18.t('unblock_failed') + }); + }); + return false; + }, + + reload: function() { + this.$('#profile').addClass('loading'); + this.model.fetch(); + }, + + _done: function() { + this.$('#profile').removeClass('loading'); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/pages/single-post-viewer.js b/app/assets/javascripts/app/pages/single-post-viewer.js index 16403f891..c0b5f6bf9 100644 --- a/app/assets/javascripts/app/pages/single-post-viewer.js +++ b/app/assets/javascripts/app/pages/single-post-viewer.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.pages.SinglePostViewer = app.views.Base.extend({ templateName: "single-post-viewer", @@ -9,8 +11,8 @@ app.pages.SinglePostViewer = app.views.Base.extend({ initialize : function(options) { this.model = new app.models.Post({ id : options.id }); this.model.preloadOrFetch().done(_.bind(this.initViews, this)); - this.model.interactions.fetch() //async, yo, might want to throttle this later. - this.setupLightbox() + this.model.interactions.fetch(); //async, yo, might want to throttle this later. + this.setupLightbox(); }, setupLightbox : function(){ @@ -31,10 +33,11 @@ app.pages.SinglePostViewer = app.views.Base.extend({ postRenderTemplate : function() { if(this.model.get("title")){ // formats title to html... - var html_title = app.helpers.textFormatter(this.model.get("title"), this.model); + var html_title = app.helpers.textFormatter(this.model.get("title"), this.model.get("mentioned_people")); //... and converts html to plain text document.title = $('
').html(html_title).text(); } }, }); +// @license-end diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index d795f0e7d..d471f9c98 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -1,6 +1,12 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.Router = Backbone.Router.extend({ routes: { + "help/:section": "help", + "help/": "help", "help": "help", + "contacts": "contacts", + "conversations": "conversations", //new hotness "posts/:id": "singlePost", @@ -19,11 +25,12 @@ app.Router = Backbone.Router.extend({ "followed_tags": "followed_tags", "tags/:name": "followed_tags", "people/:id/photos": "photos", + "people/:id/contacts": "profile", - "people/:id": "stream", - "u/:name": "stream" + "people/:id": "profile", + "u/:name": "profile" }, - + initialize: function() { // To support encoded linefeeds (%0A) we need to specify // our own internal router.route call with the correct regexp. @@ -31,10 +38,26 @@ app.Router = Backbone.Router.extend({ this.route(/^bookmarklet(?:\?(.*))?/, "bookmarklet"); }, - help: function() { + help: function(section) { app.help = new app.views.Help(); $("#help").prepend(app.help.el); - app.help.render(); + app.help.render(section); + }, + + contacts: function() { + app.aspect = new app.models.Aspect(gon.preloads.aspect); + app.contacts = new app.collections.Contacts(app.parsePreload('contacts')); + + var stream = new app.views.ContactStream({ + collection: app.contacts, + el: $('.stream.contacts #contact_stream'), + }); + + app.page = new app.pages.Contacts({stream: stream}); + }, + + conversations: function() { + app.conversations = new app.views.Conversations(); }, singlePost : function(id) { @@ -42,14 +65,19 @@ app.Router = Backbone.Router.extend({ }, renderPage : function(pageConstructor){ - app.page && app.page.unbind && app.page.unbind() //old page might mutate global events $(document).keypress, so unbind before creating - app.page = pageConstructor() //create new page after the world is clean (like that will ever happen) - $("#container").html(app.page.render().el) + app.page && app.page.unbind && app.page.unbind(); //old page might mutate global events $(document).keypress, so unbind before creating + app.page = pageConstructor(); //create new page after the world is clean (like that will ever happen) + app.page.render(); + + if( !$.contains(document, app.page.el) ) { + // view element isn't already attached to the DOM, insert it + $("#container").empty().append(app.page.el); + } }, //below here is oldness - stream : function(page) { + stream : function() { app.stream = new app.models.Stream(); app.stream.fetch(); app.page = new app.views.Stream({model : app.stream}); @@ -59,13 +87,18 @@ app.Router = Backbone.Router.extend({ $("#main_stream").html(app.page.render().el); $('#selected_aspect_contacts .content').html(streamFacesView.render().el); - this.hideInactiveStreamLists(); + this._hideInactiveStreamLists(); }, - photos : function() { - app.photos = new app.models.Stream([], {collection: app.collections.Photos}); - app.page = new app.views.Photos({model : app.photos}); - $("#main_stream").html(app.page.render().el); + photos : function(guid) { + this.renderPage(function() { + return new app.pages.Profile({ + person_id: guid, + el: $('body > .container-fluid'), + streamCollection: app.collections.Photos, + streamView: app.views.Photos + }); + }); }, followed_tags : function(name) { @@ -82,9 +115,10 @@ app.Router = Backbone.Router.extend({ var followedTagsAction = new app.views.TagFollowingAction( {tagText: decodeURIComponent(name).toLowerCase()} ); - $("#author_info").prepend(followedTagsAction.render().el) + $("#author_info").prepend(followedTagsAction.render().el); + app.tags = new app.views.Tags({tagName: name}); } - this.hideInactiveStreamLists(); + this._hideInactiveStreamLists(); }, aspects : function(){ @@ -107,22 +141,28 @@ app.Router = Backbone.Router.extend({ $("#main_stream").html(app.page.render().el); $('#selected_aspect_contacts .content').html(streamFacesView.render().el); - this.hideInactiveStreamLists(); + this._hideInactiveStreamLists(); }, - hideInactiveStreamLists: function() { - if(this.aspects_list && Backbone.history.fragment != "aspects") + _hideInactiveStreamLists: function() { + if(this.aspects_list && Backbone.history.fragment !== "aspects") this.aspects_list.hideAspectsList(); - if(this.followedTagsView && Backbone.history.fragment != "followed_tags") + if(this.followedTagsView && Backbone.history.fragment !== "followed_tags") this.followedTagsView.hideFollowedTags(); }, bookmarklet: function() { - var contents = (window.gon) ? gon.preloads.bookmarklet : {} + var contents = (window.gon) ? gon.preloads.bookmarklet : {}; app.bookmarklet = new app.views.Bookmarklet( _.extend({}, {el: $('#bookmarklet')}, contents) ).render(); + }, + + profile: function() { + this.renderPage(function() { return new app.pages.Profile({ + el: $('body > .container-fluid') + }); }); } }); - +// @license-end diff --git a/app/assets/javascripts/app/views.js b/app/assets/javascripts/app/views.js index 78baa19b7..55ec8fffc 100644 --- a/app/assets/javascripts/app/views.js +++ b/app/assets/javascripts/app/views.js @@ -1,11 +1,13 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Base = Backbone.View.extend({ - initialize : function(options) { + initialize : function() { this.setupRenderEvents(); }, presenter : function(){ - return this.defaultPresenter() + return this.defaultPresenter(); }, setupRenderEvents : function(){ @@ -16,7 +18,7 @@ app.views.Base = Backbone.View.extend({ }, defaultPresenter : function(){ - var modelJson = this.model && this.model.attributes ? _.clone(this.model.attributes) : {} + var modelJson = this.model && this.model.attributes ? _.clone(this.model.attributes) : {}; return _.extend(modelJson, { current_user : app.currentUser.attributes, @@ -25,24 +27,29 @@ app.views.Base = Backbone.View.extend({ }, render : function() { - this.renderTemplate() - this.renderSubviews() - this.renderPluginWidgets() - this.removeTooltips() + this.renderTemplate(); + this.renderSubviews(); + this.renderPluginWidgets(); + this.removeTooltips(); - return this + return this; }, renderTemplate : function(){ - var presenter = _.isFunction(this.presenter) ? this.presenter() : this.presenter - this.template = JST[this.templateName+"_tpl"] + var presenter = _.isFunction(this.presenter) ? this.presenter() : this.presenter; + this.template = HandlebarsTemplates[this.templateName+"_tpl"]; if(!this.template) { - console.log(this.templateName ? ("no template for " + this.templateName) : "no templateName specified") + console.log(this.templateName ? ("no template for " + this.templateName) : "no templateName specified"); + return; } this.$el .html(this.template(presenter)) .attr("data-template", _.last(this.templateName.split("/"))); + + // add avatar fallback if it can't be loaded + this.$el.find(this.avatars.selector).error(this.avatars.fallback); + this.postRenderTemplate(); }, @@ -51,12 +58,12 @@ app.views.Base = Backbone.View.extend({ renderSubviews : function(){ var self = this; _.each(this.subviews, function(property, selector){ - var view = _.isFunction(self[property]) ? self[property]() : self[property] + var view = _.isFunction(self[property]) ? self[property]() : self[property]; if(view) { - self.$(selector).html(view.render().el) + self.$(selector).html(view.render().el); view.delegateEvents(); } - }) + }); }, renderPluginWidgets : function() { @@ -69,16 +76,16 @@ app.views.Base = Backbone.View.extend({ }, setFormAttrs : function(){ - this.model.set(_.inject(this.formAttrs, _.bind(setValueFromField, this), {})) - function setValueFromField(memo, attribute, selector){ if(attribute.slice("-2") === "[]") { - memo[attribute.slice(0, attribute.length - 2)] = _.pluck(this.$el.find(selector).serializeArray(), "value") + memo[attribute.slice(0, attribute.length - 2)] = _.pluck(this.$el.find(selector).serializeArray(), "value"); } else { memo[attribute] = this.$el.find(selector).val() || this.$el.find(selector).text(); } - return memo + return memo; } + + this.model.set(_.inject(this.formAttrs, _.bind(setValueFromField, this), {})); }, report: function(evt) { @@ -97,13 +104,13 @@ app.views.Base = Backbone.View.extend({ var report = new app.models.Report(); report.save(data, { - success: function(model, response) { + success: function() { Diaspora.page.flashMessages.render({ success: true, notice: Diaspora.I18n.t('report.status.created') }); }, - error: function(model, response) { + error: function() { Diaspora.page.flashMessages.render({ success: false, notice: Diaspora.I18n.t('report.status.exists') @@ -118,12 +125,14 @@ app.views.Base = Backbone.View.extend({ var url = this.model.urlRoot + '/' + this.model.id; if (confirm(Diaspora.I18n.t("confirm_dialog"))) { + this.$el.addClass('deleting'); this.model.destroy({ url: url }) .done(function() { self.remove(); }) .fail(function() { - var flash = new Diaspora.Widgets.FlashMessages; + self.$el.removeClass('deleting'); + var flash = new Diaspora.Widgets.FlashMessages(); flash.render({ success: false, notice: Diaspora.I18n.t('failed_to_remove') @@ -131,6 +140,13 @@ app.views.Base = Backbone.View.extend({ }); } }, + + avatars: { + fallback: function() { + $(this).attr("src", ImagePaths.get("user/default.png")); + }, + selector: "img.avatar" + } }); app.views.StaticContentView = app.views.Base.extend({ @@ -146,3 +162,4 @@ app.views.StaticContentView = app.views.Base.extend({ return this.data; }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/aspect_membership_blueprint_view.js b/app/assets/javascripts/app/views/aspect_membership_blueprint_view.js deleted file mode 100644 index 5608b32c2..000000000 --- a/app/assets/javascripts/app/views/aspect_membership_blueprint_view.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * this view lets the user (de-)select aspect memberships in the context - * of another users profile or the contact page. - * - * updates to the list of aspects are immediately propagated to the server, and - * the results are dislpayed as flash messages. - */ -app.views.AspectMembershipBlueprint = Backbone.View.extend({ - - initialize: function() { - // attach event handler, removing any previous instances - var selector = '.dropdown.aspect_membership .dropdown_list > li'; - $('body') - .off('click', selector) - .on('click', selector, _.bind(this._clickHandler, this)); - - this.list_item = null; - this.dropdown = null; - }, - - // decide what to do when clicked - // -> addMembership - // -> removeMembership - _clickHandler: function(evt) { - this.list_item = $(evt.target); - this.dropdown = this.list_item.parent(); - - this.list_item.addClass('loading'); - - if( this.list_item.is('.selected') ) { - var membership_id = this.list_item.data('membership_id'); - this.removeMembership(membership_id); - } else { - var aspect_id = this.list_item.data('aspect_id'); - var person_id = this.dropdown.data('person_id'); - this.addMembership(person_id, aspect_id); - } - - return false; // stop the event - }, - - // return the (short) name of the person associated with the current dropdown - _name: function() { - return this.dropdown.data('person-short-name'); - }, - - // create a membership for the given person in the given aspect - addMembership: function(person_id, aspect_id) { - var aspect_membership = new app.models.AspectMembership({ - 'person_id': person_id, - 'aspect_id': aspect_id - }); - - aspect_membership.on('sync', this._successSaveCb, this); - aspect_membership.on('error', function() { - this._displayError('aspect_dropdown.error'); - }, this); - - aspect_membership.save(); - }, - - _successSaveCb: function(aspect_membership) { - var aspect_id = aspect_membership.get('aspect_id'); - var membership_id = aspect_membership.get('id'); - var li = this.dropdown.find('li[data-aspect_id="'+aspect_id+'"]'); - - // the user didn't have this person in any aspects before, congratulate them - // on their newly found friendship ;) - if( this.dropdown.find('li.selected').length == 0 ) { - var msg = Diaspora.I18n.t('aspect_dropdown.started_sharing_with', { 'name': this._name() }); - Diaspora.page.flashMessages.render({ 'success':true, 'notice':msg }); - } - - li.attr('data-membership_id', membership_id) // just to be sure... - .data('membership_id', membership_id) - .addClass('selected'); - - this.updateSummary(); - this._done(); - }, - - // show an error flash msg - _displayError: function(msg_id) { - this._done(); - this.dropdown.removeClass('active'); // close the dropdown - - var msg = Diaspora.I18n.t(msg_id, { 'name': this._name() }); - Diaspora.page.flashMessages.render({ 'success':false, 'notice':msg }); - }, - - // remove the membership with the given id - removeMembership: function(membership_id) { - var aspect_membership = new app.models.AspectMembership({ - 'id': membership_id - }); - - aspect_membership.on('sync', this._successDestroyCb, this); - aspect_membership.on('error', function() { - this._displayError('aspect_dropdown.error_remove'); - }, this); - - aspect_membership.destroy(); - }, - - _successDestroyCb: function(aspect_membership) { - var membership_id = aspect_membership.get('id'); - var li = this.dropdown.find('li[data-membership_id="'+membership_id+'"]'); - - li.removeAttr('data-membership_id') - .removeData('membership_id') - .removeClass('selected'); - - // we just removed the last aspect, inform the user with a flash message - // that he is no longer sharing with that person - if( this.dropdown.find('li.selected').length == 0 ) { - var msg = Diaspora.I18n.t('aspect_dropdown.stopped_sharing_with', { 'name': this._name() }); - Diaspora.page.flashMessages.render({ 'success':true, 'notice':msg }); - } - - this.updateSummary(); - this._done(); - }, - - // cleanup tasks after aspect selection - _done: function() { - if( this.list_item ) { - this.list_item.removeClass('loading'); - } - }, - - // refresh the button text to reflect the current aspect selection status - updateSummary: function() { - var btn = this.dropdown.parents('div.aspect_membership').find('.button.toggle'); - var aspects_cnt = this.dropdown.find('li.selected').length; - var txt; - - if( aspects_cnt == 0 ) { - btn.removeClass('in_aspects'); - txt = Diaspora.I18n.t('aspect_dropdown.toggle.zero'); - } else { - btn.addClass('in_aspects'); - txt = this._pluralSummaryTxt(aspects_cnt); - } - - btn.text(txt + ' ▼'); - }, - - _pluralSummaryTxt: function(cnt) { - var all_aspects_cnt = this.dropdown.find('li').length; - - if( cnt == 1 ) { - return this.dropdown.find('li.selected').first().text(); - } - - if( cnt == all_aspects_cnt ) { - return Diaspora.I18n.t('aspect_dropdown.all_aspects'); - } - - return Diaspora.I18n.t('aspect_dropdown.toggle', { 'count':cnt.toString() }); - } -}); diff --git a/app/assets/javascripts/app/views/aspect_membership_view.js b/app/assets/javascripts/app/views/aspect_membership_view.js index f753c3134..d22452421 100644 --- a/app/assets/javascripts/app/views/aspect_membership_view.js +++ b/app/assets/javascripts/app/views/aspect_membership_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require ./aspects_dropdown_view /** @@ -10,7 +12,8 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ events: { - "click ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler" + "click ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler", + "keypress ul.aspect_membership.dropdown-menu > li.aspect_selector": "_clickHandler" }, initialize: function() { @@ -22,6 +25,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ // -> addMembership // -> removeMembership _clickHandler: function(evt) { + var promise = null; this.list_item = $(evt.target).closest('li.aspect_selector'); this.dropdown = this.list_item.parent(); @@ -29,13 +33,18 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ if( this.list_item.is('.selected') ) { var membership_id = this.list_item.data('membership_id'); - this.removeMembership(membership_id); + promise = this.removeMembership(membership_id); } else { var aspect_id = this.list_item.data('aspect_id'); var person_id = this.dropdown.data('person_id'); - this.addMembership(person_id, aspect_id); + promise = this.addMembership(person_id, aspect_id); } + promise && promise.always(function() { + // trigger a global event + app.events.trigger('aspect_membership:update'); + }); + return false; // stop the event }, @@ -56,7 +65,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ this._displayError('aspect_dropdown.error'); }, this); - aspect_membership.save(); + return aspect_membership.save(); }, _successSaveCb: function(aspect_membership) { @@ -66,7 +75,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ // the user didn't have this person in any aspects before, congratulate them // on their newly found friendship ;) - if( this.dropdown.find('li.selected').length == 0 ) { + if( this.dropdown.find('li.selected').length === 0 ) { var msg = Diaspora.I18n.t('aspect_dropdown.started_sharing_with', { 'name': this._name() }); Diaspora.page.flashMessages.render({ 'success':true, 'notice':msg }); } @@ -98,7 +107,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ this._displayError('aspect_dropdown.error_remove'); }, this); - aspect_membership.destroy(); + return aspect_membership.destroy(); }, _successDestroyCb: function(aspect_membership) { @@ -111,7 +120,7 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ // we just removed the last aspect, inform the user with a flash message // that he is no longer sharing with that person - if( this.dropdown.find('li.selected').length == 0 ) { + if( this.dropdown.find('li.selected').length === 0 ) { var msg = Diaspora.I18n.t('aspect_dropdown.stopped_sharing_with', { 'name': this._name() }); Diaspora.page.flashMessages.render({ 'success':true, 'notice':msg }); } @@ -132,3 +141,5 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({ this._updateButton('green'); }, }); +// @license-end + diff --git a/app/assets/javascripts/app/views/aspect_view.js b/app/assets/javascripts/app/views/aspect_view.js index c8e553ea8..66cc4a945 100644 --- a/app/assets/javascripts/app/views/aspect_view.js +++ b/app/assets/javascripts/app/views/aspect_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Aspect = app.views.Base.extend({ templateName: "aspect", @@ -6,19 +8,20 @@ app.views.Aspect = app.views.Base.extend({ className: 'hoverable', events: { - 'click .icons-check_yes_ok+a': 'toggleAspect' + 'click .entypo.check+a': 'toggleAspect' }, toggleAspect: function(evt) { - if (evt) { evt.preventDefault(); }; + if (evt) { evt.preventDefault(); } this.model.toggleSelected(); - this.$el.find('.icons-check_yes_ok').toggleClass('selected'); + app.router.aspects_stream(); }, presenter : function() { return _.extend(this.defaultPresenter(), { aspect : this.model - }) + }); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/aspects_dropdown_view.js b/app/assets/javascripts/app/views/aspects_dropdown_view.js index 76ecb5878..70e446704 100644 --- a/app/assets/javascripts/app/views/aspects_dropdown_view.js +++ b/app/assets/javascripts/app/views/aspects_dropdown_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* * Aspects view for the publishers aspect dropdown and the aspect membership dropdown. */ @@ -14,12 +16,11 @@ app.views.AspectsDropdown = app.views.Base.extend({ // select aspects in the dropdown by a given list of ids _selectAspects: function(ids) { - this.$('.dropdown-menu > li').each(function(){ + this.$('.dropdown-menu > li').each(function() { var el = $(this); - if(_.contains(ids, el.data('aspect_id'))){ + if (_.contains(ids, el.data('aspect_id'))) { el.addClass('selected'); - } - else { + } else { el.removeClass('selected'); } }); @@ -31,16 +32,14 @@ app.views.AspectsDropdown = app.views.Base.extend({ selectedAspects = this.$(".dropdown-menu > li.selected").length, buttonText; - if(selectedAspects == 0){ + if (selectedAspects === 0) { button.removeClass(inAspectClass).addClass('btn-default'); buttonText = Diaspora.I18n.t("aspect_dropdown.select_aspects"); - } - else{ + } else { button.removeClass('btn-default').addClass(inAspectClass); - if(selectedAspects == 1){ + if (selectedAspects === 1) { buttonText = this.$(".dropdown-menu > li.selected .text").first().text(); - } - else{ + } else { buttonText = Diaspora.I18n.t("aspect_dropdown.toggle", { count: selectedAspects.toString() }); } } @@ -48,3 +47,5 @@ app.views.AspectsDropdown = app.views.Base.extend({ button.find('.text').text(buttonText); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/aspects_list_view.js b/app/assets/javascripts/app/views/aspects_list_view.js index 615ff1098..29cdf45a5 100644 --- a/app/assets/javascripts/app/views/aspects_list_view.js +++ b/app/assets/javascripts/app/views/aspects_list_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.AspectsList = app.views.Base.extend({ templateName: 'aspects-list', @@ -10,6 +12,7 @@ app.views.AspectsList = app.views.Base.extend({ initialize: function() { this.collection.on('change', this.toggleSelector, this); this.collection.on('change', this.updateStreamTitle, this); + this.collection.on('aspectStreamFetched', this.updateAspectList, this); }, postRenderTemplate: function() { @@ -26,19 +29,12 @@ app.views.AspectsList = app.views.Base.extend({ }, toggleAll: function(evt) { - if (evt) { evt.preventDefault(); }; + if (evt) { evt.preventDefault(); } - var aspects = this.$('li:not(:last)') if (this.collection.allSelected()) { this.collection.deselectAll(); - aspects.each(function(i){ - $(this).find('.icons-check_yes_ok').removeClass('selected'); - }); } else { this.collection.selectAll(); - aspects.each(function(i){ - $(this).find('.icons-check_yes_ok').addClass('selected'); - }); } this.toggleSelector(); @@ -58,7 +54,19 @@ app.views.AspectsList = app.views.Base.extend({ $('.stream_title').text(this.collection.toSentence()); }, + updateAspectList: function() { + this.collection.each(function(aspect) { + var element = this.$("li[data-aspect_id="+aspect.get('id')+"]"); + if (aspect.get('selected')) { + element.find('.entypo.check').addClass('selected'); + } else { + element.find('.entypo.check').removeClass('selected'); + } + }); + }, + hideAspectsList: function() { this.$el.empty(); }, -}) +}); +// @license-end diff --git a/app/assets/javascripts/app/views/bookmarklet_view.js b/app/assets/javascripts/app/views/bookmarklet_view.js index 28bce5f47..c8e982fc3 100644 --- a/app/assets/javascripts/app/views/bookmarklet_view.js +++ b/app/assets/javascripts/app/views/bookmarklet_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Bookmarklet = Backbone.View.extend({ separator: ' - ', @@ -28,18 +30,20 @@ app.views.Bookmarklet = Backbone.View.extend({ return contents; }, - _postSubmit: function(evt) { + _postSubmit: function() { this.$('h4').text(Diaspora.I18n.t('bookmarklet.post_submit')); }, - _postSuccess: function(evt) { + _postSuccess: function() { this.$('h4').text(Diaspora.I18n.t('bookmarklet.post_success')); app.publisher.close(); this.$("#publisher").addClass("hidden"); _.delay(window.close, 2000); }, - _postError: function(evt) { + _postError: function() { this.$('h4').text(Diaspora.I18n.t('bookmarklet.post_something')); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/comment_stream_view.js b/app/assets/javascripts/app/views/comment_stream_view.js index db30390ca..73bc7feda 100644 --- a/app/assets/javascripts/app/views/comment_stream_view.js +++ b/app/assets/javascripts/app/views/comment_stream_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.CommentStream = app.views.Base.extend({ templateName: "comment-stream", @@ -37,7 +39,7 @@ app.views.CommentStream = app.views.Base.extend({ moreCommentsCount : (this.model.interactions.commentsCount() - 3), showExpandCommentsLink : (this.model.interactions.commentsCount() > 3), commentsCount : this.model.interactions.commentsCount() - }) + }); }, createComment: function(evt) { @@ -55,8 +57,8 @@ app.views.CommentStream = app.views.Base.extend({ }, keyDownOnCommentBox: function(evt) { - if(evt.keyCode == 13 && evt.ctrlKey) { - this.$("form").submit() + if(evt.keyCode === 13 && evt.ctrlKey) { + this.$("form").submit(); return false; } }, @@ -64,14 +66,14 @@ app.views.CommentStream = app.views.Base.extend({ appendComment: function(comment) { // Set the post as the comment's parent, so we can check // on post ownership in the Comment view. - comment.set({parent : this.model.toJSON()}) + comment.set({parent : this.model.toJSON()}); this.$(".comments").append(new app.views.Comment({ model: comment }).render().el); }, - commentTextareaFocused: function(evt){ + commentTextareaFocused: function(){ this.$("form").removeClass('hidden').addClass("open"); }, @@ -81,18 +83,18 @@ app.views.CommentStream = app.views.Base.extend({ expandComments: function(evt){ if(evt){ evt.preventDefault(); } - - self = this; + var self = this; this.model.comments.fetch({ success : function(resp){ self.model.set({ comments : resp.models, all_comments_loaded : true - }) + }); - self.model.trigger("commentsExpanded", self) + self.model.trigger("commentsExpanded", self); } }); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/comment_view.js b/app/assets/javascripts/app/views/comment_view.js index 540c54b99..7f74d1146 100644 --- a/app/assets/javascripts/app/views/comment_view.js +++ b/app/assets/javascripts/app/views/comment_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require ./content_view app.views.Comment = app.views.Content.extend({ templateName: "comment", @@ -11,27 +13,27 @@ app.views.Comment = app.views.Content.extend({ }, initialize : function(options){ - this.templateName = options.templateName || this.templateName - this.model.on("change", this.render, this) + this.templateName = options.templateName || this.templateName; + this.model.on("change", this.render, this); }, presenter : function() { return _.extend(this.defaultPresenter(), { canRemove: this.canRemove(), - text : app.helpers.textFormatter(this.model.get("text"), this.model) - }) + text : app.helpers.textFormatter(this.model.get("text")) + }); }, ownComment : function() { - return app.currentUser.authenticated() && this.model.get("author").diaspora_id == app.currentUser.get("diaspora_id") + return app.currentUser.authenticated() && this.model.get("author").diaspora_id === app.currentUser.get("diaspora_id"); }, postOwner : function() { - return app.currentUser.authenticated() && this.model.get("parent").author.diaspora_id == app.currentUser.get("diaspora_id") + return app.currentUser.authenticated() && this.model.get("parent").author.diaspora_id === app.currentUser.get("diaspora_id"); }, canRemove : function() { - return app.currentUser.authenticated() && (this.ownComment() || this.postOwner()) + return app.currentUser.authenticated() && (this.ownComment() || this.postOwner()); } }); @@ -39,3 +41,4 @@ app.views.ExpandedComment = app.views.Comment.extend({ postRenderTemplate : function(){ } }); +// @license-end diff --git a/app/assets/javascripts/app/views/contact_stream_view.js b/app/assets/javascripts/app/views/contact_stream_view.js new file mode 100644 index 000000000..ad93301bd --- /dev/null +++ b/app/assets/javascripts/app/views/contact_stream_view.js @@ -0,0 +1,77 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.ContactStream = Backbone.View.extend({ + initialize: function() { + this.itemCount = 0; + this.perPage = 25; + this.query = ''; + this.resultList = this.collection.toArray(); + var throttledScroll = _.throttle(_.bind(this.infScroll, this), 200); + $(window).scroll(throttledScroll); + this.on('renderContacts', this.renderContacts, this); + }, + + render: function() { + if( _.isEmpty(this.resultList) ) { + var content = document.createDocumentFragment(); + content = '
' + + '

' + + Diaspora.I18n.t('contacts.search_no_results') + + '

' + + '
'; + this.$el.html(content); + } else { + this.$el.html(''); + this.renderContacts(); + } + }, + + renderContacts: function() { + this.$el.addClass("loading"); + var content = document.createDocumentFragment(); + _.rest(_.first(this.resultList , this.itemCount + this.perPage), this.itemCount).forEach( function(item) { + var view = new app.views.Contact({model: item}); + content.appendChild(view.render().el); + }); + + var size = _.size(this.resultList); + if( this.itemCount + this.perPage >= size ){ + this.itemCount = size; + this.off('renderContacts'); + } else { + this.itemCount += this.perPage; + } + this.$el.append(content); + this.$el.removeClass("loading"); + }, + + search: function(query) { + query = query.trim(); + if( query || this.query ) { + this.off('renderContacts'); + this.on('renderContacts', this.renderContacts, this); + this.itemCount = 0; + if( query ) { + this.query = query; + var regex = new RegExp(query,'i'); + this.resultList = this.collection.filter(function(contact) { + return regex.test(contact.get('person').name) || + regex.test(contact.get('person').diaspora_id); + }); + } else { + this.resultList = this.collection.toArray(); + this.query = ''; + } + this.render(); + } + }, + + infScroll: function() { + if( this.$el.hasClass('loading') ) return; + + var distanceTop = $(window).height() + $(window).scrollTop(), + distanceBottom = $(document).height() - distanceTop; + if(distanceBottom < 300) this.trigger('renderContacts'); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/views/contact_view.js b/app/assets/javascripts/app/views/contact_view.js new file mode 100644 index 000000000..840edfe46 --- /dev/null +++ b/app/assets/javascripts/app/views/contact_view.js @@ -0,0 +1,71 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.Contact = app.views.Base.extend({ + templateName: 'contact', + + events: { + "click .contact_add-to-aspect" : "addContactToAspect", + "click .contact_remove-from-aspect" : "removeContactFromAspect" + }, + + tooltipSelector: '.contact_add-to-aspect, .contact_remove-from-aspect', + + presenter: function() { + return _.extend(this.defaultPresenter(), { + person_id : this.model.get('person_id'), + person : this.model.get('person'), + in_aspect: (app.aspect && this.model.inAspect(app.aspect.get('id'))) ? 'in_aspect' : '', + }); + }, + + postRenderTemplate: function() { + var self = this; + var dropdownEl = this.$('.aspect_membership_dropdown.placeholder'); + if( dropdownEl.length === 0 ) { + return; + } + + // TODO render me client side!!! + var href = this.model.person.url() + '/aspect_membership_button?size=small'; + + $.get(href, function(resp) { + dropdownEl.html(resp); + new app.views.AspectMembership({el: $('.aspect_dropdown',dropdownEl)}); + + // UGLY (re-)attach the facebox + self.$('a[rel*=facebox]').facebox(); + }); + }, + + addContactToAspect: function(){ + var self = this; + this.model.aspect_memberships.create({ + 'person_id': this.model.get('person_id'), + 'aspect_id': app.aspect.get('id') + },{ + success: function(){ + self.render(); + }, + error: function(){ + var msg = Diaspora.I18n.t('contacts.error_add', { 'name': self.model.get('person').name }); + Diaspora.page.flashMessages.render({ 'success':false, 'notice':msg }); + } + }); + }, + + removeContactFromAspect: function(){ + var self = this; + this.model.aspect_memberships + .find(function(membership){ return membership.get('aspect').id === app.aspect.id; }) + .destroy({ + success: function(){ + self.render(); + }, + error: function(){ + var msg = Diaspora.I18n.t('contacts.error_remove', { 'name': self.model.get('person').name }); + Diaspora.page.flashMessages.render({ 'success':false, 'notice':msg }); + } + }); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/views/content_view.js b/app/assets/javascripts/app/views/content_view.js index e2ec64cd3..75a4632cc 100644 --- a/app/assets/javascripts/app/views/content_view.js +++ b/app/assets/javascripts/app/views/content_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Content = app.views.Base.extend({ events: { "click .expander": "expandPost" @@ -5,7 +7,7 @@ app.views.Content = app.views.Base.extend({ presenter : function(){ return _.extend(this.defaultPresenter(), { - text : app.helpers.textFormatter(this.model.get("text"), this.model), + text : app.helpers.textFormatter(this.model.get("text"), this.model.get("mentioned_people")), largePhoto : this.largePhoto(), smallPhotos : this.smallPhotos(), location: this.location() @@ -14,13 +16,13 @@ app.views.Content = app.views.Base.extend({ largePhoto : function() { - var photos = this.model.get("photos") - if(!photos || photos.length == 0) { return } - return photos[0] + var photos = this.model.get("photos"); + if(!photos || photos.length === 0) { return } + return photos[0]; }, smallPhotos : function() { - var photos = this.model.get("photos") + var photos = this.model.get("photos"); if(!photos || photos.length < 2) { return } photos.splice(0, 1); // remove first photo as it is already shown as largePhoto return photos; @@ -47,10 +49,10 @@ app.views.Content = app.views.Base.extend({ , oembed = elem.find(".oembed") , opengraph = elem.find(".opengraph") , addHeight = 0; - if($.trim(oembed.html()) != "") { + if($.trim(oembed.html()) !== "") { addHeight += oembed.height(); } - if($.trim(opengraph.html()) != "") { + if($.trim(opengraph.html()) !== "") { addHeight += opengraph.height(); } @@ -69,7 +71,7 @@ app.views.Content = app.views.Base.extend({ }, postRenderTemplate : function(){ - _.defer(_.bind(this.collapseOversized, this)) + _.defer(_.bind(this.collapseOversized, this)); } }); @@ -93,26 +95,55 @@ app.views.OEmbed = app.views.Base.extend({ }, presenter:function () { - o_embed_cache = this.model.get("o_embed_cache") + var o_embed_cache = this.model.get("o_embed_cache"); if(o_embed_cache) { - typemodel = { rich: false, photo: false, video: false, link: false } - typemodel[o_embed_cache.data.type] = true - o_embed_cache.data.types = typemodel + var typemodel = { rich: false, photo: false, video: false, link: false }; + typemodel[o_embed_cache.data.type] = true; + o_embed_cache.data.types = typemodel; } return _.extend(this.defaultPresenter(), { o_embed_html : app.helpers.oEmbed.html(o_embed_cache) - }) + }); }, showOembedContent : function (evt) { if( $(evt.target).is('a') ) return; + var clickedThumb = false; + if ($(evt.target).hasClass(".thumb")) { + clickedThumb = $(evt.target); + } else { + clickedThumb = $(evt.target).parent(".thumb"); + } var insertHTML = $(app.helpers.oEmbed.html(this.model.get("o_embed_cache"))); var paramSeparator = ( /\?/.test(insertHTML.attr("src")) ) ? "&" : "?"; insertHTML.attr("src", insertHTML.attr("src") + paramSeparator + "autoplay=1&wmode=opaque"); + if (clickedThumb) { + insertHTML.attr("width", clickedThumb.width()); + insertHTML.attr("height", clickedThumb.height()); + } this.$el.html(insertHTML); } }); app.views.OpenGraph = app.views.Base.extend({ - templateName : "opengraph" + templateName : "opengraph", + + initialize: function() { + this.truncateDescription(); + }, + + truncateDescription: function() { + // truncate opengraph description to 250 for stream view + if(this.model.has('open_graph_cache')) { + var ogdesc = this.model.get('open_graph_cache'); + ogdesc.description = app.helpers.truncate(ogdesc.description, 250); + } + } }); + +app.views.SPVOpenGraph = app.views.OpenGraph.extend({ + truncateDescription: function () { + // override with nothing + } +}); +// @license-end diff --git a/app/assets/javascripts/app/views/conversations_form_view.js b/app/assets/javascripts/app/views/conversations_form_view.js new file mode 100644 index 000000000..30cec16d9 --- /dev/null +++ b/app/assets/javascripts/app/views/conversations_form_view.js @@ -0,0 +1,31 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.ConversationsForm = Backbone.View.extend({ + + initialize: function(opts) { + this.contacts = _.has(opts, 'contacts') ? opts.contacts : null; + this.prefill = []; + if (_.has(opts, 'prefillName') && _.has(opts, 'prefillValue')) { + this.prefill = [{name : opts.prefillName, + value : opts.prefillValue}]; + } + this.autocompleteInput = $("#contact_autocomplete"); + this.prepareAutocomplete(this.contacts); + }, + + prepareAutocomplete: function(data){ + this.autocompleteInput.autoSuggest(data, { + selectedItemProp: "name", + searchObjProps: "name", + asHtmlID: "contact_ids", + retrieveLimit: 10, + minChars: 1, + keyDelay: 0, + startText: '', + emptyText: Diaspora.I18n.t('no_results'), + preFill: this.prefill + }).focus(); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/conversations_view.js b/app/assets/javascripts/app/views/conversations_view.js new file mode 100644 index 000000000..e3810c1c2 --- /dev/null +++ b/app/assets/javascripts/app/views/conversations_view.js @@ -0,0 +1,49 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.Conversations = Backbone.View.extend({ + + el: "#conversations_container", + + events: { + "conversation:loaded" : "setupConversation" + }, + + initialize: function() { + if($('#conversation_new:visible').length > 0) { + new app.views.ConversationsForm({contacts: gon.contacts}); + } + this.setupConversation(); + }, + + setupConversation: function() { + app.helpers.timeago($(this.el)); + $('.control-icons a').tooltip({placement: 'bottom'}); + + var conv = $('.conversation-wrapper .stream_element.selected'), + cBadge = $('#conversations_badge .badge_count'); + + if(conv.hasClass('unread') ){ + var unreadCount = parseInt(conv.find('.unread_message_count').text(), 10); + + if(cBadge.text() !== '') { + cBadge.text().replace(/\d+/, function(num){ + num = parseInt(num, 10) - unreadCount; + if(num > 0) { + cBadge.text(num); + } else { + cBadge.text(0).addClass('hidden'); + } + }); + } + conv.removeClass('unread'); + conv.find('.unread_message_count').remove(); + + var pos = $('#first_unread').offset().top - 50; + $("html").animate({scrollTop:pos}); + } else { + $("html").animate({scrollTop:0}); + } + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/faq_question_view.js b/app/assets/javascripts/app/views/faq_question_view.js index b5654c549..f32969e32 100644 --- a/app/assets/javascripts/app/views/faq_question_view.js +++ b/app/assets/javascripts/app/views/faq_question_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.FaqQuestionView = app.views.Base.extend({ templateName: "faq_question", @@ -26,12 +28,14 @@ app.views.FaqQuestionView = app.views.Base.extend({ }, toggled: function(e) { - el = $(e.target); - parent = el.parents('.question'); + var el = $(e.target); + var parent = el.parents('.question'); parent.children('.answer').toggle(); parent.toggleClass('opened').toggleClass('collapsed'); e.preventDefault(); }, -}); \ No newline at end of file +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/feedback_actions.js b/app/assets/javascripts/app/views/feedback_actions.js index b781bccbc..861bde76d 100644 --- a/app/assets/javascripts/app/views/feedback_actions.js +++ b/app/assets/javascripts/app/views/feedback_actions.js @@ -1,7 +1,11 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //=require "./feedback_view" app.views.FeedbackActions = app.views.Feedback.extend({ id : "user-controls", templateName : "feedback-actions", events: {}, initialize: function(){} -}); \ No newline at end of file +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/feedback_view.js b/app/assets/javascripts/app/views/feedback_view.js index c230d2b4f..938469bbb 100644 --- a/app/assets/javascripts/app/views/feedback_view.js +++ b/app/assets/javascripts/app/views/feedback_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Feedback = app.views.Base.extend({ templateName: "feedback", @@ -6,18 +8,21 @@ app.views.Feedback = app.views.Base.extend({ events: { "click .like" : "toggleLike", "click .reshare" : "resharePost", - "click .post_report" : "report" + + "click .post_report" : "report", + "click .block_user" : "blockUser", + "click .hide_post" : "hidePost", }, tooltipSelector : ".label", initialize : function() { this.model.interactions.on('change', this.render, this); - this.initViews && this.initViews() // I don't know why this was failing with $.noop... :( + this.initViews && this.initViews(); // I don't know why this was failing with $.noop... :( }, presenter : function() { - var interactions = this.model.interactions + var interactions = this.model.interactions; return _.extend(this.defaultPresenter(),{ commentsCount : interactions.commentsCount(), @@ -26,7 +31,7 @@ app.views.Feedback = app.views.Base.extend({ userCanReshare : interactions.userCanReshare(), userLike : interactions.userLike(), userReshare : interactions.userReshare() - }) + }); }, toggleLike: function(evt) { @@ -38,5 +43,45 @@ app.views.Feedback = app.views.Base.extend({ if(evt) { evt.preventDefault(); } if(!window.confirm(Diaspora.I18n.t("reshares.post", {name: this.model.reshareAuthor().name}))) { return } this.model.interactions.reshare(); - } + }, + + blockUser: function(evt) { + if(evt) { evt.preventDefault(); } + if(!confirm(Diaspora.I18n.t('ignore_user'))) { return; } + + this.model.blockAuthor() + .done(function() { + // return to stream + document.location.href = "/stream"; + }) + .fail(function() { + Diaspora.page.flashMessages.render({ + success: false, + notice: Diaspora.I18n.t('hide_post_failed') + }); + }); + }, + + hidePost : function(evt) { + if(evt) { evt.preventDefault(); } + if(!confirm(Diaspora.I18n.t('hide_post'))) { return; } + + $.ajax({ + url : "/share_visibilities/42", + type : "PUT", + data : { + post_id : this.model.id + } + }).done(function() { + // return to stream + document.location.href = "/stream"; + }) + .fail(function() { + Diaspora.page.flashMessages.render({ + success: false, + notice: Diaspora.I18n.t('ignore_post_failed') + }); + }); + }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/header_view.js b/app/assets/javascripts/app/views/header_view.js index db55694cc..814ef3a87 100644 --- a/app/assets/javascripts/app/views/header_view.js +++ b/app/assets/javascripts/app/views/header_view.js @@ -1,45 +1,53 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Header = app.views.Base.extend({ - templateName : "header", + templateName: "header", - className : "dark-header", + className: "dark-header", - events : { - "click ul.dropdown li:first-child" : "toggleDropdown", + events: { + "click ul.dropdown li:first-child": "toggleUserDropdown", "focusin #q": "toggleSearchActive", "focusout #q": "toggleSearchActive" }, - initialize : function(options) { - $(document.body).click($.proxy(this.hideDropdown, this)); + initialize: function(){ + $(document.body).click($.proxy(this.hideUserDropdown, this)); + return this; }, - menuElement : function() { - return this.$("ul.dropdown"); + postRenderTemplate: function(){ + new app.views.Notifications({ el: '#notification_dropdown' }); + new app.views.NotificationDropdown({ el: '#notification_badge' }); + new app.views.Search({ el: '#header-search-form' }); }, - toggleDropdown : function(evt) { + menuElement: function(){ return this.$("ul.dropdown"); }, + + toggleUserDropdown: function(evt){ if(evt){ evt.preventDefault(); } this.menuElement().toggleClass("active"); - if($.browser.msie) { + if($.browser.msie){ this.$("header").toggleClass('ie-user-menu-active'); } }, - hideDropdown : function(evt) { - if(this.menuElement().hasClass("active") && !$(evt.target).parents("#user_menu").length) { + hideUserDropdown: function(evt){ + if(this.menuElement().hasClass("active") && !$(evt.target).parents("#user_menu").length){ this.menuElement().removeClass("active"); } }, - toggleSearchActive: function(ev) { + toggleSearchActive: function(ev){ // jQuery produces two events for focus/blur (for bubbling) // don't rely on which event arrives first, by allowing for both variants - var is_active = (_.indexOf(['focus','focusin'], ev.type) != -1); + var is_active = (_.indexOf(['focus','focusin'], ev.type) !== -1); $(ev.target).toggleClass('active', is_active); return false; } }); +// @license-end diff --git a/app/assets/javascripts/app/views/help_section_view.js b/app/assets/javascripts/app/views/help_section_view.js index 5c54d96e9..432179461 100644 --- a/app/assets/javascripts/app/views/help_section_view.js +++ b/app/assets/javascripts/app/views/help_section_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.HelpSectionView = app.views.StaticContentView.extend({ events: { @@ -24,8 +26,8 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({ }, toggled: function(e) { - el = $(e.target); - parent = el.parents('.question'); + var el = $(e.target); + var parent = el.parents('.question'); parent.children('.answer.hideable').toggle(); parent.toggleClass('opened').toggleClass('collapsed'); @@ -52,3 +54,5 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({ }, }); +// @license-end + diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index 24234cb39..6cbcdf25c 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Help = app.views.StaticContentView.extend({ templateName : "help", @@ -6,23 +8,39 @@ app.views.Help = app.views.StaticContentView.extend({ "click .faq-link-getting-help" : "gettingHelp", "click .faq-link-sharing" : "sharing", "click .faq-link-posts-and-posting" : "postsAndPosting", + "click .faq-link-tags": "tags", "click .faq-link-keyboard-shortcuts" : "keyboardShortcuts", + "click .faq-link-chat" : "chat" }, - initialize : function(options) { + initialize : function() { this.GETTING_HELP_SUBS = { getting_started_a: { tutorial_series: this.linkHtml("http://diasporafoundation.org/getting_started/sign_up", Diaspora.I18n.t( 'getting_started_tutorial' )) }, get_support_a_website: { link: this.linkHtml("https://diasporafoundation.org/", Diaspora.I18n.t( 'foundation_website' ))}, get_support_a_tutorials: { tutorials: this.linkHtml("https://diasporafoundation.org/tutorials", Diaspora.I18n.t( 'tutorials' ))}, get_support_a_wiki: { link: this.linkHtml("https://wiki.diasporafoundation.org/Special:Search", Diaspora.I18n.t( 'wiki' ))}, get_support_a_irc: { irc: this.linkHtml("https://wiki.diasporafoundation.org/How_We_Communicate#IRC", Diaspora.I18n.t( 'irc' ))}, - get_support_a_hashtag: { question: this.linkHtml("/tags/question", "#question")}, + get_support_a_faq: { faq: this.linkHtml("https://wiki.diasporafoundation.org/FAQ_for_users", Diaspora.I18n.t( 'faq' ))}, + get_support_a_hashtag: { question: this.linkHtml("/tags/question", "#question")} }; this.POSTS_AND_POSTING_SUBS = { format_text_a: { markdown: this.linkHtml("http://diasporafoundation.org/formatting", Diaspora.I18n.t( 'markdown' )), - here: this.linkHtml("http://daringfireball.net/projects/markdown/syntax", Diaspora.I18n.t( 'here' )), + here: this.linkHtml("http://daringfireball.net/projects/markdown/syntax", Diaspora.I18n.t( 'here' )) + } + }; + + this.TAGS_SUBS = { + filter_tags_a: { + third_party_tools: this.linkHtml("https://wiki.diasporafoundation.org/Tools_to_use_with_Diaspora", Diaspora.I18n.t( 'third_party_tools' )) + } + }; + + this.CHAT_SUBS = { + add_contact_roster_a: { + toggle_privilege: this.getChatIcons(), + contacts_page: this.linkHtml(Routes.contacts_path(), Diaspora.I18n.t('chat.contacts_page')) } }; @@ -43,19 +61,24 @@ app.views.Help = app.views.StaticContentView.extend({ title_tags: Diaspora.I18n.t( 'tags.title' ), title_keyboard_shortcuts: Diaspora.I18n.t( 'keyboard_shortcuts.title' ), title_miscellaneous: Diaspora.I18n.t( 'miscellaneous.title' ), - } + title_chat: Diaspora.I18n.t( 'chat.title' ), + chat_enabled: this.chatEnabled() + }; return this; }, - render: function(){ - var section = app.views.Base.prototype.render.apply(this, arguments); + render: function(section){ + var html = app.views.Base.prototype.render.apply(this, arguments); // After render actions this.resetMenu(true); this.renderStaticSection("getting_help", "faq_getting_help", this.GETTING_HELP_SUBS); - return section; + var elTarget = this.findSection(section); + if(elTarget !== null){ $(elTarget).click(); } + + return html; }, showItems: function(el) { @@ -98,8 +121,12 @@ app.views.Help = app.views.StaticContentView.extend({ menuClicked: function(e) { this.resetMenu(); + $(e.target).hide(); $(e.target).next().show(); + + var data = $(e.target).data('section'); + app.router.navigate('help/' + data); }, clearItems: function() { @@ -115,8 +142,8 @@ app.views.Help = app.views.StaticContentView.extend({ renderStaticSection: function(section, template, subs) { this.clearItems(); - data = $.extend(Diaspora.I18n.resolve(section), { className: section }); - help_section = new app.views.HelpSectionView({ + var data = $.extend(Diaspora.I18n.resolve(section), { className: section }); + var help_section = new app.views.HelpSectionView({ template: template, data: data, subs: subs @@ -124,6 +151,18 @@ app.views.Help = app.views.StaticContentView.extend({ this.$('#faq').append(help_section.render().el); }, + /** + * Returns The section title whose data-section property equals the given query + * Returns null if nothing found + * @param data Value for the data-section to find + * @returns {jQuery} + */ + findSection: function(data){ + var res = this.$('a[data-section=' + data + ']'); + if(res.length === 0){ return null; } + return res; + }, + gettingHelp: function(e) { this.renderStaticSection("getting_help", "faq_getting_help", this.GETTING_HELP_SUBS); this.menuClicked(e); @@ -145,6 +184,13 @@ app.views.Help = app.views.StaticContentView.extend({ e.preventDefault(); }, + tags: function(e) { + this.renderStaticSection("tags", "faq_tags", this.TAGS_SUBS); + this.menuClicked(e); + + e.preventDefault(); + }, + keyboardShortcuts: function(e) { this.renderStaticSection("keyboard_shortcuts", "faq_keyboard_shortcuts", {}); this.menuClicked(e); @@ -152,7 +198,27 @@ app.views.Help = app.views.StaticContentView.extend({ e.preventDefault(); }, + chat: function(e){ + this.renderStaticSection("chat", "faq_chat", this.CHAT_SUBS); + this.menuClicked(e); + + e.preventDefault(); + }, + linkHtml: function(url, text) { return "" + text + ""; }, + + chatEnabled: function(){ + return gon.chatEnabled; + }, + + getChatIcons: function(){ + return '
' + + ' ' + + ' ' + + ' ' + + '
'; + } }); +// @license-end diff --git a/app/assets/javascripts/app/views/hovercard_view.js b/app/assets/javascripts/app/views/hovercard_view.js index c293bba31..cfcf49762 100644 --- a/app/assets/javascripts/app/views/hovercard_view.js +++ b/app/assets/javascripts/app/views/hovercard_view.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later app.views.Hovercard = app.views.Base.extend({ templateName: 'hovercard', @@ -14,8 +15,8 @@ app.views.Hovercard = app.views.Base.extend({ .on('mouseenter', '.hovercardable', _.bind(this._mouseenterHandler, this)) .on('mouseleave', '.hovercardable', _.bind(this._mouseleaveHandler, this)); - this.show_me = false; - this.parent = null; // current 'hovercarable' element that caused HC to appear + this.showMe = false; + this.parent = null; // current 'hovercardable' element that caused HC to appear // cache some element references this.avatar = this.$('.avatar'); @@ -28,7 +29,7 @@ app.views.Hovercard = app.views.Base.extend({ }, postRenderTemplate: function() { - this.$el.appendTo($('body')) + this.$el.appendTo($('body')); }, deactivate: function() { @@ -40,7 +41,7 @@ app.views.Hovercard = app.views.Base.extend({ }, _mouseenterHandler: function(event) { - if( this.active == false || + if( this.active === false || $.contains(this.el, event.target) ) { return false; } var el = $(event.target); @@ -48,28 +49,31 @@ app.views.Hovercard = app.views.Base.extend({ el = el.parents('a'); } - if( el.attr('href').indexOf('/people') == -1 ) { + if( el.attr('href').indexOf('/people') === -1 ) { // can't fetch data from that URL, aborting return false; } - this.show_me = true; + this.showMe = true; this.showHovercardOn(el); return false; }, _mouseleaveHandler: function(event) { - if( this.active == false || - $.contains(this.el, event.relatedTarget) ) { return false; } + this.showMe = false; + if( this.active === false || + $.contains(this.el, event.relatedTarget) ) { return false; } + + if( this.mouseIsOverElement(this.parent, event) || + this.mouseIsOverElement(this.$el, event) ) { return false; } - this.show_me = false; if( this.$el.is(':visible') ) { this.$el.fadeOut('fast'); } else { this.$el.hide(); } - this.dropdown_container.empty(); + this.dropdown_container.unbind().empty(); return false; }, @@ -77,7 +81,7 @@ app.views.Hovercard = app.views.Base.extend({ var el = $(element); var hc = this.$el; - if( !this.show_me ) { + if( !this.showMe ) { // mouse has left element return; } @@ -94,11 +98,15 @@ app.views.Hovercard = app.views.Base.extend({ var self = this; $.get(href, function(person){ - if( !person || person.length == 0 ) { + if( !person || person.length === 0 ) { throw new Error("received data is not a person object"); } self._populateHovercardWith(person); + if( !self.showMe ) { + // mouse has left element + return; + } self.$el.fadeIn('fast'); }); }, @@ -119,15 +127,13 @@ app.views.Hovercard = app.views.Base.extend({ })) ); // set aspect dropdown + // TODO render me client side!!! var href = this.href(); href += "/aspect_membership_button"; - if(gon.bootstrap == true){ - href += "?bootstrap=true"; - } $.get(href, function(response) { self.dropdown_container.html(response); }); - var aspect_membership = new app.views.AspectMembership({el: self.dropdown_container}); + new app.views.AspectMembership({el: self.dropdown_container}); }, _positionHovercard: function() { @@ -138,5 +144,14 @@ app.views.Hovercard = app.views.Base.extend({ top: p_pos.top + p_height - 25, left: p_pos.left }); - } + }, + + mouseIsOverElement: function(element, event) { + var elPos = element.offset(); + return event.pageX >= elPos.left && + event.pageX <= elPos.left + element.width() && + event.pageY >= elPos.top && + event.pageY <= elPos.top + element.height(); + }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/infinite_stream_view.js b/app/assets/javascripts/app/views/infinite_stream_view.js index a1f3066f3..bac823ccc 100644 --- a/app/assets/javascripts/app/views/infinite_stream_view.js +++ b/app/assets/javascripts/app/views/infinite_stream_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + // Abstract Infinite Scroll View Super Class // Requires: // a stream model, assigned to this.stream @@ -32,7 +34,7 @@ app.views.InfScroll = app.views.Base.extend({ createPostView : function(post){ var postView = new this.postClass({ model: post, stream: this.stream }); - if (this.collection.at(0).id == post.id) { + if (this.collection.at(0).id === post.id) { // post is first in collection - insert view at top of the list this.postViews.unshift(postView); } else { @@ -44,7 +46,7 @@ app.views.InfScroll = app.views.Base.extend({ // called for every item inserted in this.collection addPostView : function(post) { var el = this.createPostView(post).render().el; - if (this.collection.at(0).id == post.id) { + if (this.collection.at(0).id === post.id) { this.prependedPosts.insertBefore(el, this.prependedPosts.firstChild); } else { this.appendedPosts.appendChild(el); @@ -56,7 +58,7 @@ app.views.InfScroll = app.views.Base.extend({ }, renderTemplate : function(){ - this.renderInitialPosts() + this.renderInitialPosts(); }, renderInitialPosts : function(){ @@ -64,7 +66,7 @@ app.views.InfScroll = app.views.Base.extend({ var els = document.createDocumentFragment(); this.stream.items.each(_.bind(function(post){ els.appendChild(this.createPostView(post).render().el); - }, this)) + }, this)); this.$el.html(els); }, @@ -76,7 +78,7 @@ app.views.InfScroll = app.views.Base.extend({ }, showLoader: function(){ - $("#paginate .loader").removeClass("hidden") + $("#paginate .loader").removeClass("hidden"); }, finishedAdding: function() { @@ -105,3 +107,4 @@ app.views.InfScroll = app.views.Base.extend({ } } }); +// @license-end diff --git a/app/assets/javascripts/app/views/likes_info_view.js b/app/assets/javascripts/app/views/likes_info_view.js index 737b82792..a672645dd 100644 --- a/app/assets/javascripts/app/views/likes_info_view.js +++ b/app/assets/javascripts/app/views/likes_info_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.LikesInfo = app.views.Base.extend({ templateName : "likes-info", @@ -17,11 +19,12 @@ app.views.LikesInfo = app.views.Base.extend({ likes : this.model.interactions.likes.toJSON(), likesCount : this.model.interactions.likesCount(), likes_fetched : this.model.interactions.get("fetched"), - }) + }); }, showAvatars : function(evt){ if(evt) { evt.preventDefault() } - this.model.interactions.fetch() + this.model.interactions.fetch(); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/location_stream.js b/app/assets/javascripts/app/views/location_stream.js index fbf60f580..fd6fae946 100644 --- a/app/assets/javascripts/app/views/location_stream.js +++ b/app/assets/javascripts/app/views/location_stream.js @@ -1,3 +1,7 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.LocationStream = app.views.Content.extend({ templateName: "status-message-location" }); +// @license-end + diff --git a/app/assets/javascripts/app/views/location_view.js b/app/assets/javascripts/app/views/location_view.js index 20a7e580a..0fe6be15d 100644 --- a/app/assets/javascripts/app/views/location_view.js +++ b/app/assets/javascripts/app/views/location_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Location = Backbone.View.extend({ el: "#location", @@ -8,18 +10,18 @@ app.views.Location = Backbone.View.extend({ }, render: function(){ - $(this.el).append('delete location'); + $(this.el).append('ajax-loader'); }, - getLocation: function(e){ - element = this.el; + getLocation: function(){ + var element = this.el; - locator = new OSM.Locator(); + var locator = new OSM.Locator(); locator.getAddress(function(address, latlng){ $(element).html(''); $('#location_coords').val(latlng.latitude + "," + latlng.longitude); - $(element).append('delete location'); }); }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/notification_dropdown_view.js b/app/assets/javascripts/app/views/notification_dropdown_view.js new file mode 100644 index 000000000..a2c7525db --- /dev/null +++ b/app/assets/javascripts/app/views/notification_dropdown_view.js @@ -0,0 +1,118 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.NotificationDropdown = app.views.Base.extend({ + events:{ + "click #notifications-badge": "toggleDropdown" + }, + + initialize: function(){ + $(document.body).click($.proxy(this.hideDropdown, this)); + + this.notifications = []; + this.perPage = 5; + this.hasMoreNotifs = true; + this.badge = this.$el; + this.dropdown = $('#notification_dropdown'); + this.dropdownNotifications = this.dropdown.find('.notifications'); + this.ajaxLoader = this.dropdown.find('.ajax_loader'); + }, + + toggleDropdown: function(evt){ + evt.preventDefault(); + evt.stopPropagation(); + if(this.dropdownShowing()){ this.hideDropdown(evt); } + else{ this.showDropdown(); } + }, + + dropdownShowing: function(){ + return this.dropdown.css('display') === 'block'; + }, + + showDropdown: function(){ + this.resetParams(); + this.ajaxLoader.show(); + this.badge.addClass('active'); + this.dropdown.css('display', 'block'); + this.dropdownNotifications.addClass('loading'); + this.getNotifications(); + }, + + hideDropdown: function(evt){ + var inDropdown = $(evt.target).parents().is(this.dropdown); + var inHovercard = $.contains(app.hovercard.el, evt.target); + if(!inDropdown && !inHovercard && this.dropdownShowing()){ + this.badge.removeClass('active'); + this.dropdown.css('display', 'none'); + this.dropdownNotifications.perfectScrollbar('destroy'); + } + }, + + dropdownScroll: function(){ + var isLoading = ($('.loading').length === 1); + if (this.isBottom() && this.hasMoreNotifs && !isLoading){ + this.dropdownNotifications.addClass('loading'); + this.getNotifications(); + } + }, + + getParams: function(){ + if(this.notifications.length === 0){ return{ per_page: 10, page: 1 }; } + else{ return{ per_page: this.perPage, page: this.nextPage }; } + }, + + resetParams: function(){ + this.notifications.length = 0; + this.hasMoreNotifs = true; + delete this.nextPage; + }, + + isBottom: function(){ + var bottom = this.dropdownNotifications.prop('scrollHeight') - this.dropdownNotifications.height(); + var currentPosition = this.dropdownNotifications.scrollTop(); + return currentPosition + 50 >= bottom; + }, + + getNotifications: function(){ + var self = this; + $.getJSON(Routes.notifications_path(this.getParams()), function(notifications){ + $.each(notifications, function(){ self.notifications.push(this); }); + self.hasMoreNotifs = notifications.length >= self.perPage; + if(self.nextPage){ self.nextPage++; } + else { self.nextPage = 3; } + self.renderNotifications(); + }); + }, + + hideAjaxLoader: function(){ + var self = this; + this.ajaxLoader.find('img').fadeTo(200, 0, function(){ + self.ajaxLoader.hide(300, function(){ + self.ajaxLoader.find('img').css('opacity', 1); + }); + }); + }, + + renderNotifications: function(){ + var self = this; + this.dropdownNotifications.find('.media.stream_element').remove(); + $.each(self.notifications, function(index, notifications){ + $.each(notifications, function(index, notification){ + if($.inArray(notification, notifications) === -1){ + var node = self.dropdownNotifications.append(notification.note_html); + $(node).find('.unread-toggle .entypo').tooltip('destroy').tooltip(); + } + }); + }); + + this.hideAjaxLoader(); + + app.helpers.timeago(this.dropdownNotifications); + + this.dropdownNotifications.perfectScrollbar('destroy').perfectScrollbar(); + this.dropdownNotifications.removeClass('loading'); + this.dropdownNotifications.scroll(function(){ + self.dropdownScroll(); + }); + } +}); +// @license-end diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 72bb11849..808ce6749 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -1,40 +1,35 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Notifications = Backbone.View.extend({ events: { - "click .unread-toggle" : "toggleUnread" + "click .unread-toggle" : "toggleUnread", + "click #mark_all_read_link": "markAllRead" }, initialize: function() { - Diaspora.page.header.notifications.setUpNotificationPage(this); $(".unread-toggle .entypo").tooltip(); + app.helpers.timeago($(document)); }, toggleUnread: function(evt) { - note = $(evt.target).closest(".stream_element"); - unread = note.hasClass("unread"); + var note = $(evt.target).closest(".stream_element"); + var unread = note.hasClass("unread"); - if (unread) { - this.setRead(note.data("guid")); - } - else { - this.setUnread(note.data("guid")); - } + if (unread){ this.setRead(note.data("guid")); } + else { this.setUnread(note.data("guid")); } }, - setRead: function(guid) { - $.ajax({ - url: "/notifications/" + guid, - data: { set_unread: false }, - type: "PUT", - context: this, - success: this.clickSuccess - }); - }, + getAllUnread: function(){ return $('.media.stream_element.unread'); }, - setUnread: function(guid) { + setRead: function(guid) { this.setUnreadStatus(guid, false); }, + + setUnread: function(guid){ this.setUnreadStatus(guid, true); }, + + setUnreadStatus: function(guid, state){ $.ajax({ url: "/notifications/" + guid, - data: { set_unread: true }, + data: { set_unread: state }, type: "PUT", context: this, success: this.clickSuccess @@ -42,51 +37,58 @@ app.views.Notifications = Backbone.View.extend({ }, clickSuccess: function(data) { - type = $('.stream_element[data-guid=' + data["guid"] + ']').data('type'); + var type = $('.stream_element[data-guid=' + data["guid"] + ']').data('type'); this.updateView(data["guid"], type, data["unread"]); }, + markAllRead: function(evt){ + if(evt) { evt.preventDefault(); } + var self = this; + this.getAllUnread().each(function(i, el){ + self.setRead($(el).data("guid")); + }); + }, + updateView: function(guid, type, unread) { - change = unread ? 1 : -1; - all_notes = $('ul.nav > li:eq(0) .badge'); - type_notes = $('ul.nav > li[data-type=' + type + '] .badge'); - header_badge = $('#notification_badge .badge_count'); + var change = unread ? 1 : -1, + all_notes = $('ul.nav > li:eq(0) .badge'), + type_notes = $('ul.nav > li[data-type=' + type + '] .badge'), + header_badge = $('#notification_badge .badge_count'), + note = $('.stream_element[data-guid=' + guid + ']'), + markAllReadLink = $('a#mark_all_read_link'), + translationKey = unread ? 'notifications.mark_read' : 'notifications.mark_unread'; - note = $('.stream_element[data-guid=' + guid + ']'); - if(unread) { - note.removeClass("read").addClass("unread"); - $(".unread-toggle .entypo", note) + if(unread){ note.removeClass("read").addClass("unread"); } + else { note.removeClass("unread").addClass("read"); } + + $(".unread-toggle .entypo", note) .tooltip('destroy') .removeAttr("data-original-title") - .attr('title',Diaspora.I18n.t('notifications.mark_read')) + .attr('title',Diaspora.I18n.t(translationKey)) .tooltip(); - } - else { - note.removeClass("unread").addClass("read"); - $(".unread-toggle .entypo", note) - .tooltip('destroy') - .removeAttr("data-original-title") - .attr('title',Diaspora.I18n.t('notifications.mark_unread')) - .tooltip(); - } - all_notes.text( function(i,text) { return parseInt(text) + change }); - type_notes.text( function(i,text) { return parseInt(text) + change }); - header_badge.text( function(i,text) { return parseInt(text) + change }); - if(all_notes.text()>0){ - all_notes.addClass('badge-important').removeClass('badge-default'); - } else { - all_notes.removeClass('badge-important').addClass('badge-default'); - } - if(type_notes.text()>0){ - type_notes.addClass('badge-important').removeClass('badge-default'); - } else { - type_notes.removeClass('badge-important').addClass('badge-default'); - } - if(header_badge.text()>0){ + [all_notes, type_notes, header_badge].forEach(function(element){ + element.text(function(i, text){ + return parseInt(text) + change }); + }); + + [all_notes, type_notes].forEach(function(badge) { + if(badge.text() > 0) { + badge.addClass('badge-important').removeClass('badge-default'); + } + else { + badge.removeClass('badge-important').addClass('badge-default'); + } + }); + + if(header_badge.text() > 0){ header_badge.removeClass('hidden'); - } else { + markAllReadLink.removeClass('disabled'); + } + else{ header_badge.addClass('hidden'); + markAllReadLink.addClass('disabled'); } } }); +// @license-end diff --git a/app/assets/javascripts/app/views/photo_view.js b/app/assets/javascripts/app/views/photo_view.js index 072f44744..286d3fe98 100644 --- a/app/assets/javascripts/app/views/photo_view.js +++ b/app/assets/javascripts/app/views/photo_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Photo = app.views.Base.extend({ templateName: "photo", @@ -8,11 +10,10 @@ app.views.Photo = app.views.Base.extend({ "click .remove_post": "destroyModel" }, - tooltipSelector : ".block_user, .delete", + tooltipSelector : ".control-icons a", initialize : function() { $(this.el).attr("id", this.model.get("guid")); - this.model.bind('remove', this.remove, this); return this; }, @@ -22,3 +23,5 @@ app.views.Photo = app.views.Base.extend({ }); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/photo_viewer.js b/app/assets/javascripts/app/views/photo_viewer.js index 3f30cfbd4..d9a587400 100644 --- a/app/assets/javascripts/app/views/photo_viewer.js +++ b/app/assets/javascripts/app/views/photo_viewer.js @@ -1,7 +1,10 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.PhotoViewer = app.views.Base.extend({ templateName : "photo-viewer", presenter : function(){ - return { photos : this.model.get("photos") } //json array of attributes, not backbone models, yet. + return { photos : this.model.get("photos") }; //json array of attributes, not backbone models, yet. } -}); \ No newline at end of file +}); +// @license-end diff --git a/app/assets/javascripts/app/views/photos_view.js b/app/assets/javascripts/app/views/photos_view.js index 7be0a86f2..5d5969ef1 100644 --- a/app/assets/javascripts/app/views/photos_view.js +++ b/app/assets/javascripts/app/views/photos_view.js @@ -1,13 +1,15 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Photos = app.views.InfScroll.extend({ - initialize : function(options) { + initialize : function() { this.stream = this.model; this.collection = this.stream.items; // viable for extraction this.stream.fetch(); - this.setupLightbox() - this.setupInfiniteScroll() + this.setupLightbox(); + this.setupInfiniteScroll(); }, postClass : app.views.Photo, @@ -21,3 +23,4 @@ app.views.Photos = app.views.InfScroll.extend({ $(this.el).delegate("a.photo-link", "click", this.lightbox.lightboxImageClicked); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/poll_view.js b/app/assets/javascripts/app/views/poll_view.js index 346b7cb5a..14355716d 100644 --- a/app/assets/javascripts/app/views/poll_view.js +++ b/app/assets/javascripts/app/views/poll_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Poll = app.views.Base.extend({ templateName: "poll", @@ -6,17 +8,24 @@ app.views.Poll = app.views.Base.extend({ "click .toggle_result" : "toggleResult" }, - initialize: function(options) { + initialize: function() { this.model.bind('change', this.render, this); }, presenter: function(){ var defaultPresenter = this.defaultPresenter(); - var show_form = defaultPresenter.loggedIn && - !this.model.attributes.already_participated_in_poll; + var isReshare = (this.model.get('post_type') === 'Reshare'); + var showForm = defaultPresenter.loggedIn && + !isReshare && + !this.model.get('already_participated_in_poll'); + var originalPostLink = isReshare && this.model.get('root') ? + '' + Diaspora.I18n.t('poll.original_post') + '' : + ''; return _.extend(defaultPresenter, { - show_form: show_form + show_form: showForm, + is_reshare: isReshare, + original_post_link: originalPostLink }); }, @@ -95,7 +104,7 @@ app.views.Poll = app.views.Base.extend({ var pollParticipation = new app.models.PollParticipation({ poll_answer_id: answer_id, poll_id: this.poll.poll_id, - post_id: this.poll.post_id, + post_id: this.poll.post_id, }); var _this = this; @@ -107,3 +116,5 @@ app.views.Poll = app.views.Base.extend({ } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/post_view.js b/app/assets/javascripts/app/views/post_view.js index 59a8a985f..726055bb7 100644 --- a/app/assets/javascripts/app/views/post_view.js +++ b/app/assets/javascripts/app/views/post_view.js @@ -1,13 +1,16 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Post = app.views.Base.extend({ presenter : function() { return _.extend(this.defaultPresenter(), { authorIsCurrentUser : app.currentUser.isAuthorOf(this.model), showPost : this.showPost(), - text : app.helpers.textFormatter(this.model.get("text"), this.model) - }) + text : app.helpers.textFormatter(this.model.get("text"), this.model.get("mentioned_people")) + }); }, showPost : function() { - return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw") + return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw"); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/profile_header_view.js b/app/assets/javascripts/app/views/profile_header_view.js new file mode 100644 index 000000000..7a460e182 --- /dev/null +++ b/app/assets/javascripts/app/views/profile_header_view.js @@ -0,0 +1,63 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.ProfileHeader = app.views.Base.extend({ + templateName: 'profile_header', + + initialize: function(opts) { + app.events.on('aspect:create', this.postRenderTemplate, this); + this.photos = _.has(opts, 'photos') ? opts.photos : null; + this.contacts = _.has(opts, 'contacts') ? opts.contacts : null; + }, + + presenter: function() { + return _.extend({}, this.defaultPresenter(), { + show_profile_btns: this._shouldShowProfileBtns(), + show_photos: this._shouldShowPhotos(), + show_contacts: this._shouldShowContacts(), + is_blocked: this.model.isBlocked(), + is_sharing: this.model.isSharing(), + is_receiving: this.model.isReceiving(), + is_mutual: this.model.isMutual(), + has_tags: this._hasTags(), + contacts: this.contacts, + photos: this.photos + }); + }, + + _hasTags: function() { + return (this.model.get('profile')['tags'].length > 0); + }, + + _shouldShowProfileBtns: function() { + return (app.currentUser.authenticated() && !this.model.get('is_own_profile')); + }, + + _shouldShowPhotos: function() { + return (this.photos && this.photos.count > 0); + }, + + _shouldShowContacts: function() { + return (this.contacts && this.contacts.count > 0); + }, + + postRenderTemplate: function() { + var self = this; + var dropdownEl = this.$('.aspect_membership_dropdown.placeholder'); + if( dropdownEl.length === 0 ) { + return; + } + + // TODO render me client side!!! + var href = this.model.url() + '/aspect_membership_button?create=true&size=normal'; + + $.get(href, function(resp) { + dropdownEl.html(resp); + new app.views.AspectMembership({el: $('.aspect_dropdown',dropdownEl)}); + + // UGLY (re-)attach the facebox + self.$('a[rel*=facebox]').facebox(); + }); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/profile_sidebar_view.js b/app/assets/javascripts/app/views/profile_sidebar_view.js new file mode 100644 index 000000000..a8b0d4074 --- /dev/null +++ b/app/assets/javascripts/app/views/profile_sidebar_view.js @@ -0,0 +1,17 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.ProfileSidebar = app.views.Base.extend({ + templateName: 'profile_sidebar', + + presenter: function() { + return _.extend({}, this.defaultPresenter(), { + show_profile_info: this._shouldShowProfileInfo(), + }); + }, + + _shouldShowProfileInfo: function() { + return (this.model.isSharing() || this.model.get('is_own_profile')); + } +}); +// @license-end + diff --git a/app/assets/javascripts/app/views/publisher/aspect_selector_blueprint_view.js b/app/assets/javascripts/app/views/publisher/aspect_selector_blueprint_view.js deleted file mode 100644 index 9d21e43f6..000000000 --- a/app/assets/javascripts/app/views/publisher/aspect_selector_blueprint_view.js +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (c) 2010-2012, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ - -// Aspects view for the publisher. -// Provides the ability to specify the visibility of posted content as public -// or limited to selected aspects -app.views.PublisherAspectSelectorBlueprint = Backbone.View.extend({ - - events: { - "click .dropdown_list > li": "toggleAspect" - }, - - initialize: function(opts) { - this.form = opts.form; - }, - - // event handler for aspect selection - toggleAspect: function(evt) { - var el = $(evt.target); - var btn = el.parent('.dropdown').find('.button'); - - // visually toggle the aspect selection - if( el.is('.radio') ) { - AspectsDropdown.toggleRadio(el); - } else { - AspectsDropdown.toggleCheckbox(el); - } - - // update the selection summary - this._updateAspectsNumber(el); - - this._updateSelectedAspectIds(); - }, - - // select a (list of) aspects in the dropdown selector by the given list of ids - updateAspectsSelector: function(ids){ - var el = this.$("ul.dropdown_list"); - this.$('.dropdown_list > li').each(function(){ - var el = $(this); - var aspectId = el.data('aspect_id'); - if (_.contains(ids, aspectId)) { - el.addClass('selected'); - } - else { - el.removeClass('selected'); - } - }); - - this._updateAspectsNumber(el); - this._updateSelectedAspectIds(); - }, - - // take care of the form fields that will indicate the selected aspects - _updateSelectedAspectIds: function() { - var self = this; - - // remove previous selection - this.form.find('input[name="aspect_ids[]"]').remove(); - - // create fields for current selection - this.$('.dropdown_list li.selected').each(function() { - var el = $(this); - var aspectId = el.data('aspect_id'); - - self._addHiddenAspectInput(aspectId); - - // close the dropdown when a radio item was selected - if( el.is('.radio') ) { - el.closest('.dropdown').removeClass('active'); - } - }); - }, - - _updateAspectsNumber: function(el){ - AspectsDropdown.updateNumber( - el.closest(".dropdown_list"), - null, - el.parent().find('li.selected').length, - '' - ); - }, - - _addHiddenAspectInput: function(id) { - var uid = _.uniqueId('aspect_ids_'); - this.form.append( - '' - ); - } -}); diff --git a/app/assets/javascripts/app/views/publisher/aspect_selector_view.js b/app/assets/javascripts/app/views/publisher/aspect_selector_view.js index f2135f51d..7145de4ad 100644 --- a/app/assets/javascripts/app/views/publisher/aspect_selector_view.js +++ b/app/assets/javascripts/app/views/publisher/aspect_selector_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require ../aspects_dropdown_view /* @@ -20,10 +22,9 @@ app.views.PublisherAspectSelector = app.views.AspectsDropdown.extend({ var target = $(evt.target).closest('li'); // visually toggle the aspect selection - if( target.is('.radio') ) { + if (target.is('.radio')) { this._toggleRadio(target); - } - else if( target.is('.aspect_selector') ) { + } else if (target.is('.aspect_selector')) { // don't close the dropdown evt.stopPropagation(); this._toggleCheckbox(target); @@ -31,6 +32,16 @@ app.views.PublisherAspectSelector = app.views.AspectsDropdown.extend({ this._updateSelectedAspectIds(); this._updateButton('btn-default'); + + // update the globe or lock icon + var icon = this.$('#visibility-icon'); + if (target.find('.text').text().trim() === Diaspora.I18n.t('stream.public')) { + icon.removeClass('lock'); + icon.addClass('globe'); + } else { + icon.removeClass('globe'); + icon.addClass('lock'); + } }, // select a (list of) aspects in the dropdown selector by the given list of ids @@ -57,3 +68,5 @@ app.views.PublisherAspectSelector = app.views.AspectsDropdown.extend({ }); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/publisher/getting_started_view.js b/app/assets/javascripts/app/views/publisher/getting_started_view.js index bd45bf5d4..6d36a83a7 100644 --- a/app/assets/javascripts/app/views/publisher/getting_started_view.js +++ b/app/assets/javascripts/app/views/publisher/getting_started_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2012, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -21,21 +23,24 @@ app.views.PublisherGettingStarted = Backbone.View.extend({ offset: 30, id: 'first_message_explain', placement: 'right', - html: true + html: true, + container: 'body' }, 600); this._addPopover(this.el_visibility, { trigger: 'manual', offset: 10, id: 'message_visibility_explain', placement: 'bottom', - html: true + html: true, + container: 'body' }, 1000); this._addPopover(this.el_stream, { trigger: 'manual', offset: -5, id: 'stream_explain', placement: 'left', - html: true + html: true, + container: 'body' }, 1400); // hide some popovers when a post is created @@ -60,8 +65,10 @@ app.views.PublisherGettingStarted = Backbone.View.extend({ var close = $(popup).find('.close'); close.click(function() { - if( $('.popover').length==1 ) { - $.get('/getting_started_completed'); + if( $('.popover').length === 1 ) { + $.get('/getting_started_completed', {success: function() { + $("#welcome-to-diaspora, #welcome-to-diaspora~br").remove(); + }}); } el.popover('hide'); return false; @@ -69,3 +76,5 @@ app.views.PublisherGettingStarted = Backbone.View.extend({ }, timeout); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/publisher/poll_creator_view.js b/app/assets/javascripts/app/views/publisher/poll_creator_view.js index ebc6755aa..e1c31fb2b 100644 --- a/app/assets/javascripts/app/views/publisher/poll_creator_view.js +++ b/app/assets/javascripts/app/views/publisher/poll_creator_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.PublisherPollCreator = app.views.Base.extend({ templateName: "poll_creator", @@ -64,22 +66,20 @@ app.views.PublisherPollCreator = app.views.Base.extend({ this.$('input').val(''); }, - validate: function(evt){ - var input = $(evt.target); + validate: function(){ this.validatePoll(); this.trigger('change'); }, validateInput: function(input){ - var wrapper = input.parents('.control-group'); var isValid = this.isValidInput(input); if(isValid){ - wrapper.removeClass('error'); + input.removeClass('error'); return true; } else { - wrapper.addClass('error'); + input.addClass('error'); return false; } }, @@ -97,10 +97,12 @@ app.views.PublisherPollCreator = app.views.Base.extend({ // Validate the input unless it is the last one, or there are only the // question field and two options if( i !== inputs.length - 1 || inputs.length <= 3) { - if(_this.validateInput($(input)) == false) pollValid = false; + if(_this.validateInput($(input)) === false) pollValid = false; } }); return pollValid; } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/publisher/services_view.js b/app/assets/javascripts/app/views/publisher/services_view.js index 757a8f369..1ed4c988b 100644 --- a/app/assets/javascripts/app/views/publisher/services_view.js +++ b/app/assets/javascripts/app/views/publisher/services_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2012, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -61,3 +63,5 @@ app.views.PublisherServices = Backbone.View.extend({ } } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/publisher/uploader_view.js b/app/assets/javascripts/app/views/publisher/uploader_view.js index 60b1ef8af..00580f57a 100644 --- a/app/assets/javascripts/app/views/publisher/uploader_view.js +++ b/app/assets/javascripts/app/views/publisher/uploader_view.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later // Uploader view for the publisher. // Initializes the file uploader plugin and handles callbacks for the upload @@ -46,7 +47,7 @@ app.views.PublisherUploader = Backbone.View.extend({ .width(progress + '%'); }, - submitHandler: function(id, fileName) { + submitHandler: function() { this.$el.addClass('loading'); this._addPhotoPlaceholder(); }, @@ -65,7 +66,7 @@ app.views.PublisherUploader = Backbone.View.extend({ ); }, - uploadCompleteHandler: function(id, fileName, response) { + uploadCompleteHandler: function(_id, fileName, response) { if (response.success){ this.el_info.text(Diaspora.I18n.t('photo_uploader.completed', {file: fileName})).fadeTo(2000, 0); @@ -109,7 +110,7 @@ app.views.PublisherUploader = Backbone.View.extend({ .find('div.progress').remove(); // no more placeholders? enable buttons - if( publisher.el_photozone.find('li.loading').length == 0 ) { + if( publisher.el_photozone.find('li.loading').length === 0 ) { this.$el.removeClass('loading'); publisher.setButtonsEnabled(true); } @@ -126,7 +127,7 @@ app.views.PublisherUploader = Backbone.View.extend({ // remove an already uploaded photo _removePhoto: function(evt) { var self = this; - var photo = $(evt.target).parents('.publisher_photo') + var photo = $(evt.target).parents('.publisher_photo'); var img = photo.find('img'); photo.addClass('dim'); @@ -138,7 +139,7 @@ app.views.PublisherUploader = Backbone.View.extend({ $.when(photo.fadeOut(400)).then(function(){ photo.remove(); - if( self.publisher.$('.publisher_photo').length == 0 ) { + if( self.publisher.$('.publisher_photo').length === 0 ) { // no more photos left... self.publisher.el_wrapper.removeClass('with_attachments'); } @@ -152,3 +153,4 @@ app.views.PublisherUploader = Backbone.View.extend({ } }); +// @license-end diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index a975522de..5a928f102 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2012, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -5,10 +7,9 @@ //= require ./publisher/services_view //= require ./publisher/aspect_selector_view -//= require ./publisher/aspect_selector_blueprint_view //= require ./publisher/getting_started_view //= require ./publisher/uploader_view -//= require jquery.textchange +//= require jquery-textchange app.views.Publisher = Backbone.View.extend({ @@ -46,10 +47,17 @@ app.views.Publisher = Backbone.View.extend({ // init autoresize plugin this.el_input.autoResize({ 'extraSpace' : 10, 'maxHeight' : Infinity }); + // if there is data in the publisher we ask for a confirmation + // before the user is able to leave the page + $(window).on('beforeunload', _.bind(this._beforeUnload, this)); + // sync textarea content - if( this.el_hiddenInput.val() == "" ) { + if( this.el_hiddenInput.val() === "" ) { this.el_hiddenInput.val( this.el_input.val() ); } + if( this.el_input.val() === "" ) { + this.el_input.val( this.el_hiddenInput.val() ); + } // hide close and preview buttons, in case publisher is standalone // (e.g. bookmarklet, mentions popup) @@ -62,11 +70,11 @@ app.views.Publisher = Backbone.View.extend({ // textchange event won't be called in Backbone... this.el_input.bind('textchange', $.noop); - var _this = this + var _this = this; $('body').on('click', function(event){ // if the click event is happened outside the publisher view, then try to close the box - if( _this.el && $(event.target).closest('#publisher').attr('id') != _this.el.id){ - _this.tryClose() + if( _this.el && $(event.target).closest('#publisher').attr('id') !== _this.el.id){ + _this.tryClose(); } }); @@ -75,19 +83,20 @@ app.views.Publisher = Backbone.View.extend({ this.close(); this.showSpinner(true); }); - + // open publisher on post error this.on('publisher:error', function() { this.open(); this.showSpinner(false); }); - // resetting the poll view + // resetting the poll view this.on('publisher:sync', function() { this.view_poll_creator.render(); }); this.initSubviews(); + this.checkSubmitAvailability(); return this; }, @@ -105,14 +114,9 @@ app.views.Publisher = Backbone.View.extend({ form: form }); - this.view_aspect_selector_blueprint = new app.views.PublisherAspectSelectorBlueprint({ - el: this.$('.public_toggle > .dropdown'), - form: form - }); - this.view_getting_started = new app.views.PublisherGettingStarted({ el_first_msg: this.el_input, - el_visibility: this.$('.public_toggle > .dropdown'), + el_visibility: this.$('.public_toggle .aspect_dropdown > .dropdown-toggle'), el_stream: $('#gs-shim') }); @@ -123,23 +127,22 @@ app.views.Publisher = Backbone.View.extend({ this.view_uploader.on('change', this.checkSubmitAvailability, this); this.view_poll_creator = new app.views.PublisherPollCreator({ - el: this.$('#publisher-poll-creator') + el: this.$('#poll_creator_container') }); this.view_poll_creator.on('change', this.checkSubmitAvailability, this); this.view_poll_creator.render(); - }, // set the selected aspects in the dropdown by their ids setSelectedAspects: function(ids) { this.view_aspect_selector.updateAspectsSelector(ids); - this.view_aspect_selector_blueprint.updateAspectsSelector(ids); }, // inject content into the publisher textarea setText: function(txt) { this.el_input.val(txt); this.el_hiddenInput.val(txt); + this.prefillText = txt; this.el_input.trigger('input'); this.handleTextchange(); @@ -157,7 +160,7 @@ app.views.Publisher = Backbone.View.extend({ if(evt){ evt.preventDefault(); } // Auto-adding a poll answer always leaves an empty box when the user starts - // typing in the last box. We'll delete the last one to avoid submitting an + // typing in the last box. We'll delete the last one to avoid submitting an // empty poll answer and failing validation. this.view_poll_creator.removeLastAnswer(); @@ -192,7 +195,9 @@ app.views.Publisher = Backbone.View.extend({ self.view_poll_creator.trigger('publisher:sync'); } - if(app.stream) app.stream.addNow(statusMessage.toJSON()); + if(app.stream && !self.standalone){ + app.stream.addNow(statusMessage.toJSON()); + } // clear state self.clear(); @@ -200,10 +205,10 @@ app.views.Publisher = Backbone.View.extend({ // standalone means single-shot posting (until further notice) if( self.standalone ) self.setEnabled(false); }, - error: function() { + error: function(model, resp) { if( app.publisher ) app.publisher.trigger('publisher:error'); self.setInputEnabled(true); - Diaspora.page.flashMessages.render({ 'success':false, 'notice':Diaspora.I18n.t('failed_to_post_message') }); + Diaspora.page.flashMessages.render({ 'success':false, 'notice':resp.responseText }); self.setButtonsEnabled(true); self.setInputEnabled(true); } @@ -212,7 +217,7 @@ app.views.Publisher = Backbone.View.extend({ // creates the location showLocation: function(){ - if($('#location').length == 0){ + if($('#location').length === 0){ $('#location_container').append('
'); this.el_wrapper.addClass('with_location'); this.view_locator = new app.views.Location(); @@ -235,7 +240,7 @@ app.views.Publisher = Backbone.View.extend({ // avoid submitting form when pressing Enter key avoidEnter: function(evt){ - if(evt.keyCode == 13) + if(evt.keyCode === 13) return false; }, @@ -247,7 +252,7 @@ app.views.Publisher = Backbone.View.extend({ var serializedForm = $(evt.target).closest("form").serializeObject(); - var photos = new Array(); + var photos = []; $('li.publisher_photo img').each(function(){ var file = $(this).attr('src').substring("/uploads/images/".length); photos.push( @@ -261,11 +266,19 @@ app.views.Publisher = Backbone.View.extend({ ); }); - var mentioned_people = new Array(); - var regexp = new RegExp("@{\(\[\^\;\]\+\); \(\[\^\}\]\+\)}", "g"); - while(user=regexp.exec(serializedForm["status_message[text]"])){ + var mentioned_people = [], + regexp = new RegExp("@{\(\[\^\;\]\+\); \(\[\^\}\]\+\)}", "g"), + user; + + var getMentionedUser = function(handle) { + return Mentions.contacts.filter(function(user) { + return user.handle === handle; + })[0]; + }; + + while( (user = regexp.exec(serializedForm["status_message[text]"])) ){ // user[1]: name, user[2]: handle - var mentioned_user = Mentions.contacts.filter(function(item) { return item.handle == user[2];})[0]; + var mentioned_user = getMentionedUser(user[2]); if(mentioned_user){ mentioned_people.push({ "id":mentioned_user["id"], @@ -279,7 +292,7 @@ app.views.Publisher = Backbone.View.extend({ var date = (new Date()).toISOString(); - var poll = undefined; + var poll; var poll_question = serializedForm["poll_question"]; var poll_answers_arry = _.flatten([serializedForm["poll_answers[]"]]); var poll_answers = _.map(poll_answers_arry, function(answer){ @@ -298,7 +311,7 @@ app.views.Publisher = Backbone.View.extend({ var previewMessage = { "id" : 0, "text" : serializedForm["status_message[text]"], - "public" : serializedForm["aspect_ids[]"]=="public", + "public" : serializedForm["aspect_ids[]"] === "public", "created_at" : date, "interacted_at" : date, "post_type" : "StatusMessage", @@ -339,7 +352,7 @@ app.views.Publisher = Backbone.View.extend({ }, keyDown : function(evt) { - if( evt.keyCode == 13 && evt.ctrlKey ) { + if( evt.keyCode === 13 && evt.ctrlKey ) { this.$("form").submit(); this.open(); return false; @@ -350,6 +363,8 @@ app.views.Publisher = Backbone.View.extend({ // clear text(s) this.el_input.val(''); this.el_hiddenInput.val(''); + this.el_input.trigger('keyup') + .trigger('keydown'); // remove mentions this.el_input.mentionsInput('reset'); @@ -376,7 +391,7 @@ app.views.Publisher = Backbone.View.extend({ // enable input this.setInputEnabled(true); - + // enable buttons this.setButtonsEnabled(true); @@ -396,7 +411,7 @@ app.views.Publisher = Backbone.View.extend({ tryClose : function(){ // if it is not submittable, close it. if( !this._submittable() ){ - this.close() + this.close(); } }, @@ -426,7 +441,7 @@ app.views.Publisher = Backbone.View.extend({ else this.$('#publisher_spinner').addClass('hidden'); }, - + checkSubmitAvailability: function() { if( this._submittable() ) { this.setButtonsEnabled(true); @@ -443,15 +458,23 @@ app.views.Publisher = Backbone.View.extend({ }, setButtonsEnabled: function(bool) { - bool = !bool; - this.el_submit.prop({disabled: bool}); - this.el_preview.prop({disabled: bool}); + if (bool) { + this.el_submit.removeProp('disabled'); + this.el_preview.removeProp('disabled'); + } else { + this.el_submit.prop('disabled', true); + this.el_preview.prop('disabled', true); + } }, setInputEnabled: function(bool) { - bool = !bool; - this.el_input.prop({disabled: bool}); - this.el_hiddenInput.prop({disabled: bool}); + if (bool) { + this.el_input.removeProp('disabled'); + this.el_hiddenInput.removeProp('disabled'); + } else { + this.el_input.prop('disabled', true); + this.el_hiddenInput.prop('disabled', true); + } }, // determine submit availability @@ -470,8 +493,15 @@ app.views.Publisher = Backbone.View.extend({ this.el_input.mentionsInput("val", function(value){ self.el_hiddenInput.val(value); }); - } + }, + _beforeUnload: function(e) { + if(this._submittable() && this.el_input.val() !== this.prefillText){ + var confirmationMessage = Diaspora.I18n.t("confirm_unload"); + (e || window.event).returnValue = confirmationMessage; //Gecko + IE + return confirmationMessage; //Webkit, Safari, Chrome, etc. + } + } }); // jQuery helper for serializing a
into JSON @@ -491,3 +521,4 @@ $.fn.serializeObject = function() }); return o; }; +// @license-end diff --git a/app/assets/javascripts/app/views/search_view.js b/app/assets/javascripts/app/views/search_view.js new file mode 100644 index 000000000..aed2e54ca --- /dev/null +++ b/app/assets/javascripts/app/views/search_view.js @@ -0,0 +1,72 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later +app.views.Search = app.views.Base.extend({ + initialize: function(){ + this.searchFormAction = this.$el.attr('action'); + this.searchInput = this.$('input[type="search"]'); + this.searchInputName = this.$('input[type="search"]').attr('name'); + this.searchInputHandle = this.$('input[type="search"]').attr('handle'); + this.options = { + cacheLength: 15, + delay: 800, + extraParams: {limit: 4}, + formatItem: this.formatItem, + formatResult: this.formatResult, + max: 5, + minChars: 2, + onSelect: this.selectItemCallback, + parse: this.parse, + scroll: false, + context: this + }; + + var self = this; + this.searchInput.autocomplete(self.searchFormAction + '.json', + $.extend(self.options, { element: self.searchInput })); + }, + + formatItem: function(row){ + if(typeof row.search !== 'undefined') { return Diaspora.I18n.t('search_for', row); } + else { + var item = ''; + if (row.avatar) { item += ''; } + item += row.name; + if (row.handle) { item += '
' + row.handle + '
'; } + return item; + } + }, + + formatResult: function(row){ return Handlebars.Utils.escapeExpression(row.name); }, + + parse: function(data) { + var self = this.context; + + var results = data.map(function(person){ + person.name = self.formatResult(person); + return {data : person, value : person.name}; + }); + + results.push({ + data: { + name: self.searchInput.val(), + url: self.searchFormAction + '?' + self.searchInputName + '=' + self.searchInput.val(), + search: true + }, + value: self.searchInput.val() + }); + + return results; + }, + + selectItemCallback: function(evt, data, formatted){ + var self = this.context; + + if(data.search === true){ + window.location = self.searchFormAction + '?' + self.searchInputName + '=' + data.name; + } + else{ // The actual result + self.options.element.val(formatted); + window.location = data.url ? data.url : '/tags/' + data.name.substring(1); + } + } +}); +// @license-ends diff --git a/app/assets/javascripts/app/views/sidebar.js b/app/assets/javascripts/app/views/sidebar.js index a1f388684..d73dbf100 100644 --- a/app/assets/javascripts/app/views/sidebar.js +++ b/app/assets/javascripts/app/views/sidebar.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.Sidebar = app.views.Base.extend({ el: '.rightBar', @@ -9,3 +11,5 @@ app.views.Sidebar = app.views.Base.extend({ event.target.select(); } }); +// @license-end + diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js index 69396abe6..65ea3df45 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.SinglePostActions = app.views.Feedback.extend({ templateName: "single-post-viewer/single-post-actions", @@ -8,14 +10,14 @@ app.views.SinglePostActions = app.views.Feedback.extend({ }, presenter: function() { - var interactions = this.model.interactions + var interactions = this.model.interactions; return _.extend(this.defaultPresenter(), { authorIsNotCurrentUser : this.authorIsNotCurrentUser(), userCanReshare : interactions.userCanReshare(), userLike : interactions.userLike(), userReshare : interactions.userReshare() - }) + }); }, renderPluginWidgets : function() { @@ -30,7 +32,7 @@ app.views.SinglePostActions = app.views.Feedback.extend({ }, authorIsNotCurrentUser: function() { - return app.currentUser.authenticated() && this.model.get("author").id != app.user().id + return app.currentUser.authenticated() && this.model.get("author").id !== app.user().id; } - }); +// @license-end diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js index b4a746a29..ebb0a9dbf 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js @@ -1,31 +1,33 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.SinglePostCommentStream = app.views.CommentStream.extend({ - tooltipSelector: "time, .controls a", + tooltipSelector: "time, .control-icons a", initialize: function(){ $(window).on('hashchange',this.highlightPermalinkComment); }, - + highlightPermalinkComment: function() { if(document.location.hash){ - element=$(document.location.hash); - headerSize=50; + var element = $(document.location.hash); + var headerSize = 50; $(".highlighted").removeClass("highlighted"); element.addClass("highlighted"); - pos=element.offset().top-headerSize; + var pos = element.offset().top - headerSize; $("html").animate({scrollTop:pos}); } }, postRenderTemplate: function() { - app.views.CommentStream.prototype.postRenderTemplate.apply(this) - this.$(".new_comment_form_wrapper").removeClass('hidden') - _.defer(this.highlightPermalinkComment) + app.views.CommentStream.prototype.postRenderTemplate.apply(this); + this.$(".new_comment_form_wrapper").removeClass('hidden'); + _.defer(this.highlightPermalinkComment); }, appendComment: function(comment) { // Set the post as the comment's parent, so we can check // on post ownership in the Comment view. - comment.set({parent : this.model.toJSON()}) + comment.set({parent : this.model.toJSON()}); this.$(".comments").append(new app.views.ExpandedComment({ model: comment @@ -37,6 +39,7 @@ app.views.SinglePostCommentStream = app.views.CommentStream.extend({ moreCommentsCount : 0, showExpandCommentsLink : false, commentsCount : this.model.interactions.commentsCount() - }) + }); }, -}) +}); +// @license-end diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js index a012282c6..967b72f9f 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js @@ -1,9 +1,12 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.SinglePostContent = app.views.Base.extend({ templateName: 'single-post-viewer/single-post-content', tooltipSelector: "time, .post_scope", subviews : { "#single-post-actions" : "singlePostActionsView", + '#single-post-moderation': "singlePostModerationView", '#real-post-content' : 'postContentView', ".oembed" : "oEmbedView", ".opengraph" : "openGraphView", @@ -13,8 +16,9 @@ app.views.SinglePostContent = app.views.Base.extend({ initialize : function() { this.singlePostActionsView = new app.views.SinglePostActions({model: this.model}); + this.singlePostModerationView = new app.views.SinglePostModeration({model: this.model}); this.oEmbedView = new app.views.OEmbed({model : this.model}); - this.openGraphView = new app.views.OpenGraph({model : this.model}); + this.openGraphView = new app.views.SPVOpenGraph({model : this.model}); this.postContentView = new app.views.ExpandedStatusMessage({model: this.model}); this.pollView = new app.views.Poll({ model: this.model }); }, @@ -27,11 +31,12 @@ app.views.SinglePostContent = app.views.Base.extend({ return _.extend(this.defaultPresenter(), { authorIsCurrentUser :app.currentUser.isAuthorOf(this.model), showPost : this.showPost(), - text : app.helpers.textFormatter(this.model.get("text"), this.model) - }) + text : app.helpers.textFormatter(this.model.get("text"), this.model.get("mentioned_people")) + }); }, showPost : function() { - return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw") + return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw"); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js index 17925c0f0..b8c4a8661 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.SinglePostInteractions = app.views.Base.extend({ templateName: "single-post-viewer/single-post-interactions", tooltipSelector: ".avatar.micro", @@ -8,11 +10,11 @@ app.views.SinglePostInteractions = app.views.Base.extend({ initialize : function() { this.model.interactions.on('change', this.render, this); - this.commentStreamView = new app.views.SinglePostCommentStream({model: this.model}) + this.commentStreamView = new app.views.SinglePostCommentStream({model: this.model}); }, presenter : function(){ - var interactions = this.model.interactions + var interactions = this.model.interactions; return { likes : interactions.likes.toJSON(), comments : interactions.comments.toJSON(), @@ -20,6 +22,7 @@ app.views.SinglePostInteractions = app.views.Base.extend({ commentsCount : interactions.commentsCount(), likesCount : interactions.likesCount(), resharesCount : interactions.resharesCount(), - } + }; }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_moderation.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_moderation.js new file mode 100644 index 000000000..ad636addf --- /dev/null +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_moderation.js @@ -0,0 +1,68 @@ +app.views.SinglePostModeration = app.views.Feedback.extend({ + templateName: "single-post-viewer/single-post-moderation", + + className: 'control-icons', + + events: function() { + return _.defaults({ + "click .remove_post": "destroyModel", + "click .create_participation": "createParticipation", + "click .destroy_participation": "destroyParticipation" + }, app.views.Feedback.prototype.events); + }, + + presenter: function() { + return _.extend(this.defaultPresenter(), { + authorIsCurrentUser : this.authorIsCurrentUser() + }); + }, + + renderPluginWidgets : function() { + app.views.Base.prototype.renderPluginWidgets.apply(this); + this.$('a').tooltip({placement: 'bottom'}); + }, + + authorIsCurrentUser: function() { + return app.currentUser.authenticated() && this.model.get("author").id === app.user().id; + }, + + destroyModel: function(evt) { + if(evt) { evt.preventDefault(); } + var url = this.model.urlRoot + '/' + this.model.id; + + if (confirm(Diaspora.I18n.t("remove_post"))) { + this.model.destroy({ url: url }) + .done(function() { + // return to stream + document.location.href = "/stream"; + }) + .fail(function() { + var flash = new Diaspora.Widgets.FlashMessages(); + flash.render({ + success: false, + notice: Diaspora.I18n.t('failed_to_remove') + }); + }); + } + }, + + createParticipation: function (evt) { + if(evt) { evt.preventDefault(); } + var self = this; + $.post(Routes.post_participation_path(this.model.get("id")), {}, function () { + self.model.set({participation: true}); + self.render(); + }); + }, + + destroyParticipation: function (evt) { + if(evt) { evt.preventDefault(); } + var self = this; + $.post(Routes.post_participation_path(this.model.get("id")), { _method: "delete" }, function () { + self.model.set({participation: false}); + self.render(); + }); + }, + + participation: function(){ return this.model.get("participation"); } +}); diff --git a/app/assets/javascripts/app/views/stream/shortcuts.js b/app/assets/javascripts/app/views/stream/shortcuts.js index 11f39e2b7..70c473b7e 100644 --- a/app/assets/javascripts/app/views/stream/shortcuts.js +++ b/app/assets/javascripts/app/views/stream/shortcuts.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.StreamShortcuts = { _headerSize: 50, @@ -11,6 +13,9 @@ app.views.StreamShortcuts = { this.on('hotkey:gotoPrev', this.gotoPrev, this); this.on('hotkey:likeSelected', this.likeSelected, this); this.on('hotkey:commentSelected', this.commentSelected, this); + this.on('hotkey:reshareSelected', this.reshareSelected, this); + this.on('hotkey:expandSelected', this.expandSelected, this); + this.on('hotkey:openFirstLinkSelected', this.openFirstLinkSelected, this); }, _onHotkeyDown: function(event) { @@ -19,7 +24,7 @@ app.views.StreamShortcuts = { if(jQuery.inArray(event.target.type, textAcceptingInputTypes) > -1){ return; } - + // trigger the events based on what key was pressed switch (String.fromCharCode( event.which ).toLowerCase()) { case "j": @@ -31,7 +36,7 @@ app.views.StreamShortcuts = { default: } }, - + _onHotkeyUp: function(event) { //make sure that the user is not typing in an input field var textAcceptingInputTypes = ["textarea", "select", "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", "datetime-local", "search", "color"]; @@ -47,6 +52,15 @@ app.views.StreamShortcuts = { case "l": this.trigger('hotkey:likeSelected'); break; + case "r": + this.trigger('hotkey:reshareSelected'); + break; + case "m": + this.trigger('hotkey:expandSelected'); + break; + case "o": + this.trigger('hotkey:openFirstLinkSelected'); + break; default: } }, @@ -55,7 +69,7 @@ app.views.StreamShortcuts = { // select next post: take the first post under the header var stream_elements = this.$('div.stream_element.loaded'); var posUser = window.pageYOffset; - + for (var i = 0; i < stream_elements.length; i++) { if(stream_elements[i].offsetTop>posUser+this._headerSize){ this.selectPost(stream_elements[i]); @@ -72,7 +86,7 @@ app.views.StreamShortcuts = { // select previous post: take the first post above the header var stream_elements = this.$('div.stream_element.loaded'); var posUser = window.pageYOffset; - + for (var i = stream_elements.length-1; i >=0; i--) { if(stream_elements[i].offsetTop 0) { + // click does only work with vanilla javascript + link[0].click(); + } + }, + selectPost: function(element){ //remove the selection and selected-class from all posts var selected=this.$('div.stream_element.loaded.shortcut_selected'); @@ -100,6 +130,8 @@ app.views.StreamShortcuts = { //move to new post window.scrollTo(window.pageXOffset, element.offsetTop-this._headerSize); //add the selection and selected-class to new post - element.className+=" shortcut_selected highlighted"; + element.className+=" shortcut_selected highlighted"; }, }; +// @license-end + diff --git a/app/assets/javascripts/app/views/stream_faces_view.js b/app/assets/javascripts/app/views/stream_faces_view.js index 949e8d0b0..0586f6df5 100644 --- a/app/assets/javascripts/app/views/stream_faces_view.js +++ b/app/assets/javascripts/app/views/stream_faces_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.StreamFaces = app.views.Base.extend({ templateName : "stream-faces", @@ -7,12 +9,12 @@ app.views.StreamFaces = app.views.Base.extend({ tooltipSelector : ".avatar", initialize : function(){ - this.updatePeople() - app.stream.items.bind("add", this.updatePeople, this) + this.updatePeople(); + app.stream.items.bind("add", this.updatePeople, this); }, presenter : function() { - return {people : this.people} + return {people : this.people}; }, updatePeople : function(){ @@ -27,3 +29,4 @@ app.views.StreamFaces = app.views.Base.extend({ this.render(); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/stream_post_views.js b/app/assets/javascripts/app/views/stream_post_views.js index 6993bd79e..fb44250f6 100644 --- a/app/assets/javascripts/app/views/stream_post_views.js +++ b/app/assets/javascripts/app/views/stream_post_views.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.StreamPost = app.views.Post.extend({ templateName: "stream-element", className : "stream_element loaded", @@ -21,10 +23,13 @@ app.views.StreamPost = app.views.Post.extend({ "click .remove_post": "destroyModel", "click .hide_post": "hidePost", "click .post_report": "report", - "click .block_user": "blockUser" + "click .block_user": "blockUser", + + "click .create_participation": "createParticipation", + "click .destroy_participation": "destroyParticipation" }, - tooltipSelector : ".timeago, .post_scope, .block_user, .delete", + tooltipSelector : ".timeago, .post_scope, .post_report, .block_user, .delete, .create_participation, .destroy_participation", initialize : function(){ var personId = this.model.get('author').id; @@ -52,7 +57,7 @@ app.views.StreamPost = app.views.Post.extend({ var normalizedClass = this.model.get("post_type").replace(/::/, "__") , postClass = app.views[normalizedClass] || app.views.StatusMessage; - return new postClass({ model : this.model }) + return new postClass({ model : this.model }); }, postLocationStreamView : function(){ @@ -61,7 +66,7 @@ app.views.StreamPost = app.views.Post.extend({ removeNsfwShield: function(evt){ if(evt){ evt.preventDefault(); } - this.model.set({nsfw : false}) + this.model.set({nsfw : false}); this.render(); }, @@ -86,22 +91,47 @@ app.views.StreamPost = app.views.Post.extend({ remove : function() { $(this.el).slideUp(400, _.bind(function(){this.$el.remove()}, this)); - return this + return this; }, hidePost : function(evt) { if(evt) { evt.preventDefault(); } if(!confirm(Diaspora.I18n.t('confirm_dialog'))) { return } + var self = this; $.ajax({ url : "/share_visibilities/42", type : "PUT", data : { post_id : this.model.id } - }) + }).done(function() { + self.remove(); + }) + .fail(function() { + Diaspora.page.flashMessages.render({ + success: false, + notice: Diaspora.I18n.t('hide_post_failed') + }); + }); + }, - this.remove(); + createParticipation: function (evt) { + if(evt) { evt.preventDefault(); } + that = this; + $.post(Routes.post_participation_path(this.model.get("id")), {}, function () { + that.model.set({participation: true}); + that.render(); + }); + }, + + destroyParticipation: function (evt) { + if(evt) { evt.preventDefault(); } + that = this; + $.post(Routes.post_participation_path(this.model.get("id")), { _method: "delete" }, function () { + that.model.set({participation: false}); + that.render(); + }); }, focusCommentTextarea: function(evt){ @@ -112,4 +142,5 @@ app.views.StreamPost = app.views.Post.extend({ return this; } -}) +}); +// @license-end diff --git a/app/assets/javascripts/app/views/stream_view.js b/app/assets/javascripts/app/views/stream_view.js index 0cd222bd8..9d5d036ca 100644 --- a/app/assets/javascripts/app/views/stream_view.js +++ b/app/assets/javascripts/app/views/stream_view.js @@ -1,19 +1,21 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require ./stream/shortcuts app.views.Stream = app.views.InfScroll.extend(_.extend( app.views.StreamShortcuts, { - initialize: function(options) { - this.stream = this.model - this.collection = this.stream.items + initialize: function() { + this.stream = this.model; + this.collection = this.stream.items; - this.postViews = [] + this.postViews = []; - this.setupNSFW() - this.setupLightbox() - this.setupInfiniteScroll() - this.setupShortcuts() - this.markNavSelected() + this.setupNSFW(); + this.setupLightbox(); + this.setupInfiniteScroll(); + this.setupShortcuts(); + this.markNavSelected(); }, postClass : app.views.StreamPost, @@ -24,11 +26,10 @@ app.views.Stream = app.views.InfScroll.extend(_.extend( }, setupNSFW : function(){ - app.currentUser.bind("nsfwChanged", reRenderPostViews, this) - function reRenderPostViews() { - _.map(this.postViews, function(view){ view.render() }) + _.map(this.postViews, function(view){ view.render() }); } + app.currentUser.bind("nsfwChanged", reRenderPostViews, this); }, markNavSelected : function() { @@ -38,3 +39,4 @@ app.views.Stream = app.views.InfScroll.extend(_.extend( streamSelection.find("[data-stream='" + activeStream + "']").addClass("selected"); } })); +// @license-end diff --git a/app/assets/javascripts/app/views/tag_following_action_view.js b/app/assets/javascripts/app/views/tag_following_action_view.js index fbfe2bae2..37d95ff2a 100644 --- a/app/assets/javascripts/app/views/tag_following_action_view.js +++ b/app/assets/javascripts/app/views/tag_following_action_view.js @@ -1,11 +1,13 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.TagFollowingAction = app.views.Base.extend({ templateName: "tag_following_action", events : { - "mouseenter .button.red_on_hover": "mouseIn", - "mouseleave .button.red_on_hover": "mouseOut", - "click .button": "tagAction" + "mouseenter .btn.followed": "mouseIn", + "mouseleave .btn.followed": "mouseOut", + "click .btn": "tagAction" }, initialize : function(options){ @@ -18,7 +20,7 @@ app.views.TagFollowingAction = app.views.Base.extend({ return _.extend(this.defaultPresenter(), { tag_is_followed : this.tag_is_followed(), followString : this.followString() - }) + }); }, followString : function() { @@ -33,7 +35,7 @@ app.views.TagFollowingAction = app.views.Base.extend({ return !this.model.isNew(); }, - getTagFollowing : function(tagFollowing) { + getTagFollowing : function() { this.model = app.tagFollowings.where({"name":this.tagText})[0] || new app.models.TagFollowing({"name":this.tagText}); this.model.bind("change", this.render, this); @@ -41,12 +43,12 @@ app.views.TagFollowingAction = app.views.Base.extend({ }, mouseIn : function(){ - this.$("input").removeClass("in_aspects"); + this.$("input").removeClass("green").addClass("btn-danger"); this.$("input").val( Diaspora.I18n.t('stream.tags.stop_following', {tag: this.model.attributes.name} ) ); }, mouseOut : function() { - this.$("input").addClass("in_aspects"); + this.$("input").removeClass("btn-danger").addClass("green"); this.$("input").val( Diaspora.I18n.t('stream.tags.following', {"tag" : this.model.attributes.name} ) ); }, @@ -59,4 +61,5 @@ app.views.TagFollowingAction = app.views.Base.extend({ app.tagFollowings.create(this.model); } } -}); \ No newline at end of file +}); +// @license-end diff --git a/app/assets/javascripts/app/views/tag_following_list_view.js b/app/assets/javascripts/app/views/tag_following_list_view.js index 6d7d49a68..dd05875e4 100644 --- a/app/assets/javascripts/app/views/tag_following_list_view.js +++ b/app/assets/javascripts/app/views/tag_following_list_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + //= require jquery.autoSuggest.custom app.views.TagFollowingList = app.views.Base.extend({ @@ -39,9 +41,9 @@ app.views.TagFollowingList = app.views.Base.extend({ }); this.$("input").bind('keydown', function(evt){ - if(evt.keyCode == 13 || evt.keyCode == 9 || evt.keyCode == 32){ + if(evt.keyCode === 13 || evt.keyCode === 9 || evt.keyCode === 32){ evt.preventDefault(); - if( $('li.as-result-item.active').length == 0 ){ + if( $('li.as-result-item.active').length === 0 ){ $('li.as-result-item').first().click(); } } @@ -60,7 +62,6 @@ app.views.TagFollowingList = app.views.Base.extend({ createTagFollowing: function(evt) { if(evt){ evt.preventDefault(); } - var name = this.$(".tag_input").val(); this.collection.create({"name":this.$(".tag_input").val()}); this.$(".tag_input").val(""); @@ -77,3 +78,4 @@ app.views.TagFollowingList = app.views.Base.extend({ this.$el.empty(); }, }); +// @license-end diff --git a/app/assets/javascripts/app/views/tag_following_view.js b/app/assets/javascripts/app/views/tag_following_view.js index e69c4dc6d..838fd896d 100644 --- a/app/assets/javascripts/app/views/tag_following_view.js +++ b/app/assets/javascripts/app/views/tag_following_view.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + app.views.TagFollowing = app.views.Base.extend({ templateName: "tag_following", @@ -27,7 +29,8 @@ app.views.TagFollowing = app.views.Base.extend({ presenter : function() { return _.extend(this.defaultPresenter(), { tag : this.model - }) + }); } }); +// @license-end diff --git a/app/assets/javascripts/app/views/tags_view.js b/app/assets/javascripts/app/views/tags_view.js new file mode 100644 index 000000000..cf13dbb49 --- /dev/null +++ b/app/assets/javascripts/app/views/tags_view.js @@ -0,0 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + +app.views.Tags = Backbone.View.extend({ + + initialize: function() { + app.publisher.setText("#"+ this.tagName + " "); + } +}); +// @license-end diff --git a/app/assets/javascripts/aspect-edit-pane.js b/app/assets/javascripts/aspect-edit-pane.js deleted file mode 100644 index 57be91bd2..000000000 --- a/app/assets/javascripts/aspect-edit-pane.js +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ - -function toggleAspectTitle(){ - $("#aspect_name_title").toggleClass('hidden'); - $("#aspect_name_edit").toggleClass('hidden'); -} - -function updateAspectName(new_name) { - $('#aspect_name_title .name').text(new_name); - $('input#aspect_name').val(new_name); -} -function updatePageAspectName( an_id, new_name) { - $('ul#aspect_nav [data-aspect-id="'+an_id+'"] .selectable').text(new_name); -} - -$(document).ready(function() { - $(document).on('click', '#rename_aspect_link', function(){ - toggleAspectTitle(); - }); - - $(document).on('ajax:success', 'form.edit_aspect', function(evt, data, status, xhr) { - updateAspectName(data['name']); - updatePageAspectName( data['id'], data['name'] ); - toggleAspectTitle(); - }); -}); - - -/** - * TEMPORARY SOLUTION - * TODO remove me, when the contacts section is done with Backbone.js ... - * (this is about as much covered by tests as the old code ... not at all) - * - * see also 'contact-edit.js' - */ - -app.tmp || (app.tmp = {}); - -// on the contacts page, viewing the facebox for single aspect -app.tmp.ContactAspectsBox = function() { - $('body').on('click', '#aspect_edit_pane a.add.btn', _.bind(this.addToAspect, this)); - $('body').on('click', '#aspect_edit_pane a.added.btn', _.bind(this.removeFromAspect, this)); -}; -_.extend(app.tmp.ContactAspectsBox.prototype, { - addToAspect: function(evt) { - var el = $(evt.currentTarget); - var aspect_membership = new app.models.AspectMembership({ - 'person_id': el.data('person_id'), - 'aspect_id': el.data('aspect_id') - }); - - aspect_membership.on('sync', this._successSaveCb, this); - aspect_membership.on('error', function() { - this._displayError('aspect_dropdown.error', el); - }, this); - - aspect_membership.save(); - - return false; - }, - - _successSaveCb: function(aspect_membership) { - var membership_id = aspect_membership.get('id'); - var person_id = aspect_membership.get('person_id'); - var el = $('li.contact').find('a.add[data-person_id="'+person_id+'"]'); - - el.removeClass('add') - .addClass('added') - .attr('data-membership_id', membership_id) // just to be sure... - .data('membership_id', membership_id); - - el.find('div').removeClass('icons-monotone_plus_add_round') - .addClass('icons-monotone_check_yes'); - }, - - removeFromAspect: function(evt) { - var el = $(evt.currentTarget); - - var aspect_membership = new app.models.AspectMembership({ - 'id': el.data('membership_id') - }); - aspect_membership.on('sync', this._successDestroyCb, this); - aspect_membership.on('error', function(aspect_membership) { - this._displayError('aspect_dropdown.error_remove', el); - }, this); - - aspect_membership.destroy(); - - return false; - }, - - _successDestroyCb: function(aspect_membership) { - var membership_id = aspect_membership.get('id'); - var el = $('li.contact').find('a.added[data-membership_id="'+membership_id+'"]'); - - el.removeClass('added') - .addClass('add') - .removeAttr('data-membership_id') - .removeData('membership_id'); - - el.find('div').removeClass('icons-monotone_check_yes') - .addClass('icons-monotone_plus_add_round'); - }, - - _displayError: function(msg_id, contact_el) { - var name = $('li.contact') - .has(contact_el) - .find('h4.name') - .text(); - var msg = Diaspora.I18n.t(msg_id, { 'name': name }); - Diaspora.page.flashMessages.render({ 'success':false, 'notice':msg }); - } -}); - -$(function() { - var contact_aspects_box = new app.tmp.ContactAspectsBox(); -}); diff --git a/app/assets/javascripts/aspects-dropdown.js b/app/assets/javascripts/aspects-dropdown.js index 50ee48fab..6c1ea03bc 100644 --- a/app/assets/javascripts/aspects-dropdown.js +++ b/app/assets/javascripts/aspects-dropdown.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + // Copyright (c) 2010-2012, Diaspora Inc. This file is // licensed under the Affero General Public License version 3 or later. See // the COPYRIGHT file. @@ -7,33 +9,48 @@ var AspectsDropdown = { var button = dropdown.parents(".dropdown").children('.button.toggle'), selectedAspects = dropdown.children(".selected").length, allAspects = dropdown.children().length, - replacement; + replacement, + message, + isInPublisher = dropdown.closest('#publisher').length; - if (number == 0) { + if (number === 0) { button.removeClass(inAspectClass); - if( dropdown.closest('#publisher').length ) { + if (isInPublisher) { replacement = Diaspora.I18n.t("aspect_dropdown.select_aspects"); } else { replacement = Diaspora.I18n.t("aspect_dropdown.add_to_aspect"); /* flash message prompt */ - var message = Diaspora.I18n.t("aspect_dropdown.stopped_sharing_with", {name: dropdown.data('person-short-name')}); + message = Diaspora.I18n.t("aspect_dropdown.stopped_sharing_with", {name: dropdown.data('person-short-name')}); Diaspora.page.flashMessages.render({success: true, notice: message}); } - }else if (selectedAspects == allAspects) { + } else if (selectedAspects === allAspects) { replacement = Diaspora.I18n.t('aspect_dropdown.all_aspects'); - }else if (number == 1) { + } else if (number === 1) { button.addClass(inAspectClass); replacement = dropdown.find(".selected").first().text(); /* flash message prompt */ - if( dropdown.closest('#publisher').length == 0 ) { - var message = Diaspora.I18n.t("aspect_dropdown.started_sharing_with", {name: dropdown.data('person-short-name')}); + if (!isInPublisher) { + message = Diaspora.I18n.t("aspect_dropdown.started_sharing_with", {name: dropdown.data('person-short-name')}); Diaspora.page.flashMessages.render({success: true, notice: message}); } - }else { - replacement = Diaspora.I18n.t('aspect_dropdown.toggle', { count: number.toString()}) + } else { + replacement = Diaspora.I18n.t('aspect_dropdown.toggle', { count: number.toString()}); } - button.text(replacement + ' ▼'); + // if we are in the publisher, we add the visibility icon + if (isInPublisher) { + var icon = $('#visibility-icon'); + if (replacement.trim() === Diaspora.I18n.t('stream.public')) { + icon.removeClass('lock'); + icon.addClass('globe'); + } else { + icon.removeClass('globe'); + icon.addClass('lock'); + } + button.find('.text').text(replacement); + } else { + button.text(replacement + ' ▼'); + } }, toggleCheckbox: function(check) { @@ -58,4 +75,4 @@ var AspectsDropdown = { }); } }; - +// @license-end diff --git a/app/assets/javascripts/browser_detection.js b/app/assets/javascripts/browser_detection.js index 9387c379f..6a8e5adab 100644 --- a/app/assets/javascripts/browser_detection.js +++ b/app/assets/javascripts/browser_detection.js @@ -1,5 +1,9 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + jQuery.browser = {}; jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase()); jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase()); jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase()); jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase()); +// @license-end + diff --git a/app/assets/javascripts/contact-edit.js b/app/assets/javascripts/contact-edit.js deleted file mode 100644 index 99647bfb3..000000000 --- a/app/assets/javascripts/contact-edit.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2010-2011, Diaspora Inc. This file is -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -/** - * TEMPORARY SOLUTION - * TODO remove me, when the contacts section is done with Backbone.js ... - * (this is about as much covered by tests as the old code ... not at all) - * - * see also 'aspect-edit-pane.js' - */ - -app.tmp || (app.tmp = {}); - -// on the contacts page, viewing the list of people in a single aspect -app.tmp.ContactAspects = function() { - $('#people_stream').on('click', '.contact_remove-from-aspect', _.bind(this.removeFromAspect, this)); -}; -_.extend(app.tmp.ContactAspects.prototype, { - removeFromAspect: function(evt) { - evt.stopImmediatePropagation(); - evt.preventDefault(); - - var el = $(evt.currentTarget); - var id = el.data('membership_id'); - - var aspect_membership = new app.models.AspectMembership({'id':id}); - aspect_membership.on('sync', this._successDestroyCb, this); - aspect_membership.on('error', function(aspect_membership) { - this._displayError('aspect_dropdown.error_remove', aspect_membership.get('id')); - }, this); - - aspect_membership.destroy(); - - return false; - }, - - _successDestroyCb: function(aspect_membership) { - var membership_id = aspect_membership.get('id'); - - $('.stream_element').has('[data-membership_id="'+membership_id+'"]') - .fadeOut(300, function() { $(this).remove() }); - }, - - _displayError: function(msg_id, membership_id) { - var name = $('.stream_element') - .has('[data-membership_id="'+membership_id+'"]') - .find('div.bd > a') - .text(); - var msg = Diaspora.I18n.t(msg_id, { 'name': name }); - Diaspora.page.flashMessages.render({ 'success':false, 'notice':msg }); - } -}); - - -$(function() { - var contact_aspects = new app.tmp.ContactAspects(); -}); diff --git a/app/assets/javascripts/contact-list.js b/app/assets/javascripts/contact-list.js index 5d8785a6e..0e8bda50e 100644 --- a/app/assets/javascripts/contact-list.js +++ b/app/assets/javascripts/contact-list.js @@ -1,40 +1,6 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later var List = { - initialize: function() { - $(document).on("keyup", ".contact_list_search", function(e) { - var search = $(this); - var list = $(".contacts", ".searchable"); - var query = new RegExp(search.val(),'i'); - - $("> .contact", list).each( function(idx, element) { - element = $(element); - if( !element.find(".name").text().match(query) ) { - element.addClass('hidden'); - } else { - element.removeClass('hidden'); - } - }); - }); - }, - - disconnectUser: function(contact_id){ - $.ajax({ - url: "/contacts/" + contact_id, - type: "DELETE", - success: function(){ - if( $('.searchable').length == 1){ - $('.searchable .contact[data-contact_id='+contact_id+']').fadeOut(200); - } else if($('#aspects_list').length == 1) { - $.facebox.close(); - }; - } - }); - }, - runDelayedSearch: function( searchTerm ) { $.getJSON('/people/refresh_search', { q: searchTerm }, @@ -49,34 +15,14 @@ var List = { }); streamEl.html(string); + $('.aspect_membership_dropdown').each(function(){ + new app.views.AspectMembership({el: this}); + }); }, startSearchDelay: function (theSearch) { setTimeout( "List.runDelayedSearch('" + theSearch + "')", 10000); } - }; +// @license-end -$(document).ready(function() { - $('.added').bind('ajax:loading', function() { - var $this = $(this); - - $this.addClass('disabled'); - $this.fadeTo(200,0.4); - }); - - $('.added').bind('hover', - function() { - var $this = $(this) - $this.addClass("remove"); - $this.children("img").attr("src","/images/icons/monotone_close_exit_delete.png"); - }, - - function() { - var $this = $(this) - $this.removeClass("remove"); - $this.children("img").attr("src","/images/icons/monotone_check_yes.png"); - }); - - List.initialize(); -}); diff --git a/app/assets/javascripts/diaspora.js b/app/assets/javascripts/diaspora.js index 7d683fdcb..054905786 100644 --- a/app/assets/javascripts/diaspora.js +++ b/app/assets/javascripts/diaspora.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -19,14 +21,18 @@ var eventNames = eventName.split(" "); for(eventName in eventNames) { - this.eventsContainer.trigger(eventNames[eventName], args); + if(eventNames.hasOwnProperty(eventName)) { + this.eventsContainer.trigger(eventNames[eventName], args); + } } }, subscribe: function(eventName, callback, context) { var eventNames = eventName.split(" "); for(eventName in eventNames) { - this.eventsContainer.bind(eventNames[eventName], $.proxy(callback, context)); + if(eventNames.hasOwnProperty(eventName)) { + this.eventsContainer.bind(eventNames[eventName], $.proxy(callback, context)); + } } } }); @@ -36,7 +42,10 @@ }; Diaspora.BaseWidget = { - instantiate: function(Widget, element) { + instantiate: function(Widget) { + // Mobile version loads only some widgets + if (typeof Diaspora.Widgets[Widget] === 'undefined') return; + $.extend(Diaspora.Widgets[Widget].prototype, Diaspora.EventBroker.extend(Diaspora.BaseWidget)); var widget = new Diaspora.Widgets[Widget](), @@ -80,16 +89,16 @@ if(!$.mobile)//why does this need this? $.extend(Diaspora.page, new Diaspora.BasePage($(document.body))); - Diaspora.page.publish("page/ready", [$(document.body)]) + Diaspora.page.publish("page/ready", [$(document.body)]); }; // temp hack to check if backbone is enabled for the page Diaspora.backboneEnabled = function(){ return window.app && window.app.stream !== undefined; - } + }; window.Diaspora = Diaspora; })(); - $(Diaspora.instantiatePage); +// @license-end diff --git a/app/assets/javascripts/helpers/alert.js b/app/assets/javascripts/helpers/alert.js deleted file mode 100644 index 08dd06dea..000000000 --- a/app/assets/javascripts/helpers/alert.js +++ /dev/null @@ -1,30 +0,0 @@ -Diaspora.Alert = { - faceboxTemplate: - '
' + - '
' + - '
' + - '

' + - '<%= title %>' + - '

' + - '
' + - '<%= content %>' + - '
' + - '
', - - show: function(title, content) { - $(_.template(this.faceboxTemplate, { - title: title, - content: content - })).appendTo(document.body); - - $.facebox({ - div: "#diaspora_alert" - }, "diaspora_alert"); - } -}; - -$(function() { - $(document).bind("close.facebox", function() { - $("#diaspora_alert").remove(); - }); -}); diff --git a/app/assets/javascripts/helpers/i18n.js b/app/assets/javascripts/helpers/i18n.js index 442f6fdf9..9be574c45 100644 --- a/app/assets/javascripts/helpers/i18n.js +++ b/app/assets/javascripts/helpers/i18n.js @@ -1,10 +1,12 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + Diaspora.I18n = { language: "en", locale: { pluralizationKey: function(n) { return this.fallback.pluralizationKey(n); }, data: {}, fallback: { - pluralizationKey: function(n) { return n == 1 ? "one" : "other"; }, + pluralizationKey: function(n) { return n === 1 ? "one" : "other"; }, data: {} } }, @@ -18,9 +20,12 @@ Diaspora.I18n = { updateLocale: function(locale, data) { locale.data = $.extend(locale.data, data); - rule = this._resolve(locale, ['pluralization_rule']); + var rule = this._resolve(locale, ['pluralization_rule']); if (rule !== "") { + /* jshint evil:true */ + // TODO change this to `locale.pluralizationKey = rule`? eval("locale.pluralizationKey = "+rule); + /* jshint evil:false */ } }, @@ -35,7 +40,7 @@ Diaspora.I18n = { _resolve: function(locale, items) { var translatedMessage, nextNamespace, originalItems = items.slice(); - while(nextNamespace = items.shift()) { + while( (nextNamespace = items.shift()) ) { translatedMessage = (translatedMessage) ? translatedMessage[nextNamespace] : locale.data[nextNamespace]; @@ -48,7 +53,7 @@ Diaspora.I18n = { } } } - + return translatedMessage; }, @@ -60,7 +65,7 @@ Diaspora.I18n = { } try { - return _.template(this._resolve(locale, items), views || {}); + return _.template(this._resolve(locale, items))(views || {}); } catch (e) { if (typeof locale.fallback === "undefined") { return ""; @@ -77,3 +82,5 @@ Diaspora.I18n = { this.locale.data = arguments[0]; } }; +// @license-end + diff --git a/app/assets/javascripts/home.js b/app/assets/javascripts/home.js deleted file mode 100644 index 2d14f6045..000000000 --- a/app/assets/javascripts/home.js +++ /dev/null @@ -1,7 +0,0 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ - -//= require aspect-edit-pane -//= require fileuploader-custom diff --git a/app/assets/javascripts/ie.js b/app/assets/javascripts/ie.js index c1f744f5e..1c1d5387d 100644 --- a/app/assets/javascripts/ie.js +++ b/app/assets/javascripts/ie.js @@ -1,2 +1,6 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + document.createElement('header'); document.createElement('footer'); +// @license-end + diff --git a/app/assets/javascripts/inbox.js b/app/assets/javascripts/inbox.js index 3ab0c4cf5..e270e121b 100644 --- a/app/assets/javascripts/inbox.js +++ b/app/assets/javascripts/inbox.js @@ -1,104 +1,21 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ -//= require jquery.autoSuggest.custom - +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later $(document).ready(function(){ - - if ($('#first_unread').length > 0) { - $("html").scrollTop($('#first_unread').offset().top-45); - } - - $('time.timeago').each(function(i,e) { - var jqe = $(e); - jqe.attr('data-original-title', new Date(jqe.attr('datetime')).toLocaleString()); - jqe.attr('title', ''); - }); - - $('.timeago').tooltip(); - $('.timeago').timeago(); - - $('time.timeago').each(function(i,e) { - var jqe = $(e); - jqe.attr('title', ''); - }); - - $('.stream_element.conversation').hover( - function(){ - $(this).find('.participants').slideDown('300'); - }, - - function(){ - $(this).find('.participants').slideUp('300'); - } - ); - $(document).on('click', '.conversation-wrapper', function(){ var conversation_path = $(this).data('conversation-path'); - $.getScript(conversation_path, function() { Diaspora.page.directionDetector.updateBinds(); }); - history.pushState(null, "", conversation_path); - - var conv = $(this).children('.stream_element'), - cBadge = $("#conversations_badge .badge_count"); - if(conv.hasClass('unread') ){ - conv.removeClass('unread'); - } - if(cBadge.html() !== null) { - cBadge.html().replace(/\d+/, function(num){ - num = parseInt(num); - cBadge.html(parseInt(num)-1); - if(num == 1) { - cBadge.addClass("hidden"); - } - }); - } - return false; }); $(window).bind("popstate", function(){ if (location.href.match(/conversations\/\d+/) !== null) { - $.getScript(location.href, function() { + $.getScript(location.href, function() { Diaspora.page.directionDetector.updateBinds(); }); return false; } }); - - $('#conversation_inbox .stream').infinitescroll({ - navSelector : ".pagination", - // selector for the paged navigation (it will be hidden) - nextSelector : ".pagination a.next_page", - // selector for the NEXT link (to page 2) - itemSelector : "#conversation_inbox .conversation", - // selector for all items you'll retrieve - localMode: true, - debug: false, - donetext: "no more.", - loadingText: "", - loadingImg: '/assets/ajax-loader.gif' - }, function(){ - $('.conversation-wrapper', '.stream').bind('mousedown', function(){ - bindIt($(this)); - }); - }); - - // kill scroll binding - $(window).unbind('.infscr'); - - // hook up the manual click guy. - $('a.next_page').click(function(){ - $(document).trigger('retrieve.infscr'); - return false; - }); - - // remove the paginator when we're done. - $(document).ajaxError(function(e,xhr,opt){ - if (xhr.status == 404) { $('a.next_page').remove(); } - }); }); +// @license-end diff --git a/app/assets/javascripts/jasmine-load-all.js b/app/assets/javascripts/jasmine-load-all.js index 7395aba77..793b86e0e 100644 --- a/app/assets/javascripts/jasmine-load-all.js +++ b/app/assets/javascripts/jasmine-load-all.js @@ -1,10 +1,11 @@ //= require jquery -//= require handlebars-1.0.0.beta.6 +//= require handlebars.runtime //= require templates //= require main -//= require home +//= require fileuploader-custom //= require inbox -//= require mobile -//= require profile -//= require people +//= require mobile/mobile +//= require jquery.autoSuggest.custom +//= require contact-list //= require sinon +//= require jasmine-ajax diff --git a/app/assets/javascripts/jsxc.js b/app/assets/javascripts/jsxc.js new file mode 100644 index 000000000..40c8abedb --- /dev/null +++ b/app/assets/javascripts/jsxc.js @@ -0,0 +1,42 @@ +//= require diaspora_jsxc + +// initialize jsxc xmpp client +$(document).ready(function() { + if (app.currentUser.authenticated()) { + $.post('api/v1/tokens', null, function(data) { + if (jsxc && data['token']) { + var jid = app.currentUser.get('diaspora_id'); + jsxc.init({ + root: '/assets/diaspora_jsxc', + logoutElement: $('.user-menu-item [data-method=delete]'), + rosterAppend: 'body', + otr: { + debug: true, + SEND_WHITESPACE_TAG: true, + WHITESPACE_START_AKE: true + }, + autoLang: true, + priority: { + online: 1, + chat: 1 + }, + displayRosterMinimized: function() { + return true; + }, + xmpp: { + url: $('script#jsxc').data('endpoint'), + username: jid.replace(/@.*?$/g, ''), + domain: jid.replace(/^.*?@/g, ''), + jid: jid, + password: data.token, + resource: 'diaspora-jsxc', + overwrite: true, + onlogin: true + } + }); + } else { + console.error('No token found! Authenticated!?'); + } + }, 'json'); + } +}); diff --git a/app/assets/javascripts/mailchimp.js b/app/assets/javascripts/mailchimp.js deleted file mode 100644 index 6254d0402..000000000 --- a/app/assets/javascripts/mailchimp.js +++ /dev/null @@ -1,3 +0,0 @@ -//= require mailchimp/jquery.form -//= require mailchimp/jquery.validate -//= require mailchimp/jquery126.min \ No newline at end of file diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 389e824af..aaa0c50ea 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -2,28 +2,35 @@ * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. */ +//= require js_image_paths +//= require js-routes //= require underscore //= require backbone //= require jquery.hotkeys //= require jquery.remotipart //= require jquery.autoresize //= require jquery.charcount -//= require jquery.placeholder +//= require jquery-placeholder //= require rails-timeago //= require facebox //= require browser_detection //= require jquery.events.input //= require jquery.elastic //= require jquery.mentionsInput -//= require jquery.idle-timer +//= require jquery-idletimer/dist/idle-timer //= require jquery.infinitescroll-custom //= require jquery.autocomplete-custom //= require keycodes //= require fileuploader-custom -//= require handlebars-1.0.0.beta.6 -//= require markdown -//= require punycode -//= require parse_url +//= require handlebars.runtime +//= require posix-bracket-expressions +//= require markdown-it +//= require markdown-it-diaspora-mention +//= require markdown-it-for-inline +//= require markdown-it-hashtag +//= require markdown-it-sanitizer +//= require markdown-it-sub +//= require markdown-it-sup //= require clear-form //= require app/app //= require diaspora @@ -32,8 +39,6 @@ //= require_tree ./widgets //= require view //= require aspects-dropdown -//= require contact-edit -//= require contact-list //= require mentions //= require bootstrap-tooltip //= require bootstrap-popover diff --git a/app/assets/javascripts/mentions.js b/app/assets/javascripts/mentions.js index 851337e38..33058ae67 100644 --- a/app/assets/javascripts/mentions.js +++ b/app/assets/javascripts/mentions.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + var Mentions = { initialize: function(mentionsInput) { return mentionsInput.mentionsInput(Mentions.options); @@ -43,3 +45,5 @@ var Mentions = { } } }; +// @license-end + diff --git a/app/assets/javascripts/mobile.js b/app/assets/javascripts/mobile/mobile.js similarity index 69% rename from app/assets/javascripts/mobile.js rename to app/assets/javascripts/mobile/mobile.js index 0ba372480..5cd873f13 100644 --- a/app/assets/javascripts/mobile.js +++ b/app/assets/javascripts/mobile/mobile.js @@ -1,14 +1,23 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. */ //= require jquery.charcount +//= require js-routes //= require mbp-modernizr-custom //= require mbp-respond.min //= require mbp-helper //= require jquery.autoSuggest.custom //= require fileuploader-custom //= require rails-timeago +//= require underscore +//= require diaspora +//= require helpers/i18n +//= require widgets/timeago +//= require mobile/mobile_file_uploader +//= require mobile/profile_aspects $(document).ready(function(){ @@ -31,12 +40,18 @@ $(document).ready(function(){ evt.preventDefault(); $("#app").toggleClass('draw'); }); - + /* Show / hide aspects in the drawer */ $('#all_aspects').bind("tap click", function(evt){ evt.preventDefault(); $("#all_aspects + li").toggleClass('hide'); - }); + }); + + /* Show / hide followed tags in the drawer */ + $('#followed_tags').bind("tap click", function(evt){ + evt.preventDefault(); + $("#followed_tags + li").toggleClass('hide'); + }); /* Heart toggle */ $(".like_action", ".stream").bind("tap click", function(evt){ @@ -68,7 +83,7 @@ $(document).ready(function(){ dataType: 'json', type: 'DELETE', beforeSend: showLoader(link), - complete: function(data){ + complete: function(){ removeLoader(link); link.attr("href", href.replace(/\/\d+$/, '')); @@ -97,12 +112,12 @@ $(document).ready(function(){ dataType: 'json', type: 'POST', beforeSend: showLoader(link), - success: function(data){ + success: function(){ removeLoader(link); }, - error: function(data){ + error: function(){ removeLoader(link); - alert("Failed to reshare!"); + alert(Diaspora.I18n.t('failed_to_reshare')); } }); } @@ -115,7 +130,7 @@ $(document).ready(function(){ evt.preventDefault(); var link = $(this), parent = link.closest(".bottom_bar").first(), - commentsContainer = function(){ return parent.find(".comment_container").first(); } + commentsContainer = function(){ return parent.find(".comment_container").first(); }, existingCommentsContainer = commentsContainer(); if( link.hasClass('active') ) { @@ -187,7 +202,7 @@ $(document).ready(function(){ context: link, success: function(data){ var textarea = function(target) { return target.closest(".stream_element").find('textarea.comment_box').first()[0] }; - link.removeClass('loading') + link.removeClass('loading'); if(!link.hasClass("add_comment_bottom_link")){ link.removeClass('inactive'); @@ -204,9 +219,9 @@ $(document).ready(function(){ $(".stream").delegate("a.cancel_new_comment", "tap click", function(evt){ evt.preventDefault(); - var link = $(this); + var link = $(this), form = link.closest("form"), - commentActionLink = link.closest(".bottom_bar").find("a.comment_action").first(); + commentActionLink = link.closest(".bottom_bar").find("a.comment_action").first(), container = link.closest('.bottom_bar').find('.add_comment_bottom_link_container'); if(container.length > 0 ){ @@ -224,7 +239,7 @@ $(document).ready(function(){ $.post(form.attr('action')+"?format=mobile", form.serialize(), function(data){ var bottomBar = form.closest('.bottom_bar').first(), container = bottomBar.find('.add_comment_bottom_link_container'), - commentActionLink = bottomBar.find("a.comment_action").first(); + commentActionLink = bottomBar.find("a.comment_action").first(), reactionLink = bottomBar.find(".show_comments").first(), commentCount = bottomBar.find(".comment_count"); @@ -234,13 +249,13 @@ $(document).ready(function(){ container.show(); } else { - var container = $("
"), - comments = $("
    "); + var comments = $("
      "); + container = $("
      "); comments.html(data); container.append(comments); form.remove(); - container.appendTo(bottomBar) + container.appendTo(bottomBar); } reactionLink.text(reactionLink.text().replace(/(\d+)/, function(match){ return parseInt(match) + 1; })); @@ -251,7 +266,7 @@ $(document).ready(function(){ }); - $(".service_icon").bind("tap click", function(evt) { + $(".service_icon").bind("tap click", function() { var service = $(this).toggleClass("dim"), selectedServices = $("#new_status_message .service_icon:not(.dim)"), provider = service.attr("id"), @@ -287,87 +302,5 @@ $(document).ready(function(){ evt.preventDefault(); $("#new_status_message").submit(); }); - }); - -function createUploader(){ - - var aspectIds = gon.preloads.aspect_ids; - - var uploader = new qq.FileUploaderBasic({ - element: document.getElementById('file-upload-publisher'), - params: {'photo' : {'pending' : 'true', 'aspect_ids' : aspectIds},}, - allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'tiff'], - action: "/photos", - debug: true, - button: document.getElementById('file-upload-publisher'), - sizeLimit: 4194304, - - onProgress: function(id, fileName, loaded, total){ - var progress = Math.round(loaded / total * 100 ); - $('#fileInfo-publisher').text(fileName + ' ' + progress + '%'); - }, - - messages: { - typeError: Diaspora.I18n.t("photo_uploader.invalid_ext"), - sizeError: Diaspora.I18n.t("photo_uploader.new_photo.size_error"), - emptyError: Diaspora.I18n.t("photo_uploader.new_photo.empty") - }, - - onSubmit: function(id, fileName){ - $('#file-upload-publisher').addClass("loading"); - $('#publisher_textarea_wrapper').addClass("with_attachments"); - $('#photodropzone').append( - "
    • " + - "Ajax-loader2" + - "
    • " - ); - }, - - onComplete: function(id, fileName, responseJSON) { - $('#fileInfo-publisher').text(Diaspora.I18n.t("photo_uploader.completed", {'file': fileName})); - var id = responseJSON.data.photo.id, - url = responseJSON.data.photo.unprocessed_image.url, - currentPlaceholder = $('li.loading').first(); - - $('#publisher_textarea_wrapper').addClass("with_attachments"); - $('#new_status_message').append(""); - - // replace image placeholders - var img = currentPlaceholder.find('img'); - img.attr('src', url); - img.attr('data-id', id); - currentPlaceholder.removeClass('loading'); - currentPlaceholder.append("
      X
      " + - "
      "); - //// - - var publisher = $('#publisher'), - textarea = publisher.find('textarea'); - - publisher.find("input[type='submit']").removeAttr('disabled'); - - $('.x').bind('click', function(){ - var photo = $(this).closest('.publisher_photo'); - photo.addClass("dim"); - $.ajax({url: "/photos/" + photo.children('img').attr('data-id'), - dataType: 'json', - type: 'DELETE', - success: function() { - photo.fadeOut(400, function(){ - photo.remove(); - if ( $('.publisher_photo').length == 0){ - $('#publisher_textarea_wrapper').removeClass("with_attachments"); - } - }); - } - }); - }); - }, - - onAllComplete: function(completed_files){ - } - - }); -} -createUploader(); +// @license-end diff --git a/app/assets/javascripts/mobile/mobile_file_uploader.js b/app/assets/javascripts/mobile/mobile_file_uploader.js new file mode 100644 index 000000000..1084821e9 --- /dev/null +++ b/app/assets/javascripts/mobile/mobile_file_uploader.js @@ -0,0 +1,84 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later +//= require js_image_paths + +function createUploader(){ + + var aspectIds = gon.preloads.aspect_ids; + + new qq.FileUploaderBasic({ + element: document.getElementById('file-upload-publisher'), + params: {'photo' : {'pending' : 'true', 'aspect_ids' : aspectIds},}, + allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'tiff'], + action: "/photos", + debug: true, + button: document.getElementById('file-upload-publisher'), + sizeLimit: 4194304, + + onProgress: function(id, fileName, loaded, total){ + var progress = Math.round(loaded / total * 100 ); + $('#fileInfo-publisher').text(fileName + ' ' + progress + '%'); + }, + + messages: { + typeError: Diaspora.I18n.t("photo_uploader.invalid_ext"), + sizeError: Diaspora.I18n.t("photo_uploader.new_photo.size_error"), + emptyError: Diaspora.I18n.t("photo_uploader.new_photo.empty") + }, + + onSubmit: function(){ + $('#file-upload-publisher').addClass("loading"); + $('#publisher_textarea_wrapper').addClass("with_attachments"); + $('#photodropzone').append( + "
    • " + + "Ajax-loader2" + + "
    • " + ); + }, + + onComplete: function(_id, fileName, responseJSON) { + $('#fileInfo-publisher').text(Diaspora.I18n.t("photo_uploader.completed", {'file': fileName})); + var id = responseJSON.data.photo.id, + url = responseJSON.data.photo.unprocessed_image.url, + currentPlaceholder = $('li.loading').first(); + + $('#publisher_textarea_wrapper').addClass("with_attachments"); + $('#new_status_message').append(""); + + // replace image placeholders + var img = currentPlaceholder.find('img'); + img.attr('src', url); + img.attr('data-id', id); + currentPlaceholder.removeClass('loading'); + currentPlaceholder.append("
      X
      " + + "
      "); + //// + + var publisher = $('#publisher'); + + publisher.find("input[type='submit']").removeAttr('disabled'); + + $('.x').bind('click', function(){ + var photo = $(this).closest('.publisher_photo'); + photo.addClass("dim"); + $.ajax({url: "/photos/" + photo.children('img').attr('data-id'), + dataType: 'json', + type: 'DELETE', + success: function() { + photo.fadeOut(400, function(){ + photo.remove(); + if ( $('.publisher_photo').length === 0){ + $('#publisher_textarea_wrapper').removeClass("with_attachments"); + } + }); + } + }); + }); + }, + + onAllComplete: function(){ + } + + }); +} +createUploader(); +// @license-end diff --git a/app/assets/javascripts/mobile/profile_aspects.js b/app/assets/javascripts/mobile/profile_aspects.js new file mode 100644 index 000000000..11769b4bd --- /dev/null +++ b/app/assets/javascripts/mobile/profile_aspects.js @@ -0,0 +1,84 @@ +$(document).ready(function(){ + /* profile page: aspect-dropdown */ + + // renders the cover text for the dropdown + function profileAspectDropdown_refresh($el) { + var cover_text, num_selected = $el.find('option.selected').length; + if(num_selected === 0) { + $el.removeClass('has_connection'); + cover_text = Diaspora.I18n.t('aspect_dropdown.add_to_aspect'); + } else { + $el.addClass('has_connection'); + if(num_selected === 1) { + cover_text = $el.find('option.selected').data('name'); + } else { + cover_text = Diaspora.I18n.t('aspect_dropdown.toggle', { 'count' : num_selected }); + } + } + $el.find('option.list_cover').text(cover_text); + } + + // onchange handler for aspect dropdown instances + var profileAspectDropDown_onchange = function() { + var $el = $(this), + selected = $el.find('option:selected'); + $el.find('option.list_cover').text(Diaspora.I18n.t('aspect_dropdown.updating')); + $el.val('list_cover'); // switch back to cover + + if(selected.hasClass('selected')) { + // remove from aspect + var membership_id = selected.data('membership_id'); + + $.ajax({ + url: Routes.aspect_membership_path(membership_id), + type: 'DELETE', + dataType: 'json', + headers: { + 'Accept': "application/json, text/javascript, */*; q=0.01" + } + }).done(function() { + selected.text("– " + Diaspora.I18n.t('aspect_dropdown.mobile_row_unchecked', {name: selected.data('name')})); + selected.removeClass('selected'); + profileAspectDropdown_refresh($el); + }).fail(function() { + alert(Diaspora.I18n.t('aspect_dropdown.error_remove')); + profileAspectDropdown_refresh($el); + }); + + } else { + // add to aspect + var person_id = $el.data('person-id'); + + $.ajax({ + url: Routes.aspect_memberships_path(), + data: JSON.stringify({ + "person_id": person_id, + "aspect_id": parseInt(selected.val(), 10) + }), + processData: false, + type: 'POST', + dataType: 'json', + headers: { + 'Accept': "application/json, text/javascript, */*; q=0.01" + }, + contentType: "application/json; charset=UTF-8" + }).done(function(data) { + selected.data('membership_id', data.id); // remember membership-id + selected.text("✓ " + Diaspora.I18n.t('aspect_dropdown.mobile_row_checked', {name: selected.data('name')})); + selected.addClass('selected'); + profileAspectDropdown_refresh($el); + }).fail(function() { + alert(Diaspora.I18n.t('aspect_dropdown.error')); + profileAspectDropdown_refresh($el); + }); + + } + }; + + // initialize list_cover and register eventhandler for every user_aspect dropdown there is + $('.user_aspects').each(function() { + profileAspectDropdown_refresh($(this)); + $(this).change(profileAspectDropDown_onchange); + }); +}); + diff --git a/app/assets/javascripts/osmlocator.js b/app/assets/javascripts/osmlocator.js index 509413f9d..157230456 100644 --- a/app/assets/javascripts/osmlocator.js +++ b/app/assets/javascripts/osmlocator.js @@ -1,23 +1,25 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + OSM = {}; OSM.Locator = function(){ var geolocalize = function(callback){ navigator.geolocation.getCurrentPosition(function(position) { - lat=position.coords.latitude; - lon=position.coords.longitude; - var display_name =$.getJSON("https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"&addressdetails=3", function(data){ + var lat=position.coords.latitude, + lon=position.coords.longitude; + $.getJSON("https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"&addressdetails=3", function(data){ return callback(data.display_name, position.coords); }); },errorGettingPosition); }; - function errorGettingPosition(err) { + function errorGettingPosition() { $("#location").remove(); - }; + } return { getAddress: geolocalize - } - -} + }; +}; +// @license-end diff --git a/app/assets/javascripts/pages/contacts-index.js b/app/assets/javascripts/pages/contacts-index.js deleted file mode 100644 index c570dfd6c..000000000 --- a/app/assets/javascripts/pages/contacts-index.js +++ /dev/null @@ -1,10 +0,0 @@ -Diaspora.Pages.ContactsIndex = function() { - var self = this; - - this.subscribe("page/ready", function(evt, document) { - self.infiniteScroll = self.instantiate("InfiniteScroll", - {donetext: Diaspora.I18n.t("infinite_scroll.no_more_contacts"),}); - $('.conversation_button').tooltip({placement: 'bottom'}); - }); - -}; diff --git a/app/assets/javascripts/pages/invitations-edit.js b/app/assets/javascripts/pages/invitations-edit.js deleted file mode 100644 index b223147ec..000000000 --- a/app/assets/javascripts/pages/invitations-edit.js +++ /dev/null @@ -1,8 +0,0 @@ -Diaspora.Pages.InvitationsEdit = function() { - var self = this; - - this.subscribe("page/ready", function(evt, body) { - jQuery.ajaxSetup({'cache': true}); - $('#user_username').tooltip({trigger: 'focus', placement: 'right'}); - }); -}; diff --git a/app/assets/javascripts/pages/invitations-new.js b/app/assets/javascripts/pages/invitations-new.js deleted file mode 100644 index da7338e64..000000000 --- a/app/assets/javascripts/pages/invitations-new.js +++ /dev/null @@ -1,12 +0,0 @@ -Diaspora.Pages.InvitationsNew = function() { - var self = this; - - this.subscribe("page/ready", function(evt, document) { - var rtl = $('html').attr('dir') == 'rtl', - position = rtl ? 'left' : 'right'; - - $('#new_user [title]').tooltip({trigger: 'focus', placement: position}); - $('#user_email').focus(); - }); -}; - diff --git a/app/assets/javascripts/pages/notifications-index.js b/app/assets/javascripts/pages/notifications-index.js deleted file mode 100644 index 7633a4d7d..000000000 --- a/app/assets/javascripts/pages/notifications-index.js +++ /dev/null @@ -1,8 +0,0 @@ -Diaspora.Pages.NotificationsIndex = function() { - var self = this; - - this.subscribe("page/ready", function(evt, document) { - self.infiniteScroll = self.instantiate("InfiniteScroll"); - self.instantiate("TimeAgo", document.find("time.timeago")); - }); -}; diff --git a/app/assets/javascripts/pages/users-getting-started.js b/app/assets/javascripts/pages/users-getting-started.js index 58182923e..2fed55655 100644 --- a/app/assets/javascripts/pages/users-getting-started.js +++ b/app/assets/javascripts/pages/users-getting-started.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + Diaspora.Pages.UsersGettingStarted = function() { var self = this; @@ -5,12 +7,12 @@ Diaspora.Pages.UsersGettingStarted = function() { self.peopleSearch = self.instantiate("Search", body.find("form.people.search_form")); self.tagSearch = self.instantiate("Search", body.find("form.tag_input.search_form")); - $('#edit_profile').bind('ajax:success', function(evt, data, status, xhr){ + $('#edit_profile').bind('ajax:success', function(){ $('#gs-name-form-spinner').addClass("hidden"); }); // It seems that the default behavior of rails ujs is to clear the remote form - $('#edit_profile').bind('ajax:complete', function(evt, xhr, status){ + $('#edit_profile').bind('ajax:complete', function(){ var firstNameField = $("#profile_first_name"); firstNameField.val(firstNameField.data("cachedValue")); @@ -33,7 +35,7 @@ Diaspora.Pages.UsersGettingStarted = function() { $(this).addClass("active_input"); }); - $("#awesome_button").bind("click", function(evt){ + $("#awesome_button").bind("click", function(){ var confirmMessage = Diaspora.I18n.t("getting_started.no_tags"); var message = Diaspora.I18n.t("getting_started.preparing_your_stream"); var confirmation = true; @@ -71,12 +73,14 @@ Diaspora.Pages.UsersGettingStarted = function() { }); autocompleteInput.bind('keydown', function(evt){ - if(evt.keyCode == 13 || evt.keyCode == 9 || evt.keyCode == 32){ + if(evt.keyCode === 13 || evt.keyCode === 9 || evt.keyCode === 32){ evt.preventDefault(); - if( $('li.as-result-item.active').length == 0 ){ + if( $('li.as-result-item.active').length === 0 ){ $('li.as-result-item').first().click(); } } }); }); }; +// @license-end + diff --git a/app/assets/javascripts/people.js b/app/assets/javascripts/people.js deleted file mode 100644 index d204d481c..000000000 --- a/app/assets/javascripts/people.js +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ -//= require aspect-edit-pane -//= require fileuploader-custom -//= require jquery.autoSuggest.custom - -$(document).ready(function() { - $('#profile_buttons .profile_button div').tooltip({placement: 'bottom'}); - $('#profile_buttons .sharing_message_container').tooltip({placement: 'bottom'}); - $("#block_user_button").click(function(evt) { - if(!confirm(Diaspora.I18n.t('ignore_user'))) { return; } - var personId = $(this).data('person-id'); - var block = new app.models.Block(); - block.save({block : {person_id : personId}}, { - success: function() { - $('#profile_buttons').attr('class', 'blocked'); - $('#sharing_message').attr('class', 'icons-circle'); - $('.profile_button, .white_bar').remove(); - } - }); - - return false; - }); -}); diff --git a/app/assets/javascripts/profile.js b/app/assets/javascripts/profile.js deleted file mode 100644 index 8d6b9ddd1..000000000 --- a/app/assets/javascripts/profile.js +++ /dev/null @@ -1,6 +0,0 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ -//= require jquery.autoSuggest.custom - diff --git a/app/assets/javascripts/view.js b/app/assets/javascripts/view.js index 6e7d7f9ec..508da666d 100644 --- a/app/assets/javascripts/view.js +++ b/app/assets/javascripts/view.js @@ -1,8 +1,4 @@ -/* Copyright (c) 2010-2011, Diaspora Inc. This file is - * licensed under the Affero General Public License version 3 or later. See - * the COPYRIGHT file. - */ -//= require mailchimp/jquery.form +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later var View = { initialize: function() { /* Buttons */ @@ -21,46 +17,19 @@ var View = { /* Dropdowns */ $(document) - .on('click', this.dropdowns.selector, this.dropdowns.click); + .on('click', this.dropdowns.selector, this.dropdowns.click) + .on('keypress', this.dropdowns.selector, this.dropdowns.click); - /* Avatars */ - $(this.avatars.selector).error(this.avatars.fallback); - - /* Clear forms after successful submit, this is some legacy dan hanson stuff, do we still want it? */ - $.fn.clearForm = function() { - return this.each(function() { - if ($(this).is('form') && !$(this).hasClass('form_do_not_clear')) { - return $(':input', this).clearForm(); - } - if ($(this).hasClass('clear_on_submit') || $(this).is(':text') || $(this).is(':password') || $(this).is('textarea')) { - $(this).val(''); - } else if ($(this).is(':checkbox') || $(this).is(':radio')) { - $(this).attr('checked', false); - } else if ($(this).is('select')) { - this.selectedIndex = -1; - } else if ($(this).attr('name') == 'photos[]') { - $(this).val(''); - } - $(this).blur(); - }); - }; - - $(document).on('ajax:success', 'form[data-remote]', function (e) { + $(document).on('ajax:success', 'form[data-remote]', function () { $(this).clearForm(); $(this).focusout(); }); /* tag following */ - $("#new_tag_following .tag_input").bind('focus', function(evt){ + $("#new_tag_following .tag_input").bind('focus', function(){ $(this).siblings("#tag_following_submit").removeClass('hidden'); }); - /* photo exporting in the works */ - $("#photo-export-button").bind("click", function(evt){ - evt.preventDefault(); - alert($(this).attr('title')); - }); - $(document.body).click(this.dropdowns.removeFocus); $('a[rel*=facebox]').facebox(); @@ -68,8 +37,8 @@ var View = { Diaspora.page.directionDetector.updateBinds(); }); - $("a.new_aspect").click(function(e){ - $("input#aspect_name").focus() + $("a.new_aspect").click(function(){ + $("input#aspect_name").focus(); }); /* facebox 'done' buttons */ @@ -110,16 +79,10 @@ var View = { }, selector: ".dropdown > .toggle", parentSelector: ".dropdown > .wrapper" - }, - - avatars: { - fallback: function(evt) { - $(this).attr("src", "/assets/user/default.png"); - }, - selector: "img.avatar" } }; $(function() { View.initialize(); }); +// @license-end diff --git a/app/assets/javascripts/widgets/back-to-top.js b/app/assets/javascripts/widgets/back-to-top.js index bb9a927d2..bde326774 100644 --- a/app/assets/javascripts/widgets/back-to-top.js +++ b/app/assets/javascripts/widgets/back-to-top.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + (function() { var BackToTop = function() { var self = this; @@ -25,9 +27,10 @@ (self.body.scrollTop() > 1000) ? 'addClass' : 'removeClass' - ]('visible') + ]('visible'); }; }; Diaspora.Widgets.BackToTop = BackToTop; })(); +// @license-end diff --git a/app/assets/javascripts/widgets/direction-detector.js b/app/assets/javascripts/widgets/direction-detector.js index 8c886e6f3..c3b034fa6 100644 --- a/app/assets/javascripts/widgets/direction-detector.js +++ b/app/assets/javascripts/widgets/direction-detector.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -11,47 +13,13 @@ this.subscribe("widget/ready", function() { self.updateBinds(); - + self.globalSubscribe("stream/scrolled", function() { self.updateBinds(); }); }); - this.isRTL = function(str) { - if(typeof str !== "string" || str.length < 1) { - return false; - } - - var charCode = str.charCodeAt(0); - if(charCode >= 1536 && charCode <= 1791) // Sarabic, Persian, ... - return true; - - else if(charCode >= 65136 && charCode <= 65279) // Arabic present 1 - return true; - - else if(charCode >= 64336 && charCode <= 65023) // Arabic present 2 - return true; - - else if(charCode>=1424 && charCode<=1535) // Hebrew - return true; - - else if(charCode>=64256 && charCode<=64335) // Hebrew present - return true; - - else if(charCode>=1792 && charCode<=1871) // Syriac - return true; - - else if(charCode>=1920 && charCode<=1983) // Thaana - return true; - - else if(charCode>=1984 && charCode<=2047) // NKo - return true; - - else if(charCode>=11568 && charCode<=11647) // Tifinagh - return true; - - return false; - }; + this.isRTL = app.helpers.txtDirection.isRTL; this.updateBinds = function() { $.each(self.binds, function(index, bind) { @@ -71,16 +39,13 @@ this.updateDirection = function() { var textArea = $(this), - cleaned = textArea.val().replace(self.cleaner, "").replace(/^[ ]+/, ""); + cleaned = textArea.val().replace(self.cleaner, "").replace(/^[ ]+/, ""); - if(self.isRTL(cleaned)) { - textArea.css("direction", "rtl"); - } - else { - textArea.css("direction", "ltr"); - } + app.helpers.txtDirection.setCssFor(cleaned, textArea); }; }; Diaspora.Widgets.DirectionDetector = DirectionDetector; })(); +// @license-end + diff --git a/app/assets/javascripts/widgets/flash-messages.js b/app/assets/javascripts/widgets/flash-messages.js index 377120991..142efce74 100644 --- a/app/assets/javascripts/widgets/flash-messages.js +++ b/app/assets/javascripts/widgets/flash-messages.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + (function() { var FlashMessages = function() { var self = this; @@ -33,3 +35,5 @@ Diaspora.Widgets.FlashMessages = FlashMessages; })(); +// @license-end + diff --git a/app/assets/javascripts/widgets/header.js b/app/assets/javascripts/widgets/header.js deleted file mode 100644 index a1fa4ec88..000000000 --- a/app/assets/javascripts/widgets/header.js +++ /dev/null @@ -1,21 +0,0 @@ -(function() { - var Header = function() { - var self = this; - - this.subscribe("widget/ready", function(evt, header) { - self.notifications = self.instantiate("Notifications", - header.find("#notification_badge .badge_count"), - header.find("#notification_dropdown") - ); - - self.notificationsDropdown = self.instantiate("NotificationsDropdown", - header.find("#notification_badge"), - header.find("#notification_dropdown") - ); - - self.search = self.instantiate("Search", header.find(".search_form")); - }); - }; - - Diaspora.Widgets.Header = Header; -})(); diff --git a/app/assets/javascripts/widgets/infinite-scroll.js b/app/assets/javascripts/widgets/infinite-scroll.js index dbf78b937..d3fa5be01 100644 --- a/app/assets/javascripts/widgets/infinite-scroll.js +++ b/app/assets/javascripts/widgets/infinite-scroll.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -11,7 +13,7 @@ debug: false, donetext: Diaspora.I18n.t("infinite_scroll.no_more"), loadingText: "", - loadingImg: "/assets/ajax-loader.gif", + loadingImg: ImagePaths.get("ajax-loader.gif"), navSelector: "#pagination", nextSelector: ".paginate", itemSelector: ".stream_element", @@ -56,4 +58,5 @@ Diaspora.Widgets.InfiniteScroll = InfiniteScroll; })(); +// @license-end diff --git a/app/assets/javascripts/widgets/lightbox.js b/app/assets/javascripts/widgets/lightbox.js index d896937fc..461be1d0e 100644 --- a/app/assets/javascripts/widgets/lightbox.js +++ b/app/assets/javascripts/widgets/lightbox.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. @@ -25,7 +27,7 @@ jQuery.fn.center = (function() { imageSelector: 'img.stream-photo' }; - this.subscribe("widget/ready", function(evt) { + this.subscribe("widget/ready", function() { $.extend(self, { lightbox: $("#lightbox"), navigation: $("#lightbox-navigation"), @@ -92,7 +94,7 @@ jQuery.fn.center = (function() { this.nextImage = function(thumb){ var next = thumb.next(); - if (next.length == 0) { + if (next.length === 0) { next = self.imageset.find("img").first(); } return(next); @@ -100,7 +102,7 @@ jQuery.fn.center = (function() { this.prevImage = function(thumb){ var prev = thumb.prev(); - if (prev.length == 0) { + if (prev.length === 0) { prev = self.imageset.find("img").last(); } return(prev); @@ -128,9 +130,9 @@ jQuery.fn.center = (function() { "data-full-photo": image.attr("data-full-photo") }); - if(image.attr("data-full-photo") == imageUrl) { + if(image.attr("data-full-photo") === imageUrl) { imageThumb = thumb; - }; + } self.imageset.append(thumb); }); @@ -152,7 +154,7 @@ jQuery.fn.center = (function() { this.scrollToThumbnail = function(imageThumb) { self.navigation.animate({scrollLeft: (self.navigation.scrollLeft() + imageThumb.offset().left +35 - (self.window.width() / 2))}, 200, 'swing'); - } + }; this.selectImage = function(imageThumb) { $(".selected", self.imageset).removeClass("selected"); @@ -176,7 +178,7 @@ jQuery.fn.center = (function() { this.resetLightbox = function() { self.lightbox.hide(); self.body.removeClass("lightboxed"); - self.image.attr("src", "assets/ajax-loader2.gif"); + self.image.attr("src", ImagePaths.get("ajax-loader2.gif")); self.imageset.html(""); }; @@ -187,3 +189,5 @@ jQuery.fn.center = (function() { Diaspora.Widgets.Lightbox = Lightbox; })(); +// @license-end + diff --git a/app/assets/javascripts/widgets/notifications-badge.js b/app/assets/javascripts/widgets/notifications-badge.js deleted file mode 100644 index ea062430a..000000000 --- a/app/assets/javascripts/widgets/notifications-badge.js +++ /dev/null @@ -1,83 +0,0 @@ -(function() { - var NotificationDropdown = function() { - var self = this; - - this.subscribe("widget/ready",function(evt, badge, dropdown) { - $.extend(self, { - badge: badge, - badgeLink: badge.find("a"), - documentBody: $(document.body), - dropdown: dropdown, - dropdownNotifications: dropdown.find(".notifications"), - ajaxLoader: dropdown.find(".ajax_loader") - }); - - if( ! $.browser.msie ) { - self.badge.on('click', self.badgeLink, function(evt){ - evt.preventDefault(); - evt.stopPropagation(); - if (self.dropdownShowing()){ - self.hideDropdown(); - } else { - self.showDropdown(); - } - }); - } - - self.documentBody.click(function(evt) { - var inDropdown = $(evt.target).parents().is(self.dropdown); - var inHovercard = $.contains(app.hovercard.el, evt.target); - - if(!inDropdown && !inHovercard && self.dropdownShowing()) { - self.badgeLink.click(); - } - }); - }); - - - this.dropdownShowing = function() { - return this.dropdown.css("display") === "block"; - }; - - this.showDropdown = function() { - self.ajaxLoader.show(); - self.badge.addClass("active"); - self.dropdown.css("display", "block"); - - self.getNotifications(); - }; - - this.hideDropdown = function() { - self.badge.removeClass("active"); - self.dropdown.css("display", "none"); - }; - - this.getNotifications = function() { - $.getJSON("/notifications?per_page=5", function(notifications) { - self.notifications = notifications; - self.renderNotifications(); - }); - }; - - this.renderNotifications = function() { - self.dropdownNotifications.empty(); - - $.each(self.notifications, function(index, notifications) { - $.each(notifications, function(index, notification) { - self.dropdownNotifications.append(notification.note_html); - }); - }); - self.dropdownNotifications.find("time.timeago").timeago(); - - self.dropdownNotifications.find('.unread').each(function(index) { - Diaspora.page.header.notifications.setUpUnread( $(this) ); - }); - self.dropdownNotifications.find('.read').each(function(index) { - Diaspora.page.header.notifications.setUpRead( $(this) ); - }); - self.ajaxLoader.hide(); - }; - }; - - Diaspora.Widgets.NotificationsDropdown = NotificationDropdown; -})(); diff --git a/app/assets/javascripts/widgets/notifications.js b/app/assets/javascripts/widgets/notifications.js deleted file mode 100644 index baac01c93..000000000 --- a/app/assets/javascripts/widgets/notifications.js +++ /dev/null @@ -1,145 +0,0 @@ - -/* Copyright (c) 2010-2011, Diaspora Inc. This file is -* licensed under the Affero General Public License version 3 or later. See -* the COPYRIGHT file. -*/ - -(function() { - var Notifications = function() { - var self = this; - - this.subscribe("widget/ready", function(evt, badge, notificationMenu) { - $.extend(self, { - badge: badge, - count: parseInt(badge.html()) || 0, - notificationMenu: notificationMenu, - notificationPage: null - }); - - $("a.more").click( function(evt) { - evt.preventDefault(); - $(this).hide() - .next(".hidden") - .removeClass("hidden"); - }); - self.notificationMenu.find('a#mark_all_read_link').click(function(event) { - $.ajax({ - url: "/notifications/read_all", - type: "GET", - dataType:'json', - success: function(){ - self.notificationMenu.find('.unread').each(function(index) { - self.setUpRead( $(this) ); - }); - self.resetCount(); - } - }); - $(event.target).addClass("disabled"); - return false; - }); - }); - this.setUpNotificationPage = function( page ) { - self.notificationPage = page; - } - this.unreadClick = function() { - $.ajax({ - url: "/notifications/" + $(this).closest(".stream_element,.notification_element").data("guid"), - data: { set_unread: true }, - type: "PUT", - success: self.clickSuccess - }); - }; - this.readClick = function() { - $.ajax({ - url: "/notifications/" + $(this).closest(".stream_element,.notification_element").data("guid"), - data: { set_unread: false }, - type: "PUT", - success: self.clickSuccess - }); - }; - this.setUpUnread = function( an_obj ) { - an_obj.removeClass("read").addClass( "unread" ); - an_obj.find('.unread-toggle') - .unbind("click") - .click(self.readClick) - .find('.entypo') - .tooltip('destroy') - .removeAttr('data-original-title') - .attr('title', Diaspora.I18n.t('notifications.mark_read')) - .tooltip(); - } - this.setUpRead = function( an_obj ) { - an_obj.removeClass("unread").addClass( "read" ); - an_obj.find('.unread-toggle') - .unbind("click") - .click(self.unreadClick) - .find('.entypo') - .tooltip('destroy') - .removeAttr('data-original-title') - .attr('title', Diaspora.I18n.t('notifications.mark_unread')) - .tooltip(); - } - this.clickSuccess = function( data ) { - var itemID = data["guid"] - var isUnread = data["unread"] - self.notificationMenu.find('.read,.unread').each(function(index) { - if ( $(this).data("guid") == itemID ) { - if ( isUnread ) { - self.notificationMenu.find('a#mark_all_read_link').removeClass('disabled') - self.setUpUnread( $(this) ) - } else { - self.setUpRead( $(this) ) - } - } - }); - if ( self.notificationPage == null ) { - if ( isUnread ) { - self.incrementCount(); - }else{ - self.decrementCount(); - } - } else { - var type = $('.notification_element[data-guid=' + data["guid"] + ']').data('type'); - self.notificationPage.updateView(data["guid"], type, isUnread); - } - }; - this.showNotification = function(notification) { - $(notification.html).prependTo(this.notificationMenu) - .fadeIn(200) - .delay(8000) - .fadeOut(200, function() { - $(this).detach(); - }); - - if(typeof notification.incrementCount === "undefined" || notification.incrementCount) { - this.incrementCount(); - } - }; - - this.changeNotificationCount = function(change) { - self.count = Math.max( self.count + change, 0 ) - self.badge.text(self.count); - - if(self.count === 0) { - self.badge.addClass("hidden"); - } - else if(self.count === 1) { - self.badge.removeClass("hidden"); - } - }; - this.resetCount = function(change) { - self.count = 0; - this.changeNotificationCount(0); - }; - - this.decrementCount = function() { - self.changeNotificationCount(-1); - }; - - this.incrementCount = function() { - self.changeNotificationCount(1); - }; - }; - - Diaspora.Widgets.Notifications = Notifications; -})(); diff --git a/app/assets/javascripts/widgets/search.js b/app/assets/javascripts/widgets/search.js deleted file mode 100644 index 53b60d152..000000000 --- a/app/assets/javascripts/widgets/search.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - var Search = function() { - var self = this; - - this.subscribe("widget/ready", function(evt, searchForm) { - $.extend(self, { - searchForm: searchForm, - searchFormAction: searchForm.attr("action"), - searchInput: searchForm.find("input[type='search']"), - searchInputName: searchForm.find("input[type='search']").attr("name"), - options: { - cacheLength : 15, - delay : 800, - extraParams : {limit : 4}, - formatItem : self.formatItem, - formatResult : self.formatResult, - max : 5, - minChars : 2, - onSelect: self.selectItemCallback, - parse : self.parse, - scroll : false - } - }); - - self.searchInput.autocomplete(self.searchFormAction + ".json", $.extend(self.options, { - element: self.searchInput - })); - }); - - this.formatItem = function(row) { - if (typeof row.search !== "undefined") { - return Diaspora.I18n.t("search_for", row); - } else { - if (row.avatar) { - return "" + row.name; - } else { - return row.name; - } - } - }; - - this.formatResult = function(row) { - return Handlebars.Utils.escapeExpression(row.name); - }; - - this.parse = function(data) { - var results = data.map(function(person){ - person['name'] = Handlebars.Utils.escapeExpression(person['name']); - return {data : person, value : person['name']} - }); - - results.push({ - data: { - name: self.searchInput.val(), - url: self.searchFormAction + "?" + self.searchInputName + "=" + self.searchInput.val(), - search: true - }, - value: self.searchInput.val() - }); - - return results; - }; - - this.selectItemCallback = function(evt, data, formatted) { - if (data['search'] === true) { // The placeholder "search for" result - window.location = self.searchFormAction + '?' + self.searchInputName + '=' + data['name']; - } else { // The actual result - self.options.element.val(formatted); - window.location = data['url'] ? data['url'] : "/tags/" + data['name'].substring(1); // we don't want the #-character - } - }; - }; - - Diaspora.Widgets.Search = Search; -})(); diff --git a/app/assets/javascripts/widgets/stream.js b/app/assets/javascripts/widgets/stream.js index c21025aff..a126af0e1 100644 --- a/app/assets/javascripts/widgets/stream.js +++ b/app/assets/javascripts/widgets/stream.js @@ -1,3 +1,5 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + (function() { var Stream = function() { var self = this; @@ -30,3 +32,5 @@ Diaspora.Widgets.Stream = Stream; } })(); +// @license-end + diff --git a/app/assets/javascripts/widgets/timeago.js b/app/assets/javascripts/widgets/timeago.js index 79e74fd46..dcb680864 100644 --- a/app/assets/javascripts/widgets/timeago.js +++ b/app/assets/javascripts/widgets/timeago.js @@ -1,17 +1,17 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later + /* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. */ (function() { Diaspora.Widgets.TimeAgo = function() { - var self = this; - this.subscribe("widget/ready", function() { if(Diaspora.I18n.language !== "en") { $.timeago.settings.lang = Diaspora.I18n.language; - $.timeago.settings.strings[Diaspora.I18n.language] = {} + $.timeago.settings.strings[Diaspora.I18n.language] = {}; $.each($.timeago.settings.strings["en"], function(index) { - if(index == "numbers") { + if(index === "numbers") { $.timeago.settings.strings[Diaspora.I18n.language][index] = []; } else { @@ -22,3 +22,4 @@ }); }; })(); +// @license-end diff --git a/app/assets/stylesheets/_flash_messages.scss b/app/assets/stylesheets/_flash_messages.scss index 56ead2668..e4b4e46c4 100644 --- a/app/assets/stylesheets/_flash_messages.scss +++ b/app/assets/stylesheets/_flash_messages.scss @@ -18,8 +18,7 @@ } .message { - @include border-radius(6px); - @include box-shadow(0, 1px, 4px, rgba(0,0,0,0.8)); + box-shadow: 0 1px 4px rgba(0,0,0,0.8); display : inline-block; padding: 10px 12px; @@ -29,6 +28,7 @@ color : #fff; background-color : rgba(0,0,0,0.8); border : 1px solid rgba(255,255,255,0.7); + border-radius: 6px; font-weight: bold; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; diff --git a/app/assets/stylesheets/_mixins.css.scss b/app/assets/stylesheets/_mixins.scss similarity index 53% rename from app/assets/stylesheets/_mixins.css.scss rename to app/assets/stylesheets/_mixins.scss index 8b2c6b31a..5c37c1556 100644 --- a/app/assets/stylesheets/_mixins.css.scss +++ b/app/assets/stylesheets/_mixins.scss @@ -8,15 +8,6 @@ $easing: linear; $default-border-radius: 3px; /* Style includes */ -@mixin border-radius($tl:$default-border-radius, $tr:$tl, $br:$tl, $bl:$tl){ - -moz-border-radius: $tl $tr $br $bl; - -webkit-border-radius: $tl $tr $br $bl; - border-radius: $tl $tr $br $bl; -} - -@mixin dropdown-shadow{ - @include box-shadow(0,0px,13px,rgba(20,20,20,0.5)) -} @mixin button-gradient($color){ @include linear-gradient(lighten($color,20%), $color); @@ -30,65 +21,32 @@ $default-border-radius: 3px; @include linear-gradient(lighten($color,20%), darken($color,15%)); } -/* Browser compatability */ -@mixin box-shadow($left, $top, $blur, $color:#000){ - -webkit-box-shadow: $left $top $blur $color; - -moz-box-shadow: $left $top $blur $color; - box-shadow: $left $top $blur $color; -} @mixin linear-gradient($from, $to, $start:0%, $end:100%){ - background-image: mix($from,$to); + background: mix($from,$to); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=$from, endColorstr=$to); -ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#{$from}, endColorstr=#{$to})"; - background-image: -webkit-gradient(linear, 0% $start, 0% $end, from($from), to($to)); - background-image: -moz-linear-gradient(top, $from $start, $to $end); - background-image: -o-linear-gradient(top, $from $start, $to $end); + background: linear-gradient(to bottom, $from $start, $to $end); } @mixin horizontal-linear-gradient($from, $to, $start:0%, $end:100%){ background-image: mix($from,$to); - - background-image: -moz-linear-gradient(left, $from $start, $to $end); - background-image: -o-linear-gradient(left, $from $start, $to $end); - background-image: -webkit-linear-gradient(left, $from $start, $to $end); - background-image: -ms-linear-gradient(left, $from $start, $to $end); - background-image: -khtml-linear-gradient(left, $from $start, $to $end); + background-image: linear-gradient(left, $from $start, $to $end); } -@mixin opacity($val){ - filter: alpha(opacity= $val* 100); - -moz-opacity: $val; - -khtml-opacity: $val; - opacity: $val; -} - -@mixin user-select($val){ - -webkit-user-select: $val; - -moz-user-select: $val; -} @mixin transition($type, $speed:$speed, $easing:$easing){ - -webkit-transition : $type $speed $easing; - -moz-transition : $type $speed $easing; - -o-transition : $type $speed $easing; - transition : $type $speed $easing; + transition : $type $speed $easing; } @mixin animate($name, $speed:$speed, $occurances:"") { - -webkit-animation : $name $speed $occurances; - -moz-animation : $name $speed $occurances; - -ms-animation : $name $speed $occurances; - -o-animation : $name $speed $occurances; + animation : $name $speed $occurances; } @mixin animation($name, $speed:0.2s, $easing:ease-in-out) { - -webkit-animation: $name $speed $easing; - -moz-animation: $name $speed $easing; - -ms-animation: $name $speed $easing; - -o-animation: $name $speed $easing; + animation: $name $speed $easing; } @mixin video-overlay(){ @@ -104,8 +62,8 @@ $default-border-radius: 3px; size : 60px 60px; } - @include border-radius(70px, 10px, 10px, 70px); - @include box-shadow(0, 0, 32px, rgba(255,255,255,.5)); + border-radius: 70px 10px 10px 70px; + box-shadow: 0 0 32px rgba(255,255,255,.5); position : absolute; top : 50%; @@ -126,7 +84,7 @@ $default-border-radius: 3px; } & > div > div { - @include opacity(1.0); + opacity: 1; overflow: hidden; text-shadow: -1px -1px 0 #000, 0 0 7px #111; color: #F0F0F0; @@ -143,7 +101,7 @@ $default-border-radius: 3px; font-size: .94em; line-height: 1.3em; white-space: nowrap; - @include opacity(.9); + opacity: 0.9; a { color: lighten($blue, 25%); diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.scss similarity index 100% rename from app/assets/stylesheets/admin.css.scss rename to app/assets/stylesheets/admin.scss diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass deleted file mode 100644 index fcca31881..000000000 --- a/app/assets/stylesheets/application.css.sass +++ /dev/null @@ -1,1478 +0,0 @@ -@import 'compass' -@import 'colors' -@import 'ui' -@import '_mixins' -@import '_flash_messages' -@import 'new_styles/_spinner' - -@import 'sidebar' -@import 'leftnavbar' -@import 'sprites' -@import 'header' -@import 'footer' -@import 'opengraph' -@import 'poll' -@import 'help' -@import 'profile' -@import 'publisher_blueprint' -@import 'facebox' -@import 'aspects' -@import 'stream-faces' -@import 'popover' -@import 'stream_element' -@import 'report' -@import 'new_styles/_forms' -@import 'tag' -@import 'photo' - -/* ====== media ====== */ -.media - :margin 10px - -.media, .bd - :overflow hidden - :_overflow visible - :zoom 1 - -.media .img - :float left - :margin-right 10px - -.media .img img - :display block - -.media .imgEt - :float right - :margin-left 10px -/* ====== ----- ====== */ - -body - :padding 2em - :margin 0 - :top 33px - :background-color $background-white - - :font - :family "Helvetica Neue",Helvetica,Arial,sans-serif - :size 13px - -a - :color $blue - :text - :decoration none - &:hover - :color $blue - :text - :decoration underline - &.disabled - :color $link-disabled-grey - :cursor default - &.disabled.button:hover - :color $link-disabled-grey - :cursor default - :background #f7f7f7 - -p - :word-wrap break-word - -h1, h2, h3, h4 - :margin - :bottom 5px - - small - :font-size small - :color $text-grey - -ul > li - :list-style none - -.content ul li - :list-style disc - -.rtl - :direction rtl - :text-align right - -.hidden - :display none - -.avatar - :-webkit-box-shadow rgba(0,0,0,0.12) 0px 0px 5px inset - :-moz-box-shadow rgba(0,0,0,0.12) 0px 0px 5px inset - - :background - :color $background-grey - - :width 50px - :height 50px - - :overflow hidden - -#content - :background - :color #fff - :border 1px solid #ccc - :height 100% - -.login_error, -.login_alert - :color rgb(208,49,43) - :text-shadow 1px 1px 20px rgb(208,49,43) - -.login_notice - :color rgb(10,150,10) - :text-shadow 1px 1px 20px rgb(126,240,77) - -.fieldWithErrors - :display inline - -.error_messages - :width 400px - :border 2px solid #CF0000 - :padding 0 - :padding-bottom 12px - :margin-bottom 20px - :background-color #f0f0f0 - :font - :size 12px - h2 - :text-align left - :padding 5px 5px 5px 15px - :margin 0 - :font - :weight bold - :size 12px - :background-color #c00 - p - :margin 8px 10px - ul - :margin 0 - -////////////////////////////////// - -////////////////////////////////// -//hacks for tagging plugin... -ul.as-selections - :width 100% !important -////////////////////////////////// - -.unread - :background-color #E6E6E6 - :color #333 !important - time - :color #333 !important - -#author_info - :position relative - - .avatar img - :position relative - :top 0px - :display inline-block - :height 30px - :width 30px - - .from - :display inline-block - - &.profile - .from - :padding 0 - - h2, - h3, - h4, - h5 - :display inline-block - :margin - :bottom 10px - :right 10px - h2 - :margin - :bottom 0 - - &.show - a - :margin - :right 1em - :font - :weight normal - h4, - h5 - :margin 0 - :padding 0 - - .right - :top 10px - - .description - :margin - :bottom 10px - -.info - :font-size smaller - -.controls - :z-index 6 - :float right - - .post_report, .comment_report - :display inline-block - - .icons-report - :height 14px - :width 14px - - .block_user - :display inline-block - - .icons-ignoreuser - :height 14px - :width 14px - - .delete - :display inline-block - - .icons-deletelabel - :height 14px - :width 14px - - a:hover - :text-decoration none - -.grey, -.grey * - :color $text-grey - -.pull-left - :float left - -.pull-right - :float right - -.details, -.details * - :font - :weight normal - -.time, -.via - :color #aaa - a - :color $text-grey - :text - :decoration none - :border none - -#user_name - :margin - :bottom 20px - - img - :margin - :right 10px - :display inline-block - :float left - :height 40px - - h1 - :margin - :bottom 7px - :line-height 18px - a - :color #000 - - span - :size small - :font - :weight normal - :color $text-grey - #latest_message_time - :font-style italic - ul - :display inline - :margin 0 - :padding 0 - - > li - :display inline - :margin - :right 1em - -.stream.show - &:hover - > li - :background none - :border none - -.submit_button - input - :float right - -#photo_container - :text - :align center - -#show_photo - :z-index 11 - :position relative - :display inline-block - :max-width 100% - - img - :max-width 100% - - #photo_spinner - :z-index 1 - :position absolute - :height 100px - :width 100px - - #caption - :min-height 20px - :padding 0 10px - :font - :size 16px - :color #333 - -input:not([type='submit']):not([type='reset']):not([type='hidden']):not(.as-input), -textarea - @include border-radius(2px) - :background-color #fff - :color #000 - :margin-top 1px - :font - :family "Arial", "Helvetica", sans-serif - :size 14px - - :padding 0.3em - - :display block - :border 1px solid #ccc - :height auto - -input[type='checkbox'] - :width auto !important - -form p - :position relative - :padding 0 - :margin 0 - -form#update_profile_form p.checkbox_select - label - :top 0 - -form p.checkbox_select - label - :left 25px - :top 3px - :position absolute - :font-size 1em - img - :position relative - :top 6px - -@mixin placeholder_styles - :color $text-grey - :text-shadow 0 1px 1px #eee - :font-weight normal - -.placeholder - @include placeholder_styles - -/* those can't be combined, see: http://stackoverflow.com/questions/2610497 */ -*::-webkit-input-placeholder - @include placeholder_styles - -*::-moz-placeholder - @include placeholder_styles - -.field_with_submit - input[type='text'] - :width 82% - :display inline - -.dim - @include opacity(0.3) - -img.thumb_small - :max-height 50px - :max-width 50px -img.thumb_medium - :max-height 100px - :max-width 100px -img.thumb_large - :max-height 300px - :max-width 300px -img.scaled_full - :max-height 700px - :max-width 700px - -#thumbnails - a - :display inline-block - :height 140px - :min-height 100px - :margin - :bottom 5px - :right 2px - - img - :height 140px - -ul#settings_nav - :display inline - :padding 0 - :font - :size large - :position absolute - :left 198px - :top 5px - - > li - :display inline - :margin - :right 1em - :font - :weight 700 - - a - :padding 2px - :font - :weight normal - -.settings_pane - :display none - -#account_data - a - :line-height 30px - -.contact_pictures.horizontal - img - :margin-right -5px - -#thumbnails - :line-height 14px - -.dull - :color #aaa - :text-align center - :font - :style italic - - a - :color #69AEDD - -h1,h2,h3,h4 - .description - :font - :size 70% - :weight 100 - :color #aaa - :margin - :top 0.5em - -h2,h3,h4 - .description - :font - :size 80% - :weight 200 - -input[type="search"] - :-webkit-appearance textfield - :-moz-appearance textfield - -#photo_edit_options - :display none - -#photodropzone - :padding 0px - :margin 0px - -#section_header - :width 100% - :border - :bottom 2px solid #777 - :position relative - - :margin - :bottom 2em - :padding - :bottom 0.4em - - h2 - :display inline - - .right - :margin - :top 10px - - h4 - :display inline - :margin - :left 1em - -.photo_options - :color $text-grey - :text - :align center - -.inline - :display inline - -.floating - @include box-shadow(0,1px,3px,#333) - - :position relative - :padding 12px - :margin - :bottom 2em - :background - :color rgb(255,255,255) - - :border - :bottom 1px solid #ccc - :top 1px solid #fff - - .submit_block - :position absolute - :bottom 13px - :right 12px - - form - :display relative - -#user_photo_uploader - .avatar - @include border-radius(5px) - - :height 100px - :width 100px - -h3 span.current_gs_step - :color #22C910 - -ul#request_result - :padding 0 - :margin 0 - li - :margin - :bottom 25px - input.add - :color green - .stream_element - .content - :display inline - :position relative - :bottom 2.5em - :padding 0 - -#signup_field - :margin - :top -200px - :height 46px - :padding 0 - :width 400px - :display inline - - div - :display inline - - #mce-responses - :margin - :top 12px - :font - :size 12px - :display block - :color $text-grey - :text-shadow 0 1px 0 #fff - - #mce-error-response - :color red - - #mce-success-response - :color green - - input[type='text'] - :top -1px - :margin 0 - :right -3px - :width 300px - - - :border-radius 5px 0 0 5px - :-webkit-border-radius 5px 0 0 5px - :-moz-border-radius 5px 0 0 5px - - :position relative - :display inline - :padding 12px - :font - :size 18px - - #big_action_button, input[type='submit'] - @include linear-gradient(rgb(65,182,250),rgb(0,123,194)) - - :height 47px - :margin 0 - :background - :color $blue - - :-webkit-border-radius 0 5px 5px 0 - :-moz-border-radius 0 5px 5px 0 - :border-radius 0 5px 5px 0 - :border 1px solid #CCC - - :padding 12px - :font - :size 18px - :weight bold - :color #eee - :text-shadow 0 1px 0 #333 - - :text - :align center - - &:hover - @include linear-gradient(rgb(0,136,209),rgb(113,204,255)) - -#diaspora_description - :background - :image image-url('branding/ball.png') - :repeat no-repeat - :position top center - - :padding - :top 250px - :margin - :top -200px - - - :font - :size 3.3em - :weight bold - :text-shadow 0 1px 3px #999 - - p - @include box-shadow(0,1px,3px,#ccc) - :padding 12px - :background - :color #fff - -#login_field - :text - :align left - :font - :style italic - :margin - :top 14px - :left 540px - :color $text-grey - - -ul#press_logos - :margin 0 - :top 100px - :padding 0 - > li - :display inline - :margin - :right 30px - - img - :height 40px - - &:last-child - :margin - :right 0 - -#landing_content - :margin - :top 100px - :text - :align center - -#why - :margin - :bottom 48px - - h2 - :text-shadow 0 1px #fff - :border - :bottom 3px solid #eee - -#signup - :margin - :bottom 48px - -#already_invited_pane - h4 - :color $text-dark-grey - :color $text-dark-grey - -#search_title - :font - :weight 200 - - .term - :font - :weight bold - -.aspects - :position relative - :margin - :top 1em - - .right - :right 12px - - .contact_list - :height auto - :max-height auto - :width 500px - -.aspects .aspect_badge - :font - :size 1em - -.share_with - :min-width 430px - - .avatar - :width 50px - :height 50px - :float left - - h4,p - :padding - :left 64px - - p - :color #eee - -#aspects_list - :height auto - -.show_comments - :border - :top 1px solid $border-grey - :margin - :top 5px - -.show_comments, -.likes_container - a - :color $text-grey - -.likes - .icons-heart - :height 12px - :width 13px - :display inline-block - :vertical-align top - :margin-top 3px - :margin-right 5px - - .bd - :display inline-block - - .expand_likes - :vertical-align text-bottom - -.mark_all_read - :position relative - :top 10px - -#inner_account_delete - :width 810px - -.icons-monotone_email_letter_round - :height 128px - :width 128px - -#email_invitation - input - :width 100% - textarea - :width 100% - -.share_with - .add_aspect - @include border-radius(5px) - - :margin - :top 0.5em - :background - :color #ddd - p - :padding - :left 1em - input[type='text'] - :width 95% - - &.checkbox_select - label - :padding - :left 15px - :top 0 - :height 2em - .right - :z-index 5 - :top 34px - :right 1em - - .done - :padding 1em - :bottom 2em - .right - :right 1em - -.invite_friends - :padding 1em - :background - :color $background-grey - :border 1px solid #ccc - -#remember_me - input[type='checkbox'] - :display inline - :height auto !important - :top 2px !important - label - :font-size inherit !important - :position static - -.public_icon, .service_icon - :cursor pointer - -#contact_visibility_padlock:hover - @include opacity(0.7) - -.side_stream - .stream_element - :padding 10px 0 - .avatar - :float left - -.diaspora_handle - :font - :size 12px - :weight normal - :color #555 - -.add_tags - :font - :weight normal - :size 11px - -.hover_edit - :display none - :font - :weight normal - :size 11px - :margin - :left 5px - -.description:hover - .hover_edit - :display inline - -.date - :background - :color #e6e6e6 - :border-radius 8px - :padding 5px - :color $text-grey - - :text-align center - .day - :font-size 50px - :font-weight 200 - :margin-bottom -15px - :margin-top -10px - - .month - :font-size 14px - -.subtle - :color $text-grey - :font - :style italic - -.button.sign_up - @include linear-gradient(#D9FFA9,#B9E68A) - :text-shadow none - :color #333 - - &:hover - @include linear-gradient(darken(#D9FFA9,10%),darken(#B9E68A,10%)) - - &:active - @include linear-gradient(darken(#D9FFA9,20%),darken(#B9E68A,20%)) - -#client-application-image - :max-width 100% - -#service_stream - :margin 0 - :padding 0 - -#authorize - :text-align center - -#application-description - :display inline-block - :width 300px - :padding-bottom 20px - -ul#requested-scopes - :vertical-align middle - li - :display inline-block - :padding 5px - - img - :height 30px - :width 30px - - .scope-description - :display none - -.item_count - :min-width 16px - :line-height 16px - :text-align center - :float right - @include border-radius(4px) - :margin-top 1px - :color $text-grey - :background - :color $background-grey - :display inline-block - :font - :size 11px - :weight 700 - -ul.left_nav - :margin 0 - :bottom 15px - :padding 0 - - &.sub - :padding-left 6px - - a.community_aspect_selector - :width 152px - :vertical-align middle - :display inline-block - :line-height 25px - :text - :decoration none - a - :font-weight bold - :color $link-grey - :text - :decoration none - - li - :position relative - :width 100% - - li.active - > a.home_selector:not(.sub_selected) - :font - :weight 700 - - > a:not(.sub_selected) - :color #333 - .item_count - :color $text-dark-grey - - a.aspect_selector, - a.home_selector, - a.tag_selector, - a.element_selector - &:active - :cursor -webkit-grabbing - :cursor -moz-grabbing - :cursor grabbing - - a.home_selector, - a.tag_selector, - a.element_selector, - .root_element - :display block - :width 100% - :padding 3px 7px - - a.home_selector, - li.aspect_element, - a.element_selector - &:hover - @include border-radius(2px) - :background - :color lighten($blue,45%) - :text - :decoration none - - .unfollow_icon - :margin-right 10px - :margin-top 4px - @include transition(opacity) - @include opacity(0.3) - :position absolute - :display none - :padding 0 5px - &:hover - @include opacity(1) - - .edit - :margin-right 10px - :margin-top 4px - :width 12px - :height 12px - :margin-top 6px - @include transition(opacity) - @include opacity(0.3) - :float right - :display none - &:hover - @include opacity(1) - - ul.sub_nav - :padding - :left 25px - :margin 0 - li - :width 204px - -.section - .left_nav - a.aspect_selector, - a.home_selector - :width 150px - ul.sub_nav - :width 140px - &:hover - :width auto - - a.aspect_selector - :width 112px - :vertical-align middle - :display inline-block - :line-height 25px - :text - :decoration none - - a.tag_selector - :width 117px - :overflow hidden - :position relative - :display inline-block - &:after - :display inline-block - :content "" - :width 80px - :height 25px - :position absolute - :top 0px - :left 100px - &:hover:after - :background none - - li - :height 25px - .icons-check_yes_ok - :height 18px - :width 18px - :display inline-block - :margin-left 3px - :vertical-align middle - - .icons-deletelabel - :height 14px - :width 14px - :margin-top 4px - - li.unfollow, - li.sub_nav_item - :width 172px - - li.unfollow:hover, - li.sub_nav_item:hover, - li.hover - @include border-radius(2px) - :background - :color lighten($blue,45%) - .edit, - .unfollow_icon - :z-index 1 - :display inline-block - .icons-monotone_close_exit_delete - :height 16px - :width 16px - - .user_card - :margin-left 8px - -.unread-setter - :display none - -.stream_container - :min-height 500px - - h3 - :margin - :bottom 0 - :border - :left 1px solid $border-grey - :padding - :left 10px - :top 20px - :margin - :left -10px - :top -20px - -#aspect_stream_header - :padding 0 12px - -.new_aspect, -a.toggle_selector - :outline none - :color $text-grey - :font - :style italic - - &:hover - :color $link-grey - -#community_spotlight - .avatar - :height 140px - :width 140px - -.user_card - @include border-radius(3px) - @include box-shadow(0,1px,5px,#ccc) - :padding 10px - :bottom 30px - :margin - :bottom 15px - :right 10px - - :position relative - - :min-height 220px - - :vertical-align top - - :border 1px solid #ccc - :display inline-block - - :width 140px - - .tags - :color $text-grey - - h4 - :margin - :bottom 0 - :padding - :bottom 2px - - .dropdown - :width 100% - -.add_user_to_aspect - :bottom 12px - :right 5px - :position absolute - -#right_service_icons - :text-align center - :padding 10px - :bottom 0 - - .social_media_logos-facebook-24x24, - .social_media_logos-twitter-24x24, - .social_media_logos-tumblr-24x24, - .social_media_logos-wordpress-24x24, - .social_media_logos-email-24x24, - .social_media_logos-feed-24x24, - .social_media_logos-website-24x24 - :height 24px - :width 24px - - a - :display inline-block - -.action_item - :padding-right 5px - -.accept_invitation_form, -.sign_up_form - :min-height 350px - :font-size 16px - input[type='text'], - input[type='password'], - input[type='email'] - :font-size 16px !important - :width 378px !important - - .diaspora_id_text - :font-size 12px - :text-align right - :color $text-grey - :margin - :top -8px - :padding 0 - - .submit_field - :text-align right - -.accept_invitation_text - :font - :weight lighter - -.red - :color $red - -.green - :color green -.resend - :color black - &:hover - :text-decoration none - :color black - &:hover - :text-decoration none - -#grey_header - @include box-shadow(0,1px,1px,#eee) - :background - :color #fafafa - :width 100% - :position absolute - :left 0 - :top 0 - :padding - :top 80px - :bottom 20px - :text - :align center - :border - :bottom 1px solid $border-grey - -.mobile_row - :margin - :bottom 50px - -.field_with_errors - :position relative - - input - @include box-shadow(0,0,8px,lighten(#D00,30%)) - :border 1px solid #D00 !important - -.field_with_errors .message - :color #D00 - :font-size 12px - :position absolute - :top 4px - :right 10px - :left auto - -.new_user_form fieldset, .accept_invitation_form fieldset - @include border-radius(3px) - - :background - :color #fff - :color rgba(255,255,255,0.95) - - .submit_field - :margin - :top 15px - span.host_uri - :float right - :margin-top -28px - :color $text-grey - :padding-right 9px - -.center - :text-align center - -.nostrap, -.nostrap:focus - :-webkit-box-shadow none - :-moz-box-shadow none - :box-shadow none - -#hello-there - p - :font-size medium - h1 - :margin 0px - h2 - :margin - :top 80px - :bottom 12px - h3 - :font - :size large - :weight 200 - :margin 0px - form, p - :margin-left 30px - input - :margin-bottom 15px - .hero-unit - :margin 20px 42px - :padding 40px 80px - .awesome - :text-align center - :margin-top 60px - .creation - :font-size 16px - -#profile_photo_upload - #fileInfo - :margin-top 12px - :text-align left - -#welcome-to-diaspora - :-webkit-box-shadow inset 0 -2px 10px rgba(0,0,0,0.35) - :-moz-box-shadow inset 0 -2px 10px rgba(0,0,0,0.35) - - :position absolute - :width 100% - :left 0 - :top 0 - :padding - :top 50px - :bottom 10px - h1,h3 - :color #fff - :text-overflow ellipsis - :white-space nowrap - :background orange - &:hover - #gs-skip-x - @include opacity(0.4) - @include transition(opacity, 0.25s) - - &:hover - @include opacity(1) - -#gs-shim - :position absolute - :top 380px - -#gs-skip-x - @include opacity(0) - @include transition(opacity, 0.25s) - - img - :position relative - :right 4px - :height 20px - - -.avatar.micro - :height 20px - :width 20px - -#gs-name-form-spinner - :position absolute - :top 24px - :right -33px - -.left_nav - #new_tag_following - :width 137px - :margin - :left 24px - - input[type='text'] - :width 137px - :font - :size 13px - - #tag_following_submit - &.hidden - :display none - -.nsfw-shield - @include border-radius(3px) - :background-color $background-grey - :width 90% - :padding 5px 10px - :border 1px solid $border-grey - :color $text-grey - -#back-to-top - :display block - :color white - :position fixed - :z-index 49 - :right 20px - :bottom 20px - :opacity 0 - :font-size 3em - :padding 0 11px 0 12px - :border-radius 10px - :background-color #aaa - &:hover - :opacity 0.85 !important - &.visible - :opacity 0.5 - -.float-right - :float right - :margin-top 5px - -.nsfw_off - :font-size smaller - :color $text-grey - a - :color $text-dark-grey - -#fileInfo - :font-size small - :text-align right - :margin 5px 2px - -.post_preview_button - :padding 3px 9px 4px - -.post_preview - :padding - :top 5px - :border - :bottom 3px solid #3f8fba !important - :background - :color #e8f7ff - -#location - :border 1px solid $border-dark-grey - :height 20px - #location_address - :border none - :color #aaa - :height 10px - :width 430px - :float left - a#hide_location - :position absolute - :right 22px - :filter alpha(opacity=30) - :-moz-opacity 0.3 - :-khtml-opacity 0.3 - :opacity 0.3 - :z-index 5 - a#hide_location:hover - @include opacity(0) - :-khtml-opacity 1 - :opacity 1 - :cursor pointer diff --git a/app/assets/stylesheets/new-templates.css.scss b/app/assets/stylesheets/application.scss similarity index 55% rename from app/assets/stylesheets/new-templates.css.scss rename to app/assets/stylesheets/application.scss index 0dd65fabd..4d3bd3df3 100644 --- a/app/assets/stylesheets/new-templates.css.scss +++ b/app/assets/stylesheets/application.scss @@ -1,15 +1,27 @@ +@import 'bootstrap-fix'; + +@import 'perfect-scrollbar'; + @import "colors"; +@import 'sizes'; @import 'mixins'; -@import 'new_styles/new_mixins'; -@import 'new_styles/variables'; /* core */ +@import 'media-box'; +@import 'autocomplete'; +@import 'entypo-fonts'; +@import 'entypo'; +@import 'mentions'; @import 'flash_messages'; @import 'sprites'; - +@import 'hovercard'; @import 'new_styles/base'; -@import 'new_styles/viewer_nav'; -@import 'buttons'; +@import 'new_styles/buttons'; +@import 'new_styles/interactions'; +@import 'new_styles/spinner'; +@import 'lightbox'; +@import 'vendor/fileuploader'; +@import 'vendor/autoSuggest'; /* font overrides */ @import 'new_styles/typography'; @@ -17,10 +29,11 @@ /* login */ @import 'new_styles/login'; @import 'new_styles/registration'; -@import 'new_styles/landing'; - @import 'new_styles/forms'; +/* navs */ +@import 'new_styles/navs'; + /* profile and settings pages */ @import 'new_styles/settings'; @@ -34,6 +47,7 @@ /* conversations */ @import 'conversations'; +@import 'vendor/facebox'; @import 'facebox'; /* publisher */ @@ -55,11 +69,29 @@ /* people */ @import 'people'; @import 'invitations'; +@import 'profile'; /* stream */ @import 'tag'; @import 'stream-faces'; +@import 'stream'; +@import 'stream_element'; +@import 'comments'; +@import 'diaspora_jsxc'; +@import 'chat'; +@import 'markdown-content'; +@import 'oembed'; +@import 'post-content'; + +/* right bar */ +@import 'sidebar'; /* contacts */ @import 'contacts'; @import 'leftnavbar'; + +/* code */ +@import 'new_styles/code'; + +/* statistics */ +@import 'new_styles/statistics'; diff --git a/app/assets/stylesheets/aspects.css.scss b/app/assets/stylesheets/aspects.css.scss deleted file mode 100644 index 8b2730d08..000000000 --- a/app/assets/stylesheets/aspects.css.scss +++ /dev/null @@ -1,267 +0,0 @@ -.aspect_dropdown { - - li { - .status_indicator { - width: 19px; - height: 14px; - display: inline-block; - } - .icon-ok, .icon-refresh { - padding-right: 5px; - display: none; - } - &.selected { - .icon-ok { display: inline-block;} - .icon-refresh { display: none;} - } - &.loading { - .icon-refresh { display: inline-block;} - .icon-ok { display: none;} - } - a { - .text { - color: #333333; - } - &:hover { - background: $background-grey; - } - cursor: pointer; - padding-left: 10px; - } - } -} - -.modify_aspect { - background: url("icons/pencil.png") no-repeat; - width: 12px; - height: 12px; - display: inline-block; -} - - - -/* -- Used in contacts/index.html.haml -- */ -#aspect_controls { - @include border-radius(2px); - background-color: #fafafa; - border: 1px solid #ccc; - padding: 10px; - min-height: 23px; - - .button, .button_to { - margin-right: 5px; - } - - .button_to { display: inline-block; } - - .contact_visibility_padlock, - .modify_aspect, - .icons-mail, - .icons-monotone_close_exit_delete { - margin-left: 4px; - margin-bottom: -2px; - display: inline-block; - } - - .icons-mail { - width: 16px; - height: 13px; - margin-bottom: -1px; - } -} - -#aspect_nav { - list-style-type: none; - - .icons-check_yes_ok { - height:18px; - width:18px; - background: url('icons/check_yes_ok.png') no-repeat; - float: left; - visibility: hidden; - - &.selected { - visibility: visible; - } - - &.selected + a { - color: #333333; - } - } -} - -.contact_visibility_padlock { - height: 16px; - width: 16px; - /* -- To remove when the facebox will be deleted -- */ - display: inline-block; - margin-left: 4px; - margin-bottom: -2px; -} - -/* -- Used in aspects/edit.haml and in contacts/sharing.haml -- */ -#aspect_edit_controls { margin-top: 8px; } -#aspect_edit_pane { - width: 772px; - - .contact_list_controls { - height: 30px; - margin-bottom: 5px; - } - - #aspect_name_title { - margin: 0px 0px 5px 0px; - } - - #contact_list_search { - width: 200px; - margin-bottom: 2px; - margin-top: 0px; - float: right; - } - - .contact_list, - .aspect_list { - @include border-radius(3px); - height: 300px; - max-height: 300px; - overflow-y: auto; - overflow-x: hidden; - border: 1px solid #bbb; - background-color: rgb(252,252,252); - - .avatar { - float: left; - height: 50px; - width: 50px; - margin-right: 10px !important; - } - - .button.share { - padding-right: 20px; - .right { - right: 8px; - top: 3px; - } - } - - .icons-monotone_plus_add_round, - .icons-monotone_check_yes { - height: 20px; - width: 20px; - } - - & > .contacts { - margin: 0px; - padding: 5px; - padding-right: 0px; - - & > .contact { - @include border-radius(3px); - @include box-shadow(0, 1px, 5px, #ccc); - position: relative; - display: inline-block; - float: left; - height: 50px; - width: 170px; - overflow-x: hidden; - overflow-y: hidden; - margin-bottom: 5px; - margin-right: 5px; - padding: 5px; - background-color: #fff; - border: 1px solid $border-dark-grey; - - &.hidden { display: none; } - &.remote_friend { width: 285px; } - - & > .name { - font-size: 16px; - margin: 0px 0px 5px 0px; - white-space: nowrap; - } - - a.btn { - @include box-shadow(0,0,0); - border-bottom: none; - min-width: 90px; - float: right; - padding: 2px 0px; - margin-top: 5px; - margin-right: -5px; - - &.added { - @include linear-gradient(rgb(158,255,153), rgb(92,199,86)); - background-color: rgb(92,199,86); - } - - &.added.remove { - @include linear-gradient(rgb(255,153,153), rgb(199,86,86)); - - &:active { @include linear-gradient(rgb(199,119,119), rgb(130,55,55)); } - } - } - } - } - } - - .aspect_list { - height: 300px; - max-height: 300px; - - .name { left: 1em; } - - ul > li { - padding: 1em; - height: 1em; - - .right { - top: 2px; - right: 1em; - } - } - } - - .person_tiles .tile { - @include border-radius(2px); - padding: 6px; - padding-left: 65px; - margin: 3px; - margin-left: 0px; - display: inline-block; - width: 126px; - height: 50px; - border: 1px solid #eee; - position: relative; - - img { - position: absolute; - left: 6px; - } - } - - &.larger { width: 650px; } - - .bottom_submit_section { - margin-top: 12px; - - form { - display: inline-block; - margin: 0px; - } - - .creation { - float: right; - } - } -} - -#new_aspect { - #aspect_contacts_visible.checkbox { - margin: 0px; - } - - label[for="aspect_contacts_visible"] { - display: inline; - } -} diff --git a/app/assets/stylesheets/aspects.scss b/app/assets/stylesheets/aspects.scss new file mode 100644 index 000000000..1aac43f70 --- /dev/null +++ b/app/assets/stylesheets/aspects.scss @@ -0,0 +1,47 @@ +.aspect_dropdown { + + li { + .status_indicator { + width: 19px; + height: 14px; + display: inline-block; + } + .icon-ok, .icon-refresh { + padding-right: 5px; + display: none; + } + &.selected { + .icon-ok { display: inline-block;} + .icon-refresh { display: none;} + } + &.loading { + .icon-refresh { display: inline-block;} + .icon-ok { display: none;} + } + a { + .text { + color: #333333; + } + &:hover { + background: $background-grey; + } + cursor: pointer; + padding-left: 10px; + } + } +} + +#new_aspect { + .checkbox { + margin: 0px; + } + + label[for="aspect_contacts_visible"], + label[for="aspect_chat_enabled"] { + display: inline; + } + + .bottom_submit_section { + padding-top: 20px; + } +} diff --git a/app/assets/stylesheets/autocomplete.css.scss b/app/assets/stylesheets/autocomplete.scss similarity index 78% rename from app/assets/stylesheets/autocomplete.css.scss rename to app/assets/stylesheets/autocomplete.scss index bed1a77b4..c23205248 100644 --- a/app/assets/stylesheets/autocomplete.css.scss +++ b/app/assets/stylesheets/autocomplete.scss @@ -3,15 +3,10 @@ background-color: transparent; overflow: hidden; z-index: 99999; - min-width: 247px !important; + min-width: 300px !important; width: 100%; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; border-radius: 3px; - - -webkit-box-shadow: 0 1px 3px #999; - -moz-box-shadow: 0 1px 3px #999; box-shadow: 0 1px 3px #999; } @@ -42,6 +37,8 @@ // in relative units scroll will be broken in firefox //:line-height 16px overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .ac_loading { @@ -71,4 +68,20 @@ left: 5px; top: 5px; } + + .search_handle { + font-size: 0.8em; + color: #999; + margin-top: -3px; + } + + .ac_over .search_handle{ + color: #fff; + } + + .ac_over .search_handle, .search_handle { + display: block; + overflow: hidden; + text-overflow: ellipsis; + } } diff --git a/app/assets/stylesheets/blueprint.css b/app/assets/stylesheets/blueprint.css deleted file mode 100644 index 3f09fb9c3..000000000 --- a/app/assets/stylesheets/blueprint.css +++ /dev/null @@ -1,3 +0,0 @@ -/* -//= require vendor/blueprint/screen -*/ \ No newline at end of file diff --git a/app/assets/stylesheets/bookmarklet.css.scss b/app/assets/stylesheets/bookmarklet.css.scss deleted file mode 100644 index 773eabfd1..000000000 --- a/app/assets/stylesheets/bookmarklet.css.scss +++ /dev/null @@ -1 +0,0 @@ -#bookmarklet { padding:10px 10px 30px 10px; margin-top: 0; } diff --git a/app/assets/stylesheets/bookmarklet.scss b/app/assets/stylesheets/bookmarklet.scss new file mode 100644 index 000000000..42c2dadbd --- /dev/null +++ b/app/assets/stylesheets/bookmarklet.scss @@ -0,0 +1,2 @@ +#bookmarklet { padding:10px 10px 30px 10px; margin-top: 0; } +body.page-status_messages.action-bookmarklet { margin-top: 0px } \ No newline at end of file diff --git a/app/assets/stylesheets/bootstrap-complete.css.scss b/app/assets/stylesheets/bootstrap-complete.scss similarity index 100% rename from app/assets/stylesheets/bootstrap-complete.css.scss rename to app/assets/stylesheets/bootstrap-complete.scss diff --git a/app/assets/stylesheets/bootstrap-fix.scss b/app/assets/stylesheets/bootstrap-fix.scss new file mode 100644 index 000000000..47b6c0c4d --- /dev/null +++ b/app/assets/stylesheets/bootstrap-fix.scss @@ -0,0 +1,24 @@ +// A temporary fix for broken classes in bootstrap 2. +// Can probably be removed when migration of bootstrap 3 is done. + +input::placeholder, +textarea::placeholder { + color: #999999; +} +input::input-placeholder, +textarea::input-placeholder { + color: #999999; +} + + +// A temporary fix for mention modal #5329 + +#new_status_message_pane .modal { + position: absolute; + max-height: none; +} + +#new_status_message_pane .modal-body{ + overflow-y: visible; + max-height: none; +} diff --git a/app/assets/stylesheets/bootstrap-headerfix.sass b/app/assets/stylesheets/bootstrap-headerfix.sass deleted file mode 100644 index d89c51a99..000000000 --- a/app/assets/stylesheets/bootstrap-headerfix.sass +++ /dev/null @@ -1,40 +0,0 @@ -// A temporary fix for displaying the header in the single post view. -// Should be removed once everything uses Bootstrap. - -header - .container - width: 950px - .header-nav - span - a - font-weight: bold - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif - font-size: 13px - li - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif - font-size: 13px - - #conversations_badge, #notification_badge - background: none - - - #notification_badge.active - @include border-radius(0) - - #global_search - form - input - height: 15px - color: black - - #notification_dropdown - h4 - margin: 0 - .right - a - font-weight: bold - .notification_element - font-size: 13px - .timeago - border: medium none - cursor: text diff --git a/app/assets/stylesheets/bootstrap-headerfix.scss b/app/assets/stylesheets/bootstrap-headerfix.scss new file mode 100644 index 000000000..53f4919dc --- /dev/null +++ b/app/assets/stylesheets/bootstrap-headerfix.scss @@ -0,0 +1,52 @@ +// A temporary fix for displaying the header in the single post view. +// Should be removed once everything uses Bootstrap. + +header { + .container { + width: 950px; + .header-nav { + span { + a { + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + } + } + } + li { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + } + } + #conversations_badge, #notification_badge { + background: none; + } + #notification_badge.active { + border-radius: 0; + } + #global_search { + form { + input { + height: 15px; + color: black; + } + } + } + #notification_dropdown { + h4 { + margin: 0; + } + .right { + a { + font-weight: bold; + } + } + .notification_element { + font-size: 13px; + .timeago { + border: medium none; + cursor: text; + } + } + } +} diff --git a/app/assets/stylesheets/chat.scss b/app/assets/stylesheets/chat.scss new file mode 100644 index 000000000..3be259038 --- /dev/null +++ b/app/assets/stylesheets/chat.scss @@ -0,0 +1,7 @@ +body > .container-fluid.chat-roster-shown { + padding-right: 224px; + #back-to-top { right: 244px; } +} +body > .container-fluid.chat-roster-hidden { + #back-to-top { right: 54px; } +} diff --git a/app/assets/stylesheets/colors.css.scss b/app/assets/stylesheets/colors.scss similarity index 89% rename from app/assets/stylesheets/colors.css.scss rename to app/assets/stylesheets/colors.scss index 94b8c4b40..fdd29ec3b 100644 --- a/app/assets/stylesheets/colors.css.scss +++ b/app/assets/stylesheets/colors.scss @@ -10,15 +10,18 @@ $light-grey: #DDDDDD; $border-grey: #DDDDDD; $border-dark-grey: #999999; +$link-blue : rgb(42,156,235); $link-grey: #777777; $link-disabled-grey: #999999; $text-grey: #999999; $text-dark-grey: #666666; +$text: #333333; $white: white; $black: black; $green: #8EDE3D; +$light-green: lighten($green,20%); $red: #A80000; $blue: #3F8FBA; $dark-blue: darken(#0984C8,10%); diff --git a/app/assets/stylesheets/comments.scss b/app/assets/stylesheets/comments.scss new file mode 100644 index 000000000..d21f77fde --- /dev/null +++ b/app/assets/stylesheets/comments.scss @@ -0,0 +1,48 @@ +.comment_stream { + .show_comments { + margin-top: 5px; + border-top: 1px solid $border-grey; + a { + color: $text-grey; + font-size: 13px; + } + .media { margin-top: 10px; } + } + .comments > .comment, .comment.new_comment_form_wrapper { + .avatar { + margin-top: 5px; + height: 30px; + width: 30px; + } + margin: 0; + border-top: 1px dotted $border-grey; + padding: 10px 0; + + .info { + margin-top: 5px; + font-size: 11px; + line-height: 11px; + } + + >.highlighted { + border-left: 3px solid $blue; + padding-left: 3px; + } + } + .submit_button { + input { + float: right; + } + padding-left: 12px; + width: 95%; + display: none; + } + .comment_box { + width: 95%; + height: 30px; + } + textarea.comment_box:focus, textarea.comment_box:valid, textarea.comment_box:active { + border-color: $border-dark-grey; + & + .submit_button { display: block; } + } +} diff --git a/app/assets/stylesheets/contacts.css.scss b/app/assets/stylesheets/contacts.css.scss deleted file mode 100644 index d2f786321..000000000 --- a/app/assets/stylesheets/contacts.css.scss +++ /dev/null @@ -1,126 +0,0 @@ -#section_header { - h3 { - border-bottom: 1px solid $border-grey; - } -} - -#people_stream { - .bd { - font-size: 13px; - line-height: 19.5px; - } - - .btn-group { - margin-top: 5px; - - .caret { - margin-top: 8px; - } - - .text { - text-shadow: none; - } - } - - .info { - font-size: 11px; - line-height: 16.5px; - } - - .stream_element { - border-bottom: 1px solid $border-grey; - - .icons-monotone_close_exit_delete { - margin-top: 8px; - } - - .media { - margin: 10px; - } - } -} -#people_stream.contacts { - .stream_element { - padding: 10px; - min-height: 30px; - - .media { overflow: visible; } - - .float-right { - top: 16px; - - a { - @include opacity(1); - - &:hover { - @include opacity(0.6); - } - } - } - - .info { margin-top: -2px; } - } - - .avatar { - height: 30px; - width: 30px; - } - - .icons-monotone_close_exit_delete { - height: 14px; - width: 14px; - } - - .no_contacts { - text-align: center; - margin-top: 50px; - } -} - -#community_spotlight { - .avatar { - width: 140px; - height: 140px; - } - - .user_card { - @include border-radius(3px); - @include box-shadow(0,1px,5px,#ccc); - - border: 1px solid #ccc; - display: inline-block; - margin-bottom: 15px; - margin-right: 10px; - min-height: 220px; - padding: 10px 10px 30px 10px; - position: relative; - vertical-align: top; - width: 140px; - - h4 { - margin-bottom: 0px; - padding-bottom: 2px; - } - - .add_user_to_aspect { - bottom: 10px; - right: 10px; - position: absolute; - } - - .dropdown { - width: 100%; - } - - .tags { - color: $text-grey; - } - } -} - -#no_contacts { - text-align: center; - padding: 10px; - background-color: #eee; - color: $text-dark-grey; -} diff --git a/app/assets/stylesheets/contacts.scss b/app/assets/stylesheets/contacts.scss new file mode 100644 index 000000000..d43bd6eb7 --- /dev/null +++ b/app/assets/stylesheets/contacts.scss @@ -0,0 +1,72 @@ +#contacts_container { + #people_stream.contacts { + .header { + border-bottom: 1px solid $border-grey; + margin-top: 10px; + min-height: 53px; + #change_aspect_name { cursor: pointer; } + #aspect_name_form { + display: none; + form { margin: 0px; } + input { + margin-bottom: 0px; + margin-top: 10px; + } + .btn { margin-top: 10px; } + } + #contact_list_search { + margin: 6px 30px 0 0; + width: 150px; + &:focus { width: 250px; } + } + #aspect_controls > .contacts_button { + cursor: pointer; + text-decoration: none; + margin-right: 25px; + } + #chat_privilege_toggle > .enabled { + color: #000; + } + .entypo.contacts-header-icon { + font-size: 24.5px; + line-height: 40px; + color: lighten($black,75%); + &:hover { color: $black; } + } + #suggest_member.btn { margin-top: 8px; } + } + + .stream_element { + .contact_remove-from-aspect, .contact_add-to-aspect { + text-decoration: none; + cursor: pointer; + font-size: 20px; + line-height: 50px; + margin: 10px; + color: lighten($black,75%); + &:hover { color: $black; } + } + &.in_aspect { + border-left: 3px solid $green; + background-color: lighten($green,35%); + } + &:not(.in_aspect) { border-left: 3px solid $white; } + } + + .no_contacts { + text-align: center; + margin-top: 50px; + } + .well { margin: 20px 0 10px; } + } +} + +#aspect_nav { + li.aspect > a { padding-left: 30px; } + li.new_aspect > a { padding-left: 30px; } +} + +#no_contacts { + margin-top: 20px; + text-align: center; +} diff --git a/app/assets/stylesheets/conversations.css.scss b/app/assets/stylesheets/conversations.css.scss deleted file mode 100644 index 10e183f87..000000000 --- a/app/assets/stylesheets/conversations.css.scss +++ /dev/null @@ -1,255 +0,0 @@ -.conversations_container { - .stream_element { - border-bottom: 1px solid $border-grey; - &:first-child { - border-top: none; - } - .last_author { - font-size: 12px; - color: $text-dark-grey; - } - a.author{ - font-weight: bold; - unicode-bidi: bidi-override; - } - - .avatar{ - width: 50px; - height: 50px; - } - } - .stream .stream_element { - p { - margin: 0 0 1em 0; - word-wrap: break-word; - &:last-child { margin-bottom: 0; } - } - - .new_message { border-bottom: none; } - .timestamp { font-size: 11px; } - } -} - -#conversation_show { - .conversation_participants { - box-shadow: 0 2px 3px -3px #666; - -webkit-box-shadow: 0 2px 3px -3px #666; - -moz-box-shadow: 0 2px 3px -3px #666; - - background-color: $background-white; - margin-bottom: 5px; - border-bottom: 1px solid $border-grey; - padding: 5px; - line-height: 0px; - - a.close_conversation { - display: block; - margin-top: 10px; - float: right; - - .icons-deletelabel { - height: 14px; - width: 14px; - } - } - - .avatar { - height: 30px; - width: 30px; - } - - .avatars { - text-align: right; - margin-top: 9px; - } - - a img { margin-bottom: 4px; } - - .conversation_controls { - margin-bottom: 10px; - - a { margin-right: 10px; } - } - } - - .conversation_participants a:hover { text-decoration: none; } - - .stream .stream_element { - padding: 10px; - } -} - -.stream_element.conversation { - padding: 8px; - .media { - margin-bottom: 0px; - margin-left: 0px; - } - - &:hover:not(.selected) { - background-color: lighten($blue,5%); - .subject, - .last_author, - .last_message { - color: $white; - } - .timeago { color: $background-grey; } - } - &.selected:hover { background-color: lighten($blue,5%); } - &:hover { cursor: pointer; } - - .avatar { - width: 50px; - height: 50px; - float: left; - } - - .last_author, .last_message { - font-size: 12px; - line-height: 15px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .message_count, .unread_message_count { - margin-left: 3px; - float: right; - font-size: 12px; - font-weight: normal; - } - - .participants_count { - @include opacity(0.5); - &:before { content: '+'; } - float: left; - background-color: #fff; - margin-top: 35px; - margin-left: -50px; - text-align: center; - width: 50px; - height: 15px; - line-height: 15px; - font-size: 13px; - font-weight: bold; - } - - .participants { - display: none; - float: left; - clear: both; - margin-top: 5px; - padding-top: 5px; - height: 25px; - width: 100%; - overflow: hidden; - border-top: 1px dotted $border-grey; - .avatar { - margin: 0 5px 0 0; - height: 25px; - width: 25px; - } - } - - .img { line-height: 15px; } - - .subject { - font-size: 14px; - > * { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - - .timeago { - float: right; - line-height: normal; - font-weight: normal; - color: $blue; - } -} - -.conversation.unread { - background-color: darken($background-white, 5%); -} - -.conversation.selected { - background-color: $blue; - - .subject, - .last_author, - .last_message { - color: $white; - } - .timeago { color: $background-grey; } -} - -#left_pane { - border-right: solid 1px $border-grey; - h3 { - padding-bottom: 0; - } - - #left_pane_header { - padding: 10px; - padding-right: 20px; - border-bottom: 1px solid $border-grey; - } - - #conversation_inbox { - a:hover { - text-decoration: none; - } - } -} - -#no_conversations, -#no_conversation_text { - font-weight: bold; - color: #ccc; - text-align: center; - margin-top: 100px; -} - -#no_conversation_text { - font-size: 20px; -} - -#no_conversation_controls { - text-align: center; - font-size: 12px; -} - -#new_conversation_pane { - ul.as-selections { width: 100% !important; } - input#contact_ids { box-shadow: none; } - textarea { width: 98%; } - - .bottom_submit_section { - text-align: right; - } - - .button.creation { - $button-border-color: #aaa; - @include border-radius(3px); - @include box-shadow(0,1px,1px,#cfcfcf); - @include transition(border); - @include button-gradient($creation-blue); - font-size: 12px; - color: #fff; - padding: 4px 9px; - min-width: 90px; - min-height: 10px; - border: 1px solid darken($button-border-color,20%); - - cursor: pointer; - white-space: nowrap; - - &:hover { - @include button-gradient-hover($creation-blue); - border: 1px solid darken($button-border-color,35%); - text-decoration: none; - } - } -} diff --git a/app/assets/stylesheets/conversations.scss b/app/assets/stylesheets/conversations.scss new file mode 100644 index 000000000..f37a0d3c1 --- /dev/null +++ b/app/assets/stylesheets/conversations.scss @@ -0,0 +1,228 @@ +#conversations_container { + .stream_container { border-left: none; } + + .stream_element { + border-bottom: 1px solid $border-grey; + &:first-child { border-top: none; } + a.author{ + font-weight: bold; + unicode-bidi: bidi-override; + } + + .avatar{ + width: 50px; + height: 50px; + } + + p { + margin: 0 0 1em 0; + &:last-child { margin-bottom: 0; } + } + &.new_message { border-bottom: none; } + .timestamp { font-size: 11px; } + } + + .stream_element.conversation { + padding: 8px; + .media { + margin-bottom: 0px; + margin-left: 0px; + } + + &:hover:not(.selected), &.selected { + .subject, + .last_author, + .last_message { + color: $white; + } + .timeago { color: $background-grey; } + } + + &:hover, &.unread:hover, &.selected:hover { + background-color: lighten($blue,5%); + cursor: pointer; + .participants { + height: 25px; + margin-top: 5px; + padding-top: 5px; + border-color: rgba($border-grey, 1) + } + } + &.unread { background-color: darken($background-white, 5%); } + &.selected { background-color: $blue; } + + .avatar { + width: 50px; + height: 50px; + float: left; + } + + .last_author, .last_message { + font-size: 12px; + line-height: 15px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .last_author { color: $text-dark-grey; } + + .message_count, .unread_message_count { + margin-left: 3px; + float: right; + font-size: 12px; + font-weight: normal; + } + + .participants_count { + &:before { content: '+'; } + background-color: rgba($white, 0.7); + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + float: left; + font-size: 13px; + font-weight: bold; + height: 15px; + line-height: 15px; + margin-left: -50px; + margin-top: 35px; + text-align: center; + width: 50px; + } + + .participants { + float: left; + clear: both; + height: 0; + width: 100%; + overflow: hidden; + border-top: 1px dotted rgba($border-grey, 0); + transition: height ease 300ms; + .avatar { + margin: 0 5px 0 0; + height: 25px; + width: 25px; + } + } + + .img { line-height: 15px; } + + .subject { + font-size: $font-size-text; + > * { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + .timeago { + float: right; + line-height: normal; + font-weight: normal; + color: $blue; + } + } +} + +#conversation_show { + .conversation_participants { + box-shadow: 0 2px 3px -3px #666; + + background-color: $background-white; + margin-bottom: 5px; + border-bottom: 1px solid $border-grey; + padding: 5px; + line-height: 0px; + + .hide_conversation, .delete_conversation { + display: block; + margin-top: 25px; + margin-left: 10px; + } + + .avatar { + height: 30px; + width: 30px; + } + + .avatars { + text-align: right; + margin-top: 9px; + } + + a img { margin-bottom: 4px; } + + .conversation_controls { + margin-bottom: 10px; + + a { margin-right: 10px; } + } + } + + .conversation_participants a:hover { text-decoration: none; } + + .stream .stream_element { + padding: 10px; + } +} + +#left_pane { + border-right: solid 1px $border-grey; + h3 { + padding-bottom: 0; + } + + #left_pane_header { + padding: 10px; + padding-right: 20px; + border-bottom: 1px solid $border-grey; + } + + #conversation_inbox { + a:hover { + text-decoration: none; + } + .pagination { + margin-left: auto; + margin-right: auto; + text-align: center; + + .disabled a { + background: $background-grey; + } + } + } +} + +@media (max-width: 1354px) { + #left_pane #conversation_inbox .pagination ul > li > a { + padding: 4px 7px; + } +} + +#conversation_new { + label { font-weight: bold; } +} + +#no_conversations, +#no_conversation_text { + font-weight: bold; + color: #ccc; + text-align: center; + margin-top: 100px; +} + +#no_conversation_text { + font-size: 20px; +} + +#no_conversation_controls { + text-align: center; + font-size: 12px; +} + +#new_conversation_pane { + ul.as-selections { width: 100% !important; } + input#contact_ids { box-shadow: none; } + label { font-weight: bold; } +} diff --git a/app/assets/stylesheets/default.css b/app/assets/stylesheets/default.css deleted file mode 100644 index d981555da..000000000 --- a/app/assets/stylesheets/default.css +++ /dev/null @@ -1,15 +0,0 @@ -/* -*= require media-box -*= require lightbox -*= require autocomplete -*= require mentions -*= require tags -*= require hovercard - -*= require vendor/interim-bootstrap -*= require vendor/facebox -*= require vendor/fileuploader -*= require vendor/autoSuggest -*= require entypo-fonts -*= require entypo -*/ diff --git a/app/assets/stylesheets/entypo.css.scss b/app/assets/stylesheets/entypo.scss similarity index 100% rename from app/assets/stylesheets/entypo.css.scss rename to app/assets/stylesheets/entypo.scss diff --git a/app/assets/stylesheets/error_pages.css.scss b/app/assets/stylesheets/error_pages.css.scss deleted file mode 100644 index c2574d770..000000000 --- a/app/assets/stylesheets/error_pages.css.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import 'colors'; -@import 'mixins'; - -#big-number { - font-family: Roboto-BoldCondensed, Helvetica, Arial, sans-serif; - font-size: 250px; - line-height: 1em; - text-align: center; - padding-top: 100px; - text-shadow: 0 2px 0 #fff, 0 -1px 0 #999; - color: #ddd; -} -.transparent { - @include opacity(0.8); -} -#content { - font-family: Roboto, Helvetica, Arial, sans-serif; - text-align: center; - text-shadow: 0 1px 0 #fff; - font-size: 1.25em; - line-height: 1.5em; - color: $text-dark-grey; - position: absolute; - left: 0; right: 0; -} diff --git a/app/assets/stylesheets/error_pages.scss b/app/assets/stylesheets/error_pages.scss new file mode 100644 index 000000000..452352e65 --- /dev/null +++ b/app/assets/stylesheets/error_pages.scss @@ -0,0 +1,107 @@ +@import 'colors'; +@import 'mixins'; + +#big-number { + font-family: Roboto-BoldCondensed, Helvetica, Arial, sans-serif; + font-size: 250px; + line-height: 1em; + text-align: center; + padding-top: 100px; + text-shadow: 0 2px 0 #fff, 0 -1px 0 #999; + color: #ddd; +} +.transparent { + opacity: 0.8; +} +#content { + font-family: Roboto, Helvetica, Arial, sans-serif; + text-align: center; + text-shadow: 0 1px 0 #fff; + font-size: 1.25em; + line-height: 1.5em; + color: $text-dark-grey; + position: absolute; + left: 0; right: 0; +} + +#error_404 { + width: 100%; + height: 100%; + position: fixed; + bottom:0px; + margin: 0px; + font-family: Roboto, Helvetica, Arial, sans-serif; + text-align: center; + text-shadow: 0 1px 0 #fff; + color: #666; + background: image-url("peeping-tom.png") no-repeat bottom; + + #big-number { + font-family: Roboto-BoldCondensed, Helvetica, Arial, sans-serif; + font-size: 250px; + text-shadow: 0 2px 0 #fff, 0 -1px 0 #999; + color: #ddd; + } + + a { + text-decoration : none; + color : rgb(42,156,235); + } + + a:hover { + text-decoration : underline; + } + + .transparent { + filter: alpha(opacity=80); + opacity: 0.8; + } +} + +#error_422 { + background-color: #fff; + color: #666; + text-align: center; + font-family: arial, sans-serif; + + div.dialog { + width: 25em; + padding: 0 4em; + margin: 4em auto 0 auto; + border: 1px solid #ccc; + border-right-color: #999; + border-bottom-color: #999; + } + + h1 { + font-size: 100%; + color: #f00; + line-height: 1.5em; + } +} + +#error_500 { + text-align: center; + background-color: rgb(252,252,252); + color: #444; + font-family: 'helvetica neue', 'helvetica', 'arial', sans-serif; + margin: 0; + padding: 1em; + + header { + height: 100px; + background-color: #333; + position:relative; + } + + #diaspora_logo { + position: relative; + margin-top: 50px; + } + + h1 { + font-size: 100%; + color: #444; + line-height: 1.5em; + } +} diff --git a/app/assets/stylesheets/facebox.css.scss b/app/assets/stylesheets/facebox.scss similarity index 100% rename from app/assets/stylesheets/facebox.css.scss rename to app/assets/stylesheets/facebox.scss diff --git a/app/assets/stylesheets/footer.css.scss b/app/assets/stylesheets/footer.scss similarity index 95% rename from app/assets/stylesheets/footer.css.scss rename to app/assets/stylesheets/footer.scss index 15c2e6a5e..9d057029d 100644 --- a/app/assets/stylesheets/footer.css.scss +++ b/app/assets/stylesheets/footer.scss @@ -31,7 +31,7 @@ footer { &.separator { margin-left: -.35em; margin-right: .65em; - @include opacity(.6); + opacity: 0.6; } &:last-child { diff --git a/app/assets/stylesheets/getting-started.css.scss b/app/assets/stylesheets/getting-started.css.scss deleted file mode 100644 index d5817f94c..000000000 --- a/app/assets/stylesheets/getting-started.css.scss +++ /dev/null @@ -1,37 +0,0 @@ -#hello-there { - .avatar { - width: 50px; - height: 50px; - } - - .awesome { - text-align: center; - - .btn.creation { - text-shadow: none; - } - } - - .hero-unit { - margin: 20px 42px; - padding: 40px 80px; - } - - h2 { - margin-top: 80px; - } - - p, form { - margin-left: 30px; - } - - ul.as-selections { - width: 100%; - - li.as-original { - input { - margin-bottom: 15px; - } - } - } -} diff --git a/app/assets/stylesheets/getting-started.scss b/app/assets/stylesheets/getting-started.scss new file mode 100644 index 000000000..57b4d0a6f --- /dev/null +++ b/app/assets/stylesheets/getting-started.scss @@ -0,0 +1,81 @@ +#hello-there { + .avatar { + width: 50px; + height: 50px; + } + + .well .media{ + overflow: visible; + } + + .awesome { + text-align: center; + + .btn.creation { + text-shadow: none; + } + } + + .hero-unit { + margin: 20px 42px; + padding: 40px 80px; + } + + h2 { + margin-top: 80px; + } + + p, form { + margin-left: 30px; + } + + ul.as-selections { + width: 100%; + + li.as-original { + input { + margin-bottom: 15px; + } + } + } + + .as-results .as-list { + box-shadow: 0px 1px 1px #666; + } +} + +.popover h3 { + font-weight: bold; + .close { line-height: 18px; } +} + +#welcome-to-diaspora { + background: orange; + box-shadow: inset 0 -2px 10px rgba(0,0,0,0.35); + margin-bottom: 20px; + margin-top: -40px; + padding-bottom: 30px; + padding-top: 60px; + + h1,h3 { + color: $white; + margin: 0; + text-overflow: ellipsis; + white-space: nowrap; + } + + #gs-skip-x { + font-size: 40px; + } + + &:hover { + #gs-skip-x { + opacity: .4; + @include transition(opacity, 0.25s); + + &:hover { + opacity: 1; + } + } + } +} diff --git a/app/assets/stylesheets/header.css.scss b/app/assets/stylesheets/header.scss similarity index 83% rename from app/assets/stylesheets/header.css.scss rename to app/assets/stylesheets/header.scss index d4ecee42b..7e4757ae8 100644 --- a/app/assets/stylesheets/header.css.scss +++ b/app/assets/stylesheets/header.scss @@ -4,8 +4,8 @@ } body > header { - @include box-shadow(0,1px,3px,rgba(0,0,0,0.9)); - background: url('header-bg.png') rgb(40,35,35); + box-shadow: 0 1px 3px rgba(0,0,0,0.9); + background: image-url('header-bg.png') rgb(40,35,35); z-index: 1001; padding: 6px 0; color: #CCC; @@ -39,10 +39,14 @@ body > header { color: #CCC; color: rgb(147,147,147); - &:hover { + &:hover, &:focus { background: none; color: $highlight-white; } + &:focus { + outline: thin dotted $border-dark-grey; + text-decoration: none; + } } &.landing { @@ -68,7 +72,7 @@ body > header { font-size: smaller; .badge_count { - @include border-radius(2px); + border-radius: 2px; z-index: 3; position: absolute; top: -4px; @@ -118,10 +122,9 @@ body > header { } #notification_dropdown { - @include dropdown-shadow; - background: white; border: solid $border-dark-grey 1px; + box-shadow: 0 0px 13px rgba(20,20,20,0.5); left: 300px; width: 380px; display: none; @@ -152,42 +155,48 @@ body > header { } .ajax_loader { + border-bottom: 1px solid $border-grey; text-align: center; padding: 15px; } + .notifications{ + overflow: hidden; + position: relative; + max-height: 325px; - .notification_element { - border-bottom: 1px solid $border-grey; - padding: 5px; - min-height: 35px; - line-height: 18px; + .media.stream_element { + border-bottom: 1px solid $border-grey; + padding: 5px; + min-height: 35px; + line-height: 18px; + margin: 0; - > .avatar { - height: 35px; - width: 35px; - float: left; - } + img.avatar { + width: 35px; + height: 35px; + } - .notification_message { - margin-left: 40px; - } + .pull-right > .aspect_membership_dropdown { display: none; } + .unread-toggle { margin: 10px; } - .unread-toggle { - padding: 9px 5px; .entypo { cursor: pointer; color: lighten($black,75%); font-size: 17px; line-height: 17px; } - } - - &.unread { - background-color: $background-grey; - color: $black; - .unread-toggle { - .entypo { color: $black; } + .tooltip { + position: fixed; } + + &.unread { + background-color: $background-grey; + color: $black; + .unread-toggle { + .entypo { color: $black; } + } + } + } } @@ -216,14 +225,15 @@ body > header { right: 0; input { - @include box-shadow(0, 1px, 1px, #444); - @include border-radius(15px); + box-shadow: 0 1px 1px #444; + border-radius: 15px; @include transition(width); width: 100px; background-color: #444; border: 1px solid #222; font-size: 13px; padding: 4px; + margin-top: 1px; &:hover { background-color: #555; } @@ -238,8 +248,8 @@ body > header { width: 200px; } - &::-webkit-input-placeholder { text-shadow: none; } - &::-moz-placeholder { text-shadow: none; } + &::input-placeholder { text-shadow: none; } + &::placeholder { text-shadow: none; } &.ac_loading::-webkit-search-cancel-button { -webkit-appearance: none; } } } @@ -276,7 +286,7 @@ body > header { } &.active { - @include dropdown-shadow; + box-shadow: 0 0px 13px rgba(20,20,20,0.5); background-color: rgb(34,30,30); visibility: visible; @@ -314,7 +324,7 @@ body > header { text-decoration: none; } - &:focus { :outline: none; } + &:focus { outline: none; } } .user-menu-more-indicator { @@ -336,7 +346,7 @@ body > header { float: left; height: 100%; margin-right: 5px; - margin-top: 3px; + margin-top: 2px; a { padding: 0 10px; @@ -374,8 +384,8 @@ body > header { color: $blue; &.login { - @include border-radius(5px); - @include box-shadow(0, 1px, 1px, #666); + border-radius: 5px; + box-shadow: 0 1px 1px #666; padding: 5px 8px; background-color: #000; border-top: 1px solid #000; diff --git a/app/assets/stylesheets/help.css.scss b/app/assets/stylesheets/help.scss similarity index 74% rename from app/assets/stylesheets/help.css.scss rename to app/assets/stylesheets/help.scss index ca4edf9ed..56fde842e 100644 --- a/app/assets/stylesheets/help.css.scss +++ b/app/assets/stylesheets/help.scss @@ -57,40 +57,52 @@ ul#help_nav { text-align: left; } ul > li { - list-style-type: disc !important; + list-style-type: disc !important; } - + text-align: justify; .question { background-color: rgb(242, 242, 242); margin-bottom: 10px; - @include border-radius(4px); + border-radius: 4px; a.toggle { - text-decoration: none; + text-decoration: none; color: black; } - h4 { + h4 { text-align: left; font-weight: 700; margin: 0px; - padding: 10px 20px; + padding: 10px 20px; } - + &.collapsed { - border: 2px solid rgb(242, 242, 242); + border: 2px solid rgb(242, 242, 242); } - - &.opened { + + &.opened { border: 2px solid rgb(142, 222, 61); h4 { background-color: rgb(142, 222, 61); } } .answer { - @include border-radius(0px, 0px, 4px, 4px); + border-radius: 0px 0px 4px 4px; background-color: white; padding: 10px 20px; + + div.help-chat-icons{ + text-align: center; + font-size: 50px; + line-height: 70px; + + i.entypo{ + color: #bfbfbf; + + &.chat{ color: #000000; } + } + } } } } diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss new file mode 100644 index 000000000..acb3e9195 --- /dev/null +++ b/app/assets/stylesheets/home.scss @@ -0,0 +1,84 @@ +body { + margin-top: 50px; + background-color: white; + background-image : none; +} + +li { + list-style: none; +} + +footer h3 { + margin-bottom: 25px; + text-align: center; +} + +footer { + margin-bottom: 12px; + padding: 42px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + width: auto +} + +#header { + /* Hack to hide the header */ + box-shadow:none; + border:none; + background:none; + + left: 0px; + padding: 15px 0px; +} + +#header img { + margin-left: 15px; +} + +#login-link { + float: right; + margin-right: 15px; +} + +#steps { + text-align: center; +} + +#banner { + border-bottom : 1px solid #ccc; + border-top : 1px solid #eee; + padding : 30px; + margin-top: 20px; + text-align: center; + + box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7); +} + +#links { + margin: 0; + padding: 0; + text-align: center; +} + +#links .section { + margin: 0; + padding: 0; + display: inline-block; + vertical-align: top; + width: 24%; + max-width: 24%; +} + +#change-page { + color: #999; + text-align: center; + font-style: italic; +} + +.helpful { + cursor: help; +} + +.row { + margin-bottom: 60px; +} diff --git a/app/assets/stylesheets/hovercard.css.scss b/app/assets/stylesheets/hovercard.scss similarity index 93% rename from app/assets/stylesheets/hovercard.css.scss rename to app/assets/stylesheets/hovercard.scss index 30ad7f9c7..eb5ae9518 100644 --- a/app/assets/stylesheets/hovercard.css.scss +++ b/app/assets/stylesheets/hovercard.scss @@ -1,9 +1,6 @@ -@import "colors"; -@import "_mixins.css.scss"; - #hovercard { - @include border-radius(2px); - @include box-shadow(0, 0, 5px, #666666); + border-radius: 2px; + box-shadow: 0 0 5px #666666; position: relative; display: inline-block; diff --git a/app/assets/stylesheets/invitations.css.scss b/app/assets/stylesheets/invitations.scss similarity index 78% rename from app/assets/stylesheets/invitations.css.scss rename to app/assets/stylesheets/invitations.scss index b83677a66..366b0caf4 100644 --- a/app/assets/stylesheets/invitations.css.scss +++ b/app/assets/stylesheets/invitations.scss @@ -1,10 +1,16 @@ #invite_code { + background-color: $white; cursor: text; display: block; margin-top: 5px; } #invitationsModal { + .modal-header, .modal-body { + color: $text; + font-size: $font-size-text; + text-align: initial; + } #paste_link { font-weight: 700; } #invite_code { margin-top: 10px; } #codes_left { color: $text-grey; } diff --git a/app/assets/stylesheets/leftnavbar.css.scss b/app/assets/stylesheets/leftnavbar.css.scss deleted file mode 100644 index e616aea91..000000000 --- a/app/assets/stylesheets/leftnavbar.css.scss +++ /dev/null @@ -1,48 +0,0 @@ -#leftNavBar { - color: #222222; - - ul { - margin: 0px; - padding: 0px; - } - - a { - color: $link-grey; - font-weight: bold; - text-decoration: none; - } - - .selected { color: $black; } - .selected a { color: $black; } - - .hoverable { - display: block; - margin-right: 6px; - padding: 4px; - &:hover { background-color: $background-blue; } - - .label { - background-color: $background-grey; - color: $text-grey; - } - } - - .selectable { - display: block; - margin-left: 21px; - overflow: hidden; - text-overflow: ellipsis; - } - - .action { - width: 12px; - height: 12px; - display: none; - float: right; - margin: 3px; - } - - .hoverable:hover > .action { - display: block; - } -} diff --git a/app/assets/stylesheets/leftnavbar.scss b/app/assets/stylesheets/leftnavbar.scss new file mode 100644 index 000000000..6bee6e8d6 --- /dev/null +++ b/app/assets/stylesheets/leftnavbar.scss @@ -0,0 +1,127 @@ +#leftNavBar { + a { + color: $link-grey; + font-weight: bold; + text-decoration: none; + } + + ul { + margin: 0px; + padding: 0px; + list-style: none; + } + + .selected { color: $black; } + .selected a { color: $black; } + + .hoverable { + display: block; + margin-right: 6px; + padding: 4px; + &:hover { background-color: $background-blue; } + } + + .selectable { + display: block; + margin-left: 21px; + overflow: hidden; + text-overflow: ellipsis; + } + + #home_user_badge { + border-bottom: 1px dashed $border-grey; + margin-bottom: 10px; + min-height: 50px; + padding-bottom: 10px; + padding-left: 4px; + + .avatar { + float: left; + height: 50px; + width: 50px; + } + + h4 { + margin-left: 60px; + padding-top: 15px; + overflow: hidden; + text-overflow: ellipsis; + + a { color: $black; } + } + } + + #stream_selection { + & > li { + margin-bottom: 5px; + } + } + + #aspects_list, #tags_list { + .hoverable > .action { + visibility: hidden; + margin: 0 3px; + } + .hoverable:hover > .action { + visibility: visible; + } + } + + #aspects_list { + .entypo.check { + float: left; + visibility: hidden; + &.selected { visibility: visible; } + } + .selected + a { + color: #333333; + } + } + + #tags_list { + .delete_tag_following { + font-size: 20px; + line-height: 15px; + } + + #new_tag_following { + margin-left: 20px; + margin-top: 5px; + } + + /* ---- override app/stylesheets/vendor/autoSuggest.css ---- */ + ul.as-selections { padding: 1px 5px 4px 5px; } + .tag_input { + line-height: $font-size-text; + vertical-align: top; + width: 100%; + } + + .as-result { + margin-top: -1px; + margin-left: 1px; + } + + .as-list { + em { + background-color: #aabbcc; + color: black; + padding: 0px; + } + + color: black; + position: static; /* override absolute */ + margin: 0px; + border-radius: 0px 0px 3px 3px; + box-shadow: 0px 1px 1px #666; + } + + .as-result-item.active { + color: black; + text-shadow: none; + background-color: $background-blue; + border-color: $background-blue; + } + /* ---- end override app/stylesheets/vendor/autoSuggest.css ---- */ + } +} diff --git a/app/assets/stylesheets/lightbox.css.scss b/app/assets/stylesheets/lightbox.scss similarity index 85% rename from app/assets/stylesheets/lightbox.css.scss rename to app/assets/stylesheets/lightbox.scss index 9fc9f50bd..872126eb0 100644 --- a/app/assets/stylesheets/lightbox.css.scss +++ b/app/assets/stylesheets/lightbox.scss @@ -1,9 +1,3 @@ -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -@import 'colors'; -@import 'mixins'; - #lightbox{ z-index: 1003; position: fixed; @@ -26,7 +20,7 @@ } #lightbox-image{ - @include box-shadow(0, 10px, 20px, black); + box-shadow: 0 10px 20px black; top: 0; display: block; margin-bottom: 120px; @@ -74,8 +68,6 @@ } #lightbox-backdrop{ - -moz-box-shadow:inset 0 0 50px #000000; - -webkit-box-shadow:inset 0 0 50px #000000; box-shadow:inset 0 0 50px #000000; z-index: 1002; @@ -128,8 +120,8 @@ padding-right: 50px; img{ - @include transition(opacity, 0.2s); - @include opacity(0.2); + transition: opacity 0.2s; + opacity: 0.2; height: 70px; width: 70px; margin-right: 5px; @@ -141,7 +133,7 @@ } &.selected{ - @include opacity(1); + opacity: 1; } } } diff --git a/app/assets/stylesheets/markdown-content.scss b/app/assets/stylesheets/markdown-content.scss new file mode 100644 index 000000000..4d7d8e895 --- /dev/null +++ b/app/assets/stylesheets/markdown-content.scss @@ -0,0 +1,11 @@ +.markdown-content { + p { margin: 0 0 0.8em; } + p:last-child { margin-bottom: 0; } + + ul, ol { + margin-top:0.8em; + margin-bottom:0.8em; + &:first-child { margin-top: 0; } + &:last-child { margin-bottom: 0; } + } +} diff --git a/app/assets/stylesheets/media-box.css.scss b/app/assets/stylesheets/media-box.scss similarity index 100% rename from app/assets/stylesheets/media-box.css.scss rename to app/assets/stylesheets/media-box.scss diff --git a/app/assets/stylesheets/mentions.css.scss b/app/assets/stylesheets/mentions.scss similarity index 84% rename from app/assets/stylesheets/mentions.css.scss rename to app/assets/stylesheets/mentions.scss index 49187d20b..6647170ee 100644 --- a/app/assets/stylesheets/mentions.css.scss +++ b/app/assets/stylesheets/mentions.scss @@ -1,8 +1,5 @@ -@import 'colors'; -@import '_mixins.css.scss'; - .mentions-input-box { - @include border-radius(3px); + border-radius: 3px; background: #fff; position: relative; @@ -37,7 +34,7 @@ margin: 0; padding: 0; - @include border-radius(0px, 0px, 5px, 5px); + border-radius: 0px 0px 5px 5px; li { color: #444; @@ -54,7 +51,7 @@ white-space: nowrap; &:hover, &.active { background: $background-grey; } - &:last-child { @include border-radius(0px, 0px, 5px, 5px); } + &:last-child { border-radius: 0px 0px 5px 5px; } img, div.icon { float: left; @@ -66,19 +63,22 @@ } } + .mentions-box { + position: absolute; + right: 0px; + bottom: 0px; + left: 0px; + top: 0px; + padding: 4px 6px; + } + .mentions { - bottom: 0; color: white; font-size: 14px; font-family: Arial, Helvetica, sans-serif; - left: 0; line-height: normal; overflow: hidden; - padding: 4px; - position: absolute; - right: 0; - top: 0; - width: 445px; + width: 100%; white-space: pre-wrap; word-wrap: break-word; diff --git a/app/assets/stylesheets/mobile/header.css.scss b/app/assets/stylesheets/mobile/header.scss similarity index 76% rename from app/assets/stylesheets/mobile/header.css.scss rename to app/assets/stylesheets/mobile/header.scss index 20e537941..3c887aa8d 100644 --- a/app/assets/stylesheets/mobile/header.css.scss +++ b/app/assets/stylesheets/mobile/header.scss @@ -5,13 +5,13 @@ header { height: 45px; top: 0px; z-index: 10; - background: url('../header-bg-long.jpg') rgb(40,35,35); - @include box-shadow(0, 1px, 2px, #333); + background: image-url('header-bg-long.jpg') rgb(40,35,35); + box-shadow: 0 1px 2px #333; border-bottom: 1px solid #222; } #main_nav { - width: 100%; + width: 100%; #header_title { display: inline-block; @@ -32,7 +32,7 @@ header { font-weight: bold; font-size: smaller; background-color: transparent; - + img { height: 30px; width: 30px; @@ -40,7 +40,7 @@ header { } .badge_count { - @include border-radius(2px); + border-radius: 2px; z-index: 3; position: absolute; top: 3px; @@ -48,7 +48,7 @@ header { background-color: $red; margin-left: -8px; } - + #conversation_icon { height: 18px; } @@ -62,18 +62,13 @@ header { width: 100%; left: 100%; background-color: #444; - - box-shadow: -2px 0px 2px 1px #333; - -o-box-shadow: -2px 0px 2px 1px #333; - -ms-box-shadow: -2px 0px 2px 1px #333; - -moz-box-shadow: -2px 0px 2px 1px #333; - -webkit-box-shadow: -2px 0px 2px 1px #333; + box-shadow: -2px 0px 2px 1px #333; header { position: static; left: 100%; right: -80%; - + #global_search { position: relative; @@ -83,8 +78,8 @@ header { right: 22%; input { - @include box-shadow(0, 1px, 1px, #444); - @include border-radius(15px); + box-shadow: 0 1px 1px #444; + border-radius: 15px; width: 100%; margin-top: 7px; background-color: #444; @@ -103,13 +98,12 @@ header { background-color: white; } - &::-webkit-input-placeholder { text-shadow: none; } - &:-moz-placeholder { text-shadow: none; } + &:placeholder { text-shadow: none; } } } } } - + nav { position: absolute; top: 45px; @@ -124,7 +118,7 @@ header { color: $light-grey; border-bottom: solid rgb(53, 53, 53) 2px; } - + li:hover { background-color: $link-grey; } @@ -132,21 +126,21 @@ header { .no_border { padding: 0px; border-bottom: 0px; - + &:hover { background-color: transparent; } - + > ul > li > a { font-size: 14px; padding: 8px 42px; } } - + .hide { display: none; } - + .avatar { height: 35px; width: 35px; @@ -154,7 +148,7 @@ header { float: right; } } - + a { display: block; color: $light-grey; @@ -171,8 +165,4 @@ header { /* This class is added when the user open the drawer */ #app.draw > * { transform: translateX(-80%); - -o-transform: translateX(-80%); - -ms-transform: translateX(-80%); - -moz-transform: translateX(-80%); - -webkit-transform: translateX(-80%); } diff --git a/app/assets/stylesheets/mobile/mobile.css.scss b/app/assets/stylesheets/mobile/mobile.scss similarity index 87% rename from app/assets/stylesheets/mobile/mobile.css.scss rename to app/assets/stylesheets/mobile/mobile.scss index c536cd28e..f5f48ea65 100644 --- a/app/assets/stylesheets/mobile/mobile.css.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -1,17 +1,22 @@ -@import 'bootstrap'; -@import 'bootstrap-responsive'; +@import "bootstrap"; +@import "bootstrap-responsive"; @import "colors"; -@import "_mixins.css.scss"; -@import 'vendor/autoSuggest'; -@import '_flash_messages.scss'; +@import "_mixins"; +@import "vendor/autoSuggest"; +@import "_flash_messages"; -@import 'header'; +@import "header"; a { color: #2489ce; text-decoration: none; } +code { + white-space: normal; + word-wrap: break-word; + } + body { background: { image: image-url('texture/hatched-light.jpg'); @@ -48,11 +53,12 @@ h3 { position: relative; text-align: left; padding: 10px 0; - * { - max-width: 100%; } min-height: 34px; + + * { max-width: 100%; } + .avatar { - @include border-radius(4px); + border-radius: 4px; float: left; height: 35px; @@ -148,12 +154,14 @@ h3 { .login-container { padding: 10px; + label, legend { text-transform: uppercase; } } } -.stream_element, #login_form { - @include border-radius(5px); - @include box-shadow(0, 1px, 2px, rgba(0, 0, 0, 0.2)); +.stream_element, +#login_form { + border-radius: 5px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); background-color: #fff; margin-bottom: 10px; @@ -178,7 +186,7 @@ h3 { padding: 0; margin: 0; img { - @include border-radius(3px); + border-radius: 3px; margin: 0; padding: 0; } } @@ -190,8 +198,7 @@ h3 { } } -.more-link { - -webkit-box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4); +.more-link, .no-more-posts { display: block; text-align: center; padding: 0 10px; @@ -202,10 +209,15 @@ h3 { color: rgba(220,220,220,0.8); } - h1 { + h1, h2 { color: $text-grey; padding: 20px; - text-shadow: 0 2px 0 #fff; } } + text-shadow: 0 2px 0 #fff; + } +} +.no-more-posts { + box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4); +} .info { color: #ccc; @@ -297,27 +309,42 @@ h3 { } #author_info { - height: 100%; - position: relative; + margin: -10px; + margin-bottom: 10px; + padding-top: 5px; + background-color: #fff; + border-bottom: 1px solid #aaa; word-wrap: break-word; img { - height: 90px; - width: 90px; - margin-right: 10px; + border-radius: 4px; + + height: 70px; + width: 70px; + margin: 10px; float: left; } .content { - padding-left: 100px; + padding-left: 90px; + + h2 { + font-size: 20px; + line-height: 20px; + margin-bottom: 0px; + } + + .description { + font: { + weight: normal; + size: small; + }; + color: $text-grey; + } } - .description { - font: { - weight: normal; - size: small; - }; - color: $text-grey; + .bottom_bar { + position: static; } } @@ -331,7 +358,7 @@ h3 { } .bottom_bar { - @include border-radius(0, 0, 5px, 5px); + border-radius: 0 0 5px 5px; z-index: 3; display: block; position: relative; @@ -418,14 +445,14 @@ h3 { float: right; } .stream_element .photo_attachments { - @include border-radius(3px, 3px, 0, 0); + border-radius: 3px 3px 0 0; border: { bottom: 1px solid #ccc; } img.big-stream-photo { - @include border-radius(3px, 3px, 0, 0); + border-radius: 3px 3px 0 0; width: 100%; } a { @@ -434,7 +461,7 @@ h3 { } .photo_area { - @include border-radius(3px); + border-radius: 3px; text-align: center; } .image_link { @@ -488,7 +515,7 @@ h3 { cursor: pointer; &.dim { - @include opacity(0.6); + opacity: 0.6; } } } @@ -498,8 +525,8 @@ h3 { } textarea { - @include border-radius(0); - @include box-shadow(0, 2px, 3px, #999); + border-radius: 0; + box-shadow: 0 2px 3px #999; border: none; border-bottom: 1px solid $border-dark-grey; width: 96%; @@ -543,7 +570,7 @@ select { } .additional_photo_count { - @include opacity(0.5); + opacity: 0.5; position: absolute; padding: 3px 8px; @@ -623,9 +650,9 @@ select { } .conversation_participants img.avatar{ - height:35px; - width:35px; - margin: 5px 0 5px 2px; + height:35px; + width:35px; + margin: 5px 0 5px 2px; } .conversations img.avatar{ @@ -662,8 +689,8 @@ select { } form#new_conversation.new_message input.button.creation{ - float: right; - margin: 0 5px 5px; + float: right; + margin: 0 5px 5px; } h3.ltr { @@ -742,24 +769,17 @@ textarea#conversation_text { vertical-align: middle; cursor: pointer; background-color: #f5f5f5; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #cccccc; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; + border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .button.creation:hover, @@ -782,10 +802,7 @@ textarea#conversation_text { color: #333333; text-decoration: none; background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; + transition: background-position 0.1s linear; } .button.creation:focus { @@ -831,6 +848,22 @@ form#new_user.new_user input.btn { text-shadow: 1px 1px 20px rgb(126, 240, 77); } +#conversation_inbox { + .pagination { + margin-left: auto; + margin-right: auto; + text-align: center; + + ul > li > a { + padding: 4px 8px; + } + + .disabled a{ + background: $background-grey; + } + } +} + input#user_password, #user_username, #user_password_confirmation, #user_email { height: 30px; } @@ -891,8 +924,8 @@ form p.checkbox_select { position: relative; img { - @include border-radius(5px); - @include box-shadow(0,1px,2px,#666); + border-radius: 5px; + box-shadow: 0 1px 2px #666; position: absolute; left: 0; @@ -902,7 +935,7 @@ form p.checkbox_select { &.avatar { @include transition(opacity, 0.5s); &.loading { - @include opacity(0.3); + opacity: 0.3; } } } @@ -910,9 +943,9 @@ form p.checkbox_select { } #file-upload.button { - @include border-radius(3px); @include button-gradient($light-grey); - @include box-shadow(0,1px,1px,#cfcfcf); + border-radius: 3px; + box-shadow: 0 1px 1px #cfcfcf; @include transition(border); display: inline-block; @@ -968,9 +1001,11 @@ select#user_language, #user_auto_follow_back_aspect_id, #aspect_ids_ { line-height: 18px; color: inherit; background-color: $background-grey; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; border-radius: 10px; + .img .avatar { + width: 50px; + height: 50px; + } } .search-mobile { @@ -1002,19 +1037,19 @@ select#aspect_ids_ { cursor: pointer; &:hover img { - @include opacity(0.4); + opacity: 0.4; } } #publisher_textarea_wrapper { - @include border-radius(2px); + border-radius: 2px; margin: 12px 0px; background: #fff; position: relative; padding-right: 10px; #hide_publisher { - @include opacity(0.3); + opacity: 0.3; z-index: 5; padding: 3px; position: absolute; @@ -1022,7 +1057,7 @@ select#aspect_ids_ { top: 0; &:hover { - @include opacity(1); + opacity: 1; } } @@ -1062,7 +1097,7 @@ select#aspect_ids_ { } .circle { - @include border-radius(20px); + border-radius: 20px; z-index: 1; position: absolute; right: -7px; @@ -1159,3 +1194,14 @@ select#aspect_ids_ { } } +// Styles for mobile profile of other users +.user_aspects { + width: auto !important; + float: right; + margin: 0 10px 0 0; + padding: 3px; + + &.has_connection { + background-color: $light-green; + } +} diff --git a/app/assets/stylesheets/new_styles/_animations.scss b/app/assets/stylesheets/new_styles/_animations.scss index 3a60309be..93ca29ad3 100644 --- a/app/assets/stylesheets/new_styles/_animations.scss +++ b/app/assets/stylesheets/new_styles/_animations.scss @@ -1,78 +1,5 @@ -@-webkit-keyframes opacity-pulse { - 0% { @include opacity(0.3); } - 65% { @include opacity(0.9); } - 100% { @include opacity(0.3); } -} -@-moz-keyframes opacity-pulse { - 0% { @include opacity(0.3); } - 65% { @include opacity(0.9); } - 100% { @include opacity(0.3); } -} -@-ms-keyframes opacity-pulse { - 0% { @include opacity(0.3); } - 65% { @include opacity(0.9); } - 100% { @include opacity(0.3); } -} -@-o-keyframes opacity-pulse { - 0% { @include opacity(0.3); } - 65% { @include opacity(0.9); } - 100% { @include opacity(0.3); } -} - -@-webkit-keyframes ease-over { - 0% { @include opacity(0); -webkit-transform : scale(1.3); } - 100% { @include opacity(1); -webkit-transform : scale(1); } -} -@-moz-keyframes ease-over { - 0% { @include opacity(0); -moz-transform : scale(1.3); } - 100% { @include opacity(1); -moz-transform : scale(1); } -} -@-ms-keyframes ease-over { - 0% { @include opacity(0); -ms-transform : scale(1.3); } - 100% { @include opacity(1); -ms-transform : scale(1); } -} -@-o-keyframes ease-over { - 0% { @include opacity(0); -o-transform : scale(1.3); } - 100% { @include opacity(1); -o-transform : scale(1); } -} - -@-webkit-keyframes ease-out { - 0% { @include opacity(1); -webkit-transform : scale(1); } - 100% { @include opacity(0); -webkit-transform : scale(1.3); } -} -@-moz-keyframes ease-out { - 0% { @include opacity(1); -moz-transform : scale(1); } - 100% { @include opacity(0); -moz-transform : scale(1.3); } -} -@-ms-keyframes ease-out { - 0% { @include opacity(1); -ms-transform : scale(1); } - 100% { @include opacity(0); -ms-transform : scale(1.3); } -} -@-o-keyframes ease-out { - 0% { @include opacity(1); -o-transform : scale(1); } - 100% { @include opacity(0); -o-transform : scale(1.3); } -} - /* flash message animations - header height is about 40px */ -@-webkit-keyframes expose { - 0% { top : -100px; } - 15% { top : 34px; } - 85% { top : 34px; } - 100% { top : -100px; } -} -@-moz-keyframes expose { - 0% { top : -100px; } - 15% { top : 34px; } - 85% { top : 34px; } - 100% { top : -100px; } -} -@-ms-keyframes expose { - 0% { top : -100px; } - 15% { top : 34px; } - 85% { top : 34px; } - 100% { top : -100px; } -} -@-o-keyframes expose { +@keyframes expose { 0% { top : -100px; } 15% { top : 34px; } 85% { top : 34px; } diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index 43aefe2e3..318b99484 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -7,21 +7,32 @@ body { body { margin-top: 40px; padding : none; + font-size: $font-size-text; &.lock { overflow: hidden; } } +blockquote p { + font-size: $font-size-text; + line-height: $line-height; +} + +/* Overflow */ +h1, h2, h3, h4, h5, h6, +p, +blockquote, +code, +pre { word-wrap: break-word; } +a.tag { word-break: break-all; } + /* new link color */ -$link-blue : rgb(42,156,235); a { color : $link-blue } -/* bootstrap extentions */ -.icon-red { background-image: image_url("img/glyphicons-halflings-red.png"); } -.icon-blue { background-image: image_url("img/glyphicons-halflings-blue.png"); } - .avatar { + border-radius: 4px; + &.micro { height: 20px; width: 20px; @@ -31,72 +42,18 @@ a { color : $link-blue } height: 35px; width: 35px; } -} -#forgot_password, -#reset_password { - background-image : image_url("texture/light-bg.png"); - height: 100%; + &.medium { + height: auto; + width: auto; + max-width: 75px; + } } .author-name { color: inherit; } -.photo-fill { - @include background-cover(); - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; -} - -$bring-dark-accent-forward-color: #DDD; - -#top-right-nav { - z-index: 10; - position : absolute; - right : 10px; - top : 10px; - - & > a { - @include transition(opacity); - @include opacity(0.4); - - margin-left : 5px; - - &:hover { - @include opacity(0.75); - text-decoration : none; - } - } -} - -#header { - position : fixed; - top : 0; - width : 100%; - padding : 15px; - z-index : 30; - - -webkit-box-shadow : inset 0 -10px 10px -8px rgba(0,0,0,0.8); - -moz-box-shadow : inset 0 -10px 10px -8px rgba(0,0,0,0.8); - - border-bottom : 1px solid #333; - - color : #fff; - background : { - color : #333; - size : cover; - attachment : fixed; - } - - h1 { - @include opacity(0.4); - } -} - /* bootstrap label fixes for Roboto */ .label { padding : 2px 5px; @@ -110,42 +67,6 @@ $bring-dark-accent-forward-color: #DDD; } } -.profile-image-container { - border-radius: 140px; - border : 3px solid #fff; - box-shadow : 0 0 2px rgba(0,0,0,0.5), 0 0 10px rgba(0,0,0,0.6), inset 0 0 15px rgba(0,0,0,0.5), inset 0 -2px 4px rgba(255,255,255,0.3); - background-size: cover; - - height : 140px; - width : 140px; - background : { - position : center; - image : image-url('user/default.png'); - } - - display : inline-block; - - margin-bottom : 5px; - - &.small { - height : 40px; - width : 40px; - border : 2px solid #fff; - } - - &.smaller { - height : 34px; - width : 34px; - border : 2px solid #ccc; - } - - &.micro { - height : 24px; - width : 24px; - border : 2px solid #fff; - } -} - #back-to-top { display: block; color: white; @@ -166,7 +87,7 @@ $bring-dark-accent-forward-color: #DDD; /* general purpose classes */ .small-horizontal-spacer { - height: 20px; + min-height: 20px; } .big-horizontal-spacer { diff --git a/app/assets/stylesheets/buttons.css.scss b/app/assets/stylesheets/new_styles/_buttons.scss similarity index 97% rename from app/assets/stylesheets/buttons.css.scss rename to app/assets/stylesheets/new_styles/_buttons.scss index 2b0817086..732f98af3 100644 --- a/app/assets/stylesheets/buttons.css.scss +++ b/app/assets/stylesheets/new_styles/_buttons.scss @@ -3,7 +3,7 @@ @include button-gradient($creation-blue); color: #fff; border: 1px solid darken($button-border-color,20%); - + text-shadow: none; &:hover { background: $creation-blue; border: 1px solid darken($button-border-color,35%); diff --git a/app/assets/stylesheets/new_styles/_code.scss b/app/assets/stylesheets/new_styles/_code.scss new file mode 100644 index 000000000..aae6a603f --- /dev/null +++ b/app/assets/stylesheets/new_styles/_code.scss @@ -0,0 +1,7 @@ +code { white-space: normal; } + +pre { + overflow-x: auto; + white-space: pre; + code { white-space: pre; } +} diff --git a/app/assets/stylesheets/new_styles/_flash_messages.scss b/app/assets/stylesheets/new_styles/_flash_messages.scss deleted file mode 100644 index 8665c03b3..000000000 --- a/app/assets/stylesheets/new_styles/_flash_messages.scss +++ /dev/null @@ -1,13 +0,0 @@ - -@import '../_flash_messages'; - -#flash_notice, -#flash_alert, -#flash_error { - .message { - margin-top : 10px; - padding : 10px 20px 8px; - background-color : rgba(0,0,0,0.8); - border : 1px solid rgba(255,255,255,0.7); - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/new_styles/_forms.scss b/app/assets/stylesheets/new_styles/_forms.scss index c85da9ec0..7e4203b84 100644 --- a/app/assets/stylesheets/new_styles/_forms.scss +++ b/app/assets/stylesheets/new_styles/_forms.scss @@ -1,120 +1,105 @@ +input, +input[type=email], +input[type=text], +input[type=password], +textarea { /* Bootstrap reset */ + &, + &:active, + &:invalid, + &:invalid:required, + &:focus, + &:active:focus, + &:invalid:focus, + &:invalid:required:focus { + border-color: $border-grey; + box-shadow: none; + color : $text-dark-grey; + } +} + /* autocomplete colors */ input:-webkit-autofill{ background-color: #fff !important; background-image: none !important; } - +/* Forms described here are only used on the public pages at the moment */ form.block-form { - display : inline-block; + margin: 20px auto; label { color : $text-dark-grey; - } - - input { - &:invalid, - &:invalid:required, - &:invalid:required:focus { - -webkit-box-shadow : none; - -moz-box-shadow : none; - box-shadow : none; - box-shadow : none; - - border : none; - color : $text-dark-grey; - } + position: absolute; + top: -9999px; + left: -9999px; } fieldset { - @include border-radius(5px); + margin-bottom: 1em; + background-color: #fff; + position: relative; /* To correctly place the entypo icon */ - -webkit-box-shadow : inset 0 1px 1px rgba(0,0,0,0.2), 0 1px 2px rgba(255,255,255,0.7); - - margin-bottom : 1em; - - background-color : #fff; - - border : 1px solid $border-dark-grey; - - input[type=text], - input[type=email], - input[type=password] { - @include box-shadow(0,0,0,0); - @include border-radius(0); - - background : transparent; - - padding : 10px; - - margin-bottom : 0; - border : none; + input { + color : $text-dark-grey; + margin: 0px; + border-bottom-width: 0px; + border-radius: 0px; } - /* mainly bootstrap overrides */ - .control-group { - margin : 0; - border-bottom : 1px solid $border-grey; + .form-control { + font-size: 16px; + height: 40px; + padding: 10px; + padding-left: 40px; + } - .control-label, - input[type=text], - input[type=password], - .field_with_errors label { - padding : 10px; - margin : 0; - } - - .controls { margin-left : 100px; position : relative; } - .control-label { width : 80px; } - - .controls .field_with_errors input { - background : { - image : image-url('invalid_fat@2x.png'); - repeat : no-repeat; - position : 197px; - size: 20px 20px; - } + .form-control:first-of-type { + &, + &:focus, + &:invalid, + &:invalid:focus, + &:invalid:required, + &:invalid:required:focus { + border-top-left-radius: 5px; + border-top-right-radius: 5px; } } - } - input[type=submit] { - text-align : center; - display : block; - width : 100%; - padding : 8px 0; - } -} - -textarea, input[type=text], input[type=password] { - &:focus, &:invalid:focus { - border: 1px solid $border-dark-grey; - outline: none; - -webkit-box-shadow: none; - box-shadow: none; - } -} - -/* buttons to be extracted? */ -.new-btn { - @include transition(box-shadow); - @include border-radius(5px); - @include linear-gradient(#fff, rgb(233,233,233)); - @include box-shadow(0, 1px, 2px, rgba(0,0,0,0)); - - background-color : rgb(233,233,233); - color : $text-grey; - border : 1px solid $border-dark-grey; - - //font-family : Roboto-Bold; - font-size : 14px; - text-shadow : 0 1px 2px #eee; - - &:hover { - @include box-shadow(0, 1px, 2px, rgba(0,0,0,0.3)); - } - - &:active { - box-shadow : inset 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(255,255,255,0.7); + .form-control:last-of-type { + &, + &:focus, + &:invalid, + &:invalid:focus, + &:invalid:required, + &:invalid:required:focus { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-bottom-width: 1px; + } + } + + .entypo { + position: absolute; + top: 10px; + left: 10px; + width: 20px; + text-align: center; + color: $text-grey; + font-size: 20px; + } + + .entypo:nth-of-type(2) { + top: 50px; + } + + .entypo:nth-of-type(3) { + top: 90px; + } + + .entypo:nth-of-type(4) { + top: 130px; + } + + ::placeholder { text-transform: uppercase; } } } diff --git a/app/assets/stylesheets/new_styles/_interactions.scss b/app/assets/stylesheets/new_styles/_interactions.scss index a0e12d638..96c147eaf 100644 --- a/app/assets/stylesheets/new_styles/_interactions.scss +++ b/app/assets/stylesheets/new_styles/_interactions.scss @@ -1,224 +1,60 @@ -@import '../mixins'; - -#post-info { - text-align: center; - z-index: 10; - - margin-top: -33px; - - #post-info-container { - @include info-container(); - } - - .well { - -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,0.10); - -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,0.10); - box-shadow: inset 0 2px 2px rgba(0,0,0,0.10); - - margin: 5px; - padding: 5px; - text-align: left; - - max-height: 20px; - overflow: hidden; - - background: { - color: #222; - color: rgba(0,0,0,0.2); - } - - border: { - left: 1px solid #444; - right: 1px solid #444; - bottom: 1px solid #555; - top: 1px solid #111; - } - - .img { - margin-right: 5px; - } - - i { - margin-top: 1px; - } - - .avatar { - @include border-radius(); - margin-right: 0; - } - } - - #post-comments { - text-align: left; - padding-top: 0; - } - - #new-post-comment-container { - position: relative; - - padding: 10px; - - textarea{ - height: 18px; - width: 318px; - padding: 4px; - } - - form { - margin-bottom: 0; - } - - .btn { - position: absolute; - right: 10px; - bottom: 10px; - font-size: 11px; - line-height: 16px; - padding: 5px 9px; - } - } -} - -.comment-content h1, .comment-content h2, .comment-content h3, .comment-content h4, .comment-content h5, .comment-content h6 { - color: white; - text-shadow: 1px 1px black; - text-rendering: optimizelegibility; -} - -.post-comment { - -moz-box-shadow: 0 1px 2px -2px #999; - -webkit-box-shadow: 0 1px 2px -2px #999; - box-shadow: 0 1px 2px -2px #999; - - border-bottom: 1px solid #333; - - p:last-child { - margin-bottom: 0; - } - - &:last-child { - box-shadow: none; - border-bottom: none; - } - - padding: 10px; - padding-right: 40px; - margin: 0px; - - .avatar { - @include border-radius(); - - border: { - top: 1px solid #222; - right: 1px solid #444; - left: 1px solid #444; - bottom: 1px solid $text-dark-grey; - } - } - - text-shadow: 0 1px 3px rgba(0,0,0,0.3); - - a:hover { - color: #99CCFF - } - - time { - color: $text-dark-grey; - font-size: smaller; - } - - .controls { - @include transition(opacity); - @include opacity(0); - - float: right; - margin-right: -40px; - - a { - padding: 3px 5px; - &:hover { - text-decoration: none; - } - } - } - - &:hover { - .controls { - @include opacity(0.4); - - &:hover { - @include opacity(1); - } - } - } -} - -.permalink-wrapper, -#user-controls { - height: 30px; - - .avatar { - vertical-align: top; - height: 27px; - width: 27px; - } - +.control-icons { a { - @include opacity(0.6); - @include transition(opacity, 0.3s); - - position: relative; - - z-index: 20; - - padding: 1px 4px 0; margin-right: 5px; - line-height: 24px; + &:hover { text-decoration: none; } - i { - padding: 0; - margin: 0; + i.entypo { + color: $text-grey; + font-size: $font-size-text; + line-height: $line-height; + vertical-align: middle; + &:hover { color: $text; } + &.cross { font-size: $line-height; } } - color: #fff; - - &.label { - @include box-shadow(0, 0, 2px, rgba(255,255,255,0.9)); - background-color: #000; + &.hide_conversation i { + font-size: $line-height*1.5; } - &.comment { - padding-right: 5px; - margin-right: 0; + &.delete_conversation i { + font-size: $font-size-text*1.5; } - &:hover { - @include opacity(1); + &.destroy_participation i { + color: $black; + &:hover { color: $text-dark-grey; } + } + } +} + +.stream_container, #single-post-interactions { + .control-icons { + z-index: 6; + float: right; + + .block_user, + .comment_report, + .create_participation, + .delete, + .destroy_participation, + .post_report { + display: inline-block; + } + + & > a:hover { text-decoration: none; } } -} -/* stream specific wrapper */ -#stream-interactions { - position : fixed; - top : 0; - bottom : 0; - overflow-y : auto; + .stream_element, .comment, .photo, .stream_element:hover .comment { + .control-icons > a { + @include transition(opacity); + opacity: 0; + } - #post-info { - text-align : left; - margin-top : 10px; - } - - #user-controls { - padding : 7px; + &:hover .control-icons { + & > a { opacity: 0.8; } + & > a:hover { opacity: 1; } + } } } - -.permalink-wrapper { - float : right; - margin-top : 9px; - margin-right : -5px; - margin-left : 4px; -} diff --git a/app/assets/stylesheets/new_styles/_landing.scss b/app/assets/stylesheets/new_styles/_landing.scss deleted file mode 100644 index fc070691f..000000000 --- a/app/assets/stylesheets/new_styles/_landing.scss +++ /dev/null @@ -1,113 +0,0 @@ -/* le declarations */ -#landing { - overflow : hidden; - position : absolute; - min-height : 100%; - width : 100%; - top : 0; - left : 0; - - background : { - color : #fff; - } - - #sign_up { - text-align:center; - position : relative; - z-index : 20; - - border-bottom: 1px solid #ccc; - padding-bottom:50px; - - form { - label.control-label { width : 80px !important; text-align:right; } - .controls { margin-left : 100px; } - - input[type='submit'] { - @include transition(background); - @include box-shadow(0,0,0,0); - - font-size:1.2em; - background : #99CC00; - color : #fff; - text-shadow : 0 -1px 0 #669900; - border : 1px solid $border-dark-grey; - - &:hover { - background : desaturate(#99CC00, 15%); - } - - &:active { - @include box-shadow(0,0,0,0); - background : darken(rgb(255, 77, 54), 2%); - } - } - } - } - - #invites { - margin : 20px 0; - } - - #footer { - position : absolute; - bottom : 0; - left : 0; - width : 100%; - padding : 10px 0; - color : #333; - text-align : center; - } - - #landing_banner { - .container { - position:relative; - } - - text-align:center; - padding:50px; - margin-bottom:50px; - color:#ccc; - background:#222; - - h2 { - font-weight:100; - } - - .landing-logo { - margin-bottom:15px; - height:60px; - } - - .landing-banner-right { - position:absolute; - right:0; - - a { - color:#ccc; - font-size:1.2em; - font-weight:100; - padding:5px 10px; - } - } - - .login-button { - @include border-radius(3px); - border:1px solid #666; - background:#111; - - &:hover { - background:#222; - border:1px solid $border-dark-grey; - text-decoration:none; - } - } - } - - #steps { - text-align: center; - p { - color: $text-dark-grey; - } - } -} diff --git a/app/assets/stylesheets/new_styles/_login.scss b/app/assets/stylesheets/new_styles/_login.scss index 0f9d03c36..a538a15e0 100644 --- a/app/assets/stylesheets/new_styles/_login.scss +++ b/app/assets/stylesheets/new_styles/_login.scss @@ -1,81 +1,16 @@ +#login, #forgot_password, #reset_password { - position : absolute; - top : 0; - left : 0; - padding-top : 200px; - min-width : 100%; + padding-top: 25px; - //color : #fff; - text-align : center; - - label { - text-transform: uppercase; - } - - input[type=text], - input[type=password] { - width : 120px; - } - - #huge-text { - font-family : Roboto-Light; - font-size : 200px; - color : #ddd; - text-shadow : 0 1px 0 #fff; - } - - #forgot_password_link { - margin : 40px; - color : $text-grey; - clear : all; - } -} - -#login { - padding-top: 20px; .branding-asterisk { margin: auto; width: 154px; height: 154px; + margin-bottom: 12px; } - .form-signin { - margin-bottom: 30px; - .form-control { - font-size: 16px; - height: auto; - padding: 10px; - padding-left: 40px; - } - fieldset { - margin-bottom: 20px; - } - .entypo { - position: relative; - display: inline-block; - width: 20px; - text-align: center; - top: -6px; - left: 12px; - color: $text-grey; - font-size: 20px; - } - input[type=text], input[type=password] { - &:focus { - border: 1px solid #ccc; - } - } - input[type=text] { - margin-bottom: -24px; - @include border-radius(5px, 5px, 0, 0); - } - input[type=password] { - margin-bottom: -23px; - @include border-radius(0, 0, 5px, 5px); - } - #forgot_password_link { - margin-top: 20px; - } + form.block-form { + max-width: 400px; } } diff --git a/app/assets/stylesheets/new_styles/_navs.scss b/app/assets/stylesheets/new_styles/_navs.scss new file mode 100644 index 000000000..d93871c92 --- /dev/null +++ b/app/assets/stylesheets/new_styles/_navs.scss @@ -0,0 +1,15 @@ +.nav.nav-tabs{ + li > a { + color: $text-dark-grey; + .entypo, .mentionIcon { + color: $text-dark-grey; + margin-right: 5px; + } + .mentionIcon { font-weight: 700; } + } + li.active > a { + background-color: $background-grey; + color: $black; + .entypo, .mentionIcon { color: $black; } + } +} diff --git a/app/assets/stylesheets/new_styles/_new_mixins.scss b/app/assets/stylesheets/new_styles/_new_mixins.scss deleted file mode 100644 index f2bc78db9..000000000 --- a/app/assets/stylesheets/new_styles/_new_mixins.scss +++ /dev/null @@ -1,86 +0,0 @@ -$light-grey: #999; -$pane-width: 420px; -$night-background-color : #333; -$night-text-color : #999; - -/* mixins */ -@mixin center($orient:vertical) { - display: -webkit-box; - -webkit-box-orient: $orient; - -webkit-box-pack: center; - -webkit-box-align: center; - - display: -moz-box; - -moz-box-orient: $orient; - -moz-box-pack: center; - -moz-box-align: center; - - display: box; - box-orient: $orient; - box-pack: center; - box-align: center; -} - -@mixin pane-width() { - width: $pane-width; - max-width: 100%; -} - -@mixin background-cover() { - background: no-repeat center center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; -} - -@mixin info-container-base() { - @include box-shadow(0, 6px, 20px, #000); - @include dark-hatched-bg(); - - border-top: 1px solid #555; - color: #ddd; -} - -@mixin info-container() { - @include info-container-base(); - @include border-radius(3px, 0px); - @include pane-width(); - - display: inline-block; - position: relative; - - border-right: 1px solid #444; - border-left: 1px solid #444; - - padding-top: 25px; - -/* webkit acceleration */ - -webkit-transform: translateZ(0); -} - -@mixin dark-hatched-bg() { - background-color: #444; - background-image: image-url("texture/hatched-dark.png"); -} - -@mixin photo-shadow() { - @include box-shadow(0, 3px, 15px, rgba(0,0,0,0.7)); -} - -@mixin media-text() { - font-size: 2em; - line-height: 1.2em; - padding-bottom: 0; - margin-bottom: 0; -} - -@mixin newspaper-type() { - font-family: Palatino, times, georgia, serif; -} - -@mixin centered-frame(){ - display: table-cell; - vertical-align: middle; - text-align: center; -} diff --git a/app/assets/stylesheets/new_styles/_poll.scss b/app/assets/stylesheets/new_styles/_poll.scss index ddccc0c68..c7eba90ce 100644 --- a/app/assets/stylesheets/new_styles/_poll.scss +++ b/app/assets/stylesheets/new_styles/_poll.scss @@ -1,7 +1,3 @@ -@import '../colors'; -@import '../mixins'; -@import 'new_mixins'; - .poll_form { border-top: 1px solid $border-grey; border-bottom: 1px solid $border-grey; @@ -21,7 +17,7 @@ .progress { background-image: none; - @include box-shadow(0, 0, 0); + box-shadow: 0 0 0; margin-bottom: 5px; height: 10px !important; @@ -34,7 +30,7 @@ } .submit[disabled] { cursor: default; - color: $light-grey; + color: $text-grey; &:hover, &:active { background-image: none; diff --git a/app/assets/stylesheets/new_styles/_registration.scss b/app/assets/stylesheets/new_styles/_registration.scss index 90e053807..7d006d187 100644 --- a/app/assets/stylesheets/new_styles/_registration.scss +++ b/app/assets/stylesheets/new_styles/_registration.scss @@ -1,48 +1,49 @@ #registration { - position:absolute; - min-width: 100%; - min-height: 100%; - background-color : #afc652; - color: #fff; - - #create-something-text { - font-family : Roboto-Light; - font-size : 100px; - line-height : 100px; - white-space : nowrap; + .ball { + height: 633px; + max-width: 100%; + background: image-url("branding/ball.png") no-repeat; + background-size: contain; } - #diaspora-hearts { - font-family : Roboto-Light; - font-size : 24px; - margin-top : 0.2em; - margin-bottom : 1em; - white-space : nowrap; - } + .v-center { + display: table; + height: 633px; - #sign-up-text { - font-family : Roboto-Bold; - color : #7f9448; - margin-bottom : 0.5em; - } + .content { + display: table-cell; + vertical-align: middle; - #collage { - width : 344px; - height : auto; - max-width : 95%; + #pod-name { + text-align: center; + margin: 12px; + font-size : 35px; + } + } } form { - .control-label, - .controls { - margin-left : auto; - width : auto; + max-width: 400px; + + .captcha_img { + position: absolute; + left: 10px; + width: 120px; + top: 169px; } - .controls { - float : right; + #user_captcha { + font-size: 16px; + height: 40px; + padding: 10px 10px 10px 130px; + line-height: $line-height; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid $border-grey; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; } - + #terms > a { color: inherit; text-decoration: underline; diff --git a/app/assets/stylesheets/new_styles/_settings.scss b/app/assets/stylesheets/new_styles/_settings.scss index d5324108c..f0679ed8a 100644 --- a/app/assets/stylesheets/new_styles/_settings.scss +++ b/app/assets/stylesheets/new_styles/_settings.scss @@ -13,5 +13,8 @@ } #profile_photo_upload .avatar { - max-width: 150px; -} \ No newline at end of file + height: auto; + width: auto; + max-width: 200px; + margin-bottom: 10px; +} diff --git a/app/assets/stylesheets/new_styles/_spinner.scss b/app/assets/stylesheets/new_styles/_spinner.scss index ff0ee7161..49086f97e 100644 --- a/app/assets/stylesheets/new_styles/_spinner.scss +++ b/app/assets/stylesheets/new_styles/_spinner.scss @@ -1,23 +1,13 @@ -@-webkit-keyframes fade-in { +@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } -@-webkit-keyframes spin { +@keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } -@-moz-keyframes fade-in { - 0% { opacity: 0; } - 100% { opacity: 1; } -} - -@-moz-keyframes spin { - 0% { -moz-transform: rotate(0deg); } - 100% { -moz-transform: rotate(360deg); } -} - #paginate, #infscr-loading { margin-top: 10px; padding: 8px 0; @@ -28,16 +18,12 @@ } .loaded { - -webkit-animation: fade-in 0.16s linear; - -moz-animation: fade-in 0.16s linear; + animation: fade-in 0.16s linear; } .loader { - -webkit-mask-image: image-url('static-loader.png'); - -webkit-animation: spin 1s infinite ease-in-out, - fade-in 0.2s ease-in; - -moz-animation: spin 1s infinite ease-in-out, - fade-in 0.2s ease-in; + mask-image: image-url('static-loader.png'); + animation: spin 1s infinite ease-in-out, fade-in 0.2s ease-in; background-image : image-url("static-loader.png"); diff --git a/app/assets/stylesheets/new_styles/_statistics.scss b/app/assets/stylesheets/new_styles/_statistics.scss new file mode 100644 index 000000000..30a9a871b --- /dev/null +++ b/app/assets/stylesheets/new_styles/_statistics.scss @@ -0,0 +1,28 @@ +.page-statistics { + h1{ text-align: center; } + + h3{ + margin: 0px; + padding: 10px; + background-color: $green; + } + + .span-3 { + width: 30%; + height: 150px; + text-align: center; + border: 1px solid $border-grey; + margin-bottom: 10px; + border-radius: 5px; + .data{ + word-wrap: break-word; + overflow: hidden; + margin-top: 25px; + font-size: 25px; + line-height: 30px; + } + .serv-disabled{ + background-color: $background-grey; + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/new_styles/_variables.scss b/app/assets/stylesheets/new_styles/_variables.scss deleted file mode 100644 index a53110274..000000000 --- a/app/assets/stylesheets/new_styles/_variables.scss +++ /dev/null @@ -1,11 +0,0 @@ -$container-width : 1170; - -$margin-between-columns : 30; -$column-width : 295 - $margin-between-columns; -$raw-two-column-width : ($column-width * 2) + ($margin-between-columns * 2) ; -$two-column-width : $raw-two-column-width - 30; //simply subtract an arbitrary ammount :) - -$margin-between-rows : 20; - -$row-height : $column-width; -$two-row-height : $raw-two-column-width - 20; diff --git a/app/assets/stylesheets/new_styles/_viewer_nav.scss b/app/assets/stylesheets/new_styles/_viewer_nav.scss deleted file mode 100644 index 36b847652..000000000 --- a/app/assets/stylesheets/new_styles/_viewer_nav.scss +++ /dev/null @@ -1,18 +0,0 @@ -@import '../mixins'; - -body.idle { - #post-nav { - @include opacity(0); - - .nav-arrow{ - &.right { - margin-right: -40px; - } - - &.left { - margin-left: -40px; - } - } - - } -} diff --git a/app/assets/stylesheets/notifications.css.scss b/app/assets/stylesheets/notifications.scss similarity index 73% rename from app/assets/stylesheets/notifications.css.scss rename to app/assets/stylesheets/notifications.scss index a2998d139..d784105c7 100644 --- a/app/assets/stylesheets/notifications.css.scss +++ b/app/assets/stylesheets/notifications.scss @@ -1,18 +1,8 @@ #notifications_container { .nav.nav-tabs{ li > a { - color: $text-dark-grey; - .entypo { - color: $text-dark-grey; - margin-right: 5px; - } .badge.badge-default { display: none; } } - li.active > a { - background-color: $background-grey; - color: $black; - .entypo { color: $black; } - } } .stream { @@ -25,14 +15,31 @@ margin-bottom: 10px; } + .year_container { margin-top: 40px; } + .year { + background-color: $white; + color: $text-grey; + font-size: 40px; + line-height: 40px; + margin-bottom: -20px; + text-align: center; + } + + .year_container + .day_group { + border-top: 1px solid $border-grey; + padding-top: 60px; + } + + .day_group + .day_group { + border-top: 1px dashed $border-grey; + margin-top: 10px; + padding-top: 10px; + } + .day_group { - margin-bottom: 10px; - padding-bottom: 10px; - border-bottom: 1px dashed $border-grey; - &:last-child { border-bottom: none; } .date { text-align: center; - color: $light-grey; + color: $text-grey; .day { font-size: 40px; line-height: 40px; @@ -88,5 +95,7 @@ } .pagination { text-align: center; } + + .no_notifications { text-align: center; } } } diff --git a/app/assets/stylesheets/oembed.scss b/app/assets/stylesheets/oembed.scss new file mode 100644 index 000000000..592ca5a76 --- /dev/null +++ b/app/assets/stylesheets/oembed.scss @@ -0,0 +1,12 @@ +.oembed { + background: image-url("ajax-loader2.gif") no-repeat center center; + width: 100%; + .thumb, iframe { margin: 10px auto; } + .thumb { + @include video-overlay; + } + iframe, .thumb img { + width: 100%; + min-height: 60%; + } +} diff --git a/app/assets/stylesheets/opengraph.css.scss b/app/assets/stylesheets/opengraph.scss similarity index 100% rename from app/assets/stylesheets/opengraph.css.scss rename to app/assets/stylesheets/opengraph.scss diff --git a/app/assets/stylesheets/people.css.scss b/app/assets/stylesheets/people.css.scss deleted file mode 100644 index 682d412a9..000000000 --- a/app/assets/stylesheets/people.css.scss +++ /dev/null @@ -1,17 +0,0 @@ -#people_search { - #people_stream { - .stream_element { - border-bottom: 1px solid $border-grey; - padding-right: 10px; - .avatar { - width: 50px; - height: 50px; - } - .info { font-size: 11px; } - } - } - #search_title { - .term { font-weight: 700; } - small { margin-left: 15px; } - } -} diff --git a/app/assets/stylesheets/people.scss b/app/assets/stylesheets/people.scss new file mode 100644 index 000000000..c217dcca4 --- /dev/null +++ b/app/assets/stylesheets/people.scss @@ -0,0 +1,29 @@ +#people_search { + #search_title { + .term { font-weight: 700; } + small { margin-left: 15px; } + } +} +#people_stream { + .media, .media-body { + overflow: visible; + } + .stream_element.media { + border-bottom: 1px solid $border-grey; + padding: 10px; + margin: 0px; + font-size: 13px; + line-height: 16px; + min-height: 50px; + .avatar { + width: 50px; + height: 50px; + } + .btn-group.aspect_membership_dropdown { margin: 12px 0; } + .thats_you { + line-height: 50px; + margin-right: 10px; + } + .info { font-size: 11px; } + } +} diff --git a/app/assets/stylesheets/photo.css.scss b/app/assets/stylesheets/photo.css.scss deleted file mode 100644 index 5450bff44..000000000 --- a/app/assets/stylesheets/photo.css.scss +++ /dev/null @@ -1,19 +0,0 @@ -.photo { - .controls:first-child { - .control_icon { - @include transition(opacity); - @include opacity(0); - } - } - - &:hover { - .controls:first-child { - .control_icon { - @include opacity(0.3); - } - .control_icon:hover { - @include opacity(1); - } - } - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/poll.css.scss b/app/assets/stylesheets/poll.css.scss deleted file mode 100644 index 590dd8502..000000000 --- a/app/assets/stylesheets/poll.css.scss +++ /dev/null @@ -1,32 +0,0 @@ -@import 'new_styles/poll'; - -.poll_form { - .pull-right { - float: right; - } - label { - display: block; - font-size: 13px; - font-weight: normal; - line-height: 20px; - padding-left: 20px; - - input[type=radio] { - float: left; - margin-left: -20px; - } - &:HOVER { - cursor: pointer; - } - } - .progress { - overflow: hidden; - background-color: #f6f6f6; - @include border-radius(4px); - - .bar { - height: 100%; - float: left; - } - } -} diff --git a/app/assets/stylesheets/popover.css.scss b/app/assets/stylesheets/popover.css.scss deleted file mode 100644 index 1e29e5d5f..000000000 --- a/app/assets/stylesheets/popover.css.scss +++ /dev/null @@ -1,28 +0,0 @@ -.popover { - .close { - @include opacity(0); - @include transition(opacity, 0.2s); - position: relative; - top: 1px; - right: -5px; - float: right; - .icons-deletelabel { - height: 14px; - width: 14px; - } - - img { margin-top: 10px; } - } - - &:hover { - .close { - @include opacity(0.5); - - &:hover { @include opacity(1); } - } - } -} -body { - .popover { z-index: 1000; } -} - diff --git a/app/assets/stylesheets/popup.css.scss b/app/assets/stylesheets/popup.css.scss deleted file mode 100644 index c1391081d..000000000 --- a/app/assets/stylesheets/popup.css.scss +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2010-2011, Diaspora Inc. This file is -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -@import "mixins"; -@import "colors"; - -body, html{ - padding: 20px; -} - -body, html, header, footer, ul{ - padding: 0; - margin: 0; -} - -header, -footer{ - width: 100%; - left: 0; -} - -header{ - top: 0; -} - -footer{ - bottom: 0; - padding: 5px 0; - color: #444; -} - -header{ - position: relative; - font-size: 12px; - padding-top: 8px; - padding-bottom: 0px; - font-weight: 700; - color: #fff; - vertical-align: top; - margin-bottom: 20px; - - #asterisk{ - position: relative; - margin-right: 3px; - top: -2px; - left: 10px; - margin-right: 14px; - } -} - -footer{ - position: absolute; - background-color: $background-grey; - border-top: 1px solid #ccc; - bottom: 0; - left: 0; -} - -#popup-contents{ - width: 700px; - text-align:center; -} - -#popup-content-left, -#popup-content-right{ - text-align: left; - display: inline-block; - vertical-align: top; - padding: 20px; -} - -#popup-content-left{ - width: 400px; -} - -#popup-content-right{ - width: 200px; - border-left: 3px solid #555; - text-align: center; -} - -ul#requested-scopes{ - padding-left: 20px; - margin-top: 5px; - - li{ - position: relative; - padding: 5px; - padding-left: 50px; - min-height: 40px; - margin-bottom: 15px; - } - - .scope-photo{ - height: 35px; - width: 35px; - left: 0; - position: absolute; - - *{ - max-height: 100%; - max-width: 100%; - } - } -} diff --git a/app/assets/stylesheets/post-content.scss b/app/assets/stylesheets/post-content.scss new file mode 100644 index 000000000..3300d25f5 --- /dev/null +++ b/app/assets/stylesheets/post-content.scss @@ -0,0 +1,21 @@ +.post-content { + .photo_attachments { + margin-top: 7px; + padding-bottom: 10px; + text-align: center; + img { + &.big_stream_photo { + display: block; + max-width: 100%; + } + &.thumb_small { + display: inline; + max-width: 50px; + max-height: 50px; + } + margin-left: auto; + margin-right: auto; + padding-bottom: 5px; + } + } +} diff --git a/app/assets/stylesheets/profile.css.scss b/app/assets/stylesheets/profile.css.scss deleted file mode 100644 index a826ca2ba..000000000 --- a/app/assets/stylesheets/profile.css.scss +++ /dev/null @@ -1,125 +0,0 @@ - -.profile_photo { - img { - height: auto; - width: 200px; - } -} - -#profile { - h3 { margin-bottom: 0; } - ul { - margin: 0; - padding: 0; - } - - ul#profile_information { - margin: 1em 0; - > li { - margin-bottom: 2em; - margin-right: 2em; - h4 { font-weight: bold; } - } - } - - .image_list { - .section { - margin-bottom: 4px; - } - img { - height: 45px; - width: 45px; - } - } - - .blocked { - background-color: rgb(244, 42, 42); - .profile_button { - width: 150px; - } - } - .mutual { - background-color: rgb(142, 222, 61); - .profile_button { - width: 50px; - } - } - .only_sharing { - background-color: rgb(142, 222, 61); - .profile_button { - width: 150px; - } - } - .receiving { - background-color: rgb(211, 211, 211); - .profile_button { - width: 75px; - } - } - .not_sharing { - background-color: rgb(211, 211, 211); - .profile_button { - width: 150px; - } - } - - #profile_buttons { - width: 190px; - padding-right: 10px; - height: 28px; - text-align: center; - @include border-bottom-radius(8px); - - .sharing_message_container { - float: left; - padding: 5px 1px; - @include opacity(0.3); - background-color: white; - @include border-bottom-left-radius(8px); - } - - .profile_button { - display: inline-block; - text-align: center; - } - - a { @include opacity(0.5); } - a:hover { @include opacity(1); } - - .icons-check_yes_ok { - display: inline-block; - height: 18px; - width: 18px; - } - .icons-circle { - display: inline-block; - height: 18px; - width: 18px; - } - .icons-ignoreuser { - display: inline-block; - height: 14px; - width: 14px; - margin: 7px 0; - } - .icons-mention { - display: inline-block; - height: 18px; - width: 19px; - margin: 5px 0; - } - .icons-message { - display: inline-block; - height: 18px; - width: 25px; - margin: 5px 0; - } - .white_bar { - display: inline-block; - height: 18px; - width: 1px; - background-color: white; - margin: 5px 0; - } - } -} diff --git a/app/assets/stylesheets/profile.scss b/app/assets/stylesheets/profile.scss new file mode 100644 index 000000000..7c868ff55 --- /dev/null +++ b/app/assets/stylesheets/profile.scss @@ -0,0 +1,130 @@ +#profile_container { + .profile_header { + margin-bottom: 20px; + border-left: 1px solid #dddddd; + padding-left: 10px; + padding-top: 20px; + margin-left: -10px; + margin-top: -20px; + + #edit_profile, #unblock_user_button, .aspect_dropdown { + margin-top: 5px; + margin-right: 10px; + } + + #author_info { + h2 { + line-height: 35px; + margin-top: 10px; + margin-bottom: 0px; + } + #name { + font-weight: 700; + } + #diaspora_handle { + color: $text-grey; + font-size: 20px; + } + #sharing_message { + cursor: default; + font-size: 20px; + &.circle { + color: $text-grey; + &:before { content: '\26aa'; } + } + &.entypo.check { color: darken($green,20%); } + } + .description { + margin-bottom: 20px; + .tag { + background-color: transparent; + font-size: $font-size-text; + } + .tag:not(.entypo) { + font-weight: 700; + } + .entypo.tag { + margin: 0 5px; + font-weight: normal; + &:hover {text-decoration: none;} + } + } + } + + #profile_horizontal_bar { + border-top: 1px dashed $border-grey; + border-bottom: 1px solid $border-grey; + min-height: 50px; + margin-top: 10px; + #profile_buttons { + padding: 10px 0; + > .profile_button { + text-decoration: none; + cursor: pointer; + margin-right: 25px; + .entypo.profile-header-icon, .profile-header-icon { + font-size: 24.5px; + line-height: 30px; + color: lighten($black,75%); + &:hover { color: $black; } + } + #mention_button { font-weight: 700; } + } + } + + ul#profile_nav { + list-style: none; + margin: 0; + > li { + display: inline-block; + &.active { + border-bottom: 3px solid $creation-blue; + a { + color: $black; + .entypo { color: $black; } + } + } + a { + padding: 10px 15px; + font-size: 16px; + line-height: 46px; + color: lighten($black,50%); + .entypo { + color: lighten($black,50%); + margin-right: 2px; + } + &:hover { + color: $black; + .entypo { color: $black; } + text-decoration: none; + } + } + } + } + } + } + + #profile { + padding: 10px 20px; + #profile_photo { + margin-top: 10px; + padding-bottom: 10px; + border-bottom: 1px dashed $border-grey; + text-align: center; + } + + ul#profile_information { + margin: 0; + list-style: none; + overflow-x: hidden; + word-wrap: break-word; + > li { + margin-bottom: 2em; + h4 { font-weight: bold; } + } + } + + } + + .stream_container > .pagination { text-align: center; } +} diff --git a/app/assets/stylesheets/publisher.css.scss b/app/assets/stylesheets/publisher.scss similarity index 85% rename from app/assets/stylesheets/publisher.css.scss rename to app/assets/stylesheets/publisher.scss index 696f573d6..462a13080 100644 --- a/app/assets/stylesheets/publisher.css.scss +++ b/app/assets/stylesheets/publisher.scss @@ -1,32 +1,33 @@ #publisher { z-index: 1; color: $text-grey; - + &.closed { #button_container, #location_container, #hide_publisher, #photodropzone_container, + .counter, .options_and_submit { display: none !important; } - + #publisher_textarea_wrapper { border: 1px solid $border-grey !important; } } - + .mentions-autocomplete-list ul { width: 100% !important; } - + form { margin: 0; #fileInfo { display: none !important; } #hide_publisher { margin-top: 10px; } - + #publisher_spinner { text-align: center; } - + .options_and_submit { #publisher_service_icons { .btn-link { text-decoration: none; } @@ -36,7 +37,7 @@ padding-left: 5px; padding-right: 5px; } - .dim { @include opacity(0.3); } + .dim { opacity: 0.3; } .social_media_logos-wordpress-16x16 { display: inline-block; height: 16px; @@ -44,13 +45,13 @@ } } } - + #publisher_textarea_wrapper { background-color: white; border-radius: 3px; border: 1px solid $border-dark-grey; - input[type='text'] { + input[type='text']#status_message_text { border: none; box-shadow: none; margin: none; @@ -67,7 +68,7 @@ &.active textarea { min-height: 70px; } - + .help-block { font-size: 13px; line-height: 30px; @@ -76,36 +77,40 @@ color: lighten($text-grey,20%); a { color: lighten($blue,20%); } } - + .mentions-input-box .mentions { - padding: 4px 6px !important; - line-height: 20px !important; - width: 100% !important; + line-height: $line-height !important; } &.with_attachments .row-fluid#photodropzone_container { - border-top: 1px dashed $border-grey; + border-top: 1px dashed $border-grey; } - #poll_creator_wrapper { - display:none; + .row-fluid#poll_creator_container { + display: none; border-top: 1px dashed $border-grey; padding:4px 6px 4px 6px; box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + .remove-answer.entypo.cross { + display: none; + color: lighten($black,75%); + &.active { display: block; } + &:hover { color: $black; } + line-height: 30px; + font-size: 18px; + cursor: pointer; + } } &.with_location .row-fluid#location_container { height: 30px; - #hide_location { display: none !important; } border-top: 1px dashed $border-grey; - input[type='text'] { + input[type='text'] { margin-bottom: 0; color: $text-grey; } } - &.active .row-fluid#button_container { + &.active .row-fluid#button_container { border-top: 1px solid $border-grey; } @@ -120,13 +125,13 @@ overflow: hidden; line-height: 80px; vertical-align: middle; - + img { vertical-align: middle; width: 80px; } - .x { + .x { display: none; width: 50px; height: 50px; @@ -139,11 +144,11 @@ font-style: bold; position: absolute; z-index: 2; - @include opacity(0.85); + opacity: 0.85; cursor: pointer; top: 15px; left: 15px; - + &:before { content: '\2716'; font-family: 'entypo'; @@ -153,17 +158,17 @@ &:hover .x { display: inline-block; } - - .progress { + + .progress { width: 100%; height: 20px; margin: 30px 0; } - + .ajax-loader { display: none; } } } - + #upload_error { color: white; font-style: bold; @@ -171,7 +176,7 @@ background-color: $red; text-align: center; } - + #publisher-images { margin-right: 5px; #file-upload, @@ -181,13 +186,13 @@ text-decoration: none !important; font-size: 16px; padding: 4px 5px; - i { + i { color: $text-grey; } &:hover{ i { color: black; } } - input[type='file'] { + input[type='file'] { cursor: pointer; &::-webkit-file-upload-button { cursor: pointer; @@ -207,7 +212,7 @@ height: 30px; line-height: 30px; position: absolute; - right: 70px; + right: 100px; bottom: -31px; font-size: 13px; } @@ -220,7 +225,7 @@ .exceeded { color: red; } - } + } } .aspect_dropdown { diff --git a/app/assets/stylesheets/publisher_blueprint.css.scss b/app/assets/stylesheets/publisher_blueprint.css.scss deleted file mode 100644 index 9c81db04c..000000000 --- a/app/assets/stylesheets/publisher_blueprint.css.scss +++ /dev/null @@ -1,409 +0,0 @@ -#publisher { - z-index: 1; - color: $text-grey; - position: relative; - margin-top: 0; - margin-bottom: 0; - padding: 0 12px 22px 12px; - top: 0; - border-bottom: 1px #eee solid; - - form { - textarea { - resize: none; - height: 50px; - margin: 0; - } - } - - &.mention_popup { - padding: 1px 12px; - margin-bottom: 0; - border-bottom: none; - } - - &.closed { - .options_and_submit { - display: none !important; - } - - .counter { - display: none; - } - } - - &:not(.closed) { - textarea { - margin-bottom: 30px; - } - } - - .mentions-autocomplete-list ul { - width: 483px; - } - - #publisher_spinner { - clear: both; - margin-bottom: -2px; - min-height: 21px; - padding-top: 6px; - position: relative; - text-align: center; - } - - .options_and_submit { - min-height: 21px; - clear: both; - position: relative; - padding-top: 6px; - margin-bottom: -2px; - - input { - display: inline; - } - - .public_toggle { - text-align: right; - .dropdown { - text-align: left; - } - - .icons-monotone_wrench_settings { - display: inline-block; - width: 16px; - height: 16px; - } - - a.question_mark { - text-decoration: none; - } - } - - #publisher_service_icons { - position: relative; - top: 3px; - margin-right: 10px; - - .social_media_logos-facebook-16x16, - .social_media_logos-twitter-16x16, - .social_media_logos-tumblr-16x16, - .social_media_logos-wordpress-16x16, - .social_media_logos-email-16x16, - .social_media_logos-feed-16x16, - .social_media_logos-website-16x16 { - display: inline-block; - height: 16px; - width: 16px; - } - } - - #fileInfo { - display: inline; - position: relative; - top: -2px; - } - } - - #status_message_fake_text { - min-height: 20px; - } - - .content_creation { - margin-top: 1em; - } - - #file-upload { - bottom: 1px !important; - display: inline-block; - margin: 0; - padding: .3em .3em 3px; - position: absolute !important; - right: 6px; - cursor: pointer; - - input[type='file'] { - cursor: pointer; - right: initial !important; - height: 100%; - width: 100%; - &::-webkit-file-upload-button { - cursor: pointer; - } - } - - img { - @include opacity(0.4); - vertical-align: bottom; - } - - &:hover { - color: $text-dark-grey; - cursor: pointer; - - img { - @include opacity(0.8); - } - } - - &:active { - color: #444; - text-shadow: 0 1px 0 #fafafa; - - img { - @include opacity(1); - } - } - - &.loading { - @include opacity(0.5); - } - } -} - -#publisher_textarea_wrapper { - #hide_publisher { - @include opacity(0.3); - z-index: 5; - padding: 3px; - position: absolute; - right: 6px; - margin-top: 9px; - - .icons-deletelabel { - height: 14px; - width: 14px; - } - - &:hover { - @include opacity(1); - } - } - - .markdownIndications { - position: absolute; - bottom: 0px; - } - - @include border-radius(2px); - - border: 1px solid #ccc; - background: #fff; - - &.active { - border: 1px solid $border-dark-grey; - } - - position: relative; - padding-right: 10px; - - textarea { - z-index: 2; - border: none; - - &:focus { - outline: 0; - background: transparent; - } - } - - &.with_attachments { - padding-bottom: 38px; - } - - #photodropzone { - z-index: 3; - position: absolute; - bottom: 15px; - right: 35px; - width: 430px; - left: 5px; - padding: 0; - - li { - display: inline-block; - margin-right: 4px; - img { - width: 50px; - max-height: 55px; - } - .circle { - @include border-radius(20px); - - display: none; - z-index: 1; - position: absolute; - right: -7px; - top: -5px; - background-color: #333; - - width: 20px; - max-width: 20px; - height: 20px; - max-height: 20px; - border: 1px solid #fff; - } - - .x { - display: none; - z-index: 2; - position: absolute; - top: -3px; - right: -1px; - font-size: small; - font-weight: bold; - &:before { - content: 'X'; - } - } - - &:hover { - cursor: default; - .circle { - display: block; - } - .x { - display: block; - } - } - } - } - - .counter { - position: absolute; - font-size: 13px; - padding: 12px 0 0 5px; - } - .warning { - color: orange; - } - .exceeded { - color: red; - } -} - -#publisher.closed { - #publisher_textarea_wrapper #hide_publisher, - .markdownIndications { - display: none; - } -} - -#publisher_photo_upload { - position: absolute; - display: inline; - left: 600px; - top: 0; - z-index: 10; -} - -#publisher-images { - padding-left: 5px; - - #locator { - bottom: 1px !important; - display: inline-block; - margin: 0; - position: absolute !important; - right: 30px; - cursor: pointer; - img { - padding-top: 2px; - @include opacity(0.4); - } - &:hover { - color: $text-dark-grey; - cursor: pointer; - img { - @include opacity(0.8); - } - } - } - #poll_creator { - bottom: 1px !important; - display: inline-block; - margin: 0; - cursor: pointer; - position: absolute !important; - right: 55px; - i { - @include opacity(0.4); - } - &:hover { - color: $text-dark-grey; - cursor: pointer; - i { - @include opacity(1); - } - } - } - - .btn { - height: 19px; - width: 19px; - } -} - -#publisher-poll-creator { - border: 1px solid $border-dark-grey; - padding: 5px; - margin-top: 5px; - @include border-radius(2px); - display: none; - - &.active { - display: block; - } - input { - -moz-box-sizing: border-box; - box-sizing: border-box; - margin-bottom: 0px; - } - .poll-question input { - width: 100%; - } - .controls { - float: none; - z-index: none; - } - .control-group { - &.error { - color: $red; - background: transparent; - border: none; - padding: 0px; - - input { - border-color: $red; - } - } - } - .poll-answer { - input { - width: 96%; - display: inline-block; - vertical-align: bottom; - } - .remove-answer { - width: 14px; - height: 14px; - @include opacity(0.4); - cursor: pointer; - vertical-align: top; - margin-top: 7px; - display: none; - - &:hover { - @include opacity(1); - } - &.active { - display: inline-block; - } - } - } - .control-group { - margin-bottom: 5px; - } - .add-answer { - padding-top: 5px; - } -} diff --git a/app/assets/stylesheets/report.css.scss b/app/assets/stylesheets/report.scss similarity index 100% rename from app/assets/stylesheets/report.css.scss rename to app/assets/stylesheets/report.scss diff --git a/app/assets/stylesheets/rtl.css.scss b/app/assets/stylesheets/rtl.scss similarity index 98% rename from app/assets/stylesheets/rtl.css.scss rename to app/assets/stylesheets/rtl.scss index 0cbfb9b8c..b46cf4d8b 100644 --- a/app/assets/stylesheets/rtl.css.scss +++ b/app/assets/stylesheets/rtl.scss @@ -251,10 +251,6 @@ ul.comments li form p, ul.show_comments li form p, div.likes li form p, div.disl right: 35px; } -ul.comments li.posted .controls .delete { - float: left -} - .stream .stream_element time { right: auto; left: 20px; diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss deleted file mode 100644 index 931b39d5f..000000000 --- a/app/assets/stylesheets/scaffolds.css.scss +++ /dev/null @@ -1,56 +0,0 @@ -body { - background-color: #fff; - color: #333; - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; } - -p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; } - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; } - -a { - color: #000; - &:visited { - color: $text-dark-grey; } - &:hover { - color: #fff; - background-color: #000; } } - -div { - &.field, &.actions { - margin-bottom: 10px; } } - -#notice { - color: green; } - -.field_with_errors { - padding: 2px; - background-color: red; - display: table; } - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; } - ul li { - font-size: 12px; - list-style: square; } } diff --git a/app/assets/stylesheets/sessions.css.scss b/app/assets/stylesheets/sessions.css.scss deleted file mode 100644 index f693641f0..000000000 --- a/app/assets/stylesheets/sessions.css.scss +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2010-2011, Diaspora Inc. This file is -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -@font-face { - font-family: 'BrandonGrotesqueLightRegular'; - src: url('brandongrotesque_light/Brandon_light-webfont.eot'); - src: local('☺'), url('brandongrotesque_light/Brandon_light-webfont.woff') format('woff'), url('brandongrotesque_light/Brandon_light-webfont.ttf') format('truetype'), url('brandongrotesque_light/Brandon_light-webfont.svg#webfont') format('svg'); - font: { - weight: normal; - style: normal; - } -} - -#flash_notice, -#flash_error, -#flash_alert { - z-index: 100; - top: 32px; - position: absolute; - color: #000; - width: 400px; - margin: 0 0 0 -200px; - left: 50%; - text-align: center; - font-size: 14px; - padding: 3px 0; -} - -#flash_notice { - background-color: #CFC; - border: solid 1px #6C6; -} - -#flash_error, -#flash_alert { - background-color: #FCC; - border: solid 1px #C66; -} - -.fieldWithErrors { - display: inline; -} - -.error_messages { - width: 400px; - border: 2px solid #CF0000; - padding: 0; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; - font-size: 12px; - h2 { - text-align: left; - padding: 5px 5px 5px 15px; - margin: 0; - font: { - weight: bold; - size: 12px; - } - background-color: #c00; - } - p { - margin: 8px 10px; - } - ul { - margin: 0; - } -} - -/* via blueprint */ -html { - font-size: 100.01%; -} - -/* via blueprint */ -body { - font: { - size: 75%; - family: "Helvetica Neue", Arial, Helvetica, sans-serif; - } - color: #222; - background: #fff; - - margin-left: 100px; -} - -/* via blueprint */ -input[type=text], -input[type=password], -textarea, select { - background-color: #fff; - border: 1px solid #bbb; -} - -/* via blueprint */ -input[type=text]:focus, -input[type=password]:focus, -input.text:focus, -input.title:focus, -textarea:focus, select:focus { - border-color: #666; -} - -#huge_text { - font: { - size: 40px; - family: 'BrandonGrotesqueLightRegular'; - } - line-height: 120px; - color: #333; - text-shadow: 0 1px 1px #999; -} - -input { - font-size: 14px; -} - -form p { - position: relative; - padding: 0; -} - -label { - color: #999; - position: absolute; - padding-top: 7px; - left: 8px; - font: { - size: 14px; - weight: normal; - } -} - -input[type='text'], -input[type='password'] { - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - padding: 0.3em; - width: 395px; - border-top: 1px solid #999; -} - -#user { - display: inline; - width: 500px; - .username { - width: 200px; - display: inline; - - input { - display: inline; - width: 200px; - } - } - - .user_network { - width: 200px; - display: inline; - font-size: 18px; - } -} - diff --git a/app/assets/stylesheets/sidebar.css.scss b/app/assets/stylesheets/sidebar.css.scss deleted file mode 100644 index 613e78ed8..000000000 --- a/app/assets/stylesheets/sidebar.css.scss +++ /dev/null @@ -1,194 +0,0 @@ -#home_user_badge { - min-height: 50px; - margin-bottom: 20px; - margin-left: 4px; - - img { - float: left; - } - - h4 { - margin-left: 60px; - padding-top: 15px; - overflow: hidden; - text-overflow: ellipsis; - - a { - color: inherit; - font-weight: bold; - } - } -} - -#leftNavBar { - float: left; - margin: 0px; - margin-right: 10px; -} - -#stream_selection { - & > li { - margin-bottom: 10px; - } -} - -#aspects_list { - .icons-check_yes_ok { - height:18px; - width:18px; - background: url('icons/check_yes_ok.png') no-repeat; - float: left; - visibility: hidden; - } - - .selected { - visibility: visible; - } - - .selected + a { - color: #333333; - } -} - -.modify_aspect { - background: url("icons/pencil.png") no-repeat; - width: 12px; - height: 12px; - display: inline-block; -} - -#tags_list { - .delete_tag_following { - background: url("icons/deletelabel.png") no-repeat; - } - - /* ---- override app/stylesheets/vendor/autoSuggest.css ---- */ - .tag_input { - width: 100%; - } - - .as-result { - margin-top: -1px; - margin-left: 1px; - } - - .as-list { - em { - background-color: #aabbcc; - color: black; - padding: 0px; - } - - color: black; - position: static; /* override absolute */ - margin: 0px; - border-radius: 0px 0px 3px 3px; - box-shadow: 0px 1px 1px #666; - } - - .as-result-item.active { - color: black; - text-shadow: none; - background-color: $background-blue; - border-color: $background-blue; - } - /* ---- end override app/stylesheets/vendor/autoSuggest.css ---- */ -} - -.rightBar { - .section { - margin-bottom: 20px; - - .title { - position: relative; - border-bottom: 1px solid $border-grey; - padding-bottom: 2px; - - &.no_icon { padding-left: 8px; } - - .right { - right: 4px; - top: 3px; - font-size: smaller; - font-weight: bold; - color: $text-dark-grey; - } - - .icons-plus, - .icons-heart, - .icons-question, - .icons-monotone_wrench_settings, - .icons-coffee, - .icons-mail, - .icons-bookmark { - position: absolute; - margin-left: 3px; - } - - .icons-plus { - width: 14px; - height: 14px; - } - - .icons-heart { - width: 13px; - height: 12px; - } - - .icons-question, - .icons-monotone_wrench_settings { - width: 16px; - height: 16px; - } - - .icons-bookmark { - width: 14px; - height: 16px; - } - - .icons-coffee { - width: 16px; - height: 14px; - } - - .icons-mail { - width: 16px; - height: 13px; - } - - - h5.title-header { - margin-left: 22px; - } - - h5 { - font-size: 12px; - margin: 0; - color: $text-dark-grey; - } - } - - .content { - padding: 8px; - color: $text-grey; - font-size: 11px; - - p, ul { - margin: 5px 0px; - } - - ul { - padding-left: 0; - - li { - list-style: none; - } - } - - #invite_code { - width: 100%; - @include box-sizing(border-box); - } - } - } -} diff --git a/app/assets/stylesheets/sidebar.scss b/app/assets/stylesheets/sidebar.scss new file mode 100644 index 000000000..28d012ceb --- /dev/null +++ b/app/assets/stylesheets/sidebar.scss @@ -0,0 +1,61 @@ +.rightBar { + padding-top: 20px; + + .section { + margin-bottom: 20px; + + > .title { + border-bottom: 1px solid $border-grey; + padding-bottom: 2px; + + &.no_icon { padding-left: 8px; } + + h5 { + color: $text-dark-grey; + font-weight: bold; + font-size: 13px; + margin: 0; + &.title-header { margin-left: 5px; } + } + } + + .content { + color: $text-grey; + font-size: 11px; + line-height: 18px; + padding: 5px; + + p, ul { margin: 0; } + + ul { + margin-bottom: 5px; + padding-left: 0; + li { list-style: none; } + } + + & > #invite_code { + box-sizing: border-box; + font-size: 11px; + height: 30px; + width: 100%; + } + + & > #right_service_icons { + text-align: center; + padding: 10px { + bottom: 0; + }; + .social_media_logos-facebook-24x24, + .social_media_logos-twitter-24x24, + .social_media_logos-tumblr-24x24, + .social_media_logos-wordpress-24x24 { + height: 24px; + width: 24px; + } + a { + display: inline-block; + } + } + } + } +} diff --git a/app/assets/stylesheets/single-post-view.css.scss b/app/assets/stylesheets/single-post-view.css.scss deleted file mode 100644 index cf6ffa3d6..000000000 --- a/app/assets/stylesheets/single-post-view.css.scss +++ /dev/null @@ -1,261 +0,0 @@ -#single-post-container { - padding-top: 20px; -} - -#single-post-content { - border-right: solid 1px #cccccc; - padding-right: 12px; - #head { - padding-bottom: 10px; - border-bottom: 1px solid $border-grey; - #post-info { - .author{ color: $grey; } - .info { - color: lighten($text-grey,10%); - font-size: 12px; - .post-time a { color: $text-grey; } - .post_scope { margin-right: 5px; } - .status-message-location { - padding-top: 2px; - line-height: 14px; - } - } - .avatar.medium { - max-width: 75px; - } - .bd { - padding-left: 10px; - } - } - .row-fluid.reshare { - border-top: 1px solid lighten($border-grey,5%); - padding-top: 10px; - margin-top: 10px; - } - #reshare-info { - line-height: 15px; - i.retweet { - color: $text-dark-grey; - font-size: 28px; - line-height: 30px; - margin-left: 8px; - margin-right: 8px; - } - .post-time a { - color: $text-grey; - display: block; - font-size: 12px; - } - .avatar { - height: 30px; - width: 30px; - } - .img { margin-right: 10px; } - } - #single-post-actions { - padding-right: 5px; - i { - font-size: 28px; - line-height: 30px; - } - i.comment:hover { - color: #424242; - } - .post_report i.gray:hover { - color: $red; - } - i.heart.gray:hover { - color: $red; - } - i.heart.red:hover { - color: #f55f5a; - } - i.retweet:hover { - color: #3f8fba; - } - time { - float: right; - margin-left: 3px; - } - a { - margin: 0 0 0 6px; - &:hover { - text-decoration: none; - } - } - } - } - - #body { - margin-left: 20px; - padding-top: 20px; - width: auto; - p { - margin: 0 0 1em 0; - word-wrap: break-word; - } - .photo_attachments { - padding-bottom: 10px; - text-align: center; - img { - &.big_stream_photo { - display: block; - max-width: 90%; - } - &.thumb_small { - display: inline; - max-width: 50px; - max-height: 50px; - } - margin-left: auto; - margin-right: auto; - padding-bottom: 5px; - } - } - .oembed { - background: image-url("ajax-loader2.gif") no-repeat center center; - float: left; - width: 95%; - .thumb { - @include video-overlay; - } - iframe, .thumb img { - width: 100%; - min-height: 60%; - } - } - } -} - -#single-post-interactions { - border-left: 1px solid #cccccc; - position: relative; - left: -1px; - margin-left: 0; - padding-left: 15px; - - .comments .comment { - border-bottom: solid 1px #cccccc; - padding-top: 10px; - padding-bottom: 10px; - p { - margin: 0 0 1em 0; - word-wrap: break-word; - &:last-child { - margin-bottom: 0; - } - } - } - .no_comments { - padding-top: 10px; - padding-bottom: 10px; - background-color: $background-grey; - text-align: center; - @include border-radius(4px); - margin-bottom: 30px; - } - - textarea { - width: 95%; - } - .new_comment_form_wrapper { - border-bottom: none; - } - a { - color: #3f8fba; - } - .timeago { - font-size: smaller; - } - .count { - i { - display: inline-block; - text-align: center; - width: 25px; - vertical-align: middle; - } - span { - margin-left: -3px; - width: 30px; - display: inline-block; - text-align: center; - } - } - #reshares, #likes, #comments-meta { - margin-left: 7px; - margin-bottom: 8px; - } -} - -.comment { - &:hover { - .controls { - @include opacity(0.3); - } - } - - >.highlighted { - border-left: 3px solid $blue; - padding-left: 3px; - } - - .controls { - @include transition(opacity); - @include opacity(0); - z-index: 6; - float: right; - &:hover { - @include opacity(1); - } - .comment_report { - display: inline-block; - .icons-report { - height: 14px; - width: 14px; - } - } - .delete { - display: inline-block; - .icons-deletelabel { - height: 14px; - width: 14px; - } - } - a:hover { - text-decoration: none; - } - } - .submit_button { - input { - float: right; - } - padding-left: 12px; - width: 95%; - } - - .button.creation { - $button-border-color: #aaa; - @include border-radius(3px); - @include box-shadow(0,1px,1px,#cfcfcf); - @include transition(border); - @include button-gradient($creation-blue); - font: { - size: 12px; - } - color: #fff; - padding: 4px 9px; - min-width: 90px; - min-height: 10px; - border: 1px solid darken($button-border-color,20%); - - cursor: pointer; - white-space: nowrap; - - &:hover { - @include button-gradient-hover($creation-blue); - border: 1px solid darken($button-border-color,35%); - text-decoration: none; - } - } -} - diff --git a/app/assets/stylesheets/single-post-view.scss b/app/assets/stylesheets/single-post-view.scss new file mode 100644 index 000000000..c5a5684a1 --- /dev/null +++ b/app/assets/stylesheets/single-post-view.scss @@ -0,0 +1,149 @@ +#single-post-container { + padding-top: 20px; +} + +#single-post-content { + border-right: solid 1px #cccccc; + padding-right: 12px; + #head { + padding-bottom: 10px; + border-bottom: 1px solid $border-grey; + #post-info { + .author{ color: $grey; } + .info { + color: lighten($text-grey,10%); + font-size: 12px; + .post-time a { color: $text-grey; } + .post_scope { margin-right: 5px; } + .status-message-location { + padding-top: 2px; + line-height: $font-size-text; + } + } + .bd { + padding-left: 10px; + } + } + .row-fluid.reshare { + border-top: 1px solid lighten($border-grey,5%); + padding-top: 10px; + margin-top: 10px; + } + #reshare-info { + line-height: 15px; + i.retweet { + color: $text-dark-grey; + font-size: 28px; + line-height: 30px; + margin-left: 8px; + margin-right: 8px; + } + .post-context { + font-size: 12px; + + #single-post-moderation { + margin-left: 5px; + + > div.control-icons { + display: inline-block; + } + } + } + .post-time a { + color: $text-grey; + font-size: 12px; + } + .avatar { + height: 30px; + width: 30px; + } + .img { margin-right: 10px; } + } + #single-post-actions { + padding-right: 5px; + i { + font-size: 28px; + line-height: 30px; + } + i.comment:hover { + color: #424242; + } + .post_report i.gray:hover { + color: $red; + } + i.heart.gray:hover { + color: $red; + } + i.heart.red:hover { + color: #f55f5a; + } + i.retweet:hover { + color: #3f8fba; + } + time { + float: right; + margin-left: 3px; + } + a { + margin: 0 0 0 6px; + &:hover { + text-decoration: none; + } + } + } + } + + #body { + margin-left: 20px; + padding-top: 20px; + width: auto; + + .oembed { width: 95%; } + .photo_attachments { + img.big_stream_photo { max-width: 90%; } + } + } +} + +#single-post-interactions { + border-left: 1px solid #cccccc; + position: relative; + left: -1px; + margin-left: 0; + padding-left: 15px; + + .comment.media .img { + margin-left: 5px; + } + + .no_comments { + padding-top: 10px; + padding-bottom: 10px; + background-color: $background-grey; + text-align: center; + border-radius: 4px; + margin-bottom: 30px; + } + + a { + color: $blue; + } + .count { + i { + display: inline-block; + text-align: center; + width: 25px; + vertical-align: middle; + } + span { + margin-left: -3px; + width: 30px; + display: inline-block; + text-align: center; + } + } + #reshares, #likes, #comments-meta { + margin-left: 7px; + margin-bottom: 8px; + } +} diff --git a/app/assets/stylesheets/sizes.scss b/app/assets/stylesheets/sizes.scss new file mode 100644 index 000000000..3679382d4 --- /dev/null +++ b/app/assets/stylesheets/sizes.scss @@ -0,0 +1,2 @@ +$font-size-text: 13px; +$line-height: 20px; diff --git a/app/assets/stylesheets/sprites.css.scss b/app/assets/stylesheets/sprites.scss similarity index 100% rename from app/assets/stylesheets/sprites.css.scss rename to app/assets/stylesheets/sprites.scss diff --git a/app/assets/stylesheets/stream-faces.css.scss b/app/assets/stylesheets/stream-faces.scss similarity index 83% rename from app/assets/stylesheets/stream-faces.css.scss rename to app/assets/stylesheets/stream-faces.scss index 4d2ae989d..b05f19f43 100644 --- a/app/assets/stylesheets/stream-faces.css.scss +++ b/app/assets/stylesheets/stream-faces.scss @@ -1,7 +1,7 @@ #selected_aspect_contacts .avatar { height: 32px; width: 32px; - margin-bottom: -2px; + margin-bottom: 2px; } .stream-faces a:hover { text-decoration: none; } diff --git a/app/assets/stylesheets/stream.scss b/app/assets/stylesheets/stream.scss new file mode 100644 index 000000000..55545d529 --- /dev/null +++ b/app/assets/stylesheets/stream.scss @@ -0,0 +1,11 @@ +.stream_container { + border-left: 1px solid $border-grey; + padding-left: 10px; + padding-top: 20px; + margin-left: -10px; + margin-top: -20px; + #publisher { + margin-bottom: 15px; + } + .well#ignore-info { text-align: center; } +} diff --git a/app/assets/stylesheets/stream_element.css.scss b/app/assets/stylesheets/stream_element.css.scss deleted file mode 100644 index 249bab9db..000000000 --- a/app/assets/stylesheets/stream_element.css.scss +++ /dev/null @@ -1,288 +0,0 @@ -.stream { - audio { - display: block; - margin: 5px 0; - } - - .stream_element { - border-bottom: 1px solid $border-grey; - - h1, h2, h3, h4, h5, h6 { - word-wrap: break-word; - word-break: break-word; - } - - p { - &:last-child { - padding-bottom: 0; - margin-bottom: 0; - } - } - - &:first-child { - border-top: none; - } - - ul { - li { - list-style: disc; - } - } - - .youtube-player, .vimeo-player { - border: none; - height: 304px; - width: 410px; - } - } -} - -.stream_element { - &.highlighted { border-left: 3px solid $blue; } - - a.author { - font-weight: bold; - unicode-bidi: bidi-override; - } - - .photo_attachments { - margin-top: 7px; - } - - img { - max-width: 100%; - } - - .bd { - > img { - height: 30px; - width: 30px; - float: left; - margin-right: 10px; - } - } - - .info { - font-size: 11px; - } - - .stream_photo { - float: left; - margin-top: 6px; - } - - .controls:first-child { - .control_icon { - @include transition(opacity); - @include opacity(0); - } - } - - &:hover { - .controls:first-child { - .control_icon { - @include opacity(0.3); - } - .control_icon:hover { - @include opacity(1); - } - } - } -} - -.status_message_show { - .comment_box { - width: 653px; - margin-bottom: 5px; - } -} - -.post_scope { - cursor: default; -} - -.stream_element .reshare, -.comment { - .avatar { - width: 30px; - height: 30px; - } -} - -.likes, -.stream_element div.reshare { - font-size: 12px; -} - -.comment, .stream_element { - >.highlighted { - border-left: 3px solid $blue; - padding-left: 3px; - } -} - -.comment.no-border { - &.media { - border: none; - padding: 0; - } -} - -.comment { - &.media { - margin-left: 0; - margin-right: 0; - - border-top: 1px dotted #aaa; - - padding-top: 10px; - - .controls { - .comment_delete, .comment_report { - @include transition(opacity); - @include opacity(0); - } - } - &:hover { - .controls { - .comment_delete, .comment_report { - @include opacity(0.3); - } - .comment_delete:hover, .comment_report:hover { - @include opacity(1); - } - } - } - } - - .youtube-player, .vimeo-player { - border: none; - height: 250px; - width: 400px; - } - - .ltr { - ol, ul { - padding-left: 2em; - li { - padding: 0px; - border: none; - list-style: inherit; - } - } - } - - .right { - right: 4px; - } -} - -.stream_element { - .new_comment_form_wrapper { - width: 415px; - } -} - -.stream_element .bd { - & > .likes, & > .comments { - margin-right: 15px; - } -} - -.status-message-location { - .near-from { - font-size: smaller; - color: #aaa; - width: 100%; - float: left; - } - .address { - font-size: 11px; - color: #bbb; - } -} - -.stream_element .post-content .reshare { - border-left: 2px solid $border-grey; -} - -.stream_element.loaded .media .bd .feedback { - clear: both; -} - -form.new_comment { - input { - display: none; - } - - textarea { - height: 21px; - font-size: 12px; - width: 364px; - } - - &.open { - input { - display: block; - } - } -} - -.stream_element { - .subject { - font-size: 13px; - font-weight: bold; - color: #444; - overflow: hidden; - white-space: nowrap; - } - - .last_author { - font-size: 12px; - color: $text-dark-grey; - } - - .collapsible { - overflow: hidden; - position: relative; - - p { - margin: 0 0 0.8em; - } - p:last-of-type { - margin: 0; - } - - .expander { - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 30px; - text-align: center; - line-height: 48px; - font-size: .8em; - color: $grey; - text-shadow: 0 0 7px #FFF; - cursor: pointer; - border-bottom: 2px solid $border-grey; - @include border-radius(0, 0, 3px, 3px); - @include linear-gradient(rgba(255,255,255,0) , #EEE, 0%, 95%); - background-color: transparent; - } - - .oembed { - background: image-url('ajax-loader2.gif') no-repeat center center; - float: left; - width: 100%; - - .thumb { - @include video-overlay(); - } - - iframe, .thumb img { - width: 100%; - } - } - } -} diff --git a/app/assets/stylesheets/stream_element.scss b/app/assets/stylesheets/stream_element.scss new file mode 100644 index 000000000..1e43245e3 --- /dev/null +++ b/app/assets/stylesheets/stream_element.scss @@ -0,0 +1,141 @@ +#main_stream .stream_element, +#main_stream > div > .photo { + & > .media { + margin: 0px; + } + &.deleting { + > .media { opacity: 0.3; } + .control-icons { display: none !important; } + } +} + +#main_stream > div > .photo { + & > .media { + overflow: visible; + > .bd { + position: relative; + overflow: inherit; + > .control-icons { + border-radius: 4px; + padding-left: 5px; + position: absolute; + right: 6px; + text-align: center; + top: 1px; + } + } + &:hover > .bd > .control-icons { background: #fff; } + } + .thumbnail { + height: 200px; + padding: 10px; + margin: 0 5px 10px; + text-align: center; + line-height: 200px; + border: 1px solid $border-grey; + background: #fefefe; + box-shadow: 3px 3px 2px #eee; + img { + &.big_photo { max-height: 200px; } + } + } +} + +#main_stream .stream_element { + border-bottom: 1px solid $border-grey; + padding: 10px; + & > .media { + & > .img > .avatar { + margin-top: 5px; + &.small { + height: 50px; + width: 50px; + } + } + .author-name { + font-weight: bold; + margin-bottom: 4px; + unicode-bidi: bidi-override; + } + a.author-name { color: $blue; } + .feedback { + margin-top: 5px; + font-size: 11px; + line-height: 11px; + } + .likes { + margin-top: 10px; + font-size: 12px; + line-height: 16px; + .bd { display: inline-block; } + .entypo.heart { + display: inline-block; + font-size: 16px; + vertical-align: top; + margin-top: -2px; + margin-right: 5px; + } + } + .stream_photo { + float: left; + margin-top: 6px; + } + .status-message-location .near-from { + font-size: 11px; + color: $text-grey; + } + .grey { color: $text-grey; } + .post-content p:last-of-type { margin-bottom: 0; } + .nsfw-shield { + color: $text-grey; + padding: 5px 10px; + background-color: $background-grey; + border: 1px solid $border-grey; + border-radius: 3px; + } + } + + div.reshare { + border-left: 2px solid $border-grey; + margin-top: 3px; + + & > .media .avatar { + margin-top: 5px; + height: 30px; + width: 30px; + } + } + + .collapsible { + overflow: hidden; + position: relative; + + .expander { + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 30px; + text-align: center; + line-height: 48px; + font-size: .8em; + color: $grey; + text-shadow: 0 0 7px #FFF; + cursor: pointer; + border-bottom: 2px solid $border-grey; + border-radius: 0 0 3px 3px; + @include linear-gradient(rgba(255,255,255,0) , #EEE, 0%, 95%); + background-color: transparent; + } + } + + &.highlighted { + padding-left: 8px; + border-left: 3px solid $creation-blue; + } + + &.post_preview { + background-color: lighten($creation-blue,45%); + border: 1px solid $creation-blue; + } +} diff --git a/app/assets/stylesheets/tag.css.scss b/app/assets/stylesheets/tag.css.scss deleted file mode 100644 index 3c5b54cc5..000000000 --- a/app/assets/stylesheets/tag.css.scss +++ /dev/null @@ -1,22 +0,0 @@ -.tag { - display: inline-block; - font-weight: bold; - &:hover { - text-decoration: underline; - background-color: lighten($blue, 47%); - } -} - -h1.tag { - border-bottom: 2px dotted $blue; - &:hover { border-bottom: 2px dotted $blue; } -} - -.info { - .tag { - background-color: #efefef; - color: $text-grey; - border-bottom: 1px dotted $border-dark-grey; - &:hover { border-bottom: 1px solid $border-dark-grey; } - } -} diff --git a/app/assets/stylesheets/tag.scss b/app/assets/stylesheets/tag.scss new file mode 100644 index 000000000..aa49a815d --- /dev/null +++ b/app/assets/stylesheets/tag.scss @@ -0,0 +1,48 @@ +.tag { + display: inline-block; + font-weight: bold; + &:hover { + text-decoration: underline; + background-color: lighten($blue, 47%); + } +} + +a.tag { color: $blue; } + +h1.tag { + border-bottom: 2px dotted $blue; + &:hover { border-bottom: 2px dotted $blue; } +} + +.info { + .tag { + background-color: #efefef; + color: $text-grey; + border-bottom: 1px dotted $border-dark-grey; + &:hover { border-bottom: 1px solid $border-dark-grey; } + } +} + +#tags_show { + .span3 { + h4 { margin: 25px 0 15px; } + .side_stream #people_stream { + .name { display: block; } + .name, .diaspora_handle, .tags { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + .span7 { + .tag-following-action { + max-width: 100%; + input[type="submit"] { + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; + } + } + } +} diff --git a/app/assets/stylesheets/tags.css.scss b/app/assets/stylesheets/tags.css.scss deleted file mode 100644 index 189531472..000000000 --- a/app/assets/stylesheets/tags.css.scss +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2010-2011, Diaspora Inc. This file is -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -.tags_show { - .side_stream { - .stream_element { - .add_contact { - display: inline; - float: right; - font-size: 10px; - .button { - padding: 5px 1px 4px 1px; - margin-right: 3px; - font-size: 10px; - } - } - } - } -} diff --git a/app/assets/stylesheets/ui.css.scss b/app/assets/stylesheets/ui.css.scss deleted file mode 100644 index 22f1043df..000000000 --- a/app/assets/stylesheets/ui.css.scss +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) 2010-2011, Diaspora Inc. This file is -// licensed under the Affero General Public License version 3 or later. See -// the COPYRIGHT file. - -@import "_mixins.css.scss"; - -$button-border-color: #aaa; - -.ui-autocomplete { - left: -11px -} - -.button { - @include border-radius(3px); - @include button-gradient($light-grey); - @include box-shadow(0,1px,1px,#cfcfcf); - @include transition(border); - - display: inline; - - font: { - style: normal; - size: 12px; - } - color: #505050; - - padding: 4px 9px; - - min-width: 90px; - min-height: 10px; - - border: 1px solid $button-border-color; - - cursor: pointer; - white-space: nowrap; - - &:hover { - @include button-gradient-hover-no-saturation($light-grey); - color: #505050; - text-decoration: none; - border: 1px solid darken($button-border-color,15%); - } - - &:active { - @include linear-gradient(#acacac,#808080); - } - - img { - position: relative; - height: 20px; - width: 20px; - top: 6px; - } -} - -/* fix for input height */ -input.button { - padding: 3px 9px { - bottom: 4px - } -} - -.button .selected { - @include linear-gradient(#f0f0f0,$highlight-white,29%,85%); - - border-top: 1px solid #aaa; -} - -.button { - &.delete { - color: desaturate($red,10%); - } - - &.in_aspects { - @include button-gradient($green); - &:hover { - @include button-gradient-hover($green); - } - } - - &.creation { - @include button-gradient($creation-blue); - color: #fff; - - border: 1px solid darken($button-border-color,20%); - - &:hover { - @include button-gradient-hover($creation-blue); - border: 1px solid darken($button-border-color,35%); - } - } - - &.red_on_hover { - &:hover { - @include button-gradient(#F74427); - color: #222; - } - } -} - -.right { - position: absolute; - right: 0; -} - -.dropdown { - position: relative; - display: inline-block; - - .button { - width: 240px; - } - - .wrapper { - @include box-shadow(0, 2px, 5px, #666); - //@include opacity(0) - @include transition(opacity); - - display: none; - z-index: 20; - position: absolute; - width: 140px; - margin-top: 2px; - background-color: #fff; - border: 1px solid $border-dark-grey; - - ul { - @include user-select(none); - font-size: normal; - - padding: 0 !important; - margin: 0 !important; - color: #000; - - > li { - font-size: 11px !important; - padding: 6px 2px { - left: 24px; } - position: relative; - color: #222; - list-style: none !important; - - &.selected { - background: { - image: image-url('icons/check_yes_ok.png'); - position: 3px 6px; - repeat: no-repeat; - } - } - - &.selected:hover { - background: { - image: image-url('icons/check_yes_ok_white.png'); - position: 3px 4px; - } - } - - &.loading { - background: { - image: image-url('ajax-loader.gif'); - repeat: no-repeat; - position: 4px 2px; - } - } - - &.loading:hover { - background: { - image: image-url('ajax-loader_inverted.gif'); - /* bump top position up 1px to compensate for the 1px added top border */ - position: 4px 1px; - } - } - - &.newItem { - a { - color: $text-grey; - font-style: italic; - - &:hover { - text-decoration: none; - } - } - } - } - } - } - - &.hang_right { - .wrapper { - @include border-radius(3px, 0, 3px, 3px); - right: 3px; - } - } - - &.hang_left { - .wrapper { - @include border-radius(0, 3px, 3px, 3px); - left: 0px; - } - } - - .selected { - font-weight: bold; - } - - &.active { - .wrapper { - //@include opacity(1) - display: block; - } - - .button { - @include border-radius(3px, 3px, 0, 0); - border: 1px solid #444; - } - - .button { - background: #666; - } - - .button, - .wrapper ul > li:hover { - background-color: #666; - color: #fff; - text-shadow: none; - } - - .wrapper ul > li:hover { - border: { - top: 1px solid #444; - bottom: 1px solid #444; - } - padding: { - top: 5px; - bottom: 5px; - } - - &.divider { - padding-bottom: 3px; - } - - a { - color: #ccc; - } - } - - .wrapper ul > li, - .wrapper ul > li * { - cursor: pointer; - } - } -} - diff --git a/app/assets/stylesheets/vendor/autoSuggest.css b/app/assets/stylesheets/vendor/autoSuggest.css.erb similarity index 74% rename from app/assets/stylesheets/vendor/autoSuggest.css rename to app/assets/stylesheets/vendor/autoSuggest.css.erb index 1f8df0659..fd784d5d3 100644 --- a/app/assets/stylesheets/vendor/autoSuggest.css +++ b/app/assets/stylesheets/vendor/autoSuggest.css.erb @@ -7,15 +7,13 @@ ul.as-selections { overflow: auto; background-color: #fff; border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - /* 1% padding (all sides) + 98% width = 100% */ + /* 1% padding (all sides) + 98% width = 100% */ padding: 1%; width: 98%; } ul.as-selections.loading { - background: url("/assets/ajax-loader.gif") right center no-repeat; + background: url('<%= image_path("ajax-loader.gif") %>') right center no-repeat; } ul.as-selections li { @@ -29,18 +27,14 @@ ul.as-selections li.as-selection-item { font-size: 13px; text-shadow: 0 1px 1px #fff; background-color: #ddeefe; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ddeefe), to(#bfe0f1)); + background-image: gradient(linear, 0% 0%, 0% 100%, from(#ddeefe), to(#bfe0f1)); border: 1px solid #acc3ec; padding: 0; padding-top: 6px; padding-bottom: 6px; padding-left: 6px; border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; box-shadow: 0 1px 1px #e4edf2; - -webkit-box-shadow: 0 1px 1px #e4edf2; - -moz-box-shadow: 0 1px 1px #e4edf2; line-height: 10px; margin-top: -1px; margin-bottom: 10px; @@ -60,18 +54,16 @@ ul.as-selections li.as-selection-item a.as-close { font-size: 14px; font-weight: bold; text-shadow: 0 1px 1px #fff; - -webkit-transition: color .1s ease-in; + transition: color .1s ease-in; } ul.as-selections li.as-selection-item.blur { color: #666666; background-color: #f4f4f4; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f4f4f4), to(#d5d5d5)); + background-image: gradient(linear, 0% 0%, 0% 100%, from(#f4f4f4), to(#d5d5d5)); border-color: #bbb; border-top-color: #ccc; box-shadow: 0 1px 1px #e9e9e9; - -webkit-box-shadow: 0 1px 1px #e9e9e9; - -moz-box-shadow: 0 1px 1px #e9e9e9; } ul.as-selections li.as-selection-item.blur a.as-close { @@ -81,7 +73,7 @@ ul.as-selections li.as-selection-item.blur a.as-close { ul.as-selections li:hover.as-selection-item { color: #2b3840; background-color: #bbd4f1; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#bbd4f1), to(#a3c2e5)); + background-image: gradient(linear, 0% 0%, 0% 100%, from(#bbd4f1), to(#a3c2e5)); border-color: #6da0e0; border-top-color: #8bb7ed; } @@ -135,11 +127,7 @@ ul.as-list { background-color: rgba(255,255,255,0.95); z-index: 2; box-shadow: 0 2px 12px #222; - -webkit-box-shadow: 0 2px 12px #222; - -moz-box-shadow: 0 2px 12px #222; border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; } li.as-result-item, li.as-message { @@ -150,8 +138,6 @@ li.as-result-item, li.as-message { border-bottom: 1px solid #ddd; cursor: pointer; border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; } li:first-child.as-result-item { @@ -165,26 +151,26 @@ li.as-message { li.as-result-item.active { background-color: #3668d9; - background-image: -webkit-gradient(linear, 0% 0%, 0% 64%, from(rgb(110, 129, 245)), to(rgb(62, 82, 242))); + background-image: gradient(linear, 0% 0%, 0% 64%, from(rgb(110, 129, 245)), to(rgb(62, 82, 242))); border-color: #3342e8; color: #fff; text-shadow: 0 1px 2px #122042; } -li.as-result-item em { - font-style: normal; - background: #444; +li.as-result-item em { + font-style: normal; + background: #444; padding: 0 2px; color: #fff; } -li.as-result-item.active em { - background: #253f7a; +li.as-result-item.active em { + background: #253f7a; color: #fff; } /* Webkit Hacks */ -@media screen and (-webkit-min-device-pixel-ratio:0) { +@media screen and (-webkit-min-device-pixel-ratio:0) { ul.as-selections li.as-selection-item { padding-top: 6px; padding-bottom: 6px; @@ -218,7 +204,7 @@ ul.as-selections li.as-selection-item a.as-close { } /* Firefox 3.0 Hacks */ -ul.as-list, x:-moz-any-link, x:default { +ul.as-list, x:-moz-any-link, x:default { border: 1px solid #ccc; } BODY:first-of-type ul.as-list, x:-moz-any-link, x:default { /* Target FF 3.5+ */ diff --git a/app/assets/stylesheets/vendor/blank.gif b/app/assets/stylesheets/vendor/blank.gif deleted file mode 100644 index 35d42e808..000000000 Binary files a/app/assets/stylesheets/vendor/blank.gif and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/AUTHORS.textile b/app/assets/stylesheets/vendor/blueprint/AUTHORS.textile deleted file mode 100644 index d873e010a..000000000 --- a/app/assets/stylesheets/vendor/blueprint/AUTHORS.textile +++ /dev/null @@ -1,42 +0,0 @@ -h1. Blueprint CSS Framework Authors and Contributors - -Blueprint is based on the work of many talented people. It is -through their good intentions we are allowed to use many of the -techniques found in the framework. - -h2. Current Team - -Blueprint was realized and maintained through version 0.7.1 by -"Olav Bjorkoy":http://bjorkoy.com who has sinced passed the torch -to the current team. They are: - -Admins: -* "Christian Montoya":http://christianmontoya.net -* "Josh Clayton":http://jdclayton.com - -Contributors: -* "Glenn Rempe":http://blog.rempe.us/ -* "Chris Eppstein":http://twitter.com/chriseppstein -* "Sean K. Stewart":http://seankstewart.com/ - -h2. Original CSS authors - -The first iteration of Blueprint was built upon many conventions -and ideas that were developed by true CSS experts. - -The grid and typography is based on work by: -* "Jeff Croft":http://jeffcroft.com -* "Nathan Borror":http://www.playgroundblues.com -* "Christian Metts":http://mintchaos.com -* "Wilson Miner":http://www.wilsonminer.com - -The CSS reset is based on work by: -* "Eric Meyer":http://www.meyerweb.com/eric - -The Fancy Type plugin is based on work by: -* "Mark Boulton":http://www.markboulton.co.uk -* "Typogrify":http://typogrify.googlecode.com - -(However, remember that these people are not involved with the -framework, so please don't waste their or your time asking them -for support.) diff --git a/app/assets/stylesheets/vendor/blueprint/LICENSE b/app/assets/stylesheets/vendor/blueprint/LICENSE deleted file mode 100644 index 13076fb5f..000000000 --- a/app/assets/stylesheets/vendor/blueprint/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2007 - 2010 blueprintcss.org - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/app/assets/stylesheets/vendor/blueprint/ie.css b/app/assets/stylesheets/vendor/blueprint/ie.css deleted file mode 100644 index 3dddda945..000000000 --- a/app/assets/stylesheets/vendor/blueprint/ie.css +++ /dev/null @@ -1,35 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* ie.css */ -body {text-align:center;} -.container {text-align:left;} -* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;} -* html legend {margin:0px -8px 16px 0;padding:0;} -sup {vertical-align:text-top;} -sub {vertical-align:text-bottom;} -html>body p code {*white-space:normal;} -hr {margin:-8px auto 11px;} -img {-ms-interpolation-mode:bicubic;} -.clearfix, .container {display:inline-block;} -* html .clearfix, * html .container {height:1%;} -fieldset {padding-top:0;} -textarea {overflow:auto;} -input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;} -input.text:focus, input.title:focus {border-color:#666;} -input.text, input.title, textarea, select {margin:0.5em 0;} -input.checkbox, input.radio {position:relative;top:.25em;} -form.inline div, form.inline p {vertical-align:middle;} -form.inline label {position:relative;top:-0.25em;} -form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;} -button, input.button {position:relative;top:0.25em;} \ No newline at end of file diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/cross.png b/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/cross.png deleted file mode 100644 index 1514d51a3..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/cross.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/key.png b/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/key.png deleted file mode 100644 index a9d5e4f8c..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/key.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/tick.png b/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/tick.png deleted file mode 100644 index a9925a06a..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/icons/tick.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/readme.txt b/app/assets/stylesheets/vendor/blueprint/plugins/buttons/readme.txt deleted file mode 100644 index aa9fe26ba..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/readme.txt +++ /dev/null @@ -1,32 +0,0 @@ -Buttons - -* Gives you great looking CSS buttons, for both and - - - Change Password - - - - Cancel - diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/screen.css b/app/assets/stylesheets/vendor/blueprint/plugins/buttons/screen.css deleted file mode 100644 index bb66b2154..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/buttons/screen.css +++ /dev/null @@ -1,97 +0,0 @@ -/* -------------------------------------------------------------- - - buttons.css - * Gives you some great CSS-only buttons. - - Created by Kevin Hale [particletree.com] - * particletree.com/features/rediscovering-the-button-element - - See Readme.txt in this folder for instructions. - --------------------------------------------------------------- */ - -a.button, button { - display:block; - float:left; - margin: 0.7em 0.5em 0.7em 0; - padding:5px 10px 5px 7px; /* Links */ - - border:1px solid #dedede; - border-top:1px solid #eee; - border-left:1px solid #eee; - - background-color:#f5f5f5; - font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif; - font-size:100%; - line-height:130%; - text-decoration:none; - font-weight:bold; - color:#565656; - cursor:pointer; -} -button { - width:auto; - overflow:visible; - padding:4px 10px 3px 7px; /* IE6 */ -} -button[type] { - padding:4px 10px 4px 7px; /* Firefox */ - line-height:17px; /* Safari */ -} -*:first-child+html button[type] { - padding:4px 10px 3px 7px; /* IE7 */ -} -button img, a.button img{ - margin:0 3px -3px 0 !important; - padding:0; - border:none; - width:16px; - height:16px; - float:none; -} - - -/* Button colors --------------------------------------------------------------- */ - -/* Standard */ -button:hover, a.button:hover{ - background-color:#dff4ff; - border:1px solid #c2e1ef; - color:#336699; -} -a.button:active{ - background-color:#6299c5; - border:1px solid #6299c5; - color:#fff; -} - -/* Positive */ -body .positive { - color:#529214; -} -a.positive:hover, button.positive:hover { - background-color:#E6EFC2; - border:1px solid #C6D880; - color:#529214; -} -a.positive:active { - background-color:#529214; - border:1px solid #529214; - color:#fff; -} - -/* Negative */ -body .negative { - color:#d12f19; -} -a.negative:hover, button.negative:hover { - background-color:#fbe3e4; - border:1px solid #fbc2c4; - color:#d12f19; -} -a.negative:active { - background-color:#d12f19; - border:1px solid #d12f19; - color:#fff; -} diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/readme.txt b/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/readme.txt deleted file mode 100644 index 85f249152..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -Fancy Type - -* Gives you classes to use if you'd like some - extra fancy typography. - -Credits and instructions are specified above each class -in the fancy-type.css file in this directory. - - -Usage ----------------------------------------------------------------- - -1) Add this plugin to lib/settings.yml. - See compress.rb for instructions. diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/screen.css b/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/screen.css deleted file mode 100644 index 127cf2553..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/fancy-type/screen.css +++ /dev/null @@ -1,71 +0,0 @@ -/* -------------------------------------------------------------- - - fancy-type.css - * Lots of pretty advanced classes for manipulating text. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Indentation instead of line shifts for sibling paragraphs. */ - p + p { text-indent:2em; margin-top:-1.5em; } - form p + p { text-indent: 0; } /* Don't want this in forms. */ - - -/* For great looking type, use this code instead of asdf: - asdf - Best used on prepositions and ampersands. */ - -.alt { - color: #666; - font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; - font-style: italic; - font-weight: normal; -} - - -/* For great looking quote marks in titles, replace "asdf" with: - asdf” - (That is, when the title starts with a quote mark). - (You may have to change this value depending on your font size). */ - -.dquo { margin-left: -.5em; } - - -/* Reduced size type with incremental leading - (http://www.markboulton.co.uk/journal/comments/incremental_leading/) - - This could be used for side notes. For smaller type, you don't necessarily want to - follow the 1.5x vertical rhythm -- the line-height is too much. - - Using this class, it reduces your font size and line-height so that for - every four lines of normal sized type, there is five lines of the sidenote. eg: - - New type size in em's: - 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) - - New line-height value: - 12px x 1.5 = 18px (old line-height) - 18px x 4 = 72px - 72px / 5 = 14.4px (new line height) - 14.4px / 10px = 1.44 (new line height in em's) */ - -p.incr, .incr p { - font-size: 10px; - line-height: 1.44em; - margin-bottom: 1.5em; -} - - -/* Surround uppercase words and abbreviations with this class. - Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */ - -.caps { - font-variant: small-caps; - letter-spacing: 1px; - text-transform: lowercase; - font-size:1.2em; - line-height:1%; - font-weight:bold; - padding:0 2px; -} diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/doc.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/doc.png deleted file mode 100644 index 834cdfaf4..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/doc.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/email.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/email.png deleted file mode 100644 index 7348aed77..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/email.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/external.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/external.png deleted file mode 100644 index 2cd011b22..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/external.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/feed.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/feed.png deleted file mode 100644 index 315c4f4fa..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/feed.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/im.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/im.png deleted file mode 100644 index 79f35ccbd..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/im.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/pdf.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/pdf.png deleted file mode 100644 index 8f8095e46..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/pdf.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/visited.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/visited.png deleted file mode 100644 index b8a1eceb9..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/visited.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/xls.png b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/xls.png deleted file mode 100644 index b977d7e52..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/icons/xls.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/readme.txt b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/readme.txt deleted file mode 100644 index fc4dc6490..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ -Link Icons -* Icons for links based on protocol or file type. - -This is not supported in IE versions < 7. - - -Credits ----------------------------------------------------------------- - -* Marc Morgan -* Olav Bjorkoy [bjorkoy.com] - - -Usage ----------------------------------------------------------------- - -1) Add this line to your HTML: - diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/screen.css b/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/screen.css deleted file mode 100644 index 7b4bef988..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/link-icons/screen.css +++ /dev/null @@ -1,40 +0,0 @@ -/* -------------------------------------------------------------- - - link-icons.css - * Icons for links based on protocol or file type. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Use this class if a link gets an icon when it shouldn't. */ -body a.noicon { - background:transparent none !important; - padding:0 !important; - margin:0 !important; -} - -/* Make sure the icons are not cut */ -a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited, -a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"], -a[href$=".rdf"], a[href^="aim:"] { - padding:2px 22px 2px 0; - margin:-2px 0; - background-repeat: no-repeat; - background-position: right center; -} - -/* External links */ -a[href^="http:"] { background-image: url(icons/external.png); } -a[href^="mailto:"] { background-image: url(icons/email.png); } -a[href^="http:"]:visited { background-image: url(icons/visited.png); } - -/* Files */ -a[href$=".pdf"] { background-image: url(icons/pdf.png); } -a[href$=".doc"] { background-image: url(icons/doc.png); } -a[href$=".xls"] { background-image: url(icons/xls.png); } - -/* Misc */ -a[href$=".rss"], -a[href$=".rdf"] { background-image: url(icons/feed.png); } -a[href^="aim:"] { background-image: url(icons/im.png); } diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/rtl/readme.txt b/app/assets/stylesheets/vendor/blueprint/plugins/rtl/readme.txt deleted file mode 100644 index 5564c402a..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/rtl/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -RTL -* Mirrors Blueprint, so it can be used with Right-to-Left languages. - -By Ran Yaniv Hartstein, ranh.co.il - -Usage ----------------------------------------------------------------- - -1) Add this line to your HTML: - diff --git a/app/assets/stylesheets/vendor/blueprint/plugins/rtl/screen.css b/app/assets/stylesheets/vendor/blueprint/plugins/rtl/screen.css deleted file mode 100644 index 7db7eb5e6..000000000 --- a/app/assets/stylesheets/vendor/blueprint/plugins/rtl/screen.css +++ /dev/null @@ -1,110 +0,0 @@ -/* -------------------------------------------------------------- - - rtl.css - * Mirrors Blueprint for left-to-right languages - - By Ran Yaniv Hartstein [ranh.co.il] - --------------------------------------------------------------- */ - -body .container { direction: rtl; } -body .column, body .span-1, body .span-2, body .span-3, body .span-4, body .span-5, body .span-6, body .span-7, body .span-8, body .span-9, body .span-10, body .span-11, body .span-12, body .span-13, body .span-14, body .span-15, body .span-16, body .span-17, body .span-18, body .span-19, body .span-20, body .span-21, body .span-22, body .span-23, body .span-24 { - float: right; - margin-right: 0; - margin-left: 10px; - text-align:right; -} - -body div.last { margin-left: 0; } -body table .last { padding-left: 0; } - -body .append-1 { padding-right: 0; padding-left: 40px; } -body .append-2 { padding-right: 0; padding-left: 80px; } -body .append-3 { padding-right: 0; padding-left: 120px; } -body .append-4 { padding-right: 0; padding-left: 160px; } -body .append-5 { padding-right: 0; padding-left: 200px; } -body .append-6 { padding-right: 0; padding-left: 240px; } -body .append-7 { padding-right: 0; padding-left: 280px; } -body .append-8 { padding-right: 0; padding-left: 320px; } -body .append-9 { padding-right: 0; padding-left: 360px; } -body .append-10 { padding-right: 0; padding-left: 400px; } -body .append-11 { padding-right: 0; padding-left: 440px; } -body .append-12 { padding-right: 0; padding-left: 480px; } -body .append-13 { padding-right: 0; padding-left: 520px; } -body .append-14 { padding-right: 0; padding-left: 560px; } -body .append-15 { padding-right: 0; padding-left: 600px; } -body .append-16 { padding-right: 0; padding-left: 640px; } -body .append-17 { padding-right: 0; padding-left: 680px; } -body .append-18 { padding-right: 0; padding-left: 720px; } -body .append-19 { padding-right: 0; padding-left: 760px; } -body .append-20 { padding-right: 0; padding-left: 800px; } -body .append-21 { padding-right: 0; padding-left: 840px; } -body .append-22 { padding-right: 0; padding-left: 880px; } -body .append-23 { padding-right: 0; padding-left: 920px; } - -body .prepend-1 { padding-left: 0; padding-right: 40px; } -body .prepend-2 { padding-left: 0; padding-right: 80px; } -body .prepend-3 { padding-left: 0; padding-right: 120px; } -body .prepend-4 { padding-left: 0; padding-right: 160px; } -body .prepend-5 { padding-left: 0; padding-right: 200px; } -body .prepend-6 { padding-left: 0; padding-right: 240px; } -body .prepend-7 { padding-left: 0; padding-right: 280px; } -body .prepend-8 { padding-left: 0; padding-right: 320px; } -body .prepend-9 { padding-left: 0; padding-right: 360px; } -body .prepend-10 { padding-left: 0; padding-right: 400px; } -body .prepend-11 { padding-left: 0; padding-right: 440px; } -body .prepend-12 { padding-left: 0; padding-right: 480px; } -body .prepend-13 { padding-left: 0; padding-right: 520px; } -body .prepend-14 { padding-left: 0; padding-right: 560px; } -body .prepend-15 { padding-left: 0; padding-right: 600px; } -body .prepend-16 { padding-left: 0; padding-right: 640px; } -body .prepend-17 { padding-left: 0; padding-right: 680px; } -body .prepend-18 { padding-left: 0; padding-right: 720px; } -body .prepend-19 { padding-left: 0; padding-right: 760px; } -body .prepend-20 { padding-left: 0; padding-right: 800px; } -body .prepend-21 { padding-left: 0; padding-right: 840px; } -body .prepend-22 { padding-left: 0; padding-right: 880px; } -body .prepend-23 { padding-left: 0; padding-right: 920px; } - -body .border { - padding-right: 0; - padding-left: 4px; - margin-right: 0; - margin-left: 5px; - border-right: none; - border-left: 1px solid #eee; -} - -body .colborder { - padding-right: 0; - padding-left: 24px; - margin-right: 0; - margin-left: 25px; - border-right: none; - border-left: 1px solid #eee; -} - -body .pull-1 { margin-left: 0; margin-right: -40px; } -body .pull-2 { margin-left: 0; margin-right: -80px; } -body .pull-3 { margin-left: 0; margin-right: -120px; } -body .pull-4 { margin-left: 0; margin-right: -160px; } - -body .push-0 { margin: 0 18px 0 0; } -body .push-1 { margin: 0 18px 0 -40px; } -body .push-2 { margin: 0 18px 0 -80px; } -body .push-3 { margin: 0 18px 0 -120px; } -body .push-4 { margin: 0 18px 0 -160px; } -body .push-0, body .push-1, body .push-2, -body .push-3, body .push-4 { float: left; } - - -/* Typography with RTL support */ -body h1,body h2,body h3, -body h4,body h5,body h6 { font-family: Arial, sans-serif; } -html body { font-family: Arial, sans-serif; } -body pre,body code,body tt { font-family: monospace; } - -/* Mirror floats and margins on typographic elements */ -body p img { float: right; margin: 1.5em 0 1.5em 1.5em; } -body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;} -body td, body th { text-align:right; } diff --git a/app/assets/stylesheets/vendor/blueprint/print.css b/app/assets/stylesheets/vendor/blueprint/print.css deleted file mode 100644 index fdb82208e..000000000 --- a/app/assets/stylesheets/vendor/blueprint/print.css +++ /dev/null @@ -1,29 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* print.css */ -body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} -.container {background:none;} -hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} -hr.space {background:#fff;color:#fff;visibility:hidden;} -h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;} -code {font:.9em "Courier New", Monaco, Courier, monospace;} -a img {border:none;} -p img.top {margin-top:0;} -blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} -.small {font-size:.9em;} -.large {font-size:1.1em;} -.quiet {color:#999;} -.hide {display:none;} -a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} -a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;} \ No newline at end of file diff --git a/app/assets/stylesheets/vendor/blueprint/screen.css b/app/assets/stylesheets/vendor/blueprint/screen.css deleted file mode 100644 index 562a344e0..000000000 --- a/app/assets/stylesheets/vendor/blueprint/screen.css +++ /dev/null @@ -1,258 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* reset.css */ -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} -article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} -body {line-height:1.5;} -table {border-collapse:separate;border-spacing:0;} -caption, th, td {text-align:left;font-weight:normal;} -table, td, th {vertical-align:middle;} -blockquote:before, blockquote:after, q:before, q:after {content:"";} -blockquote, q {quotes:"" "";} -a img {border:none;} - -/* typography.css */ -html {font-size:100.01%;} -body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica", Arial, sans-serif;} -h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} -h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} -h2 {font-size:2em;margin-bottom:0.75em;} -h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} -h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} -h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} -h6 {font-size:1em;font-weight:bold;} -h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} -p {margin:0 0 1.5em;} -p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} -p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} -a:focus, a:hover {color:#000;} -a {color:#009;text-decoration:underline;} -blockquote {margin:1.5em;color:#666;font-style:italic;} -strong {font-weight:bold;} -em, dfn {font-style:italic;} -dfn {font-weight:bold;} -sup, sub {line-height:0;} -abbr, acronym {border-bottom:1px dotted #666;} -address {margin:0 0 1.5em;font-style:italic;} -del {color:#666;} -pre {margin:1.5em 0;white-space:pre;} -pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;overflow:auto;} -li ul, li ol {margin:0;} -ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} -ul {list-style-type:disc;} -ol {list-style-type:decimal;} -dl {margin:0 0 1.5em 0;} -dl dt {font-weight:bold;} -dd {margin-left:1.5em;} -table {margin-bottom:1.4em;width:100%;} -th {font-weight:bold;} -thead th {background:#c3d9ff;} -th, td, caption {padding:4px 10px 4px 5px;} -tr.even td {background:#e5ecf9;} -tfoot {font-style:italic;} -caption {background:#eee;} -.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} -.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} -.hide {display:none;} -.quiet {color:#666;} -.loud {color:#000;} -.highlight {background:#ff0;} -.added {background:#060;color:#fff;} -.removed {background:#900;color:#fff;} -.first {margin-left:0;padding-left:0;} -.last {margin-right:0;padding-right:0;} -.top {margin-top:0;padding-top:0;} -.bottom {margin-bottom:0;padding-bottom:0;} - -/* forms.css */ -label {font-weight:bold;} -fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} -legend {font-weight:bold;font-size:1.2em;} -input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} -input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} -input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} -input.text, input.title {width:300px;padding:5px;} -input.title {font-size:1.5em;} -textarea {width:390px;height:250px;padding:5px;} -input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} -form.inline {line-height:3;} -form.inline p {margin-bottom:0;} -.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} -.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} -.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} -.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} -.error a {color:#8a1f11;} -.notice a {color:#514721;} -.success a {color:#264409;} - -/* grid.css */ -.container {width:950px;margin:0 auto;} -.showgrid {background:url(src/grid.png);} -.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {float:left;margin-right:10px;} -.last {margin-right:0;} -.span-1 {width:30px;} -.span-2 {width:70px;} -.span-3 {width:110px;} -.span-4 {width:150px;} -.span-5 {width:190px;} -.span-6 {width:230px;} -.span-7 {width:270px;} -.span-8 {width:310px;} -.span-9 {width:350px;} -.span-10 {width:390px;} -.span-11 {width:430px;} -.span-12 {width:470px;} -.span-13 {width:510px;} -.span-14 {width:550px;} -.span-15 {width:590px;} -.span-16 {width:630px;} -.span-17 {width:670px;} -.span-18 {width:710px;} -.span-19 {width:750px;} -.span-20 {width:790px;} -.span-21 {width:830px;} -.span-22 {width:870px;} -.span-23 {width:910px;} -.span-24 {width:950px;margin-right:0;} -input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px;border-right-width:1px;padding-left:5px;padding-right:5px;} -input.span-1, textarea.span-1 {width:18px;} -input.span-2, textarea.span-2 {width:58px;} -input.span-3, textarea.span-3 {width:98px;} -input.span-4, textarea.span-4 {width:138px;} -input.span-5, textarea.span-5 {width:178px;} -input.span-6, textarea.span-6 {width:218px;} -input.span-7, textarea.span-7 {width:258px;} -input.span-8, textarea.span-8 {width:298px;} -input.span-9, textarea.span-9 {width:338px;} -input.span-10, textarea.span-10 {width:378px;} -input.span-11, textarea.span-11 {width:418px;} -input.span-12, textarea.span-12 {width:458px;} -input.span-13, textarea.span-13 {width:498px;} -input.span-14, textarea.span-14 {width:538px;} -input.span-15, textarea.span-15 {width:578px;} -input.span-16, textarea.span-16 {width:618px;} -input.span-17, textarea.span-17 {width:658px;} -input.span-18, textarea.span-18 {width:698px;} -input.span-19, textarea.span-19 {width:738px;} -input.span-20, textarea.span-20 {width:778px;} -input.span-21, textarea.span-21 {width:818px;} -input.span-22, textarea.span-22 {width:858px;} -input.span-23, textarea.span-23 {width:898px;} -input.span-24, textarea.span-24 {width:938px;} -.append-1 {padding-right:40px;} -.append-2 {padding-right:80px;} -.append-3 {padding-right:120px;} -.append-4 {padding-right:160px;} -.append-5 {padding-right:200px;} -.append-6 {padding-right:240px;} -.append-7 {padding-right:280px;} -.append-8 {padding-right:320px;} -.append-9 {padding-right:360px;} -.append-10 {padding-right:400px;} -.append-11 {padding-right:440px;} -.append-12 {padding-right:480px;} -.append-13 {padding-right:520px;} -.append-14 {padding-right:560px;} -.append-15 {padding-right:600px;} -.append-16 {padding-right:640px;} -.append-17 {padding-right:680px;} -.append-18 {padding-right:720px;} -.append-19 {padding-right:760px;} -.append-20 {padding-right:800px;} -.append-21 {padding-right:840px;} -.append-22 {padding-right:880px;} -.append-23 {padding-right:920px;} -.prepend-1 {padding-left:40px;} -.prepend-2 {padding-left:80px;} -.prepend-3 {padding-left:120px;} -.prepend-4 {padding-left:160px;} -.prepend-5 {padding-left:200px;} -.prepend-6 {padding-left:240px;} -.prepend-7 {padding-left:280px;} -.prepend-8 {padding-left:320px;} -.prepend-9 {padding-left:360px;} -.prepend-10 {padding-left:400px;} -.prepend-11 {padding-left:440px;} -.prepend-12 {padding-left:480px;} -.prepend-13 {padding-left:520px;} -.prepend-14 {padding-left:560px;} -.prepend-15 {padding-left:600px;} -.prepend-16 {padding-left:640px;} -.prepend-17 {padding-left:680px;} -.prepend-18 {padding-left:720px;} -.prepend-19 {padding-left:760px;} -.prepend-20 {padding-left:800px;} -.prepend-21 {padding-left:840px;} -.prepend-22 {padding-left:880px;} -.prepend-23 {padding-left:920px;} -.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;} -.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;} -.pull-1 {margin-left:-40px;} -.pull-2 {margin-left:-80px;} -.pull-3 {margin-left:-120px;} -.pull-4 {margin-left:-160px;} -.pull-5 {margin-left:-200px;} -.pull-6 {margin-left:-240px;} -.pull-7 {margin-left:-280px;} -.pull-8 {margin-left:-320px;} -.pull-9 {margin-left:-360px;} -.pull-10 {margin-left:-400px;} -.pull-11 {margin-left:-440px;} -.pull-12 {margin-left:-480px;} -.pull-13 {margin-left:-520px;} -.pull-14 {margin-left:-560px;} -.pull-15 {margin-left:-600px;} -.pull-16 {margin-left:-640px;} -.pull-17 {margin-left:-680px;} -.pull-18 {margin-left:-720px;} -.pull-19 {margin-left:-760px;} -.pull-20 {margin-left:-800px;} -.pull-21 {margin-left:-840px;} -.pull-22 {margin-left:-880px;} -.pull-23 {margin-left:-920px;} -.pull-24 {margin-left:-960px;} -.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;} -.push-1 {margin:0 -40px 1.5em 40px;} -.push-2 {margin:0 -80px 1.5em 80px;} -.push-3 {margin:0 -120px 1.5em 120px;} -.push-4 {margin:0 -160px 1.5em 160px;} -.push-5 {margin:0 -200px 1.5em 200px;} -.push-6 {margin:0 -240px 1.5em 240px;} -.push-7 {margin:0 -280px 1.5em 280px;} -.push-8 {margin:0 -320px 1.5em 320px;} -.push-9 {margin:0 -360px 1.5em 360px;} -.push-10 {margin:0 -400px 1.5em 400px;} -.push-11 {margin:0 -440px 1.5em 440px;} -.push-12 {margin:0 -480px 1.5em 480px;} -.push-13 {margin:0 -520px 1.5em 520px;} -.push-14 {margin:0 -560px 1.5em 560px;} -.push-15 {margin:0 -600px 1.5em 600px;} -.push-16 {margin:0 -640px 1.5em 640px;} -.push-17 {margin:0 -680px 1.5em 680px;} -.push-18 {margin:0 -720px 1.5em 720px;} -.push-19 {margin:0 -760px 1.5em 760px;} -.push-20 {margin:0 -800px 1.5em 800px;} -.push-21 {margin:0 -840px 1.5em 840px;} -.push-22 {margin:0 -880px 1.5em 880px;} -.push-23 {margin:0 -920px 1.5em 920px;} -.push-24 {margin:0 -960px 1.5em 960px;} -.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;} -.prepend-top {margin-top:1.5em;} -.append-bottom {margin-bottom:1.5em;} -.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} -hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} -hr.space {background:#fff;color:#fff;visibility:hidden;} -.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} -.clearfix, .container {display:block;} -.clear {clear:both;} diff --git a/app/assets/stylesheets/vendor/blueprint/src/forms.css b/app/assets/stylesheets/vendor/blueprint/src/forms.css deleted file mode 100644 index b49113407..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/forms.css +++ /dev/null @@ -1,65 +0,0 @@ -/* -------------------------------------------------------------- - - forms.css - * Sets up some default styling for forms - * Gives you classes to enhance your forms - - Usage: - * For text fields, use class .title or .text - * For inline forms, use .inline (even when using columns) - --------------------------------------------------------------- */ - -label { font-weight: bold; } -fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; } -legend { font-weight: bold; font-size:1.2em; } - - -/* Form fields --------------------------------------------------------------- */ - -input[type=text], input[type=password], -input.text, input.title, -textarea, select { - background-color:#fff; - border:1px solid #bbb; -} -input[type=text]:focus, input[type=password]:focus, -input.text:focus, input.title:focus, -textarea:focus, select:focus { - border-color:#666; -} - -input[type=text], input[type=password], -input.text, input.title, -textarea, select { - margin:0.5em 0; -} - -input.text, -input.title { width: 300px; padding:5px; } -input.title { font-size:1.5em; } -textarea { width: 390px; height: 250px; padding:5px; } - -input[type=checkbox], input[type=radio], -input.checkbox, input.radio { - position:relative; top:.25em; -} - -form.inline { line-height:3; } -form.inline p { margin-bottom:0; } - - -/* Success, notice and error boxes --------------------------------------------------------------- */ - -.error, -.notice, -.success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; } - -.error { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } -.notice { background: #FFF6BF; color: #514721; border-color: #FFD324; } -.success { background: #E6EFC2; color: #264409; border-color: #C6D880; } -.error a { color: #8a1f11; } -.notice a { color: #514721; } -.success a { color: #264409; } diff --git a/app/assets/stylesheets/vendor/blueprint/src/grid.css b/app/assets/stylesheets/vendor/blueprint/src/grid.css deleted file mode 100644 index 02a9d0ca3..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/grid.css +++ /dev/null @@ -1,280 +0,0 @@ -/* -------------------------------------------------------------- - - grid.css - * Sets up an easy-to-use grid of 24 columns. - - By default, the grid is 950px wide, with 24 columns - spanning 30px, and a 10px margin between columns. - - If you need fewer or more columns, namespaces or semantic - element names, use the compressor script (lib/compress.rb) - --------------------------------------------------------------- */ - -/* A container should group all your columns. */ -.container { - width: 950px; - margin: 0 auto; -} - -/* Use this class on any .span / container to see the grid. */ -.showgrid { - background: url(src/grid.png); -} - - -/* Columns --------------------------------------------------------------- */ - -/* Sets up basic grid floating and margin. */ -.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 { - float: left; - margin-right: 10px; -} - -/* The last column in a row needs this class. */ -.last { margin-right: 0; } - -/* Use these classes to set the width of a column. */ -.span-1 {width: 30px;} - -.span-2 {width: 70px;} -.span-3 {width: 110px;} -.span-4 {width: 150px;} -.span-5 {width: 190px;} -.span-6 {width: 230px;} -.span-7 {width: 270px;} -.span-8 {width: 310px;} -.span-9 {width: 350px;} -.span-10 {width: 390px;} -.span-11 {width: 430px;} -.span-12 {width: 470px;} -.span-13 {width: 510px;} -.span-14 {width: 550px;} -.span-15 {width: 590px;} -.span-16 {width: 630px;} -.span-17 {width: 670px;} -.span-18 {width: 710px;} -.span-19 {width: 750px;} -.span-20 {width: 790px;} -.span-21 {width: 830px;} -.span-22 {width: 870px;} -.span-23 {width: 910px;} -.span-24 {width:950px; margin-right:0;} - -/* Use these classes to set the width of an input. */ -input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 { - border-left-width: 1px; - border-right-width: 1px; - padding-left: 5px; - padding-right: 5px; -} - -input.span-1, textarea.span-1 { width: 18px; } -input.span-2, textarea.span-2 { width: 58px; } -input.span-3, textarea.span-3 { width: 98px; } -input.span-4, textarea.span-4 { width: 138px; } -input.span-5, textarea.span-5 { width: 178px; } -input.span-6, textarea.span-6 { width: 218px; } -input.span-7, textarea.span-7 { width: 258px; } -input.span-8, textarea.span-8 { width: 298px; } -input.span-9, textarea.span-9 { width: 338px; } -input.span-10, textarea.span-10 { width: 378px; } -input.span-11, textarea.span-11 { width: 418px; } -input.span-12, textarea.span-12 { width: 458px; } -input.span-13, textarea.span-13 { width: 498px; } -input.span-14, textarea.span-14 { width: 538px; } -input.span-15, textarea.span-15 { width: 578px; } -input.span-16, textarea.span-16 { width: 618px; } -input.span-17, textarea.span-17 { width: 658px; } -input.span-18, textarea.span-18 { width: 698px; } -input.span-19, textarea.span-19 { width: 738px; } -input.span-20, textarea.span-20 { width: 778px; } -input.span-21, textarea.span-21 { width: 818px; } -input.span-22, textarea.span-22 { width: 858px; } -input.span-23, textarea.span-23 { width: 898px; } -input.span-24, textarea.span-24 { width: 938px; } - -/* Add these to a column to append empty cols. */ - -.append-1 { padding-right: 40px;} -.append-2 { padding-right: 80px;} -.append-3 { padding-right: 120px;} -.append-4 { padding-right: 160px;} -.append-5 { padding-right: 200px;} -.append-6 { padding-right: 240px;} -.append-7 { padding-right: 280px;} -.append-8 { padding-right: 320px;} -.append-9 { padding-right: 360px;} -.append-10 { padding-right: 400px;} -.append-11 { padding-right: 440px;} -.append-12 { padding-right: 480px;} -.append-13 { padding-right: 520px;} -.append-14 { padding-right: 560px;} -.append-15 { padding-right: 600px;} -.append-16 { padding-right: 640px;} -.append-17 { padding-right: 680px;} -.append-18 { padding-right: 720px;} -.append-19 { padding-right: 760px;} -.append-20 { padding-right: 800px;} -.append-21 { padding-right: 840px;} -.append-22 { padding-right: 880px;} -.append-23 { padding-right: 920px;} - -/* Add these to a column to prepend empty cols. */ - -.prepend-1 { padding-left: 40px;} -.prepend-2 { padding-left: 80px;} -.prepend-3 { padding-left: 120px;} -.prepend-4 { padding-left: 160px;} -.prepend-5 { padding-left: 200px;} -.prepend-6 { padding-left: 240px;} -.prepend-7 { padding-left: 280px;} -.prepend-8 { padding-left: 320px;} -.prepend-9 { padding-left: 360px;} -.prepend-10 { padding-left: 400px;} -.prepend-11 { padding-left: 440px;} -.prepend-12 { padding-left: 480px;} -.prepend-13 { padding-left: 520px;} -.prepend-14 { padding-left: 560px;} -.prepend-15 { padding-left: 600px;} -.prepend-16 { padding-left: 640px;} -.prepend-17 { padding-left: 680px;} -.prepend-18 { padding-left: 720px;} -.prepend-19 { padding-left: 760px;} -.prepend-20 { padding-left: 800px;} -.prepend-21 { padding-left: 840px;} -.prepend-22 { padding-left: 880px;} -.prepend-23 { padding-left: 920px;} - - -/* Border on right hand side of a column. */ -.border { - padding-right: 4px; - margin-right: 5px; - border-right: 1px solid #eee; -} - -/* Border with more whitespace, spans one column. */ -.colborder { - padding-right: 24px; - margin-right: 25px; - border-right: 1px solid #eee; -} - - -/* Use these classes on an element to push it into the -next column, or to pull it into the previous column. */ - - -.pull-1 { margin-left: -40px; } -.pull-2 { margin-left: -80px; } -.pull-3 { margin-left: -120px; } -.pull-4 { margin-left: -160px; } -.pull-5 { margin-left: -200px; } -.pull-6 { margin-left: -240px; } -.pull-7 { margin-left: -280px; } -.pull-8 { margin-left: -320px; } -.pull-9 { margin-left: -360px; } -.pull-10 { margin-left: -400px; } -.pull-11 { margin-left: -440px; } -.pull-12 { margin-left: -480px; } -.pull-13 { margin-left: -520px; } -.pull-14 { margin-left: -560px; } -.pull-15 { margin-left: -600px; } -.pull-16 { margin-left: -640px; } -.pull-17 { margin-left: -680px; } -.pull-18 { margin-left: -720px; } -.pull-19 { margin-left: -760px; } -.pull-20 { margin-left: -800px; } -.pull-21 { margin-left: -840px; } -.pull-22 { margin-left: -880px; } -.pull-23 { margin-left: -920px; } -.pull-24 { margin-left: -960px; } - -.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float: left; position:relative;} - - -.push-1 { margin: 0 -40px 1.5em 40px; } -.push-2 { margin: 0 -80px 1.5em 80px; } -.push-3 { margin: 0 -120px 1.5em 120px; } -.push-4 { margin: 0 -160px 1.5em 160px; } -.push-5 { margin: 0 -200px 1.5em 200px; } -.push-6 { margin: 0 -240px 1.5em 240px; } -.push-7 { margin: 0 -280px 1.5em 280px; } -.push-8 { margin: 0 -320px 1.5em 320px; } -.push-9 { margin: 0 -360px 1.5em 360px; } -.push-10 { margin: 0 -400px 1.5em 400px; } -.push-11 { margin: 0 -440px 1.5em 440px; } -.push-12 { margin: 0 -480px 1.5em 480px; } -.push-13 { margin: 0 -520px 1.5em 520px; } -.push-14 { margin: 0 -560px 1.5em 560px; } -.push-15 { margin: 0 -600px 1.5em 600px; } -.push-16 { margin: 0 -640px 1.5em 640px; } -.push-17 { margin: 0 -680px 1.5em 680px; } -.push-18 { margin: 0 -720px 1.5em 720px; } -.push-19 { margin: 0 -760px 1.5em 760px; } -.push-20 { margin: 0 -800px 1.5em 800px; } -.push-21 { margin: 0 -840px 1.5em 840px; } -.push-22 { margin: 0 -880px 1.5em 880px; } -.push-23 { margin: 0 -920px 1.5em 920px; } -.push-24 { margin: 0 -960px 1.5em 960px; } - -.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float: right; position:relative;} - - -/* Misc classes and elements --------------------------------------------------------------- */ - -/* In case you need to add a gutter above/below an element */ -.prepend-top { - margin-top:1.5em; -} -.append-bottom { - margin-bottom:1.5em; -} - -/* Use a .box to create a padded box inside a column. */ -.box { - padding: 1.5em; - margin-bottom: 1.5em; - background: #E5ECF9; -} - -/* Use this to create a horizontal ruler across a column. */ -hr { - background: #ddd; - color: #ddd; - clear: both; - float: none; - width: 100%; - height: .1em; - margin: 0 0 1.45em; - border: none; -} - -hr.space { - background: #fff; - color: #fff; - visibility: hidden; -} - - -/* Clearing floats without extra markup - Based on How To Clear Floats Without Structural Markup by PiE - [http://www.positioniseverything.net/easyclearing.html] */ - -.clearfix:after, .container:after { - content: "\0020"; - display: block; - height: 0; - clear: both; - visibility: hidden; - overflow:hidden; -} -.clearfix, .container {display: block;} - -/* Regular clearing - apply to column that should drop below previous ones. */ - -.clear { clear:both; } diff --git a/app/assets/stylesheets/vendor/blueprint/src/grid.png b/app/assets/stylesheets/vendor/blueprint/src/grid.png deleted file mode 100644 index 61a068918..000000000 Binary files a/app/assets/stylesheets/vendor/blueprint/src/grid.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/blueprint/src/ie.css b/app/assets/stylesheets/vendor/blueprint/src/ie.css deleted file mode 100644 index 0f458e6e9..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/ie.css +++ /dev/null @@ -1,76 +0,0 @@ -/* -------------------------------------------------------------- - - ie.css - - Contains every hack for Internet Explorer, - so that our core files stay sweet and nimble. - --------------------------------------------------------------- */ - -/* Make sure the layout is centered in IE5 */ -body { text-align: center; } -.container { text-align: left; } - -/* Fixes IE margin bugs */ -* html .column, * html .span-1, * html .span-2, -* html .span-3, * html .span-4, * html .span-5, -* html .span-6, * html .span-7, * html .span-8, -* html .span-9, * html .span-10, * html .span-11, -* html .span-12, * html .span-13, * html .span-14, -* html .span-15, * html .span-16, * html .span-17, -* html .span-18, * html .span-19, * html .span-20, -* html .span-21, * html .span-22, * html .span-23, -* html .span-24 { display:inline; overflow-x: hidden; } - - -/* Elements --------------------------------------------------------------- */ - -/* Fixes incorrect styling of legend in IE6. */ -* html legend { margin:0px -8px 16px 0; padding:0; } - -/* Fixes wrong line-height on sup/sub in IE. */ -sup { vertical-align:text-top; } -sub { vertical-align:text-bottom; } - -/* Fixes IE7 missing wrapping of code elements. */ -html>body p code { *white-space: normal; } - -/* IE 6&7 has problems with setting proper
      margins. */ -hr { margin:-8px auto 11px; } - -/* Explicitly set interpolation, allowing dynamically resized images to not look horrible */ -img { -ms-interpolation-mode:bicubic; } - -/* Clearing --------------------------------------------------------------- */ - -/* Makes clearfix actually work in IE */ -.clearfix, .container { display:inline-block; } -* html .clearfix, -* html .container { height:1%; } - - -/* Forms --------------------------------------------------------------- */ - -/* Fixes padding on fieldset */ -fieldset { padding-top:0; } - -/* Makes classic textareas in IE 6 resemble other browsers */ -textarea { overflow:auto; } - -/* Fixes rule that IE 6 ignores */ -input.text, input.title, textarea { background-color:#fff; border:1px solid #bbb; } -input.text:focus, input.title:focus { border-color:#666; } -input.text, input.title, textarea, select { margin:0.5em 0; } -input.checkbox, input.radio { position:relative; top:.25em; } - -/* Fixes alignment of inline form elements */ -form.inline div, form.inline p { vertical-align:middle; } -form.inline label { position:relative;top:-0.25em; } -form.inline input.checkbox, form.inline input.radio, -form.inline input.button, form.inline button { - margin:0.5em 0; -} -button, input.button { position:relative;top:0.25em; } diff --git a/app/assets/stylesheets/vendor/blueprint/src/print.css b/app/assets/stylesheets/vendor/blueprint/src/print.css deleted file mode 100644 index bbc7948af..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/print.css +++ /dev/null @@ -1,85 +0,0 @@ -/* -------------------------------------------------------------- - - print.css - * Gives you some sensible styles for printing pages. - * See Readme file in this directory for further instructions. - - Some additions you'll want to make, customized to your markup: - #header, #footer, #navigation { display:none; } - --------------------------------------------------------------- */ - -body { - line-height: 1.5; - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - color:#000; - background: none; - font-size: 10pt; -} - - -/* Layout --------------------------------------------------------------- */ - -.container { - background: none; -} - -hr { - background:#ccc; - color:#ccc; - width:100%; - height:2px; - margin:2em 0; - padding:0; - border:none; -} -hr.space { - background: #fff; - color: #fff; - visibility: hidden; -} - - -/* Text --------------------------------------------------------------- */ - -h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } -code { font:.9em "Courier New", Monaco, Courier, monospace; } - -a img { border:none; } -p img.top { margin-top: 0; } - -blockquote { - margin:1.5em; - padding:1em; - font-style:italic; - font-size:.9em; -} - -.small { font-size: .9em; } -.large { font-size: 1.1em; } -.quiet { color: #999; } -.hide { display:none; } - - -/* Links --------------------------------------------------------------- */ - -a:link, a:visited { - background: transparent; - font-weight:700; - text-decoration: underline; -} - -a:link:after, a:visited:after { - content: " (" attr(href) ")"; - font-size: 90%; -} - -/* If you're having trouble printing relative links, uncomment and customize this: - (note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */ - -/* a[href^="/"]:after { - content: " (http://www.yourdomain.com" attr(href) ") "; -} */ diff --git a/app/assets/stylesheets/vendor/blueprint/src/reset.css b/app/assets/stylesheets/vendor/blueprint/src/reset.css deleted file mode 100644 index 09d9131ab..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/reset.css +++ /dev/null @@ -1,45 +0,0 @@ -/* -------------------------------------------------------------- - - reset.css - * Resets default browser CSS. - --------------------------------------------------------------- */ - -html, body, div, span, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, code, -del, dfn, em, img, q, dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, dialog, figure, footer, header, -hgroup, nav, section { - margin: 0; - padding: 0; - border: 0; - font-weight: inherit; - font-style: inherit; - font-size: 100%; - font-family: inherit; - vertical-align: baseline; -} - -article, aside, dialog, figure, footer, header, -hgroup, nav, section { - display:block; -} - -body { - line-height: 1.5; -} - -/* Tables still need 'cellspacing="0"' in the markup. */ -table { border-collapse: separate; border-spacing: 0; } -caption, th, td { text-align: left; font-weight: normal; } -table, td, th { vertical-align: middle; } - -/* Remove possible quote marks (") from ,
      . */ -blockquote:before, blockquote:after, q:before, q:after { content: ""; } -blockquote, q { quotes: "" ""; } - -/* Remove annoying border on linked images. */ -a img { border: none; } diff --git a/app/assets/stylesheets/vendor/blueprint/src/typography.css b/app/assets/stylesheets/vendor/blueprint/src/typography.css deleted file mode 100644 index a1cfe272b..000000000 --- a/app/assets/stylesheets/vendor/blueprint/src/typography.css +++ /dev/null @@ -1,106 +0,0 @@ -/* -------------------------------------------------------------- - - typography.css - * Sets up some sensible default typography. - --------------------------------------------------------------- */ - -/* Default font settings. - The font-size percentage is of 16px. (0.75 * 16px = 12px) */ -html { font-size:100.01%; } -body { - font-size: 75%; - color: #222; - background: #fff; - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; -} - - -/* Headings --------------------------------------------------------------- */ - -h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; } - -h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; } -h2 { font-size: 2em; margin-bottom: 0.75em; } -h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; } -h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; } -h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; } -h6 { font-size: 1em; font-weight: bold; } - -h1 img, h2 img, h3 img, -h4 img, h5 img, h6 img { - margin: 0; -} - - -/* Text elements --------------------------------------------------------------- */ - -p { margin: 0 0 1.5em; } -p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; } -p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; } - -a:focus, -a:hover { color: #000; } -a { color: #009; text-decoration: underline; } - -blockquote { margin: 1.5em; color: #666; font-style: italic; } -strong { font-weight: bold; } -em,dfn { font-style: italic; } -dfn { font-weight: bold; } -sup, sub { line-height: 0; } - -abbr, -acronym { border-bottom: 1px dotted #666; } -address { margin: 0 0 1.5em; font-style: italic; } -del { color:#666; } - -pre { margin: 1.5em 0; white-space: pre; } -pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; } - - -/* Lists --------------------------------------------------------------- */ - -li ul, -li ol { margin: 0; } -ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; } - -ul { list-style-type: disc; } -ol { list-style-type: decimal; } - -dl { margin: 0 0 1.5em 0; } -dl dt { font-weight: bold; } -dd { margin-left: 1.5em;} - - -/* Tables --------------------------------------------------------------- */ - -table { margin-bottom: 1.4em; width:100%; } -th { font-weight: bold; } -thead th { background: #c3d9ff; } -th,td,caption { padding: 4px 10px 4px 5px; } -tr.even td { background: #e5ecf9; } -tfoot { font-style: italic; } -caption { background: #eee; } - - -/* Misc classes --------------------------------------------------------------- */ - -.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; } -.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; } -.hide { display: none; } - -.quiet { color: #666; } -.loud { color: #000; } -.highlight { background:#ff0; } -.added { background:#060; color: #fff; } -.removed { background:#900; color: #fff; } - -.first { margin-left:0; padding-left:0; } -.last { margin-right:0; padding-right:0; } -.top { margin-top:0; padding-top:0; } -.bottom { margin-bottom:0; padding-bottom:0; } diff --git a/app/assets/stylesheets/vendor/facebox.css b/app/assets/stylesheets/vendor/facebox.css old mode 100755 new mode 100644 index bd754e51b..511a9ef36 --- a/app/assets/stylesheets/vendor/facebox.css +++ b/app/assets/stylesheets/vendor/facebox.css @@ -9,11 +9,7 @@ #facebox .popup{ position:relative; border:1px solid #999; - -webkit-border-radius:2px; - -moz-border-radius:2px; border-radius:2px; - -webkit-box-shadow:0 0 10px rgba(0,0,0,0.8), 0 2px 200px rgba(255,255,255,0.2); - -moz-box-shadow:0 0 10px rgba(0,0,0,0.8), 0 2px 200px rgba(255,255,255,0.2);; box-shadow:0 0 10px rgba(0,0,0,0.8), 0 2px 200px rgba(255,255,255,0.2);; } @@ -22,8 +18,6 @@ width: 370px; padding: 20px; background: #fff; - -webkit-border-radius:2px; - -moz-border-radius:2px; border-radius:2px; } diff --git a/app/assets/stylesheets/vendor/fileuploader.css b/app/assets/stylesheets/vendor/fileuploader.css index e530c6594..cfd76937f 100644 --- a/app/assets/stylesheets/vendor/fileuploader.css +++ b/app/assets/stylesheets/vendor/fileuploader.css @@ -1,29 +1,74 @@ -.qq-uploader { position:relative; width: 100%;} +.qq-uploader { + position:relative; + width: 100%; +} .qq-upload-button { display:block; /* or inline-block */ - width: 105px; padding: 7px 0; text-align:center; - background:#333; border-bottom:1px solid #999;color:#fff; + width: 105px; + padding: 7px 0; + text-align:center; + background:#333; + border-bottom:1px solid #999; + color:#fff; } .qq-upload-drop-area { - position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2; - background:#ccc; text-align:center; + position:absolute; + top:0; left:0; + width:100%; + height:100%; + min-height: 70px; + z-index:2; + background:#ccc; + text-align:center; +} + +.qq-upload-drop-area span { + display:block; + position:absolute; + top: 50%; + width:100%; + margin-top:-8px; + font-size:16px; +} + +.qq-upload-drop-area-active { + background:#FF7171; +} + +.qq-upload-list { + margin:15px 35px; + padding:0; + list-style:disc; +} + +.qq-upload-list li { + margin:0; + padding:0; + line-height:15px; + font-size:12px; } -.qq-upload-drop-area span { - display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px; -} -.qq-upload-drop-area-active {background:#FF7171;} -.qq-upload-list {margin:15px 35px; padding:0; list-style:disc;} -.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px;} .qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text { margin-right: 7px; } -.qq-upload-file {} -.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;} -.qq-upload-size,.qq-upload-cancel {font-size:11px;} +.qq-upload-spinner { + display:inline-block; + background: url("loading.gif"); + width:15px; + height:15px; + vertical-align:text-bottom; +} -.qq-upload-failed-text {display:none;} -.qq-upload-fail .qq-upload-failed-text {display:inline;} +.qq-upload-size,.qq-upload-cancel { + font-size:11px; +} + +.qq-upload-failed-text { + display:none; +} +.qq-upload-fail .qq-upload-failed-text { + display:inline; +} diff --git a/app/assets/stylesheets/vendor/html5-boilerplate-mobile.css b/app/assets/stylesheets/vendor/html5-boilerplate-mobile.css deleted file mode 100644 index 22c33391c..000000000 --- a/app/assets/stylesheets/vendor/html5-boilerplate-mobile.css +++ /dev/null @@ -1,315 +0,0 @@ -/* - * HTML5 ✰ Boilerplate - * - * What follows is the result of much research on cross-browser styling. - * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, - * Kroc Camen, and the H5BP dev community and team. - * - * Detailed information about this CSS: h5bp.com/css - * - * ==|== normalize ========================================================== - */ - - -/* ============================================================================= - HTML5 display definitions - ========================================================================== */ - -article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } -audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } -audio:not([controls]) { display: none; } -[hidden] { display: none; } - - -/* ============================================================================= - Base - ========================================================================== */ - -/* - * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units - * 2. Force vertical scrollbar in non-IE - * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g - */ - -html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } - -body { margin: 0; font-size: 13px; line-height: 1.231; } - -body, button, input, select, textarea { font-family: sans-serif; color: #222; } - -/* - * Remove text-shadow in selection highlight: h5bp.com/i - * These selection declarations have to be separate - * Also: hot pink! (or customize the background color to match your design) - */ - -::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; } -::selection { background: #fe57a1; color: #fff; text-shadow: none; } - - -/* ============================================================================= - Links - ========================================================================== */ - -a { color: #00e; } -a:visited { color: #551a8b; } -a:hover { color: #06e; } -a:focus { outline: thin dotted; } - -/* Improve readability when focused and hovered in all browsers: h5bp.com/h */ -a:hover, a:active { outline: 0; } - - -/* ============================================================================= - Typography - ========================================================================== */ - -abbr[title] { border-bottom: 1px dotted; } - -b, strong { font-weight: bold; } - -blockquote { margin: 1em 40px; } - -dfn { font-style: italic; } - -hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } - -ins { background: #ff9; color: #000; text-decoration: none; } - -mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } - -/* Redeclare monospace font family: h5bp.com/j */ -pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; } - -/* Improve readability of pre-formatted text in all browsers */ -pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } - -q { quotes: none; } -q:before, q:after { content: ""; content: none; } - -small { font-size: 85%; } - -/* Position subscript and superscript content without affecting line-height: h5bp.com/k */ -sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } -sup { top: -0.5em; } -sub { bottom: -0.25em; } - - -/* ============================================================================= - Lists - ========================================================================== */ - -ul, ol { margin: 1em 0; padding: 0 0 0 40px; } -dd { margin: 0 0 0 40px; } -nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } - - -/* ============================================================================= - Embedded content - ========================================================================== */ - -/* - * 1. Improve image quality when scaled in IE7: h5bp.com/d - * 2. Remove the gap between images and borders on image containers: h5bp.com/e - */ - -img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } - -/* - * Correct overflow not hidden in IE9 - */ - -svg:not(:root) { overflow: hidden; } - - -/* ============================================================================= - Figures - ========================================================================== */ - -figure { margin: 0; } - - -/* ============================================================================= - Forms - ========================================================================== */ - -form { margin: 0; } -fieldset { border: 0; margin: 0; padding: 0; } - -/* Indicate that 'label' will shift focus to the associated form element */ -label { cursor: pointer; } - -/* - * 1. Correct color not inheriting in IE6/7/8/9 - * 2. Correct alignment displayed oddly in IE6/7 - */ - -legend { border: 0; *margin-left: -7px; padding: 0; } - -/* - * 1. Correct font-size not inheriting in all browsers - * 2. Remove margins in FF3/4 S5 Chrome - * 3. Define consistent vertical alignment display in all browsers - */ - -button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } - -/* - * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet) - * 2. Correct inner spacing displayed oddly in IE6/7 - */ - -button, input { line-height: normal; *overflow: visible; } - -/* - * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7 - */ - -table button, table input { *overflow: auto; } - -/* - * 1. Display hand cursor for clickable form elements - * 2. Allow styling of clickable form elements in iOS - */ - -button, input[type="button"], input[type="reset"], input[type="submit"], [role="button"] { cursor: pointer; -webkit-appearance: button; } - -/* - * Consistent box sizing and appearance - */ - -input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; } -input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } -input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } - -/* - * Remove inner padding and border in FF3/4: h5bp.com/l - */ - -button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } - -/* - * 1. Remove default vertical scrollbar in IE6/7/8/9 - * 2. Allow only vertical resizing - */ - -textarea { overflow: auto; vertical-align: top; resize: vertical; } - -/* Colors for form validity */ -input:valid, textarea:valid { } -input:invalid, textarea:invalid { background-color: #f0dddd; } - - -/* ============================================================================= - Tables - ========================================================================== */ - -table { border-collapse: collapse; border-spacing: 0; } -td { vertical-align: top; } - - -/* ==|== primary styles ===================================================== - Author: - ========================================================================== */ - - - - - - - - - - - - - - - - -/* - * Media queries for responsive design https://github.com/shichuan/mobile-html5-boilerplate/wiki/The-Style - */ - - -/* Styles for desktop and large screen ----------- */ - -/*styles for 800px and up!*/ -@media only screen and (min-width: 800px) { - /* Styles */ -}/*/mediaquery*/ - - -/* iPhone 4, Opera Mobile 11 and other high pixel ratio devices ----------- */ -@media -only screen and (-webkit-min-device-pixel-ratio: 1.5), -only screen and (-o-min-device-pixel-ratio: 3/2), -only screen and (min--moz-device-pixel-ratio: 1.5), -only screen and (min-device-pixel-ratio: 1.5) { - /* Styles */ -} - - - -/* ==|== non-semantic helper classes ======================================== - Please define your styles before this section. - ========================================================================== */ - -/* prevent callout */ -.nocallout {-webkit-touch-callout: none;} - -/* Text overflow with ellipsis */ -.ellipsis { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -/* A hack for HTML5 contenteditable attribute on mobile */ -textarea[contenteditable] {-webkit-appearance: none;} - -/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if they have been set as display: none */ -.gifhidden {position: absolute; left: -100%;} - -/* For image replacement */ -.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } -.ir br { display: none; } - -/* Hide from both screenreaders and browsers: h5bp.com/u */ -.hidden { display: none !important; visibility: hidden; } - -/* Hide only visually, but have it available for screenreaders: h5bp.com/v */ -.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } - -/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ -.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } - -/* Hide visually and from screenreaders, but maintain layout */ -.invisible { visibility: hidden; } - -/* Contain floats: h5bp.com/q */ -.clearfix:before, .clearfix:after { content: ""; display: table; } -.clearfix:after { clear: both; } -.clearfix { *zoom: 1; } - - - -/* ==|== print styles ======================================================= - Print styles. - Inlined to avoid required HTTP connection: h5bp.com/r - ========================================================================== */ - -@media print { - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */ - a, a:visited { text-decoration: underline; } - a[href]:after { content: " (" attr(href) ")"; } - abbr[title]:after { content: " (" attr(title) ")"; } - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */ - pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } - thead { display: table-header-group; } /* h5bp.com/t */ - tr, img { page-break-inside: avoid; } - img { max-width: 100% !important; } - @page { margin: 0.5cm; } - p, h2, h3 { orphans: 3; widows: 3; } - h2, h3 { page-break-after: avoid; } -} diff --git a/app/assets/stylesheets/vendor/images/icon-search-black.png b/app/assets/stylesheets/vendor/images/icon-search-black.png deleted file mode 100644 index 5721120f8..000000000 Binary files a/app/assets/stylesheets/vendor/images/icon-search-black.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/images/icons-18-black.png b/app/assets/stylesheets/vendor/images/icons-18-black.png deleted file mode 100644 index 71268bdf7..000000000 Binary files a/app/assets/stylesheets/vendor/images/icons-18-black.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/images/icons-18-white.png b/app/assets/stylesheets/vendor/images/icons-18-white.png deleted file mode 100644 index dadc6af58..000000000 Binary files a/app/assets/stylesheets/vendor/images/icons-18-white.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/images/icons-36-black.png b/app/assets/stylesheets/vendor/images/icons-36-black.png deleted file mode 100644 index 8c35ae3fb..000000000 Binary files a/app/assets/stylesheets/vendor/images/icons-36-black.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/images/icons-36-white.png b/app/assets/stylesheets/vendor/images/icons-36-white.png deleted file mode 100644 index 7e559b816..000000000 Binary files a/app/assets/stylesheets/vendor/images/icons-36-white.png and /dev/null differ diff --git a/app/assets/stylesheets/vendor/interim-bootstrap.css.scss b/app/assets/stylesheets/vendor/interim-bootstrap.css.scss deleted file mode 100644 index 531710600..000000000 --- a/app/assets/stylesheets/vendor/interim-bootstrap.css.scss +++ /dev/null @@ -1,13 +0,0 @@ -// Load the necessary styles from the bootstrap-sass partials to keep this file -// up to date with the version of Bootstrap we're using. -@import "bootstrap/mixins"; -@import "bootstrap/variables"; -@import "bootstrap/tooltip"; -@import "bootstrap/popovers"; -@import "bootstrap/component-animations"; - -/* hacks */ -.popover h3 { - margin-bottom: 0; - font-weight: bold; -} diff --git a/app/assets/stylesheets/vendor/jquery.mentionsInput.css b/app/assets/stylesheets/vendor/jquery.mentionsInput.css deleted file mode 100644 index 1ea96dc74..000000000 --- a/app/assets/stylesheets/vendor/jquery.mentionsInput.css +++ /dev/null @@ -1,4 +0,0 @@ - -#publisher .mentions-input-box .mentions-autocomplete-list { - width: 483px; -} diff --git a/app/assets/stylesheets/vendor/jquery.mobile-1.0b2.min.css b/app/assets/stylesheets/vendor/jquery.mobile-1.0b2.min.css deleted file mode 100644 index 89be9382d..000000000 --- a/app/assets/stylesheets/vendor/jquery.mobile-1.0b2.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * jQuery Mobile v1.0b2 - * http://jquerymobile.com/ - * - * Copyright 2010, jQuery Project - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - */.ui-bar-a{border:1px solid #2a2a2a;background:#111;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#111));background-image:-webkit-linear-gradient(top,#3c3c3c,#111);background-image:-moz-linear-gradient(top,#3c3c3c,#111);background-image:-ms-linear-gradient(top,#3c3c3c,#111);background-image:-o-linear-gradient(top,#3c3c3c,#111);background-image:linear-gradient(top,#3c3c3c,#111)}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Helvetica,Arial,sans-serif}.ui-bar-a .ui-link-inherit{color:#fff}.ui-bar-a .ui-link{color:#7cc4e7;font-weight:bold}.ui-body-a{border:1px solid #2a2a2a;background:#222;color:#fff;text-shadow:0 1px 0 #000;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#222));background-image:-webkit-linear-gradient(top,#666,#222);background-image:-moz-linear-gradient(top,#666,#222);background-image:-ms-linear-gradient(top,#666,#222);background-image:-o-linear-gradient(top,#666,#222);background-image:linear-gradient(top,#666,#222)}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Helvetica,Arial,sans-serif}.ui-body-a .ui-link-inherit{color:#fff}.ui-body-a .ui-link{color:#2489ce;font-weight:bold}.ui-br{border-bottom:#828282;border-bottom:rgba(130,130,130,.3);border-bottom-width:1px;border-bottom-style:solid}.ui-btn-up-a{border:1px solid #222;background:#333;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));background-image:-webkit-linear-gradient(top,#555,#333);background-image:-moz-linear-gradient(top,#555,#333);background-image:-ms-linear-gradient(top,#555,#333);background-image:-o-linear-gradient(top,#555,#333);background-image:linear-gradient(top,#555,#333)}.ui-btn-up-a a.ui-link-inherit{color:#fff}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#444));background-image:-webkit-linear-gradient(top,#666,#444);background-image:-moz-linear-gradient(top,#666,#444);background-image:-ms-linear-gradient(top,#666,#444);background-image:-o-linear-gradient(top,#666,#444);background-image:linear-gradient(top,#666,#444)}.ui-btn-hover-a a.ui-link-inherit{color:#fff}.ui-btn-down-a{border:1px solid #000;background:#3d3d3d;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#333),to(#5a5a5a));background-image:-webkit-linear-gradient(top,#333,#5a5a5a);background-image:-moz-linear-gradient(top,#333,#5a5a5a);background-image:-ms-linear-gradient(top,#333,#5a5a5a);background-image:-o-linear-gradient(top,#333,#5a5a5a);background-image:linear-gradient(top,#333,#5a5a5a)}.ui-btn-down-a a.ui-link-inherit{color:#fff}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #254f7a;background-image:-webkit-gradient(linear,left top,left bottom,from(#81a8ce),to(#5e87b0));background-image:-webkit-linear-gradient(top,#81a8ce,#5e87b0);background-image:-moz-linear-gradient(top,#81a8ce,#5e87b0);background-image:-ms-linear-gradient(top,#81a8ce,#5e87b0);background-image:-o-linear-gradient(top,#81a8ce,#5e87b0);background-image:linear-gradient(top,#81a8ce,#5e87b0)}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Helvetica,Arial,sans-serif}.ui-bar-b .ui-link-inherit{color:#fff}.ui-bar-b .ui-link{color:#7cc4e7;font-weight:bold}.ui-body-b{border:1px solid #c6c6c6;background:#ccc;color:#333;text-shadow:0 1px 0 #fff;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#e6e6e6),to(#ccc));background-image:-webkit-linear-gradient(top,#e6e6e6,#ccc);background-image:-moz-linear-gradient(top,#e6e6e6,#ccc);background-image:-ms-linear-gradient(top,#e6e6e6,#ccc);background-image:-o-linear-gradient(top,#e6e6e6,#ccc);background-image:linear-gradient(top,#e6e6e6,#ccc)}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Helvetica,Arial,sans-serif}.ui-body-b .ui-link-inherit{color:#333}.ui-body-b .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-b{border:1px solid #145072;background:#2567ab;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #145072;background-image:-webkit-gradient(linear,left top,left bottom,from(#5f9cc5),to(#396b9e));background-image:-webkit-linear-gradient(top,#5f9cc5,#396b9e);background-image:-moz-linear-gradient(top,#5f9cc5,#396b9e);background-image:-ms-linear-gradient(top,#5f9cc5,#396b9e);background-image:-o-linear-gradient(top,#5f9cc5,#396b9e);background-image:linear-gradient(top,#5f9cc5,#396b9e)}.ui-btn-up-b a.ui-link-inherit{color:#fff}.ui-btn-hover-b{border:1px solid #00516e;background:#4b88b6;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #014d68;background-image:-webkit-gradient(linear,left top,left bottom,from(#72b0d4),to(#4b88b6));background-image:-webkit-linear-gradient(top,#72b0d4,#4b88b6);background-image:-moz-linear-gradient(top,#72b0d4,#4b88b6);background-image:-ms-linear-gradient(top,#72b0d4,#4b88b6);background-image:-o-linear-gradient(top,#72b0d4,#4b88b6);background-image:linear-gradient(top,#72b0d4,#4b88b6)}.ui-btn-hover-b a.ui-link-inherit{color:#fff}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #225377;background-image:-webkit-gradient(linear,left top,left bottom,from(#396b9e),to(#4e89c5));background-image:-webkit-linear-gradient(top,#396b9e,#4e89c5);background-image:-moz-linear-gradient(top,#396b9e,#4e89c5);background-image:-ms-linear-gradient(top,#396b9e,#4e89c5);background-image:-o-linear-gradient(top,#396b9e,#4e89c5);background-image:linear-gradient(top,#396b9e,#4e89c5)}.ui-btn-down-b a.ui-link-inherit{color:#fff}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-c{border:1px solid #b3b3b3;background:#e9eaeb;color:#3e3e3e;font-weight:bold;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#f0f0f0),to(#e9eaeb));background-image:-webkit-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-moz-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-ms-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-o-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:linear-gradient(top,#f0f0f0,#e9eaeb)}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c{border:1px solid #b3b3b3;color:#333;text-shadow:0 1px 0 #fff;background:#f0f0f0;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background-image:-webkit-linear-gradient(top,#eee,#ddd);background-image:-moz-linear-gradient(top,#eee,#ddd);background-image:-ms-linear-gradient(top,#eee,#ddd);background-image:-o-linear-gradient(top,#eee,#ddd);background-image:linear-gradient(top,#eee,#ddd)}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c .ui-link-inherit{color:#333}.ui-body-c .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#444;text-shadow:0 1px 1px #f6f6f6;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-ms-linear-gradient(top,#fdfdfd,#eee);background-image:-o-linear-gradient(top,#fdfdfd,#eee);background-image:linear-gradient(top,#fdfdfd,#eee)}.ui-btn-up-c a.ui-link-inherit{color:#2f3e46}.ui-btn-hover-c{border:1px solid #bbb;background:#dadada;font-weight:bold;color:#101010;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#ededed),to(#dadada));background-image:-webkit-linear-gradient(top,#ededed,#dadada);background-image:-moz-linear-gradient(top,#ededed,#dadada);background-image:-ms-linear-gradient(top,#ededed,#dadada);background-image:-o-linear-gradient(top,#ededed,#dadada);background-image:linear-gradient(top,#ededed,#dadada)}.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46}.ui-btn-down-c{border:1px solid #808080;background:#fdfdfd;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fdfdfd));background-image:-webkit-linear-gradient(top,#eee,#fdfdfd);background-image:-moz-linear-gradient(top,#eee,#fdfdfd);background-image:-ms-linear-gradient(top,#eee,#fdfdfd);background-image:-o-linear-gradient(top,#eee,#fdfdfd);background-image:linear-gradient(top,#eee,#fdfdfd)}.ui-btn-down-c a.ui-link-inherit{color:#2f3e46}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-d{border:1px solid #ccc;background:#bbb;color:#333;text-shadow:0 1px 0 #eee;background-image:-webkit-gradient(linear,left top,left bottom,from(#ddd),to(#bbb));background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(top,#ddd,#bbb)}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif}.ui-bar-d .ui-link-inherit{color:#333}.ui-bar-d .ui-link{color:#2489ce;font-weight:bold}.ui-body-d{border:1px solid #ccc;color:#333;text-shadow:0 1px 0 #fff;background:#fff}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Helvetica,Arial,sans-serif}.ui-body-d .ui-link-inherit{color:#333}.ui-body-d .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-d{border:1px solid #ccc;background:#fff;font-weight:bold;color:#444;text-shadow:0 1px 1px #fff}.ui-btn-up-d a.ui-link-inherit{color:#333}.ui-btn-hover-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#222;cursor:pointer;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-ms-linear-gradient(top,#fdfdfd,#eee);background-image:-o-linear-gradient(top,#fdfdfd,#eee);background-image:linear-gradient(top,#fdfdfd,#eee)}.ui-btn-hover-d a.ui-link-inherit{color:#222}.ui-btn-down-d{border:1px solid #aaa;background:#fff;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fff));background-image:-webkit-linear-gradient(top,#eee,#fff);background-image:-moz-linear-gradient(top,#eee,#fff);background-image:-ms-linear-gradient(top,#eee,#fff);background-image:-o-linear-gradient(top,#eee,#fff);background-image:linear-gradient(top,#eee,#fff)}.ui-btn-down-d a.ui-link-inherit{color:#111}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-e{border:1px solid #f7c942;background:#fadb4e;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(top,#fceda7,#fadb4e);background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-ms-linear-gradient(top,#fceda7,#fadb4e);background-image:-o-linear-gradient(top,#fceda7,#fadb4e);background-image:linear-gradient(top,#fceda7,#fadb4e)}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Helvetica,Arial,sans-serif}.ui-bar-e .ui-link-inherit{color:#333}.ui-bar-e .ui-link{color:#2489ce;font-weight:bold}.ui-body-e{border:1px solid #f7c942;color:#333;text-shadow:0 1px 0 #fff;background:#faeb9e;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#faeb9e));background-image:-webkit-linear-gradient(top,#fff,#faeb9e);background-image:-moz-linear-gradient(top,#fff,#faeb9e);background-image:-ms-linear-gradient(top,#fff,#faeb9e);background-image:-o-linear-gradient(top,#fff,#faeb9e);background-image:linear-gradient(top,#fff,#faeb9e)}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Helvetica,Arial,sans-serif}.ui-body-e .ui-link-inherit{color:#333}.ui-body-e .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-e{border:1px solid #f7c942;background:#fadb4e;font-weight:bold;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(top,#fceda7,#fadb4e);background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-ms-linear-gradient(top,#fceda7,#fadb4e);background-image:-o-linear-gradient(top,#fceda7,#fadb4e);background-image:linear-gradient(top,#fceda7,#fadb4e)}.ui-btn-up-e a.ui-link-inherit{color:#333}.ui-btn-hover-e{border:1px solid #e79952;background:#fbe26f;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf0b5),to(#fbe26f));background-image:-webkit-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-moz-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-ms-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-o-linear-gradient(top,#fcf0b5,#fbe26f);background-image:linear-gradient(top,#fcf0b5,#fbe26f)}.ui-btn-hover-e a.ui-link-inherit{color:#333}.ui-btn-down-e{border:1px solid #f7c942;background:#fceda7;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fadb4e),to(#fceda7));background-image:-webkit-linear-gradient(top,#fadb4e,#fceda7);background-image:-moz-linear-gradient(top,#fadb4e,#fceda7);background-image:-ms-linear-gradient(top,#fadb4e,#fceda7);background-image:-o-linear-gradient(top,#fadb4e,#fceda7);background-image:linear-gradient(top,#fadb4e,#fceda7)}.ui-btn-down-e a.ui-link-inherit{color:#333}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Helvetica,Arial,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active{border:1px solid #155678;background:#4596ce;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #145072;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from(#85bae4),to(#5393c5));background-image:-webkit-linear-gradient(top,#85bae4,#5393c5);background-image:-moz-linear-gradient(top,#85bae4,#5393c5);background-image:-ms-linear-gradient(top,#85bae4,#5393c5);background-image:-o-linear-gradient(top,#85bae4,#5393c5);background-image:linear-gradient(top,#85bae4,#5393c5);outline:0}.ui-btn-active a.ui-link-inherit{color:#fff}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3)}.ui-corner-tl{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em}.ui-corner-tr{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bl{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-br{-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-top{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-right{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-left{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-all{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em}.ui-disabled{opacity:.3}.ui-disabled,.ui-disabled a{cursor:default}.ui-icon{background:#666;background:rgba(0,0,0,.4);background-image:url(images/icons-18-white.png);background-repeat:no-repeat;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.ui-icon-alt{background:#fff;background:rgba(255,255,255,.3);background-image:url(images/icons-18-black.png);background-repeat:no-repeat}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-resolution:240dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-search,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(images/icons-36-white.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px}.ui-icon-alt{background-image:url(images/icons-36-black.png)}}.ui-icon-plus{background-position:-0 50%}.ui-icon-minus{background-position:-36px 50%}.ui-icon-delete{background-position:-72px 50%}.ui-icon-arrow-r{background-position:-108px 50%}.ui-icon-arrow-l{background-position:-144px 50%}.ui-icon-arrow-u{background-position:-180px 50%}.ui-icon-arrow-d{background-position:-216px 50%}.ui-icon-check{background-position:-252px 50%}.ui-icon-gear{background-position:-288px 50%}.ui-icon-refresh{background-position:-324px 50%}.ui-icon-forward{background-position:-360px 50%}.ui-icon-back{background-position:-396px 50%}.ui-icon-grid{background-position:-432px 50%}.ui-icon-star{background-position:-468px 50%}.ui-icon-alert{background-position:-504px 50%}.ui-icon-info{background-position:-540px 50%}.ui-icon-home{background-position:-576px 50%}.ui-icon-search{background-position:-612px 50%}.ui-icon-checkbox-off{background-position:-684px 50%}.ui-icon-checkbox-on{background-position:-648px 50%}.ui-icon-radio-off{background-position:-756px 50%}.ui-icon-radio-on{background-position:-720px 50%}.ui-checkbox .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#4596ce}.ui-icon-searchfield{background-image:url(images/icon-search-black.png);background-size:16px 16px}.ui-icon-loading{background-image:url(assets/ajax-loader.png);width:40px;height:40px;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;background-size:35px 35px}.ui-btn-corner-tl{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em}.ui-btn-corner-tr{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-br{-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-top{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-right{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-left{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-all{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.ui-overlay{background:#666;opacity:.5;filter:Alpha(Opacity=50);position:absolute;width:100%;height:100%}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6)}.ui-shadow{-moz-box-shadow:0 1px 4px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.3);box-shadow:0 1px 4px rgba(0,0,0,.3)}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2)}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4)}.ui-focus{-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.ui-mobile-nosupport-boxshadow .ui-focus{outline-width:2px}.ui-mobile,.ui-mobile body{height:100%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border:0}.ui-mobile-viewport{margin:0;overflow-x:hidden;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.portrait,.portrait .ui-page{min-height:420px}.landscape,.landscape .ui-page{min-height:300px}.ui-loading .ui-mobile-viewport{overflow:hidden!important}.ui-loading .ui-loader{display:block}.ui-loading .ui-page{overflow:hidden}.ui-loader{display:none;position:absolute;opacity:.85;z-index:100;left:50%;width:200px;margin-left:-130px;margin-top:-35px;padding:10px 30px}.ui-loader h1{font-size:15px;text-align:center}.ui-loader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent}.ui-mobile-rendering>*{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{display:block}.ui-page .ui-header,.ui-page .ui-footer{position:relative}.ui-header .ui-btn-left{position:absolute;left:10px;top:.4em}.ui-header .ui-btn-right{position:absolute;right:10px;top:.4em}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 90px .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-page-fullscreen .ui-content{padding:0}.ui-icon{width:18px;height:18px}.ui-fullscreen img{max-width:100%}.ui-nojs{position:absolute;left:-9999px}.spin{-webkit-transform:rotate(360deg);-webkit-animation-name:spin;-webkit-animation-duration:1s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.in,.out{-webkit-animation-timing-function:ease-in-out;-webkit-animation-duration:350ms}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;z-index:10}.slideup.out{-webkit-animation-name:dontmove;z-index:0}.slideup.out.reverse{-webkit-transform:translateY(100%);z-index:10;-webkit-animation-name:slideouttobottom}.slideup.in.reverse{z-index:0;-webkit-animation-name:dontmove}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;z-index:10}.slidedown.out{-webkit-animation-name:dontmove;z-index:0}.slidedown.out.reverse{-webkit-transform:translateY(-100%);z-index:10;-webkit-animation-name:slideouttotop}.slidedown.in.reverse{z-index:0;-webkit-animation-name:dontmove}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(-100%)}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(100%)}}@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(100%)}}@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(-100%)}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}.fade.in{opacity:1;z-index:10;-webkit-animation-name:fadein}.fade.out{z-index:0;-webkit-animation-name:fadeout}.viewport-flip{-webkit-perspective:1000;position:absolute}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden}.flip{-webkit-animation-duration:.65s;-webkit-backface-visibility:hidden;-webkit-transform:translateX(0)}.flip.in{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromleft}.flip.out{-webkit-transform:rotateY(-180deg) scale(.8);-webkit-animation-name:flipouttoleft}.flip.in.reverse{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromright}.flip.out.reverse{-webkit-transform:rotateY(180deg) scale(.8);-webkit-animation-name:flipouttoright}@-webkit-keyframes flipinfromright{from{-webkit-transform:rotateY(-180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipinfromleft{from{-webkit-transform:rotateY(180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(-180deg) scale(.8)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(180deg) scale(.8)}}@-webkit-keyframes dontmove{from{opacity:1}to{opacity:1}}.pop{-webkit-transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);opacity:1;-webkit-animation-name:popin;z-index:10}.pop.out.reverse{-webkit-transform:scale(.2);opacity:0;-webkit-animation-name:popout;z-index:10}.pop.in.reverse{z-index:0;-webkit-animation-name:dontmove}@-webkit-keyframes popin{from{-webkit-transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.2);opacity:0}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px}.ui-grid-solo .ui-block-a{width:100%;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:50%}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.333%}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:25%}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:20%}.ui-grid-d .ui-block-a{clear:left}.ui-header,.ui-footer,.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{position:absolute;overflow:hidden;width:100%;border-left-width:0;border-right-width:0}.ui-header-fixed,.ui-footer-fixed{z-index:1000;-webkit-transform:translateZ(0)}.ui-footer-duplicate,.ui-page-fullscreen .ui-fixed-inline{display:none}.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{opacity:.9}.ui-navbar{overflow:hidden}.ui-navbar ul,.ui-navbar-expanded ul{list-style:none;padding:0;margin:0;position:relative;display:block;border:0}.ui-navbar-collapsed ul{float:left;width:75%;margin-right:-2px}.ui-navbar-collapsed .ui-navbar-toggle{float:left;width:25%}.ui-navbar li.ui-navbar-truncate{position:absolute;left:-9999px;top:-9999px}.ui-navbar li .ui-btn,.ui-navbar .ui-navbar-toggle .ui-btn{display:block;font-size:12px;text-align:center;margin:0;border-right-width:0}.ui-navbar li .ui-btn{margin-right:-1px}.ui-navbar li .ui-btn:last-child{margin-right:0}.ui-header .ui-navbar li .ui-btn,.ui-header .ui-navbar .ui-navbar-toggle .ui-btn,.ui-footer .ui-navbar li .ui-btn,.ui-footer .ui-navbar .ui-navbar-toggle .ui-btn{border-top-width:0;border-bottom-width:0}.ui-navbar .ui-btn-inner{padding-left:2px;padding-right:2px}.ui-navbar-noicons li .ui-btn .ui-btn-inner,.ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner{padding-top:.8em;padding-bottom:.9em}.ui-navbar-expanded .ui-btn{margin:0;font-size:14px}.ui-navbar-expanded .ui-btn-inner{padding-left:5px;padding-right:5px}.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner{padding:45px 5px 15px;text-align:center}.ui-navbar-expanded .ui-btn-icon-top .ui-icon{top:15px}.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner{padding:15px 5px 45px;text-align:center}.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon{bottom:15px}.ui-navbar-expanded li .ui-btn .ui-btn-inner{min-height:2.5em}.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner{padding-top:1.8em;padding-bottom:1.9em}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin:.5em 5px;padding:0}.ui-btn:focus,.ui-btn:active{outline:0}.ui-header .ui-btn,.ui-footer .ui-btn,.ui-bar .ui-btn{display:inline-block;font-size:13px;margin:0}.ui-btn-inline{display:inline-block}.ui-btn-inner{padding:.6em 25px;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative;zoom:1}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner{padding:.4em 8px .5em}.ui-btn-icon-notext{display:inline-block;width:20px;height:20px;padding:2px 1px 2px 3px;text-indent:-9999px}.ui-btn-icon-notext .ui-btn-inner{padding:0}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-999px}.ui-btn-icon-left .ui-btn-inner{padding-left:33px}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-bar .ui-btn-icon-left .ui-btn-inner{padding-left:27px}.ui-btn-icon-right .ui-btn-inner{padding-right:33px}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-bar .ui-btn-icon-right .ui-btn-inner{padding-right:27px}.ui-btn-icon-top .ui-btn-inner{padding-top:33px}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner,.ui-bar .ui-btn-icon-top .ui-btn-inner{padding-top:27px}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:33px}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner,.ui-bar .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:27px}.ui-btn-icon-notext .ui-icon{display:block}.ui-btn-icon-left .ui-icon,.ui-btn-icon-right .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-btn-icon-top .ui-icon,.ui-btn-icon-bottom .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:10px}.ui-btn-icon-right .ui-icon{right:10px}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-bar .ui-btn-icon-left .ui-icon{left:4px}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-bar .ui-btn-icon-right .ui-icon{right:4px}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-bar .ui-btn-icon-top .ui-icon{top:4px}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-bar .ui-btn-icon-bottom .ui-icon{bottom:4px}.ui-btn-icon-top .ui-icon{top:5px}.ui-btn-icon-bottom .ui-icon{bottom:5px}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:button;opacity:0;cursor:pointer;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0);background:transparent}.ui-collapsible-contain{margin:.5em 0}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -8px;padding:0;border-width:0 0 1px 0;position:relative}.ui-collapsible-heading a{text-align:left;margin:0}.ui-collapsible-heading a .ui-btn-inner{padding-left:40px}.ui-collapsible-heading a span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading a span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading a span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;left:-9999px}.ui-collapsible-content{display:block;padding:10px 0 10px 8px}.ui-collapsible-content-collapsed{display:none}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible-contain{margin:-1px 0 0}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0 1em}.ui-bar .ui-controlgroup{margin:0 .3em}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em}.ui-controlgroup-controls{display:block;width:95%}.ui-controlgroup li{list-style:none}.ui-controlgroup-vertical .ui-btn,.ui-controlgroup-vertical .ui-checkbox,.ui-controlgroup-vertical .ui-radio{margin:0;border-bottom-width:0}.ui-controlgroup-vertical .ui-controlgroup-last{border-bottom-width:1px}.ui-controlgroup-horizontal{padding:0}.ui-controlgroup-horizontal .ui-btn,.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{display:inline-block;margin:0 -5px 0 0}.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{display:inline}.ui-controlgroup-horizontal .ui-checkbox .ui-btn,.ui-controlgroup-horizontal .ui-radio .ui-btn,.ui-controlgroup-horizontal .ui-checkbox:last-child,.ui-controlgroup-horizontal .ui-radio:last-child{margin-right:0}.ui-controlgroup-horizontal .ui-controlgroup-last{margin-right:0}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px}@media all and (min-width:450px){.ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-controlgroup-controls{width:60%;display:inline-block}}.ui-dialog{min-height:480px}.ui-dialog .ui-header,.ui-dialog .ui-content,.ui-dialog .ui-footer{margin:15px;position:relative}.ui-dialog .ui-header,.ui-dialog .ui-footer{z-index:10;width:auto}.ui-dialog .ui-content,.ui-dialog .ui-footer{margin-top:-15px}.ui-checkbox,.ui-radio{position:relative;margin:.2em 0 .5em;z-index:1}.ui-checkbox .ui-btn,.ui-radio .ui-btn{margin:0;text-align:left;z-index:2}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-checkbox .ui-icon,.ui-radio .ui-icon{top:1.1em}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;z-index:1}.ui-field-contain{padding:1.5em 0;margin:0;border-bottom-width:1px;overflow:visible}.ui-field-contain:first-child{border-top-width:0}@media all and (min-width:450px){.ui-field-contain{border-width:0;padding:0;margin:1em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{overflow:hidden}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:button;left:0;top:0;width:100%;height:100%;opacity:0;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0)}@-moz-document url-prefix(){.ui-select .ui-btn select{opacity:.0001}}.ui-select .ui-btn select.ui-select-nativeonly{opacity:1;text-indent:0}.ui-select .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em}.ui-select .ui-btn-text{text-overflow:ellipsis;overflow:hidden}.ui-selectmenu{position:absolute;padding:0;z-index:100!important;width:80%;max-width:350px;padding:6px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-selectmenu-hidden{top:-9999px;left:-9999px}.ui-selectmenu-screen{position:absolute;top:0;left:0;width:100%;height:100%;z-index:99}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header .ui-title{margin:.6em 46px .8em}@media all and (min-width:450px){label.ui-select{display:inline-block;width:20%;margin:0 2% 0 0}.ui-select{width:60%;display:inline-block}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;line-height:1.4;font-size:16px;display:block;width:95%}input.ui-input-text{-webkit-appearance:none}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear}.ui-input-search{padding:0 30px;width:77%;background-position:8px 50%;background-repeat:no-repeat;position:relative}.ui-input-search input.ui-input-text{border:0;width:98%;padding:.4em 0;margin:0;display:block;background:transparent none;outline:0!important}.ui-input-search .ui-input-clear{position:absolute;right:0;top:50%;margin-top:-14px}.ui-input-search .ui-input-clear-hidden{display:none}@media all and (min-width:450px){label.ui-input-text{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}input.ui-input-text,textarea.ui-input-text,.ui-input-search{width:60%;display:inline-block}.ui-input-search{width:50%}.ui-input-search input.ui-input-text{width:98%}}.ui-listview{margin:0;counter-reset:listnumbering}.ui-content .ui-listview{margin:-15px}.ui-content .ui-listview-inset{margin:1em 0}.ui-listview,.ui-li{list-style:none;padding:0}.ui-li,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left;border-width:0;border-top-width:1px}.ui-li .ui-btn-text a.ui-link-inherit{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-divider,.ui-li-static{padding:.5em 15px;font-size:14px;font-weight:bold}.ui-li-divider{counter-reset:listnumbering}ol.ui-listview .ui-link-inherit:before,ol.ui-listview .ui-li-static:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". "}ol.ui-listview .ui-li-jsnumbering:before{content:""!important}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px}.ui-li:last-child,.ui-li.ui-field-contain:last-child{border-bottom-width:1px}.ui-li>.ui-btn-inner{display:block;position:relative;padding:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li{padding:.7em 75px .7em 15px;display:block}.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-thumb{min-height:60px;padding-left:100px}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-icon{min-height:20px;padding-left:40px}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-thumb,.ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px}.ui-li-icon{max-height:40px;max-width:40px;left:10px;top:.9em}.ui-li-thumb,.ui-li-icon,.ui-li-content{float:left;margin-right:10px}.ui-li-aside{float:right;width:50%;text-align:right;margin:.3em 0}@media all and (min-width:480px){.ui-li-aside{width:45%}}.ui-li-divider{cursor:default}.ui-li-has-alt .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt{padding-right:95px}.ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:38px}.ui-li-divider .ui-li-count,.ui-li-static .ui-li-count{right:10px}.ui-li-has-alt .ui-li-count{right:55px}.ui-li-link-alt{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-11px 0 0 0;border-bottom-width:1px}.ui-li-link-alt .ui-btn-inner{padding:0;position:static}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block}.ui-listview-filter-inset{margin:-15px -5px -15px -5px;background:transparent}.ui-li.ui-screen-hidden{display:none}@media only screen and (min-device-width:768px) and (max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible}}label.ui-slider{display:block}input.ui-slider-input{display:inline-block;width:50px}select.ui-slider-switch{display:none}div.ui-slider{position:relative;display:inline-block;overflow:visible;height:15px;padding:0;margin:0 2% 0 20px;top:4px;width:66%}a.ui-slider-handle{position:absolute;z-index:10;top:50%;width:28px;height:28px;margin-top:-15px;margin-left:-15px}a.ui-slider-handle .ui-btn-inner{padding-left:0;padding-right:0}@media all and (min-width:480px){label.ui-slider{display:inline-block;width:20%;margin:0 2% 0 0}div.ui-slider{width:45%}}div.ui-slider-switch{height:32px;overflow:hidden;margin-left:0}div.ui-slider-inneroffset{margin-left:50%;position:absolute;top:1px;height:100%;width:50%}div.ui-slider-handle-snapping{-webkit-transition:left 100ms linear}div.ui-slider-labelbg{position:absolute;top:0;margin:0;border-width:0}div.ui-slider-switch div.ui-slider-labelbg-a{width:60%;height:100%;left:0}div.ui-slider-switch div.ui-slider-labelbg-b{width:60%;height:100%;right:0}.ui-slider-switch-a div.ui-slider-labelbg-a,.ui-slider-switch-b div.ui-slider-labelbg-b{z-index:-1}.ui-slider-switch-a div.ui-slider-labelbg-b,.ui-slider-switch-b div.ui-slider-labelbg-a{z-index:0}div.ui-slider-switch a.ui-slider-handle{z-index:20;width:101%;height:32px;margin-top:-18px;margin-left:-101%}span.ui-slider-label{width:100%;position:absolute;height:32px;font-size:16px;text-align:center;line-height:2;background:0;border-color:transparent}span.ui-slider-label-a{left:-100%;margin-right:-1px}span.ui-slider-label-b{right:-100%;margin-left:-1px} \ No newline at end of file diff --git a/app/assets/stylesheets/vendor/jquery.ui.autocomplete.css b/app/assets/stylesheets/vendor/jquery.ui.autocomplete.css deleted file mode 100644 index ebbf48ddf..000000000 --- a/app/assets/stylesheets/vendor/jquery.ui.autocomplete.css +++ /dev/null @@ -1,56 +0,0 @@ -/* - * jQuery UI Autocomplete 1.8.8 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.8 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; - background-color: #fff; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; - background-color: #3F8FBA; - color: #eee; -} diff --git a/app/assets/stylesheets/vendor/tipsy.css b/app/assets/stylesheets/vendor/tipsy.css deleted file mode 100644 index 932bd6e6e..000000000 --- a/app/assets/stylesheets/vendor/tipsy.css +++ /dev/null @@ -1,12 +0,0 @@ -.tipsy { padding: 5px; font-size: 10px; position: absolute; z-index: 100000; } - .tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; } - .tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; } - .tipsy-arrow { position: absolute; background: url('../../images/tipsy.gif') no-repeat top left; width: 9px; height: 5px; } - .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; } - .tipsy-nw .tipsy-arrow { top: 0; left: 10px; } - .tipsy-ne .tipsy-arrow { top: 0; right: 10px; } - .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; } - .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; } - .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } - .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } - .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } diff --git a/app/assets/templates/aspect_tpl.jst.hbs b/app/assets/templates/aspect_tpl.jst.hbs index bd3acf7ea..840ee584e 100644 --- a/app/assets/templates/aspect_tpl.jst.hbs +++ b/app/assets/templates/aspect_tpl.jst.hbs @@ -1,7 +1,9 @@ - + + + {{#if selected}} -
      + {{else}} -
      +
      {{/if}} {{name}} diff --git a/app/assets/templates/comment-stream_tpl.jst.hbs b/app/assets/templates/comment-stream_tpl.jst.hbs index abcc20324..1ba92fe98 100644 --- a/app/assets/templates/comment-stream_tpl.jst.hbs +++ b/app/assets/templates/comment-stream_tpl.jst.hbs @@ -11,7 +11,7 @@
      {{#if loggedIn}} -