diff --git a/.gitignore b/.gitignore index a87978343..995aaa405 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,21 @@ -sqlite_database +/sqlite_database *.pyc -src/ -static/* -media/* +/src/ +/static/* +/demo/static/* +/media/* +/demo/media/* !.gitkeep -.sass-cache/ -tmp/ +/.sass-cache/ +/tmp/ settings_local.py -build/ -tags +/build/ +/tags +/dist/ +*.egg-info/ +*.egg/ +/CACHE/ +/.tox/ +/.coverage +/htmlcov/ +js_tests/node_modules diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..202df4b07 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,67 @@ +language: python + +python: + - "2.7" + +cache: pip + +sudo: false + +env: + global: + - SOUTH_TESTS_MIGRATE=1 + matrix: + - TOX_ENV=py26-dj14-sqlite + - TOX_ENV=py26-dj14-mysql + - TOX_ENV=py26-dj14-postgres + - TOX_ENV=py26-dj15-sqlite + - TOX_ENV=py26-dj15-mysql + - TOX_ENV=py26-dj15-postgres + - TOX_ENV=py27-dj14-sqlite + - TOX_ENV=py27-dj14-mysql + - TOX_ENV=py27-dj14-postgres + - TOX_ENV=py27-dj15-sqlite + - TOX_ENV=py27-dj15-mysql + - TOX_ENV=py27-dj15-postgres + - TOX_ENV=py27-dj16-sqlite + - TOX_ENV=py27-dj16-mysql + - TOX_ENV=py27-dj16-postgres + - TOX_ENV=py27-dj17-sqlite + - TOX_ENV=py27-dj17-mysql + - TOX_ENV=py27-dj17-postgres + - TOX_ENV=py26-dj14-contrib-sqlite + - TOX_ENV=py26-dj14-contrib-mysql + - TOX_ENV=py26-dj14-contrib-postgres + - TOX_ENV=py26-dj15-contrib-sqlite + - TOX_ENV=py26-dj15-contrib-mysql + - TOX_ENV=py26-dj15-contrib-postgres + - TOX_ENV=py26-dj16-contrib-sqlite + - TOX_ENV=py26-dj16-contrib-mysql + - TOX_ENV=py26-dj16-contrib-postgres + - TOX_ENV=py27-dj14-contrib-sqlite + - TOX_ENV=py27-dj14-contrib-mysql + - TOX_ENV=py27-dj14-contrib-postgres + - TOX_ENV=py27-dj15-contrib-sqlite + - TOX_ENV=py27-dj15-contrib-mysql + - TOX_ENV=py27-dj15-contrib-postgres + - TOX_ENV=py27-dj16-contrib-sqlite + - TOX_ENV=py27-dj16-contrib-mysql + - TOX_ENV=py27-dj16-contrib-postgres + - TOX_ENV=py27-dj17-contrib-sqlite + - TOX_ENV=py27-dj17-contrib-mysql + - TOX_ENV=py27-dj17-contrib-postgres + - TOX_ENV=javascript + +install: + - pip install --upgrade pip + - pip install tox + +before_script: + - psql -c 'create database widgy;' -U postgres + - mysql -e 'create database widgy;' + +script: + - tox -e $TOX_ENV + +after_script: + - cat .tox/$TOX_ENV/log/*.log diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 000000000..fc898ea46 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,313 @@ +Changelog +========= + +0.7.0 (unreleased) +------------------ + +- Nothing changed yet. + + +0.6.1 (2015-05-01) +------------------ + +- Fix non-determinism bug with find_media_files. + + +0.6.0 (2015-04-30) +------------------ + +- Improved the compatibility error messages [#299, #193] +- Remove the recommendation to use mezzanine.boot as it was not required [#291] +- **Possible Breaking Change** Updated the django-pyscss_ dependency. Please + see the `django-pyscss changelog + `_ for + documentation on how/if you need to change anything. +- By default, Widgy views are restricted to staff members. Previously any + authenticated user was allowed. This effects the preview view and pop out + edit view, among others. If you were relying on the ability for any user to + access those, override ``authorize_view`` in your ``WidgySite``. [#267]:: + + class MyWidgySite(WidgySite): + def authorize_view(self, request, view): + if not request.user.is_authenticated() + raise PermissionDenied + + +0.5.0 (2015-04-17) +------------------ + +- **Backwards Incompatible** RichTextPage is no longer unregistered by default + in widgy_mezzanine. If you wish to unregister it, you can add the following + to your admin.py file:: + + from django.contrib import admin + from mezzanine.pages.models import RichTextPage + admin.site.unregister(RichTextPage) + +- Bugfix: Previously, the Widgy editor would break if CSRF_COOKIE_HTTPONLY was + set to True [#311] + +- Switched to py.test for testing. [#309] + + +0.4.0 (2015-03-12) +------------------ + +- Django 1.7 support. Requires upgrade to South 1.0 (Or use of + SOUTH_MIGRATION_MODULES) if you stay on Django < 1.7. You may have to --fake + some migrations to upgrade to the builtin Django migrations. Make sure your + database is up to date using South, then upgrade Django and run:: + + + ./manage.py migrate --fake widgy + ./manage.py migrate --fake easy_thumbnails + ./manage.py migrate + +- Support for installing Widgy without the dependencies of its contrib apps. + The 'django-widgy' package only has dependencies required for Widgy core. + Each contrib package has a setuptools 'extra'. To install everything, replace + 'django-widgy' with 'django-widgy[all]'. [#221] + +- Switched to tox for test running and allow running core tests without + contrib. [#294] + +- Stopped relying on urls with consecutive '/' characters [#233]. This adds a new + urlpattern for widgy_mezzanine's preview page and form submission handler. + The old ones will keep working, but you should reverse with 'page_pk' instead + of 'slug'. For example:: + + url = urlresolvers.reverse('widgy.contrib.widgy_mezzanine.views.preview', kwargs={ + 'node_pk': node.pk, + 'page_pk': page.pk, + }) + +- Treat help_text for fields in a widget form as safe (HTML will not be + escaped) [#298]. If you were relying on HTML special characters being + escaped, you should replace ``help_text="1 is < 2"`` with + ``help_text=django.utils.html.escape("1 is < 2")``. + +- Reverse URLs in form_builder admin with consideration for Form + subclasses [#274]. + + +0.3.5 (2015-01-30) +------------------ + +Bugfix release: + +- Set model at runtime for ClonePageView and UnpublishView [Rocky Meza, #286] + +0.3.4 (2015-01-22) +------------------ + +Bugfix release: + +- Documentation fixes [Rocky Meza and Gavin Wahl] +- Fixes unintentional horizontal scrolling of Widgy content [Justin Stollsteimer] +- Increased spacing after widget title paragraphs [Justin Stollsteimer] +- Fixed styles in ckeditor to show justifications [Zachery Metcalf, #279] +- Eliminated the margins for InvisibleMixin [Rocky Meza] +- CSS support for adding fields to Image. [Rocky Meza] +- Additional mezzanine container style overflow fixes [Justin Stollsteimer] +- Fix r.js optimization errors with daisydiff [Rocky Meza] +- Remove delete button from widgypage add form [Gavin Wahl] + + +0.3.3 (2014-12-22) +------------------ +Bugfix release: + +- Allow cloning with an overridden WIDGY_MEZZANINE_PAGE_MODEL [Zach Metcalf, #269] +- SCSS syntax error [Rivo Laks, #271] + +0.3.2 (2014-10-16) +------------------ + +Bugfix release: + +- Allow WidgyAdmin to check for ReviewedWidgySite without review_queue + installed [Scott Clark, #265] +- Fix handling of related_name on ProxyGenericRelation [#264] + + +0.3.1 (2014-10-01) +------------------ + +Bugfix release for 0.3.0. #261, #263. + +0.3.0 (2014-09-24) +------------------ + +This release mainly focusses on the New Save Flow feature, but also includes +several bug fixes and some nice CSS touch ups. There have been some updates to +the dependencies, so please be sure to check the `How to Upgrade`_ section to +make sure that you get everything updated correctly. + +Major Changes +^^^^^^^^^^^^^ + +* New Save Flow **Requires upgrading Mezzanine to at least 3.1.10** [Gavin + Wahl, Rocky Meza, #241] + + We have updated the workflow for WidgyPage. We consider this an experiment + that we can hopefully expand to all WidgyAdmins in the future. We hope that + this new save flow is more intuitive and less tedious. + + Screenshot of before: + + .. image:: https://raw.githubusercontent.com/fusionbox/django-widgy/master/docs/_images/new-save-flow_before.png + :alt: Widgy Page Admin Old Save Flow + + Screenshot of after: + + .. image:: https://raw.githubusercontent.com/fusionbox/django-widgy/master/docs/_images/new-save-flow_after.png + :alt: Widgy Page Admin New Save Flow + + As you can see, we have rearranged some of the buttons and have gotten rid of + the Published Status button. The new save buttons on the bottom right now + will control the publish state as well as the commit status. This means that + now instead of committing and saving being a two-step process, it all lives + in one button. This should make editing and saving a smoother process. + Additionally, we have renamed some buttons to make their intent more obvious. + +Bug Fixes +^^^^^^^^^ + +* Updated overridden directory_table template for django-filer 0.9.6. **Requires + upgrading django-filer to at least 0.9.6**. [Scott Clark, #179] +* Fix bug in ReviewedVersionTrackerQuerySet.published [Gavin Wahl, #240] +* Made commit buttons not look disabled [Justin Stollsteimer, #250, #205] +* (Demo) Added ADD_PAGE_ORDER to demo settings [Zach Metcalf, #248] +* (Demo) Updated demo project requirements [Scott Clark, #234] +* Make Widgy's jQuery private to prevent clashes with other admin extensions [Gavin Wahl, #246] + +Documentation +^^^^^^^^^^^^^ + +* Update recommend ADMIN_MENU_ORDER to clarify django-filer [Gavin Wahl, #249] + +How to Upgrade +^^^^^^^^^^^^^^ + +In this release, widgy has udpated two of its dependencies: + +* The minimum supported version of django-filer is now 0.9.6 (previously 0.9.5). +* The minimum supported version of Mezzanine is now 3.1.10 (previously 1.3.0). + +If you ``pip install django-widgy==0.3.0``, it should upgrade the dependencies +for you, but just to be sure, you may want to also run :: + + pip install 'django-filer>=0.9.6' 'Mezzanine>=3.1.10' + +to make sure that you get the updates. + +.. note:: + + Please note that if you are upgrading from an older version of Mezzanine, + that the admin center has been restyled a little bit. + + +0.2.0 (2014-08-04) +------------------ + +Changes +^^^^^^^ + +* Widgy is now Apache Licensed +* **Breaking Change** Use django-pyscss_ for SCSS compilation. [Rocky Meza, #175] + + Requires an update to the ``COMPRESS_PRECOMPILERS`` setting:: + + COMPRESS_PRECOMPILERS = ( + ('text/x-scss', 'django_pyscss.compressor.DjangoScssFilter'), + ) + + You may also have to update ``@import`` statements in your SCSS, because + django-pyscss uses a different (more consistent) rule for path resolution. + For example, ``@import 'widgy_common'`` should be changed to ``@import + '/widgy/css/widgy_common'`` +* Added help_text to Section to help user avoid bug [Zach Metcalf, #135] +* Allow UI to updated based on new data after reposition [Gavin Wahl, #199] +* Changed Button's css_classes in shelf [Rocky Meza, #203] +* Added loading cursor while ajax is in flight [Gavin Wahl, #215, #208] +* Get rid of "no content" [Gavin Wahl, #206] +* Use sprites for the widget icons [Gavin Wahl and Rocky Meza, #89, #227] +* Only show approve/unapprove buttons for interesting commits [Gavin Wahl, #228] +* Updated demo app to have new design and new widgets [Justin Stollsteimer, Gavin Wahl, Antoine Catton and Rocky Meza, #129, #176] +* Added cloning for WidgyPages [Gavin Wahl, #235] +* Use a more realistic context to render pages for search [Gavin Wahl, #166] +* Add default children to Accordion and Tabs [Rocky Meza, #238] + +Bugfixes +^^^^^^^^ + +* Fix cursors related to dragging [Gavin Wahl, #155] +* Update safe urls [Gavin Wahl, #212] +* Fix widgy_mezzanine preview for Mezzanine==3.1.2 [Rocky Meza, #201] +* Allow RichTextPage in the admin [Zach Metcalf, #197] +* Don't assume the response has a content-type header [Gavin Wahl, #216] +* Fix bug with FileUpload having empty values [Rocky Meza, #217] +* Fix urlconf_include login_required handling [Gavin Wahl, #200] +* Patch fancybox to work with jQuery 1.9 [Gavin Wahl, #222] +* Fix some import errors in SCSS [Rocky Meza, #230] +* Fix restore page in newer versions of Mezzanine [Gavin Wahl, #232] +* Use unicode format strings in review queue [Gavin Wahl, #236] + +Documentation +^^^^^^^^^^^^^ + +* Updated quickstart to cover south migrations with easy_thumbnails [Zach Metcalf, #202] +* Added Proxy Widgy Model Tutorial [Zach Metcalf, #210] + +.. _django-pyscss: https://github.com/fusionbox/django-pyscss + +0.1.6 (2014-09-09) +------------------ +* Fix migrations containing unsupported KeywordsField from mezzanine [Scott Clark] +* Rename package to django-widgy + + +0.1.5 (2013-11-23) +------------------ + +* Fix Widgy migrations without Mezzanine [Gavin Wahl] +* Drop target collision detection [Gavin Wahl] +* Fix Figure and StrDisplayNameMixin [Gavin Wahl] +* Avoid loading review_queue when it's not installed [Scott Clark] +* Fix multi-table inheritance with LinkFields [Gavin Wahl] + +0.1.4 (2013-11-04) +------------------ + +* Add StrDisplayNameMixin + +0.1.3 (2013-10-25) +------------------ + +* Fix image widget validation with the S3 storage backend + +0.1.2 (2013-10-23) +------------------ + +* Fix Widgy admin for static files hosted on a different domain + +0.1.1 (2013-10-21) +------------------ + +* Adjust ``MANIFEST.in`` to fix PyPi install. +* Fix layout having a unicode ``verbose_name`` + +0.1.0 (2013-10-18) +------------------ + +First release. + +Basic features: + +* Heterogeneous tree editor (``widgy``) +* CMS (``widgy.contrib.widgy_mezzanine``) +* CMS Plugins (``widgy.contrib.urlconf_include``) +* Widgets (``widgy.contrib.page_builder``) +* Form builder (``widgy.contrib.form_builder``) +* Multilingual pages (``widgy.contrib.widgy_i18n``) +* Review queue (``widgy.contrib.review_queue``) diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..7f8260507 --- /dev/null +++ b/LICENSE @@ -0,0 +1,189 @@ + Copyright (c) Fusionbox and contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..343bda138 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include README.rst CHANGELOG.rst LICENSE Makefile tox.ini +recursive-include widgy * +recursive-include tests *.py +recursive-include docs * +prune docs/_build +global-exclude *.pyc diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..f30f6b127 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +JS_FILES?=`find ./js_tests/tests -type f -name '*.js'` +DJANGO_SETTINGS_MODULE?=tests.settings_contrib + +test: test-py test-js + +test-py: + DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) py.test $(PYTEST_OPTIONS) + +coverage: + +make test-py PYTEST_OPTIONS='--cov widgy' + coverage html --omit='widgy/*migrations/*,widgy/contrib/*/*migrations/*,' + +browser: coverage + sensible-browser ./htmlcov/index.html + +js_tests/node_modules: js_tests/package.json + cd js_tests && npm install . + +test-js: js_tests/node_modules + ./js_tests/node_modules/mocha/bin/mocha \ + -s 5 \ + --reporter spec \ + $(JS_FILES) + +widgy/locale/en/LC_MESSAGES/django.po: $(shell find . -type f -iregex '.*\.\(html\|py\|md\)$$' | grep -v .tox) + + cd widgy && django-admin.py makemessages -l en + +widgy/locale/xx_pseudo/LC_MESSAGES/django.po: widgy/locale/en/LC_MESSAGES/django.po + -rm -r "`dirname $@`" + potpie $< $@ + +widgy/locale/xx_pseudo/LC_MESSAGES/django.mo: widgy/locale/xx_pseudo/LC_MESSAGES/django.po + cd widgy && django-admin.py compilemessages + +t10n: widgy/locale/xx_pseudo/LC_MESSAGES/django.mo + +docs: + cd docs && $(MAKE) html + + +.PHONY: test coverage browser test-py test-js docs diff --git a/README b/README deleted file mode 100644 index f0140d0dd..000000000 --- a/README +++ /dev/null @@ -1,107 +0,0 @@ -# Widgy Editor for Django -Widgy is a content editor somewhat in the line of CKEditor. It is not a WYSIWYG -editor though. Widgy is more suited than CKEditor for editing pages, as in a -CMS because it allows you to edit specific parts of the page and those parts -know how to render themselves. Whereas a WYSIWYG stores its data in HTML, Widgy -stores it in a Tree where each node can render itself. - -## Data Model -A Widgy page is composed of Tree of Nodes. A Node deals with structure. It -defines where a component lives in the Tree. The Tree does not deal with pages -like the page tree in Mezzanine, rather it deals with a hierarchy of components -to be rendered on a page. - -Each Node has an associated Content. While a Node concerns itself with -structure, Contents deal with the specific data of a component. All Nodes are -instances of the same class, while each Content has a different type. Only -certain Content types are allowed to be nested under each other (i.e. an Input -Content probably needs to be inside a Form Content and you probably don't want -anything inside of a Text Content). Nodes will check the validity of their -content's relationship before moving. - -### Example of a Tree -**Note:** Content types are in parentheses. - - Node (TwoColumnLayout) - | - +-- Node (MainBucket) - | | - | +-- Node (Text) - | | - | +-- Node (Image) - | | - | +-- Node (Text) - | | - | +-- Node (Form) - | | - | +-- Node (Input) - | | - | +-- Node (Checkboxes) - | | - | +-- Node (Input) - | - +-- Node (SidebarBucket) - | - +-- Node (CallToAction) - -## Minimum Viable Proof of Concept -In order to prove that a Node-Tree-based content editor is a viable solution, -here is a list of features that we feel are absolutely necessary. When we -finish this feature list, we have proved that Widgy is possible. - -Working: - - - One layout - - Text widget - - Front-end rendering of all the widgets - - Node reordering - - Node re-rooting (moving a node up/down in the tree, from the left column to - the right column, for example) - - Delete widgets - - Image widget with file upload, or some other widget that makes it seem like - less of a toy - - Creating a new ContentPage - - Adding widgets by dragging from a thing full of options - - Widgets from apps besides `widgy` (custom project widgets) - - Admin chrome around the widgy editor - - Editing of the [mezzanine] page metadata (title, published) - - Nice drag and drop: retain the inside node offset (ask Gavin), snap into - drop targets on mouseover. - - Follow mouse on scroll while dragging. - -Not Working Yet: - - - Nicer compatibility (preerrors and aftererrors) - -## Features required before we can show somebody else -These are the features that we need to be able to show people other than -developers. When we finish this feature list, we can sell it to other people in -the company. - - - Designer magic wand. - -## JavaScript -We use require.js to handle dependency management and to encourage code -modularity. This helps a lot in development, but it also means that page loads -may be rather slow. If page loads are too slow for you while you are -developing, you can run the optimizer to compile and minify the file into one -file and then you will have zippier page loads. - -Steps: - - 1. Install the RequireJS command line tool. - - $ [sudo] npm install -g requirejs - - 2. From the project path root, run the optimizer. - - $ r.js -o build.js - - This will create an optimized file which is placed in - static/widgy/js/widgy-built.js - - 3. Change your script tag to update the new location of the widgy files. - - - -**Note:** Please avoid committing the change in step 3. diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..d1d602252 --- /dev/null +++ b/README.rst @@ -0,0 +1,81 @@ +Widgy: Tree Editor for Django +============================= + +.. image:: https://travis-ci.org/fusionbox/django-widgy.png?branch=master + :target: http://travis-ci.org/fusionbox/django-widgy + :alt: Build Status + +Widgy is a content editor somewhat in the line of CKEditor. It is not a +WYSIWYG editor though. Widgy is more suited than CKEditor for editing +pages, as in a CMS because it allows you to edit specific parts of the +page and those parts know how to render themselves. Whereas a WYSIWYG +stores its data in HTML, Widgy stores it in a Tree where each node can +render itself. + +Widgy is available under the Apache Version 2.0 license. Contribute on github. + +Documentation +------------- + +Read Widgy's documentation at http://docs.wid.gy. + +Installation +------------ + +Install with pip. :: + + pip install django-widgy + +When developing Widgy, it might be handy to clone the repository then install +it. :: + + git clone git://github.com/fusionbox/django-widgy + cd django-widgy + pip install -e . + +Design Philosophy +----------------- + +Read about Widgy's data model at +http://docs.wid.gy/en/latest/design/data-model.html. + + +Contributing +------------ + +There is a developers mailing list available at `widgy@fusionbox.com +`_ + +Running the Tests +^^^^^^^^^^^^^^^^^ + +:: + + pip install -r requirements-test.txt + make test + +``make test`` will run both the JavaScript and Python tests. To test one +or the other, use ``make test-js`` or ``make test-py``. + +:: + + $ tox + +``$ tox`` will run the full test suite across all of the supported versions of +Django and Python. + +Coverage +******** +Once coverage_ is installed (``pip install coverage``), the Makefile +has two commands to help report on code coverage. :: + + make coverage + +will run the tests with coverage enabled and generate HTML coverage +files. :: + + make browser + +will run the tests and open the coverage report in your web browser. + +.. _coverage: http://nedbatchelder.com/code/coverage/ diff --git a/add_page.py b/add_page.py deleted file mode 100644 index 718558696..000000000 --- a/add_page.py +++ /dev/null @@ -1,18 +0,0 @@ -from widgy.models import * - - -page = ContentPage.objects.create( - title='widgy page' - ) -page.root_node = TwoColumnLayout.add_root().node -page.save() - -for i in range(3): - page.root_node.content.left_bucket.content.add_child(TextContent, - content='yay %s' % i - ) - -for i in range(2): - page.root_node.content.right_bucket.content.add_child(TextContent, - content='yay right bucket %s' % i - ) diff --git a/bin/daisydiff/LICENSE.txt b/bin/daisydiff/LICENSE.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/bin/daisydiff/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/bin/daisydiff/NOTICE.txt b/bin/daisydiff/NOTICE.txt new file mode 100644 index 000000000..6092e4dac --- /dev/null +++ b/bin/daisydiff/NOTICE.txt @@ -0,0 +1,8 @@ +NOTICE: Only our own original work is licensed under the terms of the Apache +License Version 2.0. The licenses of some libraries might impose different +redistribution or general licensing terms than those stated in the Apache +License. Users and redistributors are hereby requested to verify these +conditions and agree upon them. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). diff --git a/bin/daisydiff/README.txt b/bin/daisydiff/README.txt new file mode 100644 index 000000000..826d9212a --- /dev/null +++ b/bin/daisydiff/README.txt @@ -0,0 +1,75 @@ + Daisy Diff 1.2 + + This is Daisy Diff, the open source HTML diffing library! + + Website - http://code.google.com/p/daisydiff/ + + +---------------------------------------------------------------+ + | STAND-ALONE | + +---------------------------------------------------------------+ + +Java: +===== +java -jar daisydiff.jar [oldHTML] [newHTML] [optional arguments] + + +Optional Arguments: +=================== +--file=[filename] - Write output to the specified file. +--type=[html/tag] - Use the html (default) diff algorithm or the tag diff. +--css=[cssfile1;cssfile2;cssfile3] - Add external CSS files. +--output=[html/xml] - Write html (default) or xml output. +--q - Generate less console output. + +Example: +======== +java -jar daisydiff.jar http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/ http://web.archive.org/web/20070107182640/http://news.bbc.co.uk/ --css=http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/nol/shared/css/news_r5.css + +java -jar daisydiff.jar http://cocoondev.org/wiki/291-cd/version/15/part/SimpleDocumentContent/data http://cocoondev.org/wiki/291-cd/version/17/part/SimpleDocumentContent/data --css=http://cocoondev.org/resources/skins/daisysite/css/daisy.css --output=xml --file=daisysite.htm + +Requirements: +============= +Java 1.5 or 6 + + +---------------------------------------------------------------+ + | EMBEDDED | + +---------------------------------------------------------------+ + +Java: +===== +org.outerj.daisy.diff.DaisyDiff{ + +/** + * Diffs two html files, outputting the result to the specified consumer. + */ +public static void diffHTML(InputSource oldSource, InputSource newSource, ContentHandler consumer, String prefix, Locale locale) throws SAXException, IOException; + +/** + * Diffs two html files word for word as source, outputting the result to + * the specified consumer. + */ +public static void diffTag(String oldText, String newText, ContentHandler consumer) throws Exception; + +} + +Requirements: +============= +Java 1.5 or 6 +To run Daisy Diff embedded in your application, you don't need the entire Jar file. A much smaller Jar file without Xerces and NekoHtml will suffice. + + + +---------------------------------------------------------------+ + | PHP | + +---------------------------------------------------------------+ + +The DaisyDiff algorithm has been integrated in MediaWiki. The version with DaisyDiff support isn't released yet. +More info on: http://www.mediawiki.org/wiki/Visual_Diff + +The PHP code is released under the GPLv2. It can also be used as an embedded HTML differ in a PHP application. + + +---------------------------------------------------------------+ + | Acknowledgements | + +---------------------------------------------------------------+ + +Guy Van den Broeck +Daniel Dickison diff --git a/bin/daisydiff/daisydiff.jar b/bin/daisydiff/daisydiff.jar new file mode 100644 index 000000000..54659dbdd Binary files /dev/null and b/bin/daisydiff/daisydiff.jar differ diff --git a/build.js b/build.js deleted file mode 100644 index 9d7a3dda8..000000000 --- a/build.js +++ /dev/null @@ -1,30 +0,0 @@ -({ - baseUrl: "widgy/static/widgy/js/", - name: "widgy", - out: "static/widgy/js/widgy-built", - shim: { - 'underscore': { - exports: '_' - }, - 'backbone': { - deps: ['underscore', 'jquery', 'fusionbox'], - exports: 'Backbone' - }, - 'fusionbox': { - deps: ['jquery'], - exports: 'fusionbox' - } - }, - paths: { - 'jquery': './lib/jquery', - 'underscore': './lib/underscore', - 'backbone': './lib/backbone', - 'mustache': './lib/mustache', - 'fusionbox': './lib/fusionbox', - 'RelatedObjectLookups' : './lib/RelatedObjectLookups', - 'text': 'require/text' - }, - uglify: { - beautify: false - } -}) diff --git a/clean_database b/clean_database deleted file mode 100644 index 2cc912e37..000000000 Binary files a/clean_database and /dev/null differ diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..684fa82b8 --- /dev/null +++ b/conftest.py @@ -0,0 +1,46 @@ +import shutil +import os + +import pytest +try: + import six +except ImportError: + from django.utils import six + +# This is here instead of pytest.ini because it can't be overridden from the +# environ if specified there. +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings') + +from django.conf import settings + + +def teardown_assets_directory(): + # Removing the temporary TEMP_DIR. Ensure we pass in unicode + # so that it will successfully remove temp trees containing + # non-ASCII filenames on Windows. (We're assuming the temp dir + # name itself does not contain non-ASCII characters.) + shutil.rmtree(six.text_type(settings.TEMP_DIR)) + + +@pytest.fixture(scope="session", autouse=True) +def assets_directory(request): + request.addfinalizer(teardown_assets_directory) + + +def get_collect_ignore(): + mapping = { + 'widgy.contrib.widgy_mezzanine': ['widgy/contrib/widgy_mezzanine/'], + 'widgy.contrib.form_builder': ['widgy/contrib/form_builder/'], + 'widgy.contrib.page_builder': ['widgy/contrib/page_builder/'], + 'widgy.contrib.urlconf_include': ['widgy/contrib/urlconf_include/'], + 'widgy.contrib.widgy_i18n': ['widgy/contrib/urlconf_include/'], + } + + + acc = [] + for app, path_list in mapping.items(): + if app not in settings.INSTALLED_APPS: + acc.extend(path_list) + return acc + +collect_ignore = get_collect_ignore() diff --git a/urlconf_include/__init__.py b/demo/demo_url/__init__.py similarity index 100% rename from urlconf_include/__init__.py rename to demo/demo_url/__init__.py diff --git a/doc/source/cms/models.rst b/demo/demo_url/models.py similarity index 100% rename from doc/source/cms/models.rst rename to demo/demo_url/models.py diff --git a/demo/demo_url/urls.py b/demo/demo_url/urls.py new file mode 100644 index 000000000..f5e1c0508 --- /dev/null +++ b/demo/demo_url/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls import patterns, include, url +from django.views.generic import RedirectView + +from . import views + +urlpatterns = patterns('', + (r'^$', RedirectView.as_view(url='hello/')), + (r'^hello/', views.hello), +) diff --git a/demo/demo_url/views.py b/demo/demo_url/views.py new file mode 100644 index 000000000..219def663 --- /dev/null +++ b/demo/demo_url/views.py @@ -0,0 +1,7 @@ +from django.http import HttpResponse + +def hello(request): + return HttpResponse( + '' + 'Demo url

Hello!' + ) diff --git a/demo/demo_widgets/migrations/0001_initial.py b/demo/demo_widgets/migrations/0001_initial.py index cecc392d1..dd9e4fb02 100644 --- a/demo/demo_widgets/migrations/0001_initial.py +++ b/demo/demo_widgets/migrations/0001_initial.py @@ -1,48 +1,69 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import models, migrations +import demo.demo_widgets.models +import widgy.models.mixins +import widgy.contrib.page_builder.db.fields +import django.db.models.deletion -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'SiteListCalloutContent' - db.create_table('demo_widgets_sitelistcalloutcontent', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('header', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True)), - )) - db.send_create_signal('demo_widgets', ['SiteListCalloutContent']) +class Migration(migrations.Migration): + dependencies = [ + ('page_builder', '0001_initial'), + ('filer', '__first__'), + ] - def backwards(self, orm): - # Deleting model 'SiteListCalloutContent' - db.delete_table('demo_widgets_sitelistcalloutcontent') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'demo_widgets.sitelistcalloutcontent': { - 'Meta': {'object_name': 'SiteListCalloutContent'}, - 'header': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'widgy.node': { - 'Meta': {'object_name': 'Node'}, - 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['demo_widgets'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='Box', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=255, verbose_name='title')), + ], + options={ + }, + bases=(widgy.models.mixins.StrDisplayNameMixin, demo.demo_widgets.models.AcceptsSimpleHtmlChildrenMixin, models.Model), + ), + migrations.CreateModel( + name='Boxes', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Slide', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('tagline', models.CharField(max_length=255, verbose_name='tagline')), + ('background_image', widgy.contrib.page_builder.db.fields.ImageField(related_name='+', on_delete=django.db.models.deletion.PROTECT, verbose_name='background image', to='filer.File', null=True)), + ], + options={ + }, + bases=(widgy.models.mixins.StrDisplayNameMixin, demo.demo_widgets.models.AcceptsSimpleHtmlChildrenMixin, models.Model), + ), + migrations.CreateModel( + name='Slideshow', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='HomeLayout', + fields=[ + ], + options={ + 'verbose_name': 'home layout', + 'proxy': True, + 'verbose_name_plural': 'home layouts', + }, + bases=('page_builder.defaultlayout',), + ), + ] diff --git a/demo/demo_widgets/models.py b/demo/demo_widgets/models.py index 7bae45e05..241504be8 100644 --- a/demo/demo_widgets/models.py +++ b/demo/demo_widgets/models.py @@ -1,6 +1,78 @@ -from widgy.contrib.list_content_widget.models import ListContentBase -from django.contrib.sites.models import Site +from django.db import models +from django.utils.translation import ugettext_lazy as _ +import widgy +from widgy.models import Content +from widgy.models.mixins import StrDisplayNameMixin +from widgy.contrib.page_builder.models import ( + DefaultLayout, ImageField, Html, Button +) -class SiteListCalloutContent(ListContentBase): - model = Site + +class AcceptsSimpleHtmlChildrenMixin(object): + def valid_parent_of(self, cls, obj=None): + return issubclass(cls, (Html, Button)) + + +@widgy.register +class Slide(StrDisplayNameMixin, AcceptsSimpleHtmlChildrenMixin, Content): + tagline = models.CharField(_('tagline'), max_length=255) + background_image = ImageField(verbose_name=_('background image')) + + editable = True + + def __unicode__(self): + return self.tagline + + @classmethod + def valid_child_of(cls, parent, obj=None): + return isinstance(parent, Slideshow) + + +@widgy.register +class Slideshow(Content): + @classmethod + def valid_child_of(cls, parent, obj): + return isinstance(parent, HomeLayout) + + def valid_parent_of(self, cls, obj=None): + return issubclass(cls, Slide) + + +@widgy.register +class Box(StrDisplayNameMixin, AcceptsSimpleHtmlChildrenMixin, Content): + title = models.CharField(verbose_name=_('title'), max_length=255) + + editable = True + + def __unicode__(self): + return self.title + + @classmethod + def valid_child_of(cls, parent, obj=None): + return isinstance(parent, Boxes) + + +@widgy.register +class Boxes(Content): + @classmethod + def valid_child_of(cls, parent, obj): + return isinstance(parent, HomeLayout) + + def valid_parent_of(self, cls, obj=None): + # Accept up to 3 Box chilren + return (obj in self.get_children() or + (issubclass(cls, Box) and len(self.get_children()) < 3)) + + +@widgy.register +class HomeLayout(DefaultLayout): + default_children = ( + ('slideshow', Slideshow, (), {}), + ('boxes', Boxes, (), {}), + ) + + class Meta: + proxy = True + verbose_name = _('home layout') + verbose_name_plural = _('home layouts') diff --git a/demo/demo_widgets/south_migrations/0001_initial.py b/demo/demo_widgets/south_migrations/0001_initial.py new file mode 100644 index 000000000..d8ca4e7de --- /dev/null +++ b/demo/demo_widgets/south_migrations/0001_initial.py @@ -0,0 +1,152 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Slideshow' + db.create_table('demo_widgets_slideshow', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + )) + db.send_create_signal('demo_widgets', ['Slideshow']) + + # Adding model 'Slide' + db.create_table('demo_widgets_slide', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('tagline', self.gf('django.db.models.fields.CharField')(max_length=255)), + ('background_image', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', null=True, on_delete=models.PROTECT, to=orm['filer.File'])), + )) + db.send_create_signal('demo_widgets', ['Slide']) + + # Adding model 'Box' + db.create_table('demo_widgets_box', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), + )) + db.send_create_signal('demo_widgets', ['Box']) + + # Adding model 'Boxes' + db.create_table('demo_widgets_boxes', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + )) + db.send_create_signal('demo_widgets', ['Boxes']) + + + def backwards(self, orm): + # Deleting model 'Slideshow' + db.delete_table('demo_widgets_slideshow') + + # Deleting model 'Slide' + db.delete_table('demo_widgets_slide') + + # Deleting model 'Box' + db.delete_table('demo_widgets_box') + + # Deleting model 'Boxes' + db.delete_table('demo_widgets_boxes') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'demo_widgets.box': { + 'Meta': {'object_name': 'Box'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + }, + 'demo_widgets.boxes': { + 'Meta': {'object_name': 'Boxes'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'demo_widgets.slide': { + 'Meta': {'object_name': 'Slide'}, + 'background_image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': "orm['filer.File']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'tagline': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + }, + 'demo_widgets.slideshow': { + 'Meta': {'object_name': 'Slideshow'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'filer.file': { + 'Meta': {'object_name': 'File'}, + '_file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'folder': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'all_files'", 'null': 'True', 'to': "orm['filer.Folder']"}), + 'has_all_mandatory_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), + 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_files'", 'null': 'True', 'to': "orm['auth.User']"}), + 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'polymorphic_filer.file_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), + 'sha1': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40', 'blank': 'True'}), + 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) + }, + 'filer.folder': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('parent', 'name'),)", 'object_name': 'Folder'}, + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filer_owned_folders'", 'null': 'True', 'to': "orm['auth.User']"}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['filer.Folder']"}), + 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) + }, + 'widgy.node': { + 'Meta': {'unique_together': "[('content_type', 'content_id')]", 'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + } + } + + complete_apps = ['demo_widgets'] \ No newline at end of file diff --git a/urlconf_include/migrations/__init__.py b/demo/demo_widgets/south_migrations/__init__.py similarity index 100% rename from urlconf_include/migrations/__init__.py rename to demo/demo_widgets/south_migrations/__init__.py diff --git a/demo/demo_widgets/static/widgy/demo_widgets/slideshow.js b/demo/demo_widgets/static/widgy/demo_widgets/slideshow.js new file mode 100644 index 000000000..6e31c8250 --- /dev/null +++ b/demo/demo_widgets/static/widgy/demo_widgets/slideshow.js @@ -0,0 +1,16 @@ +/*! +* jQuery Cycle2; version: 2.1.1 build: 20140128 +* http://jquery.malsup.com/cycle2/ +* Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL +*/ +(function(e){"use strict";function t(e){return(e||"").toLowerCase()}var i="2.1.1";e.fn.cycle=function(i){var n;return 0!==this.length||e.isReady?this.each(function(){var n,s,o,c,l=e(this),r=e.fn.cycle.log;if(!l.data("cycle.opts")){(l.data("cycle-log")===!1||i&&i.log===!1||s&&s.log===!1)&&(r=e.noop),r("--c2 init--"),n=l.data();for(var a in n)n.hasOwnProperty(a)&&/^cycle[A-Z]+/.test(a)&&(c=n[a],o=a.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),r(o+":",c,"("+typeof c+")"),n[o]=c);s=e.extend({},e.fn.cycle.defaults,n,i||{}),s.timeoutId=0,s.paused=s.paused||!1,s.container=l,s._maxZ=s.maxZ,s.API=e.extend({_container:l},e.fn.cycle.API),s.API.log=r,s.API.trigger=function(e,t){return s.container.trigger(e,t),s.API},l.data("cycle.opts",s),l.data("cycle.API",s.API),s.API.trigger("cycle-bootstrap",[s,s.API]),s.API.addInitialSlides(),s.API.preInitSlideshow(),s.slides.length&&s.API.initSlideshow()}}):(n={s:this.selector,c:this.context},e.fn.cycle.log("requeuing slideshow (dom not ready)"),e(function(){e(n.s,n.c).cycle(i)}),this)},e.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var t=this.opts(),i=t.slides;t.slideCount=0,t.slides=e(),i=i.jquery?i:t.container.find(i),t.random&&i.sort(function(){return Math.random()-.5}),t.API.add(i)},preInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-pre-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.preInit)&&i.preInit(t),t._preInitialized=!0},postInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-post-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.postInit)&&i.postInit(t)},initSlideshow:function(){var t,i=this.opts(),n=i.container;i.API.calcFirstSlide(),"static"==i.container.css("position")&&i.container.css("position","relative"),e(i.slides[i.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),i.API.stackSlides(i.slides[i.currSlide],i.slides[i.nextSlide],!i.reverse),i.pauseOnHover&&(i.pauseOnHover!==!0&&(n=e(i.pauseOnHover)),n.hover(function(){i.API.pause(!0)},function(){i.API.resume(!0)})),i.timeout&&(t=i.API.getSlideOpts(i.currSlide),i.API.queueTransition(t,t.timeout+i.delay)),i._initialized=!0,i.API.updateView(!0),i.API.trigger("cycle-initialized",[i]),i.API.postInitSlideshow()},pause:function(t){var i=this.opts(),n=i.API.getSlideOpts(),s=i.hoverPaused||i.paused;t?i.hoverPaused=!0:i.paused=!0,s||(i.container.addClass("cycle-paused"),i.API.trigger("cycle-paused",[i]).log("cycle-paused"),n.timeout&&(clearTimeout(i.timeoutId),i.timeoutId=0,i._remainingTimeout-=e.now()-i._lastQueue,(0>i._remainingTimeout||isNaN(i._remainingTimeout))&&(i._remainingTimeout=void 0)))},resume:function(e){var t=this.opts(),i=!t.hoverPaused&&!t.paused;e?t.hoverPaused=!1:t.paused=!1,i||(t.container.removeClass("cycle-paused"),0===t.slides.filter(":animated").length&&t.API.queueTransition(t.API.getSlideOpts(),t._remainingTimeout),t.API.trigger("cycle-resumed",[t,t._remainingTimeout]).log("cycle-resumed"))},add:function(t,i){var n,s=this.opts(),o=s.slideCount,c=!1;"string"==e.type(t)&&(t=e.trim(t)),e(t).each(function(){var t,n=e(this);i?s.container.prepend(n):s.container.append(n),s.slideCount++,t=s.API.buildSlideOpts(n),s.slides=i?e(n).add(s.slides):s.slides.add(n),s.API.initSlide(t,n,--s._maxZ),n.data("cycle.opts",t),s.API.trigger("cycle-slide-added",[s,t,n])}),s.API.updateView(!0),c=s._preInitialized&&2>o&&s.slideCount>=1,c&&(s._initialized?s.timeout&&(n=s.slides.length,s.nextSlide=s.reverse?n-1:1,s.timeoutId||s.API.queueTransition(s)):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();e=parseInt(t.startingSlide||0,10),(e>=t.slides.length||0>e)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,0>t.nextSlide&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=0>t.nextSlide-1,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(t,i){var n,s=t;return i&&s.manualFx&&(n=e.fn.cycle.transitions[s.manualFx]),n||(n=e.fn.cycle.transitions[s.fx]),n||(n=e.fn.cycle.transitions.fade,s.API.log('Transition "'+s.fx+'" not found. Using fade.')),n},prepareTx:function(e,t){var i,n,s,o,c,l=this.opts();return 2>l.slideCount?(l.timeoutId=0,void 0):(!e||l.busy&&!l.manualTrump||(l.API.stopTransition(),l.busy=!1,clearTimeout(l.timeoutId),l.timeoutId=0),l.busy||(0!==l.timeoutId||e)&&(n=l.slides[l.currSlide],s=l.slides[l.nextSlide],o=l.API.getSlideOpts(l.nextSlide),c=l.API.calcTx(o,e),l._tx=c,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),l.nextSlide!=l.currSlide&&(e||!l.paused&&!l.hoverPaused&&l.timeout)?(l.API.trigger("cycle-before",[o,n,s,t]),c.before&&c.before(o,n,s,t),i=function(){l.busy=!1,l.container.data("cycle.opts")&&(c.after&&c.after(o,n,s,t),l.API.trigger("cycle-after",[o,n,s,t]),l.API.queueTransition(o),l.API.updateView(!0))},l.busy=!0,c.transition?c.transition(o,n,s,t,i):l.API.doTransition(o,n,s,t,i),l.API.calcNextSlide(),l.API.updateView()):l.API.queueTransition(o)),void 0)},doTransition:function(t,i,n,s,o){var c=t,l=e(i),r=e(n),a=function(){r.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,o)};r.css(c.cssBefore||{}),l.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){l.css(c.cssAfter||{}),c.sync||a()}),c.sync&&a()},queueTransition:function(t,i){var n=this.opts(),s=void 0!==i?i:t.timeout;return 0===n.nextSlide&&0===--n.loop?(n.API.log("terminating; loop=0"),n.timeout=0,s?setTimeout(function(){n.API.trigger("cycle-finished",[n])},s):n.API.trigger("cycle-finished",[n]),n.nextSlide=n.currSlide,void 0):(s&&(n._lastQueue=e.now(),void 0===i&&(n._remainingTimeout=t.timeout),n.paused||n.hoverPaused||(n.timeoutId=setTimeout(function(){n.API.prepareTx(!1,!n.reverse)},s))),void 0)},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,0>t.nextSlide?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,e>=0),!1},buildSlideOpts:function(i){var n,s,o=this.opts(),c=i.data()||{};for(var l in c)c.hasOwnProperty(l)&&/^cycle[A-Z]+/.test(l)&&(n=c[l],s=l.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),o.API.log("["+(o.slideCount-1)+"]",s+":",n,"("+typeof n+")"),c[s]=n);c=e.extend({},e.fn.cycle.defaults,o,c),c.slideNum=o.slideCount;try{delete c.API,delete c.slideCount,delete c.currSlide,delete c.nextSlide,delete c.slides}catch(r){}return c},getSlideOpts:function(t){var i=this.opts();void 0===t&&(t=i.currSlide);var n=i.slides[t],s=e(n).data("cycle.opts");return e.extend({},i,s)},initSlide:function(t,i,n){var s=this.opts();i.css(t.slideCss||{}),n>0&&i.css("zIndex",n),isNaN(t.speed)&&(t.speed=e.fx.speeds[t.speed]||e.fx.speeds._default),t.sync||(t.speed=t.speed/2),i.addClass(s.slideClass)},updateView:function(e,t){var i=this.opts();if(i._initialized){var n=i.API.getSlideOpts(),s=i.slides[i.currSlide];!e&&t!==!0&&(i.API.trigger("cycle-update-view-before",[i,n,s]),0>i.updateView)||(i.slideActiveClass&&i.slides.removeClass(i.slideActiveClass).eq(i.currSlide).addClass(i.slideActiveClass),e&&i.hideNonActive&&i.slides.filter(":not(."+i.slideActiveClass+")").css("visibility","hidden"),0===i.updateView&&setTimeout(function(){i.API.trigger("cycle-update-view",[i,n,s,e])},n.speed/(i.sync?2:1)),0!==i.updateView&&i.API.trigger("cycle-update-view",[i,n,s,e]),e&&i.API.trigger("cycle-update-view-after",[i,n,s]))}},getComponent:function(t){var i=this.opts(),n=i[t];return"string"==typeof n?/^\s*[\>|\+|~]/.test(n)?i.container.find(n):e(n):n.jquery?n:e(n)},stackSlides:function(t,i,n){var s=this.opts();t||(t=s.slides[s.currSlide],i=s.slides[s.nextSlide],n=!s.reverse),e(t).css("zIndex",s.maxZ);var o,c=s.maxZ-2,l=s.slideCount;if(n){for(o=s.currSlide+1;l>o;o++)e(s.slides[o]).css("zIndex",c--);for(o=0;s.currSlide>o;o++)e(s.slides[o]).css("zIndex",c--)}else{for(o=s.currSlide-1;o>=0;o--)e(s.slides[o]).css("zIndex",c--);for(o=l-1;o>s.currSlide;o--)e(s.slides[o]).css("zIndex",c--)}e(i).css("zIndex",s.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},e.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},e.fn.cycle.version=function(){return"Cycle2: "+i},e.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:0,visibility:"visible",display:"block"}),t.animIn={opacity:1},t.animOut={opacity:0}}},fadeout:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:1,visibility:"visible",display:"block"}),t.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);var s=e.container.css("overflow","hidden").width();e.cssBefore={left:n?s:-s,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:n?-s:s}}}},e.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},e(document).ready(function(){e(e.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */ +function(e){"use strict";function t(t,n){var s,o,c,l=n.autoHeight;if("container"==l)o=e(n.slides[n.currSlide]).outerHeight(),n.container.height(o);else if(n._autoHeightRatio)n.container.height(n.container.width()/n._autoHeightRatio);else if("calc"===l||"number"==e.type(l)&&l>=0){if(c="calc"===l?i(t,n):l>=n.slides.length?0:l,c==n._sentinelIndex)return;n._sentinelIndex=c,n._sentinel&&n._sentinel.remove(),s=e(n.slides[c].cloneNode(!0)),s.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),s.css({position:"static",visibility:"hidden",display:"block"}).prependTo(n.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),s.find("*").css("visibility","hidden"),n._sentinel=s}}function i(t,i){var n=0,s=-1;return i.slides.each(function(t){var i=e(this).height();i>s&&(s=i,n=t)}),n}function n(t,i,n,s){var o=e(s).outerHeight();i.container.animate({height:o},i.autoHeightSpeed,i.autoHeightEasing)}function s(i,o){o._autoHeightOnResize&&(e(window).off("resize orientationchange",o._autoHeightOnResize),o._autoHeightOnResize=null),o.container.off("cycle-slide-added cycle-slide-removed",t),o.container.off("cycle-destroyed",s),o.container.off("cycle-before",n),o._sentinel&&(o._sentinel.remove(),o._sentinel=null)}e.extend(e.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),e(document).on("cycle-initialized",function(i,o){function c(){t(i,o)}var l,r=o.autoHeight,a=e.type(r),d=null;("string"===a||"number"===a)&&(o.container.on("cycle-slide-added cycle-slide-removed",t),o.container.on("cycle-destroyed",s),"container"==r?o.container.on("cycle-before",n):"string"===a&&/\d+\:\d+/.test(r)&&(l=r.match(/(\d+)\:(\d+)/),l=l[1]/l[2],o._autoHeightRatio=l),"number"!==a&&(o._autoHeightOnResize=function(){clearTimeout(d),d=setTimeout(c,50)},e(window).on("resize orientationchange",o._autoHeightOnResize)),setTimeout(c,30))})}(jQuery),/*! caption plugin for Cycle2; version: 20130306 */ +function(e){"use strict";e.extend(e.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"

{{title}}
{{desc}}
",captionModule:"caption"}),e(document).on("cycle-update-view",function(t,i,n,s){"caption"===i.captionModule&&e.each(["caption","overlay"],function(){var e=this,t=n[e+"Template"],o=i.API.getComponent(e);o.length&&t?(o.html(i.API.tmpl(t,n,i,s)),o.show()):o.hide()})}),e(document).on("cycle-destroyed",function(t,i){var n;e.each(["caption","overlay"],function(){var e=this,t=i[e+"Template"];i[e]&&t&&(n=i.API.getComponent("caption"),n.empty())})})}(jQuery),/*! command plugin for Cycle2; version: 20130707 */ +function(e){"use strict";var t=e.fn.cycle;e.fn.cycle=function(i){var n,s,o,c=e.makeArray(arguments);return"number"==e.type(i)?this.cycle("goto",i):"string"==e.type(i)?this.each(function(){var l;return n=i,o=e(this).data("cycle.opts"),void 0===o?(t.log('slideshow must be initialized before sending commands; "'+n+'" ignored'),void 0):(n="goto"==n?"jump":n,s=o.API[n],e.isFunction(s)?(l=e.makeArray(c),l.shift(),s.apply(o.API,l)):(t.log("unknown command: ",n),void 0))}):t.apply(this,arguments)},e.extend(e.fn.cycle,t),e.extend(t.API,{next:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?-1:1;e.allowWrap===!1&&e.currSlide+t>=e.slideCount||(e.API.advanceSlide(t),e.API.trigger("cycle-next",[e]).log("cycle-next"))}},prev:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?1:-1;e.allowWrap===!1&&0>e.currSlide+t||(e.API.advanceSlide(t),e.API.trigger("cycle-prev",[e]).log("cycle-prev"))}},destroy:function(){this.stop();var t=this.opts(),i=e.isFunction(e._data)?e._data:e.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){e(this).removeData(),i(this,"parsedAttrs",!1)})},jump:function(e){var t,i=this.opts();if(!i.busy||i.manualTrump){var n=parseInt(e,10);if(isNaN(n)||0>n||n>=i.slides.length)return i.API.log("goto: invalid slide index: "+n),void 0;if(n==i.currSlide)return i.API.log("goto: skipping, already on slide",n),void 0;i.nextSlide=n,clearTimeout(i.timeoutId),i.timeoutId=0,i.API.log("goto: ",n," (zero-index)"),t=i.currSlidel;l++)i=s.slides[l],l==t?n=i:(o.push(i),e(i).data("cycle.opts").slideNum=c,c++);n&&(s.slides=e(o),s.slideCount--,e(n).remove(),t==s.currSlide?s.API.advanceSlide(1):s.currSlide>t?s.currSlide--:s.currSlide++,s.API.trigger("cycle-slide-removed",[s,t,n]).log("cycle-slide-removed"),s.API.updateView())}}),e(document).on("click.cycle","[data-cycle-cmd]",function(t){t.preventDefault();var i=e(this),n=i.data("cycle-cmd"),s=i.data("cycle-context")||".cycle-slideshow";e(s).cycle(n,i.data("cycle-arg"))})}(jQuery),/*! hash plugin for Cycle2; version: 20130905 */ +function(e){"use strict";function t(t,i){var n;return t._hashFence?(t._hashFence=!1,void 0):(n=window.location.hash.substring(1),t.slides.each(function(s){if(e(this).data("cycle-hash")==n){if(i===!0)t.startingSlide=s;else{var o=s>t.currSlide;t.nextSlide=s,t.API.prepareTx(!0,o)}return!1}}),void 0)}e(document).on("cycle-pre-initialize",function(i,n){t(n,!0),n._onHashChange=function(){t(n,!1)},e(window).on("hashchange",n._onHashChange)}),e(document).on("cycle-update-view",function(e,t,i){i.hash&&"#"+i.hash!=window.location.hash&&(t._hashFence=!0,window.location.hash=i.hash)}),e(document).on("cycle-destroyed",function(t,i){i._onHashChange&&e(window).off("hashchange",i._onHashChange)})}(jQuery),/*! loader plugin for Cycle2; version: 20131121 */ +function(e){"use strict";e.extend(e.fn.cycle.defaults,{loader:!1}),e(document).on("cycle-bootstrap",function(t,i){function n(t,n){function o(t){var o;"wait"==i.loader?(l.push(t),0===a&&(l.sort(c),s.apply(i.API,[l,n]),i.container.removeClass("cycle-loading"))):(o=e(i.slides[i.currSlide]),s.apply(i.API,[t,n]),o.show(),i.container.removeClass("cycle-loading"))}function c(e,t){return e.data("index")-t.data("index")}var l=[];if("string"==e.type(t))t=e.trim(t);else if("array"===e.type(t))for(var r=0;t.length>r;r++)t[r]=e(t[r])[0];t=e(t);var a=t.length;a&&(t.css("visibility","hidden").appendTo("body").each(function(t){function c(){0===--r&&(--a,o(d))}var r=0,d=e(this),u=d.is("img")?d:d.find("img");return d.data("index",t),u=u.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),u.length?(r=u.length,u.each(function(){this.complete?c():e(this).load(function(){c()}).on("error",function(){0===--r&&(i.API.log("slide skipped; img not loaded:",this.src),0===--a&&"wait"==i.loader&&s.apply(i.API,[l,n]))})}),void 0):(--a,l.push(d),void 0)}),a&&i.container.addClass("cycle-loading"))}var s;i.loader&&(s=i.API.add,i.API.add=n)})}(jQuery),/*! pager plugin for Cycle2; version: 20130525 */ +function(e){"use strict";function t(t,i,n){var s,o=t.API.getComponent("pager");o.each(function(){var o=e(this);if(i.pagerTemplate){var c=t.API.tmpl(i.pagerTemplate,i,t,n[0]);s=e(c).appendTo(o)}else s=o.children().eq(t.slideCount-1);s.on(t.pagerEvent,function(e){e.preventDefault(),t.API.page(o,e.currentTarget)})})}function i(e,t){var i=this.opts();if(!i.busy||i.manualTrump){var n=e.children().index(t),s=n,o=s>i.currSlide;i.currSlide!=s&&(i.nextSlide=s,i.API.prepareTx(!0,o),i.API.trigger("cycle-pager-activated",[i,e,t]))}}e.extend(e.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:""}),e(document).on("cycle-bootstrap",function(e,i,n){n.buildPagerLink=t}),e(document).on("cycle-slide-added",function(e,t,n,s){t.pager&&(t.API.buildPagerLink(t,n,s),t.API.page=i)}),e(document).on("cycle-slide-removed",function(t,i,n){if(i.pager){var s=i.API.getComponent("pager");s.each(function(){var t=e(this);e(t.children()[n]).remove()})}}),e(document).on("cycle-update-view",function(t,i){var n;i.pager&&(n=i.API.getComponent("pager"),n.each(function(){e(this).children().removeClass(i.pagerActiveClass).eq(i.currSlide).addClass(i.pagerActiveClass)}))}),e(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),/*! prevnext plugin for Cycle2; version: 20130709 */ +function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){if(t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe){var i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";t.container.on(i,function(){t.API.next()}),t.container.on(n,function(){t.API.prev()})}}),e(document).on("cycle-update-view",function(e,t){if(!t.allowWrap){var i=t.disabledClass,n=t.API.getComponent("next"),s=t.API.getComponent("prev"),o=t._prevBoundry||0,c=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1;t.currSlide==c?n.addClass(i).prop("disabled",!0):n.removeClass(i).prop("disabled",!1),t.currSlide===o?s.addClass(i).prop("disabled",!0):s.removeClass(i).prop("disabled",!1)}}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),/*! progressive loader plugin for Cycle2; version: 20130315 */ +function(e){"use strict";e.extend(e.fn.cycle.defaults,{progressive:!1}),e(document).on("cycle-pre-initialize",function(t,i){if(i.progressive){var n,s,o=i.API,c=o.next,l=o.prev,r=o.prepareTx,a=e.type(i.progressive);if("array"==a)n=i.progressive;else if(e.isFunction(i.progressive))n=i.progressive(i);else if("string"==a){if(s=e(i.progressive),n=e.trim(s.html()),!n)return;if(/^(\[)/.test(n))try{n=e.parseJSON(n)}catch(d){return o.log("error parsing progressive slides",d),void 0}else n=n.split(RegExp(s.data("cycle-split")||"\n")),n[n.length-1]||n.pop()}r&&(o.prepareTx=function(e,t){var s,o;return e||0===n.length?(r.apply(i.API,[e,t]),void 0):(t&&i.currSlide==i.slideCount-1?(o=n[0],n=n.slice(1),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),i.API.add(o)):t||0!==i.currSlide?r.apply(i.API,[e,t]):(s=n.length-1,o=n[s],n=n.slice(0,s),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),i.API.add(o,!0)),void 0)}),c&&(o.next=function(){var e=this.opts();if(n.length&&e.currSlide==e.slideCount-1){var t=n[0];n=n.slice(1),e.container.one("cycle-slide-added",function(e,t){c.apply(t.API),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(t)}else c.apply(e.API)}),l&&(o.prev=function(){var e=this.opts();if(n.length&&0===e.currSlide){var t=n.length-1,i=n[t];n=n.slice(0,t),e.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(i,!0)}else l.apply(e.API)})}})}(jQuery),/*! tmpl plugin for Cycle2; version: 20121227 */ +function(e){"use strict";e.extend(e.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),e.extend(e.fn.cycle.API,{tmpl:function(t,i){var n=RegExp(i.tmplRegex||e.fn.cycle.defaults.tmplRegex,"g"),s=e.makeArray(arguments);return s.shift(),t.replace(n,function(t,i){var n,o,c,l,r=i.split(".");for(n=0;s.length>n;n++)if(c=s[n]){if(r.length>1)for(l=c,o=0;r.length>o;o++)c=l,l=l[r[o]]||i;else l=c[i];if(e.isFunction(l))return l.apply(c,s);if(void 0!==l&&null!==l&&l!=i)return l}return i})}})}(jQuery); +//@ sourceMappingURL=jquery.cycle2.js.map \ No newline at end of file diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/box/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/box/render.html new file mode 100644 index 000000000..d73775393 --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/box/render.html @@ -0,0 +1,8 @@ +{% load widgy_tags %} +
+

{{ self.title }}

+ + {% for child in self.get_children %} + {% render child %} + {% endfor %} +
diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/boxes/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/boxes/render.html new file mode 100644 index 000000000..40361fa32 --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/boxes/render.html @@ -0,0 +1,6 @@ +{% load widgy_tags %} +
+ {% for child in self.get_children %} + {% render child %} + {% endfor %} +
diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/homelayout/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/homelayout/render.html new file mode 100644 index 000000000..6279ffbfa --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/homelayout/render.html @@ -0,0 +1,17 @@ +{% extends "widgy/page_builder/defaultlayout/render.html" %} + +{% load widgy_tags %} + +{% block bodyClass %}home{% endblock %} + +{% block leftnav %} +{% endblock %} + +{% block content %} +{% for child in self.get_children %} +{% render child %} +{% endfor %} +{% endblock %} + +{% block sidebar %} +{% endblock %} diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/slide/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/slide/render.html new file mode 100644 index 000000000..f7476ffc0 --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/slide/render.html @@ -0,0 +1,11 @@ +{% load thumbnail_libs %} +{% load widgy_tags %} + +
+ +

{{ self.tagline }}

+ + {% for child in self.get_children %} + {% render child %} + {% endfor %} +
diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/slideshow/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/slideshow/render.html new file mode 100644 index 000000000..62f407cae --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/slideshow/render.html @@ -0,0 +1,6 @@ +{% load widgy_tags %} +
+ {% for child in self.get_children %} + {% render child %} + {% endfor %} +
diff --git a/demo/demo_widgets/templates/widgy/demo_widgets/twocontentlayout/render.html b/demo/demo_widgets/templates/widgy/demo_widgets/twocontentlayout/render.html new file mode 100644 index 000000000..d3d22ef32 --- /dev/null +++ b/demo/demo_widgets/templates/widgy/demo_widgets/twocontentlayout/render.html @@ -0,0 +1,11 @@ +{% load widgy_tags %} + +
+

{{ page.title }}

+ + {% render self.get_children.0 %} +
+ +
+ {% render self.get_children.1 %} +
diff --git a/demo/demo_widgets/tests.py b/demo/demo_widgets/tests.py deleted file mode 100644 index 501deb776..000000000 --- a/demo/demo_widgets/tests.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -This file demonstrates writing tests using the unittest module. These will pass -when you run "manage.py test". - -Replace this with more appropriate tests for your application. -""" - -from django.test import TestCase - - -class SimpleTest(TestCase): - def test_basic_addition(self): - """ - Tests that 1 + 1 always equals 2. - """ - self.assertEqual(1 + 1, 2) diff --git a/demo/demo_widgets/views.py b/demo/demo_widgets/views.py deleted file mode 100644 index 60f00ef0e..000000000 --- a/demo/demo_widgets/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/media/.gitkeep b/demo/media/.gitkeep similarity index 100% rename from media/.gitkeep rename to demo/media/.gitkeep diff --git a/demo/public/css/bootstrap-responsive.css b/demo/public/css/bootstrap-responsive.css deleted file mode 100644 index 06e55c0b4..000000000 --- a/demo/public/css/bootstrap-responsive.css +++ /dev/null @@ -1,815 +0,0 @@ -/*! - * Bootstrap Responsive v2.0.4 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 28px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -.hidden { - display: none; - visibility: hidden; -} - -.visible-phone { - display: none !important; -} - -.visible-tablet { - display: none !important; -} - -.hidden-desktop { - display: none !important; -} - -@media (max-width: 767px) { - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important; - } -} - -@media (min-width: 768px) and (max-width: 979px) { - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important ; - } -} - -@media (max-width: 480px) { - .nav-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 18px; - } - input[type="checkbox"], - input[type="radio"] { - border: 1px solid #ccc; - } - .form-horizontal .control-group > label { - float: none; - width: auto; - padding-top: 0; - text-align: left; - } - .form-horizontal .controls { - margin-left: 0; - } - .form-horizontal .control-list { - padding-top: 0; - } - .form-horizontal .form-actions { - padding-right: 10px; - padding-left: 10px; - } - .modal { - position: absolute; - top: 10px; - right: 10px; - left: 10px; - width: auto; - margin: 0; - } - .modal.fade.in { - top: auto; - } - .modal-header .close { - padding: 10px; - margin: -10px; - } - .carousel-caption { - position: static; - } -} - -@media (max-width: 767px) { - body { - padding-right: 20px; - padding-left: 20px; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - margin-right: -20px; - margin-left: -20px; - } - .container-fluid { - padding: 0; - } - .dl-horizontal dt { - float: none; - width: auto; - clear: none; - text-align: left; - } - .dl-horizontal dd { - margin-left: 0; - } - .container { - width: auto; - } - .row-fluid { - width: 100%; - } - .row, - .thumbnails { - margin-left: 0; - } - [class*="span"], - .row-fluid [class*="span"] { - display: block; - float: none; - width: auto; - margin-left: 0; - } - .input-large, - .input-xlarge, - .input-xxlarge, - input[class*="span"], - select[class*="span"], - textarea[class*="span"], - .uneditable-input { - display: block; - width: 100%; - min-height: 28px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .input-prepend input, - .input-append input, - .input-prepend input[class*="span"], - .input-append input[class*="span"] { - display: inline-block; - width: auto; - } -} - -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 20px; - } - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 724px; - } - .span12 { - width: 724px; - } - .span11 { - width: 662px; - } - .span10 { - width: 600px; - } - .span9 { - width: 538px; - } - .span8 { - width: 476px; - } - .span7 { - width: 414px; - } - .span6 { - width: 352px; - } - .span5 { - width: 290px; - } - .span4 { - width: 228px; - } - .span3 { - width: 166px; - } - .span2 { - width: 104px; - } - .span1 { - width: 42px; - } - .offset12 { - margin-left: 764px; - } - .offset11 { - margin-left: 702px; - } - .offset10 { - margin-left: 640px; - } - .offset9 { - margin-left: 578px; - } - .offset8 { - margin-left: 516px; - } - .offset7 { - margin-left: 454px; - } - .offset6 { - margin-left: 392px; - } - .offset5 { - margin-left: 330px; - } - .offset4 { - margin-left: 268px; - } - .offset3 { - margin-left: 206px; - } - .offset2 { - margin-left: 144px; - } - .offset1 { - margin-left: 82px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 28px; - margin-left: 2.762430939%; - *margin-left: 2.709239449638298%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span12 { - width: 99.999999993%; - *width: 99.9468085036383%; - } - .row-fluid .span11 { - width: 91.436464082%; - *width: 91.38327259263829%; - } - .row-fluid .span10 { - width: 82.87292817100001%; - *width: 82.8197366816383%; - } - .row-fluid .span9 { - width: 74.30939226%; - *width: 74.25620077063829%; - } - .row-fluid .span8 { - width: 65.74585634900001%; - *width: 65.6926648596383%; - } - .row-fluid .span7 { - width: 57.182320438000005%; - *width: 57.129128948638304%; - } - .row-fluid .span6 { - width: 48.618784527%; - *width: 48.5655930376383%; - } - .row-fluid .span5 { - width: 40.055248616%; - *width: 40.0020571266383%; - } - .row-fluid .span4 { - width: 31.491712705%; - *width: 31.4385212156383%; - } - .row-fluid .span3 { - width: 22.928176794%; - *width: 22.874985304638297%; - } - .row-fluid .span2 { - width: 14.364640883%; - *width: 14.311449393638298%; - } - .row-fluid .span1 { - width: 5.801104972%; - *width: 5.747913482638298%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 714px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 652px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 590px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 528px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 466px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 404px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 342px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 280px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 218px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 156px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 94px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 32px; - } -} - -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - margin-left: 30px; - } - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; - } - .span12 { - width: 1170px; - } - .span11 { - width: 1070px; - } - .span10 { - width: 970px; - } - .span9 { - width: 870px; - } - .span8 { - width: 770px; - } - .span7 { - width: 670px; - } - .span6 { - width: 570px; - } - .span5 { - width: 470px; - } - .span4 { - width: 370px; - } - .span3 { - width: 270px; - } - .span2 { - width: 170px; - } - .span1 { - width: 70px; - } - .offset12 { - margin-left: 1230px; - } - .offset11 { - margin-left: 1130px; - } - .offset10 { - margin-left: 1030px; - } - .offset9 { - margin-left: 930px; - } - .offset8 { - margin-left: 830px; - } - .offset7 { - margin-left: 730px; - } - .offset6 { - margin-left: 630px; - } - .offset5 { - margin-left: 530px; - } - .offset4 { - margin-left: 430px; - } - .offset3 { - margin-left: 330px; - } - .offset2 { - margin-left: 230px; - } - .offset1 { - margin-left: 130px; - } - .row-fluid { - width: 100%; - *zoom: 1; - } - .row-fluid:before, - .row-fluid:after { - display: table; - content: ""; - } - .row-fluid:after { - clear: both; - } - .row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 28px; - margin-left: 2.564102564%; - *margin-left: 2.510911074638298%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - } - .row-fluid [class*="span"]:first-child { - margin-left: 0; - } - .row-fluid .span12 { - width: 100%; - *width: 99.94680851063829%; - } - .row-fluid .span11 { - width: 91.45299145300001%; - *width: 91.3997999636383%; - } - .row-fluid .span10 { - width: 82.905982906%; - *width: 82.8527914166383%; - } - .row-fluid .span9 { - width: 74.358974359%; - *width: 74.30578286963829%; - } - .row-fluid .span8 { - width: 65.81196581200001%; - *width: 65.7587743226383%; - } - .row-fluid .span7 { - width: 57.264957265%; - *width: 57.2117657756383%; - } - .row-fluid .span6 { - width: 48.717948718%; - *width: 48.6647572286383%; - } - .row-fluid .span5 { - width: 40.170940171000005%; - *width: 40.117748681638304%; - } - .row-fluid .span4 { - width: 31.623931624%; - *width: 31.5707401346383%; - } - .row-fluid .span3 { - width: 23.076923077%; - *width: 23.0237315876383%; - } - .row-fluid .span2 { - width: 14.529914530000001%; - *width: 14.4767230406383%; - } - .row-fluid .span1 { - width: 5.982905983%; - *width: 5.929714493638298%; - } - input, - textarea, - .uneditable-input { - margin-left: 0; - } - input.span12, - textarea.span12, - .uneditable-input.span12 { - width: 1160px; - } - input.span11, - textarea.span11, - .uneditable-input.span11 { - width: 1060px; - } - input.span10, - textarea.span10, - .uneditable-input.span10 { - width: 960px; - } - input.span9, - textarea.span9, - .uneditable-input.span9 { - width: 860px; - } - input.span8, - textarea.span8, - .uneditable-input.span8 { - width: 760px; - } - input.span7, - textarea.span7, - .uneditable-input.span7 { - width: 660px; - } - input.span6, - textarea.span6, - .uneditable-input.span6 { - width: 560px; - } - input.span5, - textarea.span5, - .uneditable-input.span5 { - width: 460px; - } - input.span4, - textarea.span4, - .uneditable-input.span4 { - width: 360px; - } - input.span3, - textarea.span3, - .uneditable-input.span3 { - width: 260px; - } - input.span2, - textarea.span2, - .uneditable-input.span2 { - width: 160px; - } - input.span1, - textarea.span1, - .uneditable-input.span1 { - width: 60px; - } - .thumbnails { - margin-left: -30px; - } - .thumbnails > li { - margin-left: 30px; - } - .row-fluid .thumbnails { - margin-left: 0; - } -} - -@media (max-width: 979px) { - body { - padding-top: 0; - } - .navbar-fixed-top, - .navbar-fixed-bottom { - position: static; - } - .navbar-fixed-top { - margin-bottom: 18px; - } - .navbar-fixed-bottom { - margin-top: 18px; - } - .navbar-fixed-top .navbar-inner, - .navbar-fixed-bottom .navbar-inner { - padding: 5px; - } - .navbar .container { - width: auto; - padding: 0; - } - .navbar .brand { - padding-right: 10px; - padding-left: 10px; - margin: 0 0 0 -5px; - } - .nav-collapse { - clear: both; - } - .nav-collapse .nav { - float: none; - margin: 0 0 9px; - } - .nav-collapse .nav > li { - float: none; - } - .nav-collapse .nav > li > a { - margin-bottom: 2px; - } - .nav-collapse .nav > .divider-vertical { - display: none; - } - .nav-collapse .nav .nav-header { - color: #999999; - text-shadow: none; - } - .nav-collapse .nav > li > a, - .nav-collapse .dropdown-menu a { - padding: 6px 15px; - font-weight: bold; - color: #999999; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .nav-collapse .btn { - padding: 4px 10px 4px; - font-weight: normal; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - .nav-collapse .dropdown-menu li + li a { - margin-bottom: 2px; - } - .nav-collapse .nav > li > a:hover, - .nav-collapse .dropdown-menu a:hover { - background-color: #222222; - } - .nav-collapse.in .btn-group { - padding: 0; - margin-top: 5px; - } - .nav-collapse .dropdown-menu { - position: static; - top: auto; - left: auto; - display: block; - float: none; - max-width: none; - padding: 0; - margin: 0 15px; - background-color: transparent; - border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - .nav-collapse .dropdown-menu:before, - .nav-collapse .dropdown-menu:after { - display: none; - } - .nav-collapse .dropdown-menu .divider { - display: none; - } - .nav-collapse .navbar-form, - .nav-collapse .navbar-search { - float: none; - padding: 9px 15px; - margin: 9px 0; - border-top: 1px solid #222222; - border-bottom: 1px solid #222222; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - } - .navbar .nav-collapse .nav.pull-right { - float: none; - margin-left: 0; - } - .nav-collapse, - .nav-collapse.collapse { - height: 0; - overflow: hidden; - } - .navbar .btn-navbar { - display: block; - } - .navbar-static .navbar-inner { - padding-right: 10px; - padding-left: 10px; - } -} - -@media (min-width: 980px) { - .nav-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -} diff --git a/demo/public/css/bootstrap-responsive.min.css b/demo/public/css/bootstrap-responsive.min.css deleted file mode 100644 index 1f55036a0..000000000 --- a/demo/public/css/bootstrap-responsive.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap Responsive v2.0.4 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}@media(max-width:767px){.visible-phone{display:inherit!important}.hidden-phone{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(min-width:768px) and (max-width:979px){.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:18px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:18px}.navbar-fixed-bottom{margin-top:18px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/demo/public/css/bootstrap.css b/demo/public/css/bootstrap.css deleted file mode 100644 index fdba77f55..000000000 --- a/demo/public/css/bootstrap.css +++ /dev/null @@ -1,4983 +0,0 @@ -/*! - * Bootstrap v2.0.4 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -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; -} - -html { - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -a:hover, -a:here { - outline: 0; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - max-width: 100%; - vertical-align: middle; - border: 0; - -ms-interpolation-mode: bicubic; -} - -#map_canvas img { - max-width: none; -} - -button, -input, -select, -textarea { - margin: 0; - font-size: 100%; - vertical-align: middle; -} - -button, -input { - *overflow: visible; - line-height: normal; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -button, -input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -.clearfix { - *zoom: 1; -} - -.clearfix:before, -.clearfix:after { - display: table; - content: ""; -} - -.clearfix:after { - clear: both; -} - -.hide-text { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.input-block-level { - display: block; - width: 100%; - min-height: 28px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - line-height: 18px; - color: #333333; - background-color: #ffffff; -} - -a { - color: #0088cc; - text-decoration: none; -} - -a:hover { - color: #005580; - text-decoration: underline; -} - -.row { - margin-left: -20px; - *zoom: 1; -} - -.row:before, -.row:after { - display: table; - content: ""; -} - -.row:after { - clear: both; -} - -[class*="span"] { - float: left; - margin-left: 20px; -} - -.container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.span12 { - width: 940px; -} - -.span11 { - width: 860px; -} - -.span10 { - width: 780px; -} - -.span9 { - width: 700px; -} - -.span8 { - width: 620px; -} - -.span7 { - width: 540px; -} - -.span6 { - width: 460px; -} - -.span5 { - width: 380px; -} - -.span4 { - width: 300px; -} - -.span3 { - width: 220px; -} - -.span2 { - width: 140px; -} - -.span1 { - width: 60px; -} - -.offset12 { - margin-left: 980px; -} - -.offset11 { - margin-left: 900px; -} - -.offset10 { - margin-left: 820px; -} - -.offset9 { - margin-left: 740px; -} - -.offset8 { - margin-left: 660px; -} - -.offset7 { - margin-left: 580px; -} - -.offset6 { - margin-left: 500px; -} - -.offset5 { - margin-left: 420px; -} - -.offset4 { - margin-left: 340px; -} - -.offset3 { - margin-left: 260px; -} - -.offset2 { - margin-left: 180px; -} - -.offset1 { - margin-left: 100px; -} - -.row-fluid { - width: 100%; - *zoom: 1; -} - -.row-fluid:before, -.row-fluid:after { - display: table; - content: ""; -} - -.row-fluid:after { - clear: both; -} - -.row-fluid [class*="span"] { - display: block; - float: left; - width: 100%; - min-height: 28px; - margin-left: 2.127659574%; - *margin-left: 2.0744680846382977%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -.row-fluid [class*="span"]:first-child { - margin-left: 0; -} - -.row-fluid .span12 { - width: 99.99999998999999%; - *width: 99.94680850063828%; -} - -.row-fluid .span11 { - width: 91.489361693%; - *width: 91.4361702036383%; -} - -.row-fluid .span10 { - width: 82.97872339599999%; - *width: 82.92553190663828%; -} - -.row-fluid .span9 { - width: 74.468085099%; - *width: 74.4148936096383%; -} - -.row-fluid .span8 { - width: 65.95744680199999%; - *width: 65.90425531263828%; -} - -.row-fluid .span7 { - width: 57.446808505%; - *width: 57.3936170156383%; -} - -.row-fluid .span6 { - width: 48.93617020799999%; - *width: 48.88297871863829%; -} - -.row-fluid .span5 { - width: 40.425531911%; - *width: 40.3723404216383%; -} - -.row-fluid .span4 { - width: 31.914893614%; - *width: 31.8617021246383%; -} - -.row-fluid .span3 { - width: 23.404255317%; - *width: 23.3510638276383%; -} - -.row-fluid .span2 { - width: 14.89361702%; - *width: 14.8404255306383%; -} - -.row-fluid .span1 { - width: 6.382978723%; - *width: 6.329787233638298%; -} - -.container { - margin-right: auto; - margin-left: auto; - *zoom: 1; -} - -.container:before, -.container:after { - display: table; - content: ""; -} - -.container:after { - clear: both; -} - -.container-fluid { - padding-right: 20px; - padding-left: 20px; - *zoom: 1; -} - -.container-fluid:before, -.container-fluid:after { - display: table; - content: ""; -} - -.container-fluid:after { - clear: both; -} - -p { - margin: 0 0 9px; -} - -p small { - font-size: 11px; - color: #999999; -} - -.lead { - margin-bottom: 18px; - font-size: 20px; - font-weight: 200; - line-height: 27px; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; - font-family: inherit; - font-weight: bold; - color: inherit; - text-rendering: optimizelegibility; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small { - font-weight: normal; - color: #999999; -} - -h1 { - font-size: 30px; - line-height: 36px; -} - -h1 small { - font-size: 18px; -} - -h2 { - font-size: 24px; - line-height: 36px; -} - -h2 small { - font-size: 18px; -} - -h3 { - font-size: 18px; - line-height: 27px; -} - -h3 small { - font-size: 14px; -} - -h4, -h5, -h6 { - line-height: 18px; -} - -h4 { - font-size: 14px; -} - -h4 small { - font-size: 12px; -} - -h5 { - font-size: 12px; -} - -h6 { - font-size: 11px; - color: #999999; - text-transform: uppercase; -} - -.page-header { - padding-bottom: 17px; - margin: 18px 0; - border-bottom: 1px solid #eeeeee; -} - -.page-header h1 { - line-height: 1; -} - -ul, -ol { - padding: 0; - margin: 0 0 9px 25px; -} - -ul ul, -ul ol, -ol ol, -ol ul { - margin-bottom: 0; -} - -ul { - list-style: disc; -} - -ol { - list-style: decimal; -} - -li { - line-height: 18px; -} - -ul.unstyled, -ol.unstyled { - margin-left: 0; - list-style: none; -} - -dl { - margin-bottom: 18px; -} - -dt, -dd { - line-height: 18px; -} - -dt { - font-weight: bold; - line-height: 17px; -} - -dd { - margin-left: 9px; -} - -.dl-horizontal dt { - float: left; - width: 120px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 130px; -} - -hr { - margin: 18px 0; - border: 0; - border-top: 1px solid #eeeeee; - border-bottom: 1px solid #ffffff; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -.muted { - color: #999999; -} - -abbr[title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 0 0 0 15px; - margin: 0 0 18px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - margin-bottom: 0; - font-size: 16px; - font-weight: 300; - line-height: 22.5px; -} - -blockquote small { - display: block; - line-height: 18px; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 18px; - font-style: normal; - line-height: 18px; -} - -small { - font-size: 100%; -} - -cite { - font-style: normal; -} - -code, -pre { - padding: 0 3px 2px; - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 12px; - color: #333333; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -code { - padding: 2px 4px; - color: #d14; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} - -pre { - display: block; - padding: 8.5px; - margin: 0 0 9px; - font-size: 12.025px; - line-height: 18px; - word-break: break-all; - word-wrap: break-word; - white-space: pre; - white-space: pre-wrap; - background-color: #f5f5f5; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -pre.prettyprint { - margin-bottom: 18px; -} - -pre code { - padding: 0; - color: inherit; - background-color: transparent; - border: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -form { - margin: 0 0 18px; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 27px; - font-size: 19.5px; - line-height: 36px; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -legend small { - font-size: 13.5px; - color: #999999; -} - -label, -input, -button, -select, -textarea { - font-size: 13px; - font-weight: normal; - line-height: 18px; -} - -input, -button, -select, -textarea { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -label { - display: block; - margin-bottom: 5px; -} - -select, -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - display: inline-block; - height: 18px; - padding: 4px; - margin-bottom: 9px; - font-size: 13px; - line-height: 18px; - color: #555555; -} - -input, -textarea { - width: 210px; -} - -textarea { - height: auto; -} - -textarea, -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"], -.uneditable-input { - background-color: #ffffff; - border: 1px solid #cccccc; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; - -moz-transition: border linear 0.2s, box-shadow linear 0.2s; - -ms-transition: border linear 0.2s, box-shadow linear 0.2s; - -o-transition: border linear 0.2s, box-shadow linear 0.2s; - transition: border linear 0.2s, box-shadow linear 0.2s; -} - -textarea:focus, -input[type="text"]:focus, -input[type="password"]:focus, -input[type="datetime"]:focus, -input[type="datetime-local"]:focus, -input[type="date"]:focus, -input[type="month"]:focus, -input[type="time"]:focus, -input[type="week"]:focus, -input[type="number"]:focus, -input[type="email"]:focus, -input[type="url"]:focus, -input[type="search"]:focus, -input[type="tel"]:focus, -input[type="color"]:focus, -.uneditable-input:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: thin dotted \9; - /* IE6-9 */ - - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -input[type="radio"], -input[type="checkbox"] { - margin: 3px 0; - *margin-top: 0; - /* IE7 */ - - line-height: normal; - cursor: pointer; -} - -input[type="submit"], -input[type="reset"], -input[type="button"], -input[type="radio"], -input[type="checkbox"] { - width: auto; -} - -.uneditable-textarea { - width: auto; - height: auto; -} - -select, -input[type="file"] { - height: 28px; - /* In IE7, the height of the select element cannot be changed by height, only font-size */ - - *margin-top: 4px; - /* For IE7, add top margin to align select with labels */ - - line-height: 28px; -} - -select { - width: 220px; - border: 1px solid #bbb; -} - -select[multiple], -select[size] { - height: auto; -} - -select:focus, -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.radio, -.checkbox { - min-height: 18px; - padding-left: 18px; -} - -.radio input[type="radio"], -.checkbox input[type="checkbox"] { - float: left; - margin-left: -18px; -} - -.controls > .radio:first-child, -.controls > .checkbox:first-child { - padding-top: 5px; -} - -.radio.inline, -.checkbox.inline { - display: inline-block; - padding-top: 5px; - margin-bottom: 0; - vertical-align: middle; -} - -.radio.inline + .radio.inline, -.checkbox.inline + .checkbox.inline { - margin-left: 10px; -} - -.input-mini { - width: 60px; -} - -.input-small { - width: 90px; -} - -.input-medium { - width: 150px; -} - -.input-large { - width: 210px; -} - -.input-xlarge { - width: 270px; -} - -.input-xxlarge { - width: 530px; -} - -input[class*="span"], -select[class*="span"], -textarea[class*="span"], -.uneditable-input[class*="span"], -.row-fluid input[class*="span"], -.row-fluid select[class*="span"], -.row-fluid textarea[class*="span"], -.row-fluid .uneditable-input[class*="span"] { - float: none; - margin-left: 0; -} - -.input-append input[class*="span"], -.input-append .uneditable-input[class*="span"], -.input-prepend input[class*="span"], -.input-prepend .uneditable-input[class*="span"], -.row-fluid .input-prepend [class*="span"], -.row-fluid .input-append [class*="span"] { - display: inline-block; -} - -input, -textarea, -.uneditable-input { - margin-left: 0; -} - -input.span12, -textarea.span12, -.uneditable-input.span12 { - width: 930px; -} - -input.span11, -textarea.span11, -.uneditable-input.span11 { - width: 850px; -} - -input.span10, -textarea.span10, -.uneditable-input.span10 { - width: 770px; -} - -input.span9, -textarea.span9, -.uneditable-input.span9 { - width: 690px; -} - -input.span8, -textarea.span8, -.uneditable-input.span8 { - width: 610px; -} - -input.span7, -textarea.span7, -.uneditable-input.span7 { - width: 530px; -} - -input.span6, -textarea.span6, -.uneditable-input.span6 { - width: 450px; -} - -input.span5, -textarea.span5, -.uneditable-input.span5 { - width: 370px; -} - -input.span4, -textarea.span4, -.uneditable-input.span4 { - width: 290px; -} - -input.span3, -textarea.span3, -.uneditable-input.span3 { - width: 210px; -} - -input.span2, -textarea.span2, -.uneditable-input.span2 { - width: 130px; -} - -input.span1, -textarea.span1, -.uneditable-input.span1 { - width: 50px; -} - -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: #eeeeee; - border-color: #ddd; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; -} - -.control-group.warning > label, -.control-group.warning .help-block, -.control-group.warning .help-inline { - color: #c09853; -} - -.control-group.warning .checkbox, -.control-group.warning .radio, -.control-group.warning input, -.control-group.warning select, -.control-group.warning textarea { - color: #c09853; - border-color: #c09853; -} - -.control-group.warning .checkbox:focus, -.control-group.warning .radio:focus, -.control-group.warning input:focus, -.control-group.warning select:focus, -.control-group.warning textarea:focus { - border-color: #a47e3c; - -webkit-box-shadow: 0 0 6px #dbc59e; - -moz-box-shadow: 0 0 6px #dbc59e; - box-shadow: 0 0 6px #dbc59e; -} - -.control-group.warning .input-prepend .add-on, -.control-group.warning .input-append .add-on { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.control-group.error > label, -.control-group.error .help-block, -.control-group.error .help-inline { - color: #b94a48; -} - -.control-group.error .checkbox, -.control-group.error .radio, -.control-group.error input, -.control-group.error select, -.control-group.error textarea { - color: #b94a48; - border-color: #b94a48; -} - -.control-group.error .checkbox:focus, -.control-group.error .radio:focus, -.control-group.error input:focus, -.control-group.error select:focus, -.control-group.error textarea:focus { - border-color: #953b39; - -webkit-box-shadow: 0 0 6px #d59392; - -moz-box-shadow: 0 0 6px #d59392; - box-shadow: 0 0 6px #d59392; -} - -.control-group.error .input-prepend .add-on, -.control-group.error .input-append .add-on { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.control-group.success > label, -.control-group.success .help-block, -.control-group.success .help-inline { - color: #468847; -} - -.control-group.success .checkbox, -.control-group.success .radio, -.control-group.success input, -.control-group.success select, -.control-group.success textarea { - color: #468847; - border-color: #468847; -} - -.control-group.success .checkbox:focus, -.control-group.success .radio:focus, -.control-group.success input:focus, -.control-group.success select:focus, -.control-group.success textarea:focus { - border-color: #356635; - -webkit-box-shadow: 0 0 6px #7aba7b; - -moz-box-shadow: 0 0 6px #7aba7b; - box-shadow: 0 0 6px #7aba7b; -} - -.control-group.success .input-prepend .add-on, -.control-group.success .input-append .add-on { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -input:focus:required:invalid, -textarea:focus:required:invalid, -select:focus:required:invalid { - color: #b94a48; - border-color: #ee5f5b; -} - -input:focus:required:invalid:focus, -textarea:focus:required:invalid:focus, -select:focus:required:invalid:focus { - border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; - box-shadow: 0 0 6px #f8b9b7; -} - -.form-actions { - padding: 17px 20px 18px; - margin-top: 18px; - margin-bottom: 18px; - background-color: #f5f5f5; - border-top: 1px solid #e5e5e5; - *zoom: 1; -} - -.form-actions:before, -.form-actions:after { - display: table; - content: ""; -} - -.form-actions:after { - clear: both; -} - -.uneditable-input { - overflow: hidden; - white-space: nowrap; - cursor: not-allowed; - background-color: #ffffff; - border-color: #eee; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -} - -:-moz-placeholder { - color: #999999; -} - -:-ms-input-placeholder { - color: #999999; -} - -::-webkit-input-placeholder { - color: #999999; -} - -.help-block, -.help-inline { - color: #555555; -} - -.help-block { - display: block; - margin-bottom: 9px; -} - -.help-inline { - display: inline-block; - *display: inline; - padding-left: 5px; - vertical-align: middle; - *zoom: 1; -} - -.input-prepend, -.input-append { - margin-bottom: 5px; -} - -.input-prepend input, -.input-append input, -.input-prepend select, -.input-append select, -.input-prepend .uneditable-input, -.input-append .uneditable-input { - position: relative; - margin-bottom: 0; - *margin-left: 0; - vertical-align: middle; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} - -.input-prepend input:focus, -.input-append input:focus, -.input-prepend select:focus, -.input-append select:focus, -.input-prepend .uneditable-input:focus, -.input-append .uneditable-input:focus { - z-index: 2; -} - -.input-prepend .uneditable-input, -.input-append .uneditable-input { - border-left-color: #ccc; -} - -.input-prepend .add-on, -.input-append .add-on { - display: inline-block; - width: auto; - height: 18px; - min-width: 16px; - padding: 4px 5px; - font-weight: normal; - line-height: 18px; - text-align: center; - text-shadow: 0 1px 0 #ffffff; - vertical-align: middle; - background-color: #eeeeee; - border: 1px solid #ccc; -} - -.input-prepend .add-on, -.input-append .add-on, -.input-prepend .btn, -.input-append .btn { - margin-left: -1px; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend .active, -.input-append .active { - background-color: #a9dba9; - border-color: #46a546; -} - -.input-prepend .add-on, -.input-prepend .btn { - margin-right: -1px; -} - -.input-prepend .add-on:first-child, -.input-prepend .btn:first-child { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} - -.input-append input, -.input-append select, -.input-append .uneditable-input { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} - -.input-append .uneditable-input { - border-right-color: #ccc; - border-left-color: #eee; -} - -.input-append .add-on:last-child, -.input-append .btn:last-child { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} - -.input-prepend.input-append input, -.input-prepend.input-append select, -.input-prepend.input-append .uneditable-input { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.input-prepend.input-append .add-on:first-child, -.input-prepend.input-append .btn:first-child { - margin-right: -1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} - -.input-prepend.input-append .add-on:last-child, -.input-prepend.input-append .btn:last-child { - margin-left: -1px; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} - -.search-query { - padding-right: 14px; - padding-right: 4px \9; - padding-left: 14px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 14px; - -moz-border-radius: 14px; - border-radius: 14px; -} - -.form-search input, -.form-inline input, -.form-horizontal input, -.form-search textarea, -.form-inline textarea, -.form-horizontal textarea, -.form-search select, -.form-inline select, -.form-horizontal select, -.form-search .help-inline, -.form-inline .help-inline, -.form-horizontal .help-inline, -.form-search .uneditable-input, -.form-inline .uneditable-input, -.form-horizontal .uneditable-input, -.form-search .input-prepend, -.form-inline .input-prepend, -.form-horizontal .input-prepend, -.form-search .input-append, -.form-inline .input-append, -.form-horizontal .input-append { - display: inline-block; - *display: inline; - margin-bottom: 0; - *zoom: 1; -} - -.form-search .hide, -.form-inline .hide, -.form-horizontal .hide { - display: none; -} - -.form-search label, -.form-inline label { - display: inline-block; -} - -.form-search .input-append, -.form-inline .input-append, -.form-search .input-prepend, -.form-inline .input-prepend { - margin-bottom: 0; -} - -.form-search .radio, -.form-search .checkbox, -.form-inline .radio, -.form-inline .checkbox { - padding-left: 0; - margin-bottom: 0; - vertical-align: middle; -} - -.form-search .radio input[type="radio"], -.form-search .checkbox input[type="checkbox"], -.form-inline .radio input[type="radio"], -.form-inline .checkbox input[type="checkbox"] { - float: left; - margin-right: 3px; - margin-left: 0; -} - -.control-group { - margin-bottom: 9px; -} - -legend + .control-group { - margin-top: 18px; - -webkit-margin-top-collapse: separate; -} - -.form-horizontal .control-group { - margin-bottom: 18px; - *zoom: 1; -} - -.form-horizontal .control-group:before, -.form-horizontal .control-group:after { - display: table; - content: ""; -} - -.form-horizontal .control-group:after { - clear: both; -} - -.form-horizontal .control-label { - float: left; - width: 140px; - padding-top: 5px; - text-align: right; -} - -.form-horizontal .controls { - *display: inline-block; - *padding-left: 20px; - margin-left: 160px; - *margin-left: 0; -} - -.form-horizontal .controls:first-child { - *padding-left: 160px; -} - -.form-horizontal .help-block { - margin-top: 9px; - margin-bottom: 0; -} - -.form-horizontal .form-actions { - padding-left: 160px; -} - -table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; -} - -.table { - width: 100%; - margin-bottom: 18px; -} - -.table th, -.table td { - padding: 8px; - line-height: 18px; - text-align: left; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table th { - font-weight: bold; -} - -.table thead th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child th, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child th, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table-condensed th, -.table-condensed td { - padding: 4px 5px; -} - -.table-bordered { - border: 1px solid #dddddd; - border-collapse: separate; - *border-collapse: collapsed; - border-left: 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.table-bordered th, -.table-bordered td { - border-left: 1px solid #dddddd; -} - -.table-bordered caption + thead tr:first-child th, -.table-bordered caption + tbody tr:first-child th, -.table-bordered caption + tbody tr:first-child td, -.table-bordered colgroup + thead tr:first-child th, -.table-bordered colgroup + tbody tr:first-child th, -.table-bordered colgroup + tbody tr:first-child td, -.table-bordered thead:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child th, -.table-bordered tbody:first-child tr:first-child td { - border-top: 0; -} - -.table-bordered thead:first-child tr:first-child th:first-child, -.table-bordered tbody:first-child tr:first-child td:first-child { - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.table-bordered thead:first-child tr:first-child th:last-child, -.table-bordered tbody:first-child tr:first-child td:last-child { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -.table-bordered thead:last-child tr:last-child th:first-child, -.table-bordered tbody:last-child tr:last-child td:first-child { - -webkit-border-radius: 0 0 0 4px; - -moz-border-radius: 0 0 0 4px; - border-radius: 0 0 0 4px; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; -} - -.table-bordered thead:last-child tr:last-child th:last-child, -.table-bordered tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.table-striped tbody tr:nth-child(odd) td, -.table-striped tbody tr:nth-child(odd) th { - background-color: #f9f9f9; -} - -.table tbody tr:hover td, -.table tbody tr:hover th { - background-color: #f5f5f5; -} - -table .span1 { - float: none; - width: 44px; - margin-left: 0; -} - -table .span2 { - float: none; - width: 124px; - margin-left: 0; -} - -table .span3 { - float: none; - width: 204px; - margin-left: 0; -} - -table .span4 { - float: none; - width: 284px; - margin-left: 0; -} - -table .span5 { - float: none; - width: 364px; - margin-left: 0; -} - -table .span6 { - float: none; - width: 444px; - margin-left: 0; -} - -table .span7 { - float: none; - width: 524px; - margin-left: 0; -} - -table .span8 { - float: none; - width: 604px; - margin-left: 0; -} - -table .span9 { - float: none; - width: 684px; - margin-left: 0; -} - -table .span10 { - float: none; - width: 764px; - margin-left: 0; -} - -table .span11 { - float: none; - width: 844px; - margin-left: 0; -} - -table .span12 { - float: none; - width: 924px; - margin-left: 0; -} - -table .span13 { - float: none; - width: 1004px; - margin-left: 0; -} - -table .span14 { - float: none; - width: 1084px; - margin-left: 0; -} - -table .span15 { - float: none; - width: 1164px; - margin-left: 0; -} - -table .span16 { - float: none; - width: 1244px; - margin-left: 0; -} - -table .span17 { - float: none; - width: 1324px; - margin-left: 0; -} - -table .span18 { - float: none; - width: 1404px; - margin-left: 0; -} - -table .span19 { - float: none; - width: 1484px; - margin-left: 0; -} - -table .span20 { - float: none; - width: 1564px; - margin-left: 0; -} - -table .span21 { - float: none; - width: 1644px; - margin-left: 0; -} - -table .span22 { - float: none; - width: 1724px; - margin-left: 0; -} - -table .span23 { - float: none; - width: 1804px; - margin-left: 0; -} - -table .span24 { - float: none; - width: 1884px; - margin-left: 0; -} - -[class^="icon-"], -[class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("/img/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -[class^="icon-"]:last-child, -[class*=" icon-"]:last-child { - *margin-left: 0; -} - -.icon-white { - background-image: url("/img/glyphicons-halflings-white.png"); -} - -.icon-glass { - background-position: 0 0; -} - -.icon-music { - background-position: -24px 0; -} - -.icon-search { - background-position: -48px 0; -} - -.icon-envelope { - background-position: -72px 0; -} - -.icon-heart { - background-position: -96px 0; -} - -.icon-star { - background-position: -120px 0; -} - -.icon-star-empty { - background-position: -144px 0; -} - -.icon-user { - background-position: -168px 0; -} - -.icon-film { - background-position: -192px 0; -} - -.icon-th-large { - background-position: -216px 0; -} - -.icon-th { - background-position: -240px 0; -} - -.icon-th-list { - background-position: -264px 0; -} - -.icon-ok { - background-position: -288px 0; -} - -.icon-remove { - background-position: -312px 0; -} - -.icon-zoom-in { - background-position: -336px 0; -} - -.icon-zoom-out { - background-position: -360px 0; -} - -.icon-off { - background-position: -384px 0; -} - -.icon-signal { - background-position: -408px 0; -} - -.icon-cog { - background-position: -432px 0; -} - -.icon-trash { - background-position: -456px 0; -} - -.icon-home { - background-position: 0 -24px; -} - -.icon-file { - background-position: -24px -24px; -} - -.icon-time { - background-position: -48px -24px; -} - -.icon-road { - background-position: -72px -24px; -} - -.icon-download-alt { - background-position: -96px -24px; -} - -.icon-download { - background-position: -120px -24px; -} - -.icon-upload { - background-position: -144px -24px; -} - -.icon-inbox { - background-position: -168px -24px; -} - -.icon-play-circle { - background-position: -192px -24px; -} - -.icon-repeat { - background-position: -216px -24px; -} - -.icon-refresh { - background-position: -240px -24px; -} - -.icon-list-alt { - background-position: -264px -24px; -} - -.icon-lock { - background-position: -287px -24px; -} - -.icon-flag { - background-position: -312px -24px; -} - -.icon-headphones { - background-position: -336px -24px; -} - -.icon-volume-off { - background-position: -360px -24px; -} - -.icon-volume-down { - background-position: -384px -24px; -} - -.icon-volume-up { - background-position: -408px -24px; -} - -.icon-qrcode { - background-position: -432px -24px; -} - -.icon-barcode { - background-position: -456px -24px; -} - -.icon-tag { - background-position: 0 -48px; -} - -.icon-tags { - background-position: -25px -48px; -} - -.icon-book { - background-position: -48px -48px; -} - -.icon-bookmark { - background-position: -72px -48px; -} - -.icon-print { - background-position: -96px -48px; -} - -.icon-camera { - background-position: -120px -48px; -} - -.icon-font { - background-position: -144px -48px; -} - -.icon-bold { - background-position: -167px -48px; -} - -.icon-italic { - background-position: -192px -48px; -} - -.icon-text-height { - background-position: -216px -48px; -} - -.icon-text-width { - background-position: -240px -48px; -} - -.icon-align-left { - background-position: -264px -48px; -} - -.icon-align-center { - background-position: -288px -48px; -} - -.icon-align-right { - background-position: -312px -48px; -} - -.icon-align-justify { - background-position: -336px -48px; -} - -.icon-list { - background-position: -360px -48px; -} - -.icon-indent-left { - background-position: -384px -48px; -} - -.icon-indent-right { - background-position: -408px -48px; -} - -.icon-facetime-video { - background-position: -432px -48px; -} - -.icon-picture { - background-position: -456px -48px; -} - -.icon-pencil { - background-position: 0 -72px; -} - -.icon-map-marker { - background-position: -24px -72px; -} - -.icon-adjust { - background-position: -48px -72px; -} - -.icon-tint { - background-position: -72px -72px; -} - -.icon-edit { - background-position: -96px -72px; -} - -.icon-share { - background-position: -120px -72px; -} - -.icon-check { - background-position: -144px -72px; -} - -.icon-move { - background-position: -168px -72px; -} - -.icon-step-backward { - background-position: -192px -72px; -} - -.icon-fast-backward { - background-position: -216px -72px; -} - -.icon-backward { - background-position: -240px -72px; -} - -.icon-play { - background-position: -264px -72px; -} - -.icon-pause { - background-position: -288px -72px; -} - -.icon-stop { - background-position: -312px -72px; -} - -.icon-forward { - background-position: -336px -72px; -} - -.icon-fast-forward { - background-position: -360px -72px; -} - -.icon-step-forward { - background-position: -384px -72px; -} - -.icon-eject { - background-position: -408px -72px; -} - -.icon-chevron-left { - background-position: -432px -72px; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-plus-sign { - background-position: 0 -96px; -} - -.icon-minus-sign { - background-position: -24px -96px; -} - -.icon-remove-sign { - background-position: -48px -96px; -} - -.icon-ok-sign { - background-position: -72px -96px; -} - -.icon-question-sign { - background-position: -96px -96px; -} - -.icon-info-sign { - background-position: -120px -96px; -} - -.icon-screenshot { - background-position: -144px -96px; -} - -.icon-remove-circle { - background-position: -168px -96px; -} - -.icon-ok-circle { - background-position: -192px -96px; -} - -.icon-ban-circle { - background-position: -216px -96px; -} - -.icon-arrow-left { - background-position: -240px -96px; -} - -.icon-arrow-right { - background-position: -264px -96px; -} - -.icon-arrow-up { - background-position: -289px -96px; -} - -.icon-arrow-down { - background-position: -312px -96px; -} - -.icon-share-alt { - background-position: -336px -96px; -} - -.icon-resize-full { - background-position: -360px -96px; -} - -.icon-resize-small { - background-position: -384px -96px; -} - -.icon-plus { - background-position: -408px -96px; -} - -.icon-minus { - background-position: -433px -96px; -} - -.icon-asterisk { - background-position: -456px -96px; -} - -.icon-exclamation-sign { - background-position: 0 -120px; -} - -.icon-gift { - background-position: -24px -120px; -} - -.icon-leaf { - background-position: -48px -120px; -} - -.icon-fire { - background-position: -72px -120px; -} - -.icon-eye-open { - background-position: -96px -120px; -} - -.icon-eye-close { - background-position: -120px -120px; -} - -.icon-warning-sign { - background-position: -144px -120px; -} - -.icon-plane { - background-position: -168px -120px; -} - -.icon-calendar { - background-position: -192px -120px; -} - -.icon-random { - background-position: -216px -120px; -} - -.icon-comment { - background-position: -240px -120px; -} - -.icon-magnet { - background-position: -264px -120px; -} - -.icon-chevron-up { - background-position: -288px -120px; -} - -.icon-chevron-down { - background-position: -313px -119px; -} - -.icon-retweet { - background-position: -336px -120px; -} - -.icon-shopping-cart { - background-position: -360px -120px; -} - -.icon-folder-close { - background-position: -384px -120px; -} - -.icon-folder-open { - background-position: -408px -120px; -} - -.icon-resize-vertical { - background-position: -432px -119px; -} - -.icon-resize-horizontal { - background-position: -456px -118px; -} - -.icon-hdd { - background-position: 0 -144px; -} - -.icon-bullhorn { - background-position: -24px -144px; -} - -.icon-bell { - background-position: -48px -144px; -} - -.icon-certificate { - background-position: -72px -144px; -} - -.icon-thumbs-up { - background-position: -96px -144px; -} - -.icon-thumbs-down { - background-position: -120px -144px; -} - -.icon-hand-right { - background-position: -144px -144px; -} - -.icon-hand-left { - background-position: -168px -144px; -} - -.icon-hand-up { - background-position: -192px -144px; -} - -.icon-hand-down { - background-position: -216px -144px; -} - -.icon-circle-arrow-right { - background-position: -240px -144px; -} - -.icon-circle-arrow-left { - background-position: -264px -144px; -} - -.icon-circle-arrow-up { - background-position: -288px -144px; -} - -.icon-circle-arrow-down { - background-position: -312px -144px; -} - -.icon-globe { - background-position: -336px -144px; -} - -.icon-wrench { - background-position: -360px -144px; -} - -.icon-tasks { - background-position: -384px -144px; -} - -.icon-filter { - background-position: -408px -144px; -} - -.icon-briefcase { - background-position: -432px -144px; -} - -.icon-fullscreen { - background-position: -456px -144px; -} - -.dropup, -.dropdown { - position: relative; -} - -.dropdown-toggle { - *margin-bottom: -3px; -} - -.dropdown-toggle:active, -.open .dropdown-toggle { - outline: 0; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; - opacity: 0.3; - filter: alpha(opacity=30); -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown:hover .caret, -.open .caret { - opacity: 1; - filter: alpha(opacity=100); -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 4px 0; - margin: 1px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - *width: 100%; - height: 1px; - margin: 8px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.dropdown-menu a { - display: block; - padding: 3px 15px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu li > a:hover, -.dropdown-menu > a.here, -.dropdown-menu > a.here:hover { - color: #ffffff; - text-decoration: none; - background-color: #0088cc; -} - -.open { - *z-index: 1000; -} - -.open > .dropdown-menu { - display: block; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: "\2191"; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.typeahead { - margin-top: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #eee; - border: 1px solid rgba(0, 0, 0, 0.05); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -ms-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -ms-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.collapse.in { - height: auto; -} - -.close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 18px; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.btn { - display: inline-block; - *display: inline; - padding: 4px 10px 4px; - margin-bottom: 0; - *margin-left: .3em; - font-size: 13px; - line-height: 18px; - *line-height: 20px; - color: #333333; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - cursor: pointer; - background-color: #f5f5f5; - *background-color: #e6e6e6; - background-image: -ms-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: linear-gradient(top, #ffffff, #e6e6e6); - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border: 1px solid #cccccc; - *border: 0; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-bottom-color: #b3b3b3; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); - *zoom: 1; - -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); -} - -.btn:hover, -.btn:active, -.btn.active, -.btn.disabled, -.btn[disabled] { - background-color: #e6e6e6; - *background-color: #d9d9d9; -} - -.btn:active, -.btn.active { - background-color: #cccccc \9; -} - -.btn:first-child { - *margin-left: 0; -} - -.btn:hover { - color: #333333; - text-decoration: none; - background-color: #e6e6e6; - *background-color: #d9d9d9; - /* Buttons in IE7 don't get borders, so darken on hover */ - - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -ms-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn.active, -.btn:active { - background-color: #e6e6e6; - background-color: #d9d9d9 \9; - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn.disabled, -.btn[disabled] { - cursor: default; - background-color: #e6e6e6; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.btn-large { - padding: 9px 14px; - font-size: 15px; - line-height: normal; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.btn-large [class^="icon-"] { - margin-top: 1px; -} - -.btn-small { - padding: 5px 9px; - font-size: 11px; - line-height: 16px; -} - -.btn-small [class^="icon-"] { - margin-top: -1px; -} - -.btn-mini { - padding: 2px 6px; - font-size: 11px; - line-height: 14px; -} - -.btn-primary, -.btn-primary:hover, -.btn-warning, -.btn-warning:hover, -.btn-danger, -.btn-danger:hover, -.btn-success, -.btn-success:hover, -.btn-info, -.btn-info:hover, -.btn-inverse, -.btn-inverse:hover { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-primary.active, -.btn-warning.active, -.btn-danger.active, -.btn-success.active, -.btn-info.active, -.btn-inverse.active { - color: rgba(255, 255, 255, 0.75); -} - -.btn { - border-color: #ccc; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); -} - -.btn-primary { - background-color: #0074cc; - *background-color: #0055cc; - background-image: -ms-linear-gradient(top, #0088cc, #0055cc); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc)); - background-image: -webkit-linear-gradient(top, #0088cc, #0055cc); - background-image: -o-linear-gradient(top, #0088cc, #0055cc); - background-image: -moz-linear-gradient(top, #0088cc, #0055cc); - background-image: linear-gradient(top, #0088cc, #0055cc); - background-repeat: repeat-x; - border-color: #0055cc #0055cc #003580; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:active, -.btn-primary.active, -.btn-primary.disabled, -.btn-primary[disabled] { - background-color: #0055cc; - *background-color: #004ab3; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #004099 \9; -} - -.btn-warning { - background-color: #faa732; - *background-color: #f89406; - background-image: -ms-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(top, #fbb450, #f89406); - background-repeat: repeat-x; - border-color: #f89406 #f89406 #ad6704; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:active, -.btn-warning.active, -.btn-warning.disabled, -.btn-warning[disabled] { - background-color: #f89406; - *background-color: #df8505; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #c67605 \9; -} - -.btn-danger { - background-color: #da4f49; - *background-color: #bd362f; - background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); - background-image: linear-gradient(top, #ee5f5b, #bd362f); - background-repeat: repeat-x; - border-color: #bd362f #bd362f #802420; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:active, -.btn-danger.active, -.btn-danger.disabled, -.btn-danger[disabled] { - background-color: #bd362f; - *background-color: #a9302a; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #942a25 \9; -} - -.btn-success { - background-color: #5bb75b; - *background-color: #51a351; - background-image: -ms-linear-gradient(top, #62c462, #51a351); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); - background-image: -webkit-linear-gradient(top, #62c462, #51a351); - background-image: -o-linear-gradient(top, #62c462, #51a351); - background-image: -moz-linear-gradient(top, #62c462, #51a351); - background-image: linear-gradient(top, #62c462, #51a351); - background-repeat: repeat-x; - border-color: #51a351 #51a351 #387038; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:active, -.btn-success.active, -.btn-success.disabled, -.btn-success[disabled] { - background-color: #51a351; - *background-color: #499249; -} - -.btn-success:active, -.btn-success.active { - background-color: #408140 \9; -} - -.btn-info { - background-color: #49afcd; - *background-color: #2f96b4; - background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); - background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); - background-image: linear-gradient(top, #5bc0de, #2f96b4); - background-repeat: repeat-x; - border-color: #2f96b4 #2f96b4 #1f6377; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:active, -.btn-info.active, -.btn-info.disabled, -.btn-info[disabled] { - background-color: #2f96b4; - *background-color: #2a85a0; -} - -.btn-info:active, -.btn-info.active { - background-color: #24748c \9; -} - -.btn-inverse { - background-color: #414141; - *background-color: #222222; - background-image: -ms-linear-gradient(top, #555555, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222)); - background-image: -webkit-linear-gradient(top, #555555, #222222); - background-image: -o-linear-gradient(top, #555555, #222222); - background-image: -moz-linear-gradient(top, #555555, #222222); - background-image: linear-gradient(top, #555555, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); -} - -.btn-inverse:hover, -.btn-inverse:active, -.btn-inverse.active, -.btn-inverse.disabled, -.btn-inverse[disabled] { - background-color: #222222; - *background-color: #151515; -} - -.btn-inverse:active, -.btn-inverse.active { - background-color: #080808 \9; -} - -button.btn, -input[type="submit"].btn { - *padding-top: 2px; - *padding-bottom: 2px; -} - -button.btn::-moz-focus-inner, -input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; -} - -button.btn.btn-large, -input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; -} - -button.btn.btn-small, -input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; -} - -button.btn.btn-mini, -input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; -} - -.btn-group { - position: relative; - *margin-left: .3em; - *zoom: 1; -} - -.btn-group:before, -.btn-group:after { - display: table; - content: ""; -} - -.btn-group:after { - clear: both; -} - -.btn-group:first-child { - *margin-left: 0; -} - -.btn-group + .btn-group { - margin-left: 5px; -} - -.btn-toolbar { - margin-top: 9px; - margin-bottom: 9px; -} - -.btn-toolbar .btn-group { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-group > .btn { - position: relative; - float: left; - margin-left: -1px; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-topleft: 4px; -} - -.btn-group > .btn:last-child, -.btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; -} - -.btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -webkit-border-top-left-radius: 6px; - border-top-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - -moz-border-radius-topleft: 6px; -} - -.btn-group > .btn.large:last-child, -.btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; -} - -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active { - z-index: 2; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .dropdown-toggle { - *padding-top: 4px; - padding-right: 8px; - *padding-bottom: 4px; - padding-left: 8px; - -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group > .btn-mini.dropdown-toggle { - padding-right: 5px; - padding-left: 5px; -} - -.btn-group > .btn-small.dropdown-toggle { - *padding-top: 4px; - *padding-bottom: 4px; -} - -.btn-group > .btn-large.dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; -} - -.btn-group.open .btn-primary.dropdown-toggle { - background-color: #0055cc; -} - -.btn-group.open .btn-warning.dropdown-toggle { - background-color: #f89406; -} - -.btn-group.open .btn-danger.dropdown-toggle { - background-color: #bd362f; -} - -.btn-group.open .btn-success.dropdown-toggle { - background-color: #51a351; -} - -.btn-group.open .btn-info.dropdown-toggle { - background-color: #2f96b4; -} - -.btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222222; -} - -.btn .caret { - margin-top: 7px; - margin-left: 0; -} - -.btn:hover .caret, -.open.btn-group .caret { - opacity: 1; - filter: alpha(opacity=100); -} - -.btn-mini .caret { - margin-top: 5px; -} - -.btn-small .caret { - margin-top: 6px; -} - -.btn-large .caret { - margin-top: 6px; - border-top-width: 5px; - border-right-width: 5px; - border-left-width: 5px; -} - -.dropup .btn-large .caret { - border-top: 0; - border-bottom: 5px solid #000000; -} - -.btn-primary .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret, -.btn-success .caret, -.btn-inverse .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 0.75; - filter: alpha(opacity=75); -} - -.alert { - padding: 8px 35px 8px 14px; - margin-bottom: 18px; - color: #c09853; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #fcf8e3; - border: 1px solid #fbeed5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.alert-heading { - color: inherit; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - line-height: 18px; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-danger, -.alert-error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-block { - padding-top: 14px; - padding-bottom: 14px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.nav { - margin-bottom: 18px; - margin-left: 0; - list-style: none; -} - -.nav > li > a { - display: block; -} - -.nav > li > a:hover { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > .pull-right { - float: right; -} - -.nav .nav-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 18px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} - -.nav li + .nav-header { - margin-top: 9px; -} - -.nav-list { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 0; -} - -.nav-list > li > a, -.nav-list .nav-header { - margin-right: -15px; - margin-left: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} - -.nav-list > li > a { - padding: 3px 15px; -} - -.nav-list > .active > a, -.nav-list > .active > a:hover { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} - -.nav-list [class^="icon-"] { - margin-right: 2px; -} - -.nav-list .divider { - *width: 100%; - height: 1px; - margin: 8px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} - -.nav-tabs, -.nav-pills { - *zoom: 1; -} - -.nav-tabs:before, -.nav-pills:before, -.nav-tabs:after, -.nav-pills:after { - display: table; - content: ""; -} - -.nav-tabs:after, -.nav-pills:after { - clear: both; -} - -.nav-tabs > li, -.nav-pills > li { - float: left; -} - -.nav-tabs > li > a, -.nav-pills > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} - -.nav-tabs { - border-bottom: 1px solid #ddd; -} - -.nav-tabs > li { - margin-bottom: -1px; -} - -.nav-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 18px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > .active > a, -.nav-tabs > .active > a:hover { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -.nav-pills > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.nav-pills > .active > a, -.nav-pills > .active > a:hover { - color: #ffffff; - background-color: #0088cc; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li > a { - margin-right: 0; -} - -.nav-tabs.nav-stacked { - border-bottom: 0; -} - -.nav-tabs.nav-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.nav-tabs.nav-stacked > li:first-child > a { - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} - -.nav-tabs.nav-stacked > li:last-child > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.nav-tabs.nav-stacked > li > a:hover { - z-index: 2; - border-color: #ddd; -} - -.nav-pills.nav-stacked > li > a { - margin-bottom: 3px; -} - -.nav-pills.nav-stacked > li:last-child > a { - margin-bottom: 1px; -} - -.nav-tabs .dropdown-menu { - -webkit-border-radius: 0 0 5px 5px; - -moz-border-radius: 0 0 5px 5px; - border-radius: 0 0 5px 5px; -} - -.nav-pills .dropdown-menu { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.nav-tabs .dropdown-toggle .caret, -.nav-pills .dropdown-toggle .caret { - margin-top: 6px; - border-top-color: #0088cc; - border-bottom-color: #0088cc; -} - -.nav-tabs .dropdown-toggle:hover .caret, -.nav-pills .dropdown-toggle:hover .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} - -.nav-tabs .active .dropdown-toggle .caret, -.nav-pills .active .dropdown-toggle .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.nav > .dropdown.active > a:hover { - color: #000000; - cursor: pointer; -} - -.nav-tabs .open .dropdown-toggle, -.nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} - -.nav li.dropdown.open .caret, -.nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} - -.tabs-stacked .open > a:hover { - border-color: #999999; -} - -.tabbable { - *zoom: 1; -} - -.tabbable:before, -.tabbable:after { - display: table; - content: ""; -} - -.tabbable:after { - clear: both; -} - -.tab-content { - overflow: auto; -} - -.tabs-below > .nav-tabs, -.tabs-right > .nav-tabs, -.tabs-left > .nav-tabs { - border-bottom: 0; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.tabs-below > .nav-tabs { - border-top: 1px solid #ddd; -} - -.tabs-below > .nav-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} - -.tabs-below > .nav-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.tabs-below > .nav-tabs > li > a:hover { - border-top-color: #ddd; - border-bottom-color: transparent; -} - -.tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover { - border-color: transparent #ddd #ddd #ddd; -} - -.tabs-left > .nav-tabs > li, -.tabs-right > .nav-tabs > li { - float: none; -} - -.tabs-left > .nav-tabs > li > a, -.tabs-right > .nav-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} - -.tabs-left > .nav-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} - -.tabs-left > .nav-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} - -.tabs-left > .nav-tabs > li > a:hover { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} - -.tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} - -.tabs-right > .nav-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} - -.tabs-right > .nav-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} - -.tabs-right > .nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} - -.tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} - -.navbar { - *position: relative; - *z-index: 2; - margin-bottom: 18px; - overflow: visible; -} - -.navbar-inner { - min-height: 40px; - padding-right: 20px; - padding-left: 20px; - background-color: #2c2c2c; - background-image: -moz-linear-gradient(top, #333333, #222222); - background-image: -ms-linear-gradient(top, #333333, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); - background-image: -webkit-linear-gradient(top, #333333, #222222); - background-image: -o-linear-gradient(top, #333333, #222222); - background-image: linear-gradient(top, #333333, #222222); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); -} - -.navbar .container { - width: auto; -} - -.nav-collapse.collapse { - height: auto; -} - -.navbar { - color: #999999; -} - -.navbar .brand:hover { - text-decoration: none; -} - -.navbar .brand { - display: block; - float: left; - padding: 8px 20px 12px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - line-height: 1; - color: #999999; -} - -.navbar .navbar-text { - margin-bottom: 0; - line-height: 40px; -} - -.navbar .navbar-link { - color: #999999; -} - -.navbar .navbar-link:hover { - color: #ffffff; -} - -.navbar .btn, -.navbar .btn-group { - margin-top: 5px; -} - -.navbar .btn-group .btn { - margin: 0; -} - -.navbar-form { - margin-bottom: 0; - *zoom: 1; -} - -.navbar-form:before, -.navbar-form:after { - display: table; - content: ""; -} - -.navbar-form:after { - clear: both; -} - -.navbar-form input, -.navbar-form select, -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 5px; -} - -.navbar-form input, -.navbar-form select { - display: inline-block; - margin-bottom: 0; -} - -.navbar-form input[type="image"], -.navbar-form input[type="checkbox"], -.navbar-form input[type="radio"] { - margin-top: 3px; -} - -.navbar-form .input-append, -.navbar-form .input-prepend { - margin-top: 6px; - white-space: nowrap; -} - -.navbar-form .input-append input, -.navbar-form .input-prepend input { - margin-top: 0; -} - -.navbar-search { - position: relative; - float: left; - margin-top: 6px; - margin-bottom: 0; -} - -.navbar-search .search-query { - padding: 4px 9px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: normal; - line-height: 1; - color: #ffffff; - background-color: #626262; - border: 1px solid #151515; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); - -webkit-transition: none; - -moz-transition: none; - -ms-transition: none; - -o-transition: none; - transition: none; -} - -.navbar-search .search-query:-moz-placeholder { - color: #cccccc; -} - -.navbar-search .search-query:-ms-input-placeholder { - color: #cccccc; -} - -.navbar-search .search-query::-webkit-input-placeholder { - color: #cccccc; -} - -.navbar-search .search-query:focus, -.navbar-search .search-query.focused { - padding: 5px 10px; - color: #333333; - text-shadow: 0 1px 0 #ffffff; - background-color: #ffffff; - border: 0; - outline: 0; - -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - margin-bottom: 0; -} - -.navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner { - padding-right: 0; - padding-left: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-bottom { - bottom: 0; -} - -.navbar .nav { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} - -.navbar .nav.pull-right { - float: right; -} - -.navbar .nav > li { - display: block; - float: left; -} - -.navbar .nav > li > a { - float: none; - padding: 9px 10px 11px; - line-height: 19px; - color: #999999; - text-decoration: none; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar .btn { - display: inline-block; - padding: 4px 10px 4px; - margin: 5px 5px 6px; - line-height: 18px; -} - -.navbar .btn-group { - padding: 5px 5px 6px; - margin: 0; -} - -.navbar .nav > li > a:hover { - color: #ffffff; - text-decoration: none; - background-color: transparent; -} - -.navbar .nav .active > a, -.navbar .nav .active > a:hover { - color: #ffffff; - text-decoration: none; - background-color: #222222; -} - -.navbar .divider-vertical { - width: 1px; - height: 40px; - margin: 0 9px; - overflow: hidden; - background-color: #222222; - border-right: 1px solid #333333; -} - -.navbar .nav.pull-right { - margin-right: 0; - margin-left: 10px; -} - -.navbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-right: 5px; - margin-left: 5px; - background-color: #2c2c2c; - *background-color: #222222; - background-image: -ms-linear-gradient(top, #333333, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); - background-image: -webkit-linear-gradient(top, #333333, #222222); - background-image: -o-linear-gradient(top, #333333, #222222); - background-image: linear-gradient(top, #333333, #222222); - background-image: -moz-linear-gradient(top, #333333, #222222); - background-repeat: repeat-x; - border-color: #222222 #222222 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} - -.navbar .btn-navbar:hover, -.navbar .btn-navbar:active, -.navbar .btn-navbar.active, -.navbar .btn-navbar.disabled, -.navbar .btn-navbar[disabled] { - background-color: #222222; - *background-color: #151515; -} - -.navbar .btn-navbar:active, -.navbar .btn-navbar.active { - background-color: #080808 \9; -} - -.navbar .btn-navbar .icon-bar { - display: block; - width: 18px; - height: 2px; - background-color: #f5f5f5; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -} - -.btn-navbar .icon-bar + .icon-bar { - margin-top: 3px; -} - -.navbar .dropdown-menu:before { - position: absolute; - top: -7px; - left: 9px; - display: inline-block; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-left: 7px solid transparent; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.navbar .dropdown-menu:after { - position: absolute; - top: -6px; - left: 10px; - display: inline-block; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - border-left: 6px solid transparent; - content: ''; -} - -.navbar-fixed-bottom .dropdown-menu:before { - top: auto; - bottom: -7px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.navbar-fixed-bottom .dropdown-menu:after { - top: auto; - bottom: -6px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.navbar .nav li.dropdown .dropdown-toggle .caret, -.navbar .nav li.dropdown.open .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar .nav li.dropdown.active .caret { - opacity: 1; - filter: alpha(opacity=100); -} - -.navbar .nav li.dropdown.open > .dropdown-toggle, -.navbar .nav li.dropdown.active > .dropdown-toggle, -.navbar .nav li.dropdown.open.active > .dropdown-toggle { - background-color: transparent; -} - -.navbar .nav li.dropdown.active > .dropdown-toggle:hover { - color: #ffffff; -} - -.navbar .pull-right .dropdown-menu, -.navbar .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar .pull-right .dropdown-menu:before, -.navbar .dropdown-menu.pull-right:before { - right: 12px; - left: auto; -} - -.navbar .pull-right .dropdown-menu:after, -.navbar .dropdown-menu.pull-right:after { - right: 13px; - left: auto; -} - -.breadcrumb { - padding: 7px 14px; - margin: 0 0 18px; - list-style: none; - background-color: #fbfbfb; - background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); - background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); - background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); - background-image: linear-gradient(top, #ffffff, #f5f5f5); - background-repeat: repeat-x; - border: 1px solid #ddd; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.breadcrumb li { - display: inline-block; - *display: inline; - text-shadow: 0 1px 0 #ffffff; - *zoom: 1; -} - -.breadcrumb .divider { - padding: 0 5px; - color: #999999; -} - -.breadcrumb .active a { - color: #333333; -} - -.pagination { - height: 36px; - margin: 18px 0; -} - -.pagination ul { - display: inline-block; - *display: inline; - margin-bottom: 0; - margin-left: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - *zoom: 1; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.pagination li { - display: inline; -} - -.pagination a { - float: left; - padding: 0 14px; - line-height: 34px; - text-decoration: none; - border: 1px solid #ddd; - border-left-width: 0; -} - -.pagination a:hover, -.pagination .active a { - background-color: #f5f5f5; -} - -.pagination .active a { - color: #999999; - cursor: default; -} - -.pagination .disabled span, -.pagination .disabled a, -.pagination .disabled a:hover { - color: #999999; - cursor: default; - background-color: transparent; -} - -.pagination li:first-child a { - border-left-width: 1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; -} - -.pagination li:last-child a { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; -} - -.pagination-centered { - text-align: center; -} - -.pagination-right { - text-align: right; -} - -.pager { - margin-bottom: 18px; - margin-left: 0; - text-align: center; - list-style: none; - *zoom: 1; -} - -.pager:before, -.pager:after { - display: table; - content: ""; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager a { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; -} - -.pager a:hover { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next a { - float: right; -} - -.pager .previous a { - float: left; -} - -.pager .disabled a, -.pager .disabled a:hover { - color: #999999; - cursor: default; - background-color: #fff; -} - -.modal-open .dropdown-menu { - z-index: 2050; -} - -.modal-open .dropdown.open { - *z-index: 2050; -} - -.modal-open .popover { - z-index: 2060; -} - -.modal-open .tooltip { - z-index: 2070; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.modal { - position: fixed; - top: 50%; - left: 50%; - z-index: 1050; - width: 560px; - margin: -250px 0 0 -280px; - overflow: auto; - background-color: #ffffff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.modal.fade { - top: -25%; - -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; - -moz-transition: opacity 0.3s linear, top 0.3s ease-out; - -ms-transition: opacity 0.3s linear, top 0.3s ease-out; - -o-transition: opacity 0.3s linear, top 0.3s ease-out; - transition: opacity 0.3s linear, top 0.3s ease-out; -} - -.modal.fade.in { - top: 50%; -} - -.modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; -} - -.modal-header .close { - margin-top: 2px; -} - -.modal-body { - max-height: 400px; - padding: 15px; - overflow-y: auto; -} - -.modal-form { - margin-bottom: 0; -} - -.modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - *zoom: 1; - -webkit-box-shadow: inset 0 1px 0 #ffffff; - -moz-box-shadow: inset 0 1px 0 #ffffff; - box-shadow: inset 0 1px 0 #ffffff; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - content: ""; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.tooltip { - position: absolute; - z-index: 1020; - display: block; - padding: 5px; - font-size: 11px; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.8; - filter: alpha(opacity=80); -} - -.tooltip.top { - margin-top: -2px; -} - -.tooltip.right { - margin-left: 2px; -} - -.tooltip.bottom { - margin-top: 2px; -} - -.tooltip.left { - margin-left: -2px; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top: 5px solid #000000; - border-right: 5px solid transparent; - border-left: 5px solid transparent; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-left: 5px solid #000000; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-right: 5px solid transparent; - border-bottom: 5px solid #000000; - border-left: 5px solid transparent; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-right: 5px solid #000000; - border-bottom: 5px solid transparent; -} - -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - padding: 5px; -} - -.popover.top { - margin-top: -5px; -} - -.popover.right { - margin-left: 5px; -} - -.popover.bottom { - margin-top: 5px; -} - -.popover.left { - margin-left: -5px; -} - -.popover.top .arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top: 5px solid #000000; - border-right: 5px solid transparent; - border-left: 5px solid transparent; -} - -.popover.right .arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-right: 5px solid #000000; - border-bottom: 5px solid transparent; -} - -.popover.bottom .arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-right: 5px solid transparent; - border-bottom: 5px solid #000000; - border-left: 5px solid transparent; -} - -.popover.left .arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-top: 5px solid transparent; - border-bottom: 5px solid transparent; - border-left: 5px solid #000000; -} - -.popover .arrow { - position: absolute; - width: 0; - height: 0; -} - -.popover-inner { - width: 280px; - padding: 3px; - overflow: hidden; - background: #000000; - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -} - -.popover-title { - padding: 9px 15px; - line-height: 1; - background-color: #f5f5f5; - border-bottom: 1px solid #eee; - -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; -} - -.popover-content { - padding: 14px; - background-color: #ffffff; - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - -.popover-content p, -.popover-content ul, -.popover-content ol { - margin-bottom: 0; -} - -.thumbnails { - margin-left: -20px; - list-style: none; - *zoom: 1; -} - -.thumbnails:before, -.thumbnails:after { - display: table; - content: ""; -} - -.thumbnails:after { - clear: both; -} - -.row-fluid .thumbnails { - margin-left: 0; -} - -.thumbnails > li { - float: left; - margin-bottom: 18px; - margin-left: 20px; -} - -.thumbnail { - display: block; - padding: 4px; - line-height: 1; - border: 1px solid #ddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); -} - -a.thumbnail:hover { - border-color: #0088cc; - -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); - box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -} - -.thumbnail > img { - display: block; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; -} - -.label, -.badge { - font-size: 10.998px; - font-weight: bold; - line-height: 14px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; -} - -.label { - padding: 1px 4px 2px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.badge { - padding: 1px 9px 2px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; - border-radius: 9px; -} - -a.label:hover, -a.badge:hover { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label-important, -.badge-important { - background-color: #b94a48; -} - -.label-important[href], -.badge-important[href] { - background-color: #953b39; -} - -.label-warning, -.badge-warning { - background-color: #f89406; -} - -.label-warning[href], -.badge-warning[href] { - background-color: #c67605; -} - -.label-success, -.badge-success { - background-color: #468847; -} - -.label-success[href], -.badge-success[href] { - background-color: #356635; -} - -.label-info, -.badge-info { - background-color: #3a87ad; -} - -.label-info[href], -.badge-info[href] { - background-color: #2d6987; -} - -.label-inverse, -.badge-inverse { - background-color: #333333; -} - -.label-inverse[href], -.badge-inverse[href] { - background-color: #1a1a1a; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 18px; - margin-bottom: 18px; - overflow: hidden; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); - background-image: linear-gradient(top, #f5f5f5, #f9f9f9); - background-repeat: repeat-x; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0); - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress .bar { - width: 0; - height: 18px; - font-size: 12px; - color: #ffffff; - text-align: center; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #0e90d2; - background-image: -moz-linear-gradient(top, #149bdf, #0480be); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); - background-image: -webkit-linear-gradient(top, #149bdf, #0480be); - background-image: -o-linear-gradient(top, #149bdf, #0480be); - background-image: linear-gradient(top, #149bdf, #0480be); - background-image: -ms-linear-gradient(top, #149bdf, #0480be); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0); - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: width 0.6s ease; - -moz-transition: width 0.6s ease; - -ms-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress-striped .bar { - background-color: #149bdf; - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - -moz-background-size: 40px 40px; - -o-background-size: 40px 40px; - background-size: 40px 40px; -} - -.progress.active .bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-danger .bar { - background-color: #dd514c; - background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); - background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); - background-image: linear-gradient(top, #ee5f5b, #c43c35); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); -} - -.progress-danger.progress-striped .bar { - background-color: #ee5f5b; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-success .bar { - background-color: #5eb95e; - background-image: -moz-linear-gradient(top, #62c462, #57a957); - background-image: -ms-linear-gradient(top, #62c462, #57a957); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); - background-image: -webkit-linear-gradient(top, #62c462, #57a957); - background-image: -o-linear-gradient(top, #62c462, #57a957); - background-image: linear-gradient(top, #62c462, #57a957); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); -} - -.progress-success.progress-striped .bar { - background-color: #62c462; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-info .bar { - background-color: #4bb1cf; - background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); - background-image: -ms-linear-gradient(top, #5bc0de, #339bb9); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); - background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); - background-image: -o-linear-gradient(top, #5bc0de, #339bb9); - background-image: linear-gradient(top, #5bc0de, #339bb9); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0); -} - -.progress-info.progress-striped .bar { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-warning .bar { - background-color: #faa732; - background-image: -moz-linear-gradient(top, #fbb450, #f89406); - background-image: -ms-linear-gradient(top, #fbb450, #f89406); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); - background-image: -webkit-linear-gradient(top, #fbb450, #f89406); - background-image: -o-linear-gradient(top, #fbb450, #f89406); - background-image: linear-gradient(top, #fbb450, #f89406); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); -} - -.progress-warning.progress-striped .bar { - background-color: #fbb450; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 18px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; -} - -.accordion-toggle { - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; - margin-bottom: 18px; - line-height: 1; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - -moz-transition: 0.6s ease-in-out left; - -ms-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel .item > img { - display: block; - line-height: 1; -} - -.carousel .active, -.carousel .next, -.carousel .prev { - display: block; -} - -.carousel .active { - left: 0; -} - -.carousel .next, -.carousel .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel .next { - left: 100%; -} - -.carousel .prev { - left: -100%; -} - -.carousel .next.left, -.carousel .prev.right { - left: 0; -} - -.carousel .active.left { - left: -100%; -} - -.carousel .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 40%; - left: 15px; - width: 40px; - height: 40px; - margin-top: -20px; - font-size: 60px; - font-weight: 100; - line-height: 30px; - color: #ffffff; - text-align: center; - background: #222222; - border: 3px solid #ffffff; - -webkit-border-radius: 23px; - -moz-border-radius: 23px; - border-radius: 23px; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.right { - right: 15px; - left: auto; -} - -.carousel-control:hover { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-caption { - position: absolute; - right: 0; - bottom: 0; - left: 0; - padding: 10px 15px 5px; - background: #333333; - background: rgba(0, 0, 0, 0.75); -} - -.carousel-caption h4, -.carousel-caption p { - color: #ffffff; -} - -.hero-unit { - padding: 60px; - margin-bottom: 30px; - background-color: #eeeeee; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -.hero-unit h1 { - margin-bottom: 0; - font-size: 60px; - line-height: 1; - letter-spacing: -1px; - color: inherit; -} - -.hero-unit p { - font-size: 18px; - font-weight: 200; - line-height: 27px; - color: inherit; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none; -} - -.show { - display: block; -} - -.invisible { - visibility: hidden; -} diff --git a/demo/public/css/common.scss b/demo/public/css/common.scss new file mode 100644 index 000000000..852416bbf --- /dev/null +++ b/demo/public/css/common.scss @@ -0,0 +1,195 @@ +/* + * Common SCSS File - SCSS v1.0 + * last edited 02/17/12 + * @author Justin Stollsteimer - Fusionbox, Inc. + * http://www.fusionbox.com + * + * + * Lists: Line + * HR: Line + * Table: Line + * Form Elements: Line + * + */ + +/* SASS Mixins +--------------------------------------------------*/ + +@mixin shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + box-shadow: $left $top $blur $color; + -o-box-shadow: $left $top $blur $color; + -ms-box-shadow: $left $top $blur $color; + -moz-box-shadow: $left $top $blur $color; + -webkit-box-shadow: $left $top $blur $color; +} + +@mixin inset-shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + box-shadow: inset $left $top $blur $color; + -o-box-shadow: inset $left $top $blur $color; + -ms-box-shadow: inset $left $top $blur $color; + -moz-box-shadow: inset $left $top $blur $color; + -webkit-box-shadow: inset $left $top $blur $color; +} + +@mixin multi-shadow($shadow) { + box-shadow: #{$shadow}; + -o-box-shadow: #{$shadow}; + -ms-box-shadow: #{$shadow}; + -moz-box-shadow: #{$shadow}; + -webkit-box-shadow: #{$shadow}; +} + +@mixin text-shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + text-shadow: $left $top $blur $color; + -o-text-shadow: $left $top $blur $color; + -moz-text-shadow: $left $top $blur $color; + -webkit-text-shadow: $left $top $blur $color; +} + +@mixin rounded($radius) { + border-radius: $radius; + -o-border-radius: $radius; + -ms-border-radius: $radius; + -moz-border-radius: $radius; + -webkit-border-radius: $radius; +} + +@mixin gradient($bottom,$top) { + background-color: $bottom; + background-image: -o-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -ms-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -moz-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.01, $bottom), color-stop(1.00, $top)); +} + +@mixin transition($basic: all 0.25s ease 0s) { + transition: $basic; + -o-transition: $basic; + -ms-transition: $basic; + -moz-transition: $basic; + -webkit-transition: $basic; +} + +@mixin transform($transformation) +{ + transform: #{$transformation}; + -o-transform: #{$transformation}; + -ms-transform: #{$transformation}; + -moz-transform: #{$transformation}; + -webkit-transform: #{$transformation}; +} + +@mixin transform-origin($transformationorigin) +{ + transform-origin: #{$transformationorigin}; + -o-transform-origin: #{$transformationorigin}; + -ms-transform-origin: #{$transformationorigin}; + -moz-transform-origin: #{$transformationorigin}; + -webkit-transform-origin: #{$transformationorigin}; +} + +@mixin default { + display: inline; + float: left; + height: auto; + width: 100%; +} + +@mixin clearfix { + &:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + * html & { height: 1px } +} + +@mixin wrapper { + display: block; + height: auto; + min-width: 960px; + position: relative; + width: 100%; + z-index: 1; +} + +@mixin inner { + display: block; + margin: 0 auto; + padding: 0px; + text-align: left; + width: 960px; +} + + +@mixin html { + h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, hgroup, hr { + display: block !important; + float: none !important; + margin: 0px 0px 15px 0px !important; + width: auto !important; + } + .fl { float: left; margin: 0px 25px 15px 0px; } + .fr { float: right; margin: 0px 0px 15px 25px; } + img { &.left { float: left; margin: 5px 20px 15px 0px; } &.right { float: right; margin: 5px 0px 15px 20px; }} + table { display: table; width: 100% !important; } +} + + +/* Common Classes +------------------------------------------------------*/ + +strong, +.strong { + font-weight: bold; +} + +em, +.em { + font-style: italic; +} + +sup { + bottom: .8em; + font-size: 60% !important; + position: relative; +} + +sub { + font-size: 60% !important; + position: relative; + bottom: -.2em; +} + + +/* Block Elements +------------------------------------------------------*/ + +pre { + font-style: monospace; +} + +code { + font-style: monospace; +} + + +/* Misc CKEditor Styles Tags +------------------------------------------------------*/ + +tt, kbd, samp, code { font-family: monospace; } +cite { font-style: italic; padding: 10px; } +small { font-size: 70%; } +big { font-size: 150%; } +address { display: inline; font-style: italic; } +q { font-style: italic; } +var { font-weight: bold; } +del { text-decoration: line-through; } + +.error, .errors li { color: #A53A3A; } + +label.required{ font-weight: bold; } +label.required:after { content: '*'; color: #cc2222; } + diff --git a/demo/public/css/demo.scss b/demo/public/css/demo.scss new file mode 100644 index 000000000..ae9d4858d --- /dev/null +++ b/demo/public/css/demo.scss @@ -0,0 +1,1273 @@ +@import "common.scss"; + +/* Fonts & Colors +------------------------------------------------------*/ + +$white10: rgba(255,255,255,0.1); +$white20: rgba(255,255,255,0.2); +$white30: rgba(255,255,255,0.3); +$white50: rgba(255,255,255,0.5); +$white70: rgba(255,255,255,0.7); +$white90: rgba(255,255,255,0.9); + +$black70: rgba(0,0,0,0.7); +$black50: rgba(0,0,0,0.5); +$black30: rgba(0,0,0,0.3); +$black20: rgba(0,0,0,0.2); +$black10: rgba(0,0,0,0.1); + +$darkblue: #152030; +$blue: #243854; +$lightblue: #184C88; +$green: #78E3C6; +$orange: #F26304; +$red: #b8292f; +$yellow: #faa61a; + +$darkgrey: #424242; +$grey: #7a7b7b; +$lightgrey: #babbbb; +$reallylightgrey: #ededed; +$almostwhite: #e5e5e5; + +$font-primary: "Lato", "Arial Black", Helvetica, Arial, sans-serif; +$font-default: "Roboto", Helvetica, Arial, sans-serif; +$font-mono: monospace; + +$width: 960px; + +$inputFields: "input[type='text'], input[type='password'], input[type='email'], input[type='tel'], input[type='number'], textarea"; + + + +/* Mixins +------------------------------------------------------*/ + +@mixin button { + @include gradient($lightgrey,$almostwhite); + @include rounded(5px); + @include shadow($black30,0px,2px,1px); + @include text-shadow(white,0px,1px,0px); + @include transition; + border: 0px; + border-top: 1px solid white; + border-bottom: 1px solid darken($grey,10%); + color: black; + display: inline-block; + font-family: $font-primary; + font-size: 20px; + line-height: 20px; + height: auto; + letter-spacing: 2px; + margin: 0px; + outline: 0px; + padding: 12px 18px; + position: relative; + top: 0px; + text-align: center; + text-decoration: none; + text-transform: uppercase; + width: auto; + + &:hover { + @include shadow($black10,0px,6px,8px); + background: $almostwhite; + position: relative; + top: -3px; + } + + &.block { + display: block; + } + + &.big { + font-size: 24px; + line-height: 24px; + padding: 18px 24px; + } +} + + +/* Tags +------------------------------------------------------*/ + +p, h1, h2, h3, h4, h5, h6 { + @include default; +} + +h1 { + border-bottom: 2px solid $orange; + font-size: 40px; + font-weight: 200; + line-height: 42px; + letter-spacing: -1px; + margin: 0px 0px 15px 0px; + padding: 0px 0px 5px 0px; +} + +h2 { + color: $darkgrey; + font-size: 28px; + line-height: 32px; + font-weight: bold; + letter-spacing: -1px; + margin: 0px 0px 5px 0px; +} + +h3 { + border-bottom: 1px dotted $lightgrey; + color: $orange; + font-size: 16px; + font-weight: normal; + line-height: 22px; + letter-spacing: 1px; + text-transform: uppercase; + margin: 0px 0px 5px 0px; + padding: 0px 0px 3px 0px; +} + +h4 { + font-size: 14px; + font-weight: bold; + margin: 0px 0px 5px 0px; +} + +p { + margin: 0px 0px 15px 0px; +} + +ol, ul { + padding-left: 20px; +} + +blockquote { + background: transparent; + padding: 5px 10px; + position: relative; + + p { + color: $grey; + quotes: "\201c" "\201d" "\2018" "\2019"; + margin: 0 !important; + font-style: italic; + + &:before { + color: $orange; + content: open-quote; + font-family: serif; + font-size: 30px; + left: -10px; + position: absolute; + top: 5px; + } + + &:after { + color: $orange; + content: close-quote; + font-family: serif; + font-size: 30px; + position: absolute; + bottom: -5px; + right: -5px; + } + } +} + +.align-right { + text-align: right; +} + +.align-center { + text-align: center; +} + +.align-justify { + text-align: justify; +} + +/* Forms +------------------------------------------------------*/ + +form { + @include clearfix; + @include rounded(3px); + border: 1px dashed $almostwhite; + clear: both; + margin-bottom: 20px; + padding: 20px; + + div.formField { + @include clearfix; + clear: both; + margin-bottom: 15px; + + &.required { + label { + font-weight: bold; + + &:after { + color: $red; + content: "*"; + } + } + + ul { + label { + font-weight: normal; + + &:after { + content: ""; + } + } + } + } + + label { + clear: both; + display: inline-block; + margin: 0px 0px 4px 0px; + } + + #{$inputFields} { + @include rounded(2px); + @include inset-shadow($black10,0px,1px,3px); + border: 1px solid $lightgrey; + margin: 0px; + padding: 5px; + width: 97.5%; + } + + select { + @include rounded(2px); + @include inset-shadow($black10,0px,1px,3px); + padding: 5px; + width: 100%; + } + + ul, ol { + list-style: none; + padding: 0px; + + li { + input { + float: left; + margin: 3px 4px 0px 0px; + } + } + } + + div.help_text { + p { + color: $grey; + font-size: 11px; + margin: 0 !important; + } + } + } + + input[type='submit'] { + margin-bottom: 0 !important; + } +} + +a.button, button, input[type='submit'], input[type='button'] { + @include button; +} + +/* Body +------------------------------------------------------*/ + +html, body { + background: $almostwhite url('../img/grunge.jpg'); + color: $darkgrey; + font-size: 13px; + font-family: $font-default; + line-height: 18px; +} + +body { + padding-top: 98px; + + &.bop-it { + header { + a.logo { + height: 33px; + top: 13px; + width: 91px; + } + + nav { + > ul { + > li { + > a { + padding-bottom: 20px; + padding-top: 20px; + } + + ul { + top: 68px; + } + + &:hover { + ul { + top: 58px; + } + } + } + } + } + } + } +} + +div.adapt { + transition: all 0.25s ease 0s; + -o-transition: all 0.25s ease 0s; + -ms-transition: all 0.25s ease 0s; + -moz-transition: all 0.25s ease 0s; + -webkit-transition: all 0.25s ease 0s; + left: 0px; + position: relative; + top: 0px; +} + +/* Mobile Menu +------------------------------------------------------*/ + +section.mobile { + display: none; + height: auto; + width: auto; + + a { + @include transition(); + background: $green url('../img/bg.jpg'); + color: $darkblue; + display: block; + padding: 10px 3%; + font-weight: bold; + text-align: left; + text-decoration: none; + + &:hover { + background: $green; + } + } +} + +/* Header +------------------------------------------------------*/ + +header { + @include clearfix; + @include shadow($black30,0px,1px,3px); + @include transition(all 0.5s ease 0s); + @include wrapper; + background: $green url('../img/bg.jpg'); + left: 0px; + position: fixed; + top: 0px; + width: 100%; + z-index: 3000; + + a.logo { + @include transition(all 0.5s ease 0s); + background: $orange; + color: white; + display: inline-block; + float: none; + font-family: $font-primary; + font-weight: bold; + font-size: 30px; + height: 67px; + left: 0px; + letter-spacing: 7px; + line-height: 30px; + margin: 0; + overflow: hidden; + position: absolute; + text-align: center; + text-decoration: none; + text-transform: uppercase; + top: 15px; + width: 184px; + z-index: 3000; + + > img { + @include transition(all 0.5s ease 0s); + display: block; + height: auto; + left: 0px; + position: absolute; + top: 0px; + width: 100%; + + &.logo { + z-index: 20; + } + + &.frame { + z-index: 15; + } + + &.fill { + z-index: 10; + } + } + } + + > div { + @include clearfix; + @include inner; + color: white; + display: block; + height: auto; + margin: 0 auto; + padding: 0; + position: relative; + max-width: $width; + + nav { + display: inline; + float: right; + position: relative; + right: 0px; + text-align: right; + + ul { + display: block; + list-style: none; + margin: 0; + padding: 0; + text-align: right; + + li { + display: inline; + + a { + @include transition(all 0.5s ease 0s); + color: $darkblue; + display: inline; + font-family: $font-primary; + font-weight: bold; + float: right; + padding: 40px 30px; + text-decoration: none; + text-transform: uppercase; + + &:hover, + &.here { + background: $black10; + padding-left: 40px; + padding-right: 40px; + } + } + + &:hover { + > a { + background: $black10; + padding-left: 40px; + padding-right: 40px; + } + + > ul { + display: block; + max-height: 1000px; + opacity: 1; + overflow: visible; + top: 98px; + } + } + + ul { + @include transition(all 0.25s ease 0.35s); + background: $orange; + display: block; + height: auto; + list-style: none; + margin: 0; + max-height: 0; + left: 0px; + opacity: 0; + overflow: hidden; + padding: 0; + position: absolute; + text-align: left; + top: 108px; + width: 100%; + + li { + display: block; + margin: 0; + padding: 0; + width: auto; + + a { + color: white; + display: block; + float: none; + font-size: 11px; + line-height: 16px; + padding: 8px 12px; + text-align: left; + + &:hover { + padding: 12px 12px; + } + } + + ul { + display: none !important; + } + } + } + } + } + } + } +} + +/* Content +------------------------------------------------------*/ + +section.content { + @include clearfix; + @include wrapper; + padding: 30px 0px; + + > div { + @include clearfix; + @include inner; + } + + nav { + display: inline; + height: auto; + float: left; + margin-top: 15px; + width: 160px; + + p.title { + color: $darkgrey; + font-size: 18px; + line-height: 26px; + margin-bottom: 15px; + + a { + @include transition; + color: $blue; + text-decoration: none; + + &:hover { + color: lighten($blue,15%); + } + } + } + + ul { + border-top: 1px dotted $lightgrey; + clear: both; + list-style: none; + padding: 0px; + + li { + border-bottom: 1px dotted $lightgrey; + padding: 8px 0px; + + a { + color: $darkgrey; + display: inline; + font-size: 12px; + font-weight: bold; + letter-spacing: 2px; + line-height: 14px; + padding: 1px 2px; + text-decoration: none; + text-transform: uppercase; + + &:hover { + background: $orange; + color: white; + } + } + + ul { + border-top: 0px; + padding: 0 0 0 15px; + + li { + border-bottom: 0px; + padding: 0; + + a { + font-size: 11px; + letter-spacing: 0px; + } + + ul { + padding: 0 0 0 30px; + + li { + padding: 0; + + a { + font-size: 10px; + letter-spacing: 0px; + } + } + } + } + } + } + } + } + + article { + @include rounded(3px); + @include shadow($black30,0px,1px,3px); + background: white; + display: inline; + height: auto; + float: right; + min-height: 300px; + padding: 25px; + width: 750px; + + section.main { + @include html; + display: inline; + float: left; + height: auto; + width: 525px; + } + + section.sidebar { + @include html; + display: inline; + float: right; + height: auto; + width: 200px; + + div.callout { + @include rounded(2px); + @include inset-shadow($black10,0px,2px,2px); + background: lighten($almostwhite,3%); + margin: 0px 0px 15px 0px; + padding: 15px; + + h1 { + border: 0px; + color: $darkgrey; + font-size: 1.4em; + letter-spacing: 0px; + line-height: 24px; + margin: 0px 0px 5px 0px !important; + font-weight: bold; + padding: 0px; + } + + h2 { + font-size: 1.3em; + } + + h3 { + font-size: 1.2em; + } + + h4 { + font-size: 1.1em; + } + + p:last-child { + margin-bottom: 0 !important; + } + + a.button { + display: block; + margin-top: 10px; + text-align: center; + } + } + } + + /* HTML Fixes */ + section.main, + section.sidebar { + + th, td { + h1, h2, h3, h4, ul, p { + margin: 0 !important; + } + } + + blockquote { + p { + margin: 0 !important; + } + } + + iframe { + margin: 0 0 15px 0; + max-width: 100%; + } + + img { + height: auto; + max-width: 100%; + } + + > a.button { + @include clearfix; + float: right; + margin: 0 0 15px 15px; + } + } + } +} + +/* Homepage Content +------------------------------------------------------*/ + +body.home { + padding-top: 0; + + section.content { + padding: 0 0 50px 0; + + .inner { + width: 100%; + + article { + @include shadow(transparent,0,0,0); + @include rounded(0px); + background: transparent; + padding: 0; + width: 100%; + + div.cycle-slideshow { + height: 498px; + margin: 0 0 25px 0; + overflow: hidden; + position: relative; + width: 100%; + + div.slide { + @include html; + @include text-shadow(); + background-size: cover !important; + color: white; + height: 400px; + padding-top: 98px; + text-align: center; + width: 100%; + + h1 { + font-family: $font-primary; + font-size: 50px; + font-weight: bold; + line-height: 60px; + margin: 75px auto 15px auto !important; + padding-bottom: 15px; + max-width: $width; + } + + p { + font-size: 18px; + line-height: 24px; + } + } + } + + section.homeBoxes { + @include clearfix; + @include inner; + width: $width; + + div.homeBox { + @include rounded(3px); + @include shadow($black30,0px,1px,3px); + background: white; + display: inline; + height: auto; + margin: 0 0 0 30px; + float: left; + padding: 25px; + width: 250px; + + p.title { + border-bottom: 2px solid $orange; + font-size: 24px; + padding-bottom: 15px; + } + + &:first-child, + &:nth-child(3n+1) { + margin-left: 0; + } + + a.button { + clear: both; + display: block; + } + } + } + } + } + } + +} + +/* Footer +------------------------------------------------------*/ + +footer { + @include inset-shadow($black10,0px,2px,4px); + padding: 30px 0px; + text-align: center; + + a { + color: $grey; + margin: 0 10px; + text-decoration: none; + } +} + + +/* Accordion +------------------------------------------------------*/ + +div.accordion { + clear: both; + + details { + clear: both; + margin: 0px 0px 10px 0px; + + summary { + @include rounded(3px); + @include shadow($black10,0px,1px,3px); + background: $orange; + color: white; + cursor: pointer; + font-size: 15px; + line-height: 20px; + margin-bottom: 3px; + padding: 8px 10px; + + &:hover { + background: lighten($orange,10%); + @include shadow($black30,0px,2px,5px); + } + } + + div.accordionContent { + @include clearfix; + @include html; + @include rounded(3px); + @include inset-shadow($black10,0px,1px,3px); + border: 1px solid lighten($orange,30%); + padding: 8px 10px; + } + } +} + +/* Tabify +------------------------------------------------------*/ + +div.tabify { + @include clearfix; + clear: both; + margin: 0px 0px 10px 0px; + + ul.tabs { + list-style: none; + margin: 0px; + padding: 0px; + + li { + display: inline; + float: left; + margin: 0px 0px 0px 5px; + + a { + @include rounded(3px 3px 0px 0px); + background: $blue; + color: white; + display: block; + font-family: $font-primary; + font-size: 13px; + line-height: 20px; + padding: 8px 10px; + text-decoration: none; + text-transform: uppercase; + + &:hover { + background: lighten($blue,15%); + } + + &.active { + background: $lightblue; + } + } + } + } + + div.tabContent { + @include html; + @include rounded(3px); + border: dashed 1px $lightgrey; + border-top: 3px solid $lightblue; + clear: both; + overflow: auto; + padding: 15px; + + > p.title { + display: none !important; + } + } +} + +/* Figure +------------------------------------------------------*/ + +figure { + @include rounded(3px); + @include shadow($black30,0px,1px,3px); + margin-bottom: 20px !important; + overflow: hidden; + + img { + @include rounded(3px); + display: block; + height: auto; + width: 100%; + } + + &.center, + &.left, + &.right { + background: $green; + width: 200px; + + img { + @include rounded(3px 3px 0px 0px); + height: auto; + margin: 0px; + width: 100%; + } + + figcaption { + color: $darkblue; + display: block; + font-size: 12px; + font-style: italic; + line-height: 16px; + padding: 15px; + text-align: center; + } + + &.center { + display: block; + margin: 10px auto 25px auto; + } + + &.left { + float: left; + margin: 10px 25px 25px 0px; + } + + &.right { + float: right; + margin: 10px 0px 25px 25px; + } + } +} + +/* Tables +------------------------------------------------------*/ + +table { + @include shadow($black30,0px,1px,3px); + @include rounded(3px); + border: 0px; + overflow: hidden; + margin: 0 0 15px 0; + width: 100%; + + thead { + th, td { + background: $green; + border: 0px; + color: $darkblue; + font-weight: bold; + padding: 10px; + + p { + margin: 0 !important; + } + } + } + + tbody { + th, td { + background: white; + border: 0px; + color: $grey; + font-weight: normal; + padding: 5px 10px; + vertical-align: top; + + p { + margin: 0 !important; + } + } + + tr:nth-child(2n) { + th, td { + background: lighten($almostwhite,5%); + } + } + } +} + +/* HTML +------------------------------------------------------*/ + +.htmlOutput { + blockquote { + p { + margin: 0 !important; + } + } +} + + +/*------------------------------------------------------ + + Responsive + +--------------------------------------------------------*/ + + +/* Fluid Responsive Designs +--------------------------------------------------------*/ + + +@media screen and (min-width: 601px) and (max-width: 1020px) { + + header, + section.content { + min-width: 580px; + + > div { + width: 90% + } + } + + header { + nav { + ul { + li { + a { + padding-left: 20px; + padding-right: 20px; + + &:hover { + padding-left: 30px; + padding-right: 30px; + } + } + } + } + } + } + + section.content { + nav { + width: 20%; + } + + article { + padding: 15px 3%; + width: 74%; + + section.main { + width: 60%; + } + + section.sidebar { + width: 35%; + } + } + } + +} + + +/* Mobile Responsive Designs +--------------------------------------------------------*/ + +@media screen and (max-width: 600px) { + + body { + overflow-x: hidden; + } + + body.shift { + .adapt { + left: 200px; + top: 0px; + } + } + + section.mobile { + display: block; + } + + header, + section.content { + min-width: 280px; + + > div { + width: 90% + } + } + + body.bop-it header, + header { + position: static; + + > div { + position: static; + + a.logo { + height: 67px !important; + left: auto; + right: 15px; + width: 184px !important; + } + + nav { + float: none; + left: -200px; + position: absolute; + right: auto; + text-align: left; + top: 0px; + width: 200px; + z-index: 100; + + ul { + border-top: 1px dotted $lightgrey; + float: none; + list-style: none; + padding: 0px; + display: block; + text-align: left; + width: 200px; + + li { + border-bottom: 1px dotted $lightgrey; + display: block; + float: none; + margin: 0px; + padding: 0; + width: 200px; + + a { + color: $darkgrey; + display: block; + float: none; + font-size: 12px; + font-weight: bold; + letter-spacing: 2px; + line-height: 14px; + padding: 8px; + text-align: left; + text-decoration: none; + text-transform: uppercase; + width: auto; + + &:hover { + background: $orange; + color: white; + padding: 12px 8px; + } + } + + ul { + background: transparent; + border-top: 0px; + display: block; + max-height: 1000px; + position: static; + opacity: 1; + top: 0; + + li { + border-bottom: 0px; + a { + padding-left: 20px !important; + } + + ul { + display: block !important; + + li { + a { + padding-left: 40px !important; + } + } + } + } + } + } + } + } + } + } + + section.content { + .inner { + nav { + display: none; + } + + article { + padding: 15px 3%; + width: 94%; + + section.main { + width: 100%; + } + + section.sidebar { + width: 100%; + } + } + } + } + + body.home { + section.content { + .inner { + article { + + section.homeBoxes { + padding: 0 5%; + width: 90%; + + div.homeBox { + @include clearfix; + clear: both; + display: block; + float: none; + margin: 0; + width: auto; + } + } + } + } + } + } +} diff --git a/demo/public/css/reset.css b/demo/public/css/reset.css new file mode 100644 index 000000000..8609bab5e --- /dev/null +++ b/demo/public/css/reset.css @@ -0,0 +1,96 @@ +/* Resets HTML5 default display wonkiness */ +html, body, div, span, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +abbr, address, cite, code, +del, dfn, em, img, ins, kbd, q, samp, +small, strong, sub, sup, var, +b, i, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, figcaption, figure, +footer, header, hgroup, menu, nav, section, summary, +time, mark, audio, video { + margin:0; + padding:0; + border:0; + outline:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} + +body { + line-height:1; +} + +article,aside,details,figcaption,figure, +footer,header,hgroup,menu,nav,section { + display:block; +} + +nav ul { + list-style:none; +} + +blockquote, q { + quotes:none; +} + +blockquote:before, blockquote:after, +q:before, q:after { + content:''; + content:none; +} + +a { + margin:0; + padding:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} + +/* change colours to suit your needs */ +ins { + background-color:#eeeeee; + color:#000000; + text-decoration:none; +} + +/* change colours to suit your needs */ +mark { + background-color:#ff9; + color:#000000; + font-style:italic; + font-weight:bold; +} + +del { + text-decoration: line-through; +} + +abbr[title], dfn[title] { + border-bottom:1px dotted; + cursor:help; +} + +table { + border-collapse:collapse; + border-spacing:0; +} + +/* change border colour to suit your needs */ +hr { + display:block; + height:1px; + border:0; + border-top:1px solid #cccccc; + margin:1em 0; + padding:0; +} + +input, select { + vertical-align:middle; + +} \ No newline at end of file diff --git a/demo/public/img/bg.jpg b/demo/public/img/bg.jpg new file mode 100644 index 000000000..36339d510 Binary files /dev/null and b/demo/public/img/bg.jpg differ diff --git a/demo/public/img/favicon.ico b/demo/public/img/favicon.ico new file mode 100644 index 000000000..62dc4d103 Binary files /dev/null and b/demo/public/img/favicon.ico differ diff --git a/demo/public/img/glyphicons-halflings-white.png b/demo/public/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a2..000000000 Binary files a/demo/public/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/demo/public/img/glyphicons-halflings.png b/demo/public/img/glyphicons-halflings.png deleted file mode 100644 index 79bc568c2..000000000 Binary files a/demo/public/img/glyphicons-halflings.png and /dev/null differ diff --git a/demo/public/img/grunge.jpg b/demo/public/img/grunge.jpg new file mode 100644 index 000000000..e7eb3ffc1 Binary files /dev/null and b/demo/public/img/grunge.jpg differ diff --git a/demo/public/img/logo-frame.png b/demo/public/img/logo-frame.png new file mode 100644 index 000000000..ffc733c05 Binary files /dev/null and b/demo/public/img/logo-frame.png differ diff --git a/demo/public/img/logo-white.png b/demo/public/img/logo-white.png new file mode 100644 index 000000000..1df77437c Binary files /dev/null and b/demo/public/img/logo-white.png differ diff --git a/demo/public/js/backbone.js b/demo/public/js/backbone.js deleted file mode 100644 index 3373c952b..000000000 --- a/demo/public/js/backbone.js +++ /dev/null @@ -1,1431 +0,0 @@ -// Backbone.js 0.9.2 - -// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. -// Backbone may be freely distributed under the MIT license. -// For all details and documentation: -// http://backbonejs.org - -(function(){ - - // Initial Setup - // ------------- - - // Save a reference to the global object (`window` in the browser, `global` - // on the server). - var root = this; - - // Save the previous value of the `Backbone` variable, so that it can be - // restored later on, if `noConflict` is used. - var previousBackbone = root.Backbone; - - // Create a local reference to slice/splice. - var slice = Array.prototype.slice; - var splice = Array.prototype.splice; - - // The top-level namespace. All public Backbone classes and modules will - // be attached to this. Exported for both CommonJS and the browser. - var Backbone; - if (typeof exports !== 'undefined') { - Backbone = exports; - } else { - Backbone = root.Backbone = {}; - } - - // Current version of the library. Keep in sync with `package.json`. - Backbone.VERSION = '0.9.2'; - - // Require Underscore, if we're on the server, and it's not already present. - var _ = root._; - if (!_ && (typeof require !== 'undefined')) _ = require('underscore'); - - // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable. - var $ = root.jQuery || root.Zepto || root.ender; - - // Set the JavaScript library that will be used for DOM manipulation and - // Ajax calls (a.k.a. the `$` variable). By default Backbone will use: jQuery, - // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an - // alternate JavaScript library (or a mock library for testing your views - // outside of a browser). - Backbone.setDomLibrary = function(lib) { - $ = lib; - }; - - // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable - // to its previous owner. Returns a reference to this Backbone object. - Backbone.noConflict = function() { - root.Backbone = previousBackbone; - return this; - }; - - // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option - // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and - // set a `X-Http-Method-Override` header. - Backbone.emulateHTTP = false; - - // Turn on `emulateJSON` to support legacy servers that can't deal with direct - // `application/json` requests ... will encode the body as - // `application/x-www-form-urlencoded` instead and will send the model in a - // form param named `model`. - Backbone.emulateJSON = false; - - // Backbone.Events - // ----------------- - - // Regular expression used to split event strings - var eventSplitter = /\s+/; - - // A module that can be mixed in to *any object* in order to provide it with - // custom events. You may bind with `on` or remove with `off` callback functions - // to an event; trigger`-ing an event fires all callbacks in succession. - // - // var object = {}; - // _.extend(object, Backbone.Events); - // object.on('expand', function(){ alert('expanded'); }); - // object.trigger('expand'); - // - var Events = Backbone.Events = { - - // Bind one or more space separated events, `events`, to a `callback` - // function. Passing `"all"` will bind the callback to all events fired. - on: function(events, callback, context) { - - var calls, event, node, tail, list; - if (!callback) return this; - events = events.split(eventSplitter); - calls = this._callbacks || (this._callbacks = {}); - - // Create an immutable callback list, allowing traversal during - // modification. The tail is an empty object that will always be used - // as the next node. - while (event = events.shift()) { - list = calls[event]; - node = list ? list.tail : {}; - node.next = tail = {}; - node.context = context; - node.callback = callback; - calls[event] = {tail: tail, next: list ? list.next : node}; - } - - return this; - }, - - // Remove one or many callbacks. If `context` is null, removes all callbacks - // with that function. If `callback` is null, removes all callbacks for the - // event. If `events` is null, removes all bound callbacks for all events. - off: function(events, callback, context) { - var event, calls, node, tail, cb, ctx; - - // No events, or removing *all* events. - if (!(calls = this._callbacks)) return; - if (!(events || callback || context)) { - delete this._callbacks; - return this; - } - - // Loop through the listed events and contexts, splicing them out of the - // linked list of callbacks if appropriate. - events = events ? events.split(eventSplitter) : _.keys(calls); - while (event = events.shift()) { - node = calls[event]; - delete calls[event]; - if (!node || !(callback || context)) continue; - // Create a new list, omitting the indicated callbacks. - tail = node.tail; - while ((node = node.next) !== tail) { - cb = node.callback; - ctx = node.context; - if ((callback && cb !== callback) || (context && ctx !== context)) { - this.on(event, cb, ctx); - } - } - } - - return this; - }, - - // Trigger one or many events, firing all bound callbacks. Callbacks are - // passed the same arguments as `trigger` is, apart from the event name - // (unless you're listening on `"all"`, which will cause your callback to - // receive the true name of the event as the first argument). - trigger: function(events) { - var event, node, calls, tail, args, all, rest; - if (!(calls = this._callbacks)) return this; - all = calls.all; - events = events.split(eventSplitter); - rest = slice.call(arguments, 1); - - // For each event, walk through the linked list of callbacks twice, - // first to trigger the event, then to trigger any `"all"` callbacks. - while (event = events.shift()) { - if (node = calls[event]) { - tail = node.tail; - while ((node = node.next) !== tail) { - node.callback.apply(node.context || this, rest); - } - } - if (node = all) { - tail = node.tail; - args = [event].concat(rest); - while ((node = node.next) !== tail) { - node.callback.apply(node.context || this, args); - } - } - } - - return this; - } - - }; - - // Aliases for backwards compatibility. - Events.bind = Events.on; - Events.unbind = Events.off; - - // Backbone.Model - // -------------- - - // Create a new model, with defined attributes. A client id (`cid`) - // is automatically generated and assigned for you. - var Model = Backbone.Model = function(attributes, options) { - var defaults; - attributes || (attributes = {}); - if (options && options.parse) attributes = this.parse(attributes); - if (defaults = getValue(this, 'defaults')) { - attributes = _.extend({}, defaults, attributes); - } - if (options && options.collection) this.collection = options.collection; - this.attributes = {}; - this._escapedAttributes = {}; - this.cid = _.uniqueId('c'); - this.changed = {}; - this._silent = {}; - this._pending = {}; - this.set(attributes, {silent: true}); - // Reset change tracking. - this.changed = {}; - this._silent = {}; - this._pending = {}; - this._previousAttributes = _.clone(this.attributes); - this.initialize.apply(this, arguments); - }; - - // Attach all inheritable methods to the Model prototype. - _.extend(Model.prototype, Events, { - - // A hash of attributes whose current and previous value differ. - changed: null, - - // A hash of attributes that have silently changed since the last time - // `change` was called. Will become pending attributes on the next call. - _silent: null, - - // A hash of attributes that have changed since the last `'change'` event - // began. - _pending: null, - - // The default name for the JSON `id` attribute is `"id"`. MongoDB and - // CouchDB users may want to set this to `"_id"`. - idAttribute: 'id', - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // Return a copy of the model's `attributes` object. - toJSON: function(options) { - return _.clone(this.attributes); - }, - - // Get the value of an attribute. - get: function(attr) { - return this.attributes[attr]; - }, - - // Get the HTML-escaped value of an attribute. - escape: function(attr) { - var html; - if (html = this._escapedAttributes[attr]) return html; - var val = this.get(attr); - return this._escapedAttributes[attr] = _.escape(val == null ? '' : '' + val); - }, - - // Returns `true` if the attribute contains a value that is not null - // or undefined. - has: function(attr) { - return this.get(attr) != null; - }, - - // Set a hash of model attributes on the object, firing `"change"` unless - // you choose to silence it. - set: function(key, value, options) { - var attrs, attr, val; - - // Handle both `"key", value` and `{key: value}` -style arguments. - if (_.isObject(key) || key == null) { - attrs = key; - options = value; - } else { - attrs = {}; - attrs[key] = value; - } - - // Extract attributes and options. - options || (options = {}); - if (!attrs) return this; - if (attrs instanceof Model) attrs = attrs.attributes; - if (options.unset) for (attr in attrs) attrs[attr] = void 0; - - // Run validation. - if (!this._validate(attrs, options)) return false; - - // Check for changes of `id`. - if (this.idAttribute in attrs) this.id = attrs[this.idAttribute]; - - var changes = options.changes = {}; - var now = this.attributes; - var escaped = this._escapedAttributes; - var prev = this._previousAttributes || {}; - - // For each `set` attribute... - for (attr in attrs) { - val = attrs[attr]; - - // If the new and current value differ, record the change. - if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) { - delete escaped[attr]; - (options.silent ? this._silent : changes)[attr] = true; - } - - // Update or delete the current value. - options.unset ? delete now[attr] : now[attr] = val; - - // If the new and previous value differ, record the change. If not, - // then remove changes for this attribute. - if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) { - this.changed[attr] = val; - if (!options.silent) this._pending[attr] = true; - } else { - delete this.changed[attr]; - delete this._pending[attr]; - } - } - - // Fire the `"change"` events. - if (!options.silent) this.change(options); - return this; - }, - - // Remove an attribute from the model, firing `"change"` unless you choose - // to silence it. `unset` is a noop if the attribute doesn't exist. - unset: function(attr, options) { - (options || (options = {})).unset = true; - return this.set(attr, null, options); - }, - - // Clear all attributes on the model, firing `"change"` unless you choose - // to silence it. - clear: function(options) { - (options || (options = {})).unset = true; - return this.set(_.clone(this.attributes), options); - }, - - // Fetch the model from the server. If the server's representation of the - // model differs from its current attributes, they will be overriden, - // triggering a `"change"` event. - fetch: function(options) { - options = options ? _.clone(options) : {}; - var model = this; - var success = options.success; - options.success = function(resp, status, xhr) { - if (!model.set(model.parse(resp, xhr), options)) return false; - if (success) success(model, resp); - }; - options.error = Backbone.wrapError(options.error, model, options); - return (this.sync || Backbone.sync).call(this, 'read', this, options); - }, - - // Set a hash of model attributes, and sync the model to the server. - // If the server returns an attributes hash that differs, the model's - // state will be `set` again. - save: function(key, value, options) { - var attrs, current; - - // Handle both `("key", value)` and `({key: value})` -style calls. - if (_.isObject(key) || key == null) { - attrs = key; - options = value; - } else { - attrs = {}; - attrs[key] = value; - } - options = options ? _.clone(options) : {}; - - // If we're "wait"-ing to set changed attributes, validate early. - if (options.wait) { - if (!this._validate(attrs, options)) return false; - current = _.clone(this.attributes); - } - - // Regular saves `set` attributes before persisting to the server. - var silentOptions = _.extend({}, options, {silent: true}); - if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) { - return false; - } - - // After a successful server-side save, the client is (optionally) - // updated with the server-side state. - var model = this; - var success = options.success; - options.success = function(resp, status, xhr) { - var serverAttrs = model.parse(resp, xhr); - if (options.wait) { - delete options.wait; - serverAttrs = _.extend(attrs || {}, serverAttrs); - } - if (!model.set(serverAttrs, options)) return false; - if (success) { - success(model, resp); - } else { - model.trigger('sync', model, resp, options); - } - }; - - // Finish configuring and sending the Ajax request. - options.error = Backbone.wrapError(options.error, model, options); - var method = this.isNew() ? 'create' : 'update'; - var xhr = (this.sync || Backbone.sync).call(this, method, this, options); - if (options.wait) this.set(current, silentOptions); - return xhr; - }, - - // Destroy this model on the server if it was already persisted. - // Optimistically removes the model from its collection, if it has one. - // If `wait: true` is passed, waits for the server to respond before removal. - destroy: function(options) { - options = options ? _.clone(options) : {}; - var model = this; - var success = options.success; - - var triggerDestroy = function() { - model.trigger('destroy', model, model.collection, options); - }; - - if (this.isNew()) { - triggerDestroy(); - return false; - } - - options.success = function(resp) { - if (options.wait) triggerDestroy(); - if (success) { - success(model, resp); - } else { - model.trigger('sync', model, resp, options); - } - }; - - options.error = Backbone.wrapError(options.error, model, options); - var xhr = (this.sync || Backbone.sync).call(this, 'delete', this, options); - if (!options.wait) triggerDestroy(); - return xhr; - }, - - // Default URL for the model's representation on the server -- if you're - // using Backbone's restful methods, override this to change the endpoint - // that will be called. - url: function() { - var base = getValue(this, 'urlRoot') || getValue(this.collection, 'url') || urlError(); - if (this.isNew()) return base; - return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id); - }, - - // **parse** converts a response into the hash of attributes to be `set` on - // the model. The default implementation is just to pass the response along. - parse: function(resp, xhr) { - return resp; - }, - - // Create a new model with identical attributes to this one. - clone: function() { - return new this.constructor(this.attributes); - }, - - // A model is new if it has never been saved to the server, and lacks an id. - isNew: function() { - return this.id == null; - }, - - // Call this method to manually fire a `"change"` event for this model and - // a `"change:attribute"` event for each changed attribute. - // Calling this will cause all objects observing the model to update. - change: function(options) { - options || (options = {}); - var changing = this._changing; - this._changing = true; - - // Silent changes become pending changes. - for (var attr in this._silent) this._pending[attr] = true; - - // Silent changes are triggered. - var changes = _.extend({}, options.changes, this._silent); - this._silent = {}; - for (var attr in changes) { - this.trigger('change:' + attr, this, this.get(attr), options); - } - if (changing) return this; - - // Continue firing `"change"` events while there are pending changes. - while (!_.isEmpty(this._pending)) { - this._pending = {}; - this.trigger('change', this, options); - // Pending and silent changes still remain. - for (var attr in this.changed) { - if (this._pending[attr] || this._silent[attr]) continue; - delete this.changed[attr]; - } - this._previousAttributes = _.clone(this.attributes); - } - - this._changing = false; - return this; - }, - - // Determine if the model has changed since the last `"change"` event. - // If you specify an attribute name, determine if that attribute has changed. - hasChanged: function(attr) { - if (!arguments.length) return !_.isEmpty(this.changed); - return _.has(this.changed, attr); - }, - - // Return an object containing all the attributes that have changed, or - // false if there are no changed attributes. Useful for determining what - // parts of a view need to be updated and/or what attributes need to be - // persisted to the server. Unset attributes will be set to undefined. - // You can also pass an attributes object to diff against the model, - // determining if there *would be* a change. - changedAttributes: function(diff) { - if (!diff) return this.hasChanged() ? _.clone(this.changed) : false; - var val, changed = false, old = this._previousAttributes; - for (var attr in diff) { - if (_.isEqual(old[attr], (val = diff[attr]))) continue; - (changed || (changed = {}))[attr] = val; - } - return changed; - }, - - // Get the previous value of an attribute, recorded at the time the last - // `"change"` event was fired. - previous: function(attr) { - if (!arguments.length || !this._previousAttributes) return null; - return this._previousAttributes[attr]; - }, - - // Get all of the attributes of the model at the time of the previous - // `"change"` event. - previousAttributes: function() { - return _.clone(this._previousAttributes); - }, - - // Check if the model is currently in a valid state. It's only possible to - // get into an *invalid* state if you're using silent changes. - isValid: function() { - return !this.validate(this.attributes); - }, - - // Run validation against the next complete set of model attributes, - // returning `true` if all is well. If a specific `error` callback has - // been passed, call that instead of firing the general `"error"` event. - _validate: function(attrs, options) { - if (options.silent || !this.validate) return true; - attrs = _.extend({}, this.attributes, attrs); - var error = this.validate(attrs, options); - if (!error) return true; - if (options && options.error) { - options.error(this, error, options); - } else { - this.trigger('error', this, error, options); - } - return false; - } - - }); - - // Backbone.Collection - // ------------------- - - // Provides a standard collection class for our sets of models, ordered - // or unordered. If a `comparator` is specified, the Collection will maintain - // its models in sort order, as they're added and removed. - var Collection = Backbone.Collection = function(models, options) { - options || (options = {}); - if (options.model) this.model = options.model; - if (options.comparator) this.comparator = options.comparator; - this._reset(); - this.initialize.apply(this, arguments); - if (models) this.reset(models, {silent: true, parse: options.parse}); - }; - - // Define the Collection's inheritable methods. - _.extend(Collection.prototype, Events, { - - // The default model for a collection is just a **Backbone.Model**. - // This should be overridden in most cases. - model: Model, - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // The JSON representation of a Collection is an array of the - // models' attributes. - toJSON: function(options) { - return this.map(function(model){ return model.toJSON(options); }); - }, - - // Add a model, or list of models to the set. Pass **silent** to avoid - // firing the `add` event for every new model. - add: function(models, options) { - var i, index, length, model, cid, id, cids = {}, ids = {}, dups = []; - options || (options = {}); - models = _.isArray(models) ? models.slice() : [models]; - - // Begin by turning bare objects into model references, and preventing - // invalid models or duplicate models from being added. - for (i = 0, length = models.length; i < length; i++) { - if (!(model = models[i] = this._prepareModel(models[i], options))) { - throw new Error("Can't add an invalid model to a collection"); - } - cid = model.cid; - id = model.id; - if (cids[cid] || this._byCid[cid] || ((id != null) && (ids[id] || this._byId[id]))) { - dups.push(i); - continue; - } - cids[cid] = ids[id] = model; - } - - // Remove duplicates. - i = dups.length; - while (i--) { - models.splice(dups[i], 1); - } - - // Listen to added models' events, and index models for lookup by - // `id` and by `cid`. - for (i = 0, length = models.length; i < length; i++) { - (model = models[i]).on('all', this._onModelEvent, this); - this._byCid[model.cid] = model; - if (model.id != null) this._byId[model.id] = model; - } - - // Insert models into the collection, re-sorting if needed, and triggering - // `add` events unless silenced. - this.length += length; - index = options.at != null ? options.at : this.models.length; - splice.apply(this.models, [index, 0].concat(models)); - if (this.comparator) this.sort({silent: true}); - if (options.silent) return this; - for (i = 0, length = this.models.length; i < length; i++) { - if (!cids[(model = this.models[i]).cid]) continue; - options.index = i; - model.trigger('add', model, this, options); - } - return this; - }, - - // Remove a model, or a list of models from the set. Pass silent to avoid - // firing the `remove` event for every model removed. - remove: function(models, options) { - var i, l, index, model; - options || (options = {}); - models = _.isArray(models) ? models.slice() : [models]; - for (i = 0, l = models.length; i < l; i++) { - model = this.getByCid(models[i]) || this.get(models[i]); - if (!model) continue; - delete this._byId[model.id]; - delete this._byCid[model.cid]; - index = this.indexOf(model); - this.models.splice(index, 1); - this.length--; - if (!options.silent) { - options.index = index; - model.trigger('remove', model, this, options); - } - this._removeReference(model); - } - return this; - }, - - // Add a model to the end of the collection. - push: function(model, options) { - model = this._prepareModel(model, options); - this.add(model, options); - return model; - }, - - // Remove a model from the end of the collection. - pop: function(options) { - var model = this.at(this.length - 1); - this.remove(model, options); - return model; - }, - - // Add a model to the beginning of the collection. - unshift: function(model, options) { - model = this._prepareModel(model, options); - this.add(model, _.extend({at: 0}, options)); - return model; - }, - - // Remove a model from the beginning of the collection. - shift: function(options) { - var model = this.at(0); - this.remove(model, options); - return model; - }, - - // Get a model from the set by id. - get: function(id) { - if (id == null) return void 0; - return this._byId[id.id != null ? id.id : id]; - }, - - // Get a model from the set by client id. - getByCid: function(cid) { - return cid && this._byCid[cid.cid || cid]; - }, - - // Get the model at the given index. - at: function(index) { - return this.models[index]; - }, - - // Return models with matching attributes. Useful for simple cases of `filter`. - where: function(attrs) { - if (_.isEmpty(attrs)) return []; - return this.filter(function(model) { - for (var key in attrs) { - if (attrs[key] !== model.get(key)) return false; - } - return true; - }); - }, - - // Force the collection to re-sort itself. You don't need to call this under - // normal circumstances, as the set will maintain sort order as each item - // is added. - sort: function(options) { - options || (options = {}); - if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); - var boundComparator = _.bind(this.comparator, this); - if (this.comparator.length == 1) { - this.models = this.sortBy(boundComparator); - } else { - this.models.sort(boundComparator); - } - if (!options.silent) this.trigger('reset', this, options); - return this; - }, - - // Pluck an attribute from each model in the collection. - pluck: function(attr) { - return _.map(this.models, function(model){ return model.get(attr); }); - }, - - // When you have more items than you want to add or remove individually, - // you can reset the entire set with a new list of models, without firing - // any `add` or `remove` events. Fires `reset` when finished. - reset: function(models, options) { - models || (models = []); - options || (options = {}); - for (var i = 0, l = this.models.length; i < l; i++) { - this._removeReference(this.models[i]); - } - this._reset(); - this.add(models, _.extend({silent: true}, options)); - if (!options.silent) this.trigger('reset', this, options); - return this; - }, - - // Fetch the default set of models for this collection, resetting the - // collection when they arrive. If `add: true` is passed, appends the - // models to the collection instead of resetting. - fetch: function(options) { - options = options ? _.clone(options) : {}; - if (options.parse === undefined) options.parse = true; - var collection = this; - var success = options.success; - options.success = function(resp, status, xhr) { - collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options); - if (success) success(collection, resp); - }; - options.error = Backbone.wrapError(options.error, collection, options); - return (this.sync || Backbone.sync).call(this, 'read', this, options); - }, - - // Create a new instance of a model in this collection. Add the model to the - // collection immediately, unless `wait: true` is passed, in which case we - // wait for the server to agree. - create: function(model, options) { - var coll = this; - options = options ? _.clone(options) : {}; - model = this._prepareModel(model, options); - if (!model) return false; - if (!options.wait) coll.add(model, options); - var success = options.success; - options.success = function(nextModel, resp, xhr) { - if (options.wait) coll.add(nextModel, options); - if (success) { - success(nextModel, resp); - } else { - nextModel.trigger('sync', model, resp, options); - } - }; - model.save(null, options); - return model; - }, - - // **parse** converts a response into a list of models to be added to the - // collection. The default implementation is just to pass it through. - parse: function(resp, xhr) { - return resp; - }, - - // Proxy to _'s chain. Can't be proxied the same way the rest of the - // underscore methods are proxied because it relies on the underscore - // constructor. - chain: function () { - return _(this.models).chain(); - }, - - // Reset all internal state. Called when the collection is reset. - _reset: function(options) { - this.length = 0; - this.models = []; - this._byId = {}; - this._byCid = {}; - }, - - // Prepare a model or hash of attributes to be added to this collection. - _prepareModel: function(model, options) { - options || (options = {}); - if (!(model instanceof Model)) { - var attrs = model; - options.collection = this; - model = new this.model(attrs, options); - if (!model._validate(model.attributes, options)) model = false; - } else if (!model.collection) { - model.collection = this; - } - return model; - }, - - // Internal method to remove a model's ties to a collection. - _removeReference: function(model) { - if (this == model.collection) { - delete model.collection; - } - model.off('all', this._onModelEvent, this); - }, - - // Internal method called every time a model in the set fires an event. - // Sets need to update their indexes when models change ids. All other - // events simply proxy through. "add" and "remove" events that originate - // in other collections are ignored. - _onModelEvent: function(event, model, collection, options) { - if ((event == 'add' || event == 'remove') && collection != this) return; - if (event == 'destroy') { - this.remove(model, options); - } - if (model && event === 'change:' + model.idAttribute) { - delete this._byId[model.previous(model.idAttribute)]; - this._byId[model.id] = model; - } - this.trigger.apply(this, arguments); - } - - }); - - // Underscore methods that we want to implement on the Collection. - var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find', - 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', - 'include', 'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex', - 'toArray', 'size', 'first', 'initial', 'rest', 'last', 'without', 'indexOf', - 'shuffle', 'lastIndexOf', 'isEmpty', 'groupBy']; - - // Mix in each Underscore method as a proxy to `Collection#models`. - _.each(methods, function(method) { - Collection.prototype[method] = function() { - return _[method].apply(_, [this.models].concat(_.toArray(arguments))); - }; - }); - - // Backbone.Router - // ------------------- - - // Routers map faux-URLs to actions, and fire events when routes are - // matched. Creating a new one sets its `routes` hash, if not set statically. - var Router = Backbone.Router = function(options) { - options || (options = {}); - if (options.routes) this.routes = options.routes; - this._bindRoutes(); - this.initialize.apply(this, arguments); - }; - - // Cached regular expressions for matching named param parts and splatted - // parts of route strings. - var namedParam = /:\w+/g; - var splatParam = /\*\w+/g; - var escapeRegExp = /[-[\]{}()+?.,\\^$|#\s]/g; - - // Set up all inheritable **Backbone.Router** properties and methods. - _.extend(Router.prototype, Events, { - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // Manually bind a single named route to a callback. For example: - // - // this.route('search/:query/p:num', 'search', function(query, num) { - // ... - // }); - // - route: function(route, name, callback) { - Backbone.history || (Backbone.history = new History); - if (!_.isRegExp(route)) route = this._routeToRegExp(route); - if (!callback) callback = this[name]; - Backbone.history.route(route, _.bind(function(fragment) { - var args = this._extractParameters(route, fragment); - callback && callback.apply(this, args); - this.trigger.apply(this, ['route:' + name].concat(args)); - Backbone.history.trigger('route', this, name, args); - }, this)); - return this; - }, - - // Simple proxy to `Backbone.history` to save a fragment into the history. - navigate: function(fragment, options) { - Backbone.history.navigate(fragment, options); - }, - - // Bind all defined routes to `Backbone.history`. We have to reverse the - // order of the routes here to support behavior where the most general - // routes can be defined at the bottom of the route map. - _bindRoutes: function() { - if (!this.routes) return; - var routes = []; - for (var route in this.routes) { - routes.unshift([route, this.routes[route]]); - } - for (var i = 0, l = routes.length; i < l; i++) { - this.route(routes[i][0], routes[i][1], this[routes[i][1]]); - } - }, - - // Convert a route string into a regular expression, suitable for matching - // against the current location hash. - _routeToRegExp: function(route) { - route = route.replace(escapeRegExp, '\\$&') - .replace(namedParam, '([^\/]+)') - .replace(splatParam, '(.*?)'); - return new RegExp('^' + route + '$'); - }, - - // Given a route, and a URL fragment that it matches, return the array of - // extracted parameters. - _extractParameters: function(route, fragment) { - return route.exec(fragment).slice(1); - } - - }); - - // Backbone.History - // ---------------- - - // Handles cross-browser history management, based on URL fragments. If the - // browser does not support `onhashchange`, falls back to polling. - var History = Backbone.History = function() { - this.handlers = []; - _.bindAll(this, 'checkUrl'); - }; - - // Cached regex for cleaning leading hashes and slashes . - var routeStripper = /^[#\/]/; - - // Cached regex for detecting MSIE. - var isExplorer = /msie [\w.]+/; - - // Has the history handling already been started? - History.started = false; - - // Set up all inheritable **Backbone.History** properties and methods. - _.extend(History.prototype, Events, { - - // The default interval to poll for hash changes, if necessary, is - // twenty times a second. - interval: 50, - - // Gets the true hash value. Cannot use location.hash directly due to bug - // in Firefox where location.hash will always be decoded. - getHash: function(windowOverride) { - var loc = windowOverride ? windowOverride.location : window.location; - var match = loc.href.match(/#(.*)$/); - return match ? match[1] : ''; - }, - - // Get the cross-browser normalized URL fragment, either from the URL, - // the hash, or the override. - getFragment: function(fragment, forcePushState) { - if (fragment == null) { - if (this._hasPushState || forcePushState) { - fragment = window.location.pathname; - var search = window.location.search; - if (search) fragment += search; - } else { - fragment = this.getHash(); - } - } - if (!fragment.indexOf(this.options.root)) fragment = fragment.substr(this.options.root.length); - return fragment.replace(routeStripper, ''); - }, - - // Start the hash change handling, returning `true` if the current URL matches - // an existing route, and `false` otherwise. - start: function(options) { - if (History.started) throw new Error("Backbone.history has already been started"); - History.started = true; - - // Figure out the initial configuration. Do we need an iframe? - // Is pushState desired ... is it available? - this.options = _.extend({}, {root: '/'}, this.options, options); - this._wantsHashChange = this.options.hashChange !== false; - this._wantsPushState = !!this.options.pushState; - this._hasPushState = !!(this.options.pushState && window.history && window.history.pushState); - var fragment = this.getFragment(); - var docMode = document.documentMode; - var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7)); - - if (oldIE) { - this.iframe = $(' + {% trans 'View Larger Map' %} + diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/html/preview.html b/widgy/contrib/page_builder/templates/widgy/page_builder/html/preview.html new file mode 100644 index 000000000..6812b79bb --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/html/preview.html @@ -0,0 +1,6 @@ +{% extends "widgy/preview.html" %} +{% block content %} +
+ {{ self.content|safe|truncatewords_html:50 }} +
+{% endblock %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/html/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/html/render.html new file mode 100644 index 000000000..c60c6c84a --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/html/render.html @@ -0,0 +1,3 @@ +
+ {{ self.content|safe }} +
diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html b/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html new file mode 100644 index 000000000..e413ee60b --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html @@ -0,0 +1,11 @@ +{% extends 'widgy/preview.html' %} +{% load thumbnail_libs %} + +{% block content %} + {% if self.image %} + {% easy_thumbnail self.image.file "100x100" as im %} + + {% else %} +
+ {% endif %} +{% endblock %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html new file mode 100644 index 000000000..c57c751e6 --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html @@ -0,0 +1,5 @@ +{% load thumbnail_libs %} + +{% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} + {{ self.image.label }} +{% endthumbnail %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/preview.html b/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/preview.html new file mode 100644 index 000000000..b40f2838e --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/preview.html @@ -0,0 +1,7 @@ +{% extends "widgy/preview.html" %} +{% load widgy_tags %} +{% block content %} +
+ {{ self.content|markdown|truncatewords_html:50 }} +
+{% endblock %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/render.html new file mode 100644 index 000000000..add5fe23c --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/markdown/render.html @@ -0,0 +1,3 @@ +{% load widgy_tags %} + +{{ self.content|markdown }} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/section/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/section/render.html new file mode 100644 index 000000000..0b7adfac3 --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/section/render.html @@ -0,0 +1,18 @@ +{% load widgy_tags %} + +{% if section_behavior == 'tabs' %} +

{{ self.title }}:

+ + {% for child in self.get_children %} + {% render child %} + {% endfor %} +{% else %} +
+ {{ self.title }} +
+ {% for child in self.get_children %} + {% render child %} + {% endfor %} +
+
+{% endif %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/tableelement/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/tableelement/render.html new file mode 100644 index 000000000..61c80bb5c --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/tableelement/render.html @@ -0,0 +1,6 @@ +{% load widgy_tags %} +<{{ self.tag_name }}> + {% for child in self.get_children %} + {% render child %} + {% endfor %} + diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/tableheader/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/tableheader/render.html new file mode 100644 index 000000000..38e3bda94 --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/tableheader/render.html @@ -0,0 +1,8 @@ +{% load widgy_tags %} + + + {% for child in self.get_children %} + {% render child %} + {% endfor %} + + diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/tabs/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/tabs/render.html new file mode 100644 index 000000000..05a660826 --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/tabs/render.html @@ -0,0 +1,18 @@ +{% load widgy_tags %} + +
+
    + {% for tab in self.get_children %} +
  • {{ tab }}
  • + {% endfor %} +
+ + + {% with section_behavior='tabs' %} + {% for tab in self.get_children %} +
+ {% render tab %} +
+ {% endfor %} + {% endwith %} +
diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/unsafehtml/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/unsafehtml/render.html new file mode 100644 index 000000000..a3479348b --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/unsafehtml/render.html @@ -0,0 +1 @@ +{{ self.content|safe }} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/video/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/video/render.html new file mode 100644 index 000000000..ab342ceee --- /dev/null +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/video/render.html @@ -0,0 +1 @@ + diff --git a/widgy/contrib/page_builder/tests.py b/widgy/contrib/page_builder/tests.py new file mode 100644 index 000000000..bde7374ed --- /dev/null +++ b/widgy/contrib/page_builder/tests.py @@ -0,0 +1,229 @@ +from django.test import TestCase +from django.utils import unittest + +from widgy.site import WidgySite +from widgy.models import Node +from widgy.exceptions import ParentChildRejection + +from widgy.contrib.page_builder.models import ( + Table, TableRow, TableHeaderData, TableHeader, TableBody, + Accordion, +) +from widgy.contrib.page_builder.forms import CKEditorField + + +widgy_site = WidgySite() + + +def refetch(c): + return Node.objects.get(pk=c.node.pk).content + + +class TestTableWidget(TestCase): + def setUp(self): + self.table = Table.add_root(widgy_site) + + def test_add_column(self): + self.table.body.add_child(widgy_site, TableRow) + self.table.body.add_child(widgy_site, TableRow) + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 0) + self.assertEqual(len(self.table.body.get_children()[1].get_children()), 0) + + self.table.header.add_child(widgy_site, TableHeaderData) + + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 1) + self.assertEqual(len(self.table.body.get_children()[1].get_children()), 1) + + def test_add_column_front(self): + row_1 = self.table.body.add_child(widgy_site, TableRow) + row_2 = self.table.body.add_child(widgy_site, TableRow) + + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + + cell_1 = row_1.get_children()[0] + cell_2 = row_2.get_children()[0] + + th2 = th1.add_sibling(widgy_site, TableHeaderData) + + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 2) + self.assertEqual(len(self.table.body.get_children()[1].get_children()), 2) + self.assertEqual(refetch(row_1).get_children()[1], cell_1) + self.assertEqual(refetch(row_2).get_children()[1], cell_2) + + def test_three_columns(self): + row_1 = self.table.body.add_child(widgy_site, TableRow) + + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + th2 = th1.add_sibling(widgy_site, TableHeaderData) + + cell_1 = row_1.get_children()[0] + cell_2 = row_1.get_children()[1] + + th3 = th1.add_sibling(widgy_site, TableHeaderData) + + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 3) + self.assertEqual(refetch(row_1).get_children()[0], cell_1) + self.assertEqual(refetch(row_1).get_children()[2], cell_2) + + def test_three_columns_front(self): + row_1 = self.table.body.add_child(widgy_site, TableRow) + + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + th2 = th1.add_sibling(widgy_site, TableHeaderData) + + cell_1 = row_1.get_children()[0] + cell_2 = row_1.get_children()[1] + + th3 = th2.add_sibling(widgy_site, TableHeaderData) + + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 3) + self.assertEqual(refetch(row_1).get_children()[1], cell_1) + self.assertEqual(refetch(row_1).get_children()[2], cell_2) + + def test_add_row(self): + self.table.header.add_child(widgy_site, TableHeaderData) + self.table.header.add_child(widgy_site, TableHeaderData) + self.table.body.add_child(widgy_site, TableRow) + self.assertEqual(len(self.table.body.get_children()[0].get_children()), 2) + + self.table.body.add_child(widgy_site, TableRow) + + self.assertEqual(len(self.table.body.get_children()[1].get_children()), 2) + + def test_reorder(self): + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + th2 = self.table.header.add_child(widgy_site, TableHeaderData) + first_row = self.table.body.add_child(widgy_site, TableRow) + second_row = self.table.body.add_child(widgy_site, TableRow) + + first_row_before = [i.pk for i in first_row.get_children()] + second_row_before = [i.pk for i in second_row.get_children()] + + self.assertEqual(th1.get_next_sibling(), th2) + + th2.reposition(widgy_site, right=th1, parent=None) + + first_row, second_row = refetch(first_row), refetch(second_row) + self.assertEqual(first_row_before, list(reversed([i.pk for i in first_row.get_children()]))) + self.assertEqual(second_row_before, list(reversed([i.pk for i in second_row.get_children()]))) + self.assertEqual(refetch(th2).get_next_sibling(), th1) + self.assertEqual(refetch(th1).get_next_sibling(), None) + + def test_reorder_right_null(self): + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + th2 = self.table.header.add_child(widgy_site, TableHeaderData) + first_row = self.table.body.add_child(widgy_site, TableRow) + second_row = self.table.body.add_child(widgy_site, TableRow) + + first_row_before = [i.pk for i in first_row.get_children()] + second_row_before = [i.pk for i in second_row.get_children()] + + th1.reposition(widgy_site, right=None, parent=th1.get_parent()) + first_row, second_row = refetch(first_row), refetch(second_row) + + self.assertEqual(first_row_before, list(reversed([i.pk for i in first_row.get_children()]))) + self.assertEqual(second_row_before, list(reversed([i.pk for i in second_row.get_children()]))) + self.assertEqual(refetch(th1).get_next_sibling(), None) + + def test_delete_column(self): + th1 = self.table.header.add_child(widgy_site, TableHeaderData) + th2 = self.table.header.add_child(widgy_site, TableHeaderData) + first_row = self.table.body.add_child(widgy_site, TableRow) + second_row = self.table.body.add_child(widgy_site, TableRow) + + self.assertEqual(len(first_row.get_children()), 2) + self.assertEqual(len(second_row.get_children()), 2) + + th1.delete() + + first_row, second_row = refetch(first_row), refetch(second_row) + self.assertEqual(len(first_row.get_children()), 1) + self.assertEqual(len(second_row.get_children()), 1) + + def test_compatibility(self): + def invalid(parent, child_class): + with self.assertRaises(ParentChildRejection): + parent.add_child(widgy_site, child_class) + + # i don't know why these aren't raising + # invalid(self.table, TableHeader) + # invalid(self.table, TableBody) + invalid(self.table.header, TableRow) + invalid(self.table.body, TableHeaderData) + + row = self.table.body.add_child(widgy_site, TableRow) + invalid(row, TableRow) + invalid(row, TableHeaderData) + + def test_table_inside_of_table(self): + # this mainly exercises TableElement.table + self.table.header.add_child(widgy_site, TableHeaderData) + tr = self.table.body.add_child(widgy_site, TableRow) + td = tr.get_children()[0] + table2 = td.add_child(widgy_site, Table) + table2_tr = table2.body.add_child(widgy_site, TableRow) + + # the outer table has 1 column, the inside should have 0 + self.assertEqual(tr.get_children(), [td]) + self.assertEqual(table2_tr.get_children(), []) + + def test_move_rows(self): + table1 = self.table + table2 = Table.add_root(widgy_site) + + table1.header.add_child(widgy_site, TableHeaderData) + table2.header.add_child(widgy_site, TableHeaderData) + row = table2.body.add_child(widgy_site, TableRow) + + self.assertEqual(table2.body.get_children(), [row]) + self.assertEqual(table1.body.get_children(), []) + # a row can be moved to another table with the same number of rows + row.reposition(widgy_site, parent=table1.body) + self.assertEqual(table1.body.get_children(), [row]) + self.assertEqual(table2.body.get_children(), []) + + # but not a table with a different number of rows + table2.header.add_child(widgy_site, TableHeaderData) + with self.assertRaises(ParentChildRejection): + row.reposition(widgy_site, parent=table2.body) + + +class TestHtmlCleaning(TestCase): + def test_it(self): + """ + Make sure some common XSS vectors are filtered + """ + + test_cases = [ + ('">', '', ' onmouseover'), + ('ss', + '', ' +{% endfor %} +{% endcompress %} +{% endblock %} + +{% block seo_description %}{{ page.description }}{% endblock %} +{% block seo_keywords %}{{ page.keywords_string }}{% endblock %} + +{% block breadcrumb %} +

+ {% page_menu "pages/menus/breadcrumb.html" %} +

+{% endblock %} + +{% block leftnav %} + +{% endblock %} + +{% block content %} + {% render_root page.get_content_model 'root_node' %} +{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/mezzanine_base.html b/widgy/contrib/widgy_mezzanine/templates/widgy/mezzanine_base.html new file mode 100644 index 000000000..6dd0650ee --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/mezzanine_base.html @@ -0,0 +1,16 @@ +{% extends "layout_base.html" %} +{% load pages_tags %} + +{% block metadata %} +{{ page.meta_title }} + + +{% endblock %} + +{% block leftnav %} + {% page_menu 'pages/menus/leftnav.html' %} +{% endblock %} + +{% block breadcrumb %} +{{ block.super }} {% page_menu 'pages/menus/breadcrumb.html' %} +{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/clone_success.html b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/clone_success.html new file mode 100644 index 000000000..9ea2b4554 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/clone_success.html @@ -0,0 +1,7 @@ + +{% load argonauts %} + + diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/unpublish.html b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/unpublish.html new file mode 100644 index 000000000..308fe6b45 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/unpublish.html @@ -0,0 +1,20 @@ +{% extends "widgy/popup_base.html" %} +{% load i18n %} + +{% block content %} +

{% blocktrans with page_title=object.title %}Unpublishing {{ page_title }}{% endblocktrans %}

+

+ {% blocktrans %} + Unpublishing will cause this page to disappear from the live site. Users who + go to this page will get a 404 (File Not Found) error page. Are you sure you + want to unpublish this page? + {% endblocktrans %} +

+
+ {% csrf_token %} + +
+{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/versioned_widgy_field.html b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/versioned_widgy_field.html new file mode 100644 index 000000000..8e3c69520 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/versioned_widgy_field.html @@ -0,0 +1,8 @@ +{% extends "widgy/versioned_widgy_field_base.html" %} +{% load i18n %} +{% load staticfiles %} + +{% block widgy_tools %} +
  • {% trans "Schedule changes" %}
  • +
  • {% trans "Reset" %}
  • +{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_change_form.html b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_change_form.html new file mode 100644 index 000000000..c5a3ce604 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_change_form.html @@ -0,0 +1,40 @@ +{% extends "admin/change_form.html" %} +{% load i18n widgy_tags %} + +{% block object-tools %} + {% if change %} + + {% endif %} +{% endblock %} + +{% block submit_buttons_bottom %} +
    + {% if has_delete_permission and not add %} + + {% endif %} + {% for action, title in save_buttons %} + + {% endfor %} +
    +{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_clone_form.html b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_clone_form.html new file mode 100644 index 000000000..b45a66eee --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/templates/widgy/widgy_mezzanine/widgypage_clone_form.html @@ -0,0 +1,15 @@ +{% extends "widgy/popup_base.html" %} + +{% block popup-content %} +

    Cloning {{ object }}

    + +
    + {% csrf_token %} + {% for field in form %} + {% include "widgy/field_as_div.html" %} + {% endfor %} +

    + +

    +
    +{% endblock %} diff --git a/widgy/contrib/widgy_mezzanine/tests.py b/widgy/contrib/widgy_mezzanine/tests.py new file mode 100644 index 000000000..022ee5050 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/tests.py @@ -0,0 +1,632 @@ +from __future__ import absolute_import +import mock +import datetime +from contextlib import contextmanager +import uuid + +from django.test import TestCase +from django.utils.unittest import skipUnless +from django.test.client import RequestFactory +from django.test.utils import override_settings +from django import forms +from django.conf import settings +from django.core.exceptions import PermissionDenied +from django.utils import timezone +from django.core import urlresolvers +from django.contrib.auth.models import Permission, AnonymousUser +from django.contrib.contenttypes.models import ContentType +from django.contrib import admin +from django.db.models.signals import post_save +from django.conf.urls import url, include +from django.core.urlresolvers import get_resolver + +from mezzanine.core.models import (CONTENT_STATUS_PUBLISHED, + CONTENT_STATUS_DRAFT) + +from widgy.site import WidgySite +from widgy.utils import get_user_model +from widgy.contrib.widgy_mezzanine import get_widgypage_model +from widgy.contrib.widgy_mezzanine.views import ClonePageView, UnpublishView +from widgy.db.fields import get_site + +from widgy.contrib.widgy_mezzanine.admin import WidgyPageAdmin + +User = get_user_model() +widgy_site = WidgySite() +WidgyPage = get_widgypage_model() + +# XXX: Let django import the urlconf module. Django does it smarter +urlpatterns = get_resolver(None).url_patterns +urlpatterns = urlpatterns + [ + url('^widgy_site/', include(widgy_site.urls)), + url('^accounts/', include('django.contrib.auth.urls')), +] + +FORM_BUILDER_INSTALLED = 'widgy.contrib.form_builder' in settings.INSTALLED_APPS + +if FORM_BUILDER_INSTALLED: + from widgy.contrib.form_builder.models import Form, FormInput + from widgy.contrib.widgy_mezzanine.views import handle_form + +PAGE_BUILDER_INSTALLED = 'widgy.contrib.page_builder' in settings.INSTALLED_APPS + +if PAGE_BUILDER_INSTALLED: + from widgy.contrib.page_builder.models import Button, DefaultLayout + from widgy.contrib.widgy_mezzanine.views import PreviewView + +REVIEW_QUEUE_INSTALLED = 'widgy.contrib.review_queue' in settings.INSTALLED_APPS + +if REVIEW_QUEUE_INSTALLED: + from widgy.contrib.review_queue.site import ReviewedWidgySite + reviewed_widgy_site = ReviewedWidgySite() + urlpatterns += [url('^reviewed_widgy_site/', include(reviewed_widgy_site.urls))] + + +def make_reviewed(fn): + """ + Just setting the WIDGY_MEZZANINE_SITE is not enough during tests, because + WidgyPage.root_node has been set to point to VersionTracker. We have to + manually point it to ReviewedVersionTracker. We do this only in tests + because on a normal run, you are never going to be changing what models a + ForeignKey points to (I would hope). + """ + from widgy.contrib.widgy_mezzanine.admin import publish_page_on_approve + + site = reviewed_widgy_site + rel = WidgyPage._meta.get_field('root_node').rel + old_to = rel.to + dispatch_uid = str(uuid.uuid4()) + + fn = override_settings(WIDGY_MEZZANINE_SITE=site)(fn) + fn = skipUnless(REVIEW_QUEUE_INSTALLED, 'review_queue is not installed')(fn) + + def up(): + rel.to = site.get_version_tracker_model() + post_save.connect(publish_page_on_approve, + sender=site.get_version_tracker_model().commit_model, + dispatch_uid=dispatch_uid) + + def down(): + rel.to = old_to + post_save.disconnect(dispatch_uid=dispatch_uid) + + if isinstance(fn, type): + old_pre_setup = fn._pre_setup + old_post_teardown = fn._post_teardown + + def _pre_setup(self): + up() + old_pre_setup(self) + + def _post_teardown(self): + old_post_teardown(self) + down() + + fn._pre_setup = _pre_setup + fn._post_teardown = _post_teardown + + return fn + else: + def change_foreign_key(*args, **kwargs): + up() + try: + return fn(*args, **kwargs) + finally: + down() + return change_foreign_key + + +@skipUnless(FORM_BUILDER_INSTALLED, 'form_builder not installed') +class TestFormHandler(TestCase): + def setUp(self): + self.factory = RequestFactory() + self.form = Form.add_root(widgy_site) + + def test_get(self): + req = self.factory.get('/?from=/foo/') + resp = handle_form(req, form_node_pk=self.form.node.pk) + + self.assertEqual(resp['Location'], '/foo/') + + def test_post(self): + req = self.factory.post('/?from=/foo/') + + with mock.patch.object(Form, 'execute') as form_execute: + form_execute.return_value = object() + resp = handle_form(req, form_node_pk=self.form.node.pk) + + args, kwargs = form_execute.call_args + self.assertIs(args[0], req) + self.assertIsInstance(args[1], forms.BaseForm) + + # should use the form's response + self.assertIs(resp, form_execute.return_value) + + def test_post_rerender(self): + self.form.children['fields'].add_child(widgy_site, FormInput, + label='foo', + required=True, + type='text', + ) + + req = self.factory.post('/?from=/foo/') + req.user = User(is_superuser=True) + + with mock.patch.object(Form, 'execute') as form_execute: + with mock.patch('widgy.contrib.widgy_mezzanine.views.page_view') as page_view: + page_view.return_value = object() + resp = handle_form(req, form_node_pk=self.form.node.pk) + + form_execute.assert_not_called() + + self.assertIs(resp, page_view.return_value) + + args, kwargs = page_view.call_args + self.assertIs(args[0], req) + extra_context = kwargs['extra_context'] + + self.assertEqual(extra_context['root_node_override'], self.form.node) + + django_form = extra_context[self.form.context_var] + self.assertIsInstance(django_form, forms.BaseForm) + self.assertTrue(django_form.errors) + + @override_settings(MIDDLEWARE_CLASSES=settings.MIDDLEWARE_CLASSES + ( + 'mezzanine.pages.middleware.PageMiddleware', + )) + def test_post_no_404(self): + """ + Mezzanine==3.1.2 introduced a change that caused calls to page view + (such as in the form_invalid of the handle_form view to 404. This test + ensures that there is no 404. + """ + from widgy.contrib.widgy_mezzanine.models import WidgyPage + page = WidgyPage.objects.create(title='Test') + + self.form.children['fields'].add_child(widgy_site, FormInput, + label='foo', + required=True, + type='text', + ) + + req = self.factory.post('/?from=/foo/') + req.user = User(is_superuser=True) + + resp = handle_form(req, form_node_pk=self.form.node.pk, slug=page.slug) + + self.assertEqual(resp.status_code, 200) + + +class UserSetup(object): + def setUp(self): + super(UserSetup, self).setUp() + self.superuser = User.objects.create_superuser('superuser', 'test@example.com', 'password') + self.staffuser = User.objects.create_user('staffuser', 'test@example.com', 'password') + self.staffuser.is_staff = True + self.staffuser.save() + self.staffuser.user_permissions = Permission.objects.filter( + content_type__app_label__in=['pages', 'widgy_mezzanine', 'review_queue'] + ).exclude(codename='change_reviewedversioncommit') + + @contextmanager + def as_user(self, username): + self.client.login(username=username, password='password') + yield + self.client.logout() + + +@skipUnless(PAGE_BUILDER_INSTALLED, 'page_builder is not installed') +@override_settings(MIDDLEWARE_CLASSES=settings.MIDDLEWARE_CLASSES + ( + 'mezzanine.pages.middleware.PageMiddleware', +)) +class TestPreviewView(UserSetup, TestCase): + urls = 'widgy.contrib.widgy_mezzanine.tests' + + def setUp(self): + super(TestPreviewView, self).setUp() + self.factory = RequestFactory() + self.preview_view = PreviewView.as_view(site=widgy_site) + self.request = self.factory.get('/') + self.request.user = User(is_superuser=True, is_staff=True) + + def test_preview(self): + page = WidgyPage.objects.create(title='Test') + root_node1 = Button.add_root(widgy_site, text='Test 1') + root_node2 = Button.add_root(widgy_site, text='Test 2') + + resp1 = self.preview_view(self.request, node_pk=root_node1.node.pk, page_pk=page.pk) + + self.assertEqual(resp1.status_code, 200) + self.assertIn('Test 1', resp1.rendered_content) + self.assertEqual(resp1.context_data['page'].get_content_model(), page) + + resp2 = self.preview_view(self.request, node_pk=root_node2.node.pk, page_pk=page.pk) + + self.assertEqual(resp2.status_code, 200) + self.assertIn('Test 2', resp2.rendered_content) + + def test_preview_without_page(self): + button = Button.add_root(widgy_site, text='Button text') + + resp = self.preview_view(self.request, node_pk=button.node.pk) + self.assertIn(button.text, resp.rendered_content) + + def test_legacy_url(self): + page = WidgyPage.objects.create(title='Foo') + root_node = Button.add_root(widgy_site, text='Foo').node + with self.as_user('superuser'): + r = self.client.get(urlresolvers.reverse( + 'widgy.contrib.widgy_mezzanine.views.preview', + kwargs={'slug': page.slug, 'node_pk': root_node.pk} + )) + self.assertRedirects( + response=r, + expected_url= urlresolvers.reverse( + 'widgy.contrib.widgy_mezzanine.views.preview', + kwargs={'page_pk': page.pk, 'node_pk': root_node.pk} + ), + status_code=301, + ) + + def test_redirects_to_login(self): + """ + Unauthenticated users trying to preview should be redirected to the login page. + """ + + button = Button.add_root(widgy_site, text='Button text') + request = self.factory.get('/') + request.user = AnonymousUser() + resp = self.preview_view(request, node_pk=button.node.pk) + self.assertEqual(resp['Location'], urlresolvers.reverse('login') + '?next=' + request.get_full_path()) + + +@skipUnless(PAGE_BUILDER_INSTALLED, 'page_builder is not installed') +class PageSetup(object): + def setUp(self): + super(PageSetup, self).setUp() + self.factory = RequestFactory() + + site = get_site(getattr(settings, 'WIDGY_MEZZANINE_SITE', widgy_site)) + + self.page = WidgyPage.objects.create( + root_node=site.get_version_tracker_model().objects.create( + working_copy=Button.add_root(site, text='buttontext').node, + ), + title='titleabc', + slug='slugabc', + ) + + +class AdminView(PageSetup): + def as_view(self, **kwargs): + kwargs.setdefault('has_permission', lambda req: True) + kwargs.setdefault('model', WidgyPage) + return self.view_cls.as_view(**kwargs) + + def test_permissions(self): + with self.assertRaises(PermissionDenied): + forbid_everything = lambda req: False + req = self.factory.get('/') + self.as_view(has_permission=forbid_everything)(req, str(self.page.pk)) + + +class TestClonePage(AdminView, TestCase): + view_cls = ClonePageView + + def test_get(self): + view = self.as_view(model=WidgyPage) + + resp = view(self.factory.get('/'), str(self.page.pk)) + self.assertEqual(resp.status_code, 200) + self.assertIn(self.page.title, resp.rendered_content) + self.assertNotIn(self.page.slug, resp.rendered_content) + + def test_post(self): + view = self.as_view(model=WidgyPage) + with mock.patch('django.contrib.messages.success') as success_mock: + req = self.factory.post('/', {'title': 'new title'}) + + view(req, str(self.page.pk)) + + new_page = WidgyPage.objects.exclude(pk=self.page.pk).get() + + success_mock.assert_called_with(req, mock.ANY) + success_message = success_mock.call_args[0][1] + self.assertIn(self.page.title, success_message) + self.assertIn(new_page.title, success_message) + + self.assertNotEqual(new_page.slug, self.page.slug) + self.assertEqual(new_page.title, 'new title') + + self.assertEqual(new_page.root_node.working_copy.content.text, 'buttontext') + + +class TestUnpublish(AdminView, TestCase): + view_cls = UnpublishView + + def test_unpublish(self): + self.assertEqual(self.page.status, CONTENT_STATUS_PUBLISHED) + + view = self.as_view(model=WidgyPage) + resp = view(self.factory.get('/'), str(self.page.pk)) + self.assertEqual(resp.status_code, 200) + self.assertIn(self.page.title, resp.rendered_content) + + with mock.patch('django.contrib.messages.success') as success_mock: + req = self.factory.post('/') + resp = view(req, str(self.page.pk)) + self.assertEqual(resp.status_code, 302) + success_mock.assert_called_with(req, mock.ANY) + + self.page = WidgyPage.objects.get(pk=self.page.pk) + self.assertEqual(self.page.status, CONTENT_STATUS_DRAFT) + + +class AdminButtonsTestBase(PageSetup, UserSetup): + urls = 'widgy.contrib.widgy_mezzanine.tests' + + def setUp(self): + super(AdminButtonsTestBase, self).setUp() + self.model_admin = WidgyPageAdmin(WidgyPage, admin.site) + + def test_save_and_commit_without_changes(self): + req = self.factory.post('/') + req.user = self.superuser + + self.model_admin._save_and_commit(req, self.page) + self.assertEqual(self.page.root_node.commits.count(), 1) + # save and commit again should not commit again when there are no + # changes to commit + self.model_admin._save_and_commit(req, self.page) + self.assertEqual(self.page.root_node.commits.count(), 1) + + +@skipUnless(PAGE_BUILDER_INSTALLED, 'page_builder is not installed') +@override_settings(WIDGY_MEZZANINE_SITE=widgy_site) +class TestAdminButtons(AdminButtonsTestBase, TestCase): + def setUp(self): + super(TestAdminButtons, self).setUp() + self.client.login(username='superuser', password='password') + + def test_status_embryo(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_add') + response = self.client.get(url) + self.assertIn('Save', response.content) + + def test_status_embryo_save(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_add') + response = self.client.get(url) + data = { + '_continue': '', + 'title': 'Title', + 'slug': 'test_status_embryo_save', + 'root_node': ContentType.objects.get_for_model(DefaultLayout).pk, + } + response = self.client.post(url, data) + self.assertEqual(response.status_code, 302) + page = WidgyPage.objects.get(slug='test_status_embryo_save') + self.assertEqual(page.status, CONTENT_STATUS_DRAFT) + + def test_save_and_commit(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + req = self.factory.post('/') + req.user = self.superuser + self.model_admin._save_and_commit(req, self.page) + self.assertEqual(self.page.status, CONTENT_STATUS_PUBLISHED) + + def test_save_and_commit_without_permission(self): + self.model_admin = WidgyPageAdmin(WidgyPage, admin.site) + req = self.factory.post('/') + req.user = self.staffuser + + self.staffuser.user_permissions.filter(codename='add_versioncommit').delete() + + with mock.patch('django.contrib.messages.error') as error_mock: + self.model_admin._save_and_commit(req, self.page) + error_mock.assert_called_with(req, mock.ANY) + self.assertEqual(self.page.root_node.commits.count(), 0) + + def test_status_draft(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + response = self.client.get(url) + self.assertIn('Save as Draft', response.content) + self.assertIn('Publish', response.content) + + def test_status_published(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + response = self.client.get(url) + self.assertIn('Publish Changes', response.content) + + def test_delete_button(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_add') + response = self.client.get(url) + self.assertNotIn('Delete', response.content) + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + response = self.client.get(url) + self.assertIn('Delete', response.content) + + +@make_reviewed +class TestAdminButtonsWhenReviewed(AdminButtonsTestBase, TestCase): + def test_save_and_commit(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + req = self.factory.post('/') + req.user = self.staffuser + self.model_admin._save_and_commit(req, self.page) + self.assertEqual(self.page.status, CONTENT_STATUS_DRAFT) + self.assertEqual(self.page.root_node.commits.count(), 1) + commit = self.page.root_node.commits.get() + self.assertFalse(commit.reviewedversioncommit.is_approved) + + def test_save_and_approve(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + req = self.factory.post('/') + req.user = self.superuser + self.model_admin._save_and_approve(req, self.page) + self.assertEqual(self.page.status, CONTENT_STATUS_PUBLISHED) + self.assertEqual(self.page.root_node.commits.count(), 1) + self.assertTrue(self.page.root_node.head.reviewedversioncommit.is_approved) + + def test_save_and_approve_without_permission(self): + req = self.factory.post('/') + req.user = self.staffuser + with mock.patch('django.contrib.messages.error') as error_mock: + self.model_admin._save_and_approve(req, self.page) + error_mock.assert_called_with(req, mock.ANY) + self.assertEqual(self.page.root_node.commits.count(), 0) + + def test_save_and_approve_without_commit(self): + commit = self.page.root_node.commit() + req = self.factory.post('/') + req.user = self.superuser + self.model_admin._save_and_approve(req, self.page) + self.assertTrue(refetch(commit).reviewedversioncommit.is_approved) + self.assertEqual(self.page.root_node.commits.count(), 1) + + def test_save_and_commit_without_changes(self): + with mock.patch('django.contrib.messages.warning') as warning_mock: + super(TestAdminButtonsWhenReviewed, self).test_save_and_commit_without_changes() + warning_mock.assert_called_with(mock.ANY, mock.ANY) + + def test_status_embryo(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_add') + # same for staff or superuser + with self.as_user('staffuser'): + response = self.client.get(url) + self.assertIn('Save', response.content) + + def test_status_draft(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + with self.as_user('staffuser'): + response = self.client.get(url) + self.assertIn('Save as Draft', response.content) + self.assertIn('Submit for Review', response.content) + self.assertNotIn('_save_and_approve', response.content) + with self.as_user('superuser'): + response = self.client.get(url) + self.assertIn('Save as Draft', response.content) + self.assertIn('Submit for Review', response.content) + self.assertIn('_save_and_approve', response.content) + + def test_status_published(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + with self.as_user('staffuser'): + response = self.client.get(url) + self.assertNotIn('Save as Draft', response.content) + self.assertIn('Submit for Review', response.content) + self.assertNotIn('_save_and_approve', response.content) + with self.as_user('superuser'): + response = self.client.get(url) + self.assertNotIn('Save as Draft', response.content) + self.assertIn('Submit for Review', response.content) + + +class TestAdminMessages(PageSetup, TestCase): + urls = 'widgy.contrib.widgy_mezzanine.tests' + + def setUp(self): + super(TestAdminMessages, self).setUp() + self.user = User.objects.create_superuser('test', 'test@example.com', 'password') + self.client.login(username='test', password='password') + + def test_future_schedule_message(self): + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + self.page.root_node.commit(publish_at=timezone.now() + datetime.timedelta(days=1)) + response = self.client.get(url) + self.assertIn('one future-scheduled commit', response.content) + # make the future commit uninteresting + self.page.root_node.commit() + response = self.client.get(url) + self.assertNotIn('future-scheduled commit', response.content) + + @make_reviewed + def test_unapproved_commit_message(self): + self.page = refetch(self.page) + url = urlresolvers.reverse('admin:widgy_mezzanine_widgypage_change', args=(self.page.pk,)) + self.page.root_node.commit() + response = self.client.get(url) + self.assertIn('one unreviewed commit', response.content) + # make the unreviewed commit uninteresting + new_commit = self.page.root_node.commit() + new_commit.approve(user=self.user) + response = self.client.get(url) + self.assertNotIn('unreviewed commit', response.content) + + +def refetch(obj): + return obj.__class__.objects.get(pk=obj.pk) + + +@make_reviewed +class TestPublicationCommitHandling(PageSetup, TestCase): + def setUp(self): + super(TestPublicationCommitHandling, self).setUp() + self.user = User.objects.create_superuser( + username='asfd', password='asdfasdf', email='asdf@example.com', + ) + + self.vt = self.page.root_node + + def test_publish_on_commit(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + + commit = self.vt.commit() + commit.publish_at = timezone.now() + datetime.timedelta(days=1) + + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_DRAFT) + + commit.approve(self.user) + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + self.assertEqual(refetch(self.page).publish_date, refetch(commit).publish_at) + + def test_committing_again_does_nothing(self): + self.page.status = CONTENT_STATUS_DRAFT + self.page.save() + + commit = self.vt.commit() + commit.approve(self.user) + original_publish_date = refetch(self.page).publish_date + + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + self.vt.commit(publish_at=timezone.now() + datetime.timedelta(days=1)) + + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + self.assertEqual(refetch(self.page).publish_date, original_publish_date) + + def test_publish_commit_moves_publish_date_up(self): + self.page.publish_date = timezone.now() + datetime.timedelta(days=1) + self.page.save() + + commit = self.vt.commit() + commit.approve(self.user) + self.assertEqual(refetch(self.page).publish_date, refetch(commit).publish_at) + + def test_unapprove_commit_unpublishes_page_when_there_are_no_other_published_commits(self): + commit = self.vt.commit() + commit.approve(self.user) + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + + commit.unapprove(self.user) + + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_DRAFT) + + def test_unapprove_commit_corrects_publish_date_there_is_another_commit(self): + c1 = self.vt.commit() + c1.approve(self.user) + + c2 = self.vt.commit(publish_at=timezone.now() + datetime.timedelta(days=1)) + c2.approve(self.user) + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + + c1.unapprove(self.user) + + self.assertEqual(refetch(self.page).status, CONTENT_STATUS_PUBLISHED) + self.assertEqual(refetch(self.page).publish_date, refetch(c2).publish_at) diff --git a/widgy/contrib/widgy_mezzanine/urls.py b/widgy/contrib/widgy_mezzanine/urls.py new file mode 100644 index 000000000..1cfcda957 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/urls.py @@ -0,0 +1,11 @@ +from django.conf.urls import patterns, url + +urlpatterns = patterns('widgy.contrib.widgy_mezzanine.views', + url('^preview/(?P[^/]+)/$', 'preview'), # undelete + url('^preview-page/(?P[^/]+)/(?P[^/]+)/$', 'preview'), + url('^form-page/(?P[^/]*)/(?P[^/]+)/$', 'handle_form'), + + # deprecated urls for backwards compatibility with slug reversing + url('^preview/(?P[^/]+)/(?P.+)/$', 'preview'), + url('^form/(?P[^/]*)/(?P.+)/$', 'handle_form'), +) diff --git a/widgy/contrib/widgy_mezzanine/views.py b/widgy/contrib/widgy_mezzanine/views.py new file mode 100644 index 000000000..cf1063b24 --- /dev/null +++ b/widgy/contrib/widgy_mezzanine/views.py @@ -0,0 +1,236 @@ +import warnings + +from django.db.models import Q +from django.views.generic import View, UpdateView, DetailView +from django.views.generic.detail import SingleObjectMixin +from django.conf import settings +from django.http import ( + HttpResponseBadRequest, + HttpResponseForbidden, + HttpResponsePermanentRedirect, + HttpResponseRedirect, +) +from django.utils.http import is_safe_url +from django.contrib.admin.util import unquote +from django.contrib import messages +from django.shortcuts import get_object_or_404, render +from django.core.exceptions import PermissionDenied +from django.core import urlresolvers +from django import forms +from django.utils.translation import ugettext as _ + +from mezzanine.pages.views import page as page_view +from mezzanine.pages.models import Page +from mezzanine.core.models import CONTENT_STATUS_DRAFT + +from widgy.contrib.form_builder.views import HandleFormMixin +from widgy.contrib.widgy_mezzanine import get_widgypage_model +from widgy.models import Node +from widgy.views.base import AuthorizedMixin +from widgy.utils import fancy_import, unset_pks + +WidgyPage = get_widgypage_model() + + +def get_page_from_node(node): + root_node = node.get_root() + try: + # try to find a page that uses this root node + return WidgyPage.objects.distinct().get( + Q(root_node__commits__root_node=root_node) | Q(root_node__working_copy=root_node) + ) + except WidgyPage.DoesNotExist: + # otherwise, use a fake page + return WidgyPage( + titles='restoring page', + content_model='widgypage', + slug='restoring-page', + ) + + +class PageViewMixin(object): + def get_page(self): + try: + qs = Page.objects.published(for_user=self.request.user) + if 'slug' in self.kwargs: + warnings.warn( + """ +Using slug when reversing widgy.contrib.widgy_mezzanine.views.handle_form or +widgy.contrib.widgy_mezzanine.preview is deprecated. You should update your +code to look like this: + + url = urlresolvers.reverse('widgy.contrib.widgy_mezzanine.views.preview', kwargs={ + 'node_pk': node.pk, + 'page_pk': page.pk, + }) +""", + DeprecationWarning + ) + return qs.get(slug=self.kwargs['slug']) + else: + return qs.get(pk=self.kwargs['page_pk']) + except (KeyError, Page.DoesNotExist): + # restoring, use a fake page + return WidgyPage( + titles='restoring page', + content_model='widgypage', + slug='restoring-page', + ) + + def page_view(self, request, page, context): + # Before Mezzanine==3.1.2, the page view would check extra_context for + # the page object, so we would pass it in then, starting with 3.1.2 and + # the introduction of mezzanine.pages.context_processors.page, + # Mezzanine expects the PageMiddleware to set page on the request. The + # context_processor will add the page and _current_page values to the + # context for us, but we are still passing it in for Mezzanine<=3.1.1. + if hasattr(page, 'page_ptr'): + # mezzanine.pages.middleware.PageMiddleware sticks a Page object, + # not a WidgyPage object, to the request so we also need to get the + # raw Page object. + page = page.page_ptr + + request.page = page + + extra_context = { + 'page': page, + '_current_page': page, + } + extra_context.update(context) + + return page_view(request, page.slug, extra_context=extra_context) + + +class HandleFormView(HandleFormMixin, PageViewMixin, View): + def get(self, request, *args, **kwargs): + try: + if not is_safe_url(request.GET['from']): + return HttpResponseForbidden() + return HttpResponsePermanentRedirect(request.GET['from']) + except KeyError: + return HttpResponseBadRequest() + + def form_invalid(self, form): + root_node = self.form_node.get_root() + page = self.get_page() + + context = self.get_context_data( + form=form, + root_node_override=root_node, + ) + + return self.page_view(self.request, page, context) + +handle_form = HandleFormView.as_view() + + +class PreviewView(AuthorizedMixin, SingleObjectMixin, PageViewMixin, View): + model = Node + pk_url_kwarg = 'node_pk' + + def get(self, request, *args, **kwargs): + node = self.get_object() + page = self.get_page() + if 'slug' in self.kwargs: + return HttpResponsePermanentRedirect(urlresolvers.reverse( + preview, kwargs={'page_pk': page.pk, 'node_pk': node.pk} + )) + + context = { + 'root_node_override': node, + } + + return self.page_view(request, page, context) + +preview = PreviewView.as_view( + site=fancy_import(settings.WIDGY_MEZZANINE_SITE), +) + + +class CloneForm(forms.ModelForm): + class Meta: + model = WidgyPage + fields = ['title', 'slug'] + + def __init__(self, *args, **kwargs): + super(CloneForm, self).__init__(*args, **kwargs) + self.fields['title'].label = _('New title') + self.fields['slug'].label = _('New URL') + + +class AdminViewMixin(object): + def get_object(self): + obj = get_object_or_404(self.model, pk=unquote(self.args[0])) + return obj + + def dispatch(self, request, *args, **kwargs): + if not self.has_permission(request): + raise PermissionDenied + return super(AdminViewMixin, self).dispatch(request, *args, **kwargs) + + def get_success_url(self): + return urlresolvers.reverse('admin:{0}_{1}_change'.format( + self.object._meta.app_label, + self.object._meta.module_name), args=(self.object.pk,)) + + +class ClonePageView(AdminViewMixin, UpdateView): + form_class = CloneForm + template_name = 'widgy/widgy_mezzanine/widgypage_clone_form.html' + has_permission = None + + def get_object(self): + obj = super(ClonePageView, self).get_object() + self.original_title = obj.title + return obj + + def get_initial(self): + initial = super(ClonePageView, self).get_initial() + initial['slug'] = None + return initial + + def form_valid(self, form): + page = form.instance + unset_pks(page) + page.root_node = page.root_node.clone() + page.status = CONTENT_STATUS_DRAFT + form.save() + + messages.success( + self.request, + _("'{old_title}' successfully cloned as '{new_title}'.").format( + old_title=self.original_title, + new_title=page.title, + ) + ) + # We can't do a normal HTTP redirect because the form is in a modal + # window. + return render(self.request, 'widgy/widgy_mezzanine/clone_success.html', { + 'success_url': self.get_success_url(), + }) + + def get_context_data(self, **kwargs): + kwargs = super(ClonePageView, self).get_context_data(**kwargs) + kwargs['is_popup'] = True + return kwargs + + +class UnpublishView(AdminViewMixin, DetailView): + template_name = 'widgy/widgy_mezzanine/unpublish.html' + has_change_permission = None + + def dispatch(self, request, *args, **kwargs): + # BBB django 1.4 sets args/kwargs in dispatch not as_view like later + # versions + self.args = args + self.object = self.get_object() + return super(UnpublishView, self).dispatch(request, *args, **kwargs) + + def has_permission(self, request): + return self.has_change_permission(request, self.object) + + def post(self, *args, **kwargs): + self.object.status = CONTENT_STATUS_DRAFT + self.object.save() + messages.success(self.request, "Page unpublished.") + return HttpResponseRedirect(self.get_success_url()) diff --git a/widgy/db/__init__.py b/widgy/db/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/widgy/db/fields.py b/widgy/db/fields.py new file mode 100644 index 000000000..89edc569f --- /dev/null +++ b/widgy/db/fields.py @@ -0,0 +1,194 @@ +from django.db import models +from django.db.models.fields.related import ReverseSingleRelatedObjectDescriptor +from django.db.models.loading import get_app +from django.contrib.contenttypes.models import ContentType +from django.utils.functional import SimpleLazyObject + +# WidgyContentType has a patched get_for_models that doesn't ignore proxy +# models +from widgy.generic.models import ContentType as WidgyContentType +from widgy.utils import fancy_import, update_context + +try: + from south.modelsinspector import add_introspection_rules +except ImportError: # South not installed + pass +else: + add_introspection_rules([], ["^widgy\.db.fields\.WidgyField"]) + add_introspection_rules([], ["^widgy\.db.fields\.VersionedWidgyField"]) + + +def get_site(site): + if isinstance(site, basestring): + return fancy_import(site) + else: + return site + + +class WidgyFieldObjectDescriptor(ReverseSingleRelatedObjectDescriptor): + """ + .. note:: + we need to transport the ContentType of the Node all the way to + ``pre_save``, without saving an instance of the node, because we don't + know if the rest of the model is valid yet. + """ + def __set__(self, instance, value): + """ + """ + if isinstance(value, ContentType): + ModelClass = self.field.rel.to + value, value._ct = ModelClass(), value + + super(WidgyFieldObjectDescriptor, self).__set__(instance, value) + + +class WidgyField(models.ForeignKey): + """ + Model field that inherits from ``models.ForeignKey``. Contains validation + and context switching that is needed for Widgy fields. + """ + def __init__(self, site=None, to=None, root_choices=None, **kwargs): + if to is None: + to = 'widgy.Node' + + self.root_choices = root_choices + + self.site = get_site(site) + + super(WidgyField, self).__init__(to, **kwargs) + + def contribute_to_class(self, cls, name): + """ + + .. note:: we need to use WidgyFieldObjectDescriptor instead of + ``ReverseSingleRelatedObjectDescriptor`` because of the modifications + to __set__. + """ + super(WidgyField, self).contribute_to_class(cls, name) + setattr(cls, self.name, WidgyFieldObjectDescriptor(self)) + + def add_root(self, model_instance, root_content_kwargs={}): + value = getattr(model_instance, self.name) + return value._ct.model_class().add_root(self.site, **root_content_kwargs).node + + def pre_save(self, model_instance, add): + """ + Relies on WidgyFieldObjectDescriptor to set the content type on an + unsaved throwaway Node so that we know how to properly instantiate a + real node later on. + """ + try: + value = getattr(model_instance, self.name) + except models.ObjectDoesNotExist: + value = None + + if hasattr(value, '_ct'): + node = self.add_root(model_instance) + setattr(model_instance, self.name, node) + setattr(model_instance, self.attname, node.pk) + + return super(WidgyField, self).pre_save(model_instance, add) + + def formfield(self, **kwargs): + from widgy.forms import WidgyFormField + + defaults = { + 'form_class': WidgyFormField, + 'queryset': SimpleLazyObject(lambda: self.get_layout_contenttypes(self.root_choices)), + 'site': self.site, + } + defaults.update(kwargs) + return super(WidgyField, self).formfield(**defaults) + + def get_layout_contenttypes(self, layouts): + def normalize(layout): + try: + app_label, model_name = layout.split(".") + except ValueError: + app_label = self.model._meta.app_label + model_name = layout + except AttributeError: + app_label = layout._meta.app_label + model_name = layout._meta.object_name + + # we cannot use models.get_model because this class could be + # abstract. + return getattr(get_app(app_label), model_name) + + layouts = tuple(map(normalize, layouts)) + classes = (cls for cls in self.site.get_all_content_classes() + if issubclass(cls, layouts)) + + # This method must return a queryset, because it is used as + # choices for a ModelChoiceField. + # + # If you are having trouble running tests because of this line, + # do not create WidgyFormMixin subclasses at the root level, the + # test databases haven't been set up yet, but we try to query + # the ContentType table. + return ContentType.objects.filter(pk__in=[ + ct.pk for ct in WidgyContentType.objects.get_for_models( + for_concrete_models=False, + *classes + ).values()]) + + def get_render_node(self, model_instance, context): + return getattr(model_instance, self.name) + + def render(self, model_instance, context=None, node=None): + root_node = node or self.get_render_node(model_instance, context) + if not root_node: + return 'no content' + + root_node.prefetch_tree() + env = { + 'widgy': { + 'site': self.site, + 'owner': model_instance, + 'root_node': root_node, + 'parent': context and context.get('widgy'), + }, + } + with update_context(context, env) as context: + return root_node.render(context) + + def validate(self, value, model_instance): + # `value` is our root node's pk. If we're currently creating + # the root node, it isn't saved so it can't have a pk. The base + # field's validate will fail, even though pre_save will actually + # create a node and set the fk field. + if value is None and not self.blank and getattr(model_instance, self.name): + return + else: + return super(WidgyField, self).validate(value, model_instance) + + +class VersionedWidgyField(WidgyField): + def __init__(self, site=None, to=None, root_choices=None, **kwargs): + if to is None: + to = get_site(site).get_version_tracker_model() + super(VersionedWidgyField, self).__init__(site, to, root_choices, **kwargs) + + def add_root(self, model_instance, root_content_kwargs={}): + VersionTracker = self.site.get_version_tracker_model() + node = super(VersionedWidgyField, self).add_root(model_instance, root_content_kwargs) + version_tracker = VersionTracker.objects.create( + working_copy=node + ) + return version_tracker + + def formfield(self, **kwargs): + from widgy.forms import VersionedWidgyFormField + return super(VersionedWidgyField, self).formfield( + form_class=VersionedWidgyFormField, + **kwargs) + + def get_render_node(self, model_instance, context): + version_tracker = getattr(model_instance, self.name) + if version_tracker: + node = version_tracker.get_published_node(context and context.get('request')) + if node is None: + node = version_tracker.working_copy + return node + else: + return None diff --git a/widgy/debugtoolbar/__init__.py b/widgy/debugtoolbar/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/widgy/debugtoolbar/templates.py b/widgy/debugtoolbar/templates.py new file mode 100644 index 000000000..02de38ac5 --- /dev/null +++ b/widgy/debugtoolbar/templates.py @@ -0,0 +1,76 @@ +from django.dispatch import Signal +from django.template.loader import select_template, TemplateDoesNotExist +from django.contrib.staticfiles import finders + +from debug_toolbar.panels import DebugPanel + +from widgy.models import Content + +template_hierarchy_called = Signal(providing_args=['cls', 'kwargs', 'templates', 'used']) + + +def unique_list(lst): + """ + Removes duplicates from a list while preserving order + """ + res = [] + for i, item in enumerate(lst): + if i == len(lst) - 1 or lst[i + 1] != item: + res.append(item) + return res + + +def monkey_patch(): + """ + Monkey patch in our own, instrumented, get_templates_hierarchy. Make + sure to keep it a classmethod. + """ + old_get_templates_hierarchy_unbound = Content.get_templates_hierarchy.im_func + + def new_get_templates_hierarchy(cls, **kwargs): + res = old_get_templates_hierarchy_unbound(cls, **kwargs) + res = unique_list(res) + try: + name = select_template(res).name + except TemplateDoesNotExist: + name = [i for i in res if finders.find(i)] + template_hierarchy_called.send(sender=cls, cls=cls, kwargs=kwargs, templates=res, used=name) + return res + Content.get_templates_hierarchy = classmethod(new_get_templates_hierarchy) + + +class TemplatePanel(DebugPanel): + name = 'Widgy templates' + template = 'widgy/debugtoolbar/templates.html' + + def __init__(self, *args, **kwargs): + super(TemplatePanel, self).__init__(*args, **kwargs) + monkey_patch() + template_hierarchy_called.connect(self._store_info) + self.calls = [] + + def nav_title(self): + return 'Widgy templates' + + def _store_info(self, **kwargs): + # A class can't be outputted directly in a template, because it's + # callable. `_meta` can't be accessed because it starts with an + # underscore. + kwargs['cls_name'] = '%s.%s' % (kwargs['cls']._meta.app_label, + kwargs['cls'].__name__) + self.calls.append(kwargs) + + def process_response(self, request, response): + self.record_stats({ + 'calls': self.calls, + }) + + def url(self): + return '' + + def title(self): + return '%s widgets rendered' % len(self.calls) + + @property + def has_content(self): + return bool(self.calls) diff --git a/widgy/exceptions.py b/widgy/exceptions.py index 3b5d82972..fa102aade 100644 --- a/widgy/exceptions.py +++ b/widgy/exceptions.py @@ -1,46 +1,46 @@ from django.core.exceptions import ValidationError -class InvalidTreeMovement(ValidationError): +class InvalidOperation(ValidationError): + pass + + +class InvalidTreeMovement(InvalidOperation): """ Inherits from ``django.core.exceptions.ValidationError``. Base exception for all erroneous node restructures. """ - pass + def __init__(self, message): + # If we don't do this, there won't be a message_dict. + super(InvalidTreeMovement, self).__init__({'message': [message]}) class RootDisplacementError(InvalidTreeMovement): """ Raise when trying to add siblings to a root node. """ - pass class ParentChildRejection(InvalidTreeMovement): """ General exception for when a child rejects a parent or vice versa. """ - def __init__(self): - super(ParentChildRejection, self).__init__({'message': self.message}) -class BadParentRejection(ParentChildRejection): +class ParentWasRejected(ParentChildRejection): """ Raised by child to reject the requested parent. """ - message = "You can't put me in that" -class BadChildRejection(ParentChildRejection): +class ChildWasRejected(ParentChildRejection): """ Raised by parents to reject children that don't belong. """ - message = "You can't put that in me" -class OhHellNo(BadParentRejection, BadChildRejection): +class MutualRejection(ParentWasRejected, ChildWasRejected): """ For instances where both child and parent reject the movement request. """ - message = "Everyone hates everything" diff --git a/widgy/forms.py b/widgy/forms.py index 425c33fdf..e1e114cbe 100644 --- a/widgy/forms.py +++ b/widgy/forms.py @@ -1,41 +1,28 @@ -""" -A collection of model and form field classes. -""" -from operator import or_ - -from django.db import models -from django.db.models import Q -from django.db.models.fields.related import ReverseSingleRelatedObjectDescriptor +from __future__ import unicode_literals +import time + from django import forms +from django.template.loader import render_to_string +from django.forms import widgets from django.contrib.contenttypes.models import ContentType -from django.template import Template, Context - -from fusionbox.core.templatetags.fusionbox_tags import json -from south.modelsinspector import add_introspection_rules +from django.utils.safestring import mark_safe +from django.utils.translation import ugettext_lazy as _ +from django.core.urlresolvers import reverse +from django.core.exceptions import ObjectDoesNotExist +from django.conf import settings +from django.template.defaultfilters import capfirst + +from widgy.utils import format_html from widgy.models import Node -add_introspection_rules([], ["^widgy\.forms\.WidgyField"]) - - -WIDGY_FIELD_TEMPLATE = u""" -{% load compress %} -{% compress css %} - - - -{% for sheet in stylesheets %} - -{% endfor %} -{% endcompress %} - - -
    - -""" + +class DisplayWidget(forms.Widget): + def __init__(self, display_name, *args, **kwargs): + super(DisplayWidget, self).__init__(*args, **kwargs) + self.display_name = display_name + + def render(self, *args, **kwargs): + return format_html(u'{name}', name=self.display_name) class WidgyWidget(forms.HiddenInput): @@ -43,16 +30,66 @@ class WidgyWidget(forms.HiddenInput): Django form widget that is used to load the backbone.js application code for a Widgy field. """ - def render(self, name, value, attrs=None): - node_json = json(self.node.to_json()) - t = Template(WIDGY_FIELD_TEMPLATE) - return t.render(Context({ - 'name': name, + template_name = 'widgy/widgy_field.html' + is_hidden = False + + def render(self, name, value, attrs=None, context={}): + # If this fails, perhaps they aren't using the WidgyFormMixin. If you + # can't use the WidgyFormMixin (report it) and make sure that you call + # conform_to_value on the WidgyFormField. + assert hasattr(self, 'node'), "You must set the node on a WidgyWidget prior to rendering it." + + self.node.maybe_prefetch_tree() + defaults = { + 'html_name': name, 'value': value, - 'stylesheets': self.stylesheets, 'html_id': attrs['id'], - 'json': node_json - })) + 'node_dict': self.node.to_json(self.site), + 'node': self.node, + 'api_url': reverse(self.site.node_view), + 'site': self.site, + 'owner': self.owner, + } + + if settings.DEBUG: + defaults['cachebust'] = time.time() + + defaults.update(context) + return render_to_string(self.template_name, defaults) + + +class ContentTypeRadioInput(widgets.RadioInput): + def __init__(self, name, value, attrs, choice, index): + super(ContentTypeRadioInput, self).__init__(name, value, attrs, choice, index) + self.choice_label = format_html('{0}', self.choice_label) + + def tag(self): + tag = super(ContentTypeRadioInput, self).tag() + ct = ContentType.objects.get_for_id(self.choice_value) + return format_html('
    {2}', ct.app_label, ct.model, tag) + + +class ContentTypeRadioRenderer(widgets.RadioFieldRenderer): + choice_input_class = ContentTypeRadioInput + + # BBB django < 1.7 doesn't use choice_input_class + def __iter__(self): + for i, choice in enumerate(self.choices): + yield self.choice_input_class(self.name, self.value, self.attrs.copy(), choice, i) + + def __getitem__(self, idx): + choice = self.choices[idx] # Let the IndexError propogate + return self.choice_input_class(self.name, self.value, self.attrs.copy(), choice, idx) + + +class ContentTypeRadioSelect(widgets.RadioSelect): + renderer = ContentTypeRadioRenderer + + def render(self, *args, **kwargs): + return (mark_safe('
    ') + + super(ContentTypeRadioSelect, self).render(*args, **kwargs) + + mark_safe('
    ') + + render_to_string('widgy/layout_css.html')) class WidgyFormField(forms.ModelChoiceField): @@ -62,138 +99,107 @@ class WidgyFormField(forms.ModelChoiceField): """ widget = WidgyWidget - def conform_to_value(self, value): + def __init__(self, *args, **kwargs): + self.site = kwargs.pop('site') + super(WidgyFormField, self).__init__(*args, **kwargs) + + def conform_to_value(self, owner, value): """ When no root node has been set, we prompt the user to choose one from the list of choices. Otherwise, we set the ``WidgyWidget`` class as the widget we use for this field instance. """ + self.owner = owner if isinstance(value, Node): - self.node = self.widget.node = value + self.node = value try: - self.widget.stylesheets = self.node.content.editor_stylesheets + # Sometimes the WidgyWidget is wrapped in a + # RelatedFieldWidgetWrapper + self.widget.widget.node = value except AttributeError: - pass + self.widget.node = value self.queryset = None else: - self.widget = forms.Select( - choices=self.choices, - ) + # remove the empty choice + choices = [c for c in self.choices if c[0]] + if len(choices) == 1: + self._value = choices[0][0] + self.widget = DisplayWidget(display_name=choices[0][1]) + self.help_text = _('You must save before you can edit this.') + else: + self.widget = ContentTypeRadioSelect( + choices=choices, + ) + + try: + self.widget.widget.site = self.site + self.widget.widget.owner = owner + except AttributeError: + self.widget.site = self.site + self.widget.owner = owner def clean(self, value): + value = getattr(self, '_value', value) + try: value = super(WidgyFormField, self).clean(value) except: - if self.node: + if getattr(self, 'node', None): value = self.node else: raise return value + def label_from_instance(self, obj): + ModelClass = obj.model_class() + if ModelClass: + return capfirst(ModelClass._meta.verbose_name) + else: + return super(WidgyFormField, self).label_from_instance(obj) -class WidgyFormMixin(object): - """ - Form mixin that enables the widget switching by calling - :meth:`~WidgyFormField.conform_to_value` on the field instance. - """ - def __init__(self, *args, **kwargs): - super(WidgyFormMixin, self).__init__(*args, **kwargs) - - for name, field in self.fields.iteritems(): - if isinstance(field, WidgyFormField): - value = getattr(self.instance, name) - field.conform_to_value(value) - - -class WidgyFieldObjectDescriptor(ReverseSingleRelatedObjectDescriptor): - """ - .. note:: - we need to transport the ContentType of the Node all the way to - ``pre_save``, without saving an instance of the node, because we don't - know if the rest of the model is valid yet. - """ - def __set__(self, instance, value): - """ - """ - if isinstance(value, ContentType): - value, value._ct = self.field.rel.to(), value - - super(WidgyFieldObjectDescriptor, self).__set__(instance, value) - - -class WidgyField(models.ForeignKey): - """ - Model field that inherits from ``models.ForeignKey``. Contains validation - and context switching that is needed for Widgy fields. - """ - def __init__(self, to=None, root_choices=None, **kwargs): - if to is None: - to = 'widgy.Node' - self.root_choices = root_choices +class VersionedWidgyWidget(WidgyWidget): + template_name = ['widgy/versioned_widgy_field.html', + 'widgy/versioned_widgy_field_base.html'] - defaults = { - 'blank': True, - 'null': True, - 'on_delete': models.SET_NULL + def render(self, name, value, attrs=None): + context = { + 'commit_url': self.site.reverse(self.site.commit_view, kwargs={'pk': value}), + 'reset_url': self.site.reverse(self.site.reset_view, kwargs={'pk': value}), + 'history_url': self.site.reverse(self.site.history_view, kwargs={'pk': value}), } - defaults.update(kwargs) - - super(WidgyField, self).__init__(to, **defaults) - - def contribute_to_class(self, cls, name): - """ - - .. note:: we need to use WidgyFieldObjectDescriptor instead of - ``ReverseSingleRelatedObjectDescriptor`` because of the modifications - to __set__. - """ - super(WidgyField, self).contribute_to_class(cls, name) - setattr(cls, self.name, WidgyFieldObjectDescriptor(self)) - def pre_save(self, model_instance, add): - """ - Relies on WidgyFieldObjectDescriptor to set the content type on an - unsaved throwaway Node so that we know how to properly instantiate a - real node later on. - """ - value = getattr(model_instance, self.name) + return super(VersionedWidgyWidget, self).render(name, value, attrs, context) - if hasattr(value, '_ct'): - ct = value._ct - node = ct.model_class().add_root().node - setattr(model_instance, self.name, node) - setattr(model_instance, self.attname, node.pk) +class VersionedWidgyFormField(WidgyFormField): + widget = VersionedWidgyWidget - return node.pk + def conform_to_value(self, owner, value): + self.version_tracker = value + super(VersionedWidgyFormField, self).conform_to_value(owner, value and value.working_copy) - return super(WidgyField, self).pre_save(model_instance, add) - - def formfield(self, **kwargs): - defaults = { - 'form_class': WidgyFormField, - 'queryset': self.get_layout_contenttypes(self.root_choices), - } - defaults.update(kwargs) - return super(WidgyField, self).formfield(**defaults) + def clean(self, value): + return self.version_tracker or super(VersionedWidgyFormField, self).clean(value) - def get_layout_contenttypes(self, layouts): - qs = [] - for layout in layouts: - try: - app_label, model_name = layout.split(".") - except ValueError: - app_label = self.model._meta.app_label - model_name = layout - except AttributeError: - app_label = layout._meta.app_label - model_name = layout._meta.object_name +class WidgyFormMixin(object): + """ + Form mixin that enables the widget switching by calling + :meth:`~WidgyFormField.conform_to_value` on the field instance. + """ + def __init__(self, *args, **kwargs): + super(WidgyFormMixin, self).__init__(*args, **kwargs) - cls = models.get_model(app_label, model_name, seed_cache=False, only_installed=False) + for name, field in self.fields.iteritems(): + if isinstance(field, WidgyFormField): + try: + value = getattr(self.instance, name) + except ObjectDoesNotExist: + value = None + field.conform_to_value(self.instance, value) - qs.append(Q(app_label=app_label, model=cls._meta.module_name)) - return ContentType.objects.filter(reduce(or_, qs)) +class WidgyForm(WidgyFormMixin, forms.ModelForm): + pass diff --git a/widgy/generic/__init__.py b/widgy/generic/__init__.py new file mode 100644 index 000000000..c21a68786 --- /dev/null +++ b/widgy/generic/__init__.py @@ -0,0 +1,127 @@ +import django +from django.contrib.contenttypes import generic +from django.db import DEFAULT_DB_ALIAS, connection +from widgy.generic.models import ContentType + +try: + from south.modelsinspector import add_ignored_fields +except ImportError: # South not installed. + pass +else: + add_ignored_fields(["^widgy\.generic\.ProxyGenericRelation", + "^widgy\.generic\.ProxyGenericForeignKey", + "^widgy\.generic\.WidgyGenericForeignKey"]) + + +if django.VERSION >= (1, 6): + class ProxyGenericForeignKey(generic.GenericForeignKey): + def __init__(self, *args, **kwargs): + kwargs['for_concrete_model'] = False + super(ProxyGenericForeignKey, self).__init__(*args, **kwargs) + + class ProxyGenericRelation(generic.GenericRelation): + def __init__(self, *args, **kwargs): + kwargs['for_concrete_model'] = False + super(ProxyGenericRelation, self).__init__(*args, **kwargs) +else: + class ProxyGenericForeignKey(generic.GenericForeignKey): + """ + A GenericForeignKey that can point to a proxy model. + """ + + def get_content_type(self, obj=None, id=None, using=None): + if obj: + return ContentType.objects.db_manager(obj._state.db).get_for_model( + obj, + for_concrete_model=False) + else: + return super(ProxyGenericForeignKey, self).get_content_type(obj, id, using) + + + class ProxyGenericRelation(generic.GenericRelation): + def __init__(self, *args, **kwargs): + # work around django #16920, #16913 + kwargs.setdefault('related_name', '%(app_label)s_%(class)s_set') + super(ProxyGenericRelation, self).__init__(*args, **kwargs) + + def get_content_type(self): + """ + Returns the content type associated with this field's model. + """ + return ContentType.objects.get_for_model(self.model, for_concrete_model=False) + + def extra_filters(self, pieces, pos, negate): + """ + Return an extra filter to the queryset so that the results are filtered + on the appropriate content type. + """ + if negate: + return [] + content_type = ContentType.objects.get_for_model(self.model, for_concrete_model=False) + prefix = "__".join(pieces[:pos + 1]) + return [("%s__%s" % (prefix, self.content_type_field_name), + content_type)] + + def bulk_related_objects(self, objs, using=DEFAULT_DB_ALIAS): + """ + Return all objects related to ``objs`` via this ``GenericRelation``. + + """ + return self.rel.to._base_manager.db_manager(using).filter(**{ + "%s__pk" % self.content_type_field_name: + ContentType.objects.db_manager(using).get_for_model(self.model, for_concrete_model=False).pk, + "%s__in" % self.object_id_field_name: + [obj.pk for obj in objs] + }) + + def contribute_to_class(self, cls, name): + super(generic.GenericRelation, self).contribute_to_class(cls, name) + + # Save a reference to which model this class is on for future use + self.model = cls + + # Add the descriptor for the m2m relation + setattr(cls, self.name, ProxyReverseGenericRelatedObjectsDescriptor(self)) + + + class ProxyReverseGenericRelatedObjectsDescriptor(generic.ReverseGenericRelatedObjectsDescriptor): + def __get__(self, instance, instance_type=None): + if instance is None: + return self + + # Dynamically create a class that subclasses the related model's + # default manager. + rel_model = self.field.rel.to + superclass = rel_model._default_manager.__class__ + RelatedManager = generic.create_generic_related_manager(superclass) + + qn = connection.ops.quote_name + content_type = ContentType.objects.db_manager(instance._state.db).get_for_model(instance, for_concrete_model=False) + + manager = RelatedManager( + model=rel_model, + instance=instance, + symmetrical=(self.field.rel.symmetrical and instance.__class__ == rel_model), + source_col_name=qn(self.field.m2m_column_name()), + target_col_name=qn(self.field.m2m_reverse_name()), + content_type=content_type, + content_type_field_name=self.field.content_type_field_name, + object_id_field_name=self.field.object_id_field_name, + prefetch_cache_name=self.field.attname, + ) + + return manager + + +class WidgyGenericForeignKey(ProxyGenericForeignKey): + def __get__(self, instance, instance_type=None): + try: + return super(WidgyGenericForeignKey, self).__get__(instance, instance_type) + except AttributeError: + # The model for this content type couldn't be loaded. Use an + # UnknownWidget instead. + from widgy.models import UnknownWidget + ret = UnknownWidget(getattr(instance, self.ct_field), getattr(instance, self.fk_field), instance) + ret.node = instance + ret.warn() + return ret diff --git a/widgy/generic/models.py b/widgy/generic/models.py new file mode 100644 index 000000000..91673b2ee --- /dev/null +++ b/widgy/generic/models.py @@ -0,0 +1,95 @@ +from django.contrib.contenttypes.models import ContentType, ContentTypeManager + +try: + from django.utils.encoding import smart_text +except ImportError: + smart_text = lambda x: x + +""" +This model adds the for_concrete_model option that was added in Django 1.5 to +Django 1.4. +""" + +class ContentTypeManager(ContentTypeManager): + _cache = {} + + def _get_opts(self, model, for_concrete_model): + if for_concrete_model: + model = model._meta.concrete_model + elif model._deferred: + model = model._meta.proxy_for_model + return model._meta + + def get_for_model(self, model, for_concrete_model=True): + """ + Returns the ContentType object for a given model, creating the + ContentType if necessary. Lookups are cached so that subsequent lookups + for the same model don't hit the database. + """ + opts = self._get_opts(model, for_concrete_model) + try: + ct = self._get_from_cache(opts) + except KeyError: + # Load or create the ContentType entry. The smart_text() is + # needed around opts.verbose_name_raw because name_raw might be a + # django.utils.functional.__proxy__ object. + ct, created = self.get_or_create( + app_label = opts.app_label, + model = opts.object_name.lower(), + defaults = {'name': smart_text(opts.verbose_name_raw)}, + ) + self._add_to_cache(self.db, ct) + + return ct + + def get_for_models(self, *models, **kwargs): + """ + Given *models, returns a dictionary mapping {model: content_type}. + """ + for_concrete_models = kwargs.pop('for_concrete_models', True) + # Final results + results = {} + # models that aren't already in the cache + needed_app_labels = set() + needed_models = set() + needed_opts = set() + for model in models: + opts = self._get_opts(model, for_concrete_models) + try: + ct = self._get_from_cache(opts) + except KeyError: + needed_app_labels.add(opts.app_label) + needed_models.add(opts.object_name.lower()) + needed_opts.add(opts) + else: + results[model] = ct + if needed_opts: + cts = self.filter( + app_label__in=needed_app_labels, + model__in=needed_models + ) + for ct in cts: + model = ct.model_class() + if model._meta in needed_opts: + results[model] = ct + needed_opts.remove(model._meta) + self._add_to_cache(self.db, ct) + for opts in needed_opts: + # These weren't in the cache, or the DB, create them. + ct = self.create( + app_label=opts.app_label, + model=opts.object_name.lower(), + name=smart_text(opts.verbose_name_raw), + ) + self._add_to_cache(self.db, ct) + results[ct.model_class()] = ct + return results + + +import django +if django.VERSION < (1, 5): + class ContentType(ContentType): + objects = ContentTypeManager() + + class Meta: + proxy = True diff --git a/widgy/management/__init__.py b/widgy/management/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/widgy/management/commands/__init__.py b/widgy/management/commands/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/widgy/management/commands/delete_orphan_versiontrackers.py b/widgy/management/commands/delete_orphan_versiontrackers.py new file mode 100644 index 000000000..aaa7f56a8 --- /dev/null +++ b/widgy/management/commands/delete_orphan_versiontrackers.py @@ -0,0 +1,55 @@ +from optparse import make_option + +from django.core.management.base import BaseCommand +from django.core import urlresolvers +from django.contrib.sites.models import Site + +from widgy.models import VersionTracker + +class Command(BaseCommand): + """ + Deletes orphaned VersionTrackers, the ones that are left around after + deleting their owners. + + This command destroys the data necessary to undelete pages, so be careful. + """ + can_import_settings = True + option_list = BaseCommand.option_list + ( + make_option('--noinput', + action='store_true', + dest='force', + default=False, + help="Don't ask for confirmation before deleting"), + ) + + def handle(self, *args, **options): + self.force = options['force'] + + for tracker in VersionTracker.objects.orphan(): + if self.confirm(tracker): + tracker.delete() + + def get_confirmation(self, message): + confirm = raw_input(message) + if confirm not in ('y', 'n'): + self.stdout.write('y/n\n') + return self.get_confirmation(message) + return confirm == 'y' + + def confirm(self, tracker): + if self.force: + return True + else: + confirm = self.get_confirmation('delete %s?: ' % self.format_tracker(tracker)) + if not confirm: + self.stdout.write('skipped\n') + return confirm + + def format_tracker(self, tracker): + try: + url = urlresolvers.reverse('widgy.contrib.widgy_mezzanine.views.preview', + kwargs={'node_pk': tracker.working_copy.pk}) + return 'http://%s%s' % (Site.objects.get_current().domain, url) + except urlresolvers.NoReverseMatch: + # maybe widgy_mezzanine isn't installed + return repr(tracker) diff --git a/widgy/management/commands/gen_docs.py b/widgy/management/commands/gen_docs.py deleted file mode 100644 index 6e637d064..000000000 --- a/widgy/management/commands/gen_docs.py +++ /dev/null @@ -1,16 +0,0 @@ -import subprocess -import os -from django.conf import settings -from django.core.management.base import BaseCommand, CommandError - - -class Command(BaseCommand): - help = 'Create Sphinx documentation' - - def handle(self, *args, **options): - try: - subprocess.check_call(['make', 'html'], - cwd=os.path.join(settings.PROJECT_PATH, - '..', 'doc')) - except subprocess.CalledProcessError as e: - raise CommandError(e) diff --git a/widgy/management/commands/startplugin.py b/widgy/management/commands/startplugin.py deleted file mode 100644 index 8df3c2722..000000000 --- a/widgy/management/commands/startplugin.py +++ /dev/null @@ -1,23 +0,0 @@ -from django.utils.importlib import import_module -from django.core.management.templates import TemplateCommand -from django.core.management.base import CommandError - - -class Command(TemplateCommand): - help = 'Create a new widgy plugin.' - - def handle(self, app_name=None, target=None, **options): - if app_name is None: - raise CommandError("you must provide an app name") - - # Check that the app_name cannot be imported. - try: - import_module(app_name) - except ImportError: - pass - else: - raise CommandError("%r conflicts with the name of an existing " - "Python module and cannot be used as an app " - "name. Please try another name." % app_name) - - super(Command, self).handle('plugin', app_name, target, **options) diff --git a/widgy/mezzanine_urls.py b/widgy/mezzanine_urls.py deleted file mode 100644 index 3447b7e38..000000000 --- a/widgy/mezzanine_urls.py +++ /dev/null @@ -1,109 +0,0 @@ -""" -This is the main ``urlconf`` for Mezzanine - it sets up patterns for -all the various Mezzanine apps, third-party apps like Grappelli and -filebrowser. -""" - -from urlparse import urlsplit - -from django.conf.urls.defaults import patterns, include -from django.contrib import admin -from django.contrib.admin.sites import NotRegistered -from django.http import HttpResponse - -from mezzanine.conf import settings -from mezzanine.core.sitemaps import DisplayableSitemap - - -# Remove unwanted models from the admin that are installed by default with -# third-party apps. -for model in settings.ADMIN_REMOVAL: - try: - model = tuple(model.rsplit(".", 1)) - exec "from %s import %s" % model - except ImportError: - pass - else: - try: - admin.site.unregister(eval(model[1])) - except NotRegistered: - pass - - -urlpatterns = [] - -# Django's sitemap app. -if "django.contrib.sitemaps" in settings.INSTALLED_APPS: - sitemaps = {"sitemaps": {"all": DisplayableSitemap}} - urlpatterns += patterns("django.contrib.sitemaps.views", - ("^sitemap\.xml$", "sitemap", sitemaps) - ) - -# Return a robots.txt that disallows all spiders when DEBUG is True. -if getattr(settings, "DEBUG", False): - urlpatterns += patterns("", - ("^robots.txt$", lambda r: HttpResponse("User-agent: *\nDisallow: /", - mimetype="text/plain")), - ) - -# Filebrowser admin media library. -if getattr(settings, "PACKAGE_NAME_FILEBROWSER") in settings.INSTALLED_APPS: - urlpatterns += patterns("", - ("^admin/media-library/", include("%s.urls" % - settings.PACKAGE_NAME_FILEBROWSER)), - ) - -# Grappelli admin skin. -_pattern = urlsplit(settings.ADMIN_MEDIA_PREFIX).path.strip("/").split("/")[0] -if getattr(settings, "PACKAGE_NAME_GRAPPELLI") in settings.INSTALLED_APPS: - urlpatterns += patterns("", - ("^grappelli/", include("%s.urls" % settings.PACKAGE_NAME_GRAPPELLI)), - ) - -# Miscellanous Mezzanine patterns. -urlpatterns += patterns("", - ("^", include("mezzanine.core.urls")), - ("^", include("mezzanine.generic.urls")), -) - -# Mezzanine's Blog app. -BLOG_SLUG = getattr(settings, 'BLOG_SLUG', '') -blog_installed = "mezzanine.blog" in settings.INSTALLED_APPS and getattr(settings, 'BLOG_URLS_ENABLED', True) -if blog_installed: - if BLOG_SLUG: - BLOG_SLUG += "/" - blog_patterns = patterns("", - ("^%s" % BLOG_SLUG, include("mezzanine.blog.urls")), - ) - urlpatterns += blog_patterns - -# Mezzanine's Accounts app -_old_accounts_enabled = getattr(settings, "ACCOUNTS_ENABLED", False) -if _old_accounts_enabled: - import warnings - warnings.warn("The setting ACCOUNTS_ENABLED is deprecated. Please " - "add mezzanine.accounts to INSTALLED_APPS.") -if _old_accounts_enabled or "mezzanine.accounts" in settings.INSTALLED_APPS: - # We don't define a URL prefix here such as /account/ since we want - # to honour the LOGIN_* settings, which Django has prefixed with - # /account/ by default. So those settings are used in accounts.urls - urlpatterns += patterns("", - ("^", include("mezzanine.accounts.urls")), - ) - -# Mezzanine's Pages app. -PAGES_SLUG = "" -if "mezzanine.pages" in settings.INSTALLED_APPS: - # No BLOG_SLUG means catch-all patterns belong to the blog, - # so give pages their own prefix and inject them before the - # blog urlpatterns. - if not BLOG_SLUG and blog_installed: - PAGES_SLUG = "pages/" - blog_patterns_start = urlpatterns.index(blog_patterns[0]) - urlpatterns[blog_patterns_start:len(blog_patterns)] = patterns("", - ("^%s" % PAGES_SLUG, include("mezzanine.pages.urls")), - ) - else: - urlpatterns += patterns("", - ("^", include("mezzanine.pages.urls")), - ) diff --git a/widgy/middleware.py b/widgy/middleware.py new file mode 100644 index 000000000..4d420b4c1 --- /dev/null +++ b/widgy/middleware.py @@ -0,0 +1,19 @@ +from widgy.models import Node + +class PreventProblemsMiddleware(object): + """ + Checks if there are any 'problems' (inconsitensies in the widgy tree) + after every request. If used with TransactionMiddleware, it will + prevent problems from being committed by raising an exception. Useful + to turn on during development so you know right away if your code + corrupts the tree. It does an absurd number of queries though, + so probably not something to leave on all the time. + """ + + def get_problems(self): + return Node.find_problems() + Node.find_widgy_problems() + + def process_response(self, request, response): + problems = self.get_problems() + assert not any(problems), "There are some problems: %s" % (problems,) + return response diff --git a/widgy/migrations/0001_initial.py b/widgy/migrations/0001_initial.py index 86142ab99..db6d043df 100644 --- a/widgy/migrations/0001_initial.py +++ b/widgy/migrations/0001_initial.py @@ -1,167 +1,80 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ContentPage' - db.create_table('widgy_contentpage', ( - ('page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['pages.Page'], unique=True, primary_key=True)), - ('root_node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.Node'], null=True, on_delete=models.SET_NULL, blank=True)), - )) - db.send_create_signal('widgy', ['ContentPage']) - - # Adding model 'Node' - db.create_table('widgy_node', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('path', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('depth', self.gf('django.db.models.fields.PositiveIntegerField')()), - ('numchild', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), - ('content_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - )) - db.send_create_signal('widgy', ['Node']) - - # Adding model 'Bucket' - db.create_table('widgy_bucket', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('draggable', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('deletable', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('widgy', ['Bucket']) - - # Adding model 'TwoColumnLayout' - db.create_table('widgy_twocolumnlayout', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('widgy', ['TwoColumnLayout']) - - # Adding model 'TextContent' - db.create_table('widgy_textcontent', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('content', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('widgy', ['TextContent']) - - # Adding model 'ImageContent' - db.create_table('widgy_imagecontent', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('image', self.gf('mezzanine.core.fields.FileField')(max_length=255)), - )) - db.send_create_signal('widgy', ['ImageContent']) - - - def backwards(self, orm): - # Deleting model 'ContentPage' - db.delete_table('widgy_contentpage') - - # Deleting model 'Node' - db.delete_table('widgy_node') - - # Deleting model 'Bucket' - db.delete_table('widgy_bucket') - - # Deleting model 'TwoColumnLayout' - db.delete_table('widgy_twocolumnlayout') - - # Deleting model 'TextContent' - db.delete_table('widgy_textcontent') - - # Deleting model 'ImageContent' - db.delete_table('widgy_imagecontent') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'generic.assignedkeyword': { - 'Meta': {'ordering': "('_order',)", 'object_name': 'AssignedKeyword'}, - '_order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'keyword': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'assignments'", 'to': "orm['generic.Keyword']"}), - 'object_pk': ('django.db.models.fields.IntegerField', [], {}) - }, - 'generic.keyword': { - 'Meta': {'object_name': 'Keyword'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '500'}) - }, - 'pages.page': { - 'Meta': {'ordering': "('titles',)", 'object_name': 'Page'}, - '_order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'content_model': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'gen_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_footer': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'in_navigation': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'keywords': ('mezzanine.generic.fields.KeywordsField', [], {'object_id_field': "'object_pk'", 'to': "orm['generic.AssignedKeyword']", 'frozen_by_south': 'True'}), - 'keywords_string': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}), - 'login_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['pages.Page']"}), - 'publish_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'short_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '2'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '500'}), - 'titles': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'widgy.bucket': { - 'Meta': {'object_name': 'Bucket'}, - 'deletable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'draggable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'widgy.contentpage': { - 'Meta': {'ordering': "('_order',)", 'object_name': 'ContentPage', '_ormbases': ['pages.Page']}, - 'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['pages.Page']", 'unique': 'True', 'primary_key': 'True'}), - 'root_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}) - }, - 'widgy.imagecontent': { - 'Meta': {'object_name': 'ImageContent'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('mezzanine.core.fields.FileField', [], {'max_length': '255'}) - }, - 'widgy.node': { - 'Meta': {'object_name': 'Node'}, - 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'widgy.textcontent': { - 'Meta': {'object_name': 'TextContent'}, - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'widgy.twocolumnlayout': { - 'Meta': {'object_name': 'TwoColumnLayout'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['widgy'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations +import widgy.db.fields +import django.utils.timezone +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='UnknownWidget', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'managed': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Node', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('path', models.CharField(unique=True, max_length=255)), + ('depth', models.PositiveIntegerField()), + ('numchild', models.PositiveIntegerField(default=0)), + ('content_id', models.PositiveIntegerField()), + ('is_frozen', models.BooleanField(default=False)), + ('content_type', models.ForeignKey(to='contenttypes.ContentType')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='VersionCommit', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('message', models.TextField(null=True, blank=True)), + ('publish_at', models.DateTimeField(default=django.utils.timezone.now)), + ('author', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ('parent', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='widgy.VersionCommit', null=True)), + ('root_node', widgy.db.fields.WidgyField(to='widgy.Node', on_delete=django.db.models.deletion.PROTECT)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='VersionTracker', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('head', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='widgy.VersionCommit', unique=True)), + ('working_copy', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='widgy.Node', unique=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='versioncommit', + name='tracker', + field=models.ForeignKey(related_name='commits', to='widgy.VersionTracker'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='node', + unique_together=set([('content_type', 'content_id')]), + ), + ] diff --git a/widgy/migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py b/widgy/migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py deleted file mode 100644 index 12fc38987..000000000 --- a/widgy/migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'ImageContent' - db.delete_table('widgy_imagecontent') - - # Deleting model 'TwoColumnLayout' - db.delete_table('widgy_twocolumnlayout') - - # Deleting model 'Bucket' - db.delete_table('widgy_bucket') - - # Deleting model 'TextContent' - db.delete_table('widgy_textcontent') - - # Deleting model 'ContentPage' - db.delete_table('widgy_contentpage') - - - def backwards(self, orm): - # Adding model 'ImageContent' - db.create_table('widgy_imagecontent', ( - ('image', self.gf('mezzanine.core.fields.FileField')(max_length=255)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('widgy', ['ImageContent']) - - # Adding model 'TwoColumnLayout' - db.create_table('widgy_twocolumnlayout', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('widgy', ['TwoColumnLayout']) - - # Adding model 'Bucket' - db.create_table('widgy_bucket', ( - ('draggable', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('deletable', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('widgy', ['Bucket']) - - # Adding model 'TextContent' - db.create_table('widgy_textcontent', ( - ('content', self.gf('django.db.models.fields.TextField')()), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('widgy', ['TextContent']) - - # Adding model 'ContentPage' - db.create_table('widgy_contentpage', ( - ('page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['pages.Page'], unique=True, primary_key=True)), - ('root_node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.Node'], null=True, on_delete=models.SET_NULL, blank=True)), - )) - db.send_create_signal('widgy', ['ContentPage']) - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'widgy.node': { - 'Meta': {'object_name': 'Node'}, - 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/models.py b/widgy/models.py deleted file mode 100644 index d24db8eda..000000000 --- a/widgy/models.py +++ /dev/null @@ -1,448 +0,0 @@ -""" -Classes in this module supply the abstract models used to create new widgy -objects. -""" -from collections import defaultdict -from operator import attrgetter - -from django.db import models -from django.forms.models import modelform_factory -from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes import generic -from django.template.loader import render_to_string - -from treebeard.mp_tree import MP_Node - -from widgy.exceptions import ( - InvalidTreeMovement, - OhHellNo, - BadChildRejection, - BadParentRejection, - ParentChildRejection, - RootDisplacementError -) - -from widgy.utils import exception_to_bool - - -class Node(MP_Node): - """ - Instances of this class maintain the Materialized Path tree structure that - the generic content is attached to. - - For more information, consult the Treebeard_ documentation. - - **Model Fields**: - :content_type: ``models.ForeignKey(ContentType)`` - - :content_id: ``models.PositiveIntegerField()`` - - :content: ``generic.GenericForeignKey('content_type', 'content_id')`` - - .. _Treebeard: https://tabo.pe/projects/django-treebeard/docs/1.61/index.html - """ - content_type = models.ForeignKey(ContentType) - content_id = models.PositiveIntegerField() - content = generic.GenericForeignKey('content_type', 'content_id') - - def save(self, *args, **kwargs): - created = not bool(self.pk) - super(Node, self).save(*args, **kwargs) - if created: - self.content.post_create() - - def delete(self, *args, **kwargs): - content = self.content - super(Node, self).delete(*args, **kwargs) - content.delete() - - def to_json(self): - # reversed because we use 'right_id' and how backbone instantiates - # nodes - children = [c.to_json() for c in self.get_children().reverse()] - json = { - 'url': self.get_api_url(), - 'content': self.content.to_json(), - 'children': children, - 'available_children_url': self.get_available_children_url() - } - parent = self.get_parent() - if parent: - json['parent_id'] = parent.get_api_url() - - right = self.get_next_sibling() - json['right_id'] = right and right.get_api_url() - - return json - - def render(self, *args, **kwargs): - """ - Delegates the render call to the content instance. - """ - return self.content.render(*args, **kwargs) - - def get_children(self): - """ - Wraps the MP_Tree API call to return the pre_built tree of children if - it is present. - """ - if hasattr(self, '_children'): - return self._children - return super(Node, self).get_children() - - def prefetch_tree(self): - """ - Builds the entire tree using python. Each node has its Content - instance filled in, and the reverse node relation on the content filled - in as well. - - .. todo:: - - Maybe use in_bulk here to avoid doing a query for every content - """ - # Build a list with the current node and all descendants - tree = list(self.get_descendants()) + [self] - - # Build a mapping of content_types -> ids - contents = defaultdict(list) - for node in tree: - contents[node.content_type_id].append(node.content_id) - - # Convert that mapping to content_types -> Content instances - # TODO: Maybe use in_bulk here to avoid doing a query for every content - # type - for content_type_id, content_ids in contents.iteritems(): - ct = ContentType.objects.get(pk=content_type_id) - contents[content_type_id] = dict([(i.id, i) for i in ct.model_class().objects.filter(pk__in=content_ids)]) - - # Loop through the nodes both assigning the content instance and the - # node instance onto the content - for node in tree: - node.content = contents[node.content_type_id][node.content_id] - node.content.node = node - - # Knock the root node off before building out the tree structure - tree.pop() - - self.assign_children(tree, True) - - def assign_children(self, descendants, sort=False): - """ - Helper method to assign the proper children in the proper order to each - node - - .. todo:: - fix the error messages - """ - if sort: - descendants.sort(key=attrgetter('depth', 'path'), reverse=True) - - self._children = [] - - while descendants: - child = descendants[-1] - if child.depth == self.depth + 1 and child.path.startswith(self.path): - self._children.append(descendants.pop()) - else: - break - - for child in self._children: - child.assign_children(descendants) - - @models.permalink - def get_api_url(self): - return ('widgy.views.node', (), {'node_pk': self.pk}) - - @models.permalink - def get_available_children_url(self): - return ('widgy.views.recursive_children', (), {'node_pk': self.pk}) - - def reposition(self, right=None, parent=None): - """ - Validates the requested node restructering and executes by calling :meth:`~Node.move` on - the instance. - - .. todo:: - - fix the error messages - """ - if not self.content.draggable: - raise InvalidTreeMovement({'message': "You can't move me"}) - - if right: - if right.is_root(): - raise InvalidTreeMovement({'message': 'You can\'t move the root'}) - - right.get_parent().content.validate_relationship(self.content) - self.move(right, pos='left') - elif parent: - parent.content.validate_relationship(self.content) - self.move(parent, pos='last-child') - else: - assert right or parent - - def filter_child_classes(self, classes): - return set([c for c in classes if exception_to_bool(self.content.validate_relationship)(c)]) - - def filter_child_classes_recursive(self, classes): - allowed_classes = self.filter_child_classes(classes) - for child in self.get_children(): - allowed_classes.update(child.filter_child_classes(classes)) - return allowed_classes - - -class Content(models.Model): - """ - Abstract base class for all models that are intended to a part of a Widgy - tree structure. - - **Model Fields**: - :_nodes: ``generic.GenericRelation(Node, - content_type_field='content_type', - object_id_field='content_id')`` - """ - _nodes = generic.GenericRelation(Node, - content_type_field='content_type', - object_id_field='content_id') - - draggable = True #: Set this content to be draggable - deletable = True #: Set this content instance to be deleteable - accepting_children = False #: Sets this content instance to be able to have children. - - class Meta: - abstract = True - - @models.permalink - def get_api_url(self): - return ('widgy.views.content', (), { - 'object_name': self._meta.module_name, - 'app_label': self._meta.app_label, - 'object_pk': self.pk}) - - def to_json(self): - return { - 'url': self.get_api_url(), - '__class__': self.class_name, - 'component': self.component_name, - 'model': self._meta.module_name, - 'object_name': self._meta.object_name, - 'draggable': self.draggable, - 'deletable': self.deletable, - 'accepting_children': self.accepting_children, - 'edit_template': self.get_form_template(), - 'preview_template': self.get_preview_template() - } - - @classmethod - def valid_child_class_of(cls, content): - """ - Given a content instance, does our class consent to be adopted by them? - """ - return True - - @classmethod - def class_to_json(cls): - """ - :Returns: a json-able python object that represents the class type. - """ - return { - '__class__': "%s.%s" % (cls._meta.app_label, cls._meta.module_name), - 'title': cls._meta.verbose_name.title(), - } - - @classmethod - def all_concrete_subclasses(cls): - """ - Recursively gathers all the non-abstract subclasses. - """ - classes = set(c for c in cls.__subclasses__() if not c._meta.abstract) - for c in cls.__subclasses__(): - classes.update(c.all_concrete_subclasses()) - return classes - - @classmethod - def add_root(cls, **kwargs): - """ - Creates a new Content instance, stores it in the database, and calls - ``Node.add_root`` - """ - obj = cls.objects.create(**kwargs) - Node.add_root(content=obj) - return obj - - @property - def preview_templates(self): - """ - List of templates to search for the content template that is displayed - in the editor to show a preview. - - - ``widgy/{class_name}/preview.html`` - - ``widgy/preview.html`` - """ - return ( - 'widgy/%s/preview.html' % self.class_name, - 'widgy/preview.html', - ) - - @property - def edit_templates(self): - """ - List of templates to search for the edit form. - - - ``widgy/{class_name}/edit_form.html`` - - ``widgy/edit_form.html`` - """ - return ( - 'widgy/%s/edit_form.html' % self.class_name, - 'widgy/edit_form.html', - ) - - def get_render_templates(self, context): - """ - List of templates to search for the rendered template on the frontend. - - - widgy/{module_name}.html - - widgy/{class_name}/{module_name}.html' - """ - return ( - 'widgy/%s.html' % self._meta.module_name, - 'widgy/%s/%s.html' % (self.class_name, self._meta.module_name), - ) - - @property - def class_name(self): - """ - :Returns: a fully qualified classname including app_label and module_name - """ - return "widgy.%s" % (self._meta.module_name) - - @property - def component_name(self): - """ - :Returns: a string that will be used clientside to retrieve this - content's component.js resource. - """ - return self.class_name - - @property - def node(self): - """ - Settable property used by Node.prefetch_tree to optimize tree - rendering - """ - if hasattr(self, '_node'): - return self._node - return self._nodes.all()[0] - - @node.setter - def node(self, value): - self._node = value - - def get_form_class(self, request=None): - """ - .. todo:: - memoize - """ - return modelform_factory(self.__class__) - - def valid_child_of(self, content): - """ - Given a content instance, will we consent to be adopted by them? - """ - return self.valid_child_class_of(content) - - def valid_parent_of_class(self, cls): - """ - Given a content class, can it be _added_ as our child? - Note: this does not apply to _existing_ children (adoption) - """ - return self.accepting_children - - def valid_parent_of_instance(self, content): - """ - Given a content instance, can we adopt them? - """ - return self.valid_parent_of_class(type(content)) - - def meta(self): - return self._meta - - def validate_relationship(self, child): - parent = self - if isinstance(child, Content): - bad_parent = not child.valid_child_of(parent) - bad_child = not parent.valid_parent_of_instance(child) - else: - bad_parent = not child.valid_child_class_of(parent) - bad_child = not parent.valid_parent_of_class(child) - - if bad_parent and bad_child: - raise OhHellNo - elif bad_parent: - raise BadParentRejection - elif bad_child: - raise BadChildRejection - - def add_child(self, cls, **kwargs): - obj = cls.objects.create(**kwargs) - - try: - self.validate_relationship(obj) - except ParentChildRejection: - obj.delete() - raise - - self.node.add_child(content=obj) - return obj - - def add_sibling(self, cls, **kwargs): - if self.node.is_root(): - raise RootDisplacementError({'message': 'You can\'t put things next to me'}) - - obj = cls.objects.create(**kwargs) - parent = self.node.get_parent().content - - try: - parent.validate_relationship(obj) - except ParentChildRejection: - obj.delete() - raise - - self.node.add_sibling(content=obj, pos='left') - return obj - - def post_create(self): - """ - Hook for custom code which needs to be run after creation. Since the - `Node` must be created after the widget, any tree based actions - have to happen after the save event has finished. - """ - pass - - def get_form_template(self, template=None, context={}): - """ - :Returns: Rendered form template with the given context, if any. - """ - context.update({'form': self.get_form_class()(instance=self)}) - return render_to_string(template or self.edit_templates, context) - - def get_preview_template(self, template=None, context={}): - """ - :Returns: Rendered preview template with the given context, if any. - """ - context.update({'self': self}) - return render_to_string(template or self.preview_templates, context) - - def render(self, context={}, template=None): - """ - Renders the node in the given context. - - A ``template`` kwarg can be passed to use an explictly defined template - instead of the default template list. - """ - context.update({'content': self}) - rendered = render_to_string( - template or self.get_render_templates(context), context - ) - context.pop() - return rendered diff --git a/widgy/models/__init__.py b/widgy/models/__init__.py new file mode 100644 index 000000000..b7a47ddf1 --- /dev/null +++ b/widgy/models/__init__.py @@ -0,0 +1,2 @@ +from widgy.models.base import Node, Content, UnknownWidget +from widgy.models.versioning import VersionTracker, VersionCommit diff --git a/widgy/models/base.py b/widgy/models/base.py new file mode 100644 index 000000000..ef440de1d --- /dev/null +++ b/widgy/models/base.py @@ -0,0 +1,863 @@ +""" +Classes in this module supply the abstract models used to create new widgy +objects. +""" +from collections import defaultdict +from functools import partial +import logging +import itertools +import copy + +from django.db import models +from django import forms +from django.forms.models import modelform_factory, ModelForm +from django.contrib.contenttypes.models import ContentType +from django.template import RequestContext +from django.contrib.admin import widgets +from django.template.defaultfilters import capfirst + +from treebeard.mp_tree import MP_Node + +from widgy.exceptions import ( + InvalidOperation, + InvalidTreeMovement, + ParentChildRejection, + RootDisplacementError +) +from widgy.signals import pre_delete_widget +from widgy.generic import WidgyGenericForeignKey, ProxyGenericRelation +from widgy.utils import ( + exception_to_bool, update_context, render_to_string, force_text, unset_pks, +) +from widgy.widgets import DateTimeWidget, DateWidget, TimeWidget + +logger = logging.getLogger(__name__) + +# TODO: Don't use the Admin widgets. +FORMFIELD_FOR_DBFIELD_DEFAULTS = { + models.DateTimeField: { + 'form_class': forms.SplitDateTimeField, + 'widget': DateTimeWidget + }, + models.DateField: {'widget': DateWidget}, + models.TimeField: {'widget': TimeWidget}, +} + + +class Node(MP_Node): + """ + Instances of this class maintain the Materialized Path tree structure that + the generic content is attached to. + + For more information, consult the Treebeard_ documentation. + + **Model Fields**: + :content_type: ``models.ForeignKey(ContentType)`` + + :content_id: ``models.PositiveIntegerField()`` + + :content: ``generic.GenericForeignKey('content_type', 'content_id')`` + + .. _Treebeard: https://tabo.pe/projects/django-treebeard/docs/1.61/index.html + """ + content_type = models.ForeignKey(ContentType) + content_id = models.PositiveIntegerField() + content = WidgyGenericForeignKey('content_type', 'content_id') + is_frozen = models.BooleanField(default=False) + + class Meta: + app_label = 'widgy' + unique_together = [('content_type', 'content_id')] + + def __unicode__(self): + return unicode(self.content) + + def to_json(self, site): + children = [c.to_json(site) for c in self.get_children()] + json = { + 'url': self.get_api_url(site), + 'content': self.content.to_json(site), + 'children': children, + 'available_children_url': self.get_available_children_url(site), + 'possible_parents_url': self.get_possible_parents_url(site), + } + parent = self.get_parent() + if parent: + json['parent_id'] = parent.get_api_url(site) + + right = self.get_next_sibling() + json['right_id'] = right and right.get_api_url(site) + + return json + + def render(self, *args, **kwargs): + """ + Delegates the render call to the content instance. + """ + return self.content.render(*args, **kwargs) + + def get_children(self): + if hasattr(self, '_children'): + return self._children + return super(Node, self).get_children() + + def get_parent(self, *args, **kwargs): + if hasattr(self, '_parent'): + return self._parent + return super(Node, self).get_parent(*args, **kwargs) + + def get_next_sibling(self): + if hasattr(self, '_parent'): + if self._parent: + siblings = list(self._parent.get_children()) + else: + siblings = [self] + try: + return siblings[siblings.index(self) + 1] + except IndexError: + return None + return super(Node, self).get_next_sibling() + + def get_ancestors(self): + if hasattr(self, '_parent'): + if self._parent: + return list(self._parent.get_ancestors()) + [self._parent] + else: + return [] + return super(Node, self).get_ancestors() + + def get_root(self): + if hasattr(self, '_parent'): + if self._parent: + return self._parent.get_root() + else: + return self + return super(Node, self).get_root() + + def maybe_prefetch_tree(self): + """ + Prefetch the tree unless it has already been prefetched + """ + if not hasattr(self, '_children'): + self.prefetch_tree() + + def depth_first_order(self): + """ + All of the nodes in my tree (including myself) in depth-first order. + """ + if hasattr(self, '_children'): + ret = [self] + for child in self.get_children(): + ret.extend(child.depth_first_order()) + return ret + else: + return [self] + list(self.get_descendants().order_by('path')) + + @staticmethod + def fetch_content_instances(nodes): + """ + Given a list of nodes, efficiently get all of their content instances. + + The structure returned looks like this:: + + { + content_type_id: { + content_id: content_instance, + content_id: content_instance, + }, + content_type_id: { + content_id: content_instance, + }, + } + """ + # Build a mapping of content_types -> ids + contents = defaultdict(set) + for node in nodes: + contents[node.content_type_id].add(node.content_id) + + # Convert that mapping to content_types -> Content instances + for content_type_id, content_ids in contents.iteritems(): + try: + ct = ContentType.objects.get_for_id(content_type_id) + model_class = ct.model_class() + except AttributeError: + # get_for_id raises AttributeError when there's no model_class in django < 1.6. + model_class = None + if model_class: + contents[content_type_id] = ct.model_class().objects.in_bulk(content_ids) + else: + ct = ContentType.objects.get(id=content_type_id) + contents[content_type_id] = dict((id, UnknownWidget(ct, id)) for id in content_ids) + # Warn about using an UnknownWidget. It doesn't matter which instance we use. + next(contents[content_type_id].itervalues(), UnknownWidget(ct, None)).warn() + return contents + + @classmethod + def attach_content_instances(cls, nodes): + """ + Given a list of nodes, attach each one's Content. Efficiently. + """ + needed_nodes = [i for i in nodes if '_content_cache' not in i.__dict__] + contents = cls.fetch_content_instances(needed_nodes) + for node in needed_nodes: + node.content = contents[node.content_type_id][node.content_id] + for node in nodes: + node.content.node = node + return nodes + + @classmethod + def prefetch_trees(cls, *root_nodes): + trees = [i.depth_first_order() for i in root_nodes] + cls.attach_content_instances(list(itertools.chain(*trees))) + for tree in trees: + root_node = tree.pop(0) + # This should get_depth() or is_root(), but both of those do + # another query + if root_node.depth == 1: + root_node._parent = None + root_node.consume_children(tree) + assert not tree, "all of the nodes should be consumed" + + def prefetch_tree(self): + """ + Builds the entire tree using python. Each node has its Content + instance filled in, and the reverse node relation on the content filled + in as well. + """ + self.prefetch_trees(self) + + def consume_children(self, descendants): + """ + Helper method to assign the proper children in the proper order to each + node + """ + self._children = [] + + while descendants: + child = descendants[0] + if child.depth == self.depth + 1: + self._children.append(descendants.pop(0)) + child._parent = self + child.consume_children(descendants) + else: + break + + def get_api_url(self, site): + return site.reverse(site.node_view, kwargs={'node_pk': self.pk}) + + def get_available_children_url(self, site): + return site.reverse(site.shelf_view, kwargs={'node_pk': self.pk}) + + def get_possible_parents_url(self, site): + return site.reverse(site.node_parents_view, kwargs={'node_pk': self.pk}) + + def filter_child_classes(self, site, classes): + """ + What Content classes from `classes` would I let be my children? + """ + + validator = partial(site.validate_relationship, self.content) + return filter( + exception_to_bool(validator, ParentChildRejection), + classes) + + def filter_child_classes_recursive(self, site, classes): + """ + A dictionary of node objects to lists of content classes they would allow:: + + { + node_obj: [content_class, content_class, ...], + ... + } + """ + allowed_classes = {self: self.filter_child_classes(site, classes)} + for child in self.get_children(): + allowed_classes.update(child.filter_child_classes_recursive(site, classes)) + return allowed_classes + + def possible_parents(self, site, root_node): + """ + Where in root_node's tree can I be moved? + """ + + validator = exception_to_bool( + partial(site.validate_relationship, child=self.content), + ParentChildRejection) + all_nodes = root_node.depth_first_order() + my_family = set(self.depth_first_order()) + return [i for i in all_nodes if validator(i.content) and i not in my_family] + + def clone_tree(self, freeze=True): + """ + 1. new_root <- root_node + 2. new_root.content <- Clone(root_node.content) + 3. Insert new_root. + 4. children <- All descendents of root node. + 5. Iterate over children as child: + i. unset PK + ii. replace child.path[0:steplen] with new_root.path + iii. cloned_content <- child.content + iv. content_id <- cloned_content.pk + 6. Issue a bulk_create for children. + """ + # This method only supports cloning an entire tree. We don't need it + # for versioning, and I'm not sure what the semantics would be. + cls = self.__class__ + assert self.depth == 1 + self.maybe_prefetch_tree() + new_root = cls.add_root( + content=self.content.clone(), + numchild=self.numchild, + is_frozen=freeze, + ) + children_to_create = [] + for child in self.depth_first_order()[1:]: + children_to_create.append(Node( + content=child.content.clone(), + path=new_root.path + child.path[cls.steplen:], + is_frozen=freeze, + depth=child.depth, + numchild=child.numchild, + )) + cls.objects.bulk_create(children_to_create) + return new_root + + def check_frozen(self): + if self.is_frozen: + raise InvalidOperation({'message': "This widget is uneditable."}) + + def delete(self, *args, **kwargs): + self.check_frozen() + return super(Node, self).delete(*args, **kwargs) + + def add_child(self, *args, **kwargs): + self.check_frozen() + return super(Node, self).add_child(*args, **kwargs) + + def add_sibling(self, *args, **kwargs): + self.check_frozen() + return super(Node, self).add_sibling(*args, **kwargs) + + def move(self, *args, **kwargs): + self.check_frozen() + return super(Node, self).move(*args, **kwargs) + + def trees_equal(self, other): + if self.content_type_id != other.content_type_id: + return False + if not self.get_depth() == other.get_depth(): + return False + if not self.get_children_count() == other.get_children_count(): + return False + if not self.content.equal(other.content): + return False + + for child, other_child in zip(self.get_children(), other.get_children()): + if not child.trees_equal(other_child): + return False + return True + + @classmethod + def find_widgy_problems(cls, site=None): + """ + Searches all the nodes for inconsistencies. + + - Nodes whose content doesn't exist + - Nodes whose content types don't exist (UnknownWidgets) + + TODO: Maybe check for Content instances that don't have any nodes + pointing to them. + """ + + dangling, unknown = [], [] + + for node in cls.objects.all(): + content = node.content + if not content: + dangling.append(node.id) + elif isinstance(content, UnknownWidget): + unknown.append(node.id) + + return dangling, unknown + + +def check_frozen(sender, instance, **kwargs): + instance.check_frozen() + +models.signals.pre_delete.connect(check_frozen, sender=Node) + + +class Content(models.Model): + """ + Abstract base class for all models that are intended to a part of a Widgy + tree structure. + + **Model Fields**: + :_nodes: ``generic.GenericRelation(Node, + content_type_field='content_type', + object_id_field='content_id')`` + """ + _nodes = ProxyGenericRelation(Node, + content_type_field='content_type', + object_id_field='content_id') + + + # these preferences only affect the frontend interface and editing through + # the API + draggable = True + deletable = True + editable = False + accepting_children = False + shelf = False + tooltip = None + + component_name = 'widget' + + CANNOT_POP_OUT = 0 + CAN_POP_OUT = 1 + MUST_POP_OUT = 2 + + pop_out = CANNOT_POP_OUT + + form = ModelForm + formfield_overrides = {} + + class Meta: + abstract = True + app_label = 'widgy' + + def __init__(self, *args, **kwargs): + super(Content, self).__init__(*args, **kwargs) + overrides = FORMFIELD_FOR_DBFIELD_DEFAULTS.copy() + overrides.update(self.formfield_overrides) + self.formfield_overrides = overrides + + def get_api_url(self, site): + return site.reverse(site.content_view, kwargs={ + 'object_name': self._meta.module_name, + 'app_label': self._meta.app_label, + 'object_pk': self.pk}) + + def to_json(self, site): + node_pk_kwargs = {'node_pk': self.node.pk} + data = { + 'url': self.get_api_url(site), + '__class__': self.class_name, + 'css_classes': self.get_css_classes(), + 'component': self.component_name, + 'model': self._meta.module_name, + 'object_name': self._meta.object_name, + 'draggable': self.draggable, + 'deletable': self.deletable, + 'accepting_children': self.accepting_children, + 'template_url': site.reverse(site.node_templates_view, kwargs=node_pk_kwargs), + 'preview_template': self.get_preview_template(site), + 'pop_out': self.pop_out, + 'shelf': self.shelf, + 'attributes': self.get_attributes(), + 'form_prefix': self.get_form_prefix(), + 'display_name': self.display_name, + } + if self.editable: + data['edit_url'] = site.reverse(site.node_edit_view, kwargs=node_pk_kwargs) + return data + + def get_attributes(self): + model_data = {} + for field in self._meta.fields: + if field.serialize: + model_data[field.attname] = field.value_from_object(self) + return model_data + + @classmethod + def class_to_json(cls, site): + """ + :Returns: a json-able python object that represents the class type. + """ + return { + '__class__': "%s.%s" % (cls._meta.app_label, cls._meta.module_name), + 'title': capfirst(cls._meta.verbose_name), + 'css_classes': cls.get_class_css_classes(), + 'tooltip': cls.tooltip and force_text(cls.tooltip), + } + + @property + def display_name(self): + return unicode(self._meta.verbose_name) + + @property + def class_name(self): + """ + :Returns: a fully qualified classname including app_label and module_name + """ + return "%s.%s" % (self._meta.app_label, self._meta.module_name) + + @classmethod + def get_class_css_classes(cls): + if hasattr(cls, 'css_classes'): + return cls.css_classes + return (cls._meta.app_label, cls._meta.module_name) + + def get_css_classes(self): + if hasattr(self, 'css_classes'): + return self.css_classes + return self.get_class_css_classes() + + @property + def node(self): + """ + Settable property used by Node.prefetch_tree to optimize tree + rendering + """ + if hasattr(self, '_node'): + return self._node + try: + return self._nodes.all()[0] + except IndexError: + raise Node.DoesNotExist + + @node.setter + def node(self, value): + self._node = value + + def get_root(self): + return self.node.get_root().content + + def get_ancestors(self): + ancestors = Node.attach_content_instances(self.node.get_ancestors()) + return [node.content for node in ancestors] + + def depth_first_order(self): + nodes = Node.attach_content_instances(self.node.depth_first_order()) + return [node.content for node in nodes] + + def get_children(self): + node_children = Node.attach_content_instances(self.node.get_children()) + return [node.content for node in node_children] + + def get_next_sibling(self): + sib = self.node.get_next_sibling() + return sib and sib.content + + def get_parent(self): + parent = self.node.get_parent() + return parent and parent.content + + def get_form_class(self, request): + defaults = { + "form": self.form, + "formfield_callback": partial(self.formfield_for_dbfield, request=request), + } + form_class = modelform_factory(self.__class__, **defaults) + # Rather than make everybody subclass a special form, add the + # required_css_class and error_css_class manually here, because we know + # we need it in the widgy editor. If need be, we can make the actual + # classes configurable somehow later. + if not hasattr(form_class, 'required_css_class'): + form_class.required_css_class = 'required' + if not hasattr(form_class, 'error_css_class'): + form_class.error_css_class = 'error' + return form_class + + def get_form_prefix(self): + return self.node.pk + + def get_form(self, request, **form_kwargs): + form_class = self.get_form_class(request) + form_kwargs.setdefault('instance', self) + return form_class(**form_kwargs) + + def valid_parent_of(self, cls, obj=None): + """ + Given a content class, can it be _added_ as our child? + Note: this does not apply to _existing_ children (adoption) + """ + return self.accepting_children + + @classmethod + def valid_child_of(cls, parent, obj=None): + """ + Given a `Content` instance, does our class consent to be adopted by them? + """ + return True + + @classmethod + def add_root(cls, site, **kwargs): + """ + Creates a new Content instance, stores it in the database, and calls + ``Node.add_root`` + """ + obj = cls.objects.create(**kwargs) + Node.add_root(content=obj) + obj.post_create(site) + return obj + + def add_child(self, site, cls, **kwargs): + self.check_frozen() + obj = cls.objects.create(**kwargs) + self.node.add_child(content=obj) + + try: + site.validate_relationship(self, obj) + except: + obj.delete(raw=True) + raise + + obj.post_create(site) + return obj + + def add_sibling(self, site, cls, **kwargs): + self.check_frozen() + if self.node.is_root(): + raise RootDisplacementError({'message': 'You can\'t put things next to me'}) + + obj = cls.objects.create(**kwargs) + self.node.add_sibling(content=obj, pos='left') + parent = self.node.get_parent().content + + try: + site.validate_relationship(parent, obj) + except ParentChildRejection: + obj.delete(raw=True) + raise + + obj.post_create(site) + return obj + + def post_create(self, site): + """ + Hook for custom code which needs to be run after creation. Since the + `Node` must be created after the content, any tree based actions + have to happen after the save event has finished. + """ + pass + + @classmethod + def get_templates_hierarchy(cls, **kwargs): + templates = kwargs.get('hierarchy', ( + 'widgy/{app_label}/{module_name}/{template_name}{extension}', + 'widgy/{app_label}/{template_name}{extension}', + 'widgy/{template_name}{extension}', + )) + kwargs.setdefault('extension', '.html') + + ret = [] + for template in templates: + for parent_cls in cls.__mro__: + try: + ret.extend( + template.format(**i) for i in parent_cls.get_template_kwargs(**kwargs) + ) + except AttributeError: + pass + # This must return a list or tuple because + # django.template.render_to_string does a typecheck. + return ret + + @classmethod + def get_template_kwargs(cls, **kwargs): + defaults = { + 'app_label': cls._meta.app_label, + 'module_name': cls._meta.module_name, + } + defaults.update(**kwargs) + + return [defaults] + + @property + def preview_templates(self): + """ + List of templates to search for the content template that is displayed + in the editor to show a preview. + """ + return self.get_templates_hierarchy(template_name='preview') + + @property + def edit_templates(self): + """ + List of templates to search for the edit form. + """ + return self.get_templates_hierarchy(template_name='edit') + + def get_render_templates(self, context): + """ + List of templates to search for the rendered template on the frontend. + """ + return self.get_templates_hierarchy(template_name='render') + + def get_form_template(self, request, template=None, context=None): + """ + :Returns: Rendered form template with the given context, if any. + """ + if not context: + context = RequestContext(request) + with update_context(context, {'form': self.get_form(request, prefix=self.get_form_prefix())}): + return render_to_string(template or self.edit_templates, context) + + def get_preview_template(self, site): + """ + :Returns: Rendered preview template. + """ + return render_to_string(self.preview_templates, { + 'self': self, + 'edit_url': site.reverse(site.node_edit_view, kwargs={ + 'node_pk': self.node.pk, + }), + 'site': site, + }) + + def render(self, context, template=None): + """ + A ``template`` kwarg can be passed to use an explictly defined template + instead of the default template list. + """ + with update_context(context, {'self': self}): + return render_to_string( + template or self.get_render_templates(context), + context + ) + + def formfield_for_dbfield(self, db_field, **kwargs): + """ + Hook for specifying the form Field instance for a given database Field + instance. + + If kwargs are given, they're passed to the form Field's constructor. + """ + request = kwargs.pop("request", None) + formfield = db_field.formfield(**kwargs) + + if formfield and isinstance(db_field, (models.ForeignKey, models.ManyToManyField)): + from django.contrib.admin import site as admin_site + related_modeladmin = admin_site._registry.get(db_field.rel.to) + can_add_related = bool(related_modeladmin and + related_modeladmin.has_add_permission(request)) + formfield.widget = widgets.RelatedFieldWidgetWrapper( + formfield.widget, db_field.rel, admin_site, + can_add_related=can_add_related) + else: + for klass in db_field.__class__.mro(): + if klass in self.formfield_overrides: + kwargs = dict(copy.deepcopy(self.formfield_overrides[klass]), **kwargs) + return db_field.formfield(**kwargs) + return formfield + + def get_templates(self, request): + return { + 'edit_template': self.get_form_template(request), + } + + def reposition(self, site, right=None, parent=None): + self.check_frozen() + old_parent_node = self.node.get_parent() + old_right_node = self.node.get_next_sibling() + if right: + if right.node.is_root(): + raise InvalidTreeMovement({'message': 'You can\'t move the root'}) + + site.validate_relationship(right.get_parent(), self) + self.node.move(right.node, pos='left') + elif parent: + site.validate_relationship(parent, self) + self.node.move(parent.node, pos='last-child') + else: + assert right or parent + + try: + # When moving, it's necessary to recheck compatibility for all of + # our children. For example, this detects deep nesting of + # un-nestable widgets. + node = self._nodes.get() # use a new, uncached node + # use a prefetched tree + node.prefetch_tree() + node.content._recheck_children(site) + except ParentChildRejection: + # Backout. It'd be nice to rely on a transaction here and have this + # happen automatically. + if old_right_node: + self.node.move(old_right_node, pos='left') + else: + self.node.move(old_parent_node, pos='last-child') + raise + + def _recheck_children(self, site): + for c in self.get_children(): + site.validate_relationship(self, c) + c._recheck_children(site) + + def delete(self, raw=False): + self.check_frozen() + pre_delete_widget.send(self.__class__, instance=self, raw=raw) + for child in self.get_children(): + child.delete(raw) + self.node.delete() + super(Content, self).delete() + + def clone(self): + """ + **Note:** In order for clone to work, you need to have an + auto-incrementing primary key. + + Also see https://docs.djangoproject.com/en/dev/topics/db/queries/#copying-model-instances + """ + # TODO: Maybe provide support for many-to-many relationships too, or + # document that you should provide your own clone() + # See https://code.djangoproject.com/ticket/4027 + new = copy.copy(self) + unset_pks(new) + new.save() + return new + + def save(self, *args, **kwargs): + self.check_frozen() + return super(Content, self).save(*args, **kwargs) + + def check_frozen(self): + if not self.pk: + # if we don't have a pk, we can't have a node + return + try: + self.node.check_frozen() + except Node.DoesNotExist: + pass + + def equal(self, other): + return self.get_attributes() == other.get_attributes() + + +# Otherwise, mixins will inherit Content.Meta and get wierd app_labels +# Delete this line and the app_label line when we drop support for Django < 1.7 +del Content.Meta + + +class UnknownWidget(Content): + """ + A placeholder Content class used when the correct one can't be found. For + example, when the database refers to widgets from an app that is no longer + installed. + """ + + deletable = False + draggable = False + editable = False + + class Meta: + app_label = 'widgy' + # we don't actually need a db table + managed = False + + def __init__(self, content_type, id, *args, **kwargs): + super(UnknownWidget, self).__init__(*args, **kwargs) + self.content_type = content_type + self.id = id + + def render(self, *args, **kwargs): + return '' + + def delete(*args, **kwargs): + pass + + def warn(self): + logger.warning('UnknownWidget being rendered. Content type: %s.%s', + self.content_type.app_label, + self.content_type.model) diff --git a/widgy/models/links.py b/widgy/models/links.py new file mode 100644 index 000000000..12772bf41 --- /dev/null +++ b/widgy/models/links.py @@ -0,0 +1,169 @@ +import copy +from operator import or_ +import itertools + +from django.db import models +from django.db.models.fields import Field +from django.contrib.contenttypes.models import ContentType +from django.template.defaultfilters import capfirst +from django import forms + +from widgy.generic import WidgyGenericForeignKey +from widgy import BaseRegistry + + +class LinkRegistry(BaseRegistry): + def get_links(self, obj): + if not isinstance(obj, tuple(self)): + raise ValueError("The object class is not registered linkable") + all_qs = (linker._default_manager.filter(points_to_links(linker, obj)) + for linker in self.get_all_linker_classes()) + + return itertools.chain.from_iterable(all_qs) + + @classmethod + def get_all_linker_classes(cls): + return filter(cls.has_link, models.get_models()) + + @classmethod + def has_link(cls, model): + return any(isinstance(field, LinkField) + for field in model._meta.virtual_fields) + + + +link_registry = LinkRegistry() +register = link_registry.register +unregister = link_registry.register + + +def points_to_links(linker, linkable): + """ + Returns a Q object that filters for the linkable instance across all + LinkFields on the linker model. + """ + content_type = ContentType.objects.get_for_model(linkable) + return reduce(or_, (models.Q(**{field.ct_field: content_type, + field.fk_field: linkable.pk}) + for field in linker._meta.virtual_fields + if isinstance(field, LinkField))) + + +class LinkField(WidgyGenericForeignKey): + """ + TODO: Explore the consequences of using add_field in contribute_to_class to + make this a real field instead of a virtual_field. + """ + def __init__(self, ct_field=None, fk_field=None, *args, **kwargs): + self.null = kwargs.pop('null', False) + self._link_registry = kwargs.pop('link_registry', link_registry) + super(LinkField, self).__init__(ct_field, fk_field, *args, **kwargs) + + def get_choices(self): + return itertools.chain.from_iterable(choices for _, choices in self.get_choices_by_class()) + + def get_choices_by_class(self): + def key(cls): + return cls._meta.verbose_name_plural.lower() + return ((Model, Model._default_manager.all()) + for Model in sorted(self._link_registry, key=key)) + + def contribute_to_class(self, cls, name): + if self.ct_field is None: + self.ct_field = '%s_content_type' % name + + if self.fk_field is None: + self.fk_field = '%s_object_id' % name + + # do not do anything that loads the app cache here, like + # _meta.get_all_field_names, or you'll cause a circular import. + if self.ct_field not in [i.name for i, _ in cls._meta.get_fields_with_model()]: + ct_field = models.ForeignKey(ContentType, related_name='+', + null=self.null, editable=False) + cls.add_to_class(self.ct_field, ct_field) + + if self.fk_field not in [i.name for i, _ in cls._meta.get_fields_with_model()]: + fk_field = models.PositiveIntegerField(null=self.null, + editable=False) + cls.add_to_class(self.fk_field, fk_field) + + super(LinkField, self).contribute_to_class(cls, name) + + def __deepcopy__(self, memodict): + # Copied from Field.__deepcopy__ to avoid copying _link_registry + obj = copy.copy(self) + memodict[id(self)] = obj + return obj + + +def get_composite_key(linkable): + content_type = ContentType.objects.get_for_model(linkable) + return u'%s-%s' % (content_type.pk, linkable.pk) + + +def convert_linkable_to_choice(linkable): + key = get_composite_key(linkable) + + try: + value = u'%s (%s)' % (unicode(linkable), linkable.get_absolute_url()) + except AttributeError: + value = unicode(linkable) + + return (key, value) + + +class LinkFormField(forms.ChoiceField): + def __init__(self, choices=(), empty_label="---------", *args, **kwargs): + self.empty_label = empty_label + super(LinkFormField, self).__init__(choices, *args, **kwargs) + + def clean(self, value): + content_type_pk, _, object_pk = value.partition('-') + if object_pk: + content_type = ContentType.objects.get_for_id(content_type_pk) + return content_type.get_object_for_this_type(pk=object_pk) + else: + return None + + def populate_choices(self, choice_map): + keyfn = lambda x: x[1].lower() + + choices = [(capfirst(Model._meta.verbose_name_plural), + sorted(map(convert_linkable_to_choice, choices), key=keyfn)) + for Model, choices in choice_map + if len(choices)] + + if not self.required and self.empty_label is not None: + choices.insert(0, ('', self.empty_label)) + + self.choices = choices + + +def get_link_field_from_model(model, name): + for field in model._meta.virtual_fields: + if isinstance(field, LinkField) and field.name == name: + return field + + +class LinkFormMixin(object): + def __init__(self, *args, **kwargs): + super(LinkFormMixin, self).__init__(*args, **kwargs) + for name, field in self.get_link_form_fields(): + value = getattr(self.instance, name, None) + model_field = get_link_field_from_model(self.instance, name) + field.initial = get_composite_key(value) if value else None + field.populate_choices(model_field.get_choices_by_class()) + + def get_link_form_fields(self): + return ((name, field) + for name, field in self.fields.items() + if isinstance(field, LinkFormField)) + + def save(self, *args, **kwargs): + if not self.errors: + cleaned_data = self.cleaned_data + + for name, field in self.get_link_form_fields(): + setattr(self.instance, name, cleaned_data[name]) + + return super(LinkFormMixin, self).save(*args, **kwargs) diff --git a/widgy/models/mixins.py b/widgy/models/mixins.py new file mode 100644 index 000000000..d1a4ba0ec --- /dev/null +++ b/widgy/models/mixins.py @@ -0,0 +1,130 @@ +from __future__ import unicode_literals + +from operator import attrgetter + +import six + + +class DefaultChildrenMixin(object): + """ + With this mixin, you can specify which children your Content will have. It + provides a post_create that will add the children for you and also a + valid_parent_of that does validation. Specify the children like this: + + default_children = [ + (MainContent, (), {}), + (Sidebar, (), {}), + ] + + such that index 0 is the content class and 1 and 2 are the args and kwargs + to be passed in during post_create. + """ + default_children = tuple() + + def post_create(self, site): + for cls, args, kwargs in self.default_children: + self.add_child(site, cls, *args, **kwargs) + + +class StrictDefaultChildrenMixin(DefaultChildrenMixin): + """ + StrictDefaultChildrenMixin works slightly differently from + DefaultChildrenMixin, in that it also provides validation to ensure that + only those children specified in default_children are compatible. + + It also provides a property called children that provides named access to + the children. You have to specify the children like this. + + default_children = [ + ('main', MainContent, (), {}), + ('sidebar', Sidebar, (), {}), + ] + """ + def post_create(self, site): + for name, cls, args, kwargs in self.default_children: + self.add_child(site, cls, *args, **kwargs) + + @property + def children(self): + return dict( + (self.default_children[index][0], child) for index, child in enumerate(self.get_children()) + ) + + def valid_parent_of(self, cls, obj=None): + if obj and obj in self.get_children(): + return True + + return (issubclass(cls, tuple([child_class[1] for child_class in self.default_children])) and + len(self.get_children()) < len(self.default_children)) + + +class InvisibleMixin(object): + """ + Provides a preview template that accepts children, but is otherwise + invisible. + """ + def get_css_classes(self): + return super(InvisibleMixin, self).get_css_classes() + ('invisible',) + + @classmethod + def get_template_kwargs(cls, **kwargs): + defaults = { + 'app_label': 'mixins', + 'module_name': 'invisible', + } + defaults.update(**kwargs) + + return super(InvisibleMixin, cls).get_template_kwargs(**kwargs) + [defaults] + + +class TabbedContainer(object): + component_name = 'tabbed' + + def get_css_classes(self): + return super(TabbedContainer, self).get_css_classes() + ('tabbed',) + + @classmethod + def get_template_kwargs(cls, **kwargs): + defaults = { + 'app_label': 'mixins', + 'module_name': 'tabbed', + } + defaults.update(**kwargs) + + return super(TabbedContainer, cls).get_template_kwargs(**kwargs) + [defaults] + + +def DisplayNameMixin(fn): + """ + Helper for making nicer display names. Example usage: + + class Thing(DisplayNameMixin(lambda x: x.title), Content): + ... + + thing = Thing() + thing.display_name # Thing + thing.title = 'Title' + thing.display_name # Thing - title + """ + class cls(object): + def deconstruct(self): + return 'widgy.models.mixins.DisplayNameMixin', (fn,), {} + + @property + def display_name(self): + name = super(cls, self).display_name + extra = fn(self) + if extra: + name = '%s - %s' % (name, extra) + + return name + + return cls + + +TitleDisplayNameMixin = DisplayNameMixin(attrgetter('title')) +StrDisplayNameMixin = DisplayNameMixin(six.text_type) + +# for migration serialization +TitleDisplayNameMixin.__name__ = str('TitleDisplayNameMixin') +StrDisplayNameMixin.__name__ = str('StrDisplayNameMixin') diff --git a/widgy/models/versioning.py b/widgy/models/versioning.py new file mode 100644 index 000000000..a661675cb --- /dev/null +++ b/widgy/models/versioning.py @@ -0,0 +1,215 @@ +import copy + +from django.db import models +from django.utils import timezone +from django.utils.functional import cached_property +from django.db.models.deletion import ProtectedError +from django.conf import settings +from django.template.defaultfilters import date as date_format + +from widgy.db.fields import WidgyField +from widgy.models.base import Node +from widgy.utils import QuerySet, unset_pks + + +class VersionCommit(models.Model): + tracker = models.ForeignKey('VersionTracker', related_name='commits') + parent = models.ForeignKey('VersionCommit', null=True, on_delete=models.PROTECT) + root_node = WidgyField(on_delete=models.PROTECT) + author = models.ForeignKey(getattr(settings, 'AUTH_USER_MODEL', 'auth.User'), + null=True, on_delete=models.SET_NULL) + created_at = models.DateTimeField(auto_now_add=True) + message = models.TextField(blank=True, null=True) + publish_at = models.DateTimeField(default=timezone.now) + + class Meta: + app_label = 'widgy' + + @property + def is_published(self): + return self.publish_at <= timezone.now() + + def __unicode__(self): + if self.message: + subject = " - '%s'" % self.message.strip().split('\n')[0] + else: + subject = '' + date = date_format(self.created_at, 'DATETIME_FORMAT') + return '#%s %s%s' % (self.id, date, subject) + + +class VersionTracker(models.Model): + commit_model = VersionCommit + + head = models.ForeignKey('VersionCommit', null=True, on_delete=models.PROTECT, unique=True) + working_copy = models.ForeignKey(Node, on_delete=models.PROTECT, unique=True) + + class Meta: + app_label = 'widgy' + + class VersionTrackerQuerySet(QuerySet): + def orphan(self): + """ + Filters the queryset to only include 'orphan' VersionTrackers. That + is, VersionTrackers that have no objects pointing to them. This can + be used to recover VersionTrackers whose parent object was deleted. + """ + + filters = {} + for rel_obj in (self.model._meta.get_all_related_objects() + + self.model._meta.get_all_related_many_to_many_objects()): + if not issubclass(rel_obj.model, VersionCommit): + name = rel_obj.field.rel.related_name or rel_obj.var_name + filters[name + '__isnull'] = True + return self.filter(**filters) + + def published(self): + """ + Filter the queryset to only include version tracker that have a + published commits. + """ + return self.filter(commits__publish_at__lte=timezone.now()).distinct() + + objects = VersionTrackerQuerySet.as_manager() + + def commit(self, user=None, **kwargs): + self.head = self.commit_model.objects.create( + parent=self.head, + author=user, + root_node=self.working_copy.clone_tree(), + tracker=self, + **kwargs + ) + + self.save() + + return self.head + + def revert_to(self, commit, user=None, **kwargs): + self.head = self.commit_model.objects.create( + parent=self.head, + author=user, + root_node=commit.root_node, + tracker=self, + **kwargs + ) + + old_working_copy = self.working_copy + self.working_copy = commit.root_node.clone_tree(freeze=False) + # saving with the new working copy has to come before deleting the old + # working copy, because foreign keys. + self.save() + old_working_copy.content.delete() + + return self.head + + def reset(self): + old_working_copy = self.working_copy + self.working_copy = self.head.root_node.clone_tree(freeze=False) + self.save() + try: + old_working_copy.content.delete() + except ProtectedError: + # The tree couldn't be deleted, so just let it float away... + pass + + def commit_is_ready(self, commit): + """ + This method exists on the VersionTracker (instead of the VersionCommit) + so that it is easier to override behavior in things like the + review_queue. + """ + return commit.is_published + + def get_published_node(self, request): + for commit in self.get_history(): + if self.commit_is_ready(commit): + return commit.root_node + return None + + def get_history(self): + """ + An iterator over commits, newest first. + """ + + commit = self.head + while commit: + yield commit + commit = commit.parent + + def get_history_list(self): + """ + A list of commits, newest first. Fetches them all in a single query. + """ + + commit_dict = dict((i.id, i) for i in self.commits.select_related('author', 'root_node')) + res = [] + commit_id = self.head_id + while commit_id: + commit = commit_dict[commit_id] + commit.tracker = self + commit.parent = commit_dict.get(commit.parent_id) + res.append(commit) + commit_id = commit.parent_id + return res + + def has_changes(self): + if not self.head: + return True + else: + newest_tree = self.head.root_node + Node.prefetch_trees(self.working_copy, newest_tree) + return not self.working_copy.trees_equal(newest_tree) + + def delete(self): + commits = self.get_history_list() + # break the circular reference + self.head = None + self.save() + + # Commits can share trees (it happens when reverting), so collect them + # in a set in order to only delete them once. + trees_to_delete = set([self.working_copy]) + for commit in commits: + trees_to_delete.add(commit.root_node) + commit.delete() + + super(VersionTracker, self).delete() + + for root_node in trees_to_delete: + Node.get_tree(root_node).update(is_frozen=False) + root_node.content.delete() + + @classmethod + def get_owner_related_names(cls): + """ + Names of reverse relationships of WidgyFields that point to us. + """ + for rel_obj in cls._meta.get_all_related_objects(): + if isinstance(rel_obj.field, WidgyField): + yield rel_obj.get_accessor_name() + + @cached_property + def owners(self): + return list(owner + for attr in self.get_owner_related_names() + for owner in getattr(self, attr).all()) + + def clone(self): + vt = copy.copy(self) + vt.working_copy = vt.working_copy.clone_tree(freeze=False) + commits = list(self._commits_to_clone()) + unset_pks(vt) + vt.head = None + vt.save() + for commit in commits: + commit.tracker = vt + commit.parent = vt.head + unset_pks(commit) + commit.save() + vt.head = commit + vt.save() + return vt + + def _commits_to_clone(self): + return self.commits.order_by('id') diff --git a/widgy/signals.py b/widgy/signals.py new file mode 100644 index 000000000..4f8e4001c --- /dev/null +++ b/widgy/signals.py @@ -0,0 +1,4 @@ +from django.dispatch import Signal + + +pre_delete_widget = Signal(providing_args=['instance', 'raw']) diff --git a/widgy/site.py b/widgy/site.py new file mode 100644 index 000000000..5524821d8 --- /dev/null +++ b/widgy/site.py @@ -0,0 +1,200 @@ +from django.conf.urls import patterns, url +from django.core.urlresolvers import reverse +from django.core.exceptions import PermissionDenied +from django.contrib.staticfiles import finders +from django.utils.functional import cached_property + +from widgy import registry +from widgy.views import ( + NodeView, + ContentView, + ShelfView, + NodeEditView, + NodeTemplatesView, + NodeParentsView, + CommitView, + HistoryView, + RevertView, + DiffView, + ResetView, +) +from widgy.exceptions import ( + MutualRejection, + ParentWasRejected, + ChildWasRejected, +) + + +class WidgySite(object): + def get_registry(self): + return registry + + def get_all_content_classes(self): + return self.get_registry() + + def get_urls(self): + urlpatterns = patterns('', + url('^node/$', self.node_view), + url('^node/(?P[^/]+)/$', self.node_view), + url('^node/(?P[^/]+)/available-children-recursive/$', self.shelf_view), + url('^node/(?P[^/]+)/edit/$', self.node_edit_view), + url('^node/(?P[^/]+)/templates/$', self.node_templates_view), + url('^node/(?P[^/]+)/possible-parents/$', self.node_parents_view), + url('^contents/(?P[A-z_][\w_]*)/(?P[A-z_][\w_]*)/(?P[^/]+)/$', self.content_view), + + # versioning + url('^revert/(?P[^/]+)/(?P[^/]+)/$', self.revert_view), + url('^commit/(?P[^/]+)/$', self.commit_view), + url('^history/(?P[^/]+)/$', self.history_view), + url('^reset/(?P[^/]+)/$', self.reset_view), + url('^diff/$', self.diff_view), + ) + return urlpatterns + + @property + def urls(self): + return self.get_urls() + + def reverse(self, *args, **kwargs): + """ + We tried to use namespaced URLs per site just like ModelAdmins, + however, as we refer to the views by their function objects, we can't + use namespaces because there is a bug in Django: + + https://code.djangoproject.com/ticket/17914 + + We should use named URLs instead of function references, but we + couldn't get that working. + """ + return reverse(*args, **kwargs) + + def authorize_view(self, request, view): + if not (request.user.is_authenticated() and request.user.is_staff): + raise PermissionDenied + + def has_add_permission(self, request, content_class): + return request.user.has_perm('%s.%s' % (content_class._meta.app_label, content_class._meta.get_add_permission())) + + def has_change_permission(self, request, obj_or_class): + return request.user.has_perm('%s.%s' % (obj_or_class._meta.app_label, obj_or_class._meta.get_change_permission())) + + def has_delete_permission(self, request, obj_or_class): + def has_perm(o): + return request.user.has_perm('%s.%s' % (o._meta.app_label, o._meta.get_delete_permission())) + + if isinstance(obj_or_class, type): + return has_perm(obj_or_class) + else: + return all(map(has_perm, obj_or_class.depth_first_order())) + + # These must return the same instance throughout the whole lifetime + # of the widgy site for reverse to work. + @cached_property + def node_view(self): + return NodeView.as_view(site=self) + + @cached_property + def content_view(self): + return ContentView.as_view(site=self) + + @cached_property + def shelf_view(self): + return ShelfView.as_view(site=self) + + @cached_property + def node_edit_view(self): + return NodeEditView.as_view(site=self) + + @cached_property + def node_templates_view(self): + return NodeTemplatesView.as_view(site=self) + + @cached_property + def node_parents_view(self): + return NodeParentsView.as_view(site=self) + + @cached_property + def commit_view(self): + return CommitView.as_view(site=self) + + @cached_property + def history_view(self): + return HistoryView.as_view(site=self) + + @cached_property + def revert_view(self): + return RevertView.as_view(site=self) + + @cached_property + def diff_view(self): + return DiffView.as_view(site=self) + + @cached_property + def reset_view(self): + return ResetView.as_view(site=self) + + def valid_parent_of(self, parent, child_class, child=None): + return parent.valid_parent_of(child_class, child) + + def valid_child_of(self, parent, child_class, child=None): + return child_class.valid_child_of(parent, child) + + def validate_relationship(self, parent, child): + if isinstance(child, type): + child_class = child + child = None + else: + child_class = type(child) + + bad_child = not self.valid_parent_of(parent, child_class, child) + bad_parent = not self.valid_child_of(parent, child_class, child) + + if bad_parent and bad_child: + raise MutualRejection("Neither {parent} nor {child} want to be together.".format( + child=child_class.__name__, + parent=type(parent).__name__, + )) + elif bad_parent: + raise ParentWasRejected("{child} refuses to be put in {parent}.".format( + child=child_class.__name__, + parent=type(parent).__name__, + )) + elif bad_child: + raise ChildWasRejected("{parent} refuses to accept {child}.".format( + child=child_class.__name__, + parent=type(parent).__name__, + )) + + def get_version_tracker_model(self): + from widgy.models import VersionTracker + return VersionTracker + + def filter_existing_staticfiles(self, filename): + path = finders.find(filename) + return bool(path) + + def find_media_files(self, extension, hierarchy=['widgy/{app_label}/{module_name}{extension}']): + files = set() + for widget in self.get_all_content_classes(): + files.update(widget.get_templates_hierarchy( + hierarchy=hierarchy, + extension=extension, + )) + return sorted(filter(self.filter_existing_staticfiles, files)) + + @cached_property + def scss_files(self): + return self.find_media_files('.scss') + + @cached_property + def js_files(self): + return self.find_media_files('.js') + + @cached_property + def admin_scss_files(self): + return self.find_media_files( + extension='.scss', + hierarchy=[ + 'widgy/{app_label}/{module_name}.admin{extension}', + 'widgy/{app_label}/admin{extension}', + ]) diff --git a/widgy/south_migrations/0001_initial.py b/widgy/south_migrations/0001_initial.py new file mode 100644 index 000000000..9fd7de11e --- /dev/null +++ b/widgy/south_migrations/0001_initial.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Node' + db.create_table('widgy_node', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('path', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), + ('depth', self.gf('django.db.models.fields.PositiveIntegerField')()), + ('numchild', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)), + ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), + ('content_id', self.gf('django.db.models.fields.PositiveIntegerField')()), + )) + db.send_create_signal('widgy', ['Node']) + + def backwards(self, orm): + # Deleting model 'Node' + db.delete_table('widgy_node') + + + models = { + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + } + + complete_apps = ['widgy'] diff --git a/widgy/south_migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py b/widgy/south_migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py new file mode 100644 index 000000000..0597c4df1 --- /dev/null +++ b/widgy/south_migrations/0002_auto__del_imagecontent__del_twocolumnlayout__del_bucket__del_textconte.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + pass + + + def backwards(self, orm): + pass + + + models = { + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + } + } + + complete_apps = ['widgy'] diff --git a/widgy/south_migrations/0003_auto__add_versiontracker__add_versioncommit.py b/widgy/south_migrations/0003_auto__add_versiontracker__add_versioncommit.py new file mode 100644 index 000000000..8bf08c5b1 --- /dev/null +++ b/widgy/south_migrations/0003_auto__add_versiontracker__add_versioncommit.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +from widgy.utils import get_user_model +User = get_user_model() + +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'VersionTracker' + db.create_table('widgy_versiontracker', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('head', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True)), + ('working_copy', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.Node'])), + )) + db.send_create_signal('widgy', ['VersionTracker']) + + # Adding model 'VersionCommit' + db.create_table('widgy_versioncommit', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('tracker', self.gf('django.db.models.fields.related.ForeignKey')(related_name='commits', to=orm['widgy.VersionTracker'])), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True, on_delete=models.SET_NULL)), + ('root_node', self.gf('widgy.db.fields.WidgyField')(to=orm['widgy.Node'], null=True, on_delete=models.SET_NULL, blank=True)), + ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_orm_label], null=True, on_delete=models.SET_NULL)), + ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + )) + db.send_create_signal('widgy', ['VersionCommit']) + + + def backwards(self, orm): + # Deleting model 'VersionTracker' + db.delete_table('widgy_versiontracker') + + # Deleting model 'VersionCommit' + db.delete_table('widgy_versioncommit') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + '_nodes': ('widgy.generic.ProxyGenericRelation', [], {'object_id_field': "'content_id'", 'to': "orm['widgy.Node']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_orm_label, 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']"}) + } + } + + complete_apps = ['widgy'] diff --git a/widgy/south_migrations/0004_auto__add_field_node_frozen.py b/widgy/south_migrations/0004_auto__add_field_node_frozen.py new file mode 100644 index 000000000..10f326979 --- /dev/null +++ b/widgy/south_migrations/0004_auto__add_field_node_frozen.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'Node.frozen' + db.add_column(u'widgy_node', 'frozen', + self.gf('django.db.models.fields.BooleanField')(default=False), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'Node.frozen' + db.delete_column(u'widgy_node', 'frozen') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + '_nodes': ('widgy.generic.ProxyGenericRelation', [], {'object_id_field': "'content_id'", 'to': "orm['widgy.Node']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']"}) + } + } + + complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/south_migrations/0005_auto__chg_field_versiontracker_head__chg_field_versiontracker_working_.py b/widgy/south_migrations/0005_auto__chg_field_versiontracker_head__chg_field_versiontracker_working_.py new file mode 100644 index 000000000..60bbded51 --- /dev/null +++ b/widgy/south_migrations/0005_auto__chg_field_versiontracker_head__chg_field_versiontracker_working_.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'VersionTracker.head' + db.alter_column('widgy_versiontracker', 'head_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True, on_delete=models.PROTECT)) + + # Changing field 'VersionTracker.working_copy' + db.alter_column('widgy_versiontracker', 'working_copy_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.Node'], on_delete=models.PROTECT)) + + db.rename_column('widgy_node', 'frozen', 'is_frozen') + + # Changing field 'VersionCommit.parent' + db.alter_column('widgy_versioncommit', 'parent_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True, on_delete=models.PROTECT)) + + # Changing field 'VersionCommit.root_node' + db.alter_column('widgy_versioncommit', 'root_node_id', self.gf('widgy.db.fields.WidgyField')(to=orm['widgy.Node'], null=True, on_delete=models.PROTECT)) + + def backwards(self, orm): + + # Changing field 'VersionTracker.head' + db.alter_column('widgy_versiontracker', 'head_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True)) + + # Changing field 'VersionTracker.working_copy' + db.alter_column('widgy_versiontracker', 'working_copy_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.Node'])) + + db.rename_column('widgy_node', 'is_frozen', 'frozen') + + + # Changing field 'VersionCommit.parent' + db.alter_column('widgy_versioncommit', 'parent_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['widgy.VersionCommit'], null=True, on_delete=models.SET_NULL)) + + # Changing field 'VersionCommit.root_node' + db.alter_column('widgy_versioncommit', 'root_node_id', self.gf('widgy.db.fields.WidgyField')(to=orm['widgy.Node'], null=True, on_delete=models.SET_NULL)) + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + '_nodes': ('widgy.generic.ProxyGenericRelation', [], {'object_id_field': "'content_id'", 'to': "orm['widgy.Node']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] diff --git a/widgy/south_migrations/0006_auto__add_field_versioncommit_message.py b/widgy/south_migrations/0006_auto__add_field_versioncommit_message.py new file mode 100644 index 000000000..370ae2f7a --- /dev/null +++ b/widgy/south_migrations/0006_auto__add_field_versioncommit_message.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'VersionCommit.message' + db.add_column('widgy_versioncommit', 'message', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'VersionCommit.message' + db.delete_column('widgy_versioncommit', 'message') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + '_nodes': ('widgy.generic.ProxyGenericRelation', [], {'object_id_field': "'content_id'", 'to': "orm['widgy.Node']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/south_migrations/0007_auto__add_field_versioncommit_publish_at.py b/widgy/south_migrations/0007_auto__add_field_versioncommit_publish_at.py new file mode 100644 index 000000000..cce9cb903 --- /dev/null +++ b/widgy/south_migrations/0007_auto__add_field_versioncommit_publish_at.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'VersionCommit.publish_at' + db.add_column(u'widgy_versioncommit', 'publish_at', + self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(year=1970, month=1, day=1), blank=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'VersionCommit.publish_at' + db.delete_column(u'widgy_versioncommit', 'publish_at') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'publish_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] diff --git a/widgy/south_migrations/0008_auto__chg_field_versioncommit_created_at__chg_field_versioncommit_publ.py b/widgy/south_migrations/0008_auto__chg_field_versioncommit_created_at__chg_field_versioncommit_publ.py new file mode 100644 index 000000000..7ba1963af --- /dev/null +++ b/widgy/south_migrations/0008_auto__chg_field_versioncommit_created_at__chg_field_versioncommit_publ.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'VersionCommit.created_at' + db.alter_column(u'widgy_versioncommit', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) + + # Changing field 'VersionCommit.publish_at' + db.alter_column(u'widgy_versioncommit', 'publish_at', self.gf('django.db.models.fields.DateTimeField')()) + + def backwards(self, orm): + + # Changing field 'VersionCommit.created_at' + db.alter_column(u'widgy_versioncommit', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True)) + + # Changing field 'VersionCommit.publish_at' + db.alter_column(u'widgy_versioncommit', 'publish_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True)) + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'publish_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/south_migrations/0009_auto__add_unique_node_content_id_content_type.py b/widgy/south_migrations/0009_auto__add_unique_node_content_id_content_type.py new file mode 100644 index 000000000..667c07387 --- /dev/null +++ b/widgy/south_migrations/0009_auto__add_unique_node_content_id_content_type.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding unique constraint on 'Node', fields ['content_id', 'content_type'] + db.create_unique(u'widgy_node', ['content_id', 'content_type_id']) + + + def backwards(self, orm): + # Removing unique constraint on 'Node', fields ['content_id', 'content_type'] + db.delete_unique(u'widgy_node', ['content_id', 'content_type_id']) + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'unique_together': "[('content_type', 'content_id')]", 'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'publish_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/south_migrations/0010_auto__add_unique_versiontracker_head__add_unique_versiontracker_workin.py b/widgy/south_migrations/0010_auto__add_unique_versiontracker_head__add_unique_versiontracker_workin.py new file mode 100644 index 000000000..42b2cfc2e --- /dev/null +++ b/widgy/south_migrations/0010_auto__add_unique_versiontracker_head__add_unique_versiontracker_workin.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding unique constraint on 'VersionTracker', fields ['head'] + db.create_unique('widgy_versiontracker', ['head_id']) + + # Adding unique constraint on 'VersionTracker', fields ['working_copy'] + db.create_unique('widgy_versiontracker', ['working_copy_id']) + + + def backwards(self, orm): + # Removing unique constraint on 'VersionTracker', fields ['working_copy'] + db.delete_unique('widgy_versiontracker', ['working_copy_id']) + + # Removing unique constraint on 'VersionTracker', fields ['head'] + db.delete_unique('widgy_versiontracker', ['head_id']) + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'widgy.node': { + 'Meta': {'unique_together': "[('content_type', 'content_id')]", 'object_name': 'Node'}, + 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_frozen': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'widgy.unknownwidget': { + 'Meta': {'object_name': 'UnknownWidget', 'managed': 'False'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'widgy.versioncommit': { + 'Meta': {'object_name': 'VersionCommit'}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'publish_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'root_node': ('widgy.db.fields.WidgyField', [], {'to': "orm['widgy.Node']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'tracker': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'commits'", 'to': "orm['widgy.VersionTracker']"}) + }, + 'widgy.versiontracker': { + 'Meta': {'object_name': 'VersionTracker'}, + 'head': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.VersionCommit']", 'unique': 'True', 'null': 'True', 'on_delete': 'models.PROTECT'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'working_copy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['widgy.Node']", 'unique': 'True', 'on_delete': 'models.PROTECT'}) + } + } + + complete_apps = ['widgy'] \ No newline at end of file diff --git a/widgy/south_migrations/__init__.py b/widgy/south_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/widgy/static/admin/js/collapse.js b/widgy/static/admin/js/collapse.js new file mode 100644 index 000000000..639280f08 --- /dev/null +++ b/widgy/static/admin/js/collapse.js @@ -0,0 +1,3 @@ +// noop +// If we are using grappelli, the original code for this code just fails. So +// let's just not do anything. diff --git a/widgy/static/daisydiff/LICENSE.txt b/widgy/static/daisydiff/LICENSE.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/widgy/static/daisydiff/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/widgy/static/daisydiff/NOTICE.txt b/widgy/static/daisydiff/NOTICE.txt new file mode 100644 index 000000000..6092e4dac --- /dev/null +++ b/widgy/static/daisydiff/NOTICE.txt @@ -0,0 +1,8 @@ +NOTICE: Only our own original work is licensed under the terms of the Apache +License Version 2.0. The licenses of some libraries might impose different +redistribution or general licensing terms than those stated in the Apache +License. Users and redistributors are hereby requested to verify these +conditions and agree upon them. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). diff --git a/widgy/static/daisydiff/README.txt b/widgy/static/daisydiff/README.txt new file mode 100644 index 000000000..826d9212a --- /dev/null +++ b/widgy/static/daisydiff/README.txt @@ -0,0 +1,75 @@ + Daisy Diff 1.2 + + This is Daisy Diff, the open source HTML diffing library! + + Website - http://code.google.com/p/daisydiff/ + + +---------------------------------------------------------------+ + | STAND-ALONE | + +---------------------------------------------------------------+ + +Java: +===== +java -jar daisydiff.jar [oldHTML] [newHTML] [optional arguments] + + +Optional Arguments: +=================== +--file=[filename] - Write output to the specified file. +--type=[html/tag] - Use the html (default) diff algorithm or the tag diff. +--css=[cssfile1;cssfile2;cssfile3] - Add external CSS files. +--output=[html/xml] - Write html (default) or xml output. +--q - Generate less console output. + +Example: +======== +java -jar daisydiff.jar http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/ http://web.archive.org/web/20070107182640/http://news.bbc.co.uk/ --css=http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/nol/shared/css/news_r5.css + +java -jar daisydiff.jar http://cocoondev.org/wiki/291-cd/version/15/part/SimpleDocumentContent/data http://cocoondev.org/wiki/291-cd/version/17/part/SimpleDocumentContent/data --css=http://cocoondev.org/resources/skins/daisysite/css/daisy.css --output=xml --file=daisysite.htm + +Requirements: +============= +Java 1.5 or 6 + + +---------------------------------------------------------------+ + | EMBEDDED | + +---------------------------------------------------------------+ + +Java: +===== +org.outerj.daisy.diff.DaisyDiff{ + +/** + * Diffs two html files, outputting the result to the specified consumer. + */ +public static void diffHTML(InputSource oldSource, InputSource newSource, ContentHandler consumer, String prefix, Locale locale) throws SAXException, IOException; + +/** + * Diffs two html files word for word as source, outputting the result to + * the specified consumer. + */ +public static void diffTag(String oldText, String newText, ContentHandler consumer) throws Exception; + +} + +Requirements: +============= +Java 1.5 or 6 +To run Daisy Diff embedded in your application, you don't need the entire Jar file. A much smaller Jar file without Xerces and NekoHtml will suffice. + + + +---------------------------------------------------------------+ + | PHP | + +---------------------------------------------------------------+ + +The DaisyDiff algorithm has been integrated in MediaWiki. The version with DaisyDiff support isn't released yet. +More info on: http://www.mediawiki.org/wiki/Visual_Diff + +The PHP code is released under the GPLv2. It can also be used as an embedded HTML differ in a PHP application. + + +---------------------------------------------------------------+ + | Acknowledgements | + +---------------------------------------------------------------+ + +Guy Van den Broeck +Daniel Dickison diff --git a/widgy/static/daisydiff/css/diff.css b/widgy/static/daisydiff/css/diff.css new file mode 100644 index 000000000..4ddd94e32 --- /dev/null +++ b/widgy/static/daisydiff/css/diff.css @@ -0,0 +1,87 @@ +/* + * Styles for the Tag Diff + */ +span.diff-tag-html { + font-family: "Andale Mono" monospace; + font-size: 80%; +} + +span.diff-tag-removed { + font-size: 100%; + text-decoration: line-through; + background-color: #fdc6c6; /* light red */ +} + +span.diff-tag-added { + font-size: 100%; + background-color: #ccffcc; /* light green */ +} + +span.diff-tag-conflict { + font-size: 100%; + background-color: #f781be; /* light rose */ +} + +/* + * Styles for the HTML Diff + */ +span.diff-html-added { + font-size: 100%; + background-color: #ccffcc; /* light green */ + cursor: pointer; +} + +span.diff-html-removed { + font-size: 100%; + text-decoration: line-through; + background-color: #fdc6c6; /* light red */ + cursor: pointer; +} + +span.diff-html-changed { + *background-color: #c6c6fd; /* light blue */ + cursor: pointer; +} + +span.diff-html-conflict { + background-color: #f781be; /* light rose */ +} + +span.diff-html-selected { + background-color: #FF8800; /* light orange */ + cursor: pointer; +} + +span.diff-html-selected img{ + border: 2px solid #FF8800; /* light orange */ +} + +span.diff-html-added img{ + border: 2px solid #ccffcc; +} + +span.diff-html-removed img{ + border: 2px solid #fdc6c6; +} + +span.diff-html-changed img{ + border: 2px dotted #000099; + +img.diff-icon { + background-color: #FF8800; + jidth: 16px; + height: 16px; + border: 0px none; +} +a.diffpage-html-a, a.diffpage-html-a:hover, a.diffpage-html-a:link, a.diffpage-html-a:visited, a.diffpage-html-a:active { + text-decoration: none; + color: #FF8800; +} + +.diffpage-html-firstlast a img, .dsydiff-prevnextnav a img { + vertical-align: middle; +} + +ul.changelist { + padding-left: 15px; +} diff --git a/widgy/static/widgy/css/admin_filer_override.scss b/widgy/static/widgy/css/admin_filer_override.scss new file mode 100644 index 000000000..eb1785e18 --- /dev/null +++ b/widgy/static/widgy/css/admin_filer_override.scss @@ -0,0 +1,71 @@ +p.file-upload { + float: left; + width: 692px; + + span.clearable-file-input { + + input { + margin: 0px; + } + + label { + display: inline-block; + float: none; + width: auto; + } + + } + +} + +body.filebrowser { + #content { + margin-top: 100px; + } + + .object-tools { + position: absolute; + right: 12px; + } + + #content-main { + display: block; + float: none; + min-width: 44em; + width: auto; + } + + #content-related { + position: absolute; + margin-right: 0; + top: 116px; + right: 15px; + width: 18em; + } +} + +body.popup { + #container { + position: relative; + } + + #content-related { + top: 16px; + } +} + +#changelist-search input[type="submit"] { + background-image: none; + background: #309BBF; + height: 20px; + padding: 0px 2px; + + &:hover { + background: #38B9E6; + } +} + +#changelist-search input[type='checkbox'] { + margin: 0px 0px 0px 10px; + top: 2px; +} diff --git a/widgy/static/widgy/css/font-awesome.css b/widgy/static/widgy/css/font-awesome.css index 3331bb72d..0f32455f5 100644 --- a/widgy/static/widgy/css/font-awesome.css +++ b/widgy/static/widgy/css/font-awesome.css @@ -23,8 +23,11 @@ */ @font-face { font-family: 'FontAwesome'; - src: url('/static/widgy/font/fontawesome-webfont.eot'); - src: url('/static/widgy/font/fontawesome-webfont.eot?#iefix') format('eot'), url('/static/widgy/font/fontawesome-webfont.woff') format('woff'), url('/static/widgy/font/fontawesome-webfont.ttf') format('truetype'), url('/static/widgy/font/fontawesome-webfont.otf') format('opentype'), url('/static/widgy/font/fontawesome-webfont.svg#FontAwesome') format('svg'); + src: url('../font/fontawesome-webfont.eot'); + src: url('../font/fontawesome-webfont.eot?#iefix') format('eot'), + url('../font/fontawesome-webfont.woff') format('woff'), + url('../font/fontawesome-webfont.ttf') format('truetype'), + url('../font/fontawesome-webfont.svg#FontAwesome') format('svg'); font-weight: normal; font-style: normal; } diff --git a/widgy/static/widgy/css/history.scss b/widgy/static/widgy/css/history.scss new file mode 100644 index 000000000..3d8ceb0df --- /dev/null +++ b/widgy/static/widgy/css/history.scss @@ -0,0 +1,81 @@ +@import '/widgy/css/widgy_common.scss'; + +/* History/Basic Page Styles +--------------------------------------------------*/ + +section.main { + @include clearfix; + @include default; + @include html; + + ol.history { + list-style: none; + padding: 0px !important; + + li { + @include gradient(#eeeeee,#fafafa); + @include rounded(5px); + @include shadow($black30,0px,2px,0px); + @include clearfix; + margin: 0px 0px 15px 0px; + padding: 0px; + + div.top { + border-bottom: 1px solid #cccccc; + display: block; + float: none; + height: auto; + line-height: 26px; + margin: 0px !important; + padding: 5px 10px 5px 10px; + width: auto; + + div.actions { + float: right; + } + } + + a { + @include outside-button; + } + + form { + display: inline; + + input.button[type='submit'] { + @include outside-button; + + &.unapprove { + border-color: $red; + color: $red; + + &:hover { + background: lighten($red,35%); + } + } + } + } + + blockquote { + border: 0px; + margin: 0px; + padding: 5px 10px 5px 10px; + + p { + margin: 0px !important; + } + } + } + } +} + +/* Message List Form Fix +--------------------------------------------------*/ + +ul.messagelist { + li { + form { + display: inline; + } + } +} diff --git a/widgy/static/widgy/css/layout_select.scss b/widgy/static/widgy/css/layout_select.scss new file mode 100644 index 000000000..912aa9a84 --- /dev/null +++ b/widgy/static/widgy/css/layout_select.scss @@ -0,0 +1,54 @@ +@import "widgy_common.scss"; + +.form-row .layoutSelect { + display: inline; + float: left; + width: auto; + + ul { + display: inline; + float: left; + list-style: none; + margin: 0px; + padding: 0px; + width: auto; + + li { + @include html; + display: inline; + float: left; + height: auto; + margin: 0px 10px 0px 0px; + padding: 10px; + text-align: center; + width: 110px; + + label { + display: block; + float: none; + margin: 0px; + padding: 0px; + width: auto; + } + + div.previewImage { + @include rounded(4px); + background: url('/static/widgy/image/layout-sprite.png') no-repeat 0px -400px; + border: 1px solid #cccccc; + height: 100px; + + &.defaultlayout { + background-position: 0px 0px; + } + } + + input { + margin: 5px auto; + } + + span.label { + display: block; + } + } + } +} diff --git a/widgy/static/widgy/css/popup.scss b/widgy/static/widgy/css/popup.scss new file mode 100644 index 000000000..13810865c --- /dev/null +++ b/widgy/static/widgy/css/popup.scss @@ -0,0 +1,122 @@ +@import 'widgy_common.scss'; + +$label_width: 150px; + +// Clean up grappelli-safe leftovers +.popup { + .breadcrumbs, + #footer { + display: none; + margin: 0 !important; + padding: 0 !important; + } + + #container { + min-width: 660px; + } + + #content { + margin: 0 15px !important; + } +} + +.popUp { + background: white; + display: block; + + .loading { + @extend %loading; + } + + .denied { + color: $red; + } + + .formField { + @include clearfix; + + margin-bottom: 1em; + + & > label { + display: block; + float: left; + width: $label_width; + } + + #{$inputFields}, + textarea { + width: 500px; + } + + textarea { + height: 100px; + } + + input.vDateField, input.vTimeField { + width: 100px; + } + + p.help_text { + color: $grey; + font-size: 11px; + font-style: italic; + margin-top: 10px; + } + + ul { + li { + label { + margin: 0 10px; + width: auto; + + input { + margin: 0; + } + } + } + } + + &.publish_at { + li { + display: inline-block; + } + + ul { + display: inline-block; + margin-bottom: 1em; + } + + .publish_at_container { + @include clearfix; + + margin-left: $label_width; + } + } + } + + .submitRow { + margin-left: 5px; + float: right; + font-size: 11px; + text-transform: capitalize; + line-height: 13px; + padding: 6px 10px !important; + + input[type=submit] { + @include rounded(3px); + background: $blue; + border: 0px; + margin-left: 5px; + float: right; + font-size: 11px; + text-transform: capitalize; + line-height: 13px; + padding: 6px 10px !important; + + &:hover { + background: lighten($blue,10%); + color: white; + } + } + } +} diff --git a/widgy/static/widgy/css/unapproved_commits.scss b/widgy/static/widgy/css/unapproved_commits.scss new file mode 100644 index 000000000..47bdf1788 --- /dev/null +++ b/widgy/static/widgy/css/unapproved_commits.scss @@ -0,0 +1,23 @@ + +/* Commit Previews +--------------------------------------------------*/ + +.form-row.preview { + iframe { + height: 600px; + width: 980px; + } +} + +/* Version Commit Page Groups +--------------------------------------------------*/ + +#changelist #result_list { + tbody { + > tr:first-child { + > td, th { + border-top: 2px solid #444444; + } + } + } +} \ No newline at end of file diff --git a/widgy/static/widgy/css/widgy.scss b/widgy/static/widgy/css/widgy.scss index d7e0a3817..cca6ce562 100644 --- a/widgy/static/widgy/css/widgy.scss +++ b/widgy/static/widgy/css/widgy.scss @@ -1,118 +1,2 @@ -@import "common"; - -.widgy { - -webkit-user-select: none; - -moz-user-select: none; - - .editor { - width: 960px; - display: inline-block; - - .shelf { - position: absolute; - top: 0; - right: -210px; - } - } - - // Node Container - ul.nodeChildren { - margin: 0 !important; - padding: 0 !important; - - li ul.nodeChildren { - margin: 0 !important; - padding: 0 !important; - } - } - - .node { - @include rounded(4px); - background: $black10; - list-style: none; - margin: 1em; - padding: 10px; - position: relative; - - - .content { - -webkit-user-select: auto; - -moz-user-select: auto; - } - - p.drag-row { - @include clearfix; - } - - &.being_dragged { - background-color: blue; - margin: 0; - pointer-events: none; /* leave this per Rocky's request */ - position: fixed; - } - - p.title { - font-size: 14px; - font-weight: bold; - line-height: 18px; - margin-bottom: 10px; - - &.bucket { - font-size: 18px; - line-height: 24px; - padding-top: 0px; - } - } - - button.edit { - position: absolute; - right: 79px; - top: 10px; - z-index: 10; - } - - button.delete { - float: right; - } - - .dragHandle { - left: -5px; - float: left; - font-size: 20px; - position: relative; - } - } - - .node_drop_target { - width: 100%; - height: 25px; - background-color: yellow; - - &.active { - height: 50px; - outline: 1px dashed red; - } - } - - /* Inputs - -------------------*/ - - input[type='text'], textarea { - @include inset-shadow($black10,0px,1px,2px); - border: 0px; - font-weight: normal !important; - padding: 6px 4px 5px; - } - - textarea { - height: 120px; - } -} - - - -/* Global ------------------------------------------------*/ -.change-form div.submit-row { - z-index: 1000; -} +@import "widgy_layout.scss"; +@import "widgy_theme_default.scss"; diff --git a/widgy/static/widgy/css/widgy_common.scss b/widgy/static/widgy/css/widgy_common.scss new file mode 100644 index 000000000..681629631 --- /dev/null +++ b/widgy/static/widgy/css/widgy_common.scss @@ -0,0 +1,320 @@ +/* + * Common SCSS File - SCSS v1.0 + * last edited 02/17/12 + * @author Justin Stollsteimer - Fusionbox, Inc. + * http://www.fusionbox.com + * + * + * Lists: Line + * HR: Line + * Table: Line + * Form Elements: Line + * + */ + + +/* SASS Mixins +--------------------------------------------------*/ + + +@mixin default { + display: inline; + float: left; + height: auto; + width: 100%; +} + +@mixin shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + box-shadow: $left $top $blur $color; + -o-box-shadow: $left $top $blur $color; + -ms-box-shadow: $left $top $blur $color; + -moz-box-shadow: $left $top $blur $color; + -webkit-box-shadow: $left $top $blur $color; +} + +@mixin inset-shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + box-shadow: inset $left $top $blur $color; + -o-box-shadow: inset $left $top $blur $color; + -ms-box-shadow: inset $left $top $blur $color; + -moz-box-shadow: inset $left $top $blur $color; + -webkit-box-shadow: inset $left $top $blur $color; +} + + +@mixin text-shadow($color: rgba(0,0,0,0.3), $left: 0px, $top: 0px, $blur: 8px) { + text-shadow: $left $top $blur $color; + -o-text-shadow: $left $top $blur $color; + -moz-text-shadow: $left $top $blur $color; + -webkit-text-shadow: $left $top $blur $color; +} + +@mixin rounded($radius) { + border-radius: $radius; + -o-border-radius: $radius; + -ms-border-radius: $radius; + -moz-border-radius: $radius; + -webkit-border-radius: $radius; +} + +@mixin gradient($bottom,$top) { + background-color: $bottom; + background-image: -o-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -ms-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -moz-linear-gradient(center bottom, $bottom 1%, $top 100%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.01, $bottom), color-stop(1.00, $top)); +} + +@mixin important-gradient($bottom,$top) { + background-color: $bottom !important; + background-image: -o-linear-gradient(center bottom, $bottom 1%, $top 100%) !important; + background-image: -ms-linear-gradient(center bottom, $bottom 1%, $top 100%) !important; + background-image: -moz-linear-gradient(center bottom, $bottom 1%, $top 100%) !important; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.01, $bottom), color-stop(1.00, $top)) !important; +} + +@mixin transition($basic: all 0.25s ease 0s) { + transition: $basic; + -o-transition: $basic; + -ms-transition: $basic; + -moz-transition: $basic; + -webkit-transition: $basic; +} + + +@mixin inner { + display: block; + margin: 0 auto; + padding: 0px; + text-align: left; + width: 960px; +} + +@mixin clearfix { + &:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + * html & { height: 1px } +} + +@mixin wrapper { + display: block; + height: auto; + min-width: 960px; + position: relative; + width: 100%; + z-index: 1; +} + +@mixin html { + h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, hgroup, hr { + display: block !important; + float: none !important; + margin: 0px 0px 15px 0px !important; + width: auto !important; + } + .fl { float: left; margin: 0px 25px 15px 0px; } + .fr { float: right; margin: 0px 0px 15px 25px; } + img { @include rounded(2px); &.left { float: left; margin: 5px 20px 15px 0px; } &.right { float: right; margin: 5px 0px 15px 20px; }} + table { display: table; width: 100% !important; } +} + +@mixin box-sizing($box-sizing) { + box-sizing: $box-sizing; + -moz-box-sizing: $box-sizing; +} + +@mixin button { + @include rounded(3px); + background: $blue; + border: 0px; + color: white; + cursor: pointer; + display: inline-block; + height: auto; + font-weight: bold; + font-size: 11px; + line-height: 12px; + text-decoration: none; + text-transform: capitalize; + padding: 2px 4px; + width: auto; + + &:hover { + background: lighten($blue,10%); + color: white; + } + + &.cancel { + background: $grey; + color: white; + + &:hover { + background: lighten($grey,10%); + } + } + + &.delete { + background: $red; + color: white; + + &:hover { + background: lighten($red,10%); + } + } + + &.loading { + @extend %loading; + } + + &[type='submit'] { + @include rounded(3px); + background: $green; + color: white; + height: auto; + line-height: 15px; + font-weight: bold; + padding: 0px 4px 1px !important; + + &:hover { + background: lighten($green,10%); + } + } +} + +/* Variables +-----------------------------------------------*/ + +$black10: rgba(0,0,0,0.1); +$black30: rgba(0,0,0,0.3); +$black50: rgba(0,0,0,0.5); +$white20: rgba(255,255,255,0.2); +$reallylightgrey: #fafafa; +$lightgrey: #bbbbbb; +$grey: #999999; +$darkgrey: #666666; +$red: #BF3030; +$blue: #309BBF; +$green: #559911; +$purple: #A56ED3; +$orange: #FF9900; + +$inputFields: "input[type='text'], input[type='password'], input[type='email'], input[type='search'], input[type='number'], textarea"; + + +$widget_icon_sprite: sprite-map("widgy/image/widget-*"); + +@mixin node-icon-sprite ($class, $icon, $sprite: $widget_icon_sprite) { + &.#{$class} > span.title:before { + background-image: sprite-url($sprite, $icon); + background-position: sprite-position($sprite, $icon); + } +} + +@mixin node-icon ($class, $img) { + &.#{$class} > span.title:before { + background-image: url($img); + } +} + +%loading { + background: inline-image('widgy/image/loading.gif') center no-repeat !important; + color: transparent !important; +} + +%horizontalChildren { + & > .widget > .drag-row { + span.title { + display: none; + } + } + + & > .widget > .nodeChildren { + display: table; + width: 100%; + + & > li { + display: table-cell; + width: auto; + + & > .widget > .drag-row { + span.title, + .delete span { + display: none; + } + } + + &.node_drop_target { + width: 50px; + } + } + } +} + +@mixin cursor($cursor, $fallback: '') { + @if $fallback != '' { cursor: $fallback; } + cursor: $cursor; + cursor: -moz-#{$cursor}; + cursor: -webkit-#{$cursor}; +} + +@mixin outside-button { + // This button style is for buttons that exist outside of the widgy editor. + @include rounded(3px); + background: transparent; + border: 1px solid $blue; + color: $blue; + display: inline-block; + height: auto; + font-weight: bold; + font-size: 12px; + line-height: 18px; + padding: 4px 8px; + width: auto; + + &:hover { + background-color: lighten($blue,35%); + color: $blue; + } + + &.cancel { + border-color: $grey; + color: $grey; + + &:hover { + background: lighten($lightgrey,15%); + } + } + + &.delete { + border-color: $red; + color: $red; + + &:hover { + background: lighten($red,35%); + } + } + + &.loading { + @extend %loading; + } + + &[type='submit'] { + @include rounded(3px); + border-color: $green; + color: $green; + height: auto; + font-weight: bold; + line-height: 16px; + padding: 5px !important; + position: relative; + top: -1px; + + &:hover { + background: lighten($green,50%); + } + } +} diff --git a/widgy/static/widgy/css/widgy_layout.scss b/widgy/static/widgy/css/widgy_layout.scss new file mode 100644 index 000000000..9a6149259 --- /dev/null +++ b/widgy/static/widgy/css/widgy_layout.scss @@ -0,0 +1,215 @@ +@import "widgy_common.scss"; + +// Mezzanine Override +body.page_builder-callout { + #container { + overflow: hidden; + } +} + +.widgy { + @include clearfix; + + // show a loading spinner if there's nothing inside the + // container. + &:empty, & > .editor:empty { + @extend %loading; + height: 100px; + } + + .editor { + display: inline-block; + width: 100%; + } + + .nodeChildren { + clear: both; + margin: 0 !important; // mezzanine puts style on UL + padding: 0; + + li { + list-style: none; + } + } + + + .node { + @include clearfix; + margin-left: 1em; + margin-right: 1em; + padding: 0px; + + // invisible mixin, it provides a node with no chrome. + &.invisible { + background-color: inherit; + border: 0 none; + margin: 0 !important; + padding: 0; + + & > .widget > .nodeChildren { + & > .node { + margin-left: 0; + margin-right: 0; + } + + &:empty { + display: none; + } + } + } + + &.being_dragged { + margin: 0; + } + } + + .widget { + padding: 0px; + + .drag-row { + display: block; + float: none; + height: auto; + position: relative; + width: auto; + + button.edit, + button.delete { + float: right; + } + + .dragHandle { + left: 0px; + float: left; + position: relative; + top: 3px; + } + } + } + + .preview { + padding: 1em; + + &:empty { + padding: 0; + } + } +} + +// Dragging +.widgy { + .being_dragged { + position: fixed; + } + + .node { + margin-bottom: 1em; + + &:first-child { + margin-top: 1em; + } + } + + .node_drop_target { + height: 1em; + margin-bottom: 0; + margin-top: -1em; + padding: 0; + + &:first-child { + margin-top: 0; + } + + &:last-child, + &.previous.nm { + margin-bottom: 0; + margin-top: -1em; + } + + &:only-child { + margin-bottom: 0; + margin-top: 0; + } + + // Hide the drop here message if not active. (it's too tall) + &:not(.active) span { + display: none; + } + + &.active { + height: 3em; + padding: 1em; + } + } +} + +// Root Node +.widgy { + section.node { + margin-left: 0; + margin-right: 0; + + > .widget { + & > .nodeChildren { + clear: left; + float: left; + width: 63%; + + // The first-level children shouldn't have side margins + > .node { + margin-left: 0; + margin-right: 0; + } + } + + & > .shelf { + display: inline; + float: right; + position: relative; + width: 35%; + } + } + } +} + +// Shelf +.widgy { + .shelf { + display: block; + float: none; + width: auto; + + .scroll { + overflow-y: auto; + } + } + + + .shelfItem { + display: inline-block; + height: auto; + vertical-align: top; + } +} + +// Pop Out Layout +.popOut { + .widgy { + + section.node { + margin-left: 0; + margin-right: 0; + + > .widget { + & > .nodeChildren { + padding-left: 0; + width: 63%; + } + + & > .shelf { + width: 35%; + } + } + } + } +} diff --git a/widgy/static/widgy/css/widgy_theme_default.scss b/widgy/static/widgy/css/widgy_theme_default.scss new file mode 100644 index 000000000..1c70c41c8 --- /dev/null +++ b/widgy/static/widgy/css/widgy_theme_default.scss @@ -0,0 +1,509 @@ +@import "widgy_common.scss"; + +$font-default: "Open Sans", Arial, Helvetica, sans-serif; + +.ajax-loading * { + cursor: progress !important; +} + +.widgy { + font-family: $font-default; + font-size: 12px; + + .editor { + background: $reallylightgrey; + } + + .node { + @include rounded(4px); + @include shadow($black10,1px,1px,0px); + @include inset-shadow(transparent,0px,0px,0px); + list-style: none; + padding: 0px; + + &.deleting { + @include shadow($black50,0px,5px,15px); + border-color: $red; + + div.widget { + p.drag-row { + span.title { + color: $red; + } + } + } + } + } + + .widget { + } + + .preview { + padding: 0; + + &:not(:empty) { + padding: 1em; + } + } + + // Anything but the root node + .node:not(section) { + background: white; + border: 1px solid #E0E0E0; + + .draggable > .drag-row { + @include cursor(grab, pointer); + } + .being_dragged .drag-row { + @include cursor(grabbing, pointer); + } + + .drag-row { + @include rounded(4px 4px 0px 0px); + @include clearfix; + @include gradient(#eee,#fff); + display: block; + float: none; + height: auto; + min-height: 20px; + margin: 0px; + padding: 2px; + position: relative; + width: auto; + + span.title { + color: #666; + font-size: 13px; + font-weight: normal; + line-height: 20px; + } + + button.edit, + button.delete { + float: right; + margin: 1px 1px 0px 3px; + } + + .dragHandle { + left: 0px; + float: left; + font-size: 14px; + position: relative; + top: 3px; + } + } + } +} + +// Root Node +.widgy section.node { + > .widget > .drag-row > .title { + font-family: $font-default; + font-size: 2.4em; + padding: 5px 0 5px 10px; + } + + > .widget > .nodeChildren { + padding-left: 1em; + } + + + &:first-child > .widget > p.drag-row button { + float: none; + position: relative; + top: -5px; + } +} + +// Dragging +.widgy { + .node_drop_target { + @include rounded(3px); + @include transition; + + border: none; + background: lighten($green, 25%); + font-size: 1.0em; + font-style: italic; + margin-left: 1em; + margin-right: 1em; + text-align: center; + + &.active { + border: 1px dashed $green; + background: lighten($green, 40%); + color: darken($green, 10%); + } + + &.previous { + background: $orange; + } + } +} + +// Shelf +.widgy { + .shelf { + > .title { + display: none; + } + } + + .shelfItem { + @include gradient(#eeeeee,#ffffff); + @include rounded(4px); + @include shadow($black10,1px,1px,0px); + @include inset-shadow(#ffffff,-1px,1px,0px); + @include cursor(grab, pointer); + border: 1px solid #E0E0E0; + margin: 0 4px 4px 0; + padding: 1px 1px 1px 1px; + vertical-align: top; + width: 215px !important; + + span.title { + font-size: 11px; + max-width: 160px; + padding: 4px 0 2px 0; + text-transform: capitalize; + width: 160px; + + &:before { + // These are all of the common properties for the shelfItem icons. We + // put the icon in a pseudo-element so that we can control the size of + // the background-image without affecting the size of the actual + // span.title. + // TODO: This code assumes that each icon is exactly 16x16. + background-repeat: no-repeat; + content: ""; + float: left; + height: 16px; + // The margin-top and margin-bottom need to be the same as the + // padding-top/padding-bottom of the span.title. We use margin here + // instead of padding because we MUST NOT be bigger than 16x16. + margin: 4px 5px 2px 5px; + width: 16px; + } + } + + span.icon-move { + float: right; + margin-top: 4px; + } + + &.being_dragged { + @include cursor(grabbing, pointer); + } + } + + // Global Shelf + section.node > .widget > .shelf { + > .title { + display: block; + margin-bottom: 10px; + } + + .shelfItem { + padding: 0px 5px 0px 5px; + width: 190px; + } + + span.icon-move { + color: #999999; + font-size: 20px; + margin-top: 8px; + } + + span.title { + display: inline; + float: left; + font-size: 14px; + line-height: 22px; + padding: 5px 0 5px 0; + max-width: 130px; + + &:before { + margin: 5px 6px; + } + } + } + + // local shelf + .node:not(section) .shelf { + border-bottom: 2px solid $lightgrey; + padding: 10px 0 5px 1em; + } +} + +// EditorView +.widgy .widget_editor { + @include clearfix; + @include default; + padding-bottom: 15px; + + form > div, + > div { + @include clearfix; + @include default; + clear: both; + padding: 0px; + position: relative; + } + + .formField { + margin-bottom: 10px; + + > div { + @include clearfix; + @include default; + clear: both; + + &.pagedown-buttonbar { + padding: 0px 0px 10px 0px; + } + + &.pagedown-preview { + border-top: 1px dotted $lightgrey; + margin-top: 15px; + padding: 10px 0px 0px 0px; + } + } + + > div { + @include clearfix; + @include default; + clear: both; + + &.pagedown-buttonbar { + padding: 0px 0px 10px 0px; + } + + &.pagedown-preview { + border-top: 1px dotted $lightgrey; + margin-top: 15px; + padding: 10px 0px 0px 0px; + } + } + + select { + width: 50%; + } + + &.required { + label:after { + content: "*"; + color: $red; + } + } + + &.error { + #{$inputFields}, + textarea { + border-color: $red; + } + + ul.errorlist { + li.error { + padding-left: 115px; + } + } + } + + p.datetime { + display: inline; + float: left; + width: 50%; + + br { + display: inline; + } + + input[type='text'] { + margin: 0px 5px; + width: 100px; + } + } + } + + #{$inputFields}, + button { + &:focus { + @include inset-shadow(lighten($purple,15%), 0px, 1px, 3px); + border-color: $purple; + } + } + + #{$inputFields} { + @include rounded(3px); + @include inset-shadow($black10,0px,1px,2px); + border: 1px solid $lightgrey; + font-family: $font-default; + font-size: 13px; + font-weight: normal !important; + height: auto; + padding: 5px 1%; + width: 48%; + } + + input { + &[type='checkbox'], + &[type='radio'] { + margin-left: 0px; + } + + &[type='submit'] { + @include button; + float: right; + } + } + + input[type='submit'] { + float: right; + } + + label { + clear: left; + padding: 0 10px 10px 0; + } + + textarea { + clear: both; + max-width: 98.5%; + height: 120px; + width: 98.5%; + + + span.cke { + clear: both !important; + } + } + + select { + font-family: $font-default; + font-size: 13px; + font-weight: normal; + } + + select { + font-family: $font-default; + font-size: 13px; + font-weight: normal; + } + + .cancel { + position: absolute; + right: 55px; + top: 0px; + } +} + +// Element styles +.widgy { + button, + input[type='submit'], + a.pop_out { + @include button; + font-family: $font-default; + margin-left: 10px; + font-size: 11px; + text-decoration: none; + text-transform: capitalize; + } + + h1 { + color: #535353; + font-family: $font-default; + font-size: 32px; + font-weight: 400; + line-height: 38px; + } + + h2 { + color: #535353; + font-size: 22px; + line-height: 28px; + } + + h3 { + color: #535353; + font-size: 16px; + font-weight: bold; + line-height: 20px; + } + + h4 { + color: #535353; + font-size: 18px; + font-weight: bold; + } + + h5{ + color: #535353; + margin: 0px 0px 4px 0px; + } + + p { + margin: 0; + } + + p.title { + color: #353535; + font-family: $font-default; + font-size: 22px; + font-weight: 300; + line-height: 28px; + margin: 0 0 10px 0; + } + + span.title { + color: #353535; + font-family: $font-default; + } +} + + +input.cke_dialog_ui_input_text, input.cke_dialog_ui_input_password, textarea.cke_dialog_ui_input_textarea { + height: auto !important; // fixes the tiny URL window in ckeditor link popup +} + +.change-form div.submit-row { + z-index: 100; // fixes the mezzanine action bar floating under the widgy shelf +} + +/* Widgy Tools Buttons +--------------------------------------------------*/ + +ul.widgy-tools { + @include clearfix; + margin-bottom: 15px; + + li { + display: inline; + float: left; + margin-right: 5px; + + a { + @include outside-button; + font-size: 13px; + font-weight: bold; + padding: 2px 8px !important; + + &.commit { + border-color: $green; + color: $green; + + &:hover { + background-color: lighten($green,50%); + } + } + + &.reset { + border-color: $red; + color: $red; + + &:hover { + background-color: lighten($red,35%); + } + } + } + } +} diff --git a/widgy/static/widgy/css/widgy_theme_lofi.scss b/widgy/static/widgy/css/widgy_theme_lofi.scss new file mode 100644 index 000000000..2d19cb595 --- /dev/null +++ b/widgy/static/widgy/css/widgy_theme_lofi.scss @@ -0,0 +1,9 @@ +.widgy { + .node { + border: 1px solid black; + } + + .node_drop_target { + background-color: blue; + } +} diff --git a/widgy/static/widgy/fancybox/blank.gif b/widgy/static/widgy/fancybox/blank.gif new file mode 100644 index 000000000..35d42e808 Binary files /dev/null and b/widgy/static/widgy/fancybox/blank.gif differ diff --git a/widgy/static/widgy/fancybox/fancy_close.png b/widgy/static/widgy/fancybox/fancy_close.png new file mode 100644 index 000000000..07035307a Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_close.png differ diff --git a/widgy/static/widgy/fancybox/fancy_loading.png b/widgy/static/widgy/fancybox/fancy_loading.png new file mode 100644 index 000000000..250301796 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_loading.png differ diff --git a/widgy/static/widgy/fancybox/fancy_nav_left.png b/widgy/static/widgy/fancybox/fancy_nav_left.png new file mode 100644 index 000000000..ebaa6a4fd Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_nav_left.png differ diff --git a/widgy/static/widgy/fancybox/fancy_nav_right.png b/widgy/static/widgy/fancybox/fancy_nav_right.png new file mode 100644 index 000000000..873294e96 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_nav_right.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_e.png b/widgy/static/widgy/fancybox/fancy_shadow_e.png new file mode 100644 index 000000000..2eda08936 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_e.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_n.png b/widgy/static/widgy/fancybox/fancy_shadow_n.png new file mode 100644 index 000000000..69aa10e23 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_n.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_ne.png b/widgy/static/widgy/fancybox/fancy_shadow_ne.png new file mode 100644 index 000000000..79f6980a3 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_ne.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_nw.png b/widgy/static/widgy/fancybox/fancy_shadow_nw.png new file mode 100644 index 000000000..7182cd938 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_nw.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_s.png b/widgy/static/widgy/fancybox/fancy_shadow_s.png new file mode 100644 index 000000000..d8858bfb7 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_s.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_se.png b/widgy/static/widgy/fancybox/fancy_shadow_se.png new file mode 100644 index 000000000..541e3ffd3 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_se.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_sw.png b/widgy/static/widgy/fancybox/fancy_shadow_sw.png new file mode 100644 index 000000000..b451689fa Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_sw.png differ diff --git a/widgy/static/widgy/fancybox/fancy_shadow_w.png b/widgy/static/widgy/fancybox/fancy_shadow_w.png new file mode 100644 index 000000000..8a4e4a887 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_shadow_w.png differ diff --git a/widgy/static/widgy/fancybox/fancy_title_left.png b/widgy/static/widgy/fancybox/fancy_title_left.png new file mode 100644 index 000000000..6049223d1 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_title_left.png differ diff --git a/widgy/static/widgy/fancybox/fancy_title_main.png b/widgy/static/widgy/fancybox/fancy_title_main.png new file mode 100644 index 000000000..8044271f2 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_title_main.png differ diff --git a/widgy/static/widgy/fancybox/fancy_title_over.png b/widgy/static/widgy/fancybox/fancy_title_over.png new file mode 100644 index 000000000..d9f458f4b Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_title_over.png differ diff --git a/widgy/static/widgy/fancybox/fancy_title_right.png b/widgy/static/widgy/fancybox/fancy_title_right.png new file mode 100644 index 000000000..e36d9db2a Binary files /dev/null and b/widgy/static/widgy/fancybox/fancy_title_right.png differ diff --git a/widgy/static/widgy/fancybox/fancybox-x.png b/widgy/static/widgy/fancybox/fancybox-x.png new file mode 100644 index 000000000..c2130f869 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancybox-x.png differ diff --git a/widgy/static/widgy/fancybox/fancybox-y.png b/widgy/static/widgy/fancybox/fancybox-y.png new file mode 100644 index 000000000..7ef399b99 Binary files /dev/null and b/widgy/static/widgy/fancybox/fancybox-y.png differ diff --git a/widgy/static/widgy/fancybox/fancybox.png b/widgy/static/widgy/fancybox/fancybox.png new file mode 100644 index 000000000..65e14f68f Binary files /dev/null and b/widgy/static/widgy/fancybox/fancybox.png differ diff --git a/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.css b/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.css new file mode 100644 index 000000000..8fe0fbd5a --- /dev/null +++ b/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.css @@ -0,0 +1,359 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + cursor: pointer; + overflow: hidden; + z-index: 1104; + display: none; +} + +#fancybox-loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background-image: url('fancybox.png'); +} + +#fancybox-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + z-index: 1100; + display: none; +} + +#fancybox-tmp { + padding: 0; + margin: 0; + border: 0; + overflow: auto; + display: none; +} + +#fancybox-wrap { + position: absolute; + top: 0; + left: 0; + padding: 20px; + z-index: 1101; + outline: none; + display: none; +} + +#fancybox-outer { + position: relative; + width: 100%; + height: 100%; + background: #fff; +} + +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0px solid #fff; +} + +#fancybox-hide-sel-frame { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; + z-index: 1101; +} + +#fancybox-close { + position: absolute; + top: -15px; + right: -15px; + width: 30px; + height: 30px; + background: transparent url('fancybox.png') -40px 0px; + cursor: pointer; + z-index: 1103; + display: none; +} + +#fancybox-error { + color: #444; + font: normal 12px/20px Arial; + padding: 14px; + margin: 0; +} + +#fancybox-img { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + border: none; + outline: none; + line-height: 0; + vertical-align: top; +} + +#fancybox-frame { + width: 100%; + height: 100%; + border: none; + display: block; +} + +#fancybox-left, #fancybox-right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + outline: none; + background: transparent url('blank.gif'); + z-index: 1102; + display: none; +} + +#fancybox-left { + left: 0px; +} + +#fancybox-right { + right: 0px; +} + +#fancybox-left-ico, #fancybox-right-ico { + position: absolute; + top: 50%; + left: -9999px; + width: 30px; + height: 30px; + margin-top: -15px; + cursor: pointer; + z-index: 1102; + display: block; +} + +#fancybox-left-ico { + background-image: url('fancybox.png'); + background-position: -40px -30px; +} + +#fancybox-right-ico { + background-image: url('fancybox.png'); + background-position: -40px -60px; +} + +#fancybox-left:hover, #fancybox-right:hover { + visibility: visible; /* IE6 */ +} + +#fancybox-left:hover span { + left: 20px; +} + +#fancybox-right:hover span { + left: auto; + right: 20px; +} + +.fancybox-bg { + position: absolute; + padding: 0; + margin: 0; + border: 0; + width: 20px; + height: 20px; + z-index: 1001; +} + +#fancybox-bg-n { + top: -20px; + left: 0; + width: 100%; + background-image: url('fancybox-x.png'); +} + +#fancybox-bg-ne { + top: -20px; + right: -20px; + background-image: url('fancybox.png'); + background-position: -40px -162px; +} + +#fancybox-bg-e { + top: 0; + right: -20px; + height: 100%; + background-image: url('fancybox-y.png'); + background-position: -20px 0px; +} + +#fancybox-bg-se { + bottom: -20px; + right: -20px; + background-image: url('fancybox.png'); + background-position: -40px -182px; +} + +#fancybox-bg-s { + bottom: -20px; + left: 0; + width: 100%; + background-image: url('fancybox-x.png'); + background-position: 0px -20px; +} + +#fancybox-bg-sw { + bottom: -20px; + left: -20px; + background-image: url('fancybox.png'); + background-position: -40px -142px; +} + +#fancybox-bg-w { + top: 0; + left: -20px; + height: 100%; + background-image: url('fancybox-y.png'); +} + +#fancybox-bg-nw { + top: -20px; + left: -20px; + background-image: url('fancybox.png'); + background-position: -40px -122px; +} + +#fancybox-title { + font-family: Helvetica; + font-size: 12px; + z-index: 1102; +} + +.fancybox-title-inside { + padding-bottom: 10px; + text-align: center; + color: #333; + background: #fff; + position: relative; +} + +.fancybox-title-outside { + padding-top: 10px; + color: #fff; +} + +.fancybox-title-over { + position: absolute; + bottom: 0; + left: 0; + color: #FFF; + text-align: left; +} + +#fancybox-title-over { + padding: 10px; + background-image: url('fancy_title_over.png'); + display: block; +} + +.fancybox-title-float { + position: absolute; + left: 0; + bottom: -20px; + height: 32px; +} + +#fancybox-title-float-wrap { + border: none; + border-collapse: collapse; + width: auto; +} + +#fancybox-title-float-wrap td { + border: none; + white-space: nowrap; +} + +#fancybox-title-float-left { + padding: 0 0 0 15px; + background: url('fancybox.png') -40px -90px no-repeat; +} + +#fancybox-title-float-main { + color: #FFF; + line-height: 29px; + font-weight: bold; + padding: 0 0 3px 0; + background: url('fancybox-x.png') 0px -40px; +} + +#fancybox-title-float-right { + padding: 0 0 0 15px; + background: url('fancybox.png') -55px -90px no-repeat; +} + +/* IE6 */ + +.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } +.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { + height: expression(this.parentNode.clientHeight + "px"); +} + +#fancybox-loading.fancybox-ie6 { + position: absolute; margin-top: 0; + top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); +} + +#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } + +/* IE6, IE7, IE8 */ + +.fancybox-ie .fancybox-bg { background: transparent !important; } + +.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file diff --git a/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.js b/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.js new file mode 100644 index 000000000..6e34cc996 --- /dev/null +++ b/widgy/static/widgy/fancybox/jquery.fancybox-1.3.4.js @@ -0,0 +1,1157 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +;(function($) { + var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, + + selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [], + + ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i, + + loadingTimer, loadingFrame = 1, + + titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('
    ')[0], { prop: 0 }), + + isMSIE = navigator.userAgent.match(/msie/i), + isIE6 = isMSIE && navigator.userAgent.match(/6/) && !window.XMLHttpRequest, + + /* + * Private methods + */ + + _abort = function() { + loading.hide(); + + imgPreloader.onerror = imgPreloader.onload = null; + + if (ajaxLoader) { + ajaxLoader.abort(); + } + + tmp.empty(); + }, + + _error = function() { + if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { + loading.hide(); + busy = false; + return; + } + + selectedOpts.titleShow = false; + + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + + tmp.html( '

    The requested content cannot be loaded.
    Please try again later.

    ' ); + + _process_inline(); + }, + + _start = function() { + var obj = selectedArray[ selectedIndex ], + href, + type, + title, + str, + emb, + ret; + + _abort(); + + selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); + + ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); + + if (ret === false) { + busy = false; + return; + } else if (typeof ret == 'object') { + selectedOpts = $.extend(selectedOpts, ret); + } + + title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; + + if (obj.nodeName && !selectedOpts.orig) { + selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); + } + + if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { + title = selectedOpts.orig.attr('alt'); + } + + href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; + + if ((/^(?:javascript)/i).test(href) || href == '#') { + href = null; + } + + if (selectedOpts.type) { + type = selectedOpts.type; + + if (!href) { + href = selectedOpts.content; + } + + } else if (selectedOpts.content) { + type = 'html'; + + } else if (href) { + if (href.match(imgRegExp)) { + type = 'image'; + + } else if (href.match(swfRegExp)) { + type = 'swf'; + + } else if ($(obj).hasClass("iframe")) { + type = 'iframe'; + + } else if (href.indexOf("#") === 0) { + type = 'inline'; + + } else { + type = 'ajax'; + } + } + + if (!type) { + _error(); + return; + } + + if (type == 'inline') { + obj = href.substr(href.indexOf("#")); + type = $(obj).length > 0 ? 'inline' : 'ajax'; + } + + selectedOpts.type = type; + selectedOpts.href = href; + selectedOpts.title = title; + + if (selectedOpts.autoDimensions) { + if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { + selectedOpts.width = 'auto'; + selectedOpts.height = 'auto'; + } else { + selectedOpts.autoDimensions = false; + } + } + + if (selectedOpts.modal) { + selectedOpts.overlayShow = true; + selectedOpts.hideOnOverlayClick = false; + selectedOpts.hideOnContentClick = false; + selectedOpts.enableEscapeButton = false; + selectedOpts.showCloseButton = false; + } + + selectedOpts.padding = parseInt(selectedOpts.padding, 10); + selectedOpts.margin = parseInt(selectedOpts.margin, 10); + + tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); + + $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { + $(this).replaceWith(content.children()); + }); + + switch (type) { + case 'html' : + tmp.html( selectedOpts.content ); + _process_inline(); + break; + + case 'inline' : + if ( $(obj).parent().is('#fancybox-content') === true) { + busy = false; + return; + } + + $('
    ') + .hide() + .insertBefore( $(obj) ) + .bind('fancybox-cleanup', function() { + $(this).replaceWith(content.children()); + }).bind('fancybox-cancel', function() { + $(this).replaceWith(tmp.children()); + }); + + $(obj).appendTo(tmp); + + _process_inline(); + break; + + case 'image': + busy = false; + + $.fancybox.showActivity(); + + imgPreloader = new Image(); + + imgPreloader.onerror = function() { + _error(); + }; + + imgPreloader.onload = function() { + busy = true; + + imgPreloader.onerror = imgPreloader.onload = null; + + _process_image(); + }; + + imgPreloader.src = href; + break; + + case 'swf': + selectedOpts.scrolling = 'no'; + + str = ''; + emb = ''; + + $.each(selectedOpts.swf, function(name, val) { + str += ''; + emb += ' ' + name + '="' + val + '"'; + }); + + str += ''; + + tmp.html(str); + + _process_inline(); + break; + + case 'ajax': + busy = false; + + $.fancybox.showActivity(); + + selectedOpts.ajax.win = selectedOpts.ajax.success; + + ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { + url : href, + data : selectedOpts.ajax.data || {}, + error : function(XMLHttpRequest, textStatus, errorThrown) { + if ( XMLHttpRequest.status > 0 ) { + _error(); + } + }, + success : function(data, textStatus, XMLHttpRequest) { + var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; + if (o.status == 200) { + if ( typeof selectedOpts.ajax.win == 'function' ) { + ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); + + if (ret === false) { + loading.hide(); + return; + } else if (typeof ret == 'string' || typeof ret == 'object') { + data = ret; + } + } + + tmp.html( data ); + _process_inline(); + } + } + })); + + break; + + case 'iframe': + _show(); + break; + } + }, + + _process_inline = function() { + var + w = selectedOpts.width, + h = selectedOpts.height; + + if (w.toString().indexOf('%') > -1) { + w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; + + } else { + w = w == 'auto' ? 'auto' : w + 'px'; + } + + if (h.toString().indexOf('%') > -1) { + h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; + + } else { + h = h == 'auto' ? 'auto' : h + 'px'; + } + + tmp.wrapInner('
    '); + + selectedOpts.width = tmp.width(); + selectedOpts.height = tmp.height(); + + _show(); + }, + + _process_image = function() { + selectedOpts.width = imgPreloader.width; + selectedOpts.height = imgPreloader.height; + + $("").attr({ + 'id' : 'fancybox-img', + 'src' : imgPreloader.src, + 'alt' : selectedOpts.title + }).appendTo( tmp ); + + _show(); + }, + + _show = function() { + var pos, equal; + + loading.hide(); + + if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + $.event.trigger('fancybox-cancel'); + + busy = false; + return; + } + + busy = true; + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { + wrap.css('height', wrap.height()); + } + + currentArray = selectedArray; + currentIndex = selectedIndex; + currentOpts = selectedOpts; + + if (currentOpts.overlayShow) { + overlay.css({ + 'background-color' : currentOpts.overlayColor, + 'opacity' : currentOpts.overlayOpacity, + 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', + 'height' : $(document).height() + }); + + if (!overlay.is(':visible')) { + if (isIE6) { + $('select:not(#fancybox-tmp select)').filter(function() { + return this.style.visibility !== 'hidden'; + }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { + this.style.visibility = 'inherit'; + }); + } + + overlay.show(); + } + } else { + overlay.hide(); + } + + final_pos = _get_zoom_to(); + + _process_title(); + + if (wrap.is(":visible")) { + $( close.add( nav_left ).add( nav_right ) ).hide(); + + pos = wrap.position(), + + start_pos = { + top : pos.top, + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); + + content.fadeTo(currentOpts.changeFade, 0.3, function() { + var finish_resizing = function() { + content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); + }; + + $.event.trigger('fancybox-change'); + + content + .empty() + .removeAttr('filter') + .css({ + 'border-width' : currentOpts.padding, + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }); + + if (equal) { + finish_resizing(); + + } else { + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.changeSpeed, + easing : currentOpts.easingChange, + step : _draw, + complete : finish_resizing + }); + } + }); + + return; + } + + wrap.removeAttr("style"); + + content.css('border-width', currentOpts.padding); + + if (currentOpts.transitionIn == 'elastic') { + start_pos = _get_zoom_from(); + + content.html( tmp.contents() ); + + wrap.show(); + + if (currentOpts.opacity) { + final_pos.opacity = 0; + } + + fx.prop = 0; + + $(fx).animate({prop: 1}, { + duration : currentOpts.speedIn, + easing : currentOpts.easingIn, + step : _draw, + complete : _finish + }); + + return; + } + + if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { + title.show(); + } + + content + .css({ + 'width' : final_pos.width - currentOpts.padding * 2, + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 + }) + .html( tmp.contents() ); + + wrap + .css(final_pos) + .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); + }, + + _format_title = function(title) { + if (title && title.length) { + if (currentOpts.titlePosition == 'float') { + return '
    ' + title + '
    '; + } + + return '
    ' + title + '
    '; + } + + return false; + }, + + _process_title = function() { + titleStr = currentOpts.title || ''; + titleHeight = 0; + + title + .empty() + .removeAttr('style') + .removeClass(); + + if (currentOpts.titleShow === false) { + title.hide(); + return; + } + + titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); + + if (!titleStr || titleStr === '') { + title.hide(); + return; + } + + title + .addClass('fancybox-title-' + currentOpts.titlePosition) + .html( titleStr ) + .appendTo( 'body' ) + .show(); + + switch (currentOpts.titlePosition) { + case 'inside': + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'marginLeft' : currentOpts.padding, + 'marginRight' : currentOpts.padding + }); + + titleHeight = title.outerHeight(true); + + title.appendTo( outer ); + + final_pos.height += titleHeight; + break; + + case 'over': + title + .css({ + 'marginLeft' : currentOpts.padding, + 'width' : final_pos.width - (currentOpts.padding * 2), + 'bottom' : currentOpts.padding + }) + .appendTo( outer ); + break; + + case 'float': + title + .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) + .appendTo( wrap ); + break; + + default: + title + .css({ + 'width' : final_pos.width - (currentOpts.padding * 2), + 'paddingLeft' : currentOpts.padding, + 'paddingRight' : currentOpts.padding + }) + .appendTo( wrap ); + break; + } + + title.hide(); + }, + + _set_navigation = function() { + if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { + $(document).bind('keydown.fb', function(e) { + if (e.keyCode == 27 && currentOpts.enableEscapeButton) { + e.preventDefault(); + $.fancybox.close(); + + } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { + e.preventDefault(); + $.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); + } + }); + } + + if (!currentOpts.showNavArrows) { + nav_left.hide(); + nav_right.hide(); + return; + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { + nav_left.show(); + } + + if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { + nav_right.show(); + } + }, + + _finish = function () { + if (!$.support.opacity) { + content.get(0).style.removeAttribute('filter'); + wrap.get(0).style.removeAttribute('filter'); + } + + if (selectedOpts.autoDimensions) { + content.css('height', 'auto'); + } + + wrap.css('height', 'auto'); + + if (titleStr && titleStr.length) { + title.show(); + } + + if (currentOpts.showCloseButton) { + close.show(); + } + + _set_navigation(); + + if (currentOpts.hideOnContentClick) { + content.bind('click', $.fancybox.close); + } + + if (currentOpts.hideOnOverlayClick) { + overlay.bind('click', $.fancybox.close); + } + + $(window).bind("resize.fb", $.fancybox.resize); + + if (currentOpts.centerOnScroll) { + $(window).bind("scroll.fb", $.fancybox.center); + } + + if (currentOpts.type == 'iframe') { + $('').appendTo(content); + } + + wrap.show(); + + busy = false; + + $.fancybox.center(); + + currentOpts.onComplete(currentArray, currentIndex, currentOpts); + + _preload_images(); + }, + + _preload_images = function() { + var href, + objNext; + + if ((currentArray.length -1) > currentIndex) { + href = currentArray[ currentIndex + 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (currentIndex > 0) { + href = currentArray[ currentIndex - 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }, + + _draw = function(pos) { + var dim = { + width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), + height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), + + top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), + left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) + }; + + if (typeof final_pos.opacity !== 'undefined') { + dim.opacity = pos < 0.5 ? 0.5 : pos; + } + + wrap.css(dim); + + content.css({ + 'width' : dim.width - currentOpts.padding * 2, + 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 + }); + }, + + _get_viewport = function() { + return [ + $(window).width() - (currentOpts.margin * 2), + $(window).height() - (currentOpts.margin * 2), + $(document).scrollLeft() + currentOpts.margin, + $(document).scrollTop() + currentOpts.margin + ]; + }, + + _get_zoom_to = function () { + var view = _get_viewport(), + to = {}, + resize = currentOpts.autoScale, + double_padding = currentOpts.padding * 2, + ratio; + + if (currentOpts.width.toString().indexOf('%') > -1) { + to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); + } else { + to.width = currentOpts.width + double_padding; + } + + if (currentOpts.height.toString().indexOf('%') > -1) { + to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); + } else { + to.height = currentOpts.height + double_padding; + } + + if (resize && (to.width > view[0] || to.height > view[1])) { + if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { + ratio = (currentOpts.width ) / (currentOpts.height ); + + if ((to.width ) > view[0]) { + to.width = view[0]; + to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); + } + + if ((to.height) > view[1]) { + to.height = view[1]; + to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); + } + + } else { + to.width = Math.min(to.width, view[0]); + to.height = Math.min(to.height, view[1]); + } + } + + to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); + to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); + + return to; + }, + + _get_obj_pos = function(obj) { + var pos = obj.offset(); + + pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; + pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; + + pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; + pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; + + pos.width = obj.width(); + pos.height = obj.height(); + + return pos; + }, + + _get_zoom_from = function() { + var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, + from = {}, + pos, + view; + + if (orig && orig.length) { + pos = _get_obj_pos(orig); + + from = { + width : pos.width + (currentOpts.padding * 2), + height : pos.height + (currentOpts.padding * 2), + top : pos.top - currentOpts.padding - 20, + left : pos.left - currentOpts.padding - 20 + }; + + } else { + view = _get_viewport(); + + from = { + width : currentOpts.padding * 2, + height : currentOpts.padding * 2, + top : parseInt(view[3] + view[1] * 0.5, 10), + left : parseInt(view[2] + view[0] * 0.5, 10) + }; + } + + return from; + }, + + _animate_loading = function() { + if (!loading.is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $('div', loading).css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + /* + * Public methods + */ + + $.fn.fancybox = function(options) { + if (!$(this).length) { + return this; + } + + $(this) + .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) + .unbind('click.fb') + .bind('click.fb', function(e) { + e.preventDefault(); + + if (busy) { + return; + } + + busy = true; + + $(this).blur(); + + selectedArray = []; + selectedIndex = 0; + + var rel = $(this).attr('rel') || ''; + + if (!rel || rel == '' || rel === 'nofollow') { + selectedArray.push(this); + + } else { + selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); + selectedIndex = selectedArray.index( this ); + } + + _start(); + + return; + }); + + return this; + }; + + $.fancybox = function(obj) { + var opts; + + if (busy) { + return; + } + + busy = true; + opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; + + selectedArray = []; + selectedIndex = parseInt(opts.index, 10) || 0; + + if ($.isArray(obj)) { + for (var i = 0, j = obj.length; i < j; i++) { + if (typeof obj[i] == 'object') { + $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); + } else { + obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); + } + } + + selectedArray = jQuery.merge(selectedArray, obj); + + } else { + if (typeof obj == 'object') { + $(obj).data('fancybox', $.extend({}, opts, obj)); + } else { + obj = $({}).data('fancybox', $.extend({content : obj}, opts)); + } + + selectedArray.push(obj); + } + + if (selectedIndex > selectedArray.length || selectedIndex < 0) { + selectedIndex = 0; + } + + _start(); + }; + + $.fancybox.showActivity = function() { + clearInterval(loadingTimer); + + loading.show(); + loadingTimer = setInterval(_animate_loading, 66); + }; + + $.fancybox.hideActivity = function() { + loading.hide(); + }; + + $.fancybox.next = function() { + return $.fancybox.pos( currentIndex + 1); + }; + + $.fancybox.prev = function() { + return $.fancybox.pos( currentIndex - 1); + }; + + $.fancybox.pos = function(pos) { + if (busy) { + return; + } + + pos = parseInt(pos); + + selectedArray = currentArray; + + if (pos > -1 && pos < currentArray.length) { + selectedIndex = pos; + _start(); + + } else if (currentOpts.cyclic && currentArray.length > 1) { + selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; + _start(); + } + + return; + }; + + $.fancybox.cancel = function() { + if (busy) { + return; + } + + busy = true; + + $.event.trigger('fancybox-cancel'); + + _abort(); + + selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); + + busy = false; + }; + + // Note: within an iframe use - parent.$.fancybox.close(); + $.fancybox.close = function() { + if (busy || wrap.is(':hidden')) { + return; + } + + busy = true; + + if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + busy = false; + return; + } + + _abort(); + + $(close.add( nav_left ).add( nav_right )).hide(); + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); + + if (currentOpts.titlePosition !== 'inside') { + title.empty(); + } + + wrap.stop(); + + function _cleanup() { + overlay.fadeOut('fast'); + + title.empty().hide(); + wrap.hide(); + + $.event.trigger('fancybox-cleanup'); + + content.empty(); + + currentOpts.onClosed(currentArray, currentIndex, currentOpts); + + currentArray = selectedOpts = []; + currentIndex = selectedIndex = 0; + currentOpts = selectedOpts = {}; + + busy = false; + } + + if (currentOpts.transitionOut == 'elastic') { + start_pos = _get_zoom_from(); + + var pos = wrap.position(); + + final_pos = { + top : pos.top , + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + if (currentOpts.opacity) { + final_pos.opacity = 1; + } + + title.empty().hide(); + + fx.prop = 1; + + $(fx).animate({ prop: 0 }, { + duration : currentOpts.speedOut, + easing : currentOpts.easingOut, + step : _draw, + complete : _cleanup + }); + + } else { + wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); + } + }; + + $.fancybox.resize = function() { + if (overlay.is(':visible')) { + overlay.css('height', $(document).height()); + } + + $.fancybox.center(true); + }; + + $.fancybox.center = function() { + var view, align; + + if (busy) { + return; + } + + align = arguments[0] === true ? 1 : 0; + view = _get_viewport(); + + if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { + return; + } + + wrap + .stop() + .animate({ + 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), + 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) + }, typeof arguments[0] == 'number' ? arguments[0] : 200); + }; + + $.fancybox.init = function() { + if ($("#fancybox-wrap").length) { + return; + } + + $('body').append( + tmp = $('
    '), + loading = $('
    '), + overlay = $('
    '), + wrap = $('
    ') + ); + + outer = $('
    ') + .append('
    ') + .appendTo( wrap ); + + outer.append( + content = $('
    '), + close = $(''), + title = $('
    '), + + nav_left = $(''), + nav_right = $('') + ); + + close.click($.fancybox.close); + loading.click($.fancybox.cancel); + + nav_left.click(function(e) { + e.preventDefault(); + $.fancybox.prev(); + }); + + nav_right.click(function(e) { + e.preventDefault(); + $.fancybox.next(); + }); + + if ($.fn.mousewheel) { + wrap.bind('mousewheel.fb', function(e, delta) { + if (busy) { + e.preventDefault(); + + } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { + e.preventDefault(); + $.fancybox[ delta > 0 ? 'prev' : 'next'](); + } + }); + } + + if (!$.support.opacity) { + wrap.addClass('fancybox-ie'); + } + + if (isIE6) { + loading.addClass('fancybox-ie6'); + wrap.addClass('fancybox-ie6'); + + $('').prependTo(outer); + } + }; + + $.fn.fancybox.defaults = { + padding : 10, + margin : 40, + opacity : false, + modal : false, + cyclic : false, + scrolling : 'auto', // 'auto', 'yes' or 'no' + + width : 560, + height : 340, + + autoScale : true, + autoDimensions : true, + centerOnScroll : false, + + ajax : {}, + swf : { wmode: 'transparent' }, + + hideOnOverlayClick : true, + hideOnContentClick : false, + + overlayShow : true, + overlayOpacity : 0.7, + overlayColor : '#777', + + titleShow : true, + titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' + titleFormat : null, + titleFromAlt : false, + + transitionIn : 'fade', // 'elastic', 'fade' or 'none' + transitionOut : 'fade', // 'elastic', 'fade' or 'none' + + speedIn : 300, + speedOut : 300, + + changeSpeed : 300, + changeFade : 'fast', + + easingIn : 'swing', + easingOut : 'swing', + + showCloseButton : true, + showNavArrows : true, + enableEscapeButton : true, + enableKeyboardNav : true, + + onStart : function(){}, + onCancel : function(){}, + onComplete : function(){}, + onCleanup : function(){}, + onClosed : function(){}, + onError : function(){} + }; + + $(document).ready(function() { + $.fancybox.init(); + }); + +})(jQuery); diff --git a/widgy/static/widgy/image/layout-sprite.png b/widgy/static/widgy/image/layout-sprite.png new file mode 100644 index 000000000..a183f2f40 Binary files /dev/null and b/widgy/static/widgy/image/layout-sprite.png differ diff --git a/widgy/static/widgy/image/loading.gif b/widgy/static/widgy/image/loading.gif new file mode 100644 index 000000000..e40f19a28 Binary files /dev/null and b/widgy/static/widgy/image/loading.gif differ diff --git a/widgy/static/widgy/image/page-layout-2-column.gif b/widgy/static/widgy/image/page-layout-2-column.gif new file mode 100755 index 000000000..2bf07a30d Binary files /dev/null and b/widgy/static/widgy/image/page-layout-2-column.gif differ diff --git a/widgy/static/widgy/image/widget-accordion.png b/widgy/static/widgy/image/widget-accordion.png new file mode 100644 index 000000000..2b3b5a79c Binary files /dev/null and b/widgy/static/widgy/image/widget-accordion.png differ diff --git a/widgy/static/widgy/image/widget-brand-list.png b/widgy/static/widgy/image/widget-brand-list.png new file mode 100644 index 000000000..629f178ba Binary files /dev/null and b/widgy/static/widgy/image/widget-brand-list.png differ diff --git a/widgy/static/widgy/image/widget-bucket.png b/widgy/static/widgy/image/widget-bucket.png new file mode 100644 index 000000000..08069e05a Binary files /dev/null and b/widgy/static/widgy/image/widget-bucket.png differ diff --git a/widgy/static/widgy/image/widget-button.png b/widgy/static/widgy/image/widget-button.png new file mode 100644 index 000000000..af1c87cf1 Binary files /dev/null and b/widgy/static/widgy/image/widget-button.png differ diff --git a/widgy/static/widgy/image/widget-calendar.png b/widgy/static/widgy/image/widget-calendar.png new file mode 100755 index 000000000..658913852 Binary files /dev/null and b/widgy/static/widgy/image/widget-calendar.png differ diff --git a/widgy/static/widgy/image/widget-callout.png b/widgy/static/widgy/image/widget-callout.png new file mode 100644 index 000000000..c6a3b9b55 Binary files /dev/null and b/widgy/static/widgy/image/widget-callout.png differ diff --git a/widgy/static/widgy/image/widget-chart.png b/widgy/static/widgy/image/widget-chart.png new file mode 100755 index 000000000..2f7499501 Binary files /dev/null and b/widgy/static/widgy/image/widget-chart.png differ diff --git a/widgy/static/widgy/image/widget-checkbox.png b/widgy/static/widgy/image/widget-checkbox.png new file mode 100644 index 000000000..1b5ca67e5 Binary files /dev/null and b/widgy/static/widgy/image/widget-checkbox.png differ diff --git a/widgy/static/widgy/image/widget-code.gif b/widgy/static/widgy/image/widget-code.gif new file mode 100755 index 000000000..2fbe63854 Binary files /dev/null and b/widgy/static/widgy/image/widget-code.gif differ diff --git a/widgy/static/widgy/image/widget-email.gif b/widgy/static/widgy/image/widget-email.gif new file mode 100755 index 000000000..88be82f15 Binary files /dev/null and b/widgy/static/widgy/image/widget-email.gif differ diff --git a/widgy/static/widgy/image/widget-figure.png b/widgy/static/widgy/image/widget-figure.png new file mode 100755 index 000000000..6c2aaaaaf Binary files /dev/null and b/widgy/static/widgy/image/widget-figure.png differ diff --git a/widgy/static/widgy/image/widget-form.gif b/widgy/static/widgy/image/widget-form.gif new file mode 100644 index 000000000..b759167af Binary files /dev/null and b/widgy/static/widgy/image/widget-form.gif differ diff --git a/widgy/static/widgy/image/widget-google-map.png b/widgy/static/widgy/image/widget-google-map.png new file mode 100644 index 000000000..e83f0b45c Binary files /dev/null and b/widgy/static/widgy/image/widget-google-map.png differ diff --git a/widgy/static/widgy/image/widget-hidden-field.png b/widgy/static/widgy/image/widget-hidden-field.png new file mode 100644 index 000000000..c106f60a3 Binary files /dev/null and b/widgy/static/widgy/image/widget-hidden-field.png differ diff --git a/widgy/static/widgy/image/widget-html.png b/widgy/static/widgy/image/widget-html.png new file mode 100755 index 000000000..e093032a7 Binary files /dev/null and b/widgy/static/widgy/image/widget-html.png differ diff --git a/widgy/static/widgy/image/widget-icon-mapped-field.png b/widgy/static/widgy/image/widget-icon-mapped-field.png new file mode 100644 index 000000000..8278c8d5e Binary files /dev/null and b/widgy/static/widgy/image/widget-icon-mapped-field.png differ diff --git a/widgy/static/widgy/image/widget-image-bucket.png b/widgy/static/widgy/image/widget-image-bucket.png new file mode 100644 index 000000000..ed6f8c2f6 Binary files /dev/null and b/widgy/static/widgy/image/widget-image-bucket.png differ diff --git a/widgy/static/widgy/image/widget-image.gif b/widgy/static/widgy/image/widget-image.gif new file mode 100755 index 000000000..86255ed33 Binary files /dev/null and b/widgy/static/widgy/image/widget-image.gif differ diff --git a/widgy/static/widgy/image/widget-list.png b/widgy/static/widgy/image/widget-list.png new file mode 100644 index 000000000..c17ee4faa Binary files /dev/null and b/widgy/static/widgy/image/widget-list.png differ diff --git a/widgy/static/widgy/image/widget-miniboxes.gif b/widgy/static/widgy/image/widget-miniboxes.gif new file mode 100644 index 000000000..3aac1c2ab Binary files /dev/null and b/widgy/static/widgy/image/widget-miniboxes.gif differ diff --git a/widgy/static/widgy/image/widget-news.png b/widgy/static/widgy/image/widget-news.png new file mode 100755 index 000000000..22e5b2362 Binary files /dev/null and b/widgy/static/widgy/image/widget-news.png differ diff --git a/widgy/static/widgy/image/widget-ok-button.png b/widgy/static/widgy/image/widget-ok-button.png new file mode 100644 index 000000000..4511c0363 Binary files /dev/null and b/widgy/static/widgy/image/widget-ok-button.png differ diff --git a/widgy/static/widgy/image/widget-product-bucket.png b/widgy/static/widgy/image/widget-product-bucket.png new file mode 100644 index 000000000..d89159757 Binary files /dev/null and b/widgy/static/widgy/image/widget-product-bucket.png differ diff --git a/widgy/static/widgy/image/widget-product-list.png b/widgy/static/widgy/image/widget-product-list.png new file mode 100644 index 000000000..4180bf966 Binary files /dev/null and b/widgy/static/widgy/image/widget-product-list.png differ diff --git a/widgy/static/widgy/image/widget-radio.png b/widgy/static/widgy/image/widget-radio.png new file mode 100644 index 000000000..47e2db8c3 Binary files /dev/null and b/widgy/static/widgy/image/widget-radio.png differ diff --git a/widgy/static/widgy/image/widget-salesforce.png b/widgy/static/widgy/image/widget-salesforce.png new file mode 100644 index 000000000..3b17f051a Binary files /dev/null and b/widgy/static/widgy/image/widget-salesforce.png differ diff --git a/widgy/static/widgy/image/widget-save-data.png b/widgy/static/widgy/image/widget-save-data.png new file mode 100644 index 000000000..87b3be0cd Binary files /dev/null and b/widgy/static/widgy/image/widget-save-data.png differ diff --git a/widgy/static/widgy/image/widget-section.png b/widgy/static/widgy/image/widget-section.png new file mode 100644 index 000000000..4cb3b3b1d Binary files /dev/null and b/widgy/static/widgy/image/widget-section.png differ diff --git a/widgy/static/widgy/image/widget-skull-and-crossbones.png b/widgy/static/widgy/image/widget-skull-and-crossbones.png new file mode 100644 index 000000000..3e85c1e8c Binary files /dev/null and b/widgy/static/widgy/image/widget-skull-and-crossbones.png differ diff --git a/widgy/static/widgy/image/widget-slide.png b/widgy/static/widgy/image/widget-slide.png new file mode 100644 index 000000000..0890d0f63 Binary files /dev/null and b/widgy/static/widgy/image/widget-slide.png differ diff --git a/widgy/static/widgy/image/widget-submit.png b/widgy/static/widgy/image/widget-submit.png new file mode 100644 index 000000000..3562a7758 Binary files /dev/null and b/widgy/static/widgy/image/widget-submit.png differ diff --git a/widgy/static/widgy/image/widget-tab.png b/widgy/static/widgy/image/widget-tab.png new file mode 100755 index 000000000..3d8207fd7 Binary files /dev/null and b/widgy/static/widgy/image/widget-tab.png differ diff --git a/widgy/static/widgy/image/widget-table.gif b/widgy/static/widgy/image/widget-table.gif new file mode 100755 index 000000000..e26b14321 Binary files /dev/null and b/widgy/static/widgy/image/widget-table.gif differ diff --git a/widgy/static/widgy/image/widget-tablecolumn.png b/widgy/static/widgy/image/widget-tablecolumn.png new file mode 100644 index 000000000..ad9276475 Binary files /dev/null and b/widgy/static/widgy/image/widget-tablecolumn.png differ diff --git a/widgy/static/widgy/image/widget-tablerow.png b/widgy/static/widgy/image/widget-tablerow.png new file mode 100644 index 000000000..17ee9c0a4 Binary files /dev/null and b/widgy/static/widgy/image/widget-tablerow.png differ diff --git a/widgy/static/widgy/image/widget-textarea.gif b/widgy/static/widgy/image/widget-textarea.gif new file mode 100644 index 000000000..7494e7e51 Binary files /dev/null and b/widgy/static/widgy/image/widget-textarea.gif differ diff --git a/widgy/static/widgy/image/widget-uncaptcha.png b/widgy/static/widgy/image/widget-uncaptcha.png new file mode 100644 index 000000000..8823de61b Binary files /dev/null and b/widgy/static/widgy/image/widget-uncaptcha.png differ diff --git a/widgy/static/widgy/image/widget-video.gif b/widgy/static/widgy/image/widget-video.gif new file mode 100755 index 000000000..4df18da47 Binary files /dev/null and b/widgy/static/widgy/image/widget-video.gif differ diff --git a/widgy/static/widgy/js/app.html b/widgy/static/widgy/js/app.html index 1e22880ac..4d53bbb51 100644 --- a/widgy/static/widgy/js/app.html +++ b/widgy/static/widgy/js/app.html @@ -1,4 +1 @@ -
    -
    - +
    diff --git a/widgy/static/widgy/js/components/tabbed/component.js b/widgy/static/widgy/js/components/tabbed/component.js new file mode 100644 index 000000000..65cca0634 --- /dev/null +++ b/widgy/static/widgy/js/components/tabbed/component.js @@ -0,0 +1,107 @@ +define([ 'jquery', 'underscore', 'widgy.backbone', 'components/widget/component' ], function($, _, Backbone, widget) { + + var TabbedView = widget.View.extend({ + events: Backbone.extendEvents(widget.View, { + 'click .tabbed > .widget > .node_children .drag-row': 'showTabClick' + }), + + initialize: function() { + widget.View.prototype.initialize.apply(this, arguments); + + _.bindAll(this, + 'stealThingsFromChild' + ); + + this.listenTo(this.collection, 'remove', this.showTabAfterTabDestroy); + }, + + showTabAfterTabDestroy: function(model, collection, options) { + if(this.list.size() < 1) { + return; + } + + var index_to_show = options.index; + + if(index_to_show > 0) { + index_to_show--; + } + + this.showTab(this.list.at(index_to_show)); + }, + + showTabClick: function(event) { + if ( $(event.target).is('.preview') ) + return; + + var view = this.list.findByEl($(event.target).parents('.node')[0]); + this.showTab(view); + + return false; + }, + + showTab: function(view) { + this.$children.find('.active').removeClass('active'); + view.$el.addClass('active'); + + // previously, I was emptying the $current div and inserting the + // elements; however, when you remove an element out of DOM it appears to + // lose its events. I'm doing it this way in order to not lose the + // events. + this.$current.children().hide(); + view.$preview.show(); + view.$children.show(); + + if ( view.hasShelf() ) { + view.shelf.$el.show(); + } + }, + + renderNode: function() { + return widget.View.prototype.renderNode.apply(this, arguments).then(function(view) { + view.$current = view.$('.current:last'); + + return view; + }); + }, + + renderChildren: function() { + var parent = this; + return widget.View.prototype.renderChildren.apply(this, arguments).then(function() { + // Show the first tab on first render. + // Does this always work? + if ( parent.list.size() ) + parent.showTab(parent.list.at(0)); + + return parent; + }); + }, + + stealThingsFromChild: function(child_view) { + if ( child_view.hasShelf() ) { + child_view.shelf.$el.hide().appendTo(this.$current); + } + child_view.$preview.hide().appendTo(this.$current); + child_view.$children.hide().appendTo(this.$current); + + this.showTab(child_view); + + return child_view; + }, + + prepareChild: function(child_view) { + widget.View.prototype.prepareChild.apply(this, arguments); + this.listenTo(child_view, 'rendered', this.stealThingsFromChild); + return child_view; + }, + + createDropTarget: function(view) { + var drop_target = widget.View.prototype.createDropTarget.apply(this, arguments); + drop_target.$el.css('height', ''); + return drop_target; + } + }); + + return _.extend({}, widget, { + View: TabbedView + }); +}); diff --git a/widgy/static/widgy/js/components/widget/component.js b/widgy/static/widgy/js/components/widget/component.js new file mode 100644 index 000000000..c0c1ac8e0 --- /dev/null +++ b/widgy/static/widgy/js/components/widget/component.js @@ -0,0 +1,3 @@ +define(['widgy.contents'], function(contents) { + return contents; +}); diff --git a/widgy/static/widgy/js/form.js b/widgy/static/widgy/js/form.js new file mode 100644 index 000000000..965d030ea --- /dev/null +++ b/widgy/static/widgy/js/form.js @@ -0,0 +1,96 @@ +define([ + 'jquery', + 'widgy.backbone', + 'underscore' + ], function( + $, + Backbone, + _) { + + $.fn.getValue = function() { + if ( window.CKEDITOR && window.CKEDITOR.instances[this[0].id] ) { + return window.CKEDITOR.instances[this[0].id].getData(); + } + return this.val() || ''; + }; + + $.fn.serializeObject = function() { + var ret = {}; + this.each(function() { + var name = this.name; + + if (! name || (_.contains(['checkbox', 'radio'], this.type) && ! this.checked)) + return; + + if (_.contains(ret, name)) { + if (!ret[name].push) { + ret[name] = [ret[name]]; + } + ret[name].push($(this).getValue()); + } else { + ret[name] = $(this).getValue(); + } + }); + return ret; + }; + + var FormView = Backbone.View.extend({ + events: { + 'click input[type=submit], button[type=submit]': 'handleClick', + // TODO: make sure this works with whatever + 'keydown :input:not(textarea):not(select)': 'handleKeypress' + }, + + handleClick: function(event) { + if ( event.target.disabled ) + return false; + + switch(event.which) { + case 0: + // this is 0 in ie sometimes. http://bugs.jquery.com/ticket/13209 + /* falls through */ + case 1: + // left click, submit the form + this.submit(); + /* falls through */ + case 2: + // left or middle click, prevent default + return false; + default: + // right click, continue as normal + return true; + } + }, + + handleKeypress: function(event) { + if (event.which == 13) { + // enter key, submit the form by clicking the submit button + this.$el.find(':submit:not(:disabled):first').trigger({ + type: 'click', + which: 1 + }); + return false; + } + }, + + close: function() { + if (window.CKEDITOR) { + this.$('.widgy_ckeditor').each(function() { + var editor = window.CKEDITOR.instances[this.id]; + if (editor) editor.destroy(); + }); + } + Backbone.View.prototype.close.apply(this, arguments); + }, + + serialize: function() { + return this.$el.find(':input').serializeObject(); + }, + + submit: function() {} + }); + + return { + FormView: FormView + }; +}); diff --git a/widgy/static/widgy/js/geometry.js b/widgy/static/widgy/js/geometry.js new file mode 100644 index 000000000..7c2b69b99 --- /dev/null +++ b/widgy/static/widgy/js/geometry.js @@ -0,0 +1,25 @@ +define([], function() { + return { + /** + * Returns the square of the distance between the point (px, py) and any + * point in the rectangle bb (zero if the point is inside) + */ + calculateDistance: function (bb, px, py) { + var dx, dy; + dy = Math.max(Math.max(bb.top - py, py - bb.bottom), 0); + dx = Math.max(Math.max(bb.left - px, px - bb.right), 0); + return dx * dx + dy * dy; + }, + + /** + * Do the rectangles described by bb and obb overlap? The rectangles should + * be in the format returned by Element.getBoundingClientRect. + */ + rectanglesOverlap: function(bb, obb) { + return ( + bb.left <= obb.right && bb.right >= obb.left && + bb.top <= obb.bottom && bb.bottom >= obb.top + ); + } + }; +}); diff --git a/widgy/static/widgy/js/jquery-private.js b/widgy/static/widgy/js/jquery-private.js new file mode 100644 index 000000000..feac27e28 --- /dev/null +++ b/widgy/static/widgy/js/jquery-private.js @@ -0,0 +1,4 @@ +define(['jquery'], function (jq) { + // http://requirejs.org/docs/jquery.html#noconflictmap + return jq.noConflict( true ); +}); diff --git a/widgy/static/widgy/js/lib/ICanHaz.js b/widgy/static/widgy/js/lib/ICanHaz.js deleted file mode 100644 index 25a14ac6e..000000000 --- a/widgy/static/widgy/js/lib/ICanHaz.js +++ /dev/null @@ -1,542 +0,0 @@ -/*! -ICanHaz.js version 0.10 -- by @HenrikJoreteg -More info at: http://icanhazjs.com -*/ -(function () { -/* - mustache.js — Logic-less templates in JavaScript - - See http://mustache.github.com/ for more info. -*/ - -var Mustache = function () { - var _toString = Object.prototype.toString; - - Array.isArray = Array.isArray || function (obj) { - return _toString.call(obj) == "[object Array]"; - } - - var _trim = String.prototype.trim, trim; - - if (_trim) { - trim = function (text) { - return text == null ? "" : _trim.call(text); - } - } else { - var trimLeft, trimRight; - - // IE doesn't match non-breaking spaces with \s. - if ((/\S/).test("\xA0")) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; - } else { - trimLeft = /^\s+/; - trimRight = /\s+$/; - } - - trim = function (text) { - return text == null ? "" : - text.toString().replace(trimLeft, "").replace(trimRight, ""); - } - } - - var escapeMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "'": ''' - }; - - function escapeHTML(string) { - return String(string).replace(/&(?!\w+;)|[<>"']/g, function (s) { - return escapeMap[s] || s; - }); - } - - var regexCache = {}; - var Renderer = function () {}; - - Renderer.prototype = { - otag: "{{", - ctag: "}}", - pragmas: {}, - buffer: [], - pragmas_implemented: { - "IMPLICIT-ITERATOR": true - }, - context: {}, - - render: function (template, context, partials, in_recursion) { - // reset buffer & set context - if (!in_recursion) { - this.context = context; - this.buffer = []; // TODO: make this non-lazy - } - - // fail fast - if (!this.includes("", template)) { - if (in_recursion) { - return template; - } else { - this.send(template); - return; - } - } - - // get the pragmas together - template = this.render_pragmas(template); - - // render the template - var html = this.render_section(template, context, partials); - - // render_section did not find any sections, we still need to render the tags - if (html === false) { - html = this.render_tags(template, context, partials, in_recursion); - } - - if (in_recursion) { - return html; - } else { - this.sendLines(html); - } - }, - - /* - Sends parsed lines - */ - send: function (line) { - if (line !== "") { - this.buffer.push(line); - } - }, - - sendLines: function (text) { - if (text) { - var lines = text.split("\n"); - for (var i = 0; i < lines.length; i++) { - this.send(lines[i]); - } - } - }, - - /* - Looks for %PRAGMAS - */ - render_pragmas: function (template) { - // no pragmas - if (!this.includes("%", template)) { - return template; - } - - var that = this; - var regex = this.getCachedRegex("render_pragmas", function (otag, ctag) { - return new RegExp(otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + ctag, "g"); - }); - - return template.replace(regex, function (match, pragma, options) { - if (!that.pragmas_implemented[pragma]) { - throw({message: - "This implementation of mustache doesn't understand the '" + - pragma + "' pragma"}); - } - that.pragmas[pragma] = {}; - if (options) { - var opts = options.split("="); - that.pragmas[pragma][opts[0]] = opts[1]; - } - return ""; - // ignore unknown pragmas silently - }); - }, - - /* - Tries to find a partial in the curent scope and render it - */ - render_partial: function (name, context, partials) { - name = trim(name); - if (!partials || partials[name] === undefined) { - throw({message: "unknown_partial '" + name + "'"}); - } - if (!context || typeof context[name] != "object") { - return this.render(partials[name], context, partials, true); - } - return this.render(partials[name], context[name], partials, true); - }, - - /* - Renders inverted (^) and normal (#) sections - */ - render_section: function (template, context, partials) { - if (!this.includes("#", template) && !this.includes("^", template)) { - // did not render anything, there were no sections - return false; - } - - var that = this; - - var regex = this.getCachedRegex("render_section", function (otag, ctag) { - // This regex matches _the first_ section ({{#foo}}{{/foo}}), and captures the remainder - return new RegExp( - "^([\\s\\S]*?)" + // all the crap at the beginning that is not {{*}} ($1) - - otag + // {{ - "(\\^|\\#)\\s*(.+)\\s*" + // #foo (# == $2, foo == $3) - ctag + // }} - - "\n*([\\s\\S]*?)" + // between the tag ($2). leading newlines are dropped - - otag + // {{ - "\\/\\s*\\3\\s*" + // /foo (backreference to the opening tag). - ctag + // }} - - "\\s*([\\s\\S]*)$", // everything else in the string ($4). leading whitespace is dropped. - - "g"); - }); - - - // for each {{#foo}}{{/foo}} section do... - return template.replace(regex, function (match, before, type, name, content, after) { - // before contains only tags, no sections - var renderedBefore = before ? that.render_tags(before, context, partials, true) : "", - - // after may contain both sections and tags, so use full rendering function - renderedAfter = after ? that.render(after, context, partials, true) : "", - - // will be computed below - renderedContent, - - value = that.find(name, context); - - if (type === "^") { // inverted section - if (!value || Array.isArray(value) && value.length === 0) { - // false or empty list, render it - renderedContent = that.render(content, context, partials, true); - } else { - renderedContent = ""; - } - } else if (type === "#") { // normal section - if (Array.isArray(value)) { // Enumerable, Let's loop! - renderedContent = that.map(value, function (row) { - return that.render(content, that.create_context(row), partials, true); - }).join(""); - } else if (that.is_object(value)) { // Object, Use it as subcontext! - renderedContent = that.render(content, that.create_context(value), - partials, true); - } else if (typeof value == "function") { - // higher order section - renderedContent = value.call(context, content, function (text) { - return that.render(text, context, partials, true); - }); - } else if (value) { // boolean section - renderedContent = that.render(content, context, partials, true); - } else { - renderedContent = ""; - } - } - - return renderedBefore + renderedContent + renderedAfter; - }); - }, - - /* - Replace {{foo}} and friends with values from our view - */ - render_tags: function (template, context, partials, in_recursion) { - // tit for tat - var that = this; - - var new_regex = function () { - return that.getCachedRegex("render_tags", function (otag, ctag) { - return new RegExp(otag + "(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?" + ctag + "+", "g"); - }); - }; - - var regex = new_regex(); - var tag_replace_callback = function (match, operator, name) { - switch(operator) { - case "!": // ignore comments - return ""; - case "=": // set new delimiters, rebuild the replace regexp - that.set_delimiters(name); - regex = new_regex(); - return ""; - case ">": // render partial - return that.render_partial(name, context, partials); - case "{": // the triple mustache is unescaped - case "&": // & operator is an alternative unescape method - return that.find(name, context); - default: // escape the value - return escapeHTML(that.find(name, context)); - } - }; - var lines = template.split("\n"); - for(var i = 0; i < lines.length; i++) { - lines[i] = lines[i].replace(regex, tag_replace_callback, this); - if (!in_recursion) { - this.send(lines[i]); - } - } - - if (in_recursion) { - return lines.join("\n"); - } - }, - - set_delimiters: function (delimiters) { - var dels = delimiters.split(" "); - this.otag = this.escape_regex(dels[0]); - this.ctag = this.escape_regex(dels[1]); - }, - - escape_regex: function (text) { - // thank you Simon Willison - if (!arguments.callee.sRE) { - var specials = [ - '/', '.', '*', '+', '?', '|', - '(', ')', '[', ']', '{', '}', '\\' - ]; - arguments.callee.sRE = new RegExp( - '(\\' + specials.join('|\\') + ')', 'g' - ); - } - return text.replace(arguments.callee.sRE, '\\$1'); - }, - - /* - find `name` in current `context`. That is find me a value - from the view object - */ - find: function (name, context) { - name = trim(name); - - // Checks whether a value is thruthy or false or 0 - function is_kinda_truthy(bool) { - return bool === false || bool === 0 || bool; - } - - var value; - - // check for dot notation eg. foo.bar - if (name.match(/([a-z_]+)\./ig)) { - var childValue = this.walk_context(name, context); - if (is_kinda_truthy(childValue)) { - value = childValue; - } - } else { - if (is_kinda_truthy(context[name])) { - value = context[name]; - } else if (is_kinda_truthy(this.context[name])) { - value = this.context[name]; - } - } - - if (typeof value == "function") { - return value.apply(context); - } - if (value !== undefined) { - return value; - } - // silently ignore unkown variables - return ""; - }, - - walk_context: function (name, context) { - var path = name.split('.'); - // if the var doesn't exist in current context, check the top level context - var value_context = (context[path[0]] != undefined) ? context : this.context; - var value = value_context[path.shift()]; - while (value != undefined && path.length > 0) { - value_context = value; - value = value[path.shift()]; - } - // if the value is a function, call it, binding the correct context - if (typeof value == "function") { - return value.apply(value_context); - } - return value; - }, - - // Utility methods - - /* includes tag */ - includes: function (needle, haystack) { - return haystack.indexOf(this.otag + needle) != -1; - }, - - // by @langalex, support for arrays of strings - create_context: function (_context) { - if (this.is_object(_context)) { - return _context; - } else { - var iterator = "."; - if (this.pragmas["IMPLICIT-ITERATOR"]) { - iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; - } - var ctx = {}; - ctx[iterator] = _context; - return ctx; - } - }, - - is_object: function (a) { - return a && typeof a == "object"; - }, - - /* - Why, why, why? Because IE. Cry, cry cry. - */ - map: function (array, fn) { - if (typeof array.map == "function") { - return array.map(fn); - } else { - var r = []; - var l = array.length; - for(var i = 0; i < l; i++) { - r.push(fn(array[i])); - } - return r; - } - }, - - getCachedRegex: function (name, generator) { - var byOtag = regexCache[this.otag]; - if (!byOtag) { - byOtag = regexCache[this.otag] = {}; - } - - var byCtag = byOtag[this.ctag]; - if (!byCtag) { - byCtag = byOtag[this.ctag] = {}; - } - - var regex = byCtag[name]; - if (!regex) { - regex = byCtag[name] = generator(this.otag, this.ctag); - } - - return regex; - } - }; - - return({ - name: "mustache.js", - version: "0.4.0", - - /* - Turns a template and view into HTML - */ - to_html: function (template, view, partials, send_fun) { - var renderer = new Renderer(); - if (send_fun) { - renderer.send = send_fun; - } - renderer.render(template, view || {}, partials); - if (!send_fun) { - return renderer.buffer.join("\n"); - } - } - }); -}(); -/*! - ICanHaz.js -- by @HenrikJoreteg -*/ -/*global */ -(function () { - function trim(stuff) { - if (''.trim) return stuff.trim(); - else return stuff.replace(/^\s+/, '').replace(/\s+$/, ''); - } - var ich = { - VERSION: "0.10", - templates: {}, - - // grab jquery or zepto if it's there - $: (typeof window !== 'undefined') ? window.jQuery || window.Zepto || null : null, - - // public function for adding templates - // can take a name and template string arguments - // or can take an object with name/template pairs - // We're enforcing uniqueness to avoid accidental template overwrites. - // If you want a different template, it should have a different name. - addTemplate: function (name, templateString) { - if (typeof name === 'object') { - for (var template in name) { - this.addTemplate(template, name[template]); - } - return; - } - if (ich[name]) { - console.error("Invalid name: " + name + "."); - } else if (ich.templates[name]) { - console.error("Template \"" + name + " \" exists"); - } else { - ich.templates[name] = templateString; - ich[name] = function (data, raw) { - data = data || {}; - var result = Mustache.to_html(ich.templates[name], data, ich.templates); - return (ich.$ && !raw) ? ich.$(result) : result; - }; - } - }, - - // clears all retrieval functions and empties cache - clearAll: function () { - for (var key in ich.templates) { - delete ich[key]; - } - ich.templates = {}; - }, - - // clears/grabs - refresh: function () { - ich.clearAll(); - ich.grabTemplates(); - }, - - // grabs templates from the DOM and caches them. - // Loop through and add templates. - // Whitespace at beginning and end of all templates inside + +

    + diff --git a/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmp.html b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmp.html new file mode 100644 index 000000000..c00d8c2e7 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmp.html @@ -0,0 +1,118 @@ + + + + + iframe + + + + +
    + + + + + + + diff --git a/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmpFrameset.html b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmpFrameset.html new file mode 100644 index 000000000..88e1afe8a --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/tmpFrameset.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.css b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.css new file mode 100644 index 000000000..e16394846 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.css @@ -0,0 +1,82 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.midtext +{ + padding:0px; + margin:10px; +} + +.midtext p +{ + padding:0px; + margin:10px; +} + +.Button +{ + border: #737357 1px solid; + color: #3b3b1f; + background-color: #c7c78f; +} + +.PopupTabArea +{ + color: #737357; + background-color: #e3e3c7; +} + +.PopupTitleBorder +{ + border-bottom: #d5d59d 1px solid; +} +.PopupTabEmptyArea +{ + padding-left: 10px; + border-bottom: #d5d59d 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #d5d59d 1px solid; + border-top: #d5d59d 1px solid; + border-left: #d5d59d 1px solid; + padding: 3px 5px 3px 5px; + color: #737357; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #d5d59d 1px solid; + cursor: pointer; +} + +.PopupTabSelected +{ + font-weight: bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f1f1e3; +} diff --git a/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.js b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.js new file mode 100644 index 000000000..22410bdb1 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc.js @@ -0,0 +1,67 @@ +/* + Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){function w(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",f;for(f in a)for(var g in a[f]){var h=a[f][g];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var f in a[d])if(f.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var f in a[d])c[a[d][f]]=f;return c}()}}var e=function(){var a=function(a,b,f){var f=f||{},g=f.expires; +if("number"==typeof g&&g){var h=new Date;h.setTime(h.getTime()+1E3*g);g=f.expires=h}g&&g.toUTCString&&(f.expires=g.toUTCString());var b=encodeURIComponent(b),a=a+"="+b,e;for(e in f)b=f[e],a+="; "+e,!0!==b&&(a+="="+b);document.cookie=a};return{postMessage:{init:function(a){document.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=a.fn||null,f=a.id||"",g=a.target||window,h=a.message||{id:f};"[object Object]"==Object.prototype.toString.call(a.message)&& +(a.message.id||(a.message.id=f),h=a.message);a=window.JSON.stringify(h,b);g.postMessage(a,"*")}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode= +null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=null;a.targetFromFrame={};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.LocalizationButton={ChangeTo:{instance:null,text:"Change to"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null, +text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking:{instance:null,text:"Finish Checking"}};a.LocalizationLabel={ChangeTo:{instance:null,text:"Change to"},Suggestions:{instance:null,text:"Suggestions"}};var x=function(b){for(var c in b)b[c].instance.getElement().setText(a.LocalizationComing[c])},y=function(b){for(var c in b){if(!b[c].instance.setLabel)break;b[c].instance.setLabel(a.LocalizationComing[c])}}, +j,p;a.framesetHtml=function(b){return''};a.setIframe=function(b,c){var d=a.framesetHtml(c);return b.getElement().setHtml(d)};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(), +c=a.dialog.getContentElement("GrammTab","banner").getElement(),d=a.dialog.getContentElement("Thesaurus","banner").getElement();b.setStyle("height","90px");c.setStyle("height","90px");d.setStyle("height","90px")};a.setHeightFrame=function(){document.getElementById(a.iframeNumber+"_"+a.dialog._.currentTabId).style.height="240px"};a.sendData=function(b){var c=b._.currentTabId,d=b._.contents[c].Content,f,g;a.setIframe(d,c);b.parts.tabs.removeAllListeners();b.parts.tabs.on("click",function(h){h=h||window.event; +h.data.getTarget().is("a")&&c!=b._.currentTabId&&(c=b._.currentTabId,d=b._.contents[c].Content,f=a.iframeNumber+"_"+c,a.div_overlay.setEnable(),d.getElement().getChildCount()?t(a.targetFromFrame[f],a.cmd[c]):(a.setIframe(d,c),g=document.getElementById(f),a.targetFromFrame[f]=g.contentWindow))})};a.buildSelectLang=function(a){var c=new CKEDITOR.dom.element("div"),d=new CKEDITOR.dom.element("select"),a="wscLang"+a;c.addClass("cke_dialog_ui_input_select");c.setAttribute("role","presentation");c.setStyles({height:"auto", +position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"});d.setAttribute("id",a);d.addClass("cke_dialog_ui_input_select");d.setStyles({width:"160px"});c.append(d);return c};a.buildOptionLang=function(b,c){var d=document.getElementById("wscLang"+c),f=document.createDocumentFragment(),g,h,e=[];if(0===d.options.length){for(g in b)e.push([g,b[g]]);e.sort();for(var k=0;k
    "},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(b){var b=a.iframeNumber+"_"+b._.currentTabId, +c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"hbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",widths:["50%","50%"],children:[{type:"hbox",id:"leftCol",align:"left",width:"50%",children:[{type:"vbox",id:"rightCol1",widths:["50%","50%"],children:[{type:"text",id:"text",label:a.LocalizationLabel.ChangeTo.text+":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",onShow:function(){a.textNode.SpellTab=this;a.LocalizationLabel.ChangeTo.instance= +this},onHide:function(){this.reset()}},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"text",id:"labelSuggestions",label:a.LocalizationLabel.Suggestions.text+":",onShow:function(){a.LocalizationLabel.Suggestions.instance=this;this.getInputElement().hide()}},{type:"html",id:"logo",html:'WebSpellChecker.net',setup:function(){this.getElement().$.src= +a.logotype;this.getElement().getParent().setStyles({"text-align":"left"})}}]},{type:"select",id:"list_of_suggestions",labelStyle:"font: 12px/25px arial, sans-serif;",size:"6",inputStyle:"width: 140px; height: auto;",items:[["loading..."]],onShow:function(){p=this},onHide:function(){this.clear()},onChange:function(){a.textNode.SpellTab.setValue(this.getValue())}}]}]}]},{type:"hbox",id:"rightCol",align:"right",width:"50%",children:[{type:"vbox",id:"rightCol_col__left",widths:["50%","50%","50%","50%"], +children:[{type:"button",id:"ChangeTo",label:a.LocalizationButton.ChangeTo.text,title:"Change to",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeTo.instance=this},onClick:c},{type:"button",id:"ChangeAll",label:a.LocalizationButton.ChangeAll.text,title:"Change All",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeAll.instance=this},onClick:c},{type:"button",id:"AddWord", +label:a.LocalizationButton.AddWord.text,title:"Add word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.AddWord.instance=this},onClick:c},{type:"button",id:"FinishChecking",label:a.LocalizationButton.FinishChecking.text,title:"Finish Checking",style:"width: 100%;margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.FinishChecking.instance=this},onClick:c}]},{type:"vbox",id:"rightCol_col__right", +widths:["50%","50%","50%"],children:[{type:"button",id:"IgnoreWord",label:a.LocalizationButton.IgnoreWord.text,title:"Ignore word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.IgnoreWord.instance=this},onClick:c},{type:"button",id:"IgnoreAllWords",label:a.LocalizationButton.IgnoreAllWords.text,title:"Ignore all words",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.IgnoreAllWords.instance= +this},onClick:c},{type:"button",id:"option",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){a.LocalizationButton.Options.instance=this;"file:"==document.location.protocol&&this.disable()},onClick:function(){"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):b.openDialog("options")}}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().hide()}, +onHide:l,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",setup:function(){this.getChild()[0].getElement().$.src=a.logotype;this.getChild()[0].getElement().getParent().setStyles({"text-align":"center"})},children:[{type:"html",id:"logo",html:'WebSpellChecker.net'}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox", +id:"rightCol_col__left",children:[{type:"button",id:"Option_button",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);"file:"==document.location.protocol&&this.disable()},onClick:function(){"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):b.openDialog("options")}},{type:"button",id:"FinishChecking",label:a.LocalizationButton.FinishChecking.text, +title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]},{id:"GrammTab",label:"Grammar",accessKey:"G",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"
    "},{type:"html",id:"Content",label:"GrammarContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;", +children:[{type:"hbox",id:"leftCol",widths:["66%","34%"],children:[{type:"vbox",children:[{type:"text",id:"text",label:"Change to:",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",inputStyle:"float: right; width: 200px;","default":"",onShow:function(){a.textNode.GrammTab=this},onHide:function(){this.reset()}},{type:"html",id:"html_text",html:"
    ", +onShow:function(){a.textNodeInfo.GrammTab=this}},{type:"html",id:"radio",html:"",onShow:function(){a.grammerSuggest=this}}]},{type:"vbox",children:[{type:"button",id:"ChangeTo",label:"Change to",title:"Change to",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c},{type:"button",id:"IgnoreWord",label:"Ignore word",title:"Ignore word",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)}, +onClick:c},{type:"button",id:"IgnoreAllWords",label:"Ignore Problem",title:"Ignore Problem",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c},{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 133px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;", +widths:["70%","30%"],onShow:function(){this.getElement().hide()},onHide:l,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:'WebSpellChecker.net',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right", +width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]},{id:"Thesaurus",label:"Thesaurus",accessKey:"T",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"
    "},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId, +c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",widths:["65%","35%"],children:[{type:"text",id:"ChangeTo",label:"Change to:",labelLayout:"horizontal",inputStyle:"width: 160px;",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onShow:function(){a.textNode.Thesaurus=this},onHide:function(){this.reset()}}, +{type:"button",id:"ChangeTo",label:"Change to",title:"Change to",style:"width: 121px; margin-top: 1px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]},{type:"hbox",children:[{type:"select",id:"categories",label:"Categories:",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.categories=this},onHide:function(){this.clear()},onChange:function(){a.buildOptionSynonyms(this.getValue())}}, +{type:"select",id:"synonyms",label:"Synonyms:",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.synonyms=this;a.textNode.Thesaurus.setValue(this.getValue())},onHide:function(){this.clear()},onChange:function(){a.textNode.Thesaurus.setValue(this.getValue())}}]}]},{type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:'WebSpellChecker.net', +setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}},{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 121px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().hide()},children:[{type:"hbox", +id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:'WebSpellChecker.net',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking", +label:"Finish Checking",title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]}]}});CKEDITOR.dialog.add("options",function(){var b=null,c={},d={},f=null,g=null;e.cookie.get("udn");e.cookie.get("osp");var h=function(){g=this.getElement().getAttribute("title-cmd");var a=[];a[0]=d.IgnoreAllCapsWords;a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");e.cookie.set("osp", +a);e.cookie.set("udnCmd",g?g:"ignore");"delete"!=g&&(a="",""!==j.getValue()&&(a=j.getValue()),e.cookie.set("udn",a));e.postMessage.send({id:"options_dic_send"})},i=function(){f.getElement().setHtml(a.LocalizationComing.error);f.getElement().show()};return{title:a.LocalizationComing.Options,minWidth:430,minHeight:130,resizable:CKEDITOR.DIALOG_RESIZE_NONE,contents:[{id:"OptionsTab",label:"Options",accessKey:"O",elements:[{type:"hbox",id:"options_error",children:[{type:"html",style:"display: block;text-align: center;white-space: normal!important; font-size: 12px;color:red", +html:"
    ",onShow:function(){f=this}}]},{type:"vbox",id:"Options_content",children:[{type:"hbox",id:"Options_manager",widths:["52%","48%"],children:[{type:"fieldset",label:"Spell Checking Options",style:"border: none;margin-top: 13px;padding: 10px 0 10px 10px",onShow:function(){this.getInputElement().$.children[0].innerHTML=a.LocalizationComing.SpellCheckingOptions},children:[{type:"vbox",id:"Options_checkbox",children:[{type:"checkbox",id:"IgnoreAllCapsWords",label:"Ignore All-Caps Words", +labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox",id:"IgnoreWordsNumbers",label:"Ignore Words with Numbers",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox", +id:"IgnoreMixedCaseWords",label:"Ignore Mixed-Case Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox",id:"IgnoreDomainNames",label:"Ignore Domain Names",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]= +!this.getValue()?0:1}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){j=this;this.setValue(a.userDictionaryName?a.userDictionaryName:(e.cookie.get("udn"),this.getValue()))},onShow:function(){j=this;this.setValue(!e.cookie.get("udn")?this.getValue():e.cookie.get("udn"));this.setLabel(a.LocalizationComing.DictionaryName)}, +onHide:function(){this.reset()}},{type:"hbox",id:"Options_buttons",children:[{type:"vbox",id:"Options_leftCol_col",widths:["50%","50%"],children:[{type:"button",id:"create",label:"Create",title:"Create",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){this.getElement().setText(a.LocalizationComing.Create)},onClick:h},{type:"button",id:"restore",label:"Restore",title:"Restore",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd", +this.id)},onShow:function(){this.getElement().setText(a.LocalizationComing.Restore)},onClick:h}]},{type:"vbox",id:"Options_rightCol_col",widths:["50%","50%"],children:[{type:"button",id:"rename",label:"Rename",title:"Rename",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){this.getElement().setText(a.LocalizationComing.Rename)},onClick:h},{type:"button",id:"delete",label:"Remove",title:"Remove",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd", +this.id)},onShow:function(){this.getElement().setText(a.LocalizationComing.Remove)},onClick:h}]}]}]}]},{type:"hbox",id:"Options_text",children:[{type:"html",style:"text-align: justify;margin-top: 15px;white-space: normal!important; font-size: 12px;color:#777;",html:"
    "+a.LocalizationComing.OptionsTextIntro+"
    ",onShow:function(){this.getElement().setText(a.LocalizationComing.OptionsTextIntro)}}]}]}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onOk:function(){var a=[]; +a[0]=d.IgnoreAllCapsWords;a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");e.cookie.set("osp",a);e.cookie.set("udn",j.getValue());e.postMessage.send({id:"options_checkbox_send"});f.getElement().hide();f.getElement().setHtml(" ")},onLoad:function(){b=this;e.postMessage.init(i);c.IgnoreAllCapsWords=b.getContentElement("OptionsTab","IgnoreAllCapsWords");c.IgnoreWordsNumbers=b.getContentElement("OptionsTab","IgnoreWordsNumbers");c.IgnoreMixedCaseWords= +b.getContentElement("OptionsTab","IgnoreMixedCaseWords");c.IgnoreDomainNames=b.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){var b=e.cookie.get("osp").split("");d.IgnoreAllCapsWords=b[0];d.IgnoreWordsNumbers=b[1];d.IgnoreMixedCaseWords=b[2];d.IgnoreDomainNames=b[3];!parseInt(d.IgnoreAllCapsWords,10)?c.IgnoreAllCapsWords.setValue("",!1):c.IgnoreAllCapsWords.setValue("checked",!1);!parseInt(d.IgnoreWordsNumbers,10)?c.IgnoreWordsNumbers.setValue("",!1):c.IgnoreWordsNumbers.setValue("checked", +!1);!parseInt(d.IgnoreMixedCaseWords,10)?c.IgnoreMixedCaseWords.setValue("",!1):c.IgnoreMixedCaseWords.setValue("checked",!1);!parseInt(d.IgnoreDomainNames,10)?c.IgnoreDomainNames.setValue("",!1):c.IgnoreDomainNames.setValue("checked",!1);d.IgnoreAllCapsWords=!c.IgnoreAllCapsWords.getValue()?0:1;d.IgnoreWordsNumbers=!c.IgnoreWordsNumbers.getValue()?0:1;d.IgnoreMixedCaseWords=!c.IgnoreMixedCaseWords.getValue()?0:1;d.IgnoreDomainNames=!c.IgnoreDomainNames.getValue()?0:1;c.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML= +a.LocalizationComing.IgnoreAllCapsWords;c.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreWordsWithNumbers;c.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreMixedCaseWords;c.IgnoreDomainNames.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreDomainNames}}});CKEDITOR.dialog.on("resize",function(b){var b=b.data,c=b.dialog,d=CKEDITOR.document.getById(a.iframeNumber+"_"+c._.currentTabId);"checkspell"==c._.name&&(a.bnr?d&& +d.setSize("height",b.height-310):d&&d.setSize("height",b.height-220))});CKEDITOR.on("dialogDefinition",function(b){var c=b.data.definition;a.onLoadOverlay=new q({opacity:"1",background:"#fff",target:c.dialog.parts.tabs.getParent().$});a.onLoadOverlay.setEnable();c.dialog.on("show",function(){});c.dialog.on("cancel",function(){c.dialog.getParentEditor().config.wsc_onClose.call(this.document.getWindow().getFrame());a.div_overlay.setDisable();return!1},this,null,-1)})})(); \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc_ie.js b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc_ie.js new file mode 100644 index 000000000..6b39b0060 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/plugins/wsc/dialogs/wsc_ie.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),j(a)):180==d++&&window._cancelOnError(c)}}function j(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang|| +f.getSPLangCode(a.langCode),winType:d,onCancel:function(){c.hide()},onFinish:function(b){a.focus();c.getParentEditor().setData(b.value);c.hide()},staticFrame:e,framesetPath:e,iframePath:b+"ciframe.html",schemaURI:b+"wsc.css",userDictionaryName:a.config.wsc_userDictionaryName,customDictionaryName:a.config.wsc_customDictionaryIds&&a.config.wsc_customDictionaryIds.split(","),domainName:a.config.wsc_domainName});CKEDITOR.document.getById(h).setStyle("display","none");CKEDITOR.document.getById(d).setStyle("display", +"block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",i=a.lang.wsc.notAvailable,k='', +l=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+a.config.wsc_customerId+"&cmd=script&doc=wsc&schema=22";a.config.wsc_customLoaderScript&&(i+='

    '+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"

    ");window._cancelOnError=function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display", +"none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(k);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script", +{attributes:{type:"text/javascript",src:l}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,i),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}}); +CKEDITOR.dialog.on("resize",function(a){var a=a.data,c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))}); \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog.css new file mode 100644 index 000000000..41ce000ee --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie.css new file mode 100644 index 000000000..c2e129e07 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie7.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie7.css new file mode 100644 index 000000000..5f2fbbaec --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie7.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_title{zoom:1}.cke_dialog_footer{border-top:1px solid #bfbfbf}.cke_dialog_footer_buttons{position:static}.cke_dialog_footer_buttons a.cke_dialog_ui_button{vertical-align:top}.cke_dialog .cke_resizer_ltr{padding-left:4px}.cke_dialog .cke_resizer_rtl{padding-right:4px}.cke_dialog_ui_input_text,.cke_dialog_ui_input_password,.cke_dialog_ui_input_textarea,.cke_dialog_ui_input_select{padding:0!important}.cke_dialog_ui_checkbox_input,.cke_dialog_ui_ratio_input,.cke_btn_reset,.cke_btn_locked,.cke_btn_unlocked{border:1px solid transparent!important} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie8.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie8.css new file mode 100644 index 000000000..49050b862 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{display:block} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_iequirks.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_iequirks.css new file mode 100644 index 000000000..7dbe91911 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_footer{filter:""} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_opera.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_opera.css new file mode 100644 index 000000000..62f4c3633 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/dialog_opera.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fafafa',endColorstr='#ededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}.cke_dialog_footer_buttons a.cke_dialog_ui_button span{color:inherit;font-size:12px;font-weight:bold;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#9ad717',endColorstr='#69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button span{text-shadow:0 1px 0 #fff}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background:url(images/refresh.png) top left no-repeat;width:16px;height:16px;border:1px none;font-size:1px}.cke_hidpi .cke_dialog a.cke_btn_reset{background-size:16px;background-image:url(images/hidpi/refresh.png)}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_locked{background-image:url(images/lock.png)}.cke_dialog a.cke_btn_unlocked{background-image:url(images/lock-open.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked,.cke_hidpi .cke_dialog a.cke_btn_locked{background-size:16px}.cke_hidpi .cke_dialog a.cke_btn_locked{background-image:url(images/hidpi/lock.png)}.cke_hidpi .cke_dialog a.cke_btn_unlocked{background-image:url(images/hidpi/lock-open.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_footer{display:block;height:38px}.cke_ltr .cke_dialog_footer>*{float:right}.cke_rtl .cke_dialog_footer>*{float:left} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor.css new file mode 100644 index 000000000..2bd161672 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_button__about_icon {background: url(../../plugins/icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(../../plugins/icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(../../plugins/icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(../../plugins/icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(../../plugins/icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(../../plugins/icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(../../plugins/icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(../../plugins/icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(../../plugins/icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(../../plugins/icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(../../plugins/icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(../../plugins/icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(../../plugins/icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(../../plugins/icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(../../plugins/icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(../../plugins/icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(../../plugins/icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(../../plugins/icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(../../plugins/icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(../../plugins/icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(../../plugins/icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(../../plugins/icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(../../plugins/icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(../../plugins/icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(../../plugins/icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(../../plugins/icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(../../plugins/icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(../../plugins/icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(../../plugins/icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(../../plugins/icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(../../plugins/icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(../../plugins/icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(../../plugins/icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(../../plugins/icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(../../plugins/icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(../../plugins/icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(../../plugins/icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(../../plugins/icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(../../plugins/icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(../../plugins/icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(../../plugins/icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(../../plugins/icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(../../plugins/icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(../../plugins/icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(../../plugins/icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_gecko.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_gecko.css new file mode 100644 index 000000000..c00dbd467 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_gecko.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_bottom{padding-bottom:3px}.cke_combo_text{margin-bottom:-1px;margin-top:1px}.cke_button__about_icon {background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie.css new file mode 100644 index 000000000..fba87188d --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_button__about_icon {background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie7.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie7.css new file mode 100644 index 000000000..429856955 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie7.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_button,.cke_rtl .cke_button *,.cke_rtl .cke_combo,.cke_rtl .cke_combo *,.cke_rtl .cke_path_item,.cke_rtl .cke_path_item *,.cke_rtl .cke_path_empty{float:none}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_combo_button,.cke_rtl .cke_combo_button *,.cke_rtl .cke_button,.cke_rtl .cke_button_icon,{display:inline-block;vertical-align:top}.cke_toolbox{display:inline-block;padding-bottom:5px;height:100%}.cke_rtl .cke_toolbox{padding-bottom:0}.cke_toolbar{margin-bottom:5px}.cke_rtl .cke_toolbar{margin-bottom:0}.cke_toolgroup{height:26px}.cke_toolgroup,.cke_combo{position:relative}a.cke_button{float:none;vertical-align:top}.cke_toolbar_separator{display:inline-block;float:none;vertical-align:top;background-color:#c0c0c0}.cke_toolbox_collapser .cke_arrow{margin-top:0}.cke_toolbox_collapser .cke_arrow{border-width:4px}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{border-width:3px}.cke_rtl .cke_button_arrow{padding-top:8px;margin-right:2px}.cke_rtl .cke_combo_inlinelabel{display:table-cell;vertical-align:middle}.cke_menubutton{display:block;height:24px}.cke_menubutton_inner{display:block;position:relative}.cke_menubutton_icon{height:16px;width:16px}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:inline-block}.cke_menubutton_label{width:auto;vertical-align:top;line-height:24px;height:24px;margin:0 10px 0 0}.cke_menuarrow{width:5px;height:6px;padding:0;position:absolute;right:8px;top:10px;background-position:0 0}.cke_rtl .cke_menubutton_icon{position:absolute;right:0;top:0}.cke_rtl .cke_menubutton_label{float:right;clear:both;margin:0 24px 0 10px}.cke_hc .cke_rtl .cke_menubutton_label{margin-right:0}.cke_rtl .cke_menuarrow{left:8px;right:auto;background-position:0 -24px}.cke_hc .cke_menuarrow{top:5px;padding:0 5px}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{position:relative}.cke_wysiwyg_div{padding-top:0!important;padding-bottom:0!important}.cke_button__about_icon {background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie8.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie8.css new file mode 100644 index 000000000..454b57dac --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_toolbox_collapser .cke_arrow{border-width:4px}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{border-width:3px}.cke_toolbox_collapser .cke_arrow{margin-top:0}.cke_button__about_icon {background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_iequirks.css b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_iequirks.css new file mode 100644 index 000000000..e447486a2 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/editor_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;white-space:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-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)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_ltr .cke_button:last-child,.cke_rtl .cke_button:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_ltr .cke_button:first-child,.cke_rtl .cke_button:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_on{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_menubutton_on .cke_menubutton_icon{padding-right:3px}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffff',endColorstr='#e4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f2f2f2',endColorstr='#cccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#aaaaaa',endColorstr='#cacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label,.cke_button__sourcedialog_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff,endColorstr=#00ffffff)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_top,.cke_contents,.cke_bottom{width:100%}.cke_button_arrow{font-size:0}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_button,.cke_rtl .cke_button *,.cke_rtl .cke_combo,.cke_rtl .cke_combo *,.cke_rtl .cke_path_item,.cke_rtl .cke_path_item *,.cke_rtl .cke_path_empty{float:none}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_combo_button,.cke_rtl .cke_combo_button *,.cke_rtl .cke_button,.cke_rtl .cke_button_icon,{display:inline-block;vertical-align:top}.cke_rtl .cke_button_icon{float:none}.cke_resizer{width:10px}.cke_source{white-space:normal}.cke_bottom{position:static}.cke_colorbox{font-size:0}.cke_button__about_icon {background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon {background: url(icons.png) no-repeat 0 -24px !important;}.cke_button__italic_icon {background: url(icons.png) no-repeat 0 -48px !important;}.cke_button__strike_icon {background: url(icons.png) no-repeat 0 -72px !important;}.cke_button__subscript_icon {background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__superscript_icon {background: url(icons.png) no-repeat 0 -120px !important;}.cke_button__underline_icon {background: url(icons.png) no-repeat 0 -144px !important;}.cke_button__blockquote_icon {background: url(icons.png) no-repeat 0 -168px !important;}.cke_rtl .cke_button__copy_icon, .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -192px !important;}.cke_ltr .cke_button__copy_icon {background: url(icons.png) no-repeat 0 -216px !important;}.cke_rtl .cke_button__cut_icon, .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -240px !important;}.cke_ltr .cke_button__cut_icon {background: url(icons.png) no-repeat 0 -264px !important;}.cke_rtl .cke_button__paste_icon, .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -288px !important;}.cke_ltr .cke_button__paste_icon {background: url(icons.png) no-repeat 0 -312px !important;}.cke_button__horizontalrule_icon {background: url(icons.png) no-repeat 0 -336px !important;}.cke_button__image_icon {background: url(icons.png) no-repeat 0 -360px !important;}.cke_rtl .cke_button__indent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__indent_icon {background: url(icons.png) no-repeat 0 -408px !important;}.cke_rtl .cke_button__outdent_icon, .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -432px !important;}.cke_ltr .cke_button__outdent_icon {background: url(icons.png) no-repeat 0 -456px !important;}.cke_rtl .cke_button__anchor_icon, .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -480px !important;}.cke_ltr .cke_button__anchor_icon {background: url(icons.png) no-repeat 0 -504px !important;}.cke_button__link_icon {background: url(icons.png) no-repeat 0 -528px !important;}.cke_button__unlink_icon {background: url(icons.png) no-repeat 0 -552px !important;}.cke_rtl .cke_button__bulletedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__bulletedlist_icon {background: url(icons.png) no-repeat 0 -600px !important;}.cke_rtl .cke_button__numberedlist_icon, .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -624px !important;}.cke_ltr .cke_button__numberedlist_icon {background: url(icons.png) no-repeat 0 -648px !important;}.cke_button__maximize_icon {background: url(icons.png) no-repeat 0 -672px !important;}.cke_rtl .cke_button__pastetext_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -696px !important;}.cke_ltr .cke_button__pastetext_icon {background: url(icons.png) no-repeat 0 -720px !important;}.cke_rtl .cke_button__pastefromword_icon, .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -744px !important;}.cke_ltr .cke_button__pastefromword_icon {background: url(icons.png) no-repeat 0 -768px !important;}.cke_button__removeformat_icon {background: url(icons.png) no-repeat 0 -792px !important;}.cke_rtl .cke_button__source_icon, .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons.png) no-repeat 0 -816px !important;}.cke_ltr .cke_button__source_icon {background: url(icons.png) no-repeat 0 -840px !important;}.cke_button__specialchar_icon {background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__scayt_icon {background: url(icons.png) no-repeat 0 -888px !important;}.cke_button__table_icon {background: url(icons.png) no-repeat 0 -912px !important;}.cke_rtl .cke_button__redo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -936px !important;}.cke_ltr .cke_button__redo_icon {background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__undo_icon, .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -984px !important;}.cke_ltr .cke_button__undo_icon {background: url(icons.png) no-repeat 0 -1008px !important;}.cke_button__spellchecker_icon {background: url(icons.png) no-repeat 0 -1032px !important;}.cke_hidpi .cke_button__about_icon {background: url(icons_hidpi.png) no-repeat 0 -0px !important;background-size: 16px !important;}.cke_hidpi .cke_button__bold_icon {background: url(icons_hidpi.png) no-repeat 0 -24px !important;background-size: 16px !important;}.cke_hidpi .cke_button__italic_icon {background: url(icons_hidpi.png) no-repeat 0 -48px !important;background-size: 16px !important;}.cke_hidpi .cke_button__strike_icon {background: url(icons_hidpi.png) no-repeat 0 -72px !important;background-size: 16px !important;}.cke_hidpi .cke_button__subscript_icon {background: url(icons_hidpi.png) no-repeat 0 -96px !important;background-size: 16px !important;}.cke_hidpi .cke_button__superscript_icon {background: url(icons_hidpi.png) no-repeat 0 -120px !important;background-size: 16px !important;}.cke_hidpi .cke_button__underline_icon {background: url(icons_hidpi.png) no-repeat 0 -144px !important;background-size: 16px !important;}.cke_hidpi .cke_button__blockquote_icon {background: url(icons_hidpi.png) no-repeat 0 -168px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__copy_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -192px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__copy_icon,.cke_ltr.cke_hidpi .cke_button__copy_icon {background: url(icons_hidpi.png) no-repeat 0 -216px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__cut_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -240px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__cut_icon,.cke_ltr.cke_hidpi .cke_button__cut_icon {background: url(icons_hidpi.png) no-repeat 0 -264px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__paste_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -288px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__paste_icon,.cke_ltr.cke_hidpi .cke_button__paste_icon {background: url(icons_hidpi.png) no-repeat 0 -312px !important;background-size: 16px !important;}.cke_hidpi .cke_button__horizontalrule_icon {background: url(icons_hidpi.png) no-repeat 0 -336px !important;background-size: 16px !important;}.cke_hidpi .cke_button__image_icon {background: url(icons_hidpi.png) no-repeat 0 -360px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__indent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -384px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__indent_icon,.cke_ltr.cke_hidpi .cke_button__indent_icon {background: url(icons_hidpi.png) no-repeat 0 -408px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__outdent_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -432px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__outdent_icon,.cke_ltr.cke_hidpi .cke_button__outdent_icon {background: url(icons_hidpi.png) no-repeat 0 -456px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__anchor_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -480px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__anchor_icon,.cke_ltr.cke_hidpi .cke_button__anchor_icon {background: url(icons_hidpi.png) no-repeat 0 -504px !important;background-size: 16px !important;}.cke_hidpi .cke_button__link_icon {background: url(icons_hidpi.png) no-repeat 0 -528px !important;background-size: 16px !important;}.cke_hidpi .cke_button__unlink_icon {background: url(icons_hidpi.png) no-repeat 0 -552px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__bulletedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -576px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__bulletedlist_icon,.cke_ltr.cke_hidpi .cke_button__bulletedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -600px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__numberedlist_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -624px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__numberedlist_icon,.cke_ltr.cke_hidpi .cke_button__numberedlist_icon {background: url(icons_hidpi.png) no-repeat 0 -648px !important;background-size: 16px !important;}.cke_hidpi .cke_button__maximize_icon {background: url(icons_hidpi.png) no-repeat 0 -672px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastetext_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -696px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastetext_icon,.cke_ltr.cke_hidpi .cke_button__pastetext_icon {background: url(icons_hidpi.png) no-repeat 0 -720px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__pastefromword_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -744px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__pastefromword_icon,.cke_ltr.cke_hidpi .cke_button__pastefromword_icon {background: url(icons_hidpi.png) no-repeat 0 -768px !important;background-size: 16px !important;}.cke_hidpi .cke_button__removeformat_icon {background: url(icons_hidpi.png) no-repeat 0 -792px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__source_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -816px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__source_icon,.cke_ltr.cke_hidpi .cke_button__source_icon {background: url(icons_hidpi.png) no-repeat 0 -840px !important;background-size: 16px !important;}.cke_hidpi .cke_button__specialchar_icon {background: url(icons_hidpi.png) no-repeat 0 -864px !important;background-size: 16px !important;}.cke_hidpi .cke_button__scayt_icon {background: url(icons_hidpi.png) no-repeat 0 -888px !important;background-size: 16px !important;}.cke_hidpi .cke_button__table_icon {background: url(icons_hidpi.png) no-repeat 0 -912px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__redo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -936px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__redo_icon,.cke_ltr.cke_hidpi .cke_button__redo_icon {background: url(icons_hidpi.png) no-repeat 0 -960px !important;background-size: 16px !important;}.cke_rtl.cke_hidpi .cke_button__undo_icon, .cke_hidpi .cke_mixed_dir_content .cke_rtl .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -984px !important;background-size: 16px !important;}.cke_hidpi .cke_ltr .cke_button__undo_icon,.cke_ltr.cke_hidpi .cke_button__undo_icon {background: url(icons_hidpi.png) no-repeat 0 -1008px !important;background-size: 16px !important;}.cke_hidpi .cke_button__spellchecker_icon {background: url(icons_hidpi.png) no-repeat 0 -1032px !important;background-size: 16px !important;} \ No newline at end of file diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons.png new file mode 100644 index 000000000..c71008d70 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons_hidpi.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons_hidpi.png new file mode 100644 index 000000000..0466c2bcc Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/icons_hidpi.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/arrow.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/arrow.png new file mode 100644 index 000000000..0d1eb39c6 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/arrow.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/close.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/close.png new file mode 100644 index 000000000..04b9c97dd Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/close.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/close.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/close.png new file mode 100644 index 000000000..8abca8e97 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/close.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock-open.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock-open.png new file mode 100644 index 000000000..aa5e740ee Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock-open.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock.png new file mode 100644 index 000000000..5404b063a Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/lock.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/refresh.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/refresh.png new file mode 100644 index 000000000..1ebef3440 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/hidpi/refresh.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock-open.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock-open.png new file mode 100644 index 000000000..3b256c063 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock-open.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock.png new file mode 100644 index 000000000..c127f9ebe Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/lock.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/refresh.png b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/refresh.png new file mode 100644 index 000000000..a1a061c50 Binary files /dev/null and b/widgy/static/widgy/js/lib/ckeditor/skins/moono/images/refresh.png differ diff --git a/widgy/static/widgy/js/lib/ckeditor/skins/moono/readme.md b/widgy/static/widgy/js/lib/ckeditor/skins/moono/readme.md new file mode 100644 index 000000000..d086fe9b7 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/skins/moono/readme.md @@ -0,0 +1,51 @@ +"Moono" Skin +==================== + +This skin has been chosen for the **default skin** of CKEditor 4.x, elected from the CKEditor +[skin contest](http://ckeditor.com/blog/new_ckeditor_4_skin) and further shaped by +the CKEditor team. "Moono" is maintained by the core developers. + +For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK) +documentation. + +Features +------------------- +"Moono" is a monochromatic skin, which offers a modern look coupled with gradients and transparency. +It comes with the following features: + +- Chameleon feature with brightness, +- high-contrast compatibility, +- graphics source provided in SVG. + +Directory Structure +------------------- + +CSS parts: +- **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance, +- **mainui.css**: the file contains styles of entire editor outline structures, +- **toolbar.css**: the file contains styles of the editor toolbar space (top), +- **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar, +- **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded +until the first panel open up, +- **elementspath.css**: the file contains styles of the editor elements path bar (bottom), +- **menu.css**: the file contains styles of all editor menus including context menu and button drop-down, +it's not loaded until the first menu open up, +- **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open, +- **reset.css**: the file defines the basis of style resets among all editor UI spaces, +- **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference, +- **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks. + +Other parts: +- **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature, +- **icons/**: contains all skin defined icons, +- **images/**: contains a fill general used images, +- **dev/**: contains SVG source of the skin icons. + +License +------- + +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. diff --git a/widgy/static/widgy/js/lib/ckeditor/styles.js b/widgy/static/widgy/js/lib/ckeditor/styles.js new file mode 100644 index 000000000..18e4316b0 --- /dev/null +++ b/widgy/static/widgy/js/lib/ckeditor/styles.js @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +// This file contains style definitions that can be used by CKEditor plugins. +// +// The most common use for it is the "stylescombo" plugin, which shows a combo +// in the editor toolbar, containing all styles. Other plugins instead, like +// the div plugin, use a subset of the styles on their feature. +// +// If you don't have plugins that depend on this file, you can simply ignore it. +// Otherwise it is strongly recommended to customize this file to match your +// website requirements and design properly. + +CKEDITOR.stylesSet.add( 'default', [ + /* Block Styles */ + + // These styles are already available in the "Format" combo ("format" plugin), + // so they are not needed here by default. You may enable them to avoid + // placing the "Format" combo in the toolbar, maintaining the same features. + /* + { name: 'Paragraph', element: 'p' }, + { name: 'Heading 1', element: 'h1' }, + { name: 'Heading 2', element: 'h2' }, + { name: 'Heading 3', element: 'h3' }, + { name: 'Heading 4', element: 'h4' }, + { name: 'Heading 5', element: 'h5' }, + { name: 'Heading 6', element: 'h6' }, + { name: 'Preformatted Text',element: 'pre' }, + { name: 'Address', element: 'address' }, + */ + + { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } }, + { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } }, + { + name: 'Special Container', + element: 'div', + styles: { + padding: '5px 10px', + background: '#eee', + border: '1px solid #ccc' + } + }, + + /* Inline Styles */ + + // These are core styles available as toolbar buttons. You may opt enabling + // some of them in the Styles combo, removing them from the toolbar. + // (This requires the "stylescombo" plugin) + /* + { name: 'Strong', element: 'strong', overrides: 'b' }, + { name: 'Emphasis', element: 'em' , overrides: 'i' }, + { name: 'Underline', element: 'u' }, + { name: 'Strikethrough', element: 'strike' }, + { name: 'Subscript', element: 'sub' }, + { name: 'Superscript', element: 'sup' }, + */ + + { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } }, + + { name: 'Big', element: 'big' }, + { name: 'Small', element: 'small' }, + { name: 'Typewriter', element: 'tt' }, + + { name: 'Computer Code', element: 'code' }, + { name: 'Keyboard Phrase', element: 'kbd' }, + { name: 'Sample Text', element: 'samp' }, + { name: 'Variable', element: 'var' }, + + { name: 'Deleted Text', element: 'del' }, + { name: 'Inserted Text', element: 'ins' }, + + { name: 'Cited Work', element: 'cite' }, + { name: 'Inline Quotation', element: 'q' }, + + { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } }, + { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } }, + + /* Object Styles */ + + { + name: 'Styled image (left)', + element: 'img', + attributes: { 'class': 'left' } + }, + + { + name: 'Styled image (right)', + element: 'img', + attributes: { 'class': 'right' } + }, + + { + name: 'Compact table', + element: 'table', + attributes: { + cellpadding: '5', + cellspacing: '0', + border: '1', + bordercolor: '#ccc' + }, + styles: { + 'border-collapse': 'collapse' + } + }, + + { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } }, + { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } } +] ); + diff --git a/widgy/static/widgy/js/lib/csrf.js b/widgy/static/widgy/js/lib/csrf.js new file mode 100644 index 000000000..1d3b75dc1 --- /dev/null +++ b/widgy/static/widgy/js/lib/csrf.js @@ -0,0 +1,54 @@ +define([ 'jquery' ], function(jQuery){ + var $ = jQuery; + // This method came from the Django docs. + // https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax + var csrftoken = (function getCookie(name) { + var cookieValue = null; + if (document.cookie && document.cookie !== '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + })('csrftoken'); + + if (!csrftoken) { + // The CSRF token was not set, perhaps they are using + // CSRF_COOKIE_HTTPONLY. + csrftoken = $('[name=csrfmiddlewaretoken]').val(); + } + + if (!csrftoken) { + console.error( + "Widgy couldn't figure out the CSRF token. It checked two places:\n" + + " - The csrftoken cookie (not available if CSRF_COOKIE_HTTPONLY is set" + + " to True\n" + + " - The csrfmiddlewaretoken hidden input provided by the csrftoken" + + " template tag\n" + + " If you can change neither of these problems, please open an issue on" + + " http://github.com/fusionbox/django-widgy/issues explaining your" + + " situation." + ); + } + + function csrfSafeMethod(method) { + // these HTTP methods do not require CSRF protection + return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); + } + $.ajaxSetup({ + crossDomain: false, // obviates need for sameOrigin test + beforeSend: function(xhr, settings) { + if (!csrfSafeMethod(settings.type)) { + xhr.setRequestHeader("X-CSRFToken", csrftoken); + } + } + }); + + return {}; +}); diff --git a/widgy/static/widgy/js/lib/django_admin.js b/widgy/static/widgy/js/lib/django_admin.js deleted file mode 100644 index 0eac32c83..000000000 --- a/widgy/static/widgy/js/lib/django_admin.js +++ /dev/null @@ -1,214 +0,0 @@ -(function(window, undefined) { - // IE doesn't accept periods or dashes in the window name, but the element IDs - // we use to generate popup window names may contain them, therefore we map them - // to allowed characters in a reversible way so that we can locate the correct - // element when the popup window is dismissed. - function id_to_windowname(text) { - text = text.replace(/\./g, '__dot__'); - text = text.replace(/\-/g, '__dash__'); - return text; - } - - function windowname_to_id(text) { - text = text.replace(/__dot__/g, '.'); - text = text.replace(/__dash__/g, '-'); - return text; - } - - function html_unescape(text) { - // Unescape a string that was escaped using django.utils.html.escape. - text = text.replace(/</g, '<'); - text = text.replace(/>/g, '>'); - text = text.replace(/"/g, '"'); - text = text.replace(/'/g, "'"); - text = text.replace(/&/g, '&'); - return text; - } - var SelectBox = { - cache: {}, - init: function(id) { - var box = document.getElementById(id); - var node; - SelectBox.cache[id] = []; - var cache = SelectBox.cache[id]; - for (var i = 0; (node = box.options[i]); i++) { - cache.push({value: node.value, text: node.text, displayed: 1}); - } - }, - redisplay: function(id) { - // Repopulate HTML select box from cache - var box = document.getElementById(id); - box.options.length = 0; // clear all options - for (var i = 0, j = SelectBox.cache[id].length; i < j; i++) { - var node = SelectBox.cache[id][i]; - if (node.displayed) { - box.options[box.options.length] = new Option(node.text, node.value, false, false); - } - } - }, - filter: function(id, text) { - // Redisplay the HTML select box, displaying only the choices containing ALL - // the words in text. (It's an AND search.) - var tokens = text.toLowerCase().split(/\s+/); - var node, token; - for (var i = 0; (node = SelectBox.cache[id][i]); i++) { - node.displayed = 1; - for (var j = 0; (token = tokens[j]); j++) { - if (node.text.toLowerCase().indexOf(token) == -1) { - node.displayed = 0; - } - } - } - SelectBox.redisplay(id); - }, - delete_from_cache: function(id, value) { - var node, delete_index = null; - for (var i = 0; (node = SelectBox.cache[id][i]); i++) { - if (node.value == value) { - delete_index = i; - break; - } - } - var j = SelectBox.cache[id].length - 1; - for (var i = delete_index; i < j; i++) { - SelectBox.cache[id][i] = SelectBox.cache[id][i+1]; - } - SelectBox.cache[id].length--; - }, - add_to_cache: function(id, option) { - console.log(id); - SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); - }, - cache_contains: function(id, value) { - // Check if an item is contained in the cache - var node; - for (var i = 0; (node = SelectBox.cache[id][i]); i++) { - if (node.value == value) { - return true; - } - } - return false; - }, - move: function(from, to) { - var from_box = document.getElementById(from); - var to_box = document.getElementById(to); - var option; - for (var i = 0; (option = from_box.options[i]); i++) { - if (option.selected && SelectBox.cache_contains(from, option.value)) { - SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); - SelectBox.delete_from_cache(from, option.value); - } - } - SelectBox.redisplay(from); - SelectBox.redisplay(to); - }, - move_all: function(from, to) { - var from_box = document.getElementById(from); - var to_box = document.getElementById(to); - var option; - for (var i = 0; (option = from_box.options[i]); i++) { - if (SelectBox.cache_contains(from, option.value)) { - SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); - SelectBox.delete_from_cache(from, option.value); - } - } - SelectBox.redisplay(from); - SelectBox.redisplay(to); - }, - sort: function(id) { - SelectBox.cache[id].sort( function(a, b) { - a = a.text.toLowerCase(); - b = b.text.toLowerCase(); - try { - if (a > b) return 1; - if (a < b) return -1; - } - catch (e) { - // silently fail on IE 'unknown' exception - } - return 0; - } ); - }, - select_all: function(id) { - var box = document.getElementById(id); - for (var i = 0; i < box.options.length; i++) { - box.options[i].selected = 'selected'; - } - } - }; - - var admin = { - SelectBox: SelectBox, - RelatedObjectLookups: { - - showAddAnotherPopup: function(triggeringLink) { - var name = triggeringLink.id.replace(/^add_/, ''); - var href = triggeringLink.attributes.href.value; - name = id_to_windowname(name); - if (href.indexOf('?') == -1) - href += '?_popup=1'; - else - href += '&_popup=1'; - var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); - win.focus(); - return false; - }, - showRelatedObjectLookupPopup: function(triggeringLink) { - var name = triggeringLink.id.replace(/^lookup_/, ''); - var href = triggeringLink.attributes.href.value; - name = id_to_windowname(name); - if (href.search(/\?/) >= 0) - href += '&pop=1'; - else - href += '?pop=1'; - var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); - win.focus(); - return false; - }, - - dismissRelatedLookupPopup: function(win, chosenId) { - var name = windowname_to_id(win.name); - var elem = document.getElementById(name); - if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { - elem.value += ',' + chosenId; - } else { - document.getElementById(name).value = chosenId; - } - win.close(); - }, - - dismissAddAnotherPopup: function(win, newId, newRepr) { - // newId and newRepr are expected to have previously been escaped by - // django.utils.html.escape. - newId = html_unescape(newId); - newRepr = html_unescape(newRepr); - var name = windowname_to_id(win.name); - var elem = document.getElementById(name); - if (elem) { - var elemName = elem.nodeName.toUpperCase(); - if (elemName == 'SELECT') { - var o = new Option(newRepr, newId); - elem.options[elem.options.length] = o; - o.selected = true; - } else if (elemName == 'INPUT') { - if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { - elem.value += ',' + newId; - } else { - elem.value = newId; - } - } - } else { - var toId = name + "_to"; - elem = document.getElementById(toId); - var o = new Option(newRepr, newId); - SelectBox.add_to_cache(toId, o); - SelectBox.redisplay(toId); - } - win.close(); - } - } -}; - if ( typeof window.define === "function" && window.define.amd ) { - window.define( "django_admin", [], function () { return admin; } ); - } -})(window); diff --git a/widgy/static/widgy/js/lib/fixto.js b/widgy/static/widgy/js/lib/fixto.js new file mode 100644 index 000000000..41a3c6481 --- /dev/null +++ b/widgy/static/widgy/js/lib/fixto.js @@ -0,0 +1,392 @@ +define(['jquery'], function($) { + /*! fixto - v0.1.7 - 2013-02-02 + * http://github.com/bbarakaci/fixto/*/ + // Start Computed Style. Please do not modify this module here. Modify it from its own repo. See address below. + + /*! Computed Style - v0.1.0 - 2012-07-19 + * https://github.com/bbarakaci/computed-style + * Copyright (c) 2012 Burak Barakaci; Licensed MIT */ + var computedStyle = (function() { + var computedStyle = { + getAll : function(element){ + return document.defaultView.getComputedStyle(element); + }, + get : function(element, name){ + return this.getAll(element)[name]; + }, + toFloat : function(value){ + return parseFloat(value, 10) || 0; + }, + getFloat : function(element,name){ + return this.toFloat(this.get(element, name)); + }, + _getAllCurrentStyle : function(element) { + return element.currentStyle; + } + }; + + if (document.documentElement.currentStyle) { + computedStyle.getAll = computedStyle._getAllCurrentStyle; + } + + return computedStyle; + + }()); + + // End Computed Style. Modify whatever you want to. + + var mimicNode = (function(){ + /* + Class Mimic Node + Dependency : Computed Style + Tries to mimick a dom node taking his styles, dimensions. May go to his repo if gets mature. + */ + + function MimicNode(element) { + this.element = element; + this.replacer = document.createElement('div'); + this.replacer.style.visibility = 'hidden'; + this.hide(); + element.parentNode.insertBefore(this.replacer, element); + } + + MimicNode.prototype = { + replace : function(){ + var rst = this.replacer.style; + var styles = computedStyle.getAll(this.element); + + // rst.width = computedStyle.width(this.element) + 'px'; + // rst.height = this.element.offsetHeight + 'px'; + + // Setting offsetWidth + rst.width = this._width(); + rst.height = this._height(); + + // Adobt margins + rst.marginTop = styles.marginTop; + rst.marginBottom = styles.marginBottom; + rst.marginLeft = styles.marginLeft; + rst.marginRight = styles.marginRight; + + // Adopt positioning + rst.cssFloat = styles.cssFloat; + rst.styleFloat = styles.styleFloat; //ie8; + rst.position = styles.position; + rst.top = styles.top; + rst.right = styles.right; + rst.bottom = styles.bottom; + rst.left = styles.left; + // rst.borderStyle = styles.borderStyle; + + rst.display = styles.display; + + }, + + hide: function () { + this.replacer.style.display = 'none'; + }, + + _width : function(){ + return this.element.getBoundingClientRect().width + 'px'; + }, + + _widthOffset : function(){ + return this.element.offsetWidth + 'px'; + }, + + _height : function(){ + return this.element.getBoundingClientRect().height + 'px'; + }, + + _heightOffset : function(){ + return this.element.offsetHeight + 'px'; + }, + + destroy: function () { + $(this.replacer).remove(); + + // set properties to null to break references + for (var prop in this) { + if (this.hasOwnProperty(prop)) { + this[prop] = null; + } + } + } + }; + + var bcr = document.documentElement.getBoundingClientRect(); + if(!bcr.width){ + MimicNode.prototype._width = MimicNode.prototype._widthOffset; + MimicNode.prototype._height = MimicNode.prototype._heightOffset; + } + + return { + MimicNode:MimicNode, + computedStyle:computedStyle + }; + }()); + + // Dirty business + var ie = window.navigator.appName === 'Microsoft Internet Explorer'; + var ieversion; + + if(ie){ + ieversion = parseFloat(window.navigator.appVersion.split("MSIE")[1]); + } + + // Class FixToContainer + + function FixToContainer(child, parent, options) { + this.child = child; + this._$child = $(child); + this.parent = parent; + this._replacer = new mimicNode.MimicNode(child); + this._ghostNode = this._replacer.replacer; + this.options = $.extend({ + className: 'fixto-fixed' + }, options); + if(this.options.mind) { + this._$mind = $(this.options.mind); + } + if(this.options.zIndex) { + this.child.style.zIndex = this.options.zIndex; + } + + this._saveStyles(); + + this._saveViewportHeight(); + + // Create anonymous functions and keep references to register and unregister events. + this._proxied_onscroll = this._bind(this._onscroll, this); + this._proxied_onresize = this._bind(this._onresize, this); + + + + this.start(); + } + + FixToContainer.prototype = { + + // Returns an anonymous function that will call the given function in the given context + _bind : function (fn, context) { + return function () { + return fn.call(context); + }; + }, + + // at ie8 maybe only in vm window resize event fires everytime an element is resized. + _toresize : ieversion===8 ? document.documentElement : window, + + // Returns the total outerHeight of the elements passed to mind option. Will return 0 if none. + _mindtop: function () { + var top = 0; + if(this._$mind) { + $(this._$mind).each(function () { + top += $(this).outerHeight(true); + }); + } + return top; + }, + + _onscroll: function _onscroll() { + this._scrollTop = document.documentElement.scrollTop || document.body.scrollTop; + this._parentBottom = (this.parent.offsetHeight + this._fullOffset('offsetTop', this.parent)) - computedStyle.getFloat(this.parent, 'paddingBottom'); + if (!this.fixed) { + if ( + this._scrollTop < this._parentBottom && + this._scrollTop > (this._fullOffset('offsetTop', this.child) - computedStyle.getFloat(this.child, 'marginTop') - this._mindtop()) && + this._viewportHeight > (this.child.offsetHeight + computedStyle.getFloat(this.child, 'marginTop') + computedStyle.getFloat(this.child, 'marginBottom')) + ) { + this._fix(); + this._adjust(); + } + } else { + if (this._scrollTop > this._parentBottom || this._scrollTop < (this._fullOffset('offsetTop', this._ghostNode) - computedStyle.getFloat(this._ghostNode, 'marginTop') - this._mindtop())) { + this._unfix(); + return; + } + this._adjust(); + } + }, + + _adjust: function _adjust() { + var diff = (this._parentBottom - this._scrollTop) - (this.child.offsetHeight + computedStyle.getFloat(this.child, 'marginTop') + computedStyle.getFloat(this.child, 'marginBottom') + this._mindtop()); + var mindTop = this._mindtop(); + if (diff < 0) { + this.child.style.top = (diff + mindTop) + 'px'; + } + else { + this.child.style.top = (0 + mindTop) + 'px'; + } + }, + + /* + I need some performance on calculating offset as it is called a lot of times. + This function calculates cumulative offsetTop way faster than jQuery $.offset + todo: check vs getBoundingClientRect + */ + + _fullOffset: function _fullOffset(offsetName, elm) { + var offset = elm[offsetName]; + while (elm.offsetParent !== null) { + elm = elm.offsetParent; + offset = offset + elm[offsetName]; + } + return offset; + }, + + _fix: function _fix() { + var child = this.child, + childStyle = child.style; + this._saveStyles(); + + if(document.documentElement.currentStyle){ + var styles = computedStyle.getAll(child); + childStyle.left = (this._fullOffset('offsetLeft', child) - computedStyle.getFloat(child, 'marginLeft')) + 'px'; + // Function for ie<9. when hasLayout is not triggered in ie7, he will report currentStyle as auto, clientWidth as 0. Thus using offsetWidth. + childStyle.width = (child.offsetWidth) - (computedStyle.toFloat(styles.paddingLeft) + computedStyle.toFloat(styles.paddingRight) + computedStyle.toFloat(styles.borderLeftWidth) + computedStyle.toFloat(styles.borderRightWidth)) + 'px'; + } + else { + childStyle.width = computedStyle.get(child, 'width'); + childStyle.left = (child.getBoundingClientRect().left - computedStyle.getFloat(child, 'marginLeft')) + 'px'; + } + + this._replacer.replace(); + childStyle.position = 'fixed'; + childStyle.top = this._mindtop() + 'px'; + this._$child.addClass(this.options.className); + this.fixed = true; + }, + + _unfix: function _unfix() { + var childStyle = this.child.style; + this._replacer.hide(); + childStyle.position = this._childOriginalPosition; + childStyle.top = this._childOriginalTop; + childStyle.width = this._childOriginalWidth; + childStyle.left = this._childOriginalLeft; + this._$child.removeClass(this.options.className); + this.fixed = false; + }, + + _saveStyles: function(){ + var childStyle = this.child.style; + this._childOriginalPosition = childStyle.position; + this._childOriginalTop = childStyle.top; + this._childOriginalWidth = childStyle.width; + this._childOriginalLeft = childStyle.left; + }, + + _onresize: function () { + this._saveViewportHeight(); + this._unfix(); + this._onscroll(); + }, + + _saveViewportHeight: function () { + // ie8 doesn't support innerHeight + this._viewportHeight = window.innerHeight || document.documentElement.clientHeight; + }, + + // Public method to stop the behaviour of this instance. + stop: function () { + + // Unfix the container immediately. + this._unfix(); + + // remove event listeners + $(window).unbind('scroll', this._proxied_onscroll); + $(this._toresize).unbind('resize', this._proxied_onresize); + + this._running = false; + }, + + // Public method starts the behaviour of this instance. + start: function () { + + // Start only if it is not running not to attach event listeners multiple times. + if(!this._running) { + + // Trigger onscroll to have the effect immediately. + this._onscroll(); + + // Attach event listeners + $(window).bind('scroll', this._proxied_onscroll); + $(this._toresize).bind('resize', this._proxied_onresize); + + this._running = true; + } + }, + + //Public method to destroy fixto behaviour + destroy: function () { + this.stop(); + + // Remove jquery data from the element + this._$child.removeData('fixto-instance'); + + // Destroy mimic node instance + this._replacer.destroy(); + + // set properties to null to break references + for (var prop in this) { + if (this.hasOwnProperty(prop)) { + this[prop] = null; + } + } + } + + }; + + var fixTo = function fixTo(childElement, parentElement, options) { + return new FixToContainer(childElement, parentElement, options); + }; + + /* + No support for touch devices and ie lt 8 + */ + var touch = !!('ontouchstart' in window); + + if(touch || ieversion<8){ + fixTo = function(){ + return 'not supported'; + }; + } + + // Let it be a jQuery Plugin + $.fn.fixTo = function (targetSelector, options) { + + var $targets = $(targetSelector); + + var i = 0; + return this.each(function () { + + // Check the data of the element. + var instance = $(this).data('fixto-instance'); + + // If the element is not bound to an instance, create the instance and save it to elements data. + if(!instance) { + $(this).data('fixto-instance', fixTo(this, $targets[i], options)); + } + else { + // If we already have the instance here, expect that targetSelector parameter will be a string + // equal to a public methods name. Run the method on the instance without checking if + // it exists or it is a public method or not. Cause nasty errors when necessary. + var method = targetSelector; + instance[method].call(instance); + } + i++; + }); + }; + + /* + Expose + */ + + return { + FixToContainer: FixToContainer, + fixTo: fixTo, + computedStyle:computedStyle, + mimicNode:mimicNode + }; +}); diff --git a/widgy/static/widgy/js/lib/fusionbox.js b/widgy/static/widgy/js/lib/fusionbox.js deleted file mode 100644 index 671b5d675..000000000 --- a/widgy/static/widgy/js/lib/fusionbox.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Fusionbox class - * - * Provides helper methods and other things for working with JavaScript - * and Django - */ - -;(function($, exports, undefined) { - var safe_methods_re = /^(GET|HEAD|OPTIONS|TRACE)$/ - , http_or_https_re = /^(\/\/|http:|https:).*/; - - var Fusionbox = function() { - this.csrf_token = this.getCookie('csrftoken'); - - // when the document is ready, call onload. - $(this.onload); - }; - - Fusionbox.prototype = { - - onload: function() {}, - - // This method came from the Django docs. - // https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax - getCookie: function(name) { - var cookieValue; - - if (document.cookie && document.cookie != '') { - var cookies = document.cookie.split(';'); - for (var i = 0, len = cookies.length; i < len; i++) { - var cookie = $.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; - }, - - // This method came from the Django docs. - // https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax - sameOrigin: function(url) { - // url could be relative or scheme relative or absolute - var host = document.location.host // host + port - , protocol = document.location.protocol - , sr_origin = '//' + host - , origin = protocol + sr_origin; - - // Allow absolute or scheme relative URLs to same origin - return (url == origin || url.slice(0, origin.length + 1) == origin + '/') - || (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') - // or any other URL that isn't scheme relative or absolute i.e relative. - || !(http_or_https_re.test(url)); - }, - - // This method came from the Django docs. - // https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax - safeMethod: function(method) { - return (safe_methods_re.test(method)); - } - }; - - - var fusionbox = exports.fusionbox = new Fusionbox(); - - // This method came from the Django docs. - // https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax - $(document).ajaxSend(function(event, xhr, settings) { - if (!fusionbox.safeMethod(settings.type) && fusionbox.sameOrigin(settings.url)) { - xhr.setRequestHeader("X-CSRFToken", fusionbox.csrf_token); - } - }); - - - /** - * jQuery Plugins - */ - $.fn.serializeObject = function() - { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; - }; - -})(jQuery, window); diff --git a/widgy/static/widgy/js/lib/jquery.form.js b/widgy/static/widgy/js/lib/jquery.form.js new file mode 100644 index 000000000..3a7f50e6c --- /dev/null +++ b/widgy/static/widgy/js/lib/jquery.form.js @@ -0,0 +1,1132 @@ +/*! + * jQuery Form Plugin + * version: 3.25.0-2013.01.18 + * @requires jQuery v1.5 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses: + * http://malsup.github.com/mit-license.txt + * http://malsup.github.com/gpl-license-v2.txt + */ +/*global ActiveXObject alert */ +;(function($) { +"use strict"; + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * Feature detection + */ +var feature = {}; +feature.fileapi = $("").get(0).files !== undefined; +feature.formdata = window.FormData !== undefined; + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + /*jshint scripturl:true */ + + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + var method, action, url, $form = this; + + if (typeof options == 'function') { + options = { success: options }; + } + + method = this.attr('method'); + action = this.attr('action'); + url = (typeof action === 'string') ? $.trim(action) : ''; + url = url || window.location.href || ''; + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + + options = $.extend(true, { + url: url, + success: $.ajaxSettings.success, + type: method || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var traditional = options.traditional; + if ( traditional === undefined ) { + traditional = $.ajaxSettings.traditional; + } + + var elements = []; + var qx, a = this.formToArray(options.semantic, elements); + if (options.data) { + options.extraData = options.data; + qx = $.param(options.data, traditional); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a, traditional); + if (qx) { + q = ( q ? (q + '&' + qx) : qx ); + } + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(options.includeHidden); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || this ; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + // are there files to upload? + + // [value] (issue #113), also see comment: + // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219 + var fileInputs = $('input[type=file]:enabled[value!=""]', this); + + var hasFileInputs = fileInputs.length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + var fileAPI = feature.fileapi && feature.formdata; + log("fileAPI :" + fileAPI); + var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; + + var jqxhr; + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (options.iframe || shouldUseFrame)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + jqxhr = fileUploadIframe(a); + }); + } + else { + jqxhr = fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + jqxhr = fileUploadXhr(a); + } + else { + jqxhr = $.ajax(options); + } + + $form.removeData('jqxhr').data('jqxhr', jqxhr); + + // clear element array + for (var k=0; k < elements.length; k++) + elements[k] = null; + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + // utility fn for deep serialization + function deepSerialize(extraData){ + var serialized = $.param(extraData).split('&'); + var len = serialized.length; + var result = {}; + var i, part; + for (i=0; i < len; i++) { + // #252; undo param space replacement + serialized[i] = serialized[i].replace(/\+/g,' '); + part = serialized[i].split('='); + result[decodeURIComponent(part[0])] = decodeURIComponent(part[1]); + } + return result; + } + + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + function fileUploadXhr(a) { + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + var serializedData = deepSerialize(options.extraData); + for (var p in serializedData) + if (serializedData.hasOwnProperty(p)) + formdata.append(p, serializedData[p]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: method || 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.onprogress = function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }; + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(this, xhr, o); + }; + return $.ajax(s); + } + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUploadIframe(a) { + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var useProp = !!$.fn.prop; + var deferred = $.Deferred(); + + if ($('[name=submit],[id=submit]', form).length) { + // if there is an input with a name or id of 'submit' then we won't be + // able to invoke the submit fn on the form (at least not x-browser) + alert('Error: Form elements must not have name or id of "submit".'); + deferred.reject(); + return deferred; + } + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( useProp ) + el.prop('disabled', false); + else + el.removeAttr('disabled'); + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr('name'); + if (!n) + $io.attr('name', id); + else + id = n; + } + else { + $io = $('