+++ /dev/null
-from django.contrib import admin
-
-# Register your models here.
+++ /dev/null
-# -*- coding: utf-8 -*-
-import json
-
-from django.contrib.sites.models import Site
-from django.core.urlresolvers import reverse
-from django.utils.functional import lazy
-from piston.handler import BaseHandler
-from piston.utils import rc
-
-from catalogue.forms import LessonImportForm
-from catalogue.models import Lesson
-
-API_BASE = EDUMED_BASE = MEDIA_BASE = lazy(
- lambda: u'https://' + Site.objects.get_current().domain, unicode)()
-
-
-class LessonDetails(object):
- """Custom fields used for representing Lessons."""
-
- @classmethod
- def href(cls, lesson):
- """ Returns an URI for a Lesson in the API. """
- return API_BASE + reverse("api_lesson", args=[lesson.slug])
-
- @classmethod
- def url(cls, lesson):
- """ Returns Lesson's URL on the site. """
- return EDUMED_BASE + lesson.get_absolute_url()
-
-
-class LessonDetailHandler(BaseHandler, LessonDetails):
- """ Main handler for Lesson objects.
-
- Responsible for single Lesson details.
- """
- allowed_methods = ['GET']
- fields = ['title', 'url']
-
- def read(self, request, lesson):
- """ Returns details of a lesson, identified by a slug. """
- try:
- return Lesson.objects.get(slug=lesson)
- except Lesson.DoesNotExist:
- return rc.NOT_FOUND
-
-
-class LessonsHandler(LessonDetailHandler):
- allowed_methods = ('GET', 'POST')
- model = Lesson
- fields = ['href', 'title', 'url']
-
- def create(self, request, *args, **kwargs):
- if not request.user.has_perm('catalogue.add_lesson'):
- return rc.FORBIDDEN
-
- data = json.loads(request.POST.get('data'))
- form = LessonImportForm(data)
- if form.is_valid():
- form.save()
- return rc.CREATED
- else:
- return rc.NOT_FOUND
+++ /dev/null
-# -*- coding: utf-8 -*-
-from piston.resource import Resource
-
-
-class CsrfExemptResource(Resource):
- """A Custom Resource that is csrf exempt"""
- def __init__(self, handler, authentication=None):
- super(CsrfExemptResource, self).__init__(handler, authentication)
- self.csrf_exempt = getattr(self.handler, 'csrf_exempt', True)
\ No newline at end of file
+++ /dev/null
-from django.db import models
-
-# Create your models here.
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-
-{% block titleextra %}Zezwól na dostęp do Edukacji Medialnej{% endblock %}
-
-{% block body %}
- <h1>Zezwól na dostęp do Edukacji Medialnej</h1>
-
- <div class="normal-text">
- <p>
- Potwierdź dostęp do Edukacji Medialnej jako użytkownik <strong>{{ user }}</strong>.
- </p>
-
- <form action="{% url 'piston.authentication.oauth_user_auth' %}" method="POST">
- {% csrf_token %}
- {{ form.as_p }}
- <button type="submit">Potwierdź</button>
- </form>
- </div>
-{% endblock %}
+++ /dev/null
-from django.test import TestCase
-
-# Create your tests here.
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, url
-from django.views.decorators.csrf import csrf_exempt
-from piston.authentication import OAuthAuthentication, oauth_access_token
-from piston.resource import Resource
-
-from api import handlers
-from api.helpers import CsrfExemptResource
-
-auth = OAuthAuthentication(realm="Edukacja Medialna")
-
-lesson_list_resource = CsrfExemptResource(handler=handlers.LessonsHandler, authentication=auth)
-lesson_resource = Resource(handler=handlers.LessonDetailHandler)
-
-urlpatterns = patterns(
- 'piston.authentication',
- url(r'^oauth/request_token/$', 'oauth_request_token'),
- url(r'^oauth/authorize/$', 'oauth_user_auth'),
- url(r'^oauth/access_token/$', csrf_exempt(oauth_access_token)),
-)
-
-urlpatterns += patterns(
- '',
- # url(r'^$', TemplateView.as_view(template_name='api/main.html'), name='api'),
-
- # objects details
- url(r'^lessons/(?P<lesson>[a-z0-9-]+)/$', lesson_resource, name="api_lesson"),
-
- # lessons
- url(r'^lessons/$', lesson_list_resource, name='api_lesson_list'),
-)
+++ /dev/null
-from django.shortcuts import render
-
-# Create your views here.
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.contrib import admin
-from .models import Attachment, Section, Lesson, LessonStub
-
-
-class AttachmentInline(admin.TabularInline):
- model = Attachment
-
-
-class LessonAdmin(admin.ModelAdmin):
- inlines = [AttachmentInline]
- list_display = ['title', 'section', 'type']
- list_filter = ['level', 'type']
-
-admin.site.register(Section)
-admin.site.register(Lesson, LessonAdmin)
-admin.site.register(LessonStub)
+++ /dev/null
-# -*- coding: utf-8 -*-
-import json
-import os.path
-import shutil
-import urllib
-from tempfile import mkdtemp
-
-from django.forms import Form, CharField
-
-from librarian import IOFile
-from catalogue.models import Lesson
-
-
-class LessonImportForm(Form):
- lesson_xml = CharField()
- gallery_url = CharField(required=False)
- attachments = CharField(required=False)
-
- def save(self):
- temp_dir = mkdtemp()
- attachment_names = json.loads(self.cleaned_data['attachments'])
- attachments = {}
- remote_gallery_url = self.cleaned_data['gallery_url']
- if remote_gallery_url and attachment_names:
- for attachment_name in attachment_names:
- attachment_url = ('%s%s' % (remote_gallery_url, attachment_name)).encode('utf-8')
- temp_filename = os.path.join(temp_dir, attachment_name)
- urllib.urlretrieve(attachment_url, temp_filename)
- attachments[attachment_name] = IOFile.from_filename(temp_filename)
-
- lesson = Lesson.publish(
- IOFile.from_string(self.cleaned_data['lesson_xml'], attachments=attachments))
- if os.path.isdir(temp_dir):
- shutil.rmtree(temp_dir)
- return lesson
+++ /dev/null
-# -*- coding: utf-8 -*-
-# This file is part of EduMed, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-import os
-import sys
-from optparse import make_option
-
-from django.core.management.base import BaseCommand
-from django.db import transaction
-
-from catalogue.models import Lesson, Section
-from librarian import IOFile
-
-
-class Command(BaseCommand):
- option_list = BaseCommand.option_list + (
- make_option('-q', '--quiet', action='store_false', dest='verbose', default=True,
- help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
- make_option('-a', '--attachments', dest='attachments', metavar="PATH", default='materialy',
- help='Attachments dir path.'),
- make_option('--ignore-incomplete', action='store_true', dest='ignore_incomplete', default=False,
- help='Attachments dir path.'),
- )
- help = 'Imports lessons from the specified directories.'
- args = 'directory [directory ...]'
-
- def __init__(self):
- super(Command, self).__init__()
- self.options = None
- self.levels = None
-
- @staticmethod
- def all_attachments(path):
- files = {}
- if not os.path.isdir(path):
- return files
-
- def read_dir(path):
- for name in os.listdir(path):
- fullname = os.path.join(path, name)
- if os.path.isdir(fullname):
- read_dir(fullname)
- else:
- f = IOFile.from_filename(fullname)
- files[name.decode('utf-8')] = f
- files.setdefault(name.replace(" ", "").decode('utf-8'), f)
-
- read_dir(path)
- return files
-
- @transaction.atomic
- def handle(self, *directories, **options):
-
- self.levels = set()
-
- curdir = os.path.abspath(os.curdir)
- self.options = options
-
- files_imported = 0
- files_skipped = 0
-
- for dir_name in directories:
- abs_dir = os.path.join(curdir, dir_name)
- if not os.path.isdir(abs_dir):
- print self.style.ERROR("%s: Not a directory. Skipping." % abs_dir)
- else:
- files_imported_dir, files_skipped_dir = self.import_from_dir(abs_dir)
- files_imported += files_imported_dir
- files_skipped += files_skipped_dir
-
- if self.levels:
- print "Rebuilding level packages:"
- for level in self.levels:
- print level.name
- level.build_packages()
-
- # Print results
- print
- print "Results: %d files imported, %d skipped, %d total." % (
- files_imported, files_skipped, files_imported + files_skipped)
- print
-
- def import_from_dir(self, abs_dir):
- verbose = self.options.get('verbose')
- files_imported = 0
- files_skipped = 0
- att_dir = os.path.join(abs_dir, self.options['attachments'])
- attachments = self.all_attachments(att_dir)
- # files queue
- files = sorted(os.listdir(abs_dir))
- postponed = {}
- ignore_incomplete = set()
- while files:
- file_name = files.pop(0)
- file_path = os.path.join(abs_dir, file_name)
- file_base, ext = os.path.splitext(file_path)
-
- if os.path.isdir(file_path):
- dir_imported, dir_skipped = self.import_from_dir(file_path)
- files_imported += dir_imported
- files_skipped += files_skipped
- continue
-
- # Skip files that are not XML files
- if not ext == '.xml':
- continue
-
- if verbose > 0:
- print "Parsing '%s'" % file_path
- else:
- sys.stdout.write('.')
- sys.stdout.flush()
-
- try:
- iofile = IOFile.from_filename(file_path)
- iofile.attachments = attachments
- lesson = Lesson.publish(iofile, file_name in ignore_incomplete)
- except Section.IncompleteError:
- if file_name not in postponed or postponed[file_name] < files_imported:
- # Push it back into the queue, maybe the missing lessons will show up.
- if verbose > 0:
- print self.style.NOTICE('Waiting for missing lessons.')
- files.append(file_name)
- postponed[file_name] = files_imported
- elif self.options['ignore_incomplete'] and file_name not in ignore_incomplete:
- files.append(file_name)
- ignore_incomplete.add(file_name)
- postponed[file_name] = files_imported
- else:
- # We're in a loop, nothing's being imported - some lesson is really missing.
- raise
- except BaseException:
- import traceback
- traceback.print_exc()
- files_skipped += 1
- else:
- files_imported += 1
- if hasattr(lesson, 'level'):
- self.levels.add(lesson.level)
- finally:
- if verbose > 0:
- print
- return files_imported, files_skipped
+++ /dev/null
-# -*- coding: utf-8 -*-
-# This file is part of EduMed, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-from django.core.management.base import BaseCommand
-
-
-class Command(BaseCommand):
- help = 'Rebuilds downloadable packages.'
-
- def handle(self, **options):
- from curriculum.models import Level
-
- for level in Level.objects.all():
- level.build_packages()
+++ /dev/null
-# -*- 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 'Section'
- db.create_table('catalogue_section', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ))
- db.send_create_signal('catalogue', ['Section'])
-
- # Adding model 'Lesson'
- db.create_table('catalogue_lesson', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Section'])),
- ('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Level'])),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
- ('depth', self.gf('django.db.models.fields.IntegerField')()),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ('xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ('package', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ('student_package', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ('html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ))
- db.send_create_signal('catalogue', ['Lesson'])
-
-
- def backwards(self, orm):
- # Deleting model 'Section'
- db.delete_table('catalogue_section')
-
- # Deleting model 'Lesson'
- db.delete_table('catalogue_lesson')
-
-
- models = {
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
- },
- 'catalogue.section': {
- 'Meta': {'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Section.slug'
- db.add_column('catalogue_section', 'slug',
- self.gf('django.db.models.fields.SlugField')(default='x', max_length=50),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Section.slug'
- db.delete_column('catalogue_section', 'slug')
-
-
- models = {
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
- },
- 'catalogue.section': {
- 'Meta': {'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Lesson.xml_file'
- db.alter_column('catalogue_lesson', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.student_package'
- db.alter_column('catalogue_lesson', 'student_package', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.package'
- db.alter_column('catalogue_lesson', 'package', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.html_file'
- db.alter_column('catalogue_lesson', 'html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
- # Adding unique constraint on 'Section', fields ['title']
- db.create_unique('catalogue_section', ['title'])
-
- # Adding unique constraint on 'Section', fields ['slug']
- db.create_unique('catalogue_section', ['slug'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Section', fields ['slug']
- db.delete_unique('catalogue_section', ['slug'])
-
- # Removing unique constraint on 'Section', fields ['title']
- db.delete_unique('catalogue_section', ['title'])
-
-
- # User chose to not deal with backwards NULL issues for 'Lesson.xml_file'
- raise RuntimeError("Cannot reverse this migration. 'Lesson.xml_file' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Lesson.student_package'
- raise RuntimeError("Cannot reverse this migration. 'Lesson.student_package' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Lesson.package'
- raise RuntimeError("Cannot reverse this migration. 'Lesson.package' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Lesson.html_file'
- raise RuntimeError("Cannot reverse this migration. 'Lesson.html_file' and its values cannot be restored.")
-
- models = {
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Part'
- db.create_table('catalogue_part', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('lesson', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Lesson'])),
- ('pdf', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True)),
- ('student_pdf', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True)),
- ))
- db.send_create_signal('catalogue', ['Part'])
-
- # Adding model 'Attachment'
- db.create_table('catalogue_attachment', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('lesson', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Lesson'])),
- ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ))
- db.send_create_signal('catalogue', ['Attachment'])
-
- # Adding field 'Lesson.pdf'
- db.add_column('catalogue_lesson', 'pdf',
- self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Lesson.student_pdf'
- db.add_column('catalogue_lesson', 'student_pdf',
- self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting model 'Part'
- db.delete_table('catalogue_part')
-
- # Deleting model 'Attachment'
- db.delete_table('catalogue_attachment')
-
- # Deleting field 'Lesson.pdf'
- db.delete_column('catalogue_lesson', 'pdf')
-
- # Deleting field 'Lesson.student_pdf'
- db.delete_column('catalogue_lesson', 'student_pdf')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'object_name': 'Attachment'},
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Lesson.dc'
- db.add_column('catalogue_lesson', 'dc',
- self.gf('jsonfield.fields.JSONField')(default='{}'),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Lesson.dc'
- db.delete_column('catalogue_lesson', 'dc')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'object_name': 'Attachment'},
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Attachment.slug'
- db.add_column('catalogue_attachment', 'slug',
- self.gf('django.db.models.fields.CharField')(default='', max_length=255),
- keep_default=False)
-
- # Adding field 'Attachment.ext'
- db.add_column('catalogue_attachment', 'ext',
- self.gf('django.db.models.fields.CharField')(default='', max_length=15),
- keep_default=False)
-
- # Adding unique constraint on 'Attachment', fields ['ext', 'lesson', 'slug']
- db.create_unique('catalogue_attachment', ['ext', 'lesson_id', 'slug'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Attachment', fields ['ext', 'lesson', 'slug']
- db.delete_unique('catalogue_attachment', ['ext', 'lesson_id', 'slug'])
-
- # Deleting field 'Attachment.slug'
- db.delete_column('catalogue_attachment', 'slug')
-
- # Deleting field 'Attachment.ext'
- db.delete_column('catalogue_attachment', 'ext')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'depth', 'order']", 'object_name': 'Lesson'},
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Lesson.type'
- db.add_column('catalogue_lesson', 'type',
- self.gf('django.db.models.fields.CharField')(default='course', max_length=15, db_index=True),
- keep_default=False)
-
- # Changing field 'Lesson.section'
- db.alter_column('catalogue_lesson', 'section_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Section'], null=True))
- # Adding index on 'Lesson', fields ['order']
- db.create_index('catalogue_lesson', ['order'])
-
- if not db.dry_run:
- orm.Lesson.objects.filter(depth=0).update(type='synthetic')
-
-
- def backwards(self, orm):
- # Removing index on 'Lesson', fields ['order']
- db.delete_index('catalogue_lesson', ['order'])
-
- # Deleting field 'Lesson.type'
- db.delete_column('catalogue_lesson', 'type')
-
- section = 0
- if not db.dry_run:
- orm.Lesson.objects.filter(type='synthetic').update(depth=0)
- try:
- section = orm.Section.objects.all()[0]
- except orm.Section.DoesNotExist:
- pass
-
- # Changing field 'Lesson.section'
- db.alter_column('catalogue_lesson', 'section_id',
- self.gf('django.db.models.fields.related.ForeignKey')(default=section, to=orm['catalogue.Section']))
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'depth': ('django.db.models.fields.IntegerField', [], {}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
+++ /dev/null
-# -*- 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 field 'Lesson.depth'
- db.delete_column('catalogue_lesson', 'depth')
-
-
- def backwards(self, orm):
- # Adding field 'Lesson.depth'
- db.add_column('catalogue_lesson', 'depth',
- self.gf('django.db.models.fields.IntegerField')(default=1),
- keep_default=False)
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
+++ /dev/null
-# -*- 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 'Section.xml_file'
- db.add_column('catalogue_section', 'xml_file',
- self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Section.xml_file'
- db.delete_column('catalogue_section', 'xml_file')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 M2M table for field curriculum_courses on 'Lesson'
- db.create_table('catalogue_lesson_curriculum_courses', (
- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
- ('lesson', models.ForeignKey(orm['catalogue.lesson'], null=False)),
- ('curriculumcourse', models.ForeignKey(orm['curriculum.curriculumcourse'], null=False))
- ))
- db.create_unique('catalogue_lesson_curriculum_courses', ['lesson_id', 'curriculumcourse_id'])
-
-
- def backwards(self, orm):
- # Removing M2M table for field curriculum_courses on 'Lesson'
- db.delete_table('catalogue_lesson_curriculum_courses')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['curriculum.CurriculumCourse']", 'symmetrical': 'False'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'curriculum.curriculumcourse': {
- 'Meta': {'object_name': 'CurriculumCourse'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Lesson.xml_file'
- db.alter_column('catalogue_lesson', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.student_pdf'
- db.alter_column('catalogue_lesson', 'student_pdf', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.student_package'
- db.alter_column('catalogue_lesson', 'student_package', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.package'
- db.alter_column('catalogue_lesson', 'package', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.html_file'
- db.alter_column('catalogue_lesson', 'html_file', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.pdf'
- db.alter_column('catalogue_lesson', 'pdf', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Lesson.slug'
- db.alter_column('catalogue_lesson', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255))
-
- # Changing field 'Section.xml_file'
- db.alter_column('catalogue_section', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True))
-
- # Changing field 'Section.slug'
- db.alter_column('catalogue_section', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255))
-
- def backwards(self, orm):
-
- # Changing field 'Lesson.xml_file'
- db.alter_column('catalogue_lesson', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.student_pdf'
- db.alter_column('catalogue_lesson', 'student_pdf', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.student_package'
- db.alter_column('catalogue_lesson', 'student_package', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.package'
- db.alter_column('catalogue_lesson', 'package', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.html_file'
- db.alter_column('catalogue_lesson', 'html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.pdf'
- db.alter_column('catalogue_lesson', 'pdf', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Lesson.slug'
- db.alter_column('catalogue_lesson', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True))
-
- # Changing field 'Section.xml_file'
- db.alter_column('catalogue_section', 'xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True))
-
- # Changing field 'Section.slug'
- db.alter_column('catalogue_section', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True))
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['curriculum.CurriculumCourse']", 'symmetrical': 'False'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- 'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'LessonStub'
- db.create_table('catalogue_lessonstub', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Section'], null=True, blank=True)),
- ('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Level'])),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('type', self.gf('django.db.models.fields.CharField')(max_length=15, db_index=True)),
- ('order', self.gf('django.db.models.fields.IntegerField')(db_index=True)),
- ))
- db.send_create_signal('catalogue', ['LessonStub'])
-
-
- def backwards(self, orm):
- # Deleting model 'LessonStub'
- db.delete_table('catalogue_lessonstub')
-
-
- models = {
- 'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['curriculum.CurriculumCourse']", 'symmetrical': 'False'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.lessonstub': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'LessonStub'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'})
- },
- 'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- 'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- 'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Section.image'
- db.add_column(u'catalogue_section', 'image',
- self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Section.image'
- db.delete_column(u'catalogue_section', 'image')
-
-
- models = {
- u'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.lessonstub': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'LessonStub'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'})
- },
- u'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Section.summary'
- db.add_column(u'catalogue_section', 'summary',
- self.gf('django.db.models.fields.TextField')(null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Section.summary'
- db.delete_column(u'catalogue_section', 'summary')
-
-
- models = {
- u'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.lessonstub': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'LessonStub'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'})
- },
- u'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Lesson.description'
- db.add_column(u'catalogue_lesson', 'description',
- self.gf('django.db.models.fields.TextField')(null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Lesson.description'
- db.delete_column(u'catalogue_lesson', 'description')
-
-
- models = {
- u'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.lessonstub': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'LessonStub'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'})
- },
- u'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Section.pic'
- db.add_column(u'catalogue_section', 'pic',
- self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Section.pic_attribution'
- db.add_column(u'catalogue_section', 'pic_attribution',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Section.pic_src'
- db.add_column(u'catalogue_section', 'pic_src',
- self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Section.pic'
- db.delete_column(u'catalogue_section', 'pic')
-
- # Deleting field 'Section.pic_attribution'
- db.delete_column(u'catalogue_section', 'pic_attribution')
-
- # Deleting field 'Section.pic_src'
- db.delete_column(u'catalogue_section', 'pic_src')
-
-
- models = {
- u'catalogue.attachment': {
- 'Meta': {'ordering': "['slug', 'ext']", 'unique_together': "(['lesson', 'slug', 'ext'],)", 'object_name': 'Attachment'},
- 'ext': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.lessonstub': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'LessonStub'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'})
- },
- u'catalogue.part': {
- 'Meta': {'object_name': 'Part'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']"}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'pic': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'pic_attribution': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pic_src': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['catalogue']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8
-from django.core.files import File
-from django.core.urlresolvers import reverse
-from django.db import models
-from jsonfield import JSONField
-from fnpdjango.storage import BofhFileSystemStorage
-from curriculum.models import Level, Curriculum, CurriculumCourse
-import logging
-
-bofh_storage = BofhFileSystemStorage()
-
-
-class Section(models.Model):
- title = models.CharField(max_length=255, unique=True)
- slug = models.SlugField(max_length=255, unique=True)
- order = models.IntegerField()
- xml_file = models.FileField(
- upload_to="catalogue/section/xml",
- null=True, blank=True, max_length=255,
- storage=bofh_storage)
- image = models.ImageField(upload_to="catalogue/section/image", null=True, blank=True)
-
- pic = models.ImageField(upload_to="catalogue/section/pic", null=True, blank=True)
- pic_attribution = models.CharField(max_length=255, null=True, blank=True)
- pic_src = models.URLField(null=True, blank=True)
-
- summary = models.TextField(blank=True, null=True)
-
- class Meta:
- ordering = ['order']
-
- class IncompleteError(BaseException):
- pass
-
- def __unicode__(self):
- return self.title
-
- def get_absolute_url(self):
- return "%s#gimnazjum_%s" % (reverse("catalogue_lessons"), self.slug)
-
- @classmethod
- def publish(cls, infile, ignore_incomplete=False):
- from librarian.parser import WLDocument
- from django.core.files.base import ContentFile
- xml = infile.get_string()
- wldoc = WLDocument.from_string(xml)
-
- lessons = []
- for part in wldoc.book_info.parts:
- try:
- lessons.append(Lesson.objects.get(slug=part.slug))
- except Lesson.DoesNotExist, e:
- if not ignore_incomplete:
- raise cls.IncompleteError(part.slug)
-
- slug = wldoc.book_info.url.slug
- try:
- section = cls.objects.get(slug=slug)
- except cls.DoesNotExist:
- section = cls(slug=slug, order=0)
-
- # Save XML file
- section.xml_file.save('%s.xml' % slug, ContentFile(xml), save=False)
- section.title = wldoc.book_info.title
- section.save()
-
- section.lesson_set.all().update(section=None)
- for i, lesson in enumerate(lessons):
- lesson.section = section
- lesson.order = i
- lesson.save()
-
- return section
-
- def syntetic_lesson(self, level):
- try:
- return self.lesson_set.filter(type='synthetic', level=level)[0]
- except IndexError:
- return None
-
-
-class Lesson(models.Model):
- section = models.ForeignKey(Section, null=True, blank=True)
- level = models.ForeignKey(Level)
- title = models.CharField(max_length=255)
- slug = models.SlugField(max_length=255, unique=True)
- type = models.CharField(max_length=15, db_index=True)
- order = models.IntegerField(db_index=True)
- dc = JSONField(default='{}')
- curriculum_courses = models.ManyToManyField(CurriculumCourse, blank=True)
- description = models.TextField(null=True, blank=True)
-
- xml_file = models.FileField(
- upload_to="catalogue/lesson/xml",
- null=True, blank=True, max_length=255, storage=bofh_storage)
- html_file = models.FileField(
- upload_to="catalogue/lesson/html",
- null=True, blank=True, max_length=255, storage=bofh_storage)
- package = models.FileField(
- upload_to="catalogue/lesson/pack",
- null=True, blank=True, max_length=255, storage=bofh_storage)
- student_package = models.FileField(
- upload_to="catalogue/lesson/student_pack",
- null=True, blank=True, max_length=255, storage=bofh_storage)
- pdf = models.FileField(
- upload_to="catalogue/lesson/pdf",
- null=True, blank=True, max_length=255, storage=bofh_storage)
- student_pdf = models.FileField(
- upload_to="catalogue/lesson/student_pdf",
- null=True, blank=True, max_length=255, storage=bofh_storage)
-
- class Meta:
- ordering = ['section', 'level', 'order']
-
- def __unicode__(self):
- return self.title
-
- @models.permalink
- def get_absolute_url(self):
- return 'catalogue_lesson', [self.slug]
-
- @classmethod
- def publish(cls, infile, ignore_incomplete=False):
- from librarian.parser import WLDocument
- from django.core.files.base import ContentFile
- wldoc = WLDocument(infile)
-
- # Check if not section metadata block.
- if wldoc.book_info.parts:
- return Section.publish(infile, ignore_incomplete=ignore_incomplete)
-
- slug = wldoc.book_info.url.slug
- try:
- lesson = cls.objects.get(slug=slug)
- lesson.attachment_set.all().delete()
- except cls.DoesNotExist:
- lesson = cls(slug=slug, order=0)
-
- # Save XML file
- lesson.xml_file.save('%s.xml' % slug, ContentFile(infile.get_string()), save=False)
- lesson.title = wldoc.book_info.title
-
- lesson.level = Level.objects.get(meta_name=wldoc.book_info.audience)
- lesson.populate_dc()
- lesson.populate_description(wldoc=wldoc)
- lesson.build_html(infile=infile)
- lesson.build_pdf()
- lesson.build_package()
- if lesson.type != 'project':
- lesson.build_pdf(student=True)
- lesson.build_package(student=True)
- return lesson
-
- def populate_dc(self):
- from librarian.parser import WLDocument
- wldoc = WLDocument.from_file(self.xml_file.path)
- self.dc = wldoc.book_info.to_dict()
- self.type = self.dc["type"]
- assert self.type in ('appendix', 'course', 'synthetic', 'project', 'added', 'added-var'), \
- u"Unknown lesson type: %s" % self.type
- self.save()
-
- courses = set()
- for identifier in wldoc.book_info.curriculum:
- identifier = (identifier or "").replace(' ', '')
- if not identifier:
- continue
- try:
- curr = Curriculum.objects.get(identifier__iexact=identifier)
- except Curriculum.DoesNotExist:
- logging.warn('Unknown curriculum course %s in lesson %s' % (identifier, self.slug))
- pass
- else:
- courses.add(curr.course)
- self.curriculum_courses = courses
-
- def populate_description(self, wldoc=None, infile=None):
- if wldoc is None:
- wldoc = self.wldocument(infile)
- if self.type == 'project':
- lookup = u'Zadanie'
- else:
- lookup = u'Pomysł na lekcję'
- for header in wldoc.edoc.findall('.//naglowek_rozdzial'):
- if (header.text or '').strip() == lookup:
- from lxml import etree
- self.description = etree.tostring(
- header.getnext(), method='text', encoding='unicode').strip()
- self.save()
- return
-
- def wldocument(self, infile=None):
- from librarian import IOFile
- from librarian.parser import WLDocument
- from .publish import OrmDocProvider
-
- if infile is None:
- infile = IOFile.from_filename(self.xml_file.path)
- for att in self.attachment_set.all():
- infile.attachments["%s.%s" % (att.slug, att.ext)] = \
- IOFile.from_filename(att.file.path)
- return WLDocument(infile, provider=OrmDocProvider())
-
- def build_html(self, infile=None):
- from .publish import HtmlFormat
- wldoc = self.wldocument(infile)
- html = HtmlFormat(wldoc).build()
- self.html_file.save("%s.html" % self.slug, File(open(html.get_filename())))
-
- def build_pdf(self, student=False):
- from .publish import PdfFormat
- # PDF uses document with attachments already saved as media,
- # otherwise sorl.thumbnail complains about SuspiciousOperations.
- wldoc = self.wldocument()
- if student:
- pdf = PdfFormat(wldoc).build()
- self.student_pdf.save("%s.pdf" % self.slug, File(open(pdf.get_filename())))
- else:
- pdf = PdfFormat(wldoc, teacher=True).build()
- self.pdf.save("%s.pdf" % self.slug, File(open(pdf.get_filename())))
-
- def add_to_zip(self, zipf, student=False, prefix=''):
- pdf = self.student_pdf if student else self.pdf
- if pdf:
- zipf.write(pdf.path, "%s%s%s.pdf" % (prefix, self.slug, "_student" if student else ""))
- for attachment in self.attachment_set.all():
- zipf.write(attachment.file.path, u"%smaterialy/%s.%s" % (prefix, attachment.slug, attachment.ext))
- zipf.write(self.xml_file.path, "%spliki-zrodlowe/%s.xml" % (prefix, self.slug))
-
- def build_package(self, student=False):
- from StringIO import StringIO
- import zipfile
- from django.core.files.base import ContentFile
- buff = StringIO()
- zipf = zipfile.ZipFile(buff, 'w', zipfile.ZIP_STORED)
- self.add_to_zip(zipf, student)
- zipf.close()
- fieldname = "student_package" if student else "package"
- getattr(self, fieldname).save(
- "%s%s.zip" % (self.slug, "_student" if student else ""),
- ContentFile(buff.getvalue()))
-
- def get_syntetic(self):
- if self.section is None:
- return None
- return self.section.syntetic_lesson(self.level)
-
- def get_other_level(self):
- if self.section is None:
- return None
- other_levels = self.section.lesson_set.exclude(level=self.level)
- if other_levels.exists():
- return other_levels[0].level
-
- def get_previous(self):
- if self.section is None:
- return None
- try:
- return self.section.lesson_set.filter(
- type=self.type, level=self.level,
- order__lt=self.order).order_by('-order')[0]
- except IndexError:
- return None
-
- def get_next(self):
- if self.section is None:
- return None
- try:
- return self.section.lesson_set.filter(
- type=self.type, level=self.level,
- order__gt=self.order).order_by('order')[0]
- except IndexError:
- return None
-
- def requires_internet(self):
- return 'internet' in self.dc.get('requires', [])
-
-
-class Attachment(models.Model):
- slug = models.CharField(max_length=255)
- ext = models.CharField(max_length=15)
- lesson = models.ForeignKey(Lesson)
- file = models.FileField(upload_to="catalogue/attachment", storage=bofh_storage)
-
- class Meta:
- ordering = ['slug', 'ext']
- unique_together = ['lesson', 'slug', 'ext']
-
- def __unicode__(self):
- return "%s.%s" % (self.slug, self.ext)
-
-
-class Part(models.Model):
- lesson = models.ForeignKey(Lesson)
- pdf = models.FileField(upload_to="catalogue/part/pdf", null=True, blank=True)
- student_pdf = models.FileField(upload_to="catalogue/part/student_pdf", null=True, blank=True)
-
-
-class LessonStub(models.Model):
- section = models.ForeignKey(Section, null=True, blank=True)
- level = models.ForeignKey(Level)
- title = models.CharField(max_length=255)
- type = models.CharField(max_length=15, db_index=True)
- order = models.IntegerField(db_index=True)
-
- class Meta:
- ordering = ['section', 'level', 'order']
-
- def __unicode__(self):
- return self.title
-
- @property
- def slug(self):
- return ''
-
- def add_to_zip(self, *args, **kwargs):
- pass
+++ /dev/null
-# -*- coding: utf-8
-from django.core.files import File
-from django.core.urlresolvers import reverse
-from librarian import DocProvider, IOFile
-from librarian.pyhtml import EduModuleFormat
-from librarian.pypdf import EduModulePDFFormat
-from .models import Lesson, Attachment
-from fnpdjango.utils.text.slughifi import slughifi
-
-
-# TODO: Using sorl.thumbnail for now,
-# but this should be done in Librarian,
-# directly using convert or PIL as a fallback.
-def get_image(src_img_path, width=None, default_width=1600, formats=('PNG', 'JPEG', 'GIF')):
- """ Returns an object with `url` and `storage` attributes,
- or None if using the original image is OK.
- """
-
- from PIL import Image
- from sorl.thumbnail import get_thumbnail
-
- # Does it need converting?
- # Yes, if width is given explicitly.
- convert = width is not None
- if not convert:
- # Looks like it doesn't need converting.
- # But let's try opening it and checking its type.
- try:
- simg = Image.open(src_img_path)
- except IOError:
- # It doesn't look like image,
- # but maybe it's convertable to one.
- convert = True
- else:
- if simg.format not in formats:
- # It's an image, but it's in some weird format.
- convert = True
- width = simg.size[0]
-
- if convert:
- if width is None:
- width = default_width
- return get_thumbnail(src_img_path, '%sx%s' % (width, 10*width))
- else:
- return None
-
-
-class HtmlFormat(EduModuleFormat):
- IMAGE_FORMATS = ('PNG', 'JPEG', 'GIF')
- DEFAULT_IMAGE_WIDTH = 1600
-
- def find_attachment(self, slug, fmt):
- lesson_slug = self.wldoc.book_info.url.slug
- try:
- # If already saved, use it.
- att = Attachment.objects.get(lesson__slug=lesson_slug,
- slug=slug, ext=fmt)
- except Attachment.DoesNotExist, e:
- # If attached to source IOFile, save now.
- att_name = "%s.%s" % (slug, fmt)
- try:
- att_file = self.wldoc.source.attachments[att_name]
- except KeyError:
- print u"ATTACHMENT MISSING:", att_name
- raise self.MaterialNotFound()
- else:
- lesson = Lesson.objects.get(slug=lesson_slug)
- att = lesson.attachment_set.create(slug=slug, ext=fmt)
- att.file.save(att_name, File(att_file.get_file()))
- return att
- else:
- return att
-
- def url_for_material(self, slug, fmt):
- return self.find_attachment(slug, fmt).file.url
-
- def url_for_image(self, slug, fmt, width=None):
- try:
- src_img = self.find_attachment(slug, fmt).file
- except self.MaterialNotFound:
- return ''
- img = get_image(src_img.path, width, self.DEFAULT_IMAGE_WIDTH, self.IMAGE_FORMATS)
- return (img or src_img).url
-
- def text_to_anchor(self, text):
- return slughifi(text)
-
- def get_forma_url(self, forma):
- return '%s#%s' % (
- reverse('catalogue_lesson', args=['metody']),
- self.text_to_anchor(forma)
- )
-
- def get_help_url(self, naglowek):
- return '%s%s#%s' % (
- '//edukacjamedialna.edu.pl',
- reverse('info', args=['jak-korzystac/']),
- self.naglowek_to_anchor(naglowek)
- )
-
-
-class PdfFormat(EduModulePDFFormat):
- IMAGE_FORMATS = ('PNG', 'JPEG', 'GIF')
- DEFAULT_IMAGE_WIDTH = 1600
-
- def get_image(self, name):
- src_img = super(PdfFormat, self).get_image(name)
- img = get_image(
- src_img.get_filename(),
- default_width=self.DEFAULT_IMAGE_WIDTH,
- formats=self.IMAGE_FORMATS)
- if img:
- return IOFile.from_filename(img.storage.path(img))
- else:
- return src_img
-
-
-class OrmDocProvider(DocProvider):
- def by_slug(self, slug):
- """Should return a file-like object with a WL document XML."""
- return IOFile.from_filename(Lesson.objects.get(slug=slug).xml_file.path)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from haystack import indexes
-from .models import Lesson
-
-
-class LessonIndex(indexes.SearchIndex, indexes.Indexable):
- text = indexes.CharField(document=True, use_template=True)
-
- def get_model(self):
- return Lesson
+++ /dev/null
-#catalogue-carousel {
- float: left;
- position: relative;
- width: 43.75em;
- height: 14.6875em;
- overflow: hidden;
- border-radius: 0.9375em;
-}
- #catalogue-carousel #catalogue-carousel-links {
- width: 28.75em;
- height: 14.6875em;
- list-style: none;
- margin: 0;
- padding: 0; }
- #catalogue-carousel #catalogue-carousel-links li {
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- background-size: 100% 100%;
- border-top-left-radius: 0.9375em 6.38%;
- border-bottom-left-radius: 0.9375em 6.38%;
- z-index: 100;
- background-color: #888; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link {
- display: block;
- overflow: hidden;
- width: 28.75em;
- height: 100%;
- background: url(/static/catalogue/img/carousel-left.png) 100% 0 no-repeat;
- background-size: 4.375em 100%; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note {
- position: relative;
- height: 100%;
- color: white;
- margin-top: 8.5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div:before {
- content: " ";
- display: block;
- position: absolute;
- height: 100%;
- width: 100%;
- z-index: -1;
- background-color: black;
- opacity: 0.6; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p {
- padding: .4em 3em 0 .5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p strong {
- font-size: 1.2em;
- display: block; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p .more {
- position: absolute;
- right: 4em;
- top: 4.5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link:active {
- outline: none; }
- #catalogue-carousel #catalogue-carousel-links li .attribution {
- text-align: right;
- font-size: .75em;
- position: absolute;
- right: 5em;
- top: .1em;
- color: white;
- font-weight: bold;
- text-shadow: 0 0 5px #000; }
- #catalogue-carousel #catalogue-carousel-switcher {
- margin: 0;
- padding: 0.1875em 0 0 3.625em;
- width: 11.375em;
- height: 14.6875em;
- position: absolute;
- right: 0;
- top: 0;
- list-style: none;
- border-radius: 0 0.9375em 0.9375em 0;
- background-color: #ed7831;
- background-image: url(/static/catalogue/img/carousel-right.png);
- background-position: 0 0;
- background-repeat: no-repeat;
- background-size: auto 14.6875em;
- /* right part of mask as background */ }
- #catalogue-carousel #catalogue-carousel-switcher li {
- margin-bottom: .4em;
- font-size: .85em;
- line-height: 1em; }
- #catalogue-carousel #catalogue-carousel-switcher li a {
- text-transform: uppercase;
- color: #363a3e; }
- #catalogue-carousel #catalogue-carousel-switcher li a:before {
- vertical-align: top;
- margin-right: 1.5em; }
- #catalogue-carousel #catalogue-carousel-switcher li .knowledge:before {
- content: url(/static/img/icons/knowledge_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .activity:before {
- content: url(/static/img/icons/activity_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .lesson-plan:before {
- content: url(/static/img/icons/lesson-plan_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .reference:before {
- content: url(/static/img/icons/reference_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide a {
- color: white; }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .knowledge:before {
- content: url(/static/img/icons/knowledge_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .activity:before {
- content: url(/static/img/icons/activity_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .lesson-plan:before {
- content: url(/static/img/icons/lesson-plan_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .reference:before {
- content: url(/static/img/icons/reference_white.png); }
+++ /dev/null
-$px: .0625em;
-
-$ciemny: #363a3e;
-
-
-#catalogue-carousel {
- float: left;
- position: relative;
- width: 700*$px;
- height: 235*$px;
- overflow: hidden;
- border-radius: 15*$px;
-
- #catalogue-carousel-links {
- width: 460*$px;
- height: 235*$px;
- list-style: none;
- margin: 0;
- padding: 0;
-
- li {
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- background-size: 100% 100%;
- border-top-left-radius: 15*$px 6.38%;
- border-bottom-left-radius: 15*$px 6.38%;
- z-index: 100;
- background-color: #888;
-
- a.catalogue-carousel-link {
- display: block;
- overflow: hidden;
- width: 460*$px;
- height: 100%;
- background: url(/static/catalogue/img/carousel-left.png) 100% 0 no-repeat;
- background-size: 70*$px 100%;
-
- .catalogue-carousel-note {
- position: relative;
- height: 100%;
- color: white;
- margin-top: 8.5em;
-
- div {
- &:before {
- content: " ";
- display: block;
- position: absolute;
- height: 100%;
- width: 100%;
- z-index: -1;
- background-color: black;
- opacity: 0.6;
- }
-
- p {
- padding: .4em 3em 0 .5em;
-
- strong {
- font-size: 1.2em;
- display: block;
- }
-
- .more {
- position: absolute;
- right: 4em;
- top: 4.5em;
- }
- }
- }
- }
- }
- a.catalogue-carousel-link:active {
- outline: none;
- }
- .attribution {
- text-align: right;
- font-size: .75em;
- position: absolute;
- right: 5em;
- top: .1em;
- color: white;
- font-weight: bold;
- text-shadow: 0 0 5px #000;
- }
-
- }
- }
- #catalogue-carousel-switcher {
- margin: 0;
- padding: 3*$px 0 0 58*$px;
- width: 240*$px - 58*$px;
- height: 243*$px - 8*$px;
- position: absolute;
- right: 0;
- top: 0;
- list-style: none;
- border-radius: 0 15*$px 15*$px 0;
- background-color: #ed7831;
- background-image: url(/static/catalogue/img/carousel-right.png);
- background-position: 0 0;
- background-repeat: no-repeat;
- background-size: auto 235*$px;
-
- /* right part of mask as background */
-
- li {
- margin-bottom: .4em;
- font-size: .85em;
- line-height: 1em;
-
- a {
- text-transform: uppercase;
- color: $ciemny;
- }
- a:before {
- vertical-align: top;
- margin-right: 1.5em;
- }
- .knowledge:before {content: url(/static/img/icons/knowledge_dark.png);}
- .activity:before {content: url(/static/img/icons/activity_dark.png);}
- .lesson-plan:before {content: url(/static/img/icons/lesson-plan_dark.png);}
- .reference:before {content: url(/static/img/icons/reference_dark.png);}
- }
- li.activeSlide {
- a {
- color: white;
- }
- .knowledge:before {content: url(/static/img/icons/knowledge_white.png);}
- .activity:before {content: url(/static/img/icons/activity_white.png);}
- .lesson-plan:before {content: url(/static/img/icons/lesson-plan_white.png);}
- .reference:before {content: url(/static/img/icons/reference_white.png);}
- }
- }
-
-
-}
+++ /dev/null
-@charset "UTF-8";
-.exercise img {
- vertical-align: top; }
-.exercise .question-piece {
- border-radius: 0.6875em;
- padding: 0.5em 0.6875em; }
-.exercise .lista.punkt {
- list-style: none;
- margin: 0;
- padding: 0; }
-.exercise .lista li {
- margin: 0.3125em 0; }
-.exercise .question-piece.correct {
- background-color: #16a487;
- color: white; }
-.exercise .question-piece.incorrect {
- background-color: #f00;
- color: white; }
-.exercise .placeholder.dragover {
- background: #ed7831 !important; }
-.exercise .remove {
- float: right;
- display: inline-block;
- border-radius: 0.5em;
- padding: 0.25em 0.5em;
- margin: -0.25em -0.5em -0.25em 0.5em;
- background: #ed7831;
- color: white; }
-.exercise .buttons {
- background: #5e6165;
- border-radius: 0.5625em;
- height: 1.875em;
- line-height: 1.875em;
- overflow: hidden;
- color: white;
- margin-top: 1.875em; }
- .exercise .buttons input {
- height: 100%;
- border: 0;
- background: #8e9093;
- color: white;
- text-transform: uppercase;
- font-weight: bold; }
- .exercise .buttons .message {
- float: right;
- padding: 0 1.25em;
- background: red; }
- .exercise .buttons .maxscore {
- background: #16a487; }
- .exercise .buttons input.check {
- background: #ed7831; }
-
-.exercise .instruction, .exercise-wtem .instruction {
- display: block;
- margin: .3em;
- color: green;
- font-size: .9em; }
-.exercise .instruction:before, .exercise-wtem .instruction:before {
- content: "☞ "; }
-
-.luki .question-piece {
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2;
- display: inline-block;
- margin: 0.3125em;
- z-index: 2;
- max-width: 38em; }
-.luki .question-piece.disabled {
- background-color: #eee;
- color: #d4d6d8; }
-.luki .placeholder {
- border-radius: 0.6875em;
- padding: 0.5em 0.6875em;
- display: inline-block;
- margin: 0.3125em;
- z-index: 2;
- width: 4em;
- background-color: #eee;
- z-index: 1; }
-.luki .placeholder:after {
- content: "\0000a0"; }
-
-.zastap .question-piece {
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2;
- display: inline-block;
- margin: 0.3125em;
- z-index: 2; }
-.zastap .question-piece.disabled {
- background-color: #eee;
- color: #d4d6d8; }
-.zastap .question-piece.placeholder {
- background-color: inherit;
- color: inherit;
- cursor: inherit;
- z-index: inherit;
- display: inline;
- margin: 0;
- padding: 0;
- z-index: inherit;
- border-radius: 0; }
-
-.uporzadkuj .question-piece {
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2; }
-.uporzadkuj .question-piece.disabled {
- background-color: #eee;
- color: #d4d6d8; }
-.uporzadkuj .lista {
- list-style: none;
- margin: 0;
- padding: 0;
- counter-reset: answer; }
- .uporzadkuj .lista li {
- counter-increment: answer;
- padding-right: 3em;
- background-image: url(/static/img/ornaments/draggable.png);
- background-repeat: no-repeat;
- background-position: 100% 50%; }
- .uporzadkuj .lista li:before {
- border-radius: 0.6875em;
- padding: 0.5em 0.6875em;
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2;
- content: counter(answer);
- float: left;
- margin: -.5em 0 0 -3em; }
- .uporzadkuj .lista li.ui-sortable-placeholder {
- counter-increment: answer 0; }
- .uporzadkuj .lista li.ui-sortable-helper:before {
- content: none; }
-
-.przyporzadkuj .question-piece {
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2;
- width: 38.625em; }
-.przyporzadkuj .question-piece.short {
- display: inline-block;
- margin: .2em .1em;
- width: auto; }
-.przyporzadkuj span.question-piece {
- display: inline-block;
- margin: .1em;
- width: auto; }
-.przyporzadkuj .question-piece.disabled {
- background-color: #eee;
- color: #d4d6d8; }
-.przyporzadkuj .predicate {
- list-style: none;
- margin: 0;
- padding: 0; }
- .przyporzadkuj .predicate > li {
- border-radius: 0.6875em;
- padding: 0.5em 0.6875em;
- display: inline-block;
- background-color: #5e6165;
- color: white;
- width: 11.75em;
- position: relative;
- vertical-align: top; }
- .przyporzadkuj .predicate > li .subjects {
- list-style: none;
- margin: 0;
- padding: 0;
- min-height: 2.8125em;
- position: relative;
- margin: 0.5em -0.6875em -0.5em -0.6875em;
- padding: 0.5em 0.6875em; }
- .przyporzadkuj .predicate > li .subjects li {
- width: auto; }
- .przyporzadkuj .predicate > li .subjects .placeholder {
- border-radius: 0.6875em;
- padding: 0.5em 0.6875em;
- text-align: right;
- position: relative;
- padding: 0.5em 0.6875em;
- margin: 0 -0.6875em; }
- .przyporzadkuj .predicate > li .subjects .multiple {
- position: absolute;
- z-index: -1;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: 0; }
- .przyporzadkuj .predicate > li .subjects .placeholder.dragover {
- z-index: 1; }
- .przyporzadkuj .predicate > li .subjects .placeholder:after {
- content: "upuść tutaj";
- text-style: italic; }
-.przyporzadkuj .subject {
- list-style: none;
- margin: 0;
- padding: 0; }
-
-.prawdafalsz .question li.question-piece {
- position: relative;
- padding-left: 11em; }
-.prawdafalsz .question .buttons {
- margin-top: 0;
- top: 0;
- left: 0;
- position: absolute;
- background-color: #d4d6d8;
- color: #363a3e;
- display: inline-block; }
- .prawdafalsz .question .buttons a {
- color: #363a3e;
- text-transform: uppercase;
- font-weight: bold;
- display: inline-block;
- padding: 0 0.6875em; }
- .prawdafalsz .question .buttons a.chosen {
- background: #ed7831;
- color: white; }
-
-.wybor .question .lista {
- list-style: none;
- padding: 0; }
- .wybor .question .lista li {
- margin: 0; }
+++ /dev/null
-$px: 0.0625em;
-$oranji: #ed7831;
-$ciemny: #363a3e;
-$zielony: #16a487;
-
-
-@mixin bubble {
- border-radius: 11*$px;
- padding: 8*$px 11*$px;
-}
-@mixin bubble-drag {
- background-color: #d4d6d8;
- color: #363a3e;
- cursor: pointer;
- z-index: 2;
-}
-@mixin bubble-drag-disabled {
- background-color: #eee;
- color: #d4d6d8;
-}
-@mixin un-bubble-drag {
- background-color: inherit;
- color: inherit;
- cursor: inherit;
- z-index: inherit;
-}
-
-@mixin bubble-inline {
- display: inline-block;
- margin: 5*$px;
- z-index: 2;
-}
-@mixin un-bubble-inline {
- display: inline;
- margin: 0;
- padding: 0;
- z-index: inherit;
- border-radius: 0;
-}
-@mixin list-plain {
- list-style: none;
- margin: 0;
- padding: 0;
-}
-
-
-.exercise {
- img {
- vertical-align: top;
- }
-
- .question-piece {
- @include bubble;
- }
- .lista.punkt {
- @include list-plain;
- }
- .lista {
- li {
- margin: 5*$px 0;
- }
- }
-
- .question-piece.correct {
- background-color: #16a487;
- color: white;
- }
- .question-piece.incorrect {
- background-color: #f00;
- color: white;
- }
-
- .placeholder.dragover {
- background: #ed7831 !important;
- }
-
- .remove {
- float: right;
- display: inline-block;
- border-radius: 8*$px;
- padding: 4*$px 8*$px;
- margin: -4*$px -8*$px -.25em 8*$px;
- background: #ed7831;
- color: white;
- }
-
- .buttons {
- background: #5e6165;
- border-radius: 9*$px;
- height: 30*$px;
- line-height: 30*$px;
- overflow: hidden;
- color: white;
- margin-top: 30*$px;
-
- input {
- height: 100%;
- border: 0;
- background: #8e9093;
- color: white;
- text-transform: uppercase;
- font-weight: bold;
- }
- .message {
- float: right;
- padding: 0 20*$px;
- background: red;
- }
- .maxscore {
- background: #16a487;
- }
-
- input.check {
- background: #ed7831;
-
- }
- }
-}
-
-
-.exercise, .exercise-wtem {
- .instruction {
- display: block;
- margin: .3em;
- color: green;
- font-size: .9em;
- }
- .instruction:before {
- content: "☞ ";
- }
-}
-
-
-.luki {
- .question-piece {
- @include bubble-drag;
- @include bubble-inline;
- max-width: 608*$px;
- }
- .question-piece.disabled {
- @include bubble-drag-disabled;
- }
-
- .placeholder {
- @include bubble;
- @include bubble-inline;
-
- width: 4em;
- background-color: #eee;
- z-index: 1;
- }
- .placeholder:after {
- content: "\0000a0";
- }
-}
-
-
-.zastap {
- .question-piece {
- @include bubble-drag;
- @include bubble-inline;
- }
- .question-piece.disabled {
- @include bubble-drag-disabled;
- }
- .question-piece.placeholder {
- @include un-bubble-drag;
- @include un-bubble-inline;
- }
-}
-
-.uporzadkuj {
- .question-piece {
- @include bubble-drag;
- }
- .question-piece.disabled {
- @include bubble-drag-disabled;
- }
- .lista {
- @include list-plain;
- counter-reset: answer;
- li {
- counter-increment: answer;
- padding-right: 3em;
- background-image: url(/static/img/ornaments/draggable.png);
- background-repeat: no-repeat;
- background-position: 100% 50%;
- }
- li:before {
- @include bubble;
- @include bubble-drag;
- content: counter(answer);
- float: left;
- margin: -.5em 0 0 -3em;
- }
- li.ui-sortable-placeholder {
- counter-increment: answer 0;
- }
- li.ui-sortable-helper:before {
- content: none;
- }
- }
-}
-
-.przyporzadkuj {
- .question-piece {
- @include bubble-drag;
- width: 618*$px;
- }
- .question-piece.short {
- display: inline-block;
- margin: .2em .1em;
- width: auto;
- }
- span.question-piece {
- display: inline-block;
- margin: .1em;
- width: auto;
- }
- .question-piece.disabled {
- @include bubble-drag-disabled;
- }
- .predicate {
- @include list-plain;
-
- > li {
- @include bubble;
- display: inline-block;
- background-color: #5e6165;
- color: white;
- width: 188*$px;
- position: relative;
- vertical-align: top;
-
- .subjects {
- @include list-plain;
- min-height: 45*$px;
- position: relative;
- margin: 8*$px -11*$px -8*$px -11*$px;
- padding: 8*$px 11*$px;
-
- li {
- width: auto;
- }
-
- .placeholder {
- @include bubble;
- text-align: right;
- position:relative;
- padding: 8*$px 11*$px;
- margin: 0 -11*$px;
- }
- .multiple {
- position: absolute;
- z-index: -1;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: 0;
- }
-
- .placeholder.dragover {
- z-index: 1;
- }
- .placeholder:after {
- content: "upuść tutaj";
- text-style: italic;
- }
- }
- }
- .comment {
- }
- }
- .subject {
- @include list-plain;
- }
-
-}
-
-
-.prawdafalsz .question {
- li.question-piece {
- position: relative;
- padding-left: 11em;
- }
-
- .buttons {
- margin-top: 0;
- top: 0;
- left: 0;
- position: absolute;
-
- background-color: #d4d6d8;
- color: #363a3e;
- display: inline-block;
-
- a {
- color: #363a3e;
- text-transform: uppercase;
- font-weight: bold;
- display: inline-block;
- padding: 0 11*$px;
- }
- a.chosen {
- background: #ed7831;
- color: white;
- }
- }
-}
-
-.wybor .question {
- .lista {
- list-style: none;
- padding: 0;
- li {
- margin: 0;
- }
- }
-}
+++ /dev/null
-/* =================================================== */
-/* = Common elements: headings, paragraphs and lines = */
-/* =================================================== */
-/*h1 {
- font-size: 3em;
- margin: 1.5em 0;
- text-align: center;
- line-height: 1.5em;
- font-weight: bold;
-}
-
-h2 {
- font-size: 2em;
- margin: 1.5em 0 0;
- font-weight: bold;
- line-height: 1.5em;
-}
-
-h3 {
- font-size: 1.5em;
- margin: 1.5em 0 0;
- font-weight: normal;
- line-height: 1.5em;
-}
-
-h4 {
- font-size: 1em;
- margin: 1.5em 0 0;
- line-height: 1.5em;
-}
-
-p {
- margin: 0;
-}
-*/
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-.annotation {
- font-style: normal;
- font-weight: normal;
- font-size: 12px;
- padding-left: 2px;
- position: relative;
- top: -4px; }
-
-#footnotes {
- margin-top: 3em; }
-
-#footnotes .annotation {
- display: block;
- float: left;
- width: 2.5em;
- clear: both; }
-
-#footnotes div {
- margin: 1.5em 0 0 0; }
-
-#footnotes p, #footnotes ul {
- margin-left: 2.5em;
- font-size: 0.875em; }
-
-#footnotes .permalink {
- font-size: .75em; }
-
-blockquote {
- font-size: 0.875em; }
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.verse, .paragraph {
- position: relative; }
-
-.anchor {
- position: absolute;
- margin: -0.25em -0.5em;
- left: -3em;
- color: #777;
- font-size: 12px;
- width: 2em;
- text-align: center;
- padding: 0.25em 0.5em;
- line-height: 1.5em; }
-
-.anchor:hover, #book-text .anchor:active {
- color: #FFF;
- background-color: #CCC; }
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-span.author {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-bottom: 0.25em; }
-
-span.collection {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-bottom: -0.25em; }
-
-span.subtitle {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-top: -0.25em; }
-
-span.translator {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-top: 0.25em; }
-
-div.didaskalia {
- font-style: italic;
- margin: 0.5em 0 0 1.5em; }
-
-div.kwestia {
- margin: 0.5em 0 0; }
-
-div.stanza {
- margin: 1.5em 0 0; }
-
-div.kwestia div.stanza {
- margin: 0; }
-
-p.paragraph {
- text-align: justify;
- margin: 1.5em 0 0; }
-
-p.motto {
- text-align: justify;
- font-style: italic;
- margin: 1.5em 0 0; }
-
-p.motto_podpis {
- font-size: 0.875em;
- text-align: right; }
-
-div.fragment {
- border-bottom: 0.1em solid #999;
- padding-bottom: 1.5em; }
-
-div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph {
- text-align: right;
- font-style: italic; }
-
-hr.spacer {
- height: 3em;
- visibility: hidden; }
-
-hr.spacer-line {
- margin: 1.5em 0;
- border: none;
- border-bottom: 0.1em solid #000; }
-
-p.spacer-asterisk {
- padding: 0;
- margin: 1.5em 0;
- text-align: center; }
-
-div.person-list ol {
- list-style: none;
- padding: 0 0 0 1.5em; }
-
-p.place-and-time {
- font-style: italic; }
-
-em.math, em.foreign-word, em.book-title, em.didaskalia {
- font-style: italic; }
-
-em.author-emphasis {
- letter-spacing: 0.1em; }
-
-em.person {
- font-style: normal;
- font-variant: small-caps; }
-
-.verse:after {
- content: "\feff"; }
-
-/* =================================== */
-/* = Hide some elements for printing = */
-/* =================================== */
-@media print {
- #menu {
- display: none; } }
-.activity {
- clear: both; }
-
-.activity .text {
- width: 27.5em;
- margin-right: 20px;
- float: left; }
-
-.activity .description p:first-child {
- margin-top: 0; }
-
-.activity {
- margin-top: 2em; }
- .activity .act_counter {
- float: left;
- margin-right: .5em;
- font-size: 2em; }
- .activity .info {
- float: right;
- width: 8.4375em; }
- .activity .info .infobox {
- padding: 1em 0;
- border-top: 1px solid #c9ccce; }
- .activity .info .infobox h1 {
- text-transform: uppercase;
- font-weight: bold;
- margin: 0 0 0.5em -2.1875em;
- padding-left: 2.1875em;
- line-height: 24px;
- font-size: 1em; }
- .activity .info .infobox p {
- margin: 0; }
- .activity .info .time h1 {
- background: url(/static/img/icons/activity-time.png) 0 0 no-repeat; }
- .activity .info .kind h1 {
- background: url(/static/img/icons/activity-kind.png) 0 0 no-repeat; }
- .activity .info .materials h1 {
- background: url(/static/img/icons/activity-tools.png) 0 0 no-repeat; }
-
-.lista .paragraph {
- margin: .3em 0; }
-.lista li {
- margin: .75em 0; }
-
-.clearboth {
- clear: both; }
-
-#book-text .caption {
- margin: 1.5em; }
- #book-text .caption p {
- margin: 0; }
-
-/* utils */
-.clr {
- clear: both; }
-
-#book-text .top-link {
- margin-top: 1em; }
-
-.help {
- font-size: .7em;
- padding: 0 .5em;
- color: #888;
- vertical-align: super; }
+++ /dev/null
-$px: .0625em;
-
-/* =================================================== */
-/* = Common elements: headings, paragraphs and lines = */
-/* =================================================== */
-
-/*h1 {
- font-size: 3em;
- margin: 1.5em 0;
- text-align: center;
- line-height: 1.5em;
- font-weight: bold;
-}
-
-h2 {
- font-size: 2em;
- margin: 1.5em 0 0;
- font-weight: bold;
- line-height: 1.5em;
-}
-
-h3 {
- font-size: 1.5em;
- margin: 1.5em 0 0;
- font-weight: normal;
- line-height: 1.5em;
-}
-
-h4 {
- font-size: 1em;
- margin: 1.5em 0 0;
- line-height: 1.5em;
-}
-
-p {
- margin: 0;
-}
-*/
-
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-
-.annotation {
- font-style: normal;
- font-weight: normal;
- font-size: 12px;
- padding-left: 2px;
- position: relative;
- top: -4px;
-}
-
-#footnotes {
- margin-top: 3em;
-}
-
-#footnotes .annotation {
- display: block;
- float: left;
- width: 2.5em;
- clear: both;
-}
-
-#footnotes div {
- margin: 1.5em 0 0 0;
-}
-
-#footnotes p, #footnotes ul {
- margin-left: 2.5em;
- font-size: 0.875em;
-}
-
-#footnotes .permalink {
- font-size: .75em;
-}
-
-blockquote {
- font-size: 0.875em;
-}
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.verse, .paragraph {
- position:relative;
-}
-.anchor {
- position: absolute;
- margin: -0.25em -0.5em;
- left: -3em;
- color: #777;
- font-size: 12px;
- width: 2em;
- text-align: center;
- padding: 0.25em 0.5em;
- line-height: 1.5em;
-}
-
-.anchor:hover, #book-text .anchor:active {
- color: #FFF;
- background-color: #CCC;
-}
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-span.author {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-bottom: 0.25em;
-}
-
-span.collection {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-bottom: -0.25em;
-}
-
-span.subtitle {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-top: -0.25em;
-}
-
-span.translator {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-top: 0.25em;
-}
-
-div.didaskalia {
- font-style: italic;
- margin: 0.5em 0 0 1.5em;
-}
-
-div.kwestia {
- margin: 0.5em 0 0;
-}
-
-div.stanza {
- margin: 1.5em 0 0;
-}
-
-div.kwestia div.stanza {
- margin: 0;
-}
-
-p.paragraph {
- text-align: justify;
- margin: 1.5em 0 0;
-}
-
-p.motto {
- text-align: justify;
- font-style: italic;
- margin: 1.5em 0 0;
-}
-
-p.motto_podpis {
- font-size: 0.875em;
- text-align: right;
-}
-
-div.fragment {
- border-bottom: 0.1em solid #999;
- padding-bottom: 1.5em;
-}
-
-div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph {
- text-align: right;
- font-style: italic;
-}
-
-hr.spacer {
- height: 3em;
- visibility: hidden;
-}
-
-hr.spacer-line {
- margin: 1.5em 0;
- border: none;
- border-bottom: 0.1em solid #000;
-}
-
-p.spacer-asterisk {
- padding: 0;
- margin: 1.5em 0;
- text-align: center;
-}
-
-div.person-list ol {
- list-style: none;
- padding: 0 0 0 1.5em;
-}
-
-p.place-and-time {
- font-style: italic;
-}
-
-em.math, em.foreign-word, em.book-title, em.didaskalia {
- font-style: italic;
-}
-
-em.author-emphasis {
- letter-spacing: 0.1em;
-}
-
-em.person {
- font-style: normal;
- font-variant: small-caps;
-}
-
-.verse:after {
- content: "\feff";
-}
-
-
-/* =================================== */
-/* = Hide some elements for printing = */
-/* =================================== */
-
-@media print {
- #menu {display: none;}
-}
-
-
-
-.activity {
- clear:both;
-}
-
-.activity .text {
- width: 440*$px;
- margin-right: 20px;
- float: left;
-}
-
-.activity .description p:first-child {
- margin-top: 0;
-}
-
-
-
-.activity {
- margin-top: 2em;
-
- .act_counter {
- float: left;
- margin-right: .5em;
- font-size: 2em;
- }
-
- .info {
- float: right;
- width: 135*$px;
-
- .infobox {
- padding: 1em 0;
- border-top: 1px solid #c9ccce;
- h1 {
- text-transform: uppercase;
- font-weight: bold;
- margin: 0 0 .5em -35*$px;
- padding-left: 35*$px;
- line-height: 24px;
- font-size: 1em;
- }
- p {
- margin: 0;
- }
-
- }
- .time h1 {
- background: url(/static/img/icons/activity-time.png) 0 0 no-repeat;
- }
- .kind h1 {
- background: url(/static/img/icons/activity-kind.png) 0 0 no-repeat;
- }
- .materials h1 {
- background: url(/static/img/icons/activity-tools.png) 0 0 no-repeat;
- }
- }
-}
-
-.lista {
- .paragraph {
- margin: .3em 0;
- }
- li {
- margin: .75em 0;
- }
-}
-
-
-.clearboth {
- clear: both;
-}
-
-#book-text {
- .caption {
- margin: 1.5em;
- p {
- margin: 0;
- }
- }
-}
-
-/* utils */
-
-.clr {
- clear: both;
-}
-
-#book-text .top-link {
- margin-top: 1em;
-}
-
-.help {
- font-size: .7em;
- padding: 0 .5em;
- color: #888;
- vertical-align: super;
-}
+++ /dev/null
-#level-chooser-place {
- min-height: 5.9375em;
- margin-top: 2em; }
- #level-chooser-place ul#level-chooser {
- margin: 0;
- padding: 1em 0 1em 8.75em;
- background-color: white;
- width: 31.25em;
- z-index: 300;
- position: relative;
- text-transform: uppercase;
- text-align: right; }
- #level-chooser-place ul#level-chooser .home {
- display: none;
- position: absolute;
- top: 1.5em;
- left: 0; }
- #level-chooser-place ul#level-chooser .home a {
- background: none;
- padding: 0; }
- #level-chooser-place ul#level-chooser .home a img {
- width: 7.5em; }
- #level-chooser-place ul#level-chooser.fixed {
- position: fixed;
- top: 0;
- border-bottom: 1px solid #c9ccce; }
- #level-chooser-place ul#level-chooser.fixed .home {
- display: block; }
- #level-chooser-place ul#level-chooser li {
- display: inline-block;
- list-style: none;
- max-width: 175px; }
- #level-chooser-place ul#level-chooser li a {
- display: table-cell;
- padding: .5em 1em;
- border-radius: 0.3125em;
- background: #eee;
- height: 2.625em;
- vertical-align: middle; }
- #level-chooser-place ul#level-chooser li a.active {
- color: white;
- background: #ED7831; }
-
-.level .link-list {
- margin-left: 1em; }
-.level .level-toc {
- overflow: hidden;
- /* Because we're changing bg color lower. */ }
- .level .level-toc.fixed {
- position: fixed; }
- .level .level-toc .link-list {
- margin-left: 1em; }
- .level .level-toc .link-list li {
- margin-bottom: 0; }
- .level .level-toc .link-list li.curriculumcourses {
- margin: 10px -17px -17px;
- padding: 10px 16px 16px;
- background-color: #eee; }
+++ /dev/null
-$px: 0.0625em;
-
-#level-chooser-place {
- min-height: 95*$px;
- margin-top: 2em;
-
- ul#level-chooser {
- margin: 0;
- padding: 16*$px 0 16*$px 140*$px;
- background-color: white;
- width: 500*$px;
- z-index: 300;
- position: relative;
- text-transform: uppercase;
- text-align: right;
-
- .home {
- display: none;
- position: absolute;
- top: 1.5em;
- left: 0;
-
- a {
- background: none;
- padding: 0;
- img {
- width: 120*$px;
- }
- }
- }
-
- &.fixed {
- position: fixed;
- top: 0;
- border-bottom: 1px solid #c9ccce;
-
- .home {
- display: block;
- }
- }
-
- li {
- display: inline-block;
- list-style: none;
- max-width: 175px;
-
- a {
- display: table-cell;
- padding: .5em 1em;
- border-radius: 5*$px;
- background: #eee;
- height: 42*$px;
- vertical-align: middle;
-
- &.active {
- color: white;
- background: #ED7831;
- }
- }
- }
- }
-}
-
-.level {
- .link-list {
- margin-left: 1em;
- }
-
- .level-toc {
- overflow: hidden; /* Because we're changing bg color lower. */
-
- &.fixed {
- position: fixed;
- }
-
- .link-list {
- margin-left: 1em;
-
- li {
- margin-bottom: 0;
-
- &.curriculumcourses {
- margin: 10px -17px -17px;
- padding: 10px 16px 16px;
- background-color: #eee;
- }
- }
- }
- }
-}
+++ /dev/null
-(function($){
-$(function() {
-
-
-$("#catalogue-carousel-links").each(function() {
- $slides = $(this);
-
- $slides.cycle({
- fx: 'fade',
- speed: 1000,
- timeout: 5000,
- pager: '#catalogue-carousel-switcher',
- pagerAnchorBuilder: function() {},
- });
-
- $("#catalogue-carousel-switcher li").each(function(i, e) {
- $("a", e).click(function(ev) {
- ev.preventDefault();
- $slides.cycle(i);
- });
- });
-
-});
-
-
-});
-})(jQuery);
+++ /dev/null
-// Generated by CoffeeScript 1.4.0
-(function() {
- var $, Binding, EduModule, Exercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, exercise,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- $ = jQuery;
-
- Binding = (function() {
-
- function Binding(handler, element) {
- this.handler = handler;
- this.element = element;
- $(this.element).data(this.handler, this);
- }
-
- return Binding;
-
- })();
-
- EduModule = (function(_super) {
-
- __extends(EduModule, _super);
-
- function EduModule(element) {
- EduModule.__super__.constructor.call(this, 'edumodule', element);
- }
-
- return EduModule;
-
- })(Binding);
-
- Exercise = (function(_super) {
-
- __extends(Exercise, _super);
-
- function Exercise(element) {
- var _this = this;
- Exercise.__super__.constructor.call(this, 'exercise', element);
- $(this.element).data("exercise-html", $(this.element).html());
- $(".check", this.element).click(function(ev) {
- _this.check();
- $(".retry", _this.element).show();
- return $(".check", _this.element).hide();
- });
- $(".retry", this.element).click(function(ev) {
- return _this.retry();
- });
- $('.solutions', this.element).click(function() {
- _this.show_solutions();
- return $(".comment", _this.element).show();
- });
- $('.reset', this.element).click(function() {
- return _this.reset();
- });
- }
-
- Exercise.prototype.retry = function() {
- $(".correct, .incorrect", this.element).removeClass("correct incorrect");
- $(".check", this.element).show();
- return $(".retry", this.element).hide();
- };
-
- Exercise.prototype.reset = function() {
- $(this.element).html($(this.element).data('exercise-html'));
- return exercise(this.element);
- };
-
- Exercise.prototype.piece_correct = function(qpiece) {
- return $(qpiece).removeClass('incorrect').addClass('correct');
- };
-
- Exercise.prototype.piece_incorrect = function(qpiece) {
- return $(qpiece).removeClass('correct').addClass('incorrect');
- };
-
- Exercise.prototype.check = function() {
- var score, scores,
- _this = this;
- scores = [];
- $(".question", this.element).each(function(i, question) {
- return scores.push(_this.check_question(question));
- });
- score = [0, 0, 0];
- $.each(scores, function(i, s) {
- score[0] += s[0];
- score[1] += s[1];
- return score[2] += s[2];
- });
- return this.show_score(score);
- };
-
- Exercise.prototype.show_solutions = function() {
- var _this = this;
- this.reset();
- return $(".question", this.element).each(function(i, question) {
- return _this.solve_question(question);
- });
- };
-
- Exercise.prototype.get_value_list = function(elem, data_key, numbers) {
- var vl;
- vl = $(elem).attr("data-" + data_key).split(/[ ,]+/).map($.trim);
- if (numbers) {
- vl = vl.map(function(x) {
- return parseInt(x);
- });
- }
- return vl;
- };
-
- Exercise.prototype.get_value_optional_list = function(elem, data_key) {
- var mandat, opt, v, vals, _i, _len;
- vals = this.get_value_list(elem, data_key);
- mandat = [];
- opt = [];
- for (_i = 0, _len = vals.length; _i < _len; _i++) {
- v = vals[_i];
- if (v.slice(-1) === "?") {
- opt.push(v.slice(0, -1));
- } else {
- mandat.push(v);
- }
- }
- return [mandat, opt];
- };
-
- Exercise.prototype.show_score = function(score) {
- var $msg;
- $msg = $(".message", this.element);
- $msg.text("Wynik: " + score[0] + " / " + score[2]);
- if (score[0] >= score[2] && score[1] === 0) {
- return $msg.addClass("maxscore");
- } else {
- return $msg.removeClass("maxscore");
- }
- };
-
- Exercise.prototype.draggable_equal = function($draggable1, $draggable2) {
- return false;
- };
-
- Exercise.prototype.draggable_accept = function($draggable, $droppable) {
- var d, dropped, _i, _len;
- dropped = $droppable.closest("ul, ol").find(".draggable");
- for (_i = 0, _len = dropped.length; _i < _len; _i++) {
- d = dropped[_i];
- if (this.draggable_equal($draggable, $(d))) {
- return false;
- }
- }
- return true;
- };
-
- Exercise.prototype.draggable_move = function($draggable, $placeholder, ismultiple) {
- var $added,
- _this = this;
- $added = $draggable.clone();
- $added.data("original", $draggable.get(0));
- if (!ismultiple) {
- $draggable.addClass('disabled').draggable('disable');
- }
- $placeholder.after($added);
- if (!$placeholder.hasClass('multiple')) {
- $placeholder.hide();
- }
- if ($added.is(".add-li")) {
- $added.wrap("<li/>");
- }
- $added.append('<span class="remove">x</span><div class="clr"></div>');
- return $('.remove', $added).click(function(ev) {
- _this.retry();
- if (!ismultiple) {
- $($added.data('original')).removeClass('disabled').draggable('enable');
- }
- if ($added.is(".add-li")) {
- $added = $added.closest('li');
- }
- $added.prev(".placeholder:not(.multiple)").show();
- return $added.remove();
- });
- };
-
- Exercise.prototype.dragging = function(ismultiple, issortable) {
- var _this = this;
- return $(".question", this.element).each(function(i, question) {
- var draggable_opts, self;
- draggable_opts = {
- revert: 'invalid',
- helper: 'clone',
- start: _this.retry
- };
- $(".draggable", question).draggable(draggable_opts);
- self = _this;
- return $(".placeholder", question).droppable({
- accept: function(draggable) {
- var $draggable, is_accepted;
- $draggable = $(draggable);
- is_accepted = true;
- if (!$draggable.is(".draggable")) {
- is_accepted = false;
- }
- if (is_accepted) {
- is_accepted = self.draggable_accept($draggable, $(this));
- }
- if (is_accepted) {
- $(this).addClass('accepting');
- } else {
- $(this).removeClass('accepting');
- }
- return is_accepted;
- },
- drop: function(ev, ui) {
- $(ev.target).removeClass('accepting dragover');
- return _this.draggable_move($(ui.draggable), $(ev.target), ismultiple);
- },
- over: function(ev, ui) {
- return $(ev.target).addClass('dragover');
- },
- out: function(ev, ui) {
- return $(ev.target).removeClass('dragover');
- }
- });
- });
- };
-
- return Exercise;
-
- })(Binding);
-
- Wybor = (function(_super) {
-
- __extends(Wybor, _super);
-
- function Wybor(element) {
- Wybor.__super__.constructor.call(this, element);
- $(".question-piece input", element).change(this.retry);
- }
-
- Wybor.prototype.check_question = function(question) {
- var all, bad, good, solution,
- _this = this;
- all = 0;
- good = 0;
- bad = 0;
- solution = this.get_value_list(question, 'solution');
- $(".question-piece", question).each(function(i, qpiece) {
- var is_checked, piece_name, piece_no, should_be_checked;
- piece_no = $(qpiece).attr('data-no');
- piece_name = $(qpiece).attr('data-name');
- if (piece_name) {
- should_be_checked = solution.indexOf(piece_name) >= 0;
- } else {
- should_be_checked = solution.indexOf(piece_no) >= 0;
- }
- is_checked = $("input", qpiece).is(":checked");
- if (should_be_checked) {
- all += 1;
- }
- if (is_checked) {
- if (should_be_checked) {
- good += 1;
- return _this.piece_correct(qpiece);
- } else {
- bad += 1;
- return _this.piece_incorrect(qpiece);
- }
- } else {
- return $(qpiece).removeClass("correct,incorrect");
- }
- });
- return [good, bad, all];
- };
-
- Wybor.prototype.solve_question = function(question) {
- var solution,
- _this = this;
- solution = this.get_value_list(question, 'solution');
- return $(".question-piece", question).each(function(i, qpiece) {
- var piece_name, piece_no, should_be_checked;
- piece_no = $(qpiece).attr('data-no');
- piece_name = $(qpiece).attr('data-name');
- if (piece_name) {
- should_be_checked = solution.indexOf(piece_name) >= 0;
- } else {
- should_be_checked = solution.indexOf(piece_no) >= 0;
- }
- console.log("check " + $("input[type=checkbox]", qpiece).attr("id") + " -> " + should_be_checked);
- return $("input[type=checkbox],input[type=radio]", qpiece).prop('checked', should_be_checked);
- });
- };
-
- return Wybor;
-
- })(Exercise);
-
- Uporzadkuj = (function(_super) {
-
- __extends(Uporzadkuj, _super);
-
- function Uporzadkuj(element) {
- Uporzadkuj.__super__.constructor.call(this, element);
- $('ol, ul', this.element).sortable({
- items: "> li",
- start: this.retry
- });
- }
-
- Uporzadkuj.prototype.check_question = function(question) {
- var all, bad, correct, pkt, pkts, positions, sorted, _i, _ref;
- positions = this.get_value_list(question, 'original', true);
- sorted = positions.sort(function(a, b) {
- return a - b;
- });
- pkts = $('.question-piece', question);
- correct = 0;
- bad = 0;
- all = 0;
- for (pkt = _i = 0, _ref = pkts.length; 0 <= _ref ? _i < _ref : _i > _ref; pkt = 0 <= _ref ? ++_i : --_i) {
- all += 1;
- if (pkts.eq(pkt).data('pos') === sorted[pkt]) {
- correct += 1;
- this.piece_correct(pkts.eq(pkt));
- } else {
- bad += 1;
- this.piece_incorrect(pkts.eq(pkt));
- }
- }
- return [correct, bad, all];
- };
-
- Uporzadkuj.prototype.solve_question = function(question) {
- var p, parent, pkts, _i, _len, _results;
- pkts = $('.question-piece', question);
- pkts.sort(function(a, b) {
- return $(a).data('pos') - $(b).data('pos');
- });
- parent = pkts.eq(0).parent();
- _results = [];
- for (_i = 0, _len = pkts.length; _i < _len; _i++) {
- p = pkts[_i];
- _results.push(parent.append(p));
- }
- return _results;
- };
-
- return Uporzadkuj;
-
- })(Exercise);
-
- Luki = (function(_super) {
-
- __extends(Luki, _super);
-
- function Luki(element) {
- Luki.__super__.constructor.call(this, element);
- this.dragging(false, false);
- }
-
- Luki.prototype.check = function() {
- var all, bad, correct,
- _this = this;
- all = $(".placeholder", this.element).length;
- correct = 0;
- bad = 0;
- $(".placeholder + .question-piece", this.element).each(function(i, qpiece) {
- var $placeholder;
- $placeholder = $(qpiece).prev(".placeholder");
- if ($placeholder.data('solution') === $(qpiece).data('no')) {
- _this.piece_correct(qpiece);
- return correct += 1;
- } else {
- bad += 1;
- return _this.piece_incorrect(qpiece);
- }
- });
- return this.show_score([correct, bad, all]);
- };
-
- Luki.prototype.solve_question = function(question) {
- var _this = this;
- return $(".placeholder", question).each(function(i, placeholder) {
- var $qp;
- $qp = $(".question-piece[data-no=" + $(placeholder).data('solution') + "]", question);
- return _this.draggable_move($qp, $(placeholder), false);
- });
- };
-
- return Luki;
-
- })(Exercise);
-
- Zastap = (function(_super) {
-
- __extends(Zastap, _super);
-
- function Zastap(element) {
- var _this = this;
- Zastap.__super__.constructor.call(this, element);
- $(".paragraph", this.element).each(function(i, par) {
- return _this.wrap_words($(par), $('<span class="placeholder zastap"/>'));
- });
- this.dragging(false, false);
- }
-
- Zastap.prototype.check = function() {
- var all, bad, correct,
- _this = this;
- all = 0;
- correct = 0;
- bad = 0;
- $(".paragraph", this.element).each(function(i, par) {
- return $(".placeholder", par).each(function(j, qpiece) {
- var $dragged, $qp;
- $qp = $(qpiece);
- $dragged = $qp.next(".draggable");
- if ($qp.data("solution")) {
- if ($dragged && $qp.data("solution") === $dragged.data("no")) {
- _this.piece_correct($dragged);
- correct += 1;
- }
- return all += 1;
- }
- });
- });
- return this.show_score([correct, bad, all]);
- };
-
- Zastap.prototype.show_solutions = function() {
- var _this = this;
- this.reset();
- return $(".paragraph", this.element).each(function(i, par) {
- return $(".placeholder[data-solution]", par).each(function(j, qpiece) {
- var $dr, $qp;
- $qp = $(qpiece);
- $dr = $(".draggable[data-no=" + $qp.data('solution') + "]", _this.element);
- return _this.draggable_move($dr, $qp, false);
- });
- });
- };
-
- Zastap.prototype.wrap_words = function(element, wrapper) {
- var chld, i, ignore, insertWrapped, j, len, space, wordb, _i, _ref, _results;
- ignore = /^[ \t.,:;()]+/;
- insertWrapped = function(txt, elem) {
- var nw;
- nw = wrapper.clone();
- return $(document.createTextNode(txt)).wrap(nw).parent().attr("data-original", txt).insertBefore(elem);
- };
- _results = [];
- for (j = _i = _ref = element.get(0).childNodes.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; j = _ref <= 0 ? ++_i : --_i) {
- chld = element.get(0).childNodes[j];
- if (chld.nodeType === document.TEXT_NODE) {
- len = chld.textContent.length;
- wordb = 0;
- i = 0;
- while (i < len) {
- space = ignore.exec(chld.textContent.substr(i));
- if (space != null) {
- if (wordb < i) {
- insertWrapped(chld.textContent.substr(wordb, i - wordb), chld);
- }
- $(document.createTextNode(space[0])).insertBefore(chld);
- i += space[0].length;
- wordb = i;
- } else {
- i = i + 1;
- }
- }
- if (wordb < len - 1) {
- insertWrapped(chld.textContent.substr(wordb, len - 1 - wordb), chld);
- }
- _results.push($(chld).remove());
- } else {
- _results.push(void 0);
- }
- }
- return _results;
- };
-
- return Zastap;
-
- })(Exercise);
-
- Przyporzadkuj = (function(_super) {
-
- __extends(Przyporzadkuj, _super);
-
- Przyporzadkuj.prototype.is_multiple = function() {
- var qp, _i, _len, _ref;
- _ref = $(".question-piece", this.element);
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- qp = _ref[_i];
- if ($(qp).attr('data-solution').split(/[ ,]+/).length > 1) {
- return true;
- }
- }
- return false;
- };
-
- function Przyporzadkuj(element) {
- Przyporzadkuj.__super__.constructor.call(this, element);
- this.multiple = this.is_multiple();
- this.dragging(this.multiple, true);
- }
-
- Przyporzadkuj.prototype.draggable_equal = function(d1, d2) {
- return d1.data("no") === d2.data("no");
- };
-
- Przyporzadkuj.prototype.check_question = function(question) {
- var all, bad_count, count, mandatory, minimum, optional, pn, pred, qp, self, v, _i, _j, _len, _len1, _ref, _ref1;
- minimum = $(question).data("minimum");
- count = 0;
- bad_count = 0;
- all = 0;
- if (!minimum) {
- self = this;
- $(".subject .question-piece", question).each(function(i, el) {
- var mandatory, v;
- v = self.get_value_optional_list(el, 'solution');
- mandatory = v[0];
- return all += mandatory.length;
- });
- }
- _ref = $(".predicate [data-predicate]", question);
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- pred = _ref[_i];
- pn = $(pred).attr('data-predicate');
- _ref1 = $(".question-piece", pred);
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- qp = _ref1[_j];
- v = this.get_value_optional_list(qp, 'solution');
- mandatory = v[0];
- optional = v[1];
- if (mandatory.indexOf(pn) >= 0 || (minimum && optional.indexOf(pn) >= 0)) {
- count += 1;
- this.piece_correct(qp);
- } else {
- bad_count += 1;
- this.piece_incorrect(qp);
- }
- }
- }
- return [count, bad_count, all];
- };
-
- Przyporzadkuj.prototype.solve_question = function(question) {
- var $ph, $pr, draggables, m, mandatory, minimum, optional, qp, v, _i, _len, _ref, _results;
- minimum = $(question).data("min");
- _ref = $(".subject .question-piece", question);
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- qp = _ref[_i];
- v = this.get_value_optional_list(qp, 'solution');
- mandatory = v[0];
- optional = v[1];
- if (minimum) {
- draggables = mandatory.count(optional).slice(0, minimum);
- } else {
- draggables = mandatory;
- }
- _results.push((function() {
- var _j, _len1, _results1;
- _results1 = [];
- for (_j = 0, _len1 = draggables.length; _j < _len1; _j++) {
- m = draggables[_j];
- $pr = $(".predicate [data-predicate=" + m + "]", question);
- $ph = $pr.find(".placeholder:visible");
- _results1.push(this.draggable_move($(qp), $ph.eq(0), this.multiple));
- }
- return _results1;
- }).call(this));
- }
- return _results;
- };
-
- return Przyporzadkuj;
-
- })(Exercise);
-
- PrawdaFalsz = (function(_super) {
-
- __extends(PrawdaFalsz, _super);
-
- function PrawdaFalsz(element) {
- var qp, _i, _len, _ref,
- _this = this;
- PrawdaFalsz.__super__.constructor.call(this, element);
- _ref = $(".question-piece", this.element);
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- qp = _ref[_i];
- $(".true", qp).click(function(ev) {
- ev.preventDefault();
- _this.retry();
- $(ev.target).closest(".question-piece").data("value", "true");
- return $(ev.target).addClass('chosen').siblings('a').removeClass('chosen');
- });
- $(".false", qp).click(function(ev) {
- ev.preventDefault();
- _this.retry();
- $(ev.target).closest(".question-piece").data("value", "false");
- return $(ev.target).addClass('chosen').siblings('a').removeClass('chosen');
- });
- }
- }
-
- PrawdaFalsz.prototype.check_question = function() {
- var all, bad, good, qp, _i, _len, _ref;
- all = 0;
- good = 0;
- bad = 0;
- _ref = $(".question-piece", this.element);
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- qp = _ref[_i];
- if ($(qp).data("solution").toString() === $(qp).data("value")) {
- good += 1;
- this.piece_correct(qp);
- } else {
- bad += 1;
- this.piece_incorrect(qp);
- }
- all += 1;
- }
- return [good, bad, all];
- };
-
- PrawdaFalsz.prototype.show_solutions = function() {
- var qp, _i, _len, _ref, _results;
- this.reset();
- _ref = $(".question-piece", this.element);
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- qp = _ref[_i];
- if ($(qp).data('solution') === true) {
- _results.push($(".true", qp).click());
- } else {
- _results.push($(".false", qp).click());
- }
- }
- return _results;
- };
-
- return PrawdaFalsz;
-
- })(Exercise);
-
- exercise = function(ele) {
- var cls, es;
- es = {
- wybor: Wybor,
- uporzadkuj: Uporzadkuj,
- luki: Luki,
- zastap: Zastap,
- przyporzadkuj: Przyporzadkuj,
- prawdafalsz: PrawdaFalsz
- };
- cls = es[$(ele).attr('data-type')];
- return new cls(ele);
- };
-
- window.edumed = {
- 'EduModule': EduModule
- };
-
- $(document).ready(function() {
- new EduModule($("#book-text"));
- return $(".exercise").each(function(i, el) {
- return exercise(this);
- });
- });
-
-}).call(this);
+++ /dev/null
-/*! jQuery UI - v1.10.0 - 2013-01-24
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js
-* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// prevent duplicate loading
-// this is only a problem because we proxy existing functions
-// and we don't want to double proxy them
-$.ui = $.ui || {};
-if ( $.ui.version ) {
- return;
-}
-
-$.extend( $.ui, {
- version: "1.10.0",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- _focus: $.fn.focus,
- focus: function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- this._focus.apply( this, arguments );
- },
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.support.selectstart = "onselectstart" in document.createElement( "div" );
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.10.0",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown."+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click."+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("."+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.10.0",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
- this.element[0].style.position = "relative";
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var element,
- that = this,
- elementInDom = false,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- element = this.element[0];
- while ( element && (element = element.parentNode) ) {
- if (element === document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" ) {
- return false;
- }
-
- if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
- $(this.options.handle, this.element)
- .find("*")
- .addBack()
- .each(function() {
- if(this === event.target) {
- handle = true;
- }
- });
-
- return handle;
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
-
- if(!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- //This needs to be actually done for all browsers, since pageX/pageY includes this information
- //Ugly IE fix
- if((this.offsetParent[0] === document.body) ||
- (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var over, c, ce,
- o = this.options;
-
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- (o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
- (o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) {
- c = $(o.containment);
- ce = c[0];
-
- if(!ce) {
- return;
- }
-
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
-
- } else if(o.containment.constructor === Array) {
- this.containment = o.containment;
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
-
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var containment, co, top, left,
- o = this.options,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
- pageX = event.pageX,
- pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
- if(this.containment) {
- if (this.relative_container){
- co = this.relative_container.offset();
- containment = [ this.containment[0] + co.left,
- this.containment[1] + co.top,
- this.containment[2] + co.left,
- this.containment[3] + co.top ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) {
- pageX = containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < containment[1]) {
- pageY = containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > containment[2]) {
- pageX = containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > containment[3]) {
- pageY = containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- //The absolute position has to be recalculated after plugins
- if(type === "drag") {
- this.positionAbs = this._convertPositionTo("absolute");
- }
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function() {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, "ui-sortable");
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("ui-draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
- if(this.shouldRevert) {
- this.instance.options.revert = true;
- }
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper === "original") {
- this.instance.currentItem.css({ top: "auto", left: "auto" });
- }
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), that = this;
-
- $.each(inst.sortables, function() {
-
- var innermostIntersecting = false,
- thisSortable = this;
-
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this !== thisSortable &&
- this.instance._intersectsWith(this.instance.containerCache) &&
- $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])
- ) {
- innermostIntersecting = false;
- }
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) {
- this.instance._mouseDrag(event);
- }
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger("out", event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) {
- this.instance.placeholder.remove();
- }
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- }
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function() {
- var t = $("body"), o = $(this).data("ui-draggable").options;
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function() {
- var o = $(this).data("ui-draggable").options;
- if (o._cursor) {
- $("body").css("cursor", o._cursor);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function() {
- var i = $(this).data("ui-draggable");
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
- i.overflowOffset = i.scrollParent.offset();
- }
- },
- drag: function( event ) {
-
- var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
-
- if(!o.axis || o.axis !== "x") {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
- }
-
- } else {
-
- if(!o.axis || o.axis !== "x") {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(i, event);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function() {
-
- var i = $(this).data("ui-draggable"),
- o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $o = $t.offset();
- if(this !== i.element[0]) {
- i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- }
- });
-
- },
- drag: function(event, ui) {
-
- var ts, bs, ls, rs, l, r, t, b, i, first,
- inst = $(this).data("ui-draggable"),
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- l = inst.snapElements[i].left;
- r = l + inst.snapElements[i].width;
- t = inst.snapElements[i].top;
- b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
- if(inst.snapElements[i].snapping) {
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode !== "inner") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- rs = Math.abs(r - x1) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if(o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- rs = Math.abs(r - x2) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function() {
-
- var min,
- o = $(this).data("ui-draggable").options,
- group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
-
- if (!group.length) { return; }
-
- min = parseInt(group[0].style.zIndex, 10) || 0;
- $(group).each(function(i) {
- this.style.zIndex = min + i;
- });
-
- this[0].style.zIndex = min + group.length;
-
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.droppable", {
- version: "1.10.0",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var i = 0,
- drop = $.ui.ddmanager.droppables[this.options.scope];
-
- for ( ; i < drop.length; i++ ) {
- if ( drop[i] === this ) {
- drop.splice(i, 1);
- }
- }
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key === "accept") {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.addClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("activate", event, this.ui(draggable));
- }
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("deactivate", event, this.ui(draggable));
- }
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.addClass(this.options.hoverClass);
- }
- this._trigger("over", event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("out", event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return false;
- }
-
- this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, "ui-droppable");
- if(
- inst.options.greedy &&
- !inst.options.disabled &&
- inst.options.scope === draggable.options.scope &&
- inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
- $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) {
- return false;
- }
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("drop", event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) {
- return false;
- }
-
- var draggableLeft, draggableTop,
- x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case "fit":
- return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
- case "intersect":
- return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
- x2 - (draggable.helperProportions.width / 2) < r && // Left Half
- t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
- y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- case "pointer":
- draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
- return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
- case "touch":
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- default:
- return false;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function(t, event) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[t.options.scope] || [],
- type = event ? event.type : null, // workaround for #2317
- list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
-
- droppablesLoop: for (i = 0; i < m.length; i++) {
-
- //No disabled and non-accepted
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for (j=0; j < list.length; j++) {
- if(list[j] === m[i].element[0]) {
- m[i].proportions.height = 0;
- continue droppablesLoop;
- }
- }
-
- m[i].visible = m[i].element.css("display") !== "none";
- if(!m[i].visible) {
- continue;
- }
-
- //Activate the droppable if used directly from draggables
- if(type === "mousedown") {
- m[i]._activate.call(m[i], event);
- }
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(!this.options) {
- return;
- }
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
- dropped = this._drop.call(this, event) || dropped;
- }
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) {
- $.ui.ddmanager.prepareOffsets(draggable, event);
- }
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect(draggable, this, this.options.tolerance),
- c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
- if(!c) {
- return;
- }
-
- if (this.options.greedy) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents(":data(ui-droppable)").filter(function () {
- return $.data(this, "ui-droppable").options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], "ui-droppable");
- parentInstance.greedyChild = (c === "isover");
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c === "isover") {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c === "isout") {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.10.0",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass("ui-selected"),
- selecting: $this.hasClass("ui-selecting"),
- unselecting: $this.hasClass("ui-unselecting")
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled) {
- return;
- }
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
- }
-
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
-
- if (options.tolerance === "touch") {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance === "fit") {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
- } else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-/*jshint loopfunc: true */
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.10.0",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
- if(this === event.target) {
- validHandle = true;
- }
- });
- if(!validHandle) {
- return false;
- }
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var i,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if(o.cursor) { // cursor option
- if ($("body").css("cursor")) {
- this._storedCursor = $("body").css("cursor");
- }
- $("body").css("cursor", o.cursor);
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) {
- this._storedOpacity = this.helper.css("opacity");
- }
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) {
- this._storedZIndex = this.helper.css("zIndex");
- }
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
- this.overflowOffset = this.scrollParent.offset();
- }
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions) {
- this._cacheHelperProportions();
- }
-
-
- //Post "activate" events to possible containers
- if( !noActivation ) {
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
-
- //Rearrange
- for (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
- }
-
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset();
-
- this.reverting = true;
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- str = [];
- o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
- if (res) {
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
- }
- });
-
- if(!str.length && o.key) {
- str.push(o.key + "=");
- }
-
- return str.join("&");
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- ret = [];
-
- o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement) {
- return false;
- }
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta !== 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta !== 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
- }
- }
- }
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
- for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- }
- }
- }
-
- for (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
- continue;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- p = t.offset();
- item.left = p.left;
- item.top = p.top;
- }
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var el = $(document.createElement(that.currentItem[0].nodeName))
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper")[0];
-
- if(!className) {
- el.style.visibility = "hidden";
- }
-
- return el;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) {
- return;
- }
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) {
- return;
- }
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- posProperty = this.containers[innermostIndex].floating ? "left" : "top";
- sizeProperty = this.containers[innermostIndex].floating ? "width" : "height";
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var ce, co, over,
- o = this.options;
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) {
- pageX = this.containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < this.containment[1]) {
- pageY = this.containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > this.containment[2]) {
- pageX = this.containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > this.containment[3]) {
- pageY = this.containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
- }
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- }
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if(this._storedCursor) {
- $("body").css("cursor", this._storedCursor);
- }
- if(this._storedOpacity) {
- this.helper.css("opacity", this._storedOpacity);
- }
- if(this._storedZIndex) {
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
- }
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] !== this.currentItem[0]) {
- this.helper.remove();
- }
- this.helper = null;
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-;(jQuery.effects || (function($, undefined) {
-
-var dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- _addClass: $.fn.addClass,
- addClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- this._addClass( classNames );
- },
-
- _removeClass: $.fn.removeClass,
- removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
- },
-
- _toggleClass: $.fn.toggleClass,
- toggleClass: function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return this._toggleClass( classNames, force );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- },
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.10.0",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardSpeed( speed ) {
- // valid standard speeds
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
- return true;
- }
-
- // invalid strings - treat as "normal" speed
- return typeof speed === "string" && !$.effects.effect[ speed ];
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- _show: $.fn.show,
- show: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._show.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- },
-
- _hide: $.fn.hide,
- hide: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._hide.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- },
-
- // jQuery core overloads toggle and creates _toggle
- __toggle: $.fn.toggle,
- toggle: function( speed ) {
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
- return this.__toggle.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery));
+++ /dev/null
-/*!
- * jQuery Cycle Plugin (with Transition Definitions)
- * Examples and documentation at: http://jquery.malsup.com/cycle/
- * Copyright (c) 2007-2012 M. Alsup
- * Version: 2.9999.81 (15-JAN-2013)
- * Dual licensed under the MIT and GPL licenses.
- * http://jquery.malsup.com/license.html
- * Requires: jQuery v1.7.1 or later
- */
-;(function($, undefined) {
-"use strict";
-
-var ver = '2.9999.81';
-
-function debug(s) {
- if ($.fn.cycle.debug)
- log(s);
-}
-function log() {
- if (window.console && console.log)
- console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
-}
-$.expr[':'].paused = function(el) {
- return el.cyclePause;
-};
-
-
-// the options arg can be...
-// a number - indicates an immediate transition should occur to the given slide index
-// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
-// an object - properties to control the slideshow
-//
-// the arg2 arg can be...
-// the name of an fx (only used in conjunction with a numeric value for 'options')
-// the value true (only used in first arg == 'resume') and indicates
-// that the resume should occur immediately (not wait for next timeout)
-
-$.fn.cycle = function(options, arg2) {
- var o = { s: this.selector, c: this.context };
-
- // in 1.3+ we can fix mistakes with the ready state
- if (this.length === 0 && options != 'stop') {
- if (!$.isReady && o.s) {
- log('DOM not ready, queuing slideshow');
- $(function() {
- $(o.s,o.c).cycle(options,arg2);
- });
- return this;
- }
- // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
- log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
- return this;
- }
-
- // iterate the matched nodeset
- return this.each(function() {
- var opts = handleArguments(this, options, arg2);
- if (opts === false)
- return;
-
- opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
-
- // stop existing slideshow for this container (if there is one)
- if (this.cycleTimeout)
- clearTimeout(this.cycleTimeout);
- this.cycleTimeout = this.cyclePause = 0;
- this.cycleStop = 0; // issue #108
-
- var $cont = $(this);
- var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
- var els = $slides.get();
-
- if (els.length < 2) {
- log('terminating; too few slides: ' + els.length);
- return;
- }
-
- var opts2 = buildOptions($cont, $slides, els, opts, o);
- if (opts2 === false)
- return;
-
- var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
-
- // if it's an auto slideshow, kick it off
- if (startTime) {
- startTime += (opts2.delay || 0);
- if (startTime < 10)
- startTime = 10;
- debug('first timeout: ' + startTime);
- this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
- }
- });
-};
-
-function triggerPause(cont, byHover, onPager) {
- var opts = $(cont).data('cycle.opts');
- if (!opts)
- return;
- var paused = !!cont.cyclePause;
- if (paused && opts.paused)
- opts.paused(cont, opts, byHover, onPager);
- else if (!paused && opts.resumed)
- opts.resumed(cont, opts, byHover, onPager);
-}
-
-// process the args that were passed to the plugin fn
-function handleArguments(cont, options, arg2) {
- if (cont.cycleStop === undefined)
- cont.cycleStop = 0;
- if (options === undefined || options === null)
- options = {};
- if (options.constructor == String) {
- switch(options) {
- case 'destroy':
- case 'stop':
- var opts = $(cont).data('cycle.opts');
- if (!opts)
- return false;
- cont.cycleStop++; // callbacks look for change
- if (cont.cycleTimeout)
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- if (opts.elements)
- $(opts.elements).stop();
- $(cont).removeData('cycle.opts');
- if (options == 'destroy')
- destroy(cont, opts);
- return false;
- case 'toggle':
- cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
- checkInstantResume(cont.cyclePause, arg2, cont);
- triggerPause(cont);
- return false;
- case 'pause':
- cont.cyclePause = 1;
- triggerPause(cont);
- return false;
- case 'resume':
- cont.cyclePause = 0;
- checkInstantResume(false, arg2, cont);
- triggerPause(cont);
- return false;
- case 'prev':
- case 'next':
- opts = $(cont).data('cycle.opts');
- if (!opts) {
- log('options not found, "prev/next" ignored');
- return false;
- }
- $.fn.cycle[options](opts);
- return false;
- default:
- options = { fx: options };
- }
- return options;
- }
- else if (options.constructor == Number) {
- // go to the requested slide
- var num = options;
- options = $(cont).data('cycle.opts');
- if (!options) {
- log('options not found, can not advance slide');
- return false;
- }
- if (num < 0 || num >= options.elements.length) {
- log('invalid slide index: ' + num);
- return false;
- }
- options.nextSlide = num;
- if (cont.cycleTimeout) {
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- }
- if (typeof arg2 == 'string')
- options.oneTimeFx = arg2;
- go(options.elements, options, 1, num >= options.currSlide);
- return false;
- }
- return options;
-
- function checkInstantResume(isPaused, arg2, cont) {
- if (!isPaused && arg2 === true) { // resume now!
- var options = $(cont).data('cycle.opts');
- if (!options) {
- log('options not found, can not resume');
- return false;
- }
- if (cont.cycleTimeout) {
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- }
- go(options.elements, options, 1, !options.backwards);
- }
- }
-}
-
-function removeFilter(el, opts) {
- if (!$.support.opacity && opts.cleartype && el.style.filter) {
- try { el.style.removeAttribute('filter'); }
- catch(smother) {} // handle old opera versions
- }
-}
-
-// unbind event handlers
-function destroy(cont, opts) {
- if (opts.next)
- $(opts.next).unbind(opts.prevNextEvent);
- if (opts.prev)
- $(opts.prev).unbind(opts.prevNextEvent);
-
- if (opts.pager || opts.pagerAnchorBuilder)
- $.each(opts.pagerAnchors || [], function() {
- this.unbind().remove();
- });
- opts.pagerAnchors = null;
- $(cont).unbind('mouseenter.cycle mouseleave.cycle');
- if (opts.destroy) // callback
- opts.destroy(opts);
-}
-
-// one-time initialization
-function buildOptions($cont, $slides, els, options, o) {
- var startingSlideSpecified;
- // support metadata plugin (v1.0 and v2.0)
- var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
- var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
- if (meta)
- opts = $.extend(opts, meta);
- if (opts.autostop)
- opts.countdown = opts.autostopCount || els.length;
-
- var cont = $cont[0];
- $cont.data('cycle.opts', opts);
- opts.$cont = $cont;
- opts.stopCount = cont.cycleStop;
- opts.elements = els;
- opts.before = opts.before ? [opts.before] : [];
- opts.after = opts.after ? [opts.after] : [];
-
- // push some after callbacks
- if (!$.support.opacity && opts.cleartype)
- opts.after.push(function() { removeFilter(this, opts); });
- if (opts.continuous)
- opts.after.push(function() { go(els,opts,0,!opts.backwards); });
-
- saveOriginalOpts(opts);
-
- // clearType corrections
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
- clearTypeFix($slides);
-
- // container requires non-static position so that slides can be position within
- if ($cont.css('position') == 'static')
- $cont.css('position', 'relative');
- if (opts.width)
- $cont.width(opts.width);
- if (opts.height && opts.height != 'auto')
- $cont.height(opts.height);
-
- if (opts.startingSlide !== undefined) {
- opts.startingSlide = parseInt(opts.startingSlide,10);
- if (opts.startingSlide >= els.length || opts.startSlide < 0)
- opts.startingSlide = 0; // catch bogus input
- else
- startingSlideSpecified = true;
- }
- else if (opts.backwards)
- opts.startingSlide = els.length - 1;
- else
- opts.startingSlide = 0;
-
- // if random, mix up the slide array
- if (opts.random) {
- opts.randomMap = [];
- for (var i = 0; i < els.length; i++)
- opts.randomMap.push(i);
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- if (startingSlideSpecified) {
- // try to find the specified starting slide and if found set start slide index in the map accordingly
- for ( var cnt = 0; cnt < els.length; cnt++ ) {
- if ( opts.startingSlide == opts.randomMap[cnt] ) {
- opts.randomIndex = cnt;
- }
- }
- }
- else {
- opts.randomIndex = 1;
- opts.startingSlide = opts.randomMap[1];
- }
- }
- else if (opts.startingSlide >= els.length)
- opts.startingSlide = 0; // catch bogus input
- opts.currSlide = opts.startingSlide || 0;
- var first = opts.startingSlide;
-
- // set position and zIndex on all the slides
- $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
- var z;
- if (opts.backwards)
- z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
- else
- z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
- $(this).css('z-index', z);
- });
-
- // make sure first slide is visible
- $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
- removeFilter(els[first], opts);
-
- // stretch slides
- if (opts.fit) {
- if (!opts.aspect) {
- if (opts.width)
- $slides.width(opts.width);
- if (opts.height && opts.height != 'auto')
- $slides.height(opts.height);
- } else {
- $slides.each(function(){
- var $slide = $(this);
- var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
- if( opts.width && $slide.width() != opts.width ) {
- $slide.width( opts.width );
- $slide.height( opts.width / ratio );
- }
-
- if( opts.height && $slide.height() < opts.height ) {
- $slide.height( opts.height );
- $slide.width( opts.height * ratio );
- }
- });
- }
- }
-
- if (opts.center && ((!opts.fit) || opts.aspect)) {
- $slides.each(function(){
- var $slide = $(this);
- $slide.css({
- "margin-left": opts.width ?
- ((opts.width - $slide.width()) / 2) + "px" :
- 0,
- "margin-top": opts.height ?
- ((opts.height - $slide.height()) / 2) + "px" :
- 0
- });
- });
- }
-
- if (opts.center && !opts.fit && !opts.slideResize) {
- $slides.each(function(){
- var $slide = $(this);
- $slide.css({
- "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
- "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
- });
- });
- }
-
- // stretch container
- var reshape = (opts.containerResize || opts.containerResizeHeight) && !$cont.innerHeight();
- if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
- var maxw = 0, maxh = 0;
- for(var j=0; j < els.length; j++) {
- var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
- if (!w) w = e.offsetWidth || e.width || $e.attr('width');
- if (!h) h = e.offsetHeight || e.height || $e.attr('height');
- maxw = w > maxw ? w : maxw;
- maxh = h > maxh ? h : maxh;
- }
- if (opts.containerResize && maxw > 0 && maxh > 0)
- $cont.css({width:maxw+'px',height:maxh+'px'});
- if (opts.containerResizeHeight && maxh > 0)
- $cont.css({height:maxh+'px'});
- }
-
- var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
- if (opts.pause)
- $cont.bind('mouseenter.cycle', function(){
- pauseFlag = true;
- this.cyclePause++;
- triggerPause(cont, true);
- }).bind('mouseleave.cycle', function(){
- if (pauseFlag)
- this.cyclePause--;
- triggerPause(cont, true);
- });
-
- if (supportMultiTransitions(opts) === false)
- return false;
-
- // apparently a lot of people use image slideshows without height/width attributes on the images.
- // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
- var requeue = false;
- options.requeueAttempts = options.requeueAttempts || 0;
- $slides.each(function() {
- // try to get height/width of each slide
- var $el = $(this);
- this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
- this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
-
- if ( $el.is('img') ) {
- var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
- // don't requeue for images that are still loading but have a valid size
- if (loading) {
- if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
- log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
- setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
- requeue = true;
- return false; // break each loop
- }
- else {
- log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
- }
- }
- }
- return true;
- });
-
- if (requeue)
- return false;
-
- opts.cssBefore = opts.cssBefore || {};
- opts.cssAfter = opts.cssAfter || {};
- opts.cssFirst = opts.cssFirst || {};
- opts.animIn = opts.animIn || {};
- opts.animOut = opts.animOut || {};
-
- $slides.not(':eq('+first+')').css(opts.cssBefore);
- $($slides[first]).css(opts.cssFirst);
-
- if (opts.timeout) {
- opts.timeout = parseInt(opts.timeout,10);
- // ensure that timeout and speed settings are sane
- if (opts.speed.constructor == String)
- opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
- if (!opts.sync)
- opts.speed = opts.speed / 2;
-
- var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
- while((opts.timeout - opts.speed) < buffer) // sanitize timeout
- opts.timeout += opts.speed;
- }
- if (opts.easing)
- opts.easeIn = opts.easeOut = opts.easing;
- if (!opts.speedIn)
- opts.speedIn = opts.speed;
- if (!opts.speedOut)
- opts.speedOut = opts.speed;
-
- opts.slideCount = els.length;
- opts.currSlide = opts.lastSlide = first;
- if (opts.random) {
- if (++opts.randomIndex == els.length)
- opts.randomIndex = 0;
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else if (opts.backwards)
- opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
- else
- opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
-
- // run transition init fn
- if (!opts.multiFx) {
- var init = $.fn.cycle.transitions[opts.fx];
- if ($.isFunction(init))
- init($cont, $slides, opts);
- else if (opts.fx != 'custom' && !opts.multiFx) {
- log('unknown transition: ' + opts.fx,'; slideshow terminating');
- return false;
- }
- }
-
- // fire artificial events
- var e0 = $slides[first];
- if (!opts.skipInitializationCallbacks) {
- if (opts.before.length)
- opts.before[0].apply(e0, [e0, e0, opts, true]);
- if (opts.after.length)
- opts.after[0].apply(e0, [e0, e0, opts, true]);
- }
- if (opts.next)
- $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
- if (opts.prev)
- $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
- if (opts.pager || opts.pagerAnchorBuilder)
- buildPager(els,opts);
-
- exposeAddSlide(opts, els);
-
- return opts;
-}
-
-// save off original opts so we can restore after clearing state
-function saveOriginalOpts(opts) {
- opts.original = { before: [], after: [] };
- opts.original.cssBefore = $.extend({}, opts.cssBefore);
- opts.original.cssAfter = $.extend({}, opts.cssAfter);
- opts.original.animIn = $.extend({}, opts.animIn);
- opts.original.animOut = $.extend({}, opts.animOut);
- $.each(opts.before, function() { opts.original.before.push(this); });
- $.each(opts.after, function() { opts.original.after.push(this); });
-}
-
-function supportMultiTransitions(opts) {
- var i, tx, txs = $.fn.cycle.transitions;
- // look for multiple effects
- if (opts.fx.indexOf(',') > 0) {
- opts.multiFx = true;
- opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
- // discard any bogus effect names
- for (i=0; i < opts.fxs.length; i++) {
- var fx = opts.fxs[i];
- tx = txs[fx];
- if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
- log('discarding unknown transition: ',fx);
- opts.fxs.splice(i,1);
- i--;
- }
- }
- // if we have an empty list then we threw everything away!
- if (!opts.fxs.length) {
- log('No valid transitions named; slideshow terminating.');
- return false;
- }
- }
- else if (opts.fx == 'all') { // auto-gen the list of transitions
- opts.multiFx = true;
- opts.fxs = [];
- for (var p in txs) {
- if (txs.hasOwnProperty(p)) {
- tx = txs[p];
- if (txs.hasOwnProperty(p) && $.isFunction(tx))
- opts.fxs.push(p);
- }
- }
- }
- if (opts.multiFx && opts.randomizeEffects) {
- // munge the fxs array to make effect selection random
- var r1 = Math.floor(Math.random() * 20) + 30;
- for (i = 0; i < r1; i++) {
- var r2 = Math.floor(Math.random() * opts.fxs.length);
- opts.fxs.push(opts.fxs.splice(r2,1)[0]);
- }
- debug('randomized fx sequence: ',opts.fxs);
- }
- return true;
-}
-
-// provide a mechanism for adding slides after the slideshow has started
-function exposeAddSlide(opts, els) {
- opts.addSlide = function(newSlide, prepend) {
- var $s = $(newSlide), s = $s[0];
- if (!opts.autostopCount)
- opts.countdown++;
- els[prepend?'unshift':'push'](s);
- if (opts.els)
- opts.els[prepend?'unshift':'push'](s); // shuffle needs this
- opts.slideCount = els.length;
-
- // add the slide to the random map and resort
- if (opts.random) {
- opts.randomMap.push(opts.slideCount-1);
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- }
-
- $s.css('position','absolute');
- $s[prepend?'prependTo':'appendTo'](opts.$cont);
-
- if (prepend) {
- opts.currSlide++;
- opts.nextSlide++;
- }
-
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
- clearTypeFix($s);
-
- if (opts.fit && opts.width)
- $s.width(opts.width);
- if (opts.fit && opts.height && opts.height != 'auto')
- $s.height(opts.height);
- s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
- s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
-
- $s.css(opts.cssBefore);
-
- if (opts.pager || opts.pagerAnchorBuilder)
- $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
-
- if ($.isFunction(opts.onAddSlide))
- opts.onAddSlide($s);
- else
- $s.hide(); // default behavior
- };
-}
-
-// reset internal state; we do this on every pass in order to support multiple effects
-$.fn.cycle.resetState = function(opts, fx) {
- fx = fx || opts.fx;
- opts.before = []; opts.after = [];
- opts.cssBefore = $.extend({}, opts.original.cssBefore);
- opts.cssAfter = $.extend({}, opts.original.cssAfter);
- opts.animIn = $.extend({}, opts.original.animIn);
- opts.animOut = $.extend({}, opts.original.animOut);
- opts.fxFn = null;
- $.each(opts.original.before, function() { opts.before.push(this); });
- $.each(opts.original.after, function() { opts.after.push(this); });
-
- // re-init
- var init = $.fn.cycle.transitions[fx];
- if ($.isFunction(init))
- init(opts.$cont, $(opts.elements), opts);
-};
-
-// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
-function go(els, opts, manual, fwd) {
- var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
-
- // opts.busy is true if we're in the middle of an animation
- if (manual && opts.busy && opts.manualTrump) {
- // let manual transitions requests trump active ones
- debug('manualTrump in go(), stopping active transition');
- $(els).stop(true,true);
- opts.busy = 0;
- clearTimeout(p.cycleTimeout);
- }
-
- // don't begin another timeout-based transition if there is one active
- if (opts.busy) {
- debug('transition active, ignoring new tx request');
- return;
- }
-
-
- // stop cycling if we have an outstanding stop request
- if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
- return;
-
- // check to see if we should stop cycling based on autostop options
- if (!manual && !p.cyclePause && !opts.bounce &&
- ((opts.autostop && (--opts.countdown <= 0)) ||
- (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
- if (opts.end)
- opts.end(opts);
- return;
- }
-
- // if slideshow is paused, only transition on a manual trigger
- var changed = false;
- if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
- changed = true;
- var fx = opts.fx;
- // keep trying to get the slide size if we don't have it yet
- curr.cycleH = curr.cycleH || $(curr).height();
- curr.cycleW = curr.cycleW || $(curr).width();
- next.cycleH = next.cycleH || $(next).height();
- next.cycleW = next.cycleW || $(next).width();
-
- // support multiple transition types
- if (opts.multiFx) {
- if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
- opts.lastFx = 0;
- else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
- opts.lastFx = opts.fxs.length - 1;
- fx = opts.fxs[opts.lastFx];
- }
-
- // one-time fx overrides apply to: $('div').cycle(3,'zoom');
- if (opts.oneTimeFx) {
- fx = opts.oneTimeFx;
- opts.oneTimeFx = null;
- }
-
- $.fn.cycle.resetState(opts, fx);
-
- // run the before callbacks
- if (opts.before.length)
- $.each(opts.before, function(i,o) {
- if (p.cycleStop != opts.stopCount) return;
- o.apply(next, [curr, next, opts, fwd]);
- });
-
- // stage the after callacks
- var after = function() {
- opts.busy = 0;
- $.each(opts.after, function(i,o) {
- if (p.cycleStop != opts.stopCount) return;
- o.apply(next, [curr, next, opts, fwd]);
- });
- if (!p.cycleStop) {
- // queue next transition
- queueNext();
- }
- };
-
- debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
-
- // get ready to perform the transition
- opts.busy = 1;
- if (opts.fxFn) // fx function provided?
- opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
- $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- else
- $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- }
- else {
- queueNext();
- }
-
- if (changed || opts.nextSlide == opts.currSlide) {
- // calculate the next slide
- var roll;
- opts.lastSlide = opts.currSlide;
- if (opts.random) {
- opts.currSlide = opts.nextSlide;
- if (++opts.randomIndex == els.length) {
- opts.randomIndex = 0;
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- }
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- if (opts.nextSlide == opts.currSlide)
- opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
- }
- else if (opts.backwards) {
- roll = (opts.nextSlide - 1) < 0;
- if (roll && opts.bounce) {
- opts.backwards = !opts.backwards;
- opts.nextSlide = 1;
- opts.currSlide = 0;
- }
- else {
- opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
- opts.currSlide = roll ? 0 : opts.nextSlide+1;
- }
- }
- else { // sequence
- roll = (opts.nextSlide + 1) == els.length;
- if (roll && opts.bounce) {
- opts.backwards = !opts.backwards;
- opts.nextSlide = els.length-2;
- opts.currSlide = els.length-1;
- }
- else {
- opts.nextSlide = roll ? 0 : opts.nextSlide+1;
- opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
- }
- }
- }
- if (changed && opts.pager)
- opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
-
- function queueNext() {
- // stage the next transition
- var ms = 0, timeout = opts.timeout;
- if (opts.timeout && !opts.continuous) {
- ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
- if (opts.fx == 'shuffle')
- ms -= opts.speedOut;
- }
- else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
- ms = 10;
- if (ms > 0)
- p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
- }
-}
-
-// invoked after transition
-$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
- $(pager).each(function() {
- $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
- });
-};
-
-// calculate timeout value for current transition
-function getTimeout(curr, next, opts, fwd) {
- if (opts.timeoutFn) {
- // call user provided calc fn
- var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
- while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
- t += opts.speed;
- debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
- if (t !== false)
- return t;
- }
- return opts.timeout;
-}
-
-// expose next/prev function, caller must pass in state
-$.fn.cycle.next = function(opts) { advance(opts,1); };
-$.fn.cycle.prev = function(opts) { advance(opts,0);};
-
-// advance slide forward or back
-function advance(opts, moveForward) {
- var val = moveForward ? 1 : -1;
- var els = opts.elements;
- var p = opts.$cont[0], timeout = p.cycleTimeout;
- if (timeout) {
- clearTimeout(timeout);
- p.cycleTimeout = 0;
- }
- if (opts.random && val < 0) {
- // move back to the previously display slide
- opts.randomIndex--;
- if (--opts.randomIndex == -2)
- opts.randomIndex = els.length-2;
- else if (opts.randomIndex == -1)
- opts.randomIndex = els.length-1;
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else if (opts.random) {
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else {
- opts.nextSlide = opts.currSlide + val;
- if (opts.nextSlide < 0) {
- if (opts.nowrap) return false;
- opts.nextSlide = els.length - 1;
- }
- else if (opts.nextSlide >= els.length) {
- if (opts.nowrap) return false;
- opts.nextSlide = 0;
- }
- }
-
- var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
- if ($.isFunction(cb))
- cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
- go(els, opts, 1, moveForward);
- return false;
-}
-
-function buildPager(els, opts) {
- var $p = $(opts.pager);
- $.each(els, function(i,o) {
- $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
- });
- opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
-}
-
-$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
- var a;
- if ($.isFunction(opts.pagerAnchorBuilder)) {
- a = opts.pagerAnchorBuilder(i,el);
- debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
- }
- else
- a = '<a href="#">'+(i+1)+'</a>';
-
- if (!a)
- return;
- var $a = $(a);
- // don't reparent if anchor is in the dom
- if ($a.parents('body').length === 0) {
- var arr = [];
- if ($p.length > 1) {
- $p.each(function() {
- var $clone = $a.clone(true);
- $(this).append($clone);
- arr.push($clone[0]);
- });
- $a = $(arr);
- }
- else {
- $a.appendTo($p);
- }
- }
-
- opts.pagerAnchors = opts.pagerAnchors || [];
- opts.pagerAnchors.push($a);
-
- var pagerFn = function(e) {
- e.preventDefault();
- opts.nextSlide = i;
- var p = opts.$cont[0], timeout = p.cycleTimeout;
- if (timeout) {
- clearTimeout(timeout);
- p.cycleTimeout = 0;
- }
- var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
- if ($.isFunction(cb))
- cb(opts.nextSlide, els[opts.nextSlide]);
- go(els,opts,1,opts.currSlide < i); // trigger the trans
-// return false; // <== allow bubble
- };
-
- if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
- $a.hover(pagerFn, function(){/* no-op */} );
- }
- else {
- $a.bind(opts.pagerEvent, pagerFn);
- }
-
- if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
- $a.bind('click.cycle', function(){return false;}); // suppress click
-
- var cont = opts.$cont[0];
- var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
- if (opts.pauseOnPagerHover) {
- $a.hover(
- function() {
- pauseFlag = true;
- cont.cyclePause++;
- triggerPause(cont,true,true);
- }, function() {
- if (pauseFlag)
- cont.cyclePause--;
- triggerPause(cont,true,true);
- }
- );
- }
-};
-
-// helper fn to calculate the number of slides between the current and the next
-$.fn.cycle.hopsFromLast = function(opts, fwd) {
- var hops, l = opts.lastSlide, c = opts.currSlide;
- if (fwd)
- hops = c > l ? c - l : opts.slideCount - l;
- else
- hops = c < l ? l - c : l + opts.slideCount - c;
- return hops;
-};
-
-// fix clearType problems in ie6 by setting an explicit bg color
-// (otherwise text slides look horrible during a fade transition)
-function clearTypeFix($slides) {
- debug('applying clearType background-color hack');
- function hex(s) {
- s = parseInt(s,10).toString(16);
- return s.length < 2 ? '0'+s : s;
- }
- function getBg(e) {
- for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
- var v = $.css(e,'background-color');
- if (v && v.indexOf('rgb') >= 0 ) {
- var rgb = v.match(/\d+/g);
- return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
- }
- if (v && v != 'transparent')
- return v;
- }
- return '#ffffff';
- }
- $slides.each(function() { $(this).css('background-color', getBg(this)); });
-}
-
-// reset common props before the next transition
-$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
- $(opts.elements).not(curr).hide();
- if (typeof opts.cssBefore.opacity == 'undefined')
- opts.cssBefore.opacity = 1;
- opts.cssBefore.display = 'block';
- if (opts.slideResize && w !== false && next.cycleW > 0)
- opts.cssBefore.width = next.cycleW;
- if (opts.slideResize && h !== false && next.cycleH > 0)
- opts.cssBefore.height = next.cycleH;
- opts.cssAfter = opts.cssAfter || {};
- opts.cssAfter.display = 'none';
- $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
- $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
-};
-
-// the actual fn for effecting a transition
-$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
- var $l = $(curr), $n = $(next);
- var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
- $n.css(opts.cssBefore);
- if (speedOverride) {
- if (typeof speedOverride == 'number')
- speedIn = speedOut = speedOverride;
- else
- speedIn = speedOut = 1;
- easeIn = easeOut = null;
- }
- var fn = function() {
- $n.animate(opts.animIn, speedIn, easeIn, function() {
- cb();
- });
- };
- $l.animate(opts.animOut, speedOut, easeOut, function() {
- $l.css(opts.cssAfter);
- if (!opts.sync)
- fn();
- });
- if (opts.sync) fn();
-};
-
-// transition definitions - only fade is defined here, transition pack defines the rest
-$.fn.cycle.transitions = {
- fade: function($cont, $slides, opts) {
- $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
- opts.before.push(function(curr,next,opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.opacity = 0;
- });
- opts.animIn = { opacity: 1 };
- opts.animOut = { opacity: 0 };
- opts.cssBefore = { top: 0, left: 0 };
- }
-};
-
-$.fn.cycle.ver = function() { return ver; };
-
-// override these globally if you like (they are all optional)
-$.fn.cycle.defaults = {
- activePagerClass: 'activeSlide', // class name used for the active pager link
- after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
- allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
- animIn: null, // properties that define how the slide animates in
- animOut: null, // properties that define how the slide animates out
- aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
- autostop: 0, // true to end slideshow after X transitions (where X == slide count)
- autostopCount: 0, // number of transitions (optionally used with autostop to define X)
- backwards: false, // true to start slideshow at last slide and move backwards through the stack
- before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
- center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
- cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
- cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
- containerResize: 1, // resize container to fit largest slide
- containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic
- continuous: 0, // true to start next transition immediately after current one completes
- cssAfter: null, // properties that defined the state of the slide after transitioning out
- cssBefore: null, // properties that define the initial state of the slide before transitioning in
- delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
- easeIn: null, // easing for "in" transition
- easeOut: null, // easing for "out" transition
- easing: null, // easing method for both in and out transitions
- end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
- fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
- fit: 0, // force slides to fit container
- fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
- fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
- height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
- manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
- metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
- next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
- nowrap: 0, // true to prevent slideshow from wrapping
- onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
- onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
- pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
- pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
- pagerEvent: 'click.cycle', // name of event which drives the pager navigation
- pause: 0, // true to enable "pause on hover"
- pauseOnPagerHover: 0, // true to pause when hovering over pager link
- prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
- prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
- random: 0, // true for random, false for sequence (not applicable to shuffle fx)
- randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
- requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
- requeueTimeout: 250, // ms delay for requeue
- rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
- shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
- skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
- slideExpr: null, // expression for selecting slides (if something other than all children is required)
- slideResize: 1, // force slide width/height to fixed size before every transition
- speed: 1000, // speed of the transition (any valid fx speed value)
- speedIn: null, // speed of the 'in' transition
- speedOut: null, // speed of the 'out' transition
- startingSlide: undefined,// zero-based index of the first slide to be displayed
- sync: 1, // true if in/out transitions should occur simultaneously
- timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
- timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
- updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
- width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
-};
-
-})(jQuery);
-
-
-/*!
- * jQuery Cycle Plugin Transition Definitions
- * This script is a plugin for the jQuery Cycle Plugin
- * Examples and documentation at: http://malsup.com/jquery/cycle/
- * Copyright (c) 2007-2010 M. Alsup
- * Version: 2.73
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-(function($) {
-"use strict";
-
-//
-// These functions define slide initialization and properties for the named
-// transitions. To save file size feel free to remove any of these that you
-// don't need.
-//
-$.fn.cycle.transitions.none = function($cont, $slides, opts) {
- opts.fxFn = function(curr,next,opts,after){
- $(next).show();
- $(curr).hide();
- after();
- };
-};
-
-// not a cross-fade, fadeout only fades out the top slide
-$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
- $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
- opts.before.push(function(curr,next,opts,w,h,rev) {
- $(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
- $(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
- });
- opts.animIn.opacity = 1;
- opts.animOut.opacity = 0;
- opts.cssBefore.opacity = 1;
- opts.cssBefore.display = 'block';
- opts.cssAfter.zIndex = 0;
-};
-
-// scrollUp/Down/Left/Right
-$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var h = $cont.height();
- opts.cssBefore.top = h;
- opts.cssBefore.left = 0;
- opts.cssFirst.top = 0;
- opts.animIn.top = 0;
- opts.animOut.top = -h;
-};
-$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var h = $cont.height();
- opts.cssFirst.top = 0;
- opts.cssBefore.top = -h;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.top = h;
-};
-$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var w = $cont.width();
- opts.cssFirst.left = 0;
- opts.cssBefore.left = w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = 0-w;
-};
-$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var w = $cont.width();
- opts.cssFirst.left = 0;
- opts.cssBefore.left = -w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = w;
-};
-$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
- $cont.css('overflow','hidden').width();
- opts.before.push(function(curr, next, opts, fwd) {
- if (opts.rev)
- fwd = !fwd;
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
- opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
- });
- opts.cssFirst.left = 0;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.top = 0;
-};
-$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push(function(curr, next, opts, fwd) {
- if (opts.rev)
- fwd = !fwd;
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
- opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.left = 0;
-};
-
-// slideX/slideY
-$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $(opts.elements).not(curr).hide();
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.animIn.width = next.cycleW;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
- opts.animIn.width = 'show';
- opts.animOut.width = 0;
-};
-$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $(opts.elements).not(curr).hide();
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.animIn.height = next.cycleH;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.height = 0;
- opts.animIn.height = 'show';
- opts.animOut.height = 0;
-};
-
-// shuffle
-$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
- var i, w = $cont.css('overflow', 'visible').width();
- $slides.css({left: 0, top: 0});
- opts.before.push(function(curr,next,opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- });
- // only adjust speed once!
- if (!opts.speedAdjusted) {
- opts.speed = opts.speed / 2; // shuffle has 2 transitions
- opts.speedAdjusted = true;
- }
- opts.random = 0;
- opts.shuffle = opts.shuffle || {left:-w, top:15};
- opts.els = [];
- for (i=0; i < $slides.length; i++)
- opts.els.push($slides[i]);
-
- for (i=0; i < opts.currSlide; i++)
- opts.els.push(opts.els.shift());
-
- // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
- opts.fxFn = function(curr, next, opts, cb, fwd) {
- if (opts.rev)
- fwd = !fwd;
- var $el = fwd ? $(curr) : $(next);
- $(next).css(opts.cssBefore);
- var count = opts.slideCount;
- $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
- var hops = $.fn.cycle.hopsFromLast(opts, fwd);
- for (var k=0; k < hops; k++) {
- if (fwd)
- opts.els.push(opts.els.shift());
- else
- opts.els.unshift(opts.els.pop());
- }
- if (fwd) {
- for (var i=0, len=opts.els.length; i < len; i++)
- $(opts.els[i]).css('z-index', len-i+count);
- }
- else {
- var z = $(curr).css('z-index');
- $el.css('z-index', parseInt(z,10)+1+count);
- }
- $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
- $(fwd ? this : curr).hide();
- if (cb) cb();
- });
- });
- };
- $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
-};
-
-// turnUp/Down/Left/Right
-$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.cssBefore.top = next.cycleH;
- opts.animIn.height = next.cycleH;
- opts.animOut.width = next.cycleW;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.cssBefore.height = 0;
- opts.animIn.top = 0;
- opts.animOut.height = 0;
-};
-$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.height = 0;
- opts.animOut.height = 0;
-};
-$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.cssBefore.left = next.cycleW;
- opts.animIn.width = next.cycleW;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
- opts.animIn.left = 0;
- opts.animOut.width = 0;
-};
-$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.animIn.width = next.cycleW;
- opts.animOut.left = curr.cycleW;
- });
- $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
- opts.animIn.left = 0;
- opts.animOut.width = 0;
-};
-
-// zoom
-$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,false,true);
- opts.cssBefore.top = next.cycleH/2;
- opts.cssBefore.left = next.cycleW/2;
- $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
- $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
- });
- opts.cssFirst.top = 0;
- opts.cssFirst.left = 0;
- opts.cssBefore.width = 0;
- opts.cssBefore.height = 0;
-};
-
-// fadeZoom
-$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,false);
- opts.cssBefore.left = next.cycleW/2;
- opts.cssBefore.top = next.cycleH/2;
- $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
- });
- opts.cssBefore.width = 0;
- opts.cssBefore.height = 0;
- opts.animOut.opacity = 0;
-};
-
-// blindX
-$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
- var w = $cont.css('overflow','hidden').width();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.width = next.cycleW;
- opts.animOut.left = curr.cycleW;
- });
- opts.cssBefore.left = w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = w;
-};
-// blindY
-$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
- var h = $cont.css('overflow','hidden').height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssBefore.top = h;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.top = h;
-};
-// blindZ
-$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
- var h = $cont.css('overflow','hidden').height();
- var w = $cont.width();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssBefore.top = h;
- opts.cssBefore.left = w;
- opts.animIn.top = 0;
- opts.animIn.left = 0;
- opts.animOut.top = h;
- opts.animOut.left = w;
-};
-
-// growX - grow horizontally from centered 0 width
-$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.cssBefore.left = this.cycleW/2;
- opts.animIn.left = 0;
- opts.animIn.width = this.cycleW;
- opts.animOut.left = 0;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
-};
-// growY - grow vertically from centered 0 height
-$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.cssBefore.top = this.cycleH/2;
- opts.animIn.top = 0;
- opts.animIn.height = this.cycleH;
- opts.animOut.top = 0;
- });
- opts.cssBefore.height = 0;
- opts.cssBefore.left = 0;
-};
-
-// curtainX - squeeze in both edges horizontally
-$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true,true);
- opts.cssBefore.left = next.cycleW/2;
- opts.animIn.left = 0;
- opts.animIn.width = this.cycleW;
- opts.animOut.left = curr.cycleW/2;
- opts.animOut.width = 0;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
-};
-// curtainY - squeeze in both edges vertically
-$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false,true);
- opts.cssBefore.top = next.cycleH/2;
- opts.animIn.top = 0;
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH/2;
- opts.animOut.height = 0;
- });
- opts.cssBefore.height = 0;
- opts.cssBefore.left = 0;
-};
-
-// cover - curr slide covered by next slide
-$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
- var d = opts.direction || 'left';
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssAfter.display = '';
- if (d == 'right')
- opts.cssBefore.left = -w;
- else if (d == 'up')
- opts.cssBefore.top = h;
- else if (d == 'down')
- opts.cssBefore.top = -h;
- else
- opts.cssBefore.left = w;
- });
- opts.animIn.left = 0;
- opts.animIn.top = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.left = 0;
-};
-
-// uncover - curr slide moves off next slide
-$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
- var d = opts.direction || 'left';
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- if (d == 'right')
- opts.animOut.left = w;
- else if (d == 'up')
- opts.animOut.top = -h;
- else if (d == 'down')
- opts.animOut.top = h;
- else
- opts.animOut.left = -w;
- });
- opts.animIn.left = 0;
- opts.animIn.top = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.left = 0;
-};
-
-// toss - move top slide and fade away
-$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
- var w = $cont.css('overflow','visible').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- // provide default toss settings if animOut not provided
- if (!opts.animOut.left && !opts.animOut.top)
- $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
- else
- opts.animOut.opacity = 0;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
-};
-
-// wipe - clip animation
-$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.cssBefore = opts.cssBefore || {};
- var clip;
- if (opts.clip) {
- if (/l2r/.test(opts.clip))
- clip = 'rect(0px 0px '+h+'px 0px)';
- else if (/r2l/.test(opts.clip))
- clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
- else if (/t2b/.test(opts.clip))
- clip = 'rect(0px '+w+'px 0px 0px)';
- else if (/b2t/.test(opts.clip))
- clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
- else if (/zoom/.test(opts.clip)) {
- var top = parseInt(h/2,10);
- var left = parseInt(w/2,10);
- clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
- }
- }
-
- opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
-
- var d = opts.cssBefore.clip.match(/(\d+)/g);
- var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
-
- opts.before.push(function(curr, next, opts) {
- if (curr == next) return;
- var $curr = $(curr), $next = $(next);
- $.fn.cycle.commonReset(curr,next,opts,true,true,false);
- opts.cssAfter.display = 'block';
-
- var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
- (function f() {
- var tt = t ? t - parseInt(step * (t/count),10) : 0;
- var ll = l ? l - parseInt(step * (l/count),10) : 0;
- var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
- var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
- $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
- (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
- })();
- });
- $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
- opts.animIn = { left: 0 };
- opts.animOut = { left: 0 };
-};
-
-})(jQuery);
+++ /dev/null
-(function($){
-$(function() {
-
-
-function scrollTo(thing) {
- $('html, body').scrollTop($(thing).offset().top - $('#level-chooser').outerHeight());
-}
-
-function updateView() {
- var scrolltop = $(window).scrollTop();
-
- $('#level-chooser-place').each(function(i, el){
- if (scrolltop > $(el).offset().top) {
- $("#level-chooser").addClass("fixed");
- }
- else {
- $("#level-chooser").removeClass("fixed");
- }
- });
-
- $('.level-toc').each(function(i, el) {
- var $sect = $($(el).parent());
- var menu_top = $('#level-chooser').outerHeight();
- var menu_scrolltop = scrolltop + menu_top;
-
- if (menu_scrolltop + 2 >= $sect.offset().top &&
- menu_scrolltop < $sect.offset().top + $sect.outerHeight()) {
- $(el).addClass("fixed").css("top", Math.min(
- menu_top,
- - scrolltop + $sect.offset().top + $sect.outerHeight() - $(el).outerHeight()
- ));
- $("#level-chooser a[href='#" + $sect.attr('id') + "']").addClass('active');
- }
- else {
- $(el).removeClass("fixed");
- $("#level-chooser a[href='#" + $sect.attr('id') + "']").removeClass('active');
- }
- });
-}
-
-
-
-$("#level-chooser a, .level-toc a").click(function(ev) {
- ev.preventDefault();
- scrollTo($(this).attr('href'));
-});
-
-
-
-
-
-updateView();
-$(document).scroll(updateView);
-if (window.location.hash) {
- scrollTo(window.location.hash);
-}
-
-
-});
-})(jQuery);
+++ /dev/null
-(function($){
-$(function() {
-
-
-$('a.image').colorbox({
- maxWidth: '100%',
- maxHeight: '100%',
-});
-
-
-});
-})($);
+++ /dev/null
-<ol class="link-list">
-{% for post in posts %}
- <li><a href="{{ post.link }}">{{ post.title }}</a></li>
-{% endfor %}
-</ol>
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-{% load static from staticfiles %}
-
-{% block lesson-info %}
-<section class="box">
- <div class="box-icon"><img src="/static/img/icons/activity-time.png"><br>45m</div>
-
- {% include "catalogue/lesson/box-icons.html" %}
-
- <p>Ta lekcja jest częścią tematu
- <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}_varsaviana"><strong>Edukacja varsavianistyczna</strong></a>
- na poziomie {{ object.level|lower }}.
- </p>
- <div style="clear: right"></div>
-</section>
-
-{% endblock %}
-
-
-{% block sidebar-top %}
-<div class="buttons" style="padding-bottom: 1em; border-bottom: 1px solid red;">
-
-{% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
-{% endif %}
-{% if object.student_package %}
- <section><a href="{{ object.student_package.url }}" class="dl-button">Pobierz lekcję w wersji dla ucznia</a></section>
-{% endif %}
-
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-{% load static from staticfiles %}
-
-{% block lesson-info %}
-<section class="box">
- <div class="box-icon"><img src="/static/img/icons/activity-time.png"><br>45m</div>
-
- {% include "catalogue/lesson/box-icons.html" %}
-
- <p>Ta lekcja jest częścią tematu
- <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}_filmowa"><strong>Edukacja filmowa</strong></a>
- na poziomie {{ object.level|lower }}.
- </p>
- <div style="clear: right"></div>
-</section>
-
-{% endblock %}
-
-
-{% block sidebar-top %}
-<div class="buttons" style="padding-bottom: 1em; border-bottom: 1px solid red;">
-
-{% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
-{% endif %}
-{% if object.student_package %}
- <section><a href="{{ object.student_package.url }}" class="dl-button">Pobierz lekcję w wersji dla ucznia</a></section>
-{% endif %}
-
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-
-{% block lesson-info %}
-{% endblock %}
-
-
-{% block suggest-link %}
-<a href="{% url 'contact_form' 'sugestie' %}?temat={{ object.title|urlencode }}">
- Zgłoś swoją uwagę na temat tej strony.
-</a>
-{% endblock %}
+++ /dev/null
-{% load static from staticfiles %}
-{% if object.requires_internet %}
-<div class="box-icon"><img src="{% static 'img/icons/internet_black.png' %}"
- title="Wymaga dostępu do Internetu"
- alt="Wymaga dostępu do Internetu"
- ><br>Internet</div>
-{% else %}
-<div class="box-icon"><img src="{% static 'img/icons/nointernet_black.png' %}"
- title="Nie wymaga dostępu do Internetu"
- alt="Nie wymaga dostępu do Internetu"
- ><br>Bez Internetu</div>
-{% endif %}
-{% if publisher %}
-<div class="box-icon"><img src="{{ publisher.logo.url }}"
- title="{{ publisher.name }}"
- alt="{{ publisher.name }}"
- ></div>
-{% endif %}
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-{% load static from staticfiles %}
-
-{% block lesson-info %}
-<section class="box">
- <div class="box-icon"><img src="/static/img/icons/activity-time.png"><br>45m</div>
-
- {% include "catalogue/lesson/box-icons.html" %}
-
- <p>Ta lekcja jest częścią tematu
- <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}_{{ object.section.slug }}"><strong>{{ object.section }}</strong></a>
- na poziomie {{ object.level|lower }}.
- </p>
- <div style="clear: right"></div>
-</section>
-
-{% endblock %}
-
-
-{% block sidebar-top %}
-<div class="buttons" style="padding-bottom: 1em; border-bottom: 1px solid red;">
-
-{% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
-{% endif %}
-{% if object.student_package %}
- <section><a href="{{ object.student_package.url }}" class="dl-button">Pobierz lekcję w wersji dla ucznia</a></section>
-{% endif %}
-
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load lesson_link lesson_nav person_list from catalogue_tags %}
-{% load competence curriculum url_for_level from curriculum_tags %}
-
-
-{% block title %}{{ object }}{% endblock %}
-
-{% block body %}
- <!--h1>{{ object }}</h1-->
-
-<aside id="sidebar">
- {% block sidebar-top %}{% endblock %}
-
- <section class="section">
- {% lesson_nav object %}
- </section>
-
- {% if object.dc.relations %}
- <section class="section-minor">
- <h1>Powiązane lekcje</h1>
- <ul class="link-list link-list-colored">
- {% for uri in object.dc.relations %}
- <li>{% lesson_link uri %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
- {% if object.dc.competences %}
- <section class="section-minor">
- <h1>Kompetencje:</h1>
- <ul class="plain">
- {% competence object.dc.competences object.level %}
- </ul>
- </section>
- {% endif %}
-
- {% if object.dc.curriculum %}
- <section class="section-minor">
- <h1>Podstawa programowa:</h1>
- <ul class="plain">
- {% curriculum object.dc.curriculum %}
- </ul>
- </section>
- {% endif %}
-
- <section class="section-micro">
- <h1>Informacje:</h1>
- <p>
- {% if object.dc.authors_textbook %}
- Tekst: {{ object.dc.authors_textbook|person_list }}<br/>
- {% endif %}
- {% if object.dc.authors_scenario %}
- Scenariusz: {{ object.dc.authors_scenario|person_list }}<br/>
- {% endif %}
- {% if object.dc.authors_expert %}
- Konsultacja merytoryczna: {{ object.dc.authors_expert|person_list }}<br/>
- {% endif %}
- {% if object.dc.authors_methodologist %}
- Konsultacja metodyczna: {{ object.dc.authors_methodologist|person_list }}<br/>
- {% endif %}
- Licencja: <a href="{{ object.dc.license }}">{{ object.dc.license_description }}</a>.</p>
- </section>
-
- <section class="section-micro">
- <h1>Narzędzia:</h1>
- <ul class="link-list">
- <li><a href="{{ object.xml_file.url }}">źródłowy plik XML</a></li>
- <!--li><a href="{{ object.dc.about }}">lekcja na Platformie Redakcyjnej</a></li-->
- </ul>
- </section>
-
- <section class="section-micro">
- <p>{{ object.dc.description }}</p>
- </section>
-
-</aside>
-
-<div id="main-bar">
-
-{% block lesson-info %}
-{% endblock %}
-
-{{ object.html_file.read|safe }}
-
-
-<a class="top-link" href="#">wróć na górę</a>
-<footer class="lesson-footer">
-
-{% if object.section %}
-
-<p class="section-info"><a href="{{ object.section.get_absolute_url }}">Temat: {{ object.section }}</a>
-<br/>(<a href="{% url 'catalogue_lessons' %}">spis wszystkich lekcji</a>)</p>
-
-<p>
-{% with object.get_previous as previous %}
- {% if previous %}
- <a class="previous-lesson" href="{{ previous.get_absolute_url }}">← {{ previous }}</a>
- {% endif %}
-{% endwith %}
-
-{% with object.get_next as next %}
- {% if next %}
- <a class="next-lesson" href="{{ next.get_absolute_url }}">{{ next }} →</a>
- {% endif %}
-{% endwith %}
-</p>
-{% endif %}
-
-<div class="clr"></div>
-
-<p class="section-info">
- {% block suggest-link %}
- <a href="{% url 'contact_form' 'sugestie' %}?temat={{ 'Lekcja: '|add:object.title|urlencode }}">
- Zgłoś swoją uwagę na temat tej lekcji.
- </a>
- {% endblock %}
-</p>
-
-</footer>
-
-
-{% if request.user.is_authenticated and object.forum_topics.all.count %}
- <h2>Na forum</h2>
- <ul>
- {% for forum_topic in object.forum_topics.all %}
- <li><a href="{{forum_topic.pybb_topic.get_absolute_url}}">{{forum_topic.pybb_topic.name}}</a></li>
- {% endfor %}
- </ul>
-{% endif %}
-
-</div>
-
-{% endblock %}
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-
-{% block lesson-info %}
-<section class="box">
- {% if publisher %}
- <div class="box-icon"><img src="{{ publisher.logo.url }}"
- title="{{ publisher.name }}"
- alt="{{ publisher.name }}"
- ></div>
- {% endif %}
-
- <p>To jest <a href="{% url 'info' 'metoda-projektowa' %}">projekt</a>
- na poziomie
- <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}">{{ object.level|lower }}</a>.
- </p>
-</section>
-{% endblock %}
-
-
-
-{% block sidebar-top %}
-
-
-{% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz cały projekt</a></section>
-{% endif %}
-
-{% endblock %}
+++ /dev/null
-{% extends "catalogue/lesson/lesson_detail.html" %}
-
-{% block lesson-info %}
-<section class="box">
- <div class="box-icon"><img src="/static/img/icons/activity-time.png"><br>45m</div>
-
- {% include "catalogue/lesson/box-icons.html" %}
-
- <p>Ta lekcja jest częścią skróconego kursu na poziomie {{ object.level|lower }}.
- Zobacz też <a href="{% url 'catalogue_lessons' %}#{{ object.level.slug }}_pelny">pełny kurs</a>.
- </p>
- <div style="clear: right"></div>
-</section>
-{% endblock %}
-
-{% block sidebar-top %}
-
-{% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
-{% endif %}
-{% if object.student_package %}
- <section><a href="{{ object.student_package.url }}" class="dl-button">Pobierz lekcję w wersji dla ucznia</a></section>
-{% endif %}
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load catalogue_tags %}
-{% load static from staticfiles %}
-{% load course_boxes course_boxes_toc from curriculum_tags %}
-{% load chunk from chunks %}
-
-{% block title %}Lekcje{% endblock %}
-
-{% block body %}
- <h1>Lekcje</h1>
-
-<aside id="sidebar">
- <section class="section-minor">
- <h1>Zebrane dla wszystkich tematów</h1>
- <ul class="link-list">
- {% for lesson in appendix %}
- <li><a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a></li>
- {% endfor %}
- <li><a href="{% url 'info' 'infografiki' %}">Infografiki</a></li>
- </ul>
- </section>
- {% chunk 'lesson_list_sidebar' %}
-</aside>
-
-<div id="main-bar">
- <div class="box">
- {% chunk 'levels_disclaimer' %}
- </div>
-
- <div id="level-chooser-place">
- <ul id="level-chooser">
- <li class="home"><a href="#body"><img src="{% static 'img/logo-oc.png' %}" /></a></li>
- {% for object in object_list %}
- <li><a href="#{{ object.slug }}">{{ object }}</a></li>
- {% endfor %}
- </ul>
- </div>
-
-
-
- {% for level in object_list %}
- {% level_box level %}
- {% endfor %}
-</div>
-
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load catalogue_tags %}
-
-{% block title %}{{ object }}{% endblock %}
-
-{% block body %}
- <h1>{{ object }}</h1>
- {% section_box object %}
-
-
-{% endblock %}
+++ /dev/null
-{% load thumbnail %}
-{% url 'catalogue_lessons' as lessons %}
-<section id="catalogue-carousel">
- <ul id="catalogue-carousel-links">
- {% for section in object_list %}
- <li style="{% if section.pic %}{% thumbnail section.pic '460x235' crop='center' as th %}background-image: url('{{ th.url }}');{% endthumbnail %}{% endif %}">
- <a href="{{ lessons }}#gimnazjum_{{ section.slug }}" class="catalogue-carousel-link">
- <div class="catalogue-carousel-note">
- <div>
- <p>
- <strong>{{ section }}</strong>
- {{ section.summary }}
- <span class="more">zobacz →</span>
- </p>
- </div>
- </div>
- </a>
- <a class="attribution" href="{{ section.pic_src }}">fot. {{ section.pic_attribution }}</a>
- </li>
- {% endfor %}
- </ul>
- <ul id="catalogue-carousel-switcher">
- {% for section in object_list %}
- <li><a href="{{ section.get_absolute_url }}">{{ section }}</a></li>
- {% endfor %}
- </ul>
-</section>
+++ /dev/null
-{% if lesson %}<a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a>{% endif %}
+++ /dev/null
-<h1>
-{% if root %}
- <a href="{{ root.get_absolute_url }}">{{ root }}, <br>{{ lesson.level }}</a>
-{% elif lesson.type == 'synthetic' %}
- <a href="{% url 'catalogue_lessons' %}">Kurs skrócony, <br>{{ lesson.level }}</a>
-{% elif lesson.type == 'project' %}
- <a href="{% url 'catalogue_lessons' %}">Projekty, <br>{{ lesson.level }}</a>
-{% elif lesson.type == 'added' %}
- <a href="{% url 'catalogue_lessons' %}#liceum_filmowa">Edukacja filmowa</a>
-{% elif lesson.type == 'added-var' %}
- <a href="{% url 'catalogue_lessons' %}#liceum_varsaviana">Edukacja varsavianistyczna</a>
-{% else %}
- <a href="{% url 'catalogue_lessons' %}">Inne</a>
-{% endif %}
-</h1>
-
-<ul>
-{% for item in siblings %}
- <li>
- {% if item == lesson %}
- <strong>{{ item }}</strong>
- {% else %}
- <a href="{{ item.get_absolute_url }}">{{ item }}</a>
- {% endif %}
- </li>
-{% endfor %}
-</ul>
+++ /dev/null
-{% if lesson.slug %}
- <a href="{{ lesson.get_absolute_url }}" title="{{ lesson.description }}">
-{% endif %}
-{{ lesson }}
-{% if lesson.slug %}
- </a>
-{% else %}
-(w przygotowaniu)
-{% endif %}
+++ /dev/null
-<section id="{{ level.slug }}" class="level" style="margin-left: 20em">
-
- <section class="box level-toc" style="float: left; margin-left: -20em; width: 15em;">
- <strong><a href="#{{ level.slug }}">{{ level }}</a></strong>
- <ul class="link-list" style="list-style: none; padding: 0; margin: 0;">
- {% if lessons.synthetic %}
- <li><a href="#{{ level.slug }}_skrocony">Skrócony kurs</a></li>
- {% endif %}
- {% if lessons.course %}
- <li><a href="#{{ level.slug }}_pelny">Pełny kurs</a>
- <ul style="list-style: none; padding: 0 0 0 1em; margin: 0;">
- {% for section in lessons.course %}
- <li><a href="#{{ level.slug }}_{{ section.slug}}">{{ section }}</a></li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- {% if lessons.project %}
- <li><a href="#{{ level.slug }}_projekty">Projekty</a></li>
- {% endif %}
- {% if lessons.appendix %}
- <li><a href="#{{ level.slug }}_pozostale">Pozostałe materiały</a></li>
- {% endif %}
-
- {% if courses %}
- <li class="curriculumcourses"><a href="#{{ level.slug }}_podstawa">Według postawy programowej</a>
- <ul style="list-style: none; padding: 0 0 0 1em; margin: 0;">
- {% for course, lessons in courses %}
- <li><a href="#{{ level.slug }}_{{ course.slug}}">{{ course }}</a></li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
-
- {% if added %}
- <li class="curriculumcourses"><a href="#{{ level.slug }}_inne">Inne</a>
- <ul style="list-style: none; padding: 0 0 0 1em; margin: 0;">
- {% for item in added %}
- <li><a href="#{{ level.slug }}_{{ item.slug }}">{{ item.title }}</a></li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
-
- </ul>
-
-
- </section>
-
-
-
- <h1>{{ level }}</h1>
-
- <section class="box-button button"><a href="{{ level.package.url }}" class="dl-button">Pobierz wszystkie lekcje</a></section>
- <section class="button"><a href="{{ level.student_package.url }}" class="dl-button">Pobierz wszystkie lekcje w wersji dla ucznia</a></section>
-
- {% if lessons.synthetic %}
- <section id="{{ level.slug }}_skrocony">
- <h1>Skrócony kurs</h1>
-
- <p>Masz kilka godzin? Przeprowadź po jednej lekcji przeglądowej z każdego tematu.</p>
-
- <ul class="link-list">
- {% for lesson in lessons.synthetic %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
-
- {% if lessons.course %}
- <section id="{{ level.slug }}_pelny">
- <h1>Pełny kurs</h1>
-
- <p>Masz więcej czasu? Zrealizuj kompletny program edukacji medialnej.</p>
-
- {% for section, s_lessons in lessons.course.items %}
- <section id="{{ level.slug }}_{{ section.slug}}">
- <h1>{{ section }}</h1>
-
- <ul class="link-list">
- {% for lesson in s_lessons %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endfor %}
-
- </section>
- {% endif %}
-
-
- {% if lessons.project %}
- <section id="{{ level.slug }}_projekty">
- <h1>Projekty</h1>
-
- <p>Masz 4-6 tygodni? Zrealizuj jeden z projektów ze swoimi uczniami.</p>
-
- <ul class="link-list">
- {% for lesson in lessons.project %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
-
- {% if courses %}
- <section id="{{ level.slug }}_podstawa">
- <h1>Według podstawy programowej</h1>
-
- {% for course, lessons in courses %}
- <section id="{{ level.slug}}_{{ course.slug }}">
- <h1>{{ course }}</h1>
-
- {% if lessons.synthetic %}
- <section>
- <h1>Z kursu skróconego</h1>
- <ul class="link-list">
- {% for lesson in lessons.synthetic %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
- {% if lessons.course %}
- <section>
- <h1>Z kursu pełnego</h1>
- <ul class="link-list">
- {% for lesson in lessons.course %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
- {% if lessons.project %}
- <section>
- <h1>Projekty</h1>
- <ul class="link-list">
- {% for lesson in lessons.project %}
- <li>{% include "catalogue/snippets/lesson_or_stub.html" %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
- </section>
- {% endfor %}
-
- </section>
- {% endif %}
-
-
- {% if added %}
- <section id="{{ level.slug }}_inne">
- <h1>Inne</h1>
-
- {% for item in added %}
- <section id="{{ level.slug }}_{{ item.slug }}">
- <h1>{{ item.title }}</h1>
-
- <ul class="link-list">
- {% for lesson in item.lessons %}
- <li><a href="{{ lesson.get_absolute_url }}" title="{{ lesson.description }}">{{ lesson }}</a></li>
- {% endfor %}
- </ul>
- </section>
- {% endfor %}
- </section>
- {% endif %}
-
-
-</section>
+++ /dev/null
-{% load i18n %}
-<style type="text/css">
-#main-sections ul li {width: {{ section_width }}px;}
-#main-sections ul li a {width: {{ section_width|add:"-10" }}px;}
-.levelth {width: {{ section_width }}px;}
-</style>
-{% url 'catalogue_lessons' as les %}
-<ul class="section-buttons">
-{% for level in object_list %}
-<li class="box{{ level.pk }}">
- <a href="{{ les }}#{{ level.slug }}">
- <span class="in-box">
- <span class="name">{{ level }}</span>
- {% if level.length_synthetic %}{{ level.length_synthetic }} lub {% endif %}{{ level.length_course }} godzin
- </span>
- </a>
-</li>
-{% endfor %}
-<li class="box6">
- <a href="{{ les }}#liceum_filmowa">
- <span class="in-box">
- <span class="name">Edukacja filmowa</span>
- 8 godzin
- </span>
- </a>
-</li>
-<li class="box7">
- <a href="{{ les }}#liceum_varsaviana">
- <span class="in-box">
- <span class="name">Edukacja varsavianistyczna</span>
- 10 godzin
- </span>
- </a>
-</li>
-
-</ul>
+++ /dev/null
-{{ object.html_file.read|striptags }}
+++ /dev/null
-# -*- coding: utf-8 -*-
-from collections import defaultdict
-from django import template
-from django.utils.datastructures import SortedDict
-from ..models import Lesson, Section
-from curriculum.models import Level, CurriculumCourse
-from librarian.dcparser import WLURI, Person
-
-register = template.Library()
-
-
-@register.inclusion_tag("catalogue/snippets/carousel.html")
-def catalogue_carousel():
- return {
- "object_list": Section.objects.all()
- }
-
-
-@register.inclusion_tag("catalogue/snippets/levels_main.html")
-def catalogue_levels_main():
- object_list = Level.objects.exclude(lesson=None)
- c = object_list.count()
- return {
- 'object_list': object_list,
- # 'section_width': (700 - 20 * (c - 1)) / c,
- 'section_width': (700 - 20 * 2) / 3
- }
-
-
-@register.inclusion_tag("catalogue/snippets/level_box.html")
-def level_box(level):
- lessons = {'synthetic': [], 'course': SortedDict(), 'project': []}
- by_course = defaultdict(lambda: defaultdict(list))
-
- lesson_lists = [alist for alist in [
- list(level.lesson_set.exclude(type='appendix').order_by('section__order', 'order')),
- list(level.lessonstub_set.all())
- ] if alist]
-
- while lesson_lists:
- min_index, min_list = min(enumerate(lesson_lists), key=lambda x: x[1][0].order)
- lesson = min_list.pop(0)
- if not min_list:
- lesson_lists.pop(min_index)
-
- if lesson.type == 'course':
- if lesson.section not in lessons['course']:
- lessons['course'][lesson.section] = []
- lessons['course'][lesson.section].append(lesson)
- elif lesson.type.startswith('added'):
- continue
- else:
- lessons[lesson.type].append(lesson)
-
- if hasattr(lesson, 'curriculum_courses'):
- for course in lesson.curriculum_courses.all():
- by_course[course][lesson.type].append(lesson)
-
- courses = [(course, by_course[course])
- for course in CurriculumCourse.objects.filter(lesson__level=level).distinct()]
-
- added = []
- if level.slug == 'liceum':
- added.append({
- 'slug': 'filmowa',
- 'title': u'Edukacja filmowa',
- 'lessons': [
- Lesson.objects.get(slug=s) for s in [
- 'film-co-to-wlasciwie-jest',
- 'scenariusz-scenopis-i-srodki-realizacyjne',
- 'kompozycja-obrazu-filmowego',
- 'praca-kamery-kadr-kat',
- 'montaz-materialu-filmowego',
- 'swiatlo-i-dzwiek-w-filmie',
- 'scenografia-charakteryzacja-kostiumy-i-aktorzy',
- 'narracja-w-filmie-tekst-i-fabula',
- ]
- ],
- })
- added.append({
- 'slug': 'varsaviana',
- 'title': u'Edukacja varsavianistyczna',
- 'lessons': [
- Lesson.objects.get(slug=s) for s in [
- 'czego-prus-w-lalce-o-zydach-nie-powiedzial',
- 'jak-zmienila-sie-warszawa-o-dworcu-dawniej-i-dzis',
- 'o-gwarze-praskiej',
- 'poznaj-i-pokaz-prage',
- 'praga-trzech-religii',
- 'sladami-zydow-w-warszawie',
- 'tajemnice-palacu-saskiego',
- 'warszawa-przedwojenne-miasto-neonow',
- 'warszawski-barok',
- 'ziemianska-jako-soczewka-swiata-lat-miedzywojennych',
- ]
- ],
- })
-
- return {
- "level": level,
- "lessons": lessons,
- "courses": courses,
- "added": added,
- }
-
-
-@register.inclusion_tag("catalogue/snippets/lesson_nav.html")
-def lesson_nav(lesson):
- if lesson.type == 'course':
- root = lesson.section
- siblings = Lesson.objects.filter(type='course', level=lesson.level, section=root)
- elif lesson.type == 'appendix':
- root = None
- siblings = Lesson.objects.filter(type=lesson.type)
- elif lesson.type == 'added':
- root = None
- siblings = [
- Lesson.objects.get(slug=s) for s in [
- 'film-co-to-wlasciwie-jest',
- 'scenariusz-scenopis-i-srodki-realizacyjne',
- 'kompozycja-obrazu-filmowego',
- 'praca-kamery-kadr-kat',
- 'montaz-materialu-filmowego',
- 'swiatlo-i-dzwiek-w-filmie',
- 'scenografia-charakteryzacja-kostiumy-i-aktorzy',
- 'narracja-w-filmie-tekst-i-fabula',
- ]
- ]
- else:
- root = None
- siblings = Lesson.objects.filter(type=lesson.type, level=lesson.level)
- return {
- "lesson": lesson,
- "root": root,
- "siblings": siblings,
- }
-
-
-@register.inclusion_tag("catalogue/snippets/lesson_link.html")
-def lesson_link(uri):
- try:
- return {'lesson': Lesson.objects.get(slug=WLURI(uri).slug)}
- except Lesson.DoesNotExist:
- return {}
-
-
-@register.filter
-def person_list(persons):
- return u", ".join(Person.from_text(p).readable() for p in persons)
-
-
-# FIXME: Move to fnpdjango
-import feedparser
-import datetime
-
-
-@register.inclusion_tag('catalogue/latest_blog_posts.html')
-def latest_blog_posts(feed_url, posts_to_show=5):
- try:
- feed = feedparser.parse(str(feed_url))
- posts = []
- for i in range(posts_to_show):
- pub_date = feed['entries'][i].updated_parsed
- published = datetime.date(pub_date[0], pub_date[1], pub_date[2])
- posts.append({
- 'title': feed['entries'][i].title,
- 'summary': feed['entries'][i].summary,
- 'link': feed['entries'][i].link,
- 'date': published,
- })
- return {'posts': posts}
- except:
- return {'posts': []}
+++ /dev/null
-# -*- coding: utf-8 -*-
-"""
-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)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, url
-from .views import LessonListView, LessonView
-
-urlpatterns = patterns(
- '',
- url(r'^$',
- LessonListView.as_view(),
- name="catalogue_lessons"),
- url(r'^(?P<slug>[^/]+)/$',
- LessonView.as_view(),
- name="catalogue_lesson"),
-)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.views.generic import DetailView, ListView
-
-from curriculum.models import Level
-from publishers.models import Publisher
-from .models import Lesson
-
-
-class LessonListView(ListView):
- queryset = Level.objects.exclude(lesson=None)
- template_name = "catalogue/lesson_list.html"
-
- def get_context_data(self, **kwargs):
- context = super(LessonListView, self).get_context_data(**kwargs)
- context['appendix'] = Lesson.objects.filter(type='appendix')
- return context
-
-
-class LessonView(DetailView):
- model = Lesson
-
- def get_template_names(self):
- return [
- 'catalogue/lesson/%s/lesson_detail.html' % self.object.type,
- 'catalogue/lesson/lesson_detail.html',
- ]
-
- def get_context_data(self, **kwargs):
- context = super(LessonView, self).get_context_data(**kwargs)
- try:
- context['publisher'] = Publisher.objects.get(
- name=context['object'].dc.get('publisher', '').strip())
- except (Publisher.DoesNotExist, Publisher.MultipleObjectsReturned):
- pass
- return context
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.contrib import admin
-
-from .models import CommentDocument
-
-
-class CommentDocumentAdmin(admin.ModelAdmin):
- prepopulated_fields = {"slug": ("name",)}
-
-admin.site.register(CommentDocument, CommentDocumentAdmin)
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-12-05 09:48+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-
-#: templates/comment/commentdocument_list.html:7
-#, python-format
-msgid ""
-"\n"
-" Take part in the consultation by filling in <a href=\"%(form_href)s"
-"\">the form</a> or comment on specific competencies in different thematic "
-"fields\n"
-" "
-msgstr ""
-"\n"
-" Weź udział w konsultacjach wypełniając <a href=\"%(form_href)s\">ten "
-"formularz</a> lub skomentuj szczegółowo kompetencje w poszczególnych "
-"obszarach tematycznych\n"
-" "
-
-#: templates/comment/commentdocument_list.html:17
-msgid ""
-"\n"
-" <p>To insert comments in a selected thematic field you need to "
-"register.</p>\n"
-"\n"
-" <p>How to do it?</p>\n"
-" <ol>\n"
-" <li>Click on a selected link from the list of the thematic "
-"fields.</li>\n"
-" <li>Choose \"Register\" option.</li>\n"
-" <li>Enter your data.</li>\n"
-" <li>Check your email for the message confirming the registration "
-"and click on the link included.</li>\n"
-" <li>Enter your username and password.</li>\n"
-" <li>Go back to the consultation page. Choose one of the fields, "
-"log in and share your comments.</li>\n"
-" </ol>\n"
-"\n"
-" <p>How to add a comment?</p>\n"
-" <ol>\n"
-" <li>Highlight a fragment of the text.</li>\n"
-" <li>Click on a yellow \"comment\" button on the left.</li>\n"
-" <li>Type in a subject and content of your comment.</li>\n"
-" <li>Save your comment.</li>\n"
-" </ol>\n"
-" "
-msgstr ""
-"\n"
-" <p>Aby wprowadzić szczegółowe komentarze w poszczególnych obszarach tematycznych konieczna jest rejestracja.</p>"
-" <p>Jak to zrobić?</p>"
-" <ol>"
-" <li>Kliknij w dowolny link z listy obszarów tematycznych.</li>"
-" <li>Wybierz opcję \"Register\" (Zarejestruj się).</li>"
-" <li>Wprowadź swoje dane (adres e-mail, imię, nazwisko). Kliknij zielony przycisk \"Register\".</li>"
-" <li>Na Twoje konto e-mail zostanie wysłana wiadomość potwierdzająca rejestrację. Kliknij w podany w niej link, aby aktywować swoje konto.</li>"
-" <li>Wprowadź nazwę użytkownika i hasło. Potwierdź zielonym przyciskiem.</li>"
-" <li>Wejdź ponownie na stronę http://katalog.edukacjamedialna.edu.pl/wez-udzial/. Wybierz interesujący Cię obszar tematyczny, zaloguj się i podziel się swoimi uwagami.</li>"
-" </ol>"
-" "
-" <p>Jak dodać komentarz?</p>"
-" <ol>"
-" <li>Zaznacz dowolny fragment tekstu.</li>"
-" <li>Wciśnij żółty przycisk \"comment\" po lewej stronie.</li>"
-" <li>W polu \"subject\" wpisz temat uwagi, a w polu \"content\" jej treść.</li>"
-" <li>Zapisz swój komentarz przyciskiem \"save\".</li>"
-" </ol>"
-" "
\ No newline at end of file
+++ /dev/null
-# -*- 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 'CommentDocument'
- db.create_table(u'comment_commentdocument', (
- (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255)),
- ('comment_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ))
- db.send_create_signal(u'comment', ['CommentDocument'])
-
-
- def backwards(self, orm):
- # Deleting model 'CommentDocument'
- db.delete_table(u'comment_commentdocument')
-
-
- models = {
- u'comment.commentdocument': {
- 'Meta': {'ordering': "['order']", 'object_name': 'CommentDocument'},
- 'comment_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
- }
- }
-
- complete_apps = ['comment']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'CommentDocument.language_code'
- db.add_column(u'comment_commentdocument', 'language_code',
- self.gf('django.db.models.fields.CharField')(default='pl', max_length=2),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'CommentDocument.language_code'
- db.delete_column(u'comment_commentdocument', 'language_code')
-
-
- models = {
- u'comment.commentdocument': {
- 'Meta': {'ordering': "['order']", 'object_name': 'CommentDocument'},
- 'comment_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language_code': ('django.db.models.fields.CharField', [], {'default': "'pl'", 'max_length': '2'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
- }
- }
-
- complete_apps = ['comment']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.db import models
-from django.core.urlresolvers import reverse
-
-
-class CommentDocument(models.Model):
- name = models.CharField(max_length=255, unique=True)
- slug = models.SlugField(max_length=255, unique=True)
- comment_id = models.CharField(max_length=255, unique=True)
- order = models.IntegerField()
- language_code = models.CharField(max_length=2, default='pl')
-
- class Meta:
- ordering = ['order']
-
- def __unicode__(self):
- return self.name
-
- def get_absolute_url(self):
- return reverse('comment_document', kwargs={'slug': self.slug})
+++ /dev/null
-{% extends "base_mil.html" %}
-
-{% block body %}
-
- <h1>{{object.name}}</h1>
-
- <iframe frameborder="0" src="{{comment_url}}/text/{{object.comment_id}}/comments_frame/?" style="height: 600px; width: 99.9%; position: relative; top: 0px;"></iframe>
-
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% extends "base_mil.html" %}
-{% load i18n %}
-
-
-{% block body %}
-
- <p>{% blocktrans with href=form_href %}
- Take part in the consultation by filling in <a href="{{form_href}}">the form</a> or comment on specific competencies in different thematic fields
- {% endblocktrans %}:</p>
-
- <ol>
- {% for document in object_list %}
- <li><a href="{{document.get_absolute_url}}">{{document.name}}</a></li>
- {% endfor %}
- </ol>
-
- {% blocktrans %}
- <p>To insert comments in a selected thematic field you need to register.</p>
-
- <p>How to do it?</p>
- <ol>
- <li>Click on a selected link from the list of the thematic fields.</li>
- <li>Choose "Register" option.</li>
- <li>Enter your data.</li>
- <li>Check your email for the message confirming the registration and click on the link included.</li>
- <li>Enter your username and password.</li>
- <li>Go back to the consultation page. Choose one of the fields, log in and share your comments.</li>
- </ol>
-
- <p>How to add a comment?</p>
- <ol>
- <li>Highlight a fragment of the text.</li>
- <li>Click on a yellow "comment" button on the left.</li>
- <li>Type in a subject and content of your comment.</li>
- <li>Save your comment.</li>
- </ol>
- {% endblocktrans %}
-
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, url
-
-from .views import CommentDocumentList, CommentDocument
-
-
-urlpatterns = patterns(
- '',
- url('^$', CommentDocumentList.as_view(), name='comment_document_index'),
- url('^(?P<slug>[^/]+)/$', CommentDocument.as_view(), name='comment_document')
-)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.views.generic import ListView, DetailView
-from django.conf import settings
-from django.utils.translation import get_language
-
-from django.core.urlresolvers import reverse
-
-from .models import CommentDocument as CommentDocumentModel
-
-
-class CommentDocumentList(ListView):
- model = CommentDocumentModel
-
- def get_queryset(self):
- return super(CommentDocumentList, self).get_queryset().filter(language_code=get_language())
-
- def get_context_data(self, **kwargs):
- context = super(CommentDocumentList, self).get_context_data(**kwargs)
- context['form_href'] = reverse('contact_form', kwargs={'form_tag': 'mil'})
- return context
-
-
-class CommentDocument(DetailView):
- model = CommentDocumentModel
-
- def get_context_data(self, **kwargs):
- context = super(CommentDocument, self).get_context_data(**kwargs)
- context['comment_url'] = settings.COMMENT_URL
- return context
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.contrib import admin
-from .models import Competence, CompetenceLevel, Level, Section, CurriculumCourse, CurriculumLevel, Curriculum
-
-
-class CompetenceLevelInline(admin.TabularInline):
- model = CompetenceLevel
-
-
-class CompetenceAdmin(admin.ModelAdmin):
- model = Competence
- list_display = ['name_pl', 'name_en', 'section', 'slug', 'order']
- inlines = [CompetenceLevelInline]
-
-
-class LevelAdmin(admin.ModelAdmin):
- model = Level
- list_display = ['name_pl', 'name_en', 'group_pl', 'group_en', 'slug', 'order']
-
-
-class SectionAdmin(admin.ModelAdmin):
- model = Section
- list_display = ['name_pl', 'name_en', 'slug', 'order']
-
-
-admin.site.register(Level, LevelAdmin)
-admin.site.register(Section, SectionAdmin)
-admin.site.register(Competence, CompetenceAdmin)
-
-admin.site.register(CurriculumCourse)
-admin.site.register(CurriculumLevel)
-admin.site.register(Curriculum)
+++ /dev/null
-[
- {
- "pk": 1,
- "model": "curriculum.section",
- "fields": {
- "order": 1,
- "name": "Korzystanie z informacji",
- "slug": "korzystanie-z-informacji"
- }
- },
- {
- "pk": 2,
- "model": "curriculum.section",
- "fields": {
- "order": 2,
- "name": "Relacje w \u015brodowisku medialnym",
- "slug": "relacje-w-srodowisku-medialnym"
- }
- },
- {
- "pk": 3,
- "model": "curriculum.section",
- "fields": {
- "order": 3,
- "name": "J\u0119zyk medi\u00f3w",
- "slug": "jezyk-mediow"
- }
- },
- {
- "pk": 4,
- "model": "curriculum.section",
- "fields": {
- "order": 4,
- "name": "Kreatywne korzystanie z medi\u00f3w",
- "slug": "kreatywne-korzystanie-z-mediow"
- }
- },
- {
- "pk": 5,
- "model": "curriculum.section",
- "fields": {
- "order": 5,
- "name": "Etyka i warto\u015bci w komunikacji i mediach",
- "slug": "etyka-i-wartosci-w-komunikacji-i-mediach"
- }
- },
- {
- "pk": 6,
- "model": "curriculum.section",
- "fields": {
- "order": 6,
- "name": "Bezpiecze\u0144stwo w komunikacji i mediach",
- "slug": "bezpieczenstwo-w-komunikacji-i-mediach"
- }
- },
- {
- "pk": 7,
- "model": "curriculum.section",
- "fields": {
- "order": 7,
- "name": "Prawo w komunikacji i mediach",
- "slug": "prawo-w-mediach-i-komunikacji"
- }
- },
- {
- "pk": 8,
- "model": "curriculum.section",
- "fields": {
- "order": 8,
- "name": "Ekonomiczne aspekty dzia\u0142ania medi\u00f3w",
- "slug": "ekonomiczne-aspekty-dzialania-mediow"
- }
- },
- {
- "pk": 1,
- "model": "curriculum.competence",
- "fields": {
- "section": 1,
- "order": 1,
- "name": "\u0179r\u00f3d\u0142a informacji",
- "slug": "zrodla-informacji"
- }
- },
- {
- "pk": 2,
- "model": "curriculum.competence",
- "fields": {
- "section": 1,
- "order": 2,
- "name": "Wyszukiwanie informacji",
- "slug": "wyszukiwanie-informacji"
- }
- },
- {
- "pk": 3,
- "model": "curriculum.competence",
- "fields": {
- "section": 1,
- "order": 3,
- "name": "Podej\u015bcie krytyczne do informacji",
- "slug": "podejscie-krytyczne-do-informacji"
- }
- },
- {
- "pk": 4,
- "model": "curriculum.competence",
- "fields": {
- "section": 1,
- "order": 4,
- "name": "Wykorzystanie informacji",
- "slug": "wykorzystanie-informacji"
- }
- },
- {
- "pk": 7,
- "model": "curriculum.competence",
- "fields": {
- "section": 2,
- "order": 1,
- "name": "Wizerunek",
- "slug": "wizerunek"
- }
- },
- {
- "pk": 5,
- "model": "curriculum.competence",
- "fields": {
- "section": 2,
- "order": 2,
- "name": "Komunikacja",
- "slug": "komunikacja"
- }
- },
- {
- "pk": 6,
- "model": "curriculum.competence",
- "fields": {
- "section": 2,
- "order": 3,
- "name": "Otoczenie",
- "slug": "otoczenie"
- }
- },
- {
- "pk": 10,
- "model": "curriculum.competence",
- "fields": {
- "section": 3,
- "order": 1,
- "name": "J\u0119zykowa natura medi\u00f3w",
- "slug": "jezykowa-natura-mediow"
- }
- },
- {
- "pk": 9,
- "model": "curriculum.competence",
- "fields": {
- "section": 3,
- "order": 2,
- "name": "Funkcje komunikat\u00f3w medialnych",
- "slug": "funkcje-komunikatow-medialnych"
- }
- },
- {
- "pk": 8,
- "model": "curriculum.competence",
- "fields": {
- "section": 3,
- "order": 3,
- "name": "Kultura komunikacji medialnej",
- "slug": "kultura-komunikacji-medialnej"
- }
- },
- {
- "pk": 11,
- "model": "curriculum.competence",
- "fields": {
- "section": 4,
- "order": 1,
- "name": "Tworzenie",
- "slug": "tworzenie"
- }
- },
- {
- "pk": 12,
- "model": "curriculum.competence",
- "fields": {
- "section": 4,
- "order": 2,
- "name": "Przetwarzanie",
- "slug": "przetwarzanie"
- }
- },
- {
- "pk": 13,
- "model": "curriculum.competence",
- "fields": {
- "section": 4,
- "order": 3,
- "name": "Prezentowanie",
- "slug": "prezentowanie"
- }
- },
- {
- "pk": 16,
- "model": "curriculum.competence",
- "fields": {
- "section": 5,
- "order": 1,
- "name": "Komunikacja i media jako przedmiot refleksji etycznej",
- "slug": "komunikacja-i-media-jako-przedmiot-refleksji-etycz"
- }
- },
- {
- "pk": 15,
- "model": "curriculum.competence",
- "fields": {
- "section": 5,
- "order": 2,
- "name": "Wyzwania etyczne a tre\u015bci medi\u00f3w i komunikacji",
- "slug": "wyzwania-etyczne-a-tresci-mediow-i-komunikacji"
- }
- },
- {
- "pk": 17,
- "model": "curriculum.competence",
- "fields": {
- "section": 5,
- "order": 3,
- "name": "Wyzwania etyczne w relacjach przez media",
- "slug": "wyzwania-etyczne-w-relacjach-przez-media"
- }
- },
- {
- "pk": 14,
- "model": "curriculum.competence",
- "fields": {
- "section": 5,
- "order": 4,
- "name": "Wyzwania etyczne a normy prawa w mediach i komunikacji",
- "slug": "wyzwania-etyczne-a-normy-prawa"
- }
- },
- {
- "pk": 21,
- "model": "curriculum.competence",
- "fields": {
- "section": 6,
- "order": 1,
- "name": "Ochrona prywatno\u015bci i wizerunku",
- "slug": "ochrona-prywatnosci-i-wizerunku"
- }
- },
- {
- "pk": 20,
- "model": "curriculum.competence",
- "fields": {
- "section": 6,
- "order": 2,
- "name": "Anonimowo\u015b\u0107",
- "slug": "anonimowosc"
- }
- },
- {
- "pk": 18,
- "model": "curriculum.competence",
- "fields": {
- "section": 6,
- "order": 3,
- "name": "Bezpiecze\u0144stwo komunikacji, pracy i transakcji",
- "slug": "bezpieczenstwo-komunikacji-pracy-i-transakcji"
- }
- },
- {
- "pk": 22,
- "model": "curriculum.competence",
- "fields": {
- "section": 6,
- "order": 4,
- "name": "Nadz\u00f3r nad sieci\u0105",
- "slug": "nadzor-nad-siecia"
- }
- },
- {
- "pk": 19,
- "model": "curriculum.competence",
- "fields": {
- "section": 6,
- "order": 5,
- "name": "Uzale\u017cnienia i higiena korzystania z medi\u00f3w",
- "slug": "uzaleznienia-i-higiena-korzystania-z-mediow"
- }
- },
- {
- "pk": 23,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 1,
- "name": "Rodzaje, \u017ar\u00f3d\u0142a i praktyka stosowania prawa w kontek\u015bcie medi\u00f3w",
- "slug": "rodzaje-zrodla-i-praktyka-stosowania-prawa"
- }
- },
- {
- "pk": 28,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 2,
- "name": "Media a prawa cz\u0142owieka, obywatela i dziecka",
- "slug": "media-a-prawa-czlowieka-obywatela-i-dziecka"
- }
- },
- {
- "pk": 27,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 3,
- "name": "Prawa wy\u0142\u0105czne i monopole intelektualne",
- "slug": "prawa-wylaczne-i-monopole-intelektualne"
- }
- },
- {
- "pk": 29,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 4,
- "name": "Prawo telekomunikacyjne",
- "slug": "prawo-telekomunikacyjne"
- }
- },
- {
- "pk": 25,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 5,
- "name": "Prawo medi\u00f3w i media publiczne",
- "slug": "prawo-mediow-i-media-publiczne"
- }
- },
- {
- "pk": 24,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 6,
- "name": "Prawa os\u00f3b niepe\u0142nosprawnych",
- "slug": "prawa-osob-niepelnosprawnych"
- }
- },
- {
- "pk": 26,
- "model": "curriculum.competence",
- "fields": {
- "section": 7,
- "order": 7,
- "name": "Ochrona danych osobowych",
- "slug": "ochrona-danych-osobowych"
- }
- },
- {
- "pk": 30,
- "model": "curriculum.competence",
- "fields": {
- "section": 8,
- "order": 1,
- "name": "Rynek medi\u00f3w",
- "slug": "rynek-mediow"
- }
- },
- {
- "pk": 31,
- "model": "curriculum.competence",
- "fields": {
- "section": 8,
- "order": 2,
- "name": "Informacja jako dobro ekonomiczne",
- "slug": "informacja-jako-dobro-ekonomiczne"
- }
- },
- {
- "pk": 32,
- "model": "curriculum.competence",
- "fields": {
- "section": 8,
- "order": 3,
- "name": "Finansowanie medi\u00f3w i wybrane sposoby zarabiania w nowych mediach",
- "slug": "finansowanie-mediow-i-wybrane-sposoby-zarabiania"
- }
- },
- {
- "pk": 33,
- "model": "curriculum.competence",
- "fields": {
- "section": 8,
- "order": 4,
- "name": "Polityka medialna",
- "slug": "polityka-medialna"
- }
- },
- {
- "pk": 1,
- "model": "curriculum.level",
- "fields": {
- "order": 1,
- "group": "edukacja formalna",
- "name": "Wych. przedszkolne",
- "slug": "przedszkole"
- }
- },
- {
- "pk": 2,
- "model": "curriculum.level",
- "fields": {
- "order": 2,
- "group": "edukacja formalna",
- "name": "SP 1-3",
- "slug": "sp1-3"
- }
- },
- {
- "pk": 3,
- "model": "curriculum.level",
- "fields": {
- "order": 3,
- "group": "edukacja formalna",
- "name": "SP 4-6",
- "slug": "sp4-6"
- }
- },
- {
- "pk": 4,
- "model": "curriculum.level",
- "fields": {
- "order": 4,
- "group": "edukacja formalna",
- "name": "Gimnazjum",
- "slug": "gimnazjum"
- }
- },
- {
- "pk": 5,
- "model": "curriculum.level",
- "fields": {
- "order": 5,
- "group": "edukacja formalna",
- "name": "Szk. ponadgimnazjalna",
- "slug": "liceum"
- }
- },
- {
- "pk": 6,
- "model": "curriculum.level",
- "fields": {
- "order": 6,
- "group": "edukacja formalna",
- "name": "Szk. wy\u017csze",
- "slug": "studia"
- }
- },
- {
- "pk": 7,
- "model": "curriculum.level",
- "fields": {
- "order": 101,
- "group": "edukacja ustawiczna",
- "name": "Poziom minimum",
- "slug": "minimum"
- }
- },
- {
- "pk": 8,
- "model": "curriculum.level",
- "fields": {
- "order": 102,
- "group": "edukacja ustawiczna",
- "name": "Poziom optimum",
- "slug": "optimum"
- }
- },
- {
- "pk": 9,
- "model": "curriculum.level",
- "fields": {
- "order": 103,
- "group": "edukacja ustawiczna",
- "name": "Poziom mistrzowski",
- "slug": "master"
- }
- },
- {
- "pk": 1,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce informacja wyst\u0119puje w r\u00f3\u017cnych formach; \u00a0np. rozumie, jakie s\u0105 podstawowe r\u00f3\u017cnice pomi\u0119dzy obrazem, tekstem, filmem, stron\u0105 internetow\u0105.\n- wie, \u017ce istniej\u0105 r\u00f3\u017cne \u017ar\u00f3d\u0142a informacji (TV, internet, radio, ksi\u0105\u017cki, gazety, inni ludzie).\n- umie skorzysta\u0107 z wybranych \u017ar\u00f3de\u0142 informacji; np. wyszukuje potrzebne informacje na temat ulubionego zwierz\u0119cia korzystaj\u0105c ze s\u0142ownika obrazkowego, rozmawiaj\u0105c z rodzicem / nauczycielem.",
- "competence": 1,
- "level": 1
- }
- },
- {
- "pk": 2,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 najwa\u017cniejsze \u017ar\u00f3d\u0142a informacji dostosowane do jego wieku i poziomu edukacji i umie z nich skorzysta\u0107;\nnp. korzysta z drukowanych i elektronicznych encyklopedii i s\u0142ownik\u00f3w dla dzieci.\n- umie skorzysta\u0107 z biblioteki szkolnej, kieruj\u0105c si\u0119 wskaz\u00f3wkami nauczyciela;\nnp. wybiera lektury, korzystaj\u0105c z rad nauczyciela.\n- wie, \u017ce informacje pochodz\u0105ce z r\u00f3\u017cnych \u017ar\u00f3de\u0142 mog\u0105 si\u0119 r\u00f3\u017cni\u0107.",
- "competence": 1,
- "level": 2
- }
- },
- {
- "pk": 3,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 podstawowe kryteria oceny \u017ar\u00f3de\u0142 informacji; np. wie, czym jest wiarygodno\u015b\u0107, \u0142atwo\u015b\u0107 i efektywno\u015b\u0107 korzystania, szybko\u015b\u0107 dost\u0119pu w odniesieniu do \u017ar\u00f3de\u0142 informacji.\n- umie dokona\u0107 wyboru \u017ar\u00f3de\u0142 informacji, kieruj\u0105c si\u0119 przede wszystkim kryterium wiarygodno\u015bci;\nnp. umie skorzysta\u0107 z wiarygodnych \u017ar\u00f3de\u0142 takich jak encyklopedie, s\u0142owniki drukowane lub elektroniczne.\n- umie skorzysta\u0107 z zasob\u00f3w biblioteki szkolnej, samodzielnie wybieraj\u0105c lektury oraz dobieraj\u0105c odpowiednie \u017ar\u00f3d\u0142a informacji do konkretnych zada\u0144.\n- wie, \u017ce jako\u015b\u0107 \u017ar\u00f3de\u0142 informacji ma zasadnicze znaczenie dla wynik\u00f3w pracy.",
- "competence": 1,
- "level": 3
- }
- },
- {
- "pk": 4,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce \u017ar\u00f3d\u0142a informacji nale\u017cy wybiera\u0107 \u015bwiadomie, maj\u0105c na uwadze potrzeby informacyjne oraz cel wykorzystania informacji.\n- umie biegle wybiera\u0107 \u017ar\u00f3d\u0142a informacji wykorzystywanych w procesie kszta\u0142cenia, kieruj\u0105c si\u0119 poszczeg\u00f3lnymi kryteriami wyboru;\nnp. zale\u017cnie od sytuacji korzysta z Wikipedii lub innych \u017ar\u00f3de\u0142.\n- rozumie konsekwencje korzystania z niew\u0142a\u015bciwych \u017ar\u00f3de\u0142 informacji w odniesieniu do edukacji szkolnej.\n- rozumie, jakie s\u0105 r\u00f3\u017cnice pomi\u0119dzy kana\u0142em a \u017ar\u00f3d\u0142em informacji.",
- "competence": 1,
- "level": 4
- }
- },
- {
- "pk": 5,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 najwa\u017cniejsze \u017ar\u00f3d\u0142a informacji naukowej i umie z nich skorzysta\u0107 w podstawowym zakresie;\nnp. korzysta z katalog\u00f3w elektronicznych bibliotek akademickich.\n- umie dokona\u0107 wyboru \u017ar\u00f3de\u0142 informacji, bior\u0105c pod uwag\u0119 dodatkowe kryteria takie jak relewancja, \u0142atwo\u015b\u0107 i efektywno\u015b\u0107 korzystania.\n- rozumie znaczenie doboru w\u0142a\u015bciwych \u017ar\u00f3de\u0142 informacji dla efekt\u00f3w wykonywanej pracy.\n- rozumie przyczyny ogranicze\u0144 system\u00f3w organizacji informacji;\nnp. rozumie, jakie nast\u0119pstwa ma fakt, \u017ce j\u0119zyki informacyjno-wyszukiwawcze s\u0105 j\u0119zykami sztucznymi.",
- "competence": 1,
- "level": 5
- }
- },
- {
- "pk": 6,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jaka jest r\u00f3\u017cnica pomi\u0119dzy \u017ar\u00f3d\u0142ami informacji wykorzystywanymi w pracy naukowej i \u017cyciu codziennym.\n- umie dokona\u0107 wyboru optymalnych \u017ar\u00f3de\u0142 informacji naukowej.\n- umie dokona\u0107 wyboru system\u00f3w informacyjnych zgodnie z zapotrzebowaniem wynikaj\u0105cym z jego pracy.\n- rozumie, jakie s\u0105 konsekwencje wykorzystania niew\u0142a\u015bciwych \u017ar\u00f3de\u0142 w pracy naukowej.\n- rozumie konieczno\u015b\u0107 odwo\u0142ywania si\u0119 do wykorzystanych \u017ar\u00f3de\u0142;\nnp. wie, jak i dlaczego nale\u017cy stosowa\u0107 przypisy i zamieszcza\u0107 bibliografi\u0119.",
- "competence": 1,
- "level": 6
- }
- },
- {
- "pk": 7,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 najwa\u017cniejsze \u017ar\u00f3d\u0142a informacji we wsp\u00f3\u0142czesnym \u015bwiecie.\n- wie, \u017ce \u017ar\u00f3d\u0142a informacji nale\u017cy wybiera\u0107 \u015bwiadomie, maj\u0105c na uwadze potrzeby informacyjne oraz cel wykorzystania informacji.\n- umie wykorzysta\u0107 g\u0142\u00f3wne \u017ar\u00f3d\u0142a informacji w procesie zaspokajania swoich potrzeb informacyjnych.\n- umie w spos\u00f3b intuicyjny oceni\u0107 wiarygodno\u015b\u0107 \u017ar\u00f3de\u0142 informacji.\n- umie dokona\u0107 wyboru \u017ar\u00f3de\u0142 informacji, bior\u0105c pod uwag\u0119 takie kryteria jak wiarygodno\u015b\u0107, relewancja, \u0142atwo\u015b\u0107 i efektywno\u015b\u0107 korzystania.\n- rozumie, jakie jest znaczenie informacji w spo\u0142ecze\u0144stwie XXI wieku.\n- rozumie, \u017ce informacje r\u00f3\u017cni\u0105 si\u0119 w zale\u017cno\u015bci od \u017ar\u00f3d\u0142a, z kt\u00f3rego pochodz\u0105, oraz intencji nadawcy.",
- "competence": 1,
- "level": 7
- }
- },
- {
- "pk": 8,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce relewantna i wiarygodna informacja powinna zawsze by\u0107 podstaw\u0105 podejmowanych decyzji.\n- wie, jakie s\u0105 najwa\u017cniejsze modele zachowa\u0144 informacyjnych.\n- umie biegle wybiera\u0107 \u017ar\u00f3d\u0142a informacji wykorzystywanych w procesie kszta\u0142cenia, kieruj\u0105c si\u0119 odpowiednimi kryteriami.\n- rozumie, jakie jest znaczenie doboru w\u0142a\u015bciwych \u017ar\u00f3de\u0142 informacji dla efekt\u00f3w wykonywanej pracy.",
- "competence": 1,
- "level": 8
- }
- },
- {
- "pk": 9,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jaka jest organizacja \u017ar\u00f3de\u0142 informacji oraz przep\u0142ywu informacji w spo\u0142ecze\u0144stwie.\n- umie sprawnie wybiera\u0107 \u017ar\u00f3d\u0142a informacji w zale\u017cno\u015bci od celu dzia\u0142ania i specyfiki realizowanego zadania.\n- rozumie, jakie s\u0105 konsekwencje korzystania z niew\u0142a\u015bciwych \u017ar\u00f3de\u0142 informacji w odniesieniu do efekt\u00f3w wykonywanej pracy i realizacji konkretnego zadania.",
- "competence": 1,
- "level": 9
- }
- },
- {
- "pk": 10,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie skorzysta\u0107 z pomocy doros\u0142ego w procesie pozyskiwania informacji; np. prosi rodzica o znalezienie jakiej\u015b informacji.",
- "competence": 2,
- "level": 1
- }
- },
- {
- "pk": 11,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce \u201ej\u0119zyk komputera\u201d r\u00f3\u017cni si\u0119 od j\u0119zyka m\u00f3wionego;\nnp. wie, \u017ce komputer zawsze \u201erobi\u201d to, co mu si\u0119 ka\u017ce, dlatego trzeba si\u0119 nauczy\u0107, jak wydawa\u0107 polecenia.\n- umie skorzysta\u0107 z podstawowych technik wyszukiwania w \u017ar\u00f3d\u0142ach tradycyjnych oraz elektronicznych.\n- wie, \u017ce dzia\u0142ania na zbiorach mog\u0105 by\u0107 wykorzystywane przy szukaniu informacji;\nnp. poznaje mo\u017cliwo\u015bci prostych zastosowa\u0144 operator\u00f3w logicznych (kot AND/ORAZ pies itd.)\n- umie zastosowa\u0107 proste has\u0142a osobowe, przedmiotowe, wpisuje proste zapytania informacyjno-wyszukiwawcze w wyszukiwarkach, encyklopediach;\nnp. wyszukuje informacje nt. ulubionego zwierz\u0119cia w s\u0142owniku obrazkowym, encyklopedii elektronicznej dla dzieci i internecie.\n- rozumie, \u017ce umiej\u0119tno\u015b\u0107 wyszukiwania informacji przyda mu si\u0119 w \u017cyciu;\nnp. rozumie, \u017ce na podstawie wyszukanych informacji b\u0119dzie podejmowa\u0142 r\u00f3\u017cne decyzje.",
- "competence": 2,
- "level": 2
- }
- },
- {
- "pk": 12,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 podstawowe r\u00f3\u017cnice w budowie hase\u0142 w j\u0119zyku naturalnym i j\u0119zyku systemu informacyjnego;\nnp. poznaje na przyk\u0142adzie hase\u0142 przedmiotowych r\u00f3\u017cnice w okre\u015blaniu zwierz\u0105t.\n- wie, \u017ce s\u0105 r\u00f3\u017cne modele zachowa\u0144 informacyjnych - umie wyszuka\u0107 informacje w wybranych tradycyjnych i elektronicznych \u017ar\u00f3d\u0142ach.\n- umie budowa\u0107 proste zapytania informacyjno-wyszukiwawcze;\nnp. rozk\u0142ad jazdy pkp warszawa.\n- wie, \u017ce trzeba dok\u0142adnie formu\u0142owa\u0107 zapytania informacyjno-wyszukiwawcze.\n- wie, \u017ce wynik wyszukiwania zale\u017cy od tego, jak b\u0119dzie sformu\u0142owane zapytanie informacyjno-wyszukiwawcze.",
- "competence": 2,
- "level": 3
- }
- },
- {
- "pk": 13,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 podstawowe techniki i strategie wyszukiwania informacji;\nnp. stosuje strategi\u0119 zaw\u0119\u017cania wynik\u00f3w poszukiwa\u0144.\n- umie wyszukiwa\u0107 informacje w \u017ar\u00f3d\u0142ach tradycyjnych i elektronicznych;\nnp. wyszukuje informacje, korzystaj\u0105c ze stron, blog\u00f3w, portali, wortali oraz materia\u0142\u00f3w drukowanych.\n- umie zastosowa\u0107 z\u0142o\u017cone strategie wyszukiwania w oparciu o znane modele zachowa\u0144 informacyjnych w odpowiednich adaptacjach.\n\n- umie wykorzysta\u0107 wybrane techniki wyszukiwania;\nnp. korzysta z operator\u00f3w logicznych.\n- umie budowa\u0107 zapytania informacyjno-wyszukiwawcze w j\u0119zyku systemu informacyjnego.",
- "competence": 2,
- "level": 4
- }
- },
- {
- "pk": 14,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 z\u0142o\u017cone strategie wyszukiwania.\n- umie sprawnie wyszukiwa\u0107 informacje, buduj\u0105c strategie wyszukiwania w oparciu o najwa\u017cniejsze modele zachowa\u0144 informacyjnych.\n- umie przek\u0142ada\u0107 zapytania informacyjno-wyszukiwawcze wyra\u017cone w j\u0119zyku naturalnym na j\u0119zyk systemu informacyjnego.",
- "competence": 2,
- "level": 5
- }
- },
- {
- "pk": 15,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jak wyszukiwa\u0107 informacj\u0119 naukow\u0105 w r\u00f3\u017cnych \u017ar\u00f3d\u0142ach.\n- umie biegle korzysta\u0107 z najwa\u017cniejszych \u017ar\u00f3de\u0142 informacji naukowej;\nnp. biegle korzysta z katalog\u00f3w bibliotecznych, stosuj\u0105c opcje wyszukiwania zaawansowanego, sprawnie korzysta z dziedzinowych baz danych literatury naukowej.\n- umie zaprojektowa\u0107 efektywn\u0105 strategi\u0119 wyszukiwania informacji.",
- "competence": 2,
- "level": 6
- }
- },
- {
- "pk": 16,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce wyszukiwanie informacji wymaga odpowiednich umiej\u0119tno\u015bci.\n- wie, \u017ce trzeba dok\u0142adnie formu\u0142owa\u0107 zapytania informacyjno-wyszukiwawcze.\n- umie skorzysta\u0107 z podstawowych technik wyszukiwania w \u017ar\u00f3d\u0142ach tradycyjnych oraz elektronicznych.\n- umie zastosowa\u0107 proste has\u0142a osobowe, przedmiotowe, wpisuje zapytania informacyjno-wyszukiwawcze w wyszukiwarkach, encyklopediach.\n- rozumie, \u017ce wynik wyszukiwania zale\u017cy od tego, jak b\u0119dzie sformu\u0142owane zapytanie informacyjno-wyszukiwawcze.\n- rozumie konsekwencje, jakie mo\u017ce mie\u0107 opieranie swoich decyzji na niepe\u0142nych lub nieaktualnych informacjach.",
- "competence": 2,
- "level": 7
- }
- },
- {
- "pk": 17,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 podstawowe techniki i strategie wyszukiwania informacji.\n- wie, jakie s\u0105 najwa\u017cniejsze modele zachowa\u0144 informacyjnych.\n- wie, jakie s\u0105 podstawowe r\u00f3\u017cnice w budowie hase\u0142 w j\u0119zyku naturalnym i j\u0119zyku systemu informacyjnego.\n- umie sprawnie wyszukiwa\u0107 informacje, buduj\u0105c strategie wyszukiwania w oparciu o najwa\u017cniejsze modele zachowa\u0144 informacyjnych.\n- umie stosowa\u0107 zaawansowane techniki wyszukiwania informacji.\n- umie dodawa\u0107, ulepsza\u0107 i \u0142\u0105czy\u0107 informacje w r\u00f3\u017cnych formach, zaczerpni\u0119te z r\u00f3\u017cnych \u017ar\u00f3de\u0142.",
- "competence": 2,
- "level": 8
- }
- },
- {
- "pk": 18,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 z\u0142o\u017cone strategie wyszukiwania.\n- umie sprawnie wyszukiwa\u0107 informacje, buduj\u0105c strategie wyszukiwania w oparciu o najwa\u017cniejsze modele zachowa\u0144 informacyjnych.\n- umie zaprojektowa\u0107 efektywn\u0105 strategi\u0119 wyszukiwania informacji.",
- "competence": 2,
- "level": 9
- }
- },
- {
- "pk": 19,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce je\u015bli informacja budzi w\u0105tpliwo\u015bci, powinien j\u0105 om\u00f3wi\u0107 z rodzicami lub nauczycielem przedszkolnym.\n- umie zada\u0107 pytanie dotycz\u0105ce wiarygodno\u015bci informacji;\nnp. zadaje pytania \u201emamo, czy to prawda, \u017ce\u201d...",
- "competence": 3,
- "level": 1
- }
- },
- {
- "pk": 20,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce informacje mog\u0105 by\u0107 nieprawdziwe, niepe\u0142ne, niedok\u0142adne.\n- wie, \u017ce nale\u017cy zastanawia\u0107 si\u0119 i rozmawia\u0107 na temat sposob\u00f3w korzystania z informacji.\n- wie, \u017ce nadawcy informacji mog\u0105 chcie\u0107 wywrze\u0107 na niego wp\u0142yw i sk\u0142oni\u0107 do okre\u015blonych zachowa\u0144.\n- umie dostrzec r\u00f3\u017cnic\u0119 pomi\u0119dzy informacj\u0105 prawdziw\u0105 i nieprawdziw\u0105, kieruj\u0105c si\u0119 swoj\u0105 intuicj\u0105.",
- "competence": 3,
- "level": 2
- }
- },
- {
- "pk": 21,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce przekazywane informacje r\u00f3\u017cni\u0105 si\u0119 w zale\u017cno\u015bci od intencji nadawcy;\nnp. por\u00f3wnuje, jak przekazywana jest ta sama informacja w r\u00f3\u017cnych mediach.\n- wie, \u017ce informacje niskiej jako\u015bci prowadz\u0105 do b\u0142\u0119dnych wniosk\u00f3w.\n- umie kwestionowa\u0107 wiarygodno\u015b\u0107 informacji.\n- umie weryfikowa\u0107 informacje poprzez por\u00f3wnywanie ich w r\u00f3\u017cnych \u017ar\u00f3d\u0142ach.\n- wie, \u017ce jest r\u00f3\u017cnica pomi\u0119dzy informacj\u0105 a plotk\u0105.\n- rozumie, czym jest manipulacja informacj\u0105.",
- "competence": 3,
- "level": 3
- }
- },
- {
- "pk": 22,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce zawsze nale\u017cy by\u0107 krytycznym wobec \u017ar\u00f3d\u0142a.\n- wie, z jakich \u017ar\u00f3de\u0142 skorzysta\u0107, by jednoznacznie zweryfikowa\u0107 informacje;\nnp. korzysta z encyklopedii PWN, by potwierdzi\u0107 informacje znalezione na blogu.\n- umie selekcjonowa\u0107 potrzebne informacje, sprawdzaj\u0105c ich dok\u0142adno\u015b\u0107.\n- umie oceni\u0107 wykorzystanie TIK w swojej pracy.\n- umie dostrzec i okre\u015bli\u0107 r\u00f3\u017cnice pomi\u0119dzy informacj\u0105 a innym przekazem, w tym opini\u0105, ocen\u0105, krytyk\u0105;\nnp. por\u00f3wnuje artyku\u0142y z r\u00f3\u017cnych gazet, okre\u015blaj\u0105c ich cechy.\n- umie rozr\u00f3\u017cni\u0107 cechy i funkcje informacji i plotki; np. por\u00f3wnuje teksty z \u201eGazety Wyborczej\u201d, \u201eFaktu\u201d i \u201ePudelka\u201d.",
- "competence": 3,
- "level": 4
- }
- },
- {
- "pk": 23,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce umiej\u0119tno\u015b\u0107 krytycznej oceny informacji jest kluczowa w procesie realizacji zada\u0144.\n- wie, \u017ce \u017ar\u00f3d\u0142a informacji i narz\u0119dzia TIK wykorzystywane w pracy maj\u0105 swoje wady, zalety i ograniczenia.\n- umie przedstawi\u0107 argumenty dotycz\u0105ce wad, zalet i ogranicze\u0144 \u017ar\u00f3de\u0142 informacji i narz\u0119dzi TIK.\n- rozumie konsekwencje wynikaj\u0105ce z braku podej\u015bcia krytycznego w zakresie korzystania ze \u017ar\u00f3de\u0142 informacji i narz\u0119dzi TIK.\n- rozumie konsekwencje przyjmowania okre\u015blonego stanowiska w pracy z informacj\u0105; np. np.rozumie, \u017ce wyniki bada\u0144 dotycz\u0105cych preferencji politycznych mog\u0105 by\u0107 r\u00f3\u017cnie interpretowane w zale\u017cno\u015bci od przekona\u0144 i sympatii politycznych autora lub linii programowej stacji oraz zdaje sobie spraw\u0119, \u017ce mo\u017ce to prowadzi\u0107 do b\u0142\u0119dnych wniosk\u00f3w.",
- "competence": 3,
- "level": 5
- }
- },
- {
- "pk": 24,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wykorzysta\u0107 wyniki rozm\u00f3w na temat wad, zalet i ogranicze\u0144 \u017ar\u00f3de\u0142 informacji i narz\u0119dzi TIK do formu\u0142owania ocen dotycz\u0105cych jako\u015bci swojej pracy.\n- rozumie, jaki wp\u0142yw na rozw\u00f3j sektora TIK maj\u0105 czynniki takie jak prawo,etyka, ekonomia i wykorzystuje t\u0119 wiedz\u0119 w procesie realizacji zada\u0144 informacyjnych.",
- "competence": 3,
- "level": 6
- }
- },
- {
- "pk": 25,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce nadawcy informacji mog\u0105 chcie\u0107 wywrze\u0107 na niego wp\u0142yw i sk\u0142oni\u0107 do okre\u015blonych zachowa\u0144.\n- wie, \u017ce intencje nadawcy oraz specyfika danego medium ma decyduj\u0105cy wp\u0142yw na tre\u015b\u0107 i form\u0119 informacji.\n- wie, jakie s\u0105 podstawowe kryteria oceny \u017ar\u00f3de\u0142 informacji.\n- umie dostrzec r\u00f3\u017cnic\u0119 pomi\u0119dzy informacj\u0105 prawdziw\u0105 i nieprawdziw\u0105, kieruj\u0105c si\u0119 swoj\u0105 intuicj\u0105.\n- umie kwestionowa\u0107 wiarygodno\u015b\u0107 informacji.\n- umie weryfikowa\u0107 informacje poprzez por\u00f3wnywanie ich w r\u00f3\u017cnych \u017ar\u00f3d\u0142ach.\n- umie dostrzec i okre\u015bli\u0107 r\u00f3\u017cnice pomi\u0119dzy informacj\u0105 a innym przekazem, w tym opini\u0105, ocen\u0105, krytyk\u0105.\n- rozumie, czym jest manipulacja informacj\u0105.",
- "competence": 3,
- "level": 7
- }
- },
- {
- "pk": 26,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce umiej\u0119tno\u015b\u0107 krytycznej oceny informacji jest kluczowa w procesie realizacji zada\u0144.\n- rozumie konsekwencje przyjmowania okre\u015blonego stanowiska w pracy z informacj\u0105.",
- "competence": 3,
- "level": 8
- }
- },
- {
- "pk": 27,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, jaki wp\u0142yw na rozw\u00f3j sektora TIK maj\u0105 czynniki takie jak prawo,etyka, ekonomia i wykorzystuje t\u0119 wiedz\u0119 w procesie realizacji zada\u0144 informacyjnych.",
- "competence": 3,
- "level": 9
- }
- },
- {
- "pk": 29,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce zasoby informacyjne trzeba porz\u0105dkowa\u0107 w celu \u0142atwego ich wykorzystania i odnalezienia.\n- umie wprowadza\u0107, zachowywa\u0107 i odzyskiwa\u0107 wyniki swojej pracy;\nnp. zapisuje wyniki swojej pracy w edytorze tekst\u00f3w.\n- umie zastosowa\u0107 proste schematy organizacji informacji, \u0142\u0105czy\u0107 i organizowa\u0107 materia\u0142;\nnp. szereguje, klasyfikuje, tworzy katalogi i foldery, opisuje je w zrozumia\u0142y dla siebie spos\u00f3b.",
- "competence": 4,
- "level": 2
- }
- },
- {
- "pk": 30,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce prezentuj\u0105c wyniki swojej pracy, powinien bra\u0107 pod uwag\u0119 potrzeby odbiorc\u00f3w.\n- umie wykorzystywa\u0107 TIK podczas tworzenia, ulepszania i zapisywania wynik\u00f3w pracy;\nnp. umie skorzysta\u0107 z poczty e-mail, by przes\u0142a\u0107 wyniki pracy kolegom.\n- umie wykorzystywa\u0107 TIK do dzielenia si\u0119 swoimi pomys\u0142ami z innymi, wykorzystuj\u0105c w tym celu r\u00f3\u017cne formy prezentacji informacji;\nnp. tworzy wsp\u00f3lnie z kolegami projekt, wykorzystuj\u0105c tekst, tabele, ilustracje.\n- umie sprawnie organizowa\u0107 w\u0142asne zasoby informacyjne w celu \u0142atwego ich wykorzystania.\n- rozumie, jakie s\u0105 konsekwencje braku opracowania i organizacji informacji.\n- rozumie, jakie s\u0105 potrzeby poszczeg\u00f3lnych grup odbiorc\u00f3w w zakresie prezentowania informacji;\nnp. rozumie, \u017ce komunikat podobnej tre\u015bci nale\u017cy zbudowa\u0107 inaczej, gdy jest adresowany do r\u00f3wie\u015bnik\u00f3w, rodzic\u00f3w, nauczycieli.",
- "competence": 4,
- "level": 3
- }
- },
- {
- "pk": 31,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jak odpowiednio prezentowa\u0107 wyniki swojej pracy;\nnp. wie, \u017ce prezentacja musi by\u0107 przejrzysta, zawiera\u0107 niezbyt du\u017co tekstu oraz rozmaite ilustracje.\n- umie dodawa\u0107, ulepsza\u0107 i \u0142\u0105czy\u0107 informacje w r\u00f3\u017cnych formach, zaczerpni\u0119te z r\u00f3\u017cnych \u017ar\u00f3de\u0142.\n- umie wykorzystywa\u0107 TIK w procesie prezentowania wynik\u00f3w swojej pracy;\nnp. umie przygotowa\u0107 prezentacje multimedialne i prowadzi\u0107 wyst\u0105pienia publiczne.\n- umie organizowa\u0107 informacje w spos\u00f3b najbardziej odpowiedni do wykorzystania.",
- "competence": 4,
- "level": 4
- }
- },
- {
- "pk": 32,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie rozwija\u0107 i ulepsza\u0107 wyniki swojej pracy z wykorzystaniem TIK, by podnie\u015b\u0107 jej jako\u015b\u0107.\n- umie \u0142\u0105czy\u0107 informacje pochodz\u0105ce z r\u00f3\u017cnych \u017ar\u00f3de\u0142, by w odpowiedni spos\u00f3b przedstawi\u0107 je odbiorcom.\n- umie samodzielnie wybra\u0107 narz\u0119dzia TIK odpowiadaj\u0105ce realizacji okre\u015blonych zada\u0144.\n- rozumie, jakie s\u0105 przyczyny ogranicze\u0144 zastosowania TIK w wykonywaniu okre\u015blonych prac;\nnp. rozumie ograniczenia wynikaj\u0105ce z konieczno\u015bci algorytmizacji wszelkich prac, by mog\u0142y by\u0107 wykonywane przez TIK.",
- "competence": 4,
- "level": 5
- }
- },
- {
- "pk": 34,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce prezentuj\u0105c wyniki swojej pracy, powinien bra\u0107 pod uwag\u0119 potrzeby odbiorc\u00f3w.\n- umie wprowadza\u0107, zachowywa\u0107 i odzyskiwa\u0107 wyniki swojej pracy.\n- umie wykorzystywa\u0107 TIK podczas tworzenia, ulepszania i zapisywania wynik\u00f3w pracy.\n- umie selekcjonowa\u0107 potrzebne informacje, sprawdzaj\u0105c ich dok\u0142adno\u015b\u0107.",
- "competence": 4,
- "level": 7
- }
- },
- {
- "pk": 35,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce \u017ar\u00f3d\u0142a informacji i narz\u0119dzia TIK wykorzystywane w pracy maj\u0105 swoje wady, zalety i ograniczenia.\n- umie wykorzystywa\u0107 TIK w procesie prezentowania wynik\u00f3w swojej pracy.\n- umie oceni\u0107 wykorzystanie TIK w swojej pracy.\n- umie wykorzysta\u0107 wyniki rozm\u00f3w na temat wad, zalet i ogranicze\u0144 \u017ar\u00f3de\u0142 informacji i narz\u0119dzi TIK do formu\u0142owania ocen dotycz\u0105cych jako\u015bci jego pracy.\n- rozumie, jakie s\u0105 przyczyny ogranicze\u0144 zastosowania TIK w wykonywaniu okre\u015blonych prac.",
- "competence": 4,
- "level": 8
- }
- },
- {
- "pk": 36,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie \u0142\u0105czy\u0107 informacje pochodz\u0105ce z r\u00f3\u017cnych \u017ar\u00f3de\u0142, by w odpowiedni spos\u00f3b przedstawi\u0107 je odbiorcom.\n- umie wybra\u0107 narz\u0119dzia TIK odpowiadaj\u0105ce realizacji okre\u015blonych zada\u0144.\n- rozumie konsekwencje wynikaj\u0105ce z braku podej\u015bcia krytycznego w zakresie korzystania ze \u017ar\u00f3de\u0142 informacji i narz\u0119dzi TIK.",
- "competence": 4,
- "level": 9
- }
- },
- {
- "pk": 55,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 specyficzne cechy jego samego i najbli\u017cszego otoczenia;\r\nnp. w przekazach medialnych rozpoznaje og\u00f3lne podobie\u0144stwa miejsc i przedmiot\u00f3w, zauwa\u017ca taki sam rower lub plac zabaw.\r\n- umie rozr\u00f3\u017cni\u0107 siebie na tle innych (poczucie indywiduum);\r\nnp. dostrzega na zdj\u0119ciach lub materia\u0142ach filmowych swoje cechy indywidualne w por\u00f3wnaniu z innymi (wzrost, kolor w\u0142os\u00f3w).",
- "competence": 7,
- "level": 1
- }
- },
- {
- "pk": 56,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce nie zawsze i wsz\u0119dzie nale\u017cy ujawnia\u0107 informacje o sobie;\r\nnp. rozmawiaj\u0105c z nowo poznan\u0105 osob\u0105 na czacie, nie podaje swojego numeru telefonu ani maila.\r\n- umie dostrzec r\u00f3\u017cnice mi\u0119dzy swoim wizerunkiem, zdolno\u015bciami i umiej\u0119tno\u015bciami a cechami postaci w grze; np. graj\u0105c w gr\u0119 komputerow\u0105, ma \u015bwiadomo\u015b\u0107, \u017ce po wyj\u015bciu z niej nie b\u0119dzie mia\u0142 nadal trzech \u201e\u017cy\u0107\u201d jak jego awatar.",
- "competence": 7,
- "level": 2
- }
- },
- {
- "pk": 57,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce wizerunek mo\u017cna budowa\u0107 i prezentowa\u0107 na r\u00f3\u017cne sposoby;\r\nnp. ma \u015bwiadomo\u015b\u0107, \u017ce osoba siedz\u0105ca po drugiej stronie monitora podczas czatu, mo\u017ce by\u0107 zupe\u0142nie kim\u015b innym ni\u017c ta, za kt\u00f3r\u0105 si\u0119 podaje.\r\n- wie, jakie dzia\u0142ania przez media mog\u0105 mie\u0107 negatywne konsekwencje dla niego lub innych;\r\nnp. wie, \u017ce np. \u015bmieszny filmik z jego udzia\u0142em, wrzucony spontanicznie do sieci, mo\u017ce kiedy\u015b zosta\u0107 wykorzystany przeciwko niemu lub sprawi\u0107 komu\u015b przykro\u015b\u0107.\r\n- umie \u015bwiadomie kreowa\u0107 sw\u00f3j wizerunek w podstawowym zakresie;\r\nnp. rejestruj\u0105c si\u0119 na nowym portalu, umie wybra\u0107, kieruj\u0105c si\u0119 wzgl\u0119dami bezpiecze\u0144stwa, kt\u00f3re informacje o sobie podaje, a kt\u00f3rych nie.",
- "competence": 7,
- "level": 3
- }
- },
- {
- "pk": 58,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie, w zale\u017cno\u015bci od potrzeb, tworzy\u0107 i modyfikowa\u0107 sw\u00f3j wizerunek;\r\nnp. do\u0142\u0105czaj\u0105c do jakiej\u015b grupy w sieci, podaje tylko wybrane informacje o sobie.\r\n- rozumie szanse i zagro\u017cenia wynikaj\u0105ce z budowania w\u0142asnego wizerunku;\r\nnp. zwraca du\u017c\u0105 uwag\u0119 na to, co i gdzie na jego temat pojawia si\u0119 w internecie. Ma \u015bwiadomo\u015b\u0107, \u017ce nawet po skasowaniu jakiej\u015b tre\u015bci, w sieci i tak pozostaje po niej \u015blad.",
- "competence": 7,
- "level": 4
- }
- },
- {
- "pk": 59,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 elementy sk\u0142adowe wizerunku i umie je interpretowa\u0107;\r\nnp. zdaje sobie spraw\u0119, \u017ce wizerunek medialny os\u00f3b publicznych wykorzystuje j\u0119zyk i mow\u0119 cia\u0142a do realizacji zak\u0142adnych cel\u00f3w (np. pozyskania poparcia wyborc\u00f3w)\r\n- umie \u015bwiadomie tworzy\u0107 sw\u00f3j wizerunek w zale\u017cno\u015bci od kontekstu;\r\nnp. wpisuj\u0105c komentarze na portalach spo\u0142eczno\u015bciowych, zdaje sobie spraw\u0119, \u017ce s\u0105 one elementem jego to\u017csamo\u015bci w oczach innych, w tym r\u00f3wnie\u017c przysz\u0142ych pracodawc\u00f3w.\r\n- rozumie konsekwencje i potrzeb\u0119 \u015bwiadomego budowania w\u0142asnego wizerunku;\r\nnp. nie pozwala przypadkowo fotografowa\u0107 swojej osoby podczas imprez.",
- "competence": 7,
- "level": 5
- }
- },
- {
- "pk": 61,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wskaza\u0107 elementy wizerunku on-line, zar\u00f3wno swojego, jak i innych os\u00f3b.\r\n- umie do\u0142\u0105czy\u0107 do wybranej spo\u0142eczno\u015bci i uczestniczy\u0107 w jej \u017cyciu, odpowiednio kreuj\u0105c sw\u00f3j wizerunek;\r\nnp. aktywnie uczestniczy w r\u00f3\u017cnych grupach hobbystycznych, edukacyjnych, terapeutycznych, \u015bwiatopogl\u0105dowych, politycznych itd.\r\n- rozumie r\u00f3\u017cnice pomi\u0119dzy \u015bwiatem do\u015bwiadczanym bezpo\u015brednio i przez media, zdaje sobie spraw\u0119 z powi\u0105za\u0144 mi\u0119dzy nimi;\r\nnp. tworz\u0105c profil na portalu spo\u0142eczno\u015bciowym dba przy tym o w\u0142asny wizerunek, gdy\u017c ma \u015bwiadomo\u015b\u0107 mo\u017cliwych konsekwencji, m.in. wp\u0142ywu na swoj\u0105 \u015bcie\u017ck\u0119 kariery.",
- "competence": 7,
- "level": 7
- }
- },
- {
- "pk": 62,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie budowa\u0107 sieci kontakt\u00f3w \u2013 trwa\u0142e i zadaniowe;\r\nnp. w zale\u017cno\u015bci od kontekstu kreuje sw\u00f3j wizerunek w sieci na potrzeby danych \u015brodowisk, przyjmuj\u0105c w nich r\u00f3\u017cne role spo\u0142eczne.\r\n- umie w spos\u00f3b \u015bwiadomy i odpowiedzialny budowa\u0107 sw\u00f3j wizerunek sieciowy i wykorzysta\u0107 go do realizacji okre\u015blonych cel\u00f3w;\r\nnp. wykorzystuje swojego bloga do budowania pozycji w \u015brodowisku zawodowym.\r\n- rozumie r\u00f3\u017cnice pomi\u0119dzy wizerunkami trwa\u0142ymi a ulotnymi;\r\nnp. inaczej buduje sw\u00f3j wizerunek w procesie tworzenia profilu na portalu spo\u0142eczno\u015bciowym czy forum specjalistycznym, a inaczej na czacie.\r\n- rozumie szanse i korzy\u015bci p\u0142yn\u0105ce z przynale\u017cno\u015bci do danej grupy;\r\n\r\nnp. potrafi je wykorzystywa\u0107 w planowaniu kariery zawodowej, do\u0142\u0105czaj\u0105c do grup specjalist\u00f3w w danej dziedzinie oraz tworz\u0105c profile w spo\u0142eczno\u015bciowych serwisach specjalistycznych.",
- "competence": 7,
- "level": 8
- }
- },
- {
- "pk": 63,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie budowa\u0107 spo\u0142eczno\u015bci i wsp\u00f3\u0142tworzy\u0107 \u015brodowisko cyfrowe oraz kreowa\u0107 to\u017csamo\u015bci zbiorowe, takie jak grupy hobbystyczne czy polityczne;\r\nnp. samodzielnie prowadzi forum, administruje stron\u0105 internetow\u0105 lub tworzy potrzebne mu narz\u0119dzia cyfrowe.\r\n- umie kszta\u0142towa\u0107 w\u0142asny wizerunek w sieci stosownie do r\u00f3\u017cnych kontekst\u00f3w;\r\nnp. na tym samym profilu spo\u0142eczno\u015bciowym potrafi wykreowa\u0107 kilka, cz\u0119sto zupe\u0142nie r\u00f3\u017cnych wizerunk\u00f3w w zale\u017cno\u015bci od kontekstu i potrzeb.",
- "competence": 7,
- "level": 9
- }
- },
- {
- "pk": 37,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jak wyra\u017ca\u0107 swoje elementarne potrzeby i emocje dotycz\u0105ce medi\u00f3w;\r\nnp. w kontakcie z medium (ksi\u0105\u017ck\u0105 czy gr\u0105 w sieci) wskazuje na to, co lubi; wybiera, kt\u00f3r\u0105 ksi\u0105\u017ck\u0119 chce przeczyta\u0107.\r\n- umie korzysta\u0107 ze znanych mu kana\u0142\u00f3w komunikacji;\r\nnp. w podstawowym zakresie rozr\u00f3\u017cnia zasady korzystania z poszczeg\u00f3lnych medi\u00f3w, wie, \u017ce radia (muzyki) si\u0119 s\u0142ucha, a telewizj\u0119 (film) ogl\u0105da.",
- "competence": 5,
- "level": 1
- }
- },
- {
- "pk": 38,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jak zastosowa\u0107 r\u00f3\u017cne rodzaje komunikat\u00f3w (formalne i nieformalne);\r\nnp. dostrzega, \u017ce innymi kana\u0142ami i w inny spos\u00f3b komunikuje si\u0119 z kolegami z klasy i nauczycielem.\r\n- umie korzysta\u0107 z podstawowych narz\u0119dzi komunikacyjnych;\r\nnp. porozumiewa si\u0119 za pomoc\u0105 telefonu kom\u00f3rkowego i komunikator\u00f3w internetowych.\r\n- wie, jakie s\u0105 podstawowe rodzaje komunikat\u00f3w i zna ich funkcje (obraz, d\u017awi\u0119k, s\u0142owo);\r\nnp. potrafi dopasowa\u0107 element muzyczny do odpowiadaj\u0105cej mu ilustracji.",
- "competence": 5,
- "level": 2
- }
- },
- {
- "pk": 39,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, w jaki spos\u00f3b tworzy\u0107 komunikaty w zale\u017cno\u015bci od kontekstu;\r\nnp. inaczej napisze fragment bloga, a inaczej maila do nauczyciela.\r\n- wie, jak znale\u017a\u0107 w sieci osoby, kt\u00f3re podzielaj\u0105 jego zainteresowania, i umie si\u0119 z nimi komunikowa\u0107;\r\nnp. potrafi za\u0142o\u017cy\u0107 nowy w\u0105tek na forum lub do\u0142\u0105czy\u0107 si\u0119 do istniej\u0105cej ju\u017c grupy dyskusyjnej.\r\n- umie wybra\u0107 narz\u0119dzia / technologie w zale\u017cno\u015bci od potrzeb komunikacyjnych;\r\nnp. \u015bwiadomie w\u0142\u0105cza lub wy\u0142\u0105cza kamer\u0119 internetow\u0105 podczas rozmowy przez komunikator.\r\n- rozumie przebieg procesu komunikacji bezpo\u015bredniej i przez media;\r\nnp. potrafi wyja\u015bni\u0107 r\u00f3\u017cnice i podobie\u0144stwa mi\u0119dzy nadawc\u0105 i odbiorc\u0105 komunikatu, a tak\u017ce bierze odpowiedzialno\u015b\u0107 za komunikowane przez siebie tre\u015bci.",
- "competence": 5,
- "level": 3
- }
- },
- {
- "pk": 40,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 zasady komunikowania si\u0119 z innymi u\u017cytkownikami medi\u00f3w;\r\nnp. zna i potrafi stosowa\u0107 w praktyce zasady netykiety.\r\n- wie, jak u\u017cywa\u0107 r\u00f3\u017cnych rodzaj\u00f3w komunikat\u00f3w do przekazywania okre\u015blonych tre\u015bci w zale\u017cno\u015bci od celu i potrzeb;\r\nnp. ma \u015bwiadomo\u015b\u0107 tego, \u017ce czasami jedno zdj\u0119cie mo\u017ce wyrazi\u0107 wi\u0119cej ni\u017c wiele s\u0142\u00f3w.\r\n- wie, czym s\u0105 spo\u0142eczno\u015bci fanowskie oraz zjawisko fanfiction;\r\nnp. umie tworzy\u0107 sieci kontakt\u00f3w spo\u0142ecznych w internecie, w tym r\u00f3wnie\u017c grupy skupiaj\u0105ce cz\u0142onk\u00f3w subkultur fanowskich.",
- "competence": 5,
- "level": 4
- }
- },
- {
- "pk": 41,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie czynniki mog\u0105 mie\u0107 wp\u0142yw na przebieg komunikacji;\r\nnp. zdaje sobie spraw\u0119, \u017ce to, czy jego wiadomo\u015b\u0107 w rozmowie telefonicznej lub kontakcie mailowym zostanie odebrana zgodnie z jego intencj\u0105, zale\u017cy od sytuacji i mo\u017cliwo\u015bci odbiorcy.\r\n- umie skutecznie i precyzyjnie porozumiewa\u0107 si\u0119 z innymi, wykorzystuj\u0105c do tego r\u00f3\u017cnego rodzaju kana\u0142y komunikacji.",
- "competence": 5,
- "level": 5
- }
- },
- {
- "pk": 43,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce anonimowo\u015b\u0107 w sieci jest cz\u0119sto pozorna;\r\nzdaje sobie spraw\u0119, \u017ce ka\u017cdy jego ruch w internecie pozostawia \u015blad mo\u017cliwy potem do odtworzenia.\r\n- wie, \u017ce swoim zachowaniem nie wolno rani\u0107 innych i w procesie komunikacji nie dopuszcza si\u0119 zachowa\u0144 nieakceptowanych spo\u0142ecznie;\r\nnp. prowokowanie k\u0142\u00f3tni, u\u017cywanie obelg, trollowanie itp.\r\n- umie zachowywa\u0107 si\u0119 w spos\u00f3b asertywny i skutecznie komunikowa\u0107 si\u0119 w \u015brodowisku medialnym;\r\nnp. umie w spos\u00f3b jasny, konkretny, otwarty i szczery wyra\u017ca\u0107 swoje opinie, ch\u0119ci, potrzeby i uczucia, a tak\u017ce odrzuca\u0107 propozycje mog\u0105ce stanowi\u0107 zagro\u017cenie.\r\n- umie wyr\u00f3\u017cnia\u0107 komunikaty k\u0142amliwe, propagandowe, maj\u0105ce na celu manipulacj\u0119;\r\nnp. ogl\u0105daj\u0105c reklam\u0119 telewizyjn\u0105 dostrzega w niej elementy r\u00f3\u017cnych socjotechnik.\r\n- rozumie r\u00f3\u017cnice pomi\u0119dzy komunikacj\u0105 formaln\u0105 a nieformaln\u0105;\r\nnp. tworz\u0105c komunikat, uwzgl\u0119dnia specyfik\u0119 jego odbiorcy oraz kontekstu wypowiedzi (np. inaczej napisze maila do prze\u0142o\u017conego, a inaczej do kolegi z pracy).\r\n- wie, jak znale\u017a\u0107 w sieci osoby, kt\u00f3re podzielaj\u0105 jego zainteresowania, i umie si\u0119 z nimi komunikowa\u0107;\r\nnp. potrafi za\u0142o\u017cy\u0107 nowy w\u0105tek na forum lub do\u0142\u0105czy\u0107 si\u0119 do istniej\u0105cej ju\u017c grupy dyskusyjnej.",
- "competence": 5,
- "level": 7
- }
- },
- {
- "pk": 44,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 zasady komunikowania si\u0119 z innymi u\u017cytkownikami medi\u00f3w;\r\nnp. zna i potrafi stosowa\u0107 w praktyce zasady netykiety.\r\n- wie, jakie czynniki mog\u0105 mie\u0107 wp\u0142yw na przebieg komunikacji;\r\nnp. zdaje sobie spraw\u0119, \u017ce to, czy jego wiadomo\u015b\u0107 w rozmowie telefonicznej lub kontakcie mailowym zostanie odebrana zgodnie z jego intencj\u0105, zale\u017cy od sytuacji i mo\u017cliwo\u015bci odbiorcy.\r\n- umie nawi\u0105zywa\u0107 kontakty z osobami mieszkaj\u0105cymi w r\u00f3\u017cnych cz\u0119\u015bciach \u015bwiata, wie, jak r\u00f3\u017cnice kulturowe mog\u0105 wp\u0142ywa\u0107 na proces komunikacji;\r\nnp. potrafi aktywnie uczestniczy\u0107 w spo\u0142eczno\u015bciach ponadlokalnych, mi\u0119dzynarodowych.",
- "competence": 5,
- "level": 8
- }
- },
- {
- "pk": 45,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wychwytywa\u0107 dzia\u0142ania niezgodne z prawem lub spo\u0142ecznie nieakceptowane pope\u0142niane przez lub wobec innych cz\u0142onk\u00f3w spo\u0142eczno\u015bci oraz reaguje na nie;\r\nnp. b\u0119d\u0105c administratorem forum moderuje i weryfikuje proces przep\u0142ywu informacji.\r\n- umie przeciwdzia\u0142a\u0107 barierom informacyjnym, wykluczeniu cyfrowemu, asymetrii informacji oraz prowadzi\u0107 dzia\u0142alno\u015b\u0107 informacyjn\u0105;\r\nnp. samodzielnie tworzy materia\u0142y edukacyjne oraz odpowiednie narz\u0119dzia medialne dla os\u00f3b maj\u0105cych trudno\u015bci z poruszaniem si\u0119 w \u015brodowisku medialnym.",
- "competence": 5,
- "level": 9
- }
- },
- {
- "pk": 46,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie dostrzec w przekazie medialnym elementy znanego mu otoczenia;\r\nnp. wyr\u00f3\u017cnia z t\u0142a medialnego znane mu miejsca.\r\n- umie intuicyjnie pos\u0142ugiwa\u0107 si\u0119 na poziomie elementarnym dost\u0119pnymi w jego otoczeniu mediami;\r\nnp. samodzielnie w\u0142\u0105czy telewizor na kana\u0142 z kresk\u00f3wkami lub uruchomi w telefonie aplikacj\u0119 z ulubion\u0105 gr\u0105.",
- "competence": 6,
- "level": 1
- }
- },
- {
- "pk": 47,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce \u015bwiat przedstawiany w mediach nie jest tym samym, co \u015bwiat do\u015bwiadczany bezpo\u015brednio;\r\nnp. zdaje sobie spraw\u0119, \u017ce nie wszystko to, co jest mo\u017cliwe w grach, jest mo\u017cliwe r\u00f3wnie\u017c w rzeczywisto\u015bci.\r\n- wie, jakie s\u0105 zasady bezpiecze\u0144stwa i higieny korzystania z medi\u00f3w;\r\nnp. ma \u015bwiadomo\u015b\u0107, \u017ce nie nale\u017cy zbyt d\u0142ugo siedzie\u0107 przed telewizorem lub monitorem komputera.\r\n- wie, \u017ce dzi\u0119ki mediom mo\u017cemy poznawa\u0107 \u015bwiat\r\nnp. zdaje sobie spraw\u0119, \u017ce na wybranym kanale telewizyjnym lub w internecie mo\u017ce \u00a0ogl\u0105da\u0107 rzeczy odleg\u0142e i nieznane mu z najbli\u017cszego otoczenia, np. filmy przyrodnicze.\r\n- umie korzysta\u0107 z r\u00f3\u017cnych \u017ar\u00f3de\u0142 i kana\u0142\u00f3w informacji;\r\nnp. potrafi wyszukiwa\u0107 informacje w internecie.",
- "competence": 6,
- "level": 2
- }
- },
- {
- "pk": 48,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 mo\u017cliwo\u015bci i zagro\u017cenia w korzystaniu z r\u00f3\u017cnych medi\u00f3w;\r\nnp. ma \u015bwiadomo\u015b\u0107, \u017ce nale\u017cy by\u0107 ostro\u017cnym w kontaktach z nieznajomymi poznanymi np. poprzez komunikator internetowy.\r\n- umie aktywnie korzysta\u0107 z nowych medi\u00f3w;\r\nnp. potrafi zapisa\u0107 si\u0119 do grupy dyskusyjnej i bra\u0107 w niej aktywny udzia\u0142 lub przy\u0142\u0105czy\u0107 si\u0119 do czatu.\r\n- umie w spos\u00f3b \u015bwiadomy korzysta\u0107 z r\u00f3\u017cnych kana\u0142\u00f3w informacji;\r\nnp. znajduje kilka r\u00f3\u017cnych \u017ar\u00f3de\u0142 odnosz\u0105cych si\u0119 do tej samej informacji i dokonuje ich weryfikacji.\r\n- rozumie podstawowe zasady bezpiecze\u0144stwa w przestrzeni cyfrowej;\r\nnp. nie pobiera z internetu tre\u015bci nieznanych lub pochodz\u0105cych z niepewnych \u017ar\u00f3de\u0142.",
- "competence": 6,
- "level": 3
- }
- },
- {
- "pk": 49,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 og\u00f3lne zasady dzia\u0142ania i umie wykorzystywa\u0107 r\u00f3\u017cne narz\u0119dzia medialne w zale\u017cno\u015bci od specyfiki otoczenia;\r\nnp. w miar\u0119 potrzeby komunikuje si\u0119 za pomoc\u0105 telefonu kom\u00f3rkowego,\r\nkomunikatora internetowego lub pisz\u0105c na forum.\r\n- wie, jak grupa i otoczenie wp\u0142ywaj\u0105 na jego \u017cycie;\r\nnp. umie dostrzec wp\u0142yw komentarzy pod swoim wpisem na portalu spo\u0142eczno\u015bciowym na w\u0142asne wybory, decyzje i upodobania.\r\n- umie aktywnie uczestniczy\u0107 w wybranych spo\u0142eczno\u015bciach on-line;\r\nnp. wymienia si\u0119 informacjami, wyra\u017ca opinie i prowadzi dyskusje w r\u00f3\u017cnych sieciach spo\u0142ecznych w internecie.",
- "competence": 6,
- "level": 4
- }
- },
- {
- "pk": 50,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce r\u00f3\u017cne grupy istniej\u0105ce w otoczeniu medialnym maj\u0105 sw\u00f3j specyficzny charakter, zasady funkcjonowania oraz dynamik\u0119;\r\nnp. wskazuje r\u00f3\u017cnice pomi\u0119dzy spo\u0142eczno\u015bciami on-line os\u00f3b, kt\u00f3re si\u0119 nigdy nie spotka\u0142y, a tymi, kt\u00f3re znaj\u0105 si\u0119 np. ze szko\u0142y.\r\n- umie wykorzystywa\u0107 spo\u0142eczno\u015bciowy potencja\u0142 sieci dla realizacji w\u0142asnych cel\u00f3w;\r\nnp. potrafi w zale\u017cno\u015bci od potrzeby znale\u017a\u0107 po\u017c\u0105dany produkt lub us\u0142ug\u0119 i pozna\u0107 opinie innych u\u017cytkownik\u00f3w na jej temat.\r\n- rozumie procesy powstawania grup i budowania sieci spo\u0142ecznych;\r\nnp. dostrzega r\u00f3\u017cnice w sposobie uczestnictwa w spontanicznie zebranej grupie os\u00f3b w internecie, a r\u00f3wnolegle dzia\u0142aj\u0105cej grupie graczy spotykaj\u0105cych si\u0119 regularnie on-line.",
- "competence": 6,
- "level": 5
- }
- },
- {
- "pk": 52,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie pos\u0142ugiwa\u0107 si\u0119 nowymi technologiami w zakresie umo\u017cliwiaj\u0105cym uczestnictwo w spo\u0142e\r\n- umie aktywnie uczestniczy\u0107 w wybranych spo\u0142eczno\u015bciach on-line;\r\nnp. wymienia si\u0119 informacjami, wyra\u017ca opinie i prowadzi dyskusje w r\u00f3\u017cnych sieciach spo\u0142ecznych w internecie.\r\n- zna zasady bezpiecze\u0144stwa i higieny korzystania z medi\u00f3w.\r\n- umie kszta\u0142towa\u0107 swoje relacje przez media tak, by nie zaburza\u0142y one relacji bezpo\u015brednich;\r\nnp. bezpo\u015brednie kontakty z najbli\u017cszymi osobami uzupe\u0142nia o mo\u017cliwo\u015bci komunikacji przez media, a nie zast\u0119puje ich nimi.",
- "competence": 6,
- "level": 7
- }
- },
- {
- "pk": 53,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce internet to wi\u0119cej ni\u017c tylko medium;\r\nma \u015bwiadomo\u015b\u0107, \u017ce jest to nowy rodzaj rzeczywisto\u015bci, w kt\u00f3rym toczy si\u0119 r\u00f3wnoleg\u0142e, cz\u0119sto tak samo prawdziwe \u017cycie, za\u015b komunikacja przez media jest tylko innym, r\u00f3wnorz\u0119dnym i r\u00f3wnoprawnym sposobem komunikacji z lud\u017ami.\r\n- rozumie zagro\u017cenia mog\u0105ce p\u0142yn\u0105\u0107 z uzale\u017cnienia od internetu.\r\n- wie, \u017ce r\u00f3\u017cne grupy istniej\u0105ce w otoczeniu medialnym maj\u0105 sw\u00f3j specyficzny charakter, zasady funkcjonowania oraz dynamik\u0119;\r\nnp. wskazuje r\u00f3\u017cnice pomi\u0119dzy spo\u0142eczno\u015bciami on-line os\u00f3b, kt\u00f3re si\u0119 nigdy nie spotka\u0142y, a tymi, kt\u00f3re znaj\u0105 si\u0119 np. z pracy.\r\n- umie wykorzystywa\u0107 spo\u0142eczno\u015bciowy potencja\u0142 sieci dla realizacji w\u0142asnych cel\u00f3w;\r\nnp. potrafi w zale\u017cno\u015bci od potrzeby znale\u017a\u0107 po\u017c\u0105dany produkt lub us\u0142ug\u0119 i pozna\u0107 opinie innych u\u017cytkownik\u00f3w na jej temat.",
- "competence": 6,
- "level": 8
- }
- },
- {
- "pk": 54,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zarz\u0105dza\u0107 infrastruktur\u0105 informatyczn\u0105. Posiada odpowiednie umiej\u0119tno\u015bci techniczne pozwalaj\u0105ce na dob\u00f3r specyficznych narz\u0119dzi i technologii do realizacji okre\u015blonych zada\u0144;\r\nnp. potrafi od podstaw stworzy\u0107 i skutecznie pozycjonowa\u0107 stron\u0119 internetow\u0105 lub portal.\r\n- rozumie procesy powstawania grup i budowania sieci spo\u0142ecznych, umie nimi zarz\u0105dza\u0107.",
- "competence": 6,
- "level": 9
- }
- },
- {
- "pk": 82,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce postacie obserwowane w mediach, ukazywane na ekranie telewizyjnym mog\u0105 by\u0107 fikcyjne;\r\nnp. wie, \u017ce postacie z bajek telewizyjnych tj. Gumisie, Kaczor Donald nie istniej\u0105 w rzeczywisto\u015bci, a s\u0105 jedynie wymys\u0142em cz\u0142owieka.\r\n- rozumie r\u00f3\u017cnic\u0119 pomi\u0119dzy bezpo\u015bredni\u0105 rozmow\u0105 a komunikacj\u0105 przez media;\r\nnp. wie, \u017ce podczas rozmowy telefonicznej s\u0142yszymy jedynie g\u0142os rozm\u00f3wcy, ale mo\u017ce on pozostawa\u0107 daleko od nas.\r\n- wie, \u017ce s\u0105 r\u00f3\u017cne sposoby zapisywania i przekazywania s\u0142\u00f3w, obraz\u00f3w i d\u017awi\u0119k\u00f3w, \u017ce mo\u017cna przekazywa\u0107 t\u0119 sam\u0105 tre\u015b\u0107 za pomoc\u0105 r\u00f3\u017cnych urz\u0105dze\u0144;\r\nnp. wie, \u017ce mo\u017cna nagra\u0107 i odtwarza\u0107 odg\u0142osy przyrody i w\u0142asnej mowy, rysowa\u0107, a potem zeskanowa\u0107 rysunek i ogl\u0105da\u0107 go na ekranie komputera, telewizora lub telefonu.\r\n- znai rozr\u00f3\u017cnia r\u00f3\u017cnorakie urz\u0105dzenia s\u0142u\u017c\u0105ce do przekazywania informacji;\r\nnp. umie wskazywa\u0107, podawa\u0107 nazwy oraz opisywa\u0107 w\u0142asnymi s\u0142owami, do czego s\u0142u\u017c\u0105 radio, telewizja, komputer przy\u0142\u0105czony do internetu, telefon kom\u00f3rkowy.",
- "competence": 10,
- "level": 1
- }
- },
- {
- "pk": 83,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce same przekazy audiowizualne, nawet prezentuj\u0105ce realnie istniej\u0105ce postacie, r\u00f3\u017cni\u0105 si\u0119 od spotkania w rzeczywistym \u015bwiecie;\r\nnp. postacie obserwowane w telewizji, na ekranie kinowym lub komputera mog\u0105 wygl\u0105da\u0107 odmiennie, kiedy spotkamy je osobi\u015bcie.\r\n- umie rozr\u00f3\u017cnia\u0107 pomi\u0119dzy potocznym j\u0119zykiem, kt\u00f3rym m\u00f3wimy do rodzic\u00f3w i r\u00f3wie\u015bnik\u00f3w, a s\u0142owami p\u0142yn\u0105cymi z telewizji;\r\nnp. wie, czym r\u00f3\u017cni si\u0119 j\u0119zyk ogl\u0105danej bajki czy transmisji sportowej od codziennej rozmowy.\r\n- zna r\u00f3\u017cne formy przekaz\u00f3w audialnych i audiowizualnych, potrafi wskazywa\u0107 na r\u00f3\u017cnice mi\u0119dzy nimi oraz sposobem ich odbioru;\r\nnp. potrafi wskaza\u0107, czym r\u00f3\u017cni si\u0119 bajka na DVD, emitowana w telewizji, nagrana w formie s\u0142uchowiska na audiobooku, drukowana w formie ksi\u0105\u017cki lub wydana jako e-book.\r\n- zna r\u00f3\u017cnic\u0119 pomi\u0119dzy przekazem tekstowym, d\u017awi\u0119kowym i wideo, potrafi wskaza\u0107 na korzy\u015bci i ograniczenia w odbiorze tych przekaz\u00f3w;\r\nnp. wie, \u017ce lektura s\u0142owa drukowanego wymaga wi\u0119kszego zaanga\u017cowania uwagi ni\u017c telewizja, \u017ce druk bardziej oddzia\u0142uje na nasze my\u015bli, a telewizja na emocje; \u017ce radio pozwala wykonywa\u0107 inne czynno\u015bci i najmniej anga\u017cuje nasz\u0105 uwag\u0119 po\u015br\u00f3d wy\u017cej wymienionych.",
- "competence": 10,
- "level": 2
- }
- },
- {
- "pk": 84,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- zna poj\u0119cie technologii analogowej i cyfrowej;\r\nnp. wie, \u017ce media cyfrowe opieraj\u0105 si\u0119 na kodowaniu przekaz\u00f3w w formie zapisu binarnego (zerojedynkowego).\r\n- umie w\u0142asnymi s\u0142owami wskaza\u0107 najprostsze r\u00f3\u017cnice mi\u0119dzy zapisami analogowymi i cyfrowymi oraz wskaza\u0107 przyk\u0142ady urz\u0105dze\u0144 do zapisu i odtwarzania w obu technologiach;\r\nnp. wie, czym r\u00f3\u017cni si\u0119 fotografia cyfrowa od wykonanej na kliszy, jaki jest proces jej powstawania, czym si\u0119 r\u00f3\u017cni\u0105 te procesy.\r\n- zna podstawowe poj\u0119cia zwi\u0105zane z j\u0119zykiem filmu oraz fotografii zar\u00f3wno w odniesieniu do medi\u00f3w analogowych, jak i cyfrowych;\r\nnp. wie, czym jest kadr, uj\u0119cie, monta\u017c, zna proces powstawania fotografii i filmu w technologii analogowej i cyfrowej.\r\n- rozumie poj\u0119cie multimedi\u00f3w jako technologii integruj\u0105cych r\u00f3\u017cne techniki przekazu;\r\nnp. wie, \u017ce \u0142\u0105cz\u0105 one d\u017awi\u0119ki, teksty drukowane, fotografie i filmy, \u017ce dzi\u0119ki technologii cyfrowej mamy wi\u0119ksz\u0105 mo\u017cliwo\u015b\u0107 nie tylko modyfikowania, ale i \u0142\u0105czenia zapisywanych dot\u0105d w odmienny spos\u00f3b przekaz\u00f3w.",
- "competence": 10,
- "level": 3
- }
- },
- {
- "pk": 85,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie poj\u0119cie hipertekstu oraz umie wyja\u015bni\u0107 r\u00f3\u017cnic\u0119 mi\u0119dzy hipertekstem a tekstem linearnym;\r\nnp. wie, \u017ce s\u0105 to powi\u0105zane ze sob\u0105 odsy\u0142aczami teksty elektroniczne, co u\u0142atwia tworzenie skojarze\u0144 i poznawanie wiedzy, wie, \u017ce spos\u00f3b lektury hipertekst\u00f3w jest r\u00f3\u017cny od lektury drukowanych ksi\u0105\u017cek.\r\n- umie rozr\u00f3\u017cnia\u0107 podstawowe gatunki filmowe i telewizyjne;\r\nnp. potrafi opisa\u0107 w\u0142asnymi s\u0142owami, czym charakteryzuj\u0105 si\u0119 thriller, komedia romantyczna, telenowela dokumentalna, talk show.\r\n- rozumie zjawisko konwergencji gatunk\u00f3w medialnych;\r\nnp. zdaje sobie spraw\u0119, jak tradycyjne audycje i programy telewizyjne mo\u017cna odbiera\u0107 poprzez internet w formie podcast\u00f3w i wideocast\u00f3w, transmisji strumieniowych, jakie zmiany to powoduje dla tre\u015bci przekaz\u00f3w.\r\n- dostrzega, w jaki spos\u00f3b ten sam tekst kultury medialnej mo\u017ce by\u0107 przedstawiany za pomoc\u0105 r\u00f3\u017cnych no\u015bnik\u00f3w przekazu i reklamy;\r\nnp. strony internetowe, film kinowy i DVD, gad\u017cety zwi\u0105zane z seri\u0105 wydawnicz\u0105 o Harrym Potterze.",
- "competence": 10,
- "level": 4
- }
- },
- {
- "pk": 86,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- zna cechy r\u00f3\u017cnicuj\u0105ce przekazu tekstowego dostosowanego do r\u00f3\u017cnych medi\u00f3w i potrafi dostosowywa\u0107 form\u0119 przekazu do medium;\r\nnp. wie, czym r\u00f3\u017cni si\u0119 dany tekst zapisany w formie linearnej, strony internetowej, e-maila, czatu, SMS-a, postu w serwisie spo\u0142eczno\u015bciowym, wsp\u00f3lnie pisanego dokumentu w sieci \u00a0(booksprint).\r\n- rozumie poj\u0119cie interfejsu w relacjach u\u017cytkownik-medium;\r\nnp. potrafi scharakteryzowa\u0107 r\u00f3\u017cnice w sposobie korzystania z tabletu i z gazety, z interfejsu graficznego (GUI) i z interfejsu tekstowego aplikacji komputerowych.\r\n- rozumie poj\u0119cie ekranu, umie opisa\u0107 jego rol\u0119 i przemiany w kulturze audiowizualnej;\r\nnp. umie rozr\u00f3\u017cni\u0107 pomi\u0119dzy odbiorem filmu w kinie, na ekranie telewizora, komputera, tabletu.",
- "competence": 10,
- "level": 5
- }
- },
- {
- "pk": 87,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie poj\u0119cie medialnej reprezentacji rzeczywisto\u015bci i umie wskaza\u0107 na jej rol\u0119 i ograniczenia w poznaniu;\r\nnp. potrafi scharakteryzowa\u0107 spos\u00f3b, w jaki tw\u00f3rcy medi\u00f3w konstruuj\u0105 przekazy, opisa\u0107, czym gatunkowo przekazy audiowizualne r\u00f3\u017cni\u0105 si\u0119 od rzeczywisto\u015bci poznawanej bezpo\u015brednio, dlaczego m\u00f3wimy, \u017ce s\u0105 \u201eobrazami\u201d rzeczywisto\u015bci, potrafi wyja\u015bni\u0107 zjawisko teleobecno\u015bci podmiotu poznania w kategoriach filozoficznych.\r\n- rozumie poj\u0119cie tekstu w szerokim kulturowym znaczeniu, poj\u0119cia kodowania i dekodowania, znaku, semiotyki;\r\nnp. wie, w jaki spos\u00f3b mo\u017cemy postrzega\u0107 film, rze\u017ab\u0119, architektur\u0119 jako teksty kultury z\u0142o\u017cone z okre\u015blonych znak\u00f3w i kod\u00f3w j\u0119zykowych.\r\n- rozumie poj\u0119cie new media literacies;\r\nnp. potrafi opisa\u0107 w kategoriach gatunku medialnego nie tylko przekazy audiowizualne, ale tak\u017ce sieci spo\u0142eczno\u015bciowe, gry wideo, potrafi analizowa\u0107 i scharakteryzowa\u0107 obraz \u015bwiata, kt\u00f3ry tworz\u0105 te przekazy.",
- "competence": 10,
- "level": 6
- }
- },
- {
- "pk": 88,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie r\u00f3\u017cnice mi\u0119dzy gatunkami medialnymi;\r\nnp. potrafi odr\u00f3\u017cni\u0107 program informacyjny, debat\u0119 w studio telewizyjnym, serial, thriller, talent show i scharakteryzowa\u0107 ich g\u0142\u00f3wne cechy.\r\n- potrafi formu\u0142owa\u0107 komunikaty informacyjne w r\u00f3\u017cnych formach, tak\u017ce za po\u015brednictwem wybranych \u015brodk\u00f3w komunikacji internetowej, takich jak np. poczta elektroniczna, czat, komunikator g\u0142osowy, Skype.",
- "competence": 10,
- "level": 7
- }
- },
- {
- "pk": 89,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie specyfik\u0119 poszczeg\u00f3lnych gatunk\u00f3w medialnych i innych zagadnie\u0144;\r\nnp. zwi\u0105zanych z kadrowaniem w filmie, znajomo\u015bci\u0105 form i zasad komunikowania si\u0119 w internecie, w spo\u0142eczno\u015bciach sieciowych.",
- "competence": 10,
- "level": 8
- }
- },
- {
- "pk": 90,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie tworzy\u0107 przekazy medialne (audiowizualne, multimedialne), pos\u0142uguj\u0105c si\u0119 r\u00f3\u017cnymi gatunkami dziennikarskimi i medialnymi w swobodny spos\u00f3b;\r\nnp. potrafi za\u0142o\u017cy\u0107 stron\u0119 internetow\u0105 lub bloga, przygotowa\u0107 film amatorski, zredagowa\u0107 gazet\u0119 \u015brodowiskow\u0105, biuletyn elektroniczny, pos\u0142uguj\u0105c si\u0119 swobodnie aplikacjami umo\u017cliwiaj\u0105cymi wykonanie tych zada\u0144.",
- "competence": 10,
- "level": 9
- }
- },
- {
- "pk": 73,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce pewne przekazy medialne mog\u0105 zach\u0119ca\u0107 nas do czego\u015b;\r\nnp. do zakupu okre\u015blonego produktu, zabawki, czy te\u017c wykonania jakiej\u015b czynno\u015bci, obejrzenia bajki w telewizji.\r\n- wie, kt\u00f3re przekazy s\u0142u\u017c\u0105 zabawie, a kt\u00f3re dotycz\u0105 powa\u017cnych spraw, informuj\u0105 o pewnych wydarzeniach;\r\nnp. umie rozr\u00f3\u017cni\u0107 pomi\u0119dzy bajk\u0105 a programem dla dzieci, w kt\u00f3rym podawane s\u0105 wiadomo\u015bci dotycz\u0105ce naszego \u017cycia.",
- "competence": 9,
- "level": 1
- }
- },
- {
- "pk": 74,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- znapoj\u0119cie reklamy i umie zidentyfikowa\u0107 przekazy reklamowe, kt\u00f3re go otaczaj\u0105;\r\nnp. potrafi rozpoznawa\u0107 i por\u00f3wnywa\u0107 reklamy na ulicy, w prasie, telewizji, internecie.\r\n\r\n- umie rozr\u00f3\u017cni\u0107 pomi\u0119dzy przekazami medialnymi, kt\u00f3re wywo\u0142uj\u0105 r\u00f3\u017cne emocje;\r\nnp. strach, smutek, rado\u015b\u0107.",
- "competence": 9,
- "level": 2
- }
- },
- {
- "pk": 75,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie podstawowe elementy powinna zawiera\u0107 ka\u017cda informacja, tak\u017ce medialna;\r\nnp. umie analizowa\u0107 dany przekaz wiadomo\u015bci telewizyjnych pod k\u0105tem kategorii dlaczego, kto, co, kiedy, gdzie.\r\n- rozumie r\u00f3\u017cnic\u0119 pomi\u0119dzy informacj\u0105 a opini\u0105 i umie formu\u0142owa\u0107 komunikaty zr\u00f3\u017cnicowane pod wzgl\u0119dem funkcji w mediach, tak\u017ce spo\u0142eczno\u015bciowych;\r\nnp. umie poda\u0107 informacj\u0119 o danym przedsi\u0119wzi\u0119ciu spo\u0142ecznym czy kulturalnym oraz wyrazi\u0107 swoj\u0105 opini\u0119; widzi r\u00f3\u017cnic\u0119 pomi\u0119dzy tymi dwoma rodzajami wypowiedzi medialnych.",
- "competence": 9,
- "level": 3
- }
- },
- {
- "pk": 76,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie dyskutowa\u0107, formu\u0142uj\u0105c w\u0142asne opinie w mediach spo\u0142eczno\u015bciowych przy poszanowaniu godno\u015bci dyskutant\u00f3w i koncentrowaniu si\u0119 na merytorycznej stronie przekazu;\r\nnp. zna podstawy etykiety j\u0119zykowej w komunikacji internetowej.\r\n- umie przekonywa\u0107 do swoich racji innych, uzasadniaj\u0105c i obrazuj\u0105c swoje przekonania tak\u017ce przy u\u017cyciu \u015brodk\u00f3w audiowizualnych;\r\nnp. potrafi zaprezentowa\u0107 swoje stanowisko, przedstawi\u0107 je w punktach, zilustrowa\u0107 przyk\u0142adami, pos\u0142u\u017cy\u0107 si\u0119 obrazami, statystykami przestawionymi w formie wizualnej.",
- "competence": 9,
- "level": 4
- }
- },
- {
- "pk": 77,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie tworzy\u0107 przekazy informacyjne\r\ni reklamowe;\r\nnp. inicjatyw spo\u0142ecznych, kulturalnych, w kt\u00f3rych bierze udzia\u0142.\r\n- wie, \u017ce pewne przekazy informacyjne mog\u0105 zawiera\u0107 elementy rozrywki, potrafi wskaza\u0107 przyk\u0142ady takiego po\u0142\u0105czenia w r\u00f3\u017cnych gatunkach medialnych;\r\nnp. umie wskaza\u0107, co w danym przekazie audiowizualnym jest elementem telewizyjnego show, a co ma warto\u015b\u0107 poznawcz\u0105.",
- "competence": 9,
- "level": 5
- }
- },
- {
- "pk": 78,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- zna zagadnienia wsp\u00f3\u0142czesnej teorii wywierania wp\u0142ywu na spo\u0142ecze\u0144stwo, obejmuj\u0105cej zar\u00f3wno reklam\u0119, jak i elementy marketingu;\r\nnp. umie wskaza\u0107 przyk\u0142ady technik stosowanych przez polityk\u00f3w, sprzedawc\u00f3w w przekazach audiowizualnych dobieranych w celu przekonania nas do swojej racji lub produktu.\r\n- rozumie poj\u0119cia infotainment i edutaintment, potrafi \u0142\u0105czy\u0107 elementy edukacji opartej na przekazach werbalnych z reprezentacjami wizualnymi, d\u017awi\u0119kowymi;\r\nnp. umie tworzy\u0107 notatki, prezentacje, kt\u00f3re zawieraj\u0105 nie tylko informacje, ale r\u00f3wnie\u017c przekazy wizualne wyra\u017caj\u0105ce okre\u015blone emocje, potrafi pos\u0142ugiwa\u0107 si\u0119 j\u0119zykiem anegdoty, humoru w prezentowaniu informacji.",
- "competence": 9,
- "level": 6
- }
- },
- {
- "pk": 79,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- dostrzega r\u00f3\u017cnic\u0119 pomi\u0119dzy przekazami informacyjnymi, opiniami a perswazj\u0105;\r\nnp. w reklamie, w wypowiedziach polityk\u00f3w.\r\n- rozr\u00f3\u017cnia przekaz informacyjny od rozrywkowego;\r\nnp. umie okre\u015bli\u0107, co ma warto\u015b\u0107 poznawcz\u0105 w danym przekazie, a co jest elementem, kt\u00f3ry ma budzi\u0107 emocje odbiorcy.",
- "competence": 9,
- "level": 7
- }
- },
- {
- "pk": 80,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- potrafi formu\u0142owa\u0107 poprawne, jasne i logiczne komunikaty informacyjne w mowie i pi\u015bmie, tak\u017ce za po\u015brednictwem\r\n- potrafi wykorzysta\u0107 r\u00f3\u017cne media do formu\u0142owania komunikat\u00f3w perswazyjnych;\r\nnp. forum internetowe.\r\n- sprawnie pos\u0142uguje si\u0119 r\u00f3\u017cnymi \u015brodkami retorycznymi w formu\u0142owanych przez siebie komunikatach. Umie odwo\u0142ywa\u0107 si\u0119 do emocji w swoim przekazie stosownie do potrzeb, wywo\u0142ywa\u0107 wzruszenie;\r\nnp. potrafi przygotowa\u0107 i wyg\u0142osi\u0107 przem\u00f3wienie.",
- "competence": 9,
- "level": 8
- }
- },
- {
- "pk": 81,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- potrafi formu\u0142owa\u0107 skuteczne komunikaty informacyjne w mowie i pi\u015bmie, dostosowane do specyfiki r\u00f3\u017cnych medi\u00f3w komunikacyjnych;\r\nnp. mo\u017ce swobodnie operowa\u0107 j\u0119zykiem publicystycznym, informacyjnym, urz\u0119dowym, naukowym.",
- "competence": 9,
- "level": 9
- }
- },
- {
- "pk": 64,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wyra\u017ca\u0107 swoj\u0105 opini\u0119 o danym przekazie i uzasadni\u0107 j\u0105 swoimi s\u0142owami;\r\nnp. m\u00f3wi: \u201epodoba mi si\u0119 ta bajka, bo te postacie s\u0105 bardzo zabawne\u201d.\r\n- wie, \u017ce zar\u00f3wno s\u0142owa, jak i obrazy maj\u0105 swoje specyficzne znaczenie;\r\nnp. wie, \u017ce mo\u017cna poinformowa\u0107 kogo\u015b zar\u00f3wno za pomoc\u0105 s\u0142owa, jak i rysunku.",
- "competence": 8,
- "level": 1
- }
- },
- {
- "pk": 65,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umieoceni\u0107 dany przekaz medialny w kategoriach estetycznych, uzasadniaj\u0105c swoj\u0105 opini\u0119;\r\nnp. umie powiedzie\u0107, \u017ce w tym filmie s\u0105 interesuj\u0105ce efekty specjalne, ale niezbyt interesuj\u0105ca fabu\u0142a, a bohater grany przez aktora jest osob\u0105 godn\u0105 na\u015bladowania, poniewa\u017c...\r\n- umie pos\u0142ugiwa\u0107 si\u0119 emotikonami w komunikacji SMS-owej i internetowej;\r\nnp. zna znaczenie symbolu :) czy :(\r\n- zna i rozumie r\u00f3\u017cnice pomi\u0119dzy komunikowaniem za pomoc\u0105 s\u0142\u00f3w i gest\u00f3w;\r\nnp. wie, co oznacza gest OK (uniesionego kciuka) lub V, kt\u00f3re gesty s\u0105 uznawane za obra\u017aliwe w danym kr\u0119gu kulturowym.",
- "competence": 8,
- "level": 2
- }
- },
- {
- "pk": 66,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie zjawisko wulgaryzacji kultury medialnej, umie ocenia\u0107 i wybiera\u0107 przekazy, kt\u00f3re temu przeciwdzia\u0142aj\u0105;\r\nnp. potrafi skrytykowa\u0107 film lub gr\u0119 komputerow\u0105 wskazuj\u0105c jej niski poziom, s\u0142u\u017c\u0105cy jedynie prostej rozrywce, brak przes\u0142ania, ub\u00f3stwo \u015brodk\u00f3w obrazowania czy warstwy d\u017awi\u0119kowej, agresywny j\u0119zyk przekazu.\r\n- umie przet\u0142umaczy\u0107 emocje wyra\u017cane emotikonami na zdania opisuj\u0105ce i uzasadniaj\u0105ce te emocje w komunikacji internetowej. Np. u\u017cywa stwierdze\u0144 takich jak: \u201eJestem smutny i rozczarowany, poniewa\u017c...\u201d zamiast skr\u00f3tu :(",
- "competence": 8,
- "level": 3
- }
- },
- {
- "pk": 67,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- zna podstawowe poj\u0119cia z zakresu estetyki, krytyki kulturalnej;\r\nnp. potrafi tworzy\u0107 recenzje przekaz\u00f3w medialnych, swobodnie operuj\u0105c przyk\u0142adami i por\u00f3wnaniami dzie\u0142 audiowizualnych.\r\n- wie, jakie znaczenie w komunikacji maj\u0105 poszczeg\u00f3lne gesty, mimika, postawy cia\u0142a czy odleg\u0142o\u015b\u0107 pomi\u0119dzy osobami i umie wskazywa\u0107 przyk\u0142ady w przekazach audiowizualnych;\r\nnp. potrafi okre\u015bli\u0107 na podstawie zachowa\u0144 polityk\u00f3w w studio telewizyjnym ich stosunek do omawianych kwestii.",
- "competence": 8,
- "level": 4
- }
- },
- {
- "pk": 68,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie i potrafi opisa\u0107 zasady zwi\u0105zane z savoir vivre w zakresie komunikowania si\u0119 z innymi osobami za po\u015brednictwem medi\u00f3w;\r\nnp. wie, o jakiej porze mo\u017cna zadzwoni\u0107 do danej osoby ze wzgl\u0119du na pe\u0142nion\u0105 funkcj\u0119, w jaki spos\u00f3b powinno si\u0119 odnosi\u0107 do go\u015bci w studio telewizyjnym itp.\r\n- umie stosowa\u0107 odpowiedni\u0105 dykcj\u0119, intonacj\u0119 g\u0142osu i mow\u0119 cia\u0142a podczas komunikacji bezpo\u015bredniej oraz pos\u0142ugiwa\u0107 si\u0119 symbolami w komunikacji wizualnej;\r\nnp. umie dobra\u0107 ilustracje do prezentacji wyra\u017caj\u0105cej r\u00f3\u017cne emocje, przekonania.",
- "competence": 8,
- "level": 5
- }
- },
- {
- "pk": 69,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umiewykorzysta\u0107 podstawowe poj\u0119cia z zakresu retoryki, umie przygotowa\u0107 i wyg\u0142osi\u0107 publiczne przem\u00f3wienie na zaj\u0119ciach akademickich;\r\nnp. potrafi wyst\u0105pi\u0107 publicznie w studio radiowym i telewizyjnym.\r\n- rozumie zagadnienia z zakresu komunikowania i kultury medialnej;\r\nnp. potrafi poda\u0107 podstawowe modele komunikowania, opisa\u0107 charakter przemian kulturowych (np. j\u0119zykowych) wywo\u0142anych przez zmiany technologiczne.",
- "competence": 8,
- "level": 6
- }
- },
- {
- "pk": 70,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie potrzeb\u0119 i specyfik\u0119 dostosowania j\u0119zyka do komunikacji z r\u00f3\u017cnymi grupami odbiorc\u00f3w za po\u015brednictwem medi\u00f3w;\r\nnp. wie, jakie s\u0105 psychologiczne i spo\u0142eczne uwarunkowania j\u0119zyka kierowanego do dzieci, podw\u0142adnych, prze\u0142o\u017conych, urz\u0119dnik\u00f3w, dziennikarzy.\r\n- zna znaczenie mowy cia\u0142a, rozpoznaje podstawowe gesty, pozycje cia\u0142a, mimik\u0119, rozumie znaczenie odleg\u0142o\u015bci od innych os\u00f3b w komunikacji, dostosowywania intonacji g\u0142osu;\r\nnp. potrafi wskazywa\u0107 je w \u017cyciu publicznym.",
- "competence": 8,
- "level": 7
- }
- },
- {
- "pk": 71,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie tworzy\u0107 przekazy medialne w pracy i \u017cyciu osobistym.\r\n- dba o logiczny, jasny i czytelny przekaz swoich komunikat\u00f3w.\r\n- potrafi wypowiada\u0107 si\u0119 podczas audycji radiowej i telewizyjnej, dyskusji internetowej z poszanowaniem zasad dyskusji i godno\u015bci jej uczestnik\u00f3w.",
- "competence": 8,
- "level": 8
- }
- },
- {
- "pk": 72,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- swobodnie dostosowuje sw\u00f3j przekaz do konkretnej osoby i sytuacji komunikacyjnej.\r\n- biegle zna j\u0119zyk cia\u0142a, umie si\u0119 nim pos\u0142ugiwa\u0107 w komunikacji publicznej, w kontaktach z mediami instytucjonalnymi. Potrafi dostosowa\u0107 sw\u00f3j przekaz do sytuacji medialnej, gatunku, formatu.\r\n- swobodnie wyst\u0119puje przed kamer\u0105, ma i stosuje wiedz\u0119 z zakresu wywierania wp\u0142ywu na inne osoby za pomoc\u0105 mowy cia\u0142a i intonacji g\u0142osu.\r\n- potrafiprzekazywa\u0107 swoj\u0105 wiedz\u0119 i umiej\u0119tno\u015bci w zakresie komunikacji innym;\r\nnp. mo\u017ce prowadzi\u0107 szkolenia i warsztaty z zakresu edukacji medialnej, etykiety komunikacyjnej.",
- "competence": 8,
- "level": 9
- }
- },
- {
- "pk": 91,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, za pomoc\u0105 jakich narz\u0119dzi medialnych mo\u017cna przygotowa\u0107 zdj\u0119cie, nagranie d\u017awi\u0119kowe, kr\u00f3tki film wideo, rysunek.\r\n- zna podstawowe poj\u0119cia zwi\u0105zane z korzystaniem z medi\u00f3w;\r\nnp. klikanie, ikona.\r\n- pr\u00f3buje samodzielnie korzysta\u0107 z medialnych narz\u0119dzi;\r\nnp. umie korzysta\u0107 z ekranu dotykowego lub pos\u0142ugiwa\u0107 si\u0119 myszk\u0105.\r\n- umie utrwala\u0107 subiektywny obraz \u015bwiata za pomoc\u0105 narz\u0119dzi medialnych;\r\n\r\nnp. fotografuje swoje zabawki.",
- "competence": 11,
- "level": 1
- }
- },
- {
- "pk": 92,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przygotowa\u0107 z zastosowaniem prostego sprz\u0119tu: zdj\u0119cie, nagranie w\u0142asnego g\u0142osu lub d\u017awi\u0119k\u00f3w otoczenia, nagranie kr\u00f3tkiego filmu wideo, narysowa\u0107 prosty obraz przy u\u017cyciu odpowiedniego oprogramowania, napisa\u0107 kr\u00f3tki tekst w edytorze tekstu.\r\n- umie, wsp\u00f3lnie z innymi uczniami, przygotowa\u0107 prost\u0105 opowie\u015b\u0107 z wykorzystaniem komunikat\u00f3w medialnych jednego typu;\r\nnp. serii zdj\u0119\u0107, wykonanych przez r\u00f3\u017cnych uczni\u00f3w lub serii rysunk\u00f3w lub serii uj\u0119\u0107 wideo.",
- "competence": 11,
- "level": 2
- }
- },
- {
- "pk": 93,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przygotowa\u0107 prost\u0105 fotografi\u0119 otoczenia lub obiekt\u00f3w, potrafi samodzielnie nagrywa\u0107 d\u017awi\u0119ki, umie przygotowa\u0107 kr\u00f3tki film wideo, przygotowa\u0107 prosty rysunek w odpowiednim programie, przygotowa\u0107 prost\u0105 form\u0119 graficzn\u0105 przy u\u017cyciu oprogramowania, przygotowa\u0107 kr\u00f3tki tekst w edytorze tekstu.\r\n- umie przygotowa\u0107 (przy wsparciu nauczyciela, animatora) w trakcie pracy grupowej prost\u0105 opowie\u015b\u0107 medialn\u0105 z wykorzystaniem medi\u00f3w jednego typu (elementy sk\u0142adowe przygotowuj\u0105 poszczeg\u00f3lni cz\u0142onkowie grupy), z dodaniem kr\u00f3tkich element\u00f3w tekstowych opisuj\u0105cych scen\u0119, zwiastuj\u0105cych kolejne wydarzenia.\r\n- pr\u00f3buje tworzy\u0107 w grupie proste narracje medialne z wykorzystaniem r\u00f3\u017cnorodnych komunikat\u00f3w sk\u0142adowych (<em>digital storytelling</em>).",
- "competence": 11,
- "level": 3
- }
- },
- {
- "pk": 94,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie samodzielnie przygotowa\u0107 zestaw fotografii, scen filmowych, rysunk\u00f3w, nagra\u0144, element\u00f3w graficznych na wybrany temat.- umie swobodnie \u0142\u0105czy\u0107 ze sob\u0105 r\u00f3\u017cnorodne zgromadzone tre\u015bci i tworzy\u0107 rozbudowane narracje cyfrowe na wybrany temat.\r\n- umie przygotowa\u0107 w grupie narracj\u0119 z\u0142o\u017con\u0105 z r\u00f3\u017cnorodnych medi\u00f3w na wybrany temat, planuj\u0105c wcze\u015bniej zespo\u0142owo dzia\u0142ania grupy on-line w edytorze rozszerzonych medi\u00f3w lub wymieniaj\u0105c si\u0119 informacjami na temat przygotowa\u0144 i planowania projektu na blogu lub w grupie w serwisie spo\u0142eczno\u015bciowym.\r\n- umie wsp\u00f3\u0142tworzy\u0107 w grupie proste teksty i prezentacje multimedialne przy u\u017cyciu narz\u0119dzi umo\u017cliwiaj\u0105cych sieciow\u0105 wsp\u00f3\u0142prac\u0119.",
- "competence": 11,
- "level": 4
- }
- },
- {
- "pk": 95,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie samodzielnie przygotowa\u0107 obszerny zestaw r\u00f3\u017cnorodnych tre\u015bci medialnych na wybrany temat.\r\n- umie swobodnie \u0142\u0105czy\u0107 ze sob\u0105 r\u00f3\u017cnorodne zgromadzone tre\u015bci i tworzy\u0107 na ich bazie rozbudowane narracje cyfrowe;\r\n\r\nnp. kolekcje i archiwa cyfrowe, blogi, wiki, opowiadanie hipertekstowe, serwis internetowy, gazeta on-line lub inne formy oparte na hipertekstowej architekturze.\r\n- umie zrealizowa\u0107 w grupie projekt medialny z podzia\u0142em zada\u0144 dotycz\u0105cych przygotowywania sk\u0142adowych cz\u0119\u015bci medialnych oraz montowania w ca\u0142o\u015b\u0107 zgromadzonych element\u00f3w lub ich kolekcji;\r\n\r\nnp. umie organizowa\u0107 prac\u0119 zwi\u0105zan\u0105 z przygotowaniem dzia\u0142a\u0144 grupy, w\u0142\u0105cza\u0107 si\u0119 za pomoc\u0105 narz\u0119dzi medialnych do grupowej pracy, nadzorowa\u0107 przebieg prac grupy, realizacj\u0119 kolejnych krok\u00f3w i tworzenie efekt\u00f3w projektu przy u\u017cyciu sieciowych technologii wsp\u00f3\u0142pracy, takich jak portal edukacyjny, wiki, blog, edytory tekstu lub prezentacje multimedialne wsp\u00f3\u0142tworzone on-line, serwisy spo\u0142eczno\u015bciowe.\r\n- umie wsp\u00f3\u0142tworzy\u0107 w grupie teksty i prezentacje multimedialne przy u\u017cyciu sieciowych narz\u0119dzi wsp\u00f3\u0142pracy.\r\n- umie dokumentowa\u0107 i komentowa\u0107 otoczenie i zachodz\u0105ce w nim procesy;\r\n\r\nnp. tworzy reporta\u017c tekstowy, zdj\u0119ciowy, wideo, reporta\u017c radiowy i inne formy radiowe publikowane w formie podcastu, wywiady, digitalizuje artefakty.",
- "competence": 11,
- "level": 5
- }
- },
- {
- "pk": 97,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie samodzielnie przygotowa\u0107 zestaw fotografii, scen filmowych, rysunk\u00f3w, nagra\u0144, element\u00f3w graficznych na wybrany temat.\r\n- umie swobodnie \u0142\u0105czy\u0107 ze sob\u0105 r\u00f3\u017cnorodne zgromadzone tre\u015bci i tworzy\u0107 proste narracje cyfrowe na wybrany temat.\r\n- umie przygotowa\u0107 w grupie narracj\u0119 z\u0142o\u017con\u0105 z r\u00f3\u017cnorodnych medi\u00f3w na wybrany temat, planuj\u0105c wcze\u015bniej zespo\u0142owo dzia\u0142ania grupy on-line w edytorze rozszerzonych medi\u00f3w lub wymieniaj\u0105c si\u0119 informacjami na temat przygotowa\u0144 i planowania projektu na blogu lub w grupie w serwisie spo\u0142eczno\u015bciowym.\r\n- umie wsp\u00f3\u0142tworzy\u0107 w grupie proste teksty i prezentacje multimedialne przy u\u017cyciu narz\u0119dzi umo\u017cliwiaj\u0105cych sieciow\u0105 wsp\u00f3\u0142prac\u0119.",
- "competence": 11,
- "level": 7
- }
- },
- {
- "pk": 98,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie samodzielnie przygotowa\u0107 obszerny zestaw r\u00f3\u017cnorodnych tre\u015bci medialnych na wybrany temat.\r\n- umie swobodnie \u0142\u0105czy\u0107 ze sob\u0105 r\u00f3\u017cnorodne zgromadzone tre\u015bci i tworzy\u0107 na ich bazie rozbudowane narracje cyfrowe (np. kolekcje i archiwa cyfrowe, blogi, wiki, opowiadanie hipertekstowe, serwis internetowy, gazeta on-line lub inne formy oparte na hipertekstowej architekturze).\r\n- umie zrealizowa\u0107 w grupie projekt medialny z podzia\u0142em zada\u0144 dotycz\u0105cych przygotowywania sk\u0142adowych cz\u0119\u015bci medialnych oraz montowania w ca\u0142o\u015b\u0107 zgromadzonych element\u00f3w lub ich kolekcji;\r\n\r\nnp. umie organizowa\u0107 prac\u0119 zwi\u0105zan\u0105 z przygotowaniem dzia\u0142a\u0144 grupy, w\u0142\u0105cza\u0107 si\u0119 za pomoc\u0105 narz\u0119dzi medialnych do grupowej pracy, nadzorowa\u0107 przebieg prac grupy, realizacj\u0119 kolejnych krok\u00f3w i tworzenie efekt\u00f3w projektu przy u\u017cyciu sieciowych technologii wsp\u00f3\u0142pracy, takich jak portal edukacyjny, wiki, blog, edytory tekstu lub prezentacje multimedialne wsp\u00f3\u0142tworzone on-line, serwisy spo\u0142eczno\u015bciowe.\r\n- umie wsp\u00f3\u0142tworzy\u0107 w grupie teksty i prezentacje multimedialne przy u\u017cyciu sieciowych narz\u0119dzi wsp\u00f3\u0142pracy.\r\n- umie dokumentowa\u0107 i komentowa\u0107 otoczenie i zachodz\u0105ce w nim procesy;\r\n\r\nnp. tworzy reporta\u017c tekstowy, zdj\u0119ciowy, wideo, reporta\u017c radiowy i inne formy radiowe publikowane w formie podcastu, wywiady, digitalizuje artefakty.",
- "competence": 11,
- "level": 8
- }
- },
- {
- "pk": 99,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie koordynowa\u0107 dzia\u0142anie zespo\u0142u przygotowuj\u0105cego tre\u015bci do realizowanego projektu medialnego.\r\n- umie uczy\u0107 innych, jak gromadzi\u0107 tre\u015bci i tworzy\u0107 na ich podstawie rozbudowane narracje cyfrowe.\r\n- umie nadzorowa\u0107 realizacj\u0119 projektu medialnego, dzieli\u0107 zadania dotycz\u0105ce przygotowywania sk\u0142adowych cz\u0119\u015bci medialnych oraz montowania w ca\u0142o\u015b\u0107 zgromadzonych element\u00f3w lub ich kolekcji, potrafi organizowa\u0107 prac\u0119 kilku zespo\u0142\u00f3w realizuj\u0105cych wsp\u00f3lny projekt medialny.\r\n- umie uczy\u0107 innych, jak przygotowywa\u0107 prezentacje medialne, umie tworzy\u0107 prezentacje medialne na profesjonalnym poziomie.\r\n- umie przeprowadzi\u0107 szkolenie w zakresie dokumentowania i komentowania otoczenia i zachodz\u0105cych w nim proces\u00f3w;\r\n\r\nnp. tworzenia reporta\u017cy tekstowych, zdj\u0119ciowych, wideo, reporta\u017cy radiowych i innych form radiowych publikowanych w formie podcastu, wywiad\u00f3w, digitalizowania artefakt\u00f3w.",
- "competence": 11,
- "level": 9
- }
- },
- {
- "pk": 100,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce proste tre\u015bci medialne mo\u017cna przetwarza\u0107.\r\n- pr\u00f3buje przy u\u017cyciu prostego oprogramowania modyfikowa\u0107 zdj\u0119cie lub grafik\u0119;\r\n\r\nnp. bawi si\u0119 programami do modyfikacji zdj\u0119\u0107 lub narz\u0119dziem do rysowania.",
- "competence": 12,
- "level": 1
- }
- },
- {
- "pk": 101,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przetwarza\u0107 w podstawowym zakresie dost\u0119pne tre\u015bci medialne \u00a0 (zdj\u0119cia, grafik\u0119, filmy wideo, d\u017awi\u0119k) przy u\u017cyciu prostego oprogramowania do obr\u00f3bki tre\u015bci.\r\n- wie, \u017ce tre\u015bci analogowe mo\u017cna przekszta\u0142ci\u0107 na form\u0119 cyfrow\u0105, odtwarzan\u0105 za pomoc\u0105 cyfrowych urz\u0105dze\u0144.",
- "competence": 12,
- "level": 2
- }
- },
- {
- "pk": 102,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przetwarza\u0107 dost\u0119pne i samodzielnie przygotowane tre\u015bci medialne (zdj\u0119cia, grafik\u0119, filmy wideo, d\u017awi\u0119k).\r\n- umie w grupie tworzy\u0107 cyfrowe narracje na bazie zmodyfikowanych wcze\u015bniej znalezionych lub przygotowanych przez zesp\u00f3\u0142 tre\u015bci medialnych.\r\n- potrafi skanowa\u0107 dokumenty, zdj\u0119cia i przeprowadza\u0107 ich podstawow\u0105 edycj\u0119 za pomoc\u0105 program\u00f3w do skanowania.",
- "competence": 12,
- "level": 3
- }
- },
- {
- "pk": 103,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przetwarza\u0107 znalezione i przygotowane wcze\u015bniej rozbudowane kolekcje tre\u015bci medialnych z\u0142o\u017cone ze zdj\u0119\u0107, grafiki, film\u00f3w wideo, d\u017awi\u0119ku.\r\n- umie w grupie tworzy\u0107 rozbudowane cyfrowe narracje, filmy, hipermedialne projekty oparte na zmodyfikowanych przez cz\u0142onk\u00f3w grupy tre\u015bciach lub znalezionych, przetworzonych materia\u0142ach.\r\n- umie samodzielnie digitalizowa\u0107 tre\u015bci analogowe;\r\n\r\nnp. umie skanowa\u0107 ksi\u0105\u017cki, gazety, dokumenty, zdj\u0119cia.",
- "competence": 12,
- "level": 4
- }
- },
- {
- "pk": 104,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie na zaawansowanym poziomie modyfikowa\u0107 przygotowane i znalezione rozbudowane zasoby tre\u015bci multimedialnych i hipermedialnych.\r\n- umie w grupie tworzy\u0107 zaawansowane cyfrowe narracje, filmy, hipermedialne projekty oparte na zmodyfikowanych przez uczestnik\u00f3w grupy tre\u015bciach lub znalezionych, z\u0142o\u017conych komunikatach medialnych.\r\n- umie, dzia\u0142aj\u0105c w grupie, digitalizowa\u0107 analogowe tre\u015bci;\r\n\r\nnp. wsp\u00f3lnie z innymi realizuje projekt digitalizacyjny.",
- "competence": 12,
- "level": 5
- }
- },
- {
- "pk": 106,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przetwarza\u0107 znalezione i przygotowane wcze\u015bniej rozbudowane kolekcje tre\u015bci medialnych z\u0142o\u017cone ze zdj\u0119\u0107, grafiki, film\u00f3w wideo, d\u017awi\u0119ku.\r\n- umie w grupie tworzy\u0107 proste cyfrowe narracje, filmy, hipermedialne projekty oparte na zmodyfikowanych przez uczestnik\u00f3w grupy tre\u015bciach lub znalezionych, przetworzonych materia\u0142ach.\r\n- umie samodzielnie digitalizowa\u0107 tre\u015bci analogowe: skanowa\u0107 ksi\u0105\u017cki, gazety, dokumenty, zdj\u0119cia.",
- "competence": 12,
- "level": 7
- }
- },
- {
- "pk": 107,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie na zaawansowanym poziomie modyfikowa\u0107 przygotowane i znalezione rozbudowane zasoby tre\u015bci multimedialnych i hipermedialnych.\r\n- umie w grupie tworzy\u0107 zaawansowane cyfrowe narracje, filmy, hipermedialne projekty oparte na zmodyfikowanych przez cz\u0142onk\u00f3w grupy tre\u015bciach lub znalezionych, z\u0142o\u017conych komunikatach medialnych.\r\n- umie, dzia\u0142aj\u0105c w grupie, digitalizowa\u0107 analogowe tre\u015bci.",
- "competence": 12,
- "level": 8
- }
- },
- {
- "pk": 108,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie rozwi\u0105zywa\u0107 problemy pojawiaj\u0105ce si\u0119 w trakcie zaawansowanego modyfikowania tre\u015bci multimedialnych i hipermedialnych.\r\n- umie przeprowadzi\u0107 warsztatowe szkolenie w zakresie modyfikacji tre\u015bci dla u\u017cytkownik\u00f3w od poziomu pocz\u0105tkuj\u0105cego do zaawansowanego.\r\n- umie koordynowa\u0107 dzia\u0142anie zespo\u0142u lub zespo\u0142\u00f3w tworz\u0105cych zaawansowane cyfrowe narracje, filmy, hipermedialne projekty oparte na zmodyfikowanych tre\u015bciach.\r\n- umie koordynowa\u0107 zaawansowane dzia\u0142ania w zakresie digitalizacji.",
- "competence": 12,
- "level": 9
- }
- },
- {
- "pk": 109,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- przy wsparciu osoby doros\u0142ej pokazuje grupie efekty pr\u00f3b samodzielnego tworzenia i przetwarzania komunikat\u00f3w.",
- "competence": 13,
- "level": 1
- }
- },
- {
- "pk": 110,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zaprezentowa\u0107, z wykorzystaniem sprz\u0119tu multimedialnego (np. komputer z rzutnikiem multimedialnym), przygotowane indywidualnie lub w grupie tre\u015bci medialne.",
- "competence": 13,
- "level": 2
- }
- },
- {
- "pk": 111,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie obs\u0142ugiwa\u0107 rzutnik multimedialny lub inne narz\u0119dzie o podobnym zastosowaniu;\r\n\r\nnp. umie za jego pomoc\u0105 wy\u015bwietli\u0107 pojedyncze komunikaty \u2013 zdj\u0119cia, teksty, slajdy prezentacji multimedialnej, filmy, strony internetowe.\r\n- wie o istnieniu serwis\u00f3w internetowych, blog\u00f3w, narz\u0119dzi do kolektywnego tworzenia tre\u015bci on-line.",
- "competence": 13,
- "level": 3
- }
- },
- {
- "pk": 112,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie obs\u0142ugiwa\u0107 narz\u0119dzia do synchronicznego prezentowania tre\u015bci (prezentacje on-line w czasie rzeczywistym).\r\n- umie obs\u0142ugiwa\u0107 narz\u0119dzia do asynchronicznego prezentowania tre\u015bci (prezentacje multimedialne on-line i off-line).\r\n- umie obs\u0142ugiwa\u0107 narz\u0119dzia do prowadzenia zbiorowej komunikacji on-line z wykorzystaniem d\u017awi\u0119ku i wideo.\r\n- umie prezentowa\u0107 tre\u015bci na blogu, publikowa\u0107 za pomoc\u0105 narz\u0119dzi do kolektywnego tworzenia tre\u015bci, umie w grupie przygotowa\u0107 prezentacj\u0119 tre\u015bci za pomoc\u0105 systemu typu wiki oraz zak\u0142ada\u0107 i moderowa\u0107 dyskusje sieciowe za pomoc\u0105 listy dyskusyjnej, forum oraz serwis\u00f3w spo\u0142eczno\u015bciowych.\r\n- wie, jakie s\u0105 podstawy pracy dziennikarskiej w internecie i potrafi po wcze\u015bniejszym przygotowaniu publikowa\u0107 tre\u015bci na temat \u017cycia w spo\u0142eczno\u015bci lokalnej;\r\n\r\nnp. wie, czym jest \u201edziennikarstwo obywatelskie\u201d i pr\u00f3buje dzia\u0142a\u0107 jako dziennikarz obywatelski.\r\n- umie tworzy\u0107 proste archiwa cyfrowe z\u0142o\u017cone ze zdigitalizowanych materia\u0142\u00f3w.",
- "competence": 13,
- "level": 4
- }
- },
- {
- "pk": 113,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie obs\u0142ugiwa\u0107 systemy zarz\u0105dzania tre\u015bci\u0105, zarz\u0105dza\u0107 list\u0105 autor\u00f3w i publikowanymi tre\u015bciami, dodawa\u0107, edytowa\u0107 i usuwa\u0107 tre\u015bci przy u\u017cyciu narz\u0119dzi typu blog, sieciowy pakiet biurowy.\r\n- umie rozpowszechnia\u0107 informacje na temat w\u0142asnej lub grupowej tw\u00f3rczo\u015bci;\r\n\r\nnp. umie wykorzystywa\u0107 serwisy spo\u0142eczno\u015bciowe do tworzenia przestrzeni publikacji na okre\u015blony temat.\r\n- wie, jak funkcjonuje redakcja internetowa, potrafi wykorzysta\u0107 podstawy umiej\u0119tno\u015bci dziennikarskich do publikowania (wcze\u015bniej przygotowanych samodzielnie i/lub w grupie) bie\u017c\u0105cych informacji na temat \u017cycia spo\u0142eczno\u015bci lokalnej.\r\n- umie tworzy\u0107 rozbudowane archiwa cyfrowe z\u0142o\u017cone ze zdigitalizowanych materia\u0142\u00f3w.",
- "competence": 13,
- "level": 5
- }
- },
- {
- "pk": 115,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie obs\u0142ugiwa\u0107 narz\u0119dzia do synchronicznego prezentowania tre\u015bci (prezentacje on-line w czasie rzeczywistym).\r\n- umie obs\u0142ugiwa\u0107 narz\u0119dzia do asynchronicznego prezentowania tre\u015bci (prezentacje multimedialne on-line i off-line).\r\n- umie obs\u0142ugiwa\u0107 narz\u0119dzia do prowadzenia zbiorowej komunikacji on-line z wykorzystaniem d\u017awi\u0119ku i wideo.\r\n- umie prezentowa\u0107 tre\u015bci na blogu, publikowa\u0107 za pomoc\u0105 narz\u0119dzi do kolektywnego tworzenia tre\u015bci;\r\n\r\nnp. umie w grupie przygotowa\u0107 prezentacj\u0119 tre\u015bci za pomoc\u0105 systemu typu wiki oraz zak\u0142ada\u0107 i moderowa\u0107 dyskusje sieciowe za pomoc\u0105 listy dyskusyjnej, forum oraz serwis\u00f3w spo\u0142eczno\u015bciowych.\r\n- wie, jakie s\u0105 podstawy pracy dziennikarskiej w internecie i potrafi po wcze\u015bniejszym przygotowaniu publikowa\u0107 tre\u015bci na temat \u017cycia w spo\u0142eczno\u015bci lokalnej;\r\n\r\nnp. wie, czym jest \u201edziennikarstwo obywatelskie\u201d i pr\u00f3buje dzia\u0142a\u0107 jako dziennikarz obywatelski.\r\n- umie tworzy\u0107 proste archiwa cyfrowe z\u0142o\u017cone ze zdigitalizowanych materia\u0142\u00f3w.",
- "competence": 13,
- "level": 7
- }
- },
- {
- "pk": 116,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie obs\u0142ugiwa\u0107 systemy zarz\u0105dzania tre\u015bci\u0105, zarz\u0105dza\u0107 list\u0105 autor\u00f3w i publikowanymi tre\u015bciami, dodawa\u0107, edytowa\u0107 i usuwa\u0107 tre\u015bci przy u\u017cyciu narz\u0119dzi typu blog, sieciowy pakiet biurowy.\r\n- umie wykorzystywa\u0107 serwisy spo\u0142eczno\u015bciowe do tworzenia przestrzeni publikacji na okre\u015blony temat, umie rozpowszechnia\u0107 informacje na temat w\u0142asnej lub grupowej tw\u00f3rczo\u015bci.\r\n- wie, jak funkcjonuje redakcja internetowa, potrafi wykorzysta\u0107 podstawy umiej\u0119tno\u015bci dziennikarskich do publikowania (wcze\u015bniej przygotowanych samodzielnie i/lub w grupie) bie\u017c\u0105cych informacji na temat \u017cycia spo\u0142eczno\u015bci lokalnej.\r\n- umie tworzy\u0107 rozbudowane archiwa cyfrowe z\u0142o\u017cone ze zdigitalizowanych materia\u0142\u00f3w.",
- "competence": 13,
- "level": 8
- }
- },
- {
- "pk": 117,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie rozwi\u0105zywa\u0107 problemy zwi\u0105zane z obs\u0142ug\u0105 system\u00f3w zarz\u0105dzania tre\u015bci\u0105.\r\n- umie animowa\u0107 sieciowe spo\u0142eczno\u015bci i szkoli\u0107 na temat zarz\u0105dzania sieciowymi spo\u0142eczno\u015bciami inne osoby.\r\n- umie zorganizowa\u0107 internetow\u0105 redakcj\u0119, koordynowa\u0107 jej funkcjonowanie i aktywizowa\u0107 za jej pomoc\u0105 spo\u0142eczno\u015b\u0107 lokaln\u0105.\r\n- wie, jak stworzy\u0107 zaawansowane archiwa cyfrowe, umie przeprowadzi\u0107 szkolenie w zakresie tworzenia cyfrowych archiw\u00f3w od poziomu pocz\u0105tkuj\u0105cego do zaawansowanego.",
- "competence": 13,
- "level": 9
- }
- },
- {
- "pk": 136,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie na podstawowym poziomie rozr\u00f3\u017cni\u0107 dobro i z\u0142o w mediach i komunikacji;\r\nnp. potrafi wskaza\u0107 z\u0142e post\u0119powanie bohatera ogl\u0105danego filmu.",
- "competence": 16,
- "level": 1
- }
- },
- {
- "pk": 137,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce problem dobra i z\u0142a, k\u0142amstwa i prawdy dotyczy tak\u017ce medi\u00f3w i komunikacji;\r\nnp. wie, \u017ce w telewizji mo\u017cna us\u0142ysze\u0107 k\u0142amstwo albo \u017ce granie w okre\u015blone gry mo\u017ce by\u0107 z\u0142e.\r\n- wie, \u017ce zosta\u0142y ustalone okre\u015blone regu\u0142y komunikacji i korzystania z medi\u00f3w oraz \u017ce nale\u017cy si\u0119 do nich stosowa\u0107.\r\n- umie wskaza\u0107 zagro\u017cenia etyczne zwi\u0105zane z korzystaniem z medi\u00f3w;\r\nnp. umie opowiedzie\u0107 o problemie k\u0142amstwa w reklamie telewizyjnej.",
- "competence": 16,
- "level": 2
- }
- },
- {
- "pk": 138,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, dlaczego normy moralne i warto\u015bci odnosz\u0105 si\u0119 tak\u017ce do medi\u00f3w i komunikacji przez media;\r\nnp. rozumie, dlaczego obra\u017canie kogo\u015b w internecie ma takie samo znaczenie jak obra\u017canie kogo\u015b twarz\u0105 w twarz.",
- "competence": 16,
- "level": 3
- }
- },
- {
- "pk": 139,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie stawia\u0107 pytania dotycz\u0105ce etycznych konsekwencji komunikacji i korzystania z medi\u00f3w w perspektywie w\u0142asnych zachowa\u0144 i do\u015bwiadcze\u0144;\r\nnp. potrafi zastanowi\u0107 si\u0119 nad konsekwencjami i moraln\u0105 ocen\u0105 propozycji radykalnych sposob\u00f3w odchudzania, kt\u00f3re publikuje na swoim blogu.\r\n- rozumie, \u017ce wyzwania etyczne w mediach i komunikacji istniej\u0105 tak\u017ce poza perspektyw\u0105 jego w\u0142asnych do\u015bwiadcze\u0144 i umie zadawa\u0107 pytania na ich temat;\r\nnp. potrafi opisa\u0107, na czym polega moralny problem kontroli aktywno\u015bci internetowych pracownika przez pracodawc\u0119 oraz zada\u0107 pytania dotycz\u0105ce natury tego problemu: granic prywatno\u015bci pracownika, wymog\u00f3w uczciwej i skutecznej pracy itp.",
- "competence": 16,
- "level": 4
- }
- },
- {
- "pk": 140,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zdefiniowa\u0107 i zanalizowa\u0107 wyzwania etyczne w perspektywie medi\u00f3w i komunikacji niezale\u017cnie od w\u0142asnych do\u015bwiadcze\u0144 oraz potrafi znale\u017a\u0107 pomoc w ich krytycznej analizie i rozwi\u0105zywaniu;\r\nnp. potrafi krytycznie zanalizowa\u0107 etyczny problem zdrady on-line dzi\u0119ki znalezionym w internecie wypowiedziom psycholog\u00f3w, badaniom itp.\r\n- umie podj\u0105\u0107 refleksj\u0119 etyczn\u0105 nad komunikacj\u0105 i mediami z r\u00f3\u017cnych perspektyw, np. dzia\u0142alno\u015bci biznesowej, reklamy, polityki, edukacji, nauki, z punktu widzenia r\u00f3\u017cnych system\u00f3w moralnych.\r\n- rozumie problem j\u0119zyka w dyskusjach nad etyk\u0105 medi\u00f3w i komunikacji;\r\nnp. rozumie problem zdefiniowania poj\u0119cia piractwa komputerowego.\r\n- rozumie potrzeb\u0119 kszta\u0142towania swoich postaw w komunikacji i korzystaniu z medi\u00f3w w kierunku wykszta\u0142cenia w\u0142asnych zasad post\u0119powania opartych o sumienie.",
- "competence": 16,
- "level": 5
- }
- },
- {
- "pk": 141,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wypracowa\u0107 subiektywne zasady etyczne dotycz\u0105ce komunikacji i korzystania z medi\u00f3w oraz stosowa\u0107 je na co dzie\u0144.",
- "competence": 16,
- "level": 6
- }
- },
- {
- "pk": 142,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie stawia\u0107 pytania dotycz\u0105ce etycznych konsekwencji komunikacji i korzystania z medi\u00f3w w perspektywie w\u0142asnych zachowa\u0144 i do\u015bwiadcze\u0144;\r\nnp. rozwa\u017ca: czy \u017ale zrobi\u0142em \u015bci\u0105gaj\u0105c ten plik?",
- "competence": 16,
- "level": 7
- }
- },
- {
- "pk": 143,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zanalizowa\u0107 problemy etyczne w perspektywie medi\u00f3w i komunikacji niezale\u017cnie od w\u0142asnych do\u015bwiadcze\u0144 (na poziomie og\u00f3lnym, abstrakcyjnym) oraz potrafi znale\u017a\u0107 pomoc w ich krytycznej analizie i rozwi\u0105zywaniu;\r\nnp. zastanawia si\u0119: w jakich warunkach nielegalne \u015bci\u0105ganie plik\u00f3w z internetu mo\u017ce nie by\u0107 nieetyczne?\r\n\r\n- rozumie problem j\u0119zyka w dyskusjach nad etyk\u0105 medi\u00f3w.",
- "competence": 16,
- "level": 8
- }
- },
- {
- "pk": 144,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zainicjowa\u0107 proces etycznej analizy medi\u00f3w i komunikacji w\u015br\u00f3d uczni\u00f3w, uczestnik\u00f3w warsztat\u00f3w itp.;\r\nnp. pyta: Czy kiedykolwiek ogl\u0105daj\u0105c \u201eWiadomo\u015bci, mieli\u015bcie poczucie, \u017ce jaki\u015b materia\u0142 nie powinien si\u0119 tam znale\u017a\u0107, poniewa\u017c by\u0142o to niestosowne albo krzywdz\u0105ce dla kogo\u015b?\r\n- umie wypracowa\u0107 subiektywne zasady etyczne dotycz\u0105ce komunikacji i korzystania z medi\u00f3w oraz stosowa\u0107 je na co dzie\u0144.",
- "competence": 16,
- "level": 9
- }
- },
- {
- "pk": 128,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, \u017ce nale\u017cy stosowa\u0107 si\u0119 do ogranicze\u0144 w dost\u0119pie do tre\u015bci medi\u00f3w wprowadzonych dla jego dobra.\r\nnp. zakaz ogl\u0105dania niekt\u00f3rych program\u00f3w w telewizji",
- "competence": 15,
- "level": 2
- }
- },
- {
- "pk": 129,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ma prawo dost\u0119pu do informacji i komunikacji.\r\n- rozumie, dlaczego korzystaj\u0105c z materia\u0142\u00f3w dost\u0119pnych w internecie, nale\u017cy szanowa\u0107 prac\u0119 innych;\r\nnp. rozumie, dlaczego wklejaj\u0105c do prezentacji multimedialnej obrazek \u015bci\u0105gni\u0119ty z internetu, nale\u017cy poda\u0107 jego \u017ar\u00f3d\u0142o.\r\n- umie wskaza\u0107 podstawowe warto\u015bci w przekazie medialnym;\r\nnp. wskaza\u0107, do jakich warto\u015bci odwo\u0142uje si\u0119 post\u0119powanie bohatera ogl\u0105danego filmu.\r\n- rozumie, \u017ce warto\u015bci promowane w tre\u015bci medi\u00f3w i komunikacji s\u0105 zale\u017cne od wielu czynnik\u00f3w;\r\nnp. rozumie, \u017ce reklama nie jest bezinteresownym informowaniem o produkcie, poniewa\u017c jej g\u0142\u00f3wn\u0105 funkcj\u0105 jest zach\u0119canie do kupna produktu, rozbudzanie potrzeb itp.\r\n- rozumie poj\u0119cie wolno\u015bci s\u0142owa w perspektywie medi\u00f3w i komunikacji.\r\n- rozumie potrzeb\u0119 krytycznej tolerancji i otwarto\u015bci (tak\u017ce na inne kultury) przy kontakcie z tre\u015bciami medi\u00f3w.",
- "competence": 15,
- "level": 3
- }
- },
- {
- "pk": 130,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie czynniki wp\u0142ywaj\u0105 na obecno\u015b\u0107 i kszta\u0142t okre\u015blonych warto\u015bci w mediach i komunikacji;\r\nnp. wie, \u017ce frakcja polityczna kontroluj\u0105ca media publiczne mo\u017ce mie\u0107 wp\u0142yw na warto\u015bci, jakie dominowa\u0107 b\u0119d\u0105 w przekazach tych medi\u00f3w.\r\n- umie krytycznie analizowa\u0107 warto\u015bci w tre\u015bci medi\u00f3w i komunikacji z uwzgl\u0119dnieniem tej wiedzy;\r\nnp. wiedz\u0105c o zasadach dzia\u0142ania tabloid\u00f3w, o modelu biznesowym tego gatunku medialnego, potrafi krytycznie opisa\u0107 warto\u015bci promowane na \u0142amach \u201eFaktu\u201d.\r\n- rozumie prawo do sprzeciwu lub czynnego oporu wobec tre\u015bci medialnych czy komunikacji;\r\nnp. rozumie, dlaczego mo\u017ce protestowa\u0107 przeciwko instalacji baner\u00f3w reklamowych w budynku szko\u0142y. Rozumie, \u017ce instalacja dodatku AdBlock w przegl\u0105darce wynika z jego prawa do kontrolowania tre\u015bci, kt\u00f3re odbiera.\r\n- wie o prawie dost\u0119pu do informacji, do d\u0105\u017cenia do jej uzyskania oraz ograniczeniach z tym zwi\u0105zanych;\r\nnp. zna warto\u015b\u0107 czyjej\u015b prywatno\u015bci i wie, \u017ce ogranicza ona jego prawo do dost\u0119pu do informacji. Zna poj\u0119cie informacji publicznej i wie o prawie dost\u0119pu do niej.\r\n- rozumie problem komunikowania tre\u015bci takich jak przemoc, nago\u015b\u0107, prywatno\u015b\u0107. Rozumie, \u017ce problem ten dotyczy\u0107 mo\u017ce tak\u017ce tre\u015bci o charakterze historycznym;\r\nnp. rozumie, \u017ce nale\u017cy zastanowi\u0107 si\u0119 nad form\u0105 i stylem fotografii dokumentuj\u0105cej wizyt\u0119 klasow\u0105 w Muzeum Auschwitz.\r\n- rozumie poj\u0119cie etyki dziennikarskiej i umie wskaza\u0107, jak odnosi si\u0119 ono do r\u00f3\u017cnych dostawc\u00f3w tre\u015bci.\r\n- umie przedstawi\u0107 pozytywn\u0105 interpretacj\u0119 poj\u0119cia hakowania jako dzia\u0142ania zmierzaj\u0105cego do dostosowania systemu (medium) do w\u0142asnych cel\u00f3w.",
- "competence": 15,
- "level": 4
- }
- },
- {
- "pk": 131,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie praktycznie rozpozna\u0107 wyzwania wobec etyki dziennikarskiej, obejmuj\u0105cej r\u00f3wnie\u017c innych nadawc\u00f3w tre\u015bci, z perspektywy r\u00f3\u017cnych system\u00f3w moralnych;\r\nnp. potrafi skonfrontowa\u0107 zasady etyki dziennikarskiej dotycz\u0105ce prezentowania scen przemocy z obejrzan\u0105 relacj\u0105 korespondenta wojennego.\r\n\r\n- umie odnie\u015b\u0107 problem wolno\u015bci s\u0142owa i pluralizmu medi\u00f3w do konkretnych zjawisk medialnych;\r\nnp. potrafi zanalizowa\u0107 funkcjonowanie Wikileaks w perspektywie wolno\u015bci s\u0142owa i polityki bezpiecze\u0144stwa pa\u0144stw.\r\n- umie odnie\u015b\u0107 problem dobra wsp\u00f3lnego do systemu medi\u00f3w i komunikacji z wykorzystaniem poj\u0119cia kultury (ekonomii) daru oraz poj\u0119\u0107 zwi\u0105zanych z ide\u0105 otwarto\u015bci tre\u015bci w internecie (Otwarta Nauka, Otwarte Zasoby Edukacyjne, wolne licencje itp.);\r\nnp. potrafi zanalizowa\u0107 model Wikipedii pod k\u0105tem dobra wsp\u00f3lnego, akcentuj\u0105c znaczenie licencji Creative Commons wykorzystywanej przez autor\u00f3w hase\u0142.\r\n\r\n- umie krytycznie zanalizowa\u0107 problem dobra wsp\u00f3lnego i otwarto\u015bci w perspektywie tre\u015bci medialnych;\r\nnp. potrafi wskaza\u0107 argumenty za udost\u0119pnianiem on-line wynik\u00f3w bada\u0144 naukowych. Potrafi krytycznie zanalizowa\u0107 problem abonamentu i funkcjonowania medi\u00f3w publicznych w perspektywie warto\u015bci dobra wsp\u00f3lnego.",
- "competence": 15,
- "level": 5
- }
- },
- {
- "pk": 133,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o prawie dost\u0119pu do informacji oraz ograniczeniach z tym zwi\u0105zanych.\r\n- umie wskaza\u0107 podstawowe warto\u015bci w wybranym przekazie medialnym.\r\n- rozumie, \u017ce warto\u015bci obecne w tre\u015bci medi\u00f3w i komunikacji zale\u017c\u0105 od wielu czynnik\u00f3w.\r\n- wie, \u017ce korzystaj\u0105c z materia\u0142\u00f3w dost\u0119pnych w internecie nale\u017cy szanowa\u0107 prac\u0119 innych.\r\n- rozumie poj\u0119cie etyki dziennikarskiej.",
- "competence": 15,
- "level": 7
- }
- },
- {
- "pk": 134,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie czynniki wp\u0142ywaj\u0105 na obecno\u015b\u0107 i kszta\u0142t okre\u015blonych warto\u015bci w mediach i komunikacji.\r\n- umie krytycznie analizowa\u0107 warto\u015bci w tre\u015bci medi\u00f3w i komunikacji z uwzgl\u0119dnieniem tej wiedzy.\r\n- rozumie prawo do sprzeciwu lub czynnego oporu wobec tre\u015bci medialnych czy komunikacji.\r\n- rozumie problem komunikowania tre\u015bci takich jak przemoc, nago\u015b\u0107, prywatno\u015b\u0107 (tak\u017ce w odniesieniu do tre\u015bci o charakterze historycznym).\r\n- rozumie warto\u015b\u0107 r\u00f3wnego dost\u0119pu do informacji.\r\n- umie praktycznie rozpozna\u0107 wyzwania wobec etyki dziennikarskiej i odnie\u015b\u0107 je do innych dostawc\u00f3w tre\u015bci.",
- "competence": 15,
- "level": 8
- }
- },
- {
- "pk": 135,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie odnie\u015b\u0107 problem wolno\u015bci s\u0142owa i pluralizmu medi\u00f3w do konkretnych zjawisk medialnych.\r\n- umie odnie\u015b\u0107 problem dobra wsp\u00f3lnego do systemu medi\u00f3w i komunikacji z wykorzystaniem poj\u0119cia kultury (ekonomii) daru oraz poj\u0119\u0107 zwi\u0105zanych z ide\u0105 otwarto\u015bci tre\u015bci w internecie (Otwarta Nauka, Otwarte Zasoby Edukacyjne, wolne licencje itp.)\r\n- umie przedstawi\u0107 pozytywn\u0105 interpretacj\u0119 poj\u0119cia hakowania jako dzia\u0142ania zmierzaj\u0105cego do dostosowania systemu (medium) do w\u0142asnych cel\u00f3w.",
- "competence": 15,
- "level": 9
- }
- },
- {
- "pk": 146,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ma prawo do zachowania anonimowo\u015bci i prywatno\u015bci;\r\nnp. wie, \u017ce nie musi si\u0119 zgadza\u0107 na to zrobienie sobie zdj\u0119cia przez kogo\u015b obcego. Wie, \u017ce nie musi podawa\u0107 swojego adresu domowego osobie spotkanej w internecie (i \u017ce to nie \u015bwiadczy o jej / jego z\u0142ym zachowaniu).\r\n- rozumie, \u017ce komunikacja w mediach to wci\u0105\u017c komunikacja mi\u0119dzy lud\u017ami;\r\nnp. rozumie, \u017ce po drugiej stronie ekranu siedzi inny cz\u0142owiek, kt\u00f3remu nale\u017cy si\u0119 szacunek.\r\n- rozumie, \u017ce komunikacja przez media nie mo\u017ce by\u0107 wystarczaj\u0105c\u0105 alternatyw\u0105 komunikacji interpersonalnej;\r\nnp. rozumie wady przyja\u017ani tylko przez internet.",
- "competence": 17,
- "level": 2
- }
- },
- {
- "pk": 147,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce prywatno\u015b\u0107 w\u0142asna i innych jest warto\u015bci\u0105;\r\nnp. wie, dlaczego nie nale\u017cy podawa\u0107 numeru telefonu znajomej osoby innym bez jej wyra\u017anej zgody.\r\n- umie stosowa\u0107 w komunikacji w internecie zasady netykiety.\r\n- rozumie postaw\u0119 krytycznej otwarto\u015bci i tolerancji w relacjach w mediach;\r\nnp. rozumie, \u017ce dyskutuj\u0105c on-line, nie zawsze ma si\u0119 racj\u0119 i czasem warto zaakceptowa\u0107 argument drugiej strony.",
- "competence": 17,
- "level": 3
- }
- },
- {
- "pk": 148,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie problem moralnej oceny zachowa\u0144 komunikacyjnych w mediach;\r\nnp. rozumie, \u017ce o\u015bmieszanie kogo\u015b w internecie ma tak\u0105 sam\u0105 warto\u015b\u0107 moraln\u0105 jak o\u015bmieszanie kogo\u015b w komunikacji bezpo\u015bredniej.\r\n- rozumie poj\u0119cie mowy nienawi\u015bci w internecie i potrafi je odnie\u015b\u0107 do wypowiedzi obserwowanych on-line oraz do idei wolno\u015bci s\u0142owa.\r\n- rozumie warto\u015b\u0107 wsp\u00f3\u0142pracy mi\u0119dzy u\u017cytkownikami internetu (w perspektywie zjawisk takich jak ruch open source, Wikipedia, crowdsourcing, peer-production itp.)",
- "competence": 17,
- "level": 4
- }
- },
- {
- "pk": 149,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie okre\u015bli\u0107 zasady ograniczania prawa do prywatno\u015bci w mediach;\r\nnp. umie poda\u0107 katalog warto\u015bci, wobec kt\u00f3rych prawo do prywatno\u015bci mo\u017ce by\u0107 zanegowane (np. wsp\u00f3lne bezpiecze\u0144stwo). Umie wskaza\u0107 i oceni\u0107 negatywne zjawiska ograniczania prawa do prywatno\u015bci (np. kontrola internaut\u00f3w w Chinach, problem ACTA).\r\n- potrafi krytycznie podej\u015b\u0107 do skodyfikowanych zasad netykiety.\r\n- potrafi wypracowa\u0107 w\u0142asne zasady kszta\u0142towania relacji w komunikacji przez media w oparciu o w\u0142asne do\u015bwiadczenia.",
- "competence": 17,
- "level": 5
- }
- },
- {
- "pk": 151,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ma prawo do zachowania anonimowo\u015bci i prywatno\u015bci.\r\n- rozumie, \u017ce komunikacja w mediach to wci\u0105\u017c komunikacja mi\u0119dzy lud\u017ami.\r\n- wie, \u017ce nale\u017cy szanowa\u0107 prywatno\u015b\u0107 swoj\u0105 i innych.\r\n- umie stosowa\u0107 w komunikacji w internecie zasady netykiety.\r\n- rozumie postaw\u0119 krytycznej otwarto\u015bci i tolerancji w relacjach w mediach.",
- "competence": 17,
- "level": 7
- }
- },
- {
- "pk": 152,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie problem etycznej oceny zachowa\u0144 w komunikacji przez media.\r\n- rozumie poj\u0119cie mowy nienawi\u015bci w internecie i potrafi je odnie\u015b\u0107 do wypowiedzi obserwowanych on-line oraz do idei wolno\u015bci s\u0142owa.\r\n- rozumie warto\u015b\u0107 wsp\u00f3\u0142pracy mi\u0119dzy u\u017cytkownikami internetu (w perspektywie zjawisk takich jak ruch open source, Wikipedia, crowdsourcing, peer-production itp.)",
- "competence": 17,
- "level": 8
- }
- },
- {
- "pk": 153,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- potrafi krytycznie podej\u015b\u0107 do skodyfikowanych zasad netykiety.\r\n- potrafi wypracowa\u0107 w\u0142asne zasady kszta\u0142towania relacji w komunikacji przez media w oparciu o w\u0142asne do\u015bwiadczenia.",
- "competence": 17,
- "level": 9
- }
- },
- {
- "pk": 119,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce przepisy prawa stosuj\u0105 si\u0119 tak\u017ce do medi\u00f3w i komunikacji.\r\n- rozumie obowi\u0105zek przestrzegania prawa tak\u017ce w perspektywie medi\u00f3w i komunikacji;\r\nnp. potrafi wyja\u015bni\u0107, dlaczego kradzie\u017c w internecie ma taki sam status jak kradzie\u017c towaru ze sklepu.",
- "competence": 14,
- "level": 2
- }
- },
- {
- "pk": 121,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce system prawny nie zawsze odpowiednio szybko reaguje na nowe zjawiska w mediach;\r\nnp. zna poj\u0119cie stalkingu i wie, \u017ce jeszcze niedawno nie by\u0142o takiego przest\u0119pstwa w kodeksie karnym.\r\n- rozumie, \u017ce nie wszystkie zasady komunikacji i funkcjonowania w mediach musz\u0105 by\u0107 regulowane przez przepisy prawa;\r\nnp. umie wyja\u015bni\u0107 zasady i znaczenie kultury dyskusji na forach internetowych oraz pokaza\u0107, kt\u00f3re z tych zasad nie wynikaj\u0105 wprost z przepis\u00f3w prawa, a mimo to obowi\u0105zuj\u0105.",
- "competence": 14,
- "level": 4
- }
- },
- {
- "pk": 122,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie problem relacji mi\u0119dzy prawem stanowionym a moralno\u015bci\u0105 szczeg\u00f3lnie w odniesieniu do prawa autorskiego, prawa w\u0142asno\u015bci i prawa do prywatno\u015bci w mediach oraz rozumie problem j\u0119zyka w dyskusjach na ten temat;\r\nnp. rozumie z\u0142o\u017cono\u015b\u0107 moralnej oceny piractwa komputerowego, potrafi rozwa\u017ca\u0107, czy nielegalne korzystanie z program\u00f3w komputerowych do cel\u00f3w edukacyjnych jest etyczne, czy nie. Potrafi krytycznie zanalizowa\u0107 poj\u0119cie piractwa komputerowego.\r\n- rozumie, \u017ce normy funkcjonowania medi\u00f3w mog\u0105 by\u0107 r\u00f3\u017cne w r\u00f3\u017cnych systemach prawnych i normatywnych.\r\n- potrafi odnie\u015b\u0107 si\u0119 do tego problemu w pr\u00f3bie etycznej oceny zjawiska medialnego;\r\nnp. rozumie, \u017ce funkcjonowanie portalu Redwatch w kulturze prawnej USA jest dozwolone jako wyraz wolno\u015bci s\u0142owa, a w Polsce traktowane jako przest\u0119pstwo. Rozumie, jakie problemy rodzi zr\u00f3\u017cnicowanie system\u00f3w prawnych i normatywnych w pr\u00f3bie moralnej oceny tego zjawiska.",
- "competence": 14,
- "level": 5
- }
- },
- {
- "pk": 124,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie obowi\u0105zek przestrzegania prawa tak\u017ce w perspektywie medi\u00f3w i komunikacji.",
- "competence": 14,
- "level": 7
- }
- },
- {
- "pk": 125,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce system prawny nie zawsze odpowiednio szybko reaguje na nowe zjawiska w mediach.\r\n- rozumie, \u017ce nie wszystkie zasady komunikacji i funkcjonowania w mediach musz\u0105 by\u0107 regulowane przez przepisy prawa.\r\n- rozumie, \u017ce normy funkcjonowania medi\u00f3w mog\u0105 by\u0107 r\u00f3\u017cne w r\u00f3\u017cnych systemach prawnych i normatywnych.",
- "competence": 14,
- "level": 8
- }
- },
- {
- "pk": 126,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie problem relacji mi\u0119dzy prawem stanowionym a etyk\u0105, szczeg\u00f3lnie w odniesieniu do prawa autorskiego, prawa w\u0142asno\u015bci i prawa do prywatno\u015bci w mediach oraz rozumie problem j\u0119zyka w dyskusjach na ten temat.\r\n- potrafi odnie\u015b\u0107 problem r\u00f3\u017cnorodnych system\u00f3w prawnych i normatywnych do etycznej oceny zjawiska medialnego;\r\nnp. rozwa\u017ca: Czy skoro w USA nie jest zakazane propagowanie nazizmu (ze wzgl\u0119du na zasady wolno\u015bci s\u0142owa), oznacza to, \u017ce takie dzia\u0142anie w Polsce r\u00f3wnie\u017c powinno by\u0107 dozwolone?",
- "competence": 14,
- "level": 9
- }
- },
- {
- "pk": 181,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zakomunikowa\u0107, \u017ce si\u0119 wstydzi i nie chce uczestniczy\u0107 w danej sytuacji komunikacyjnej;\r\nnp. nie chce by\u0107 nagrywane lub fotografowane, nie chce rozmawia\u0107 przez telefon.",
- "competence": 21,
- "level": 1
- }
- },
- {
- "pk": 182,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce pewnych informacji nie wolno udost\u0119pnia\u0107 obcym; w razie w\u0105tpliwo\u015bci pyta rodzic\u00f3w lub opiekun\u00f3w.\r\n- umie odr\u00f3\u017cni\u0107 uwiecznienie od upublicznienia.\r\n- umie sprzeciwi\u0107 si\u0119 innemu dziecku lub doros\u0142emu w kwestii publikacji swojego utworu lub zwi\u0105zanej z wizerunkiem;\r\nnp. pokazywanie filmu z jego udzia\u0142em.",
- "competence": 21,
- "level": 2
- }
- },
- {
- "pk": 183,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wskaza\u0107 r\u00f3\u017cnice pomi\u0119dzy komunikacj\u0105 prywatn\u0105 i publiczn\u0105.",
- "competence": 21,
- "level": 3
- }
- },
- {
- "pk": 184,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zdecydowa\u0107, czy w danej sytuacji komunikacja powinna by\u0107 prywatna czy publiczna.",
- "competence": 21,
- "level": 4
- }
- },
- {
- "pk": 185,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie poprawnie zidentyfikowa\u0107, czy dane narz\u0119dzia (np. czat na portalach spo\u0142eczno\u015bciowych) faktycznie oferuj\u0105 komunikacj\u0119 prywatn\u0105, czy tylko jej z\u0142udzenie.\r\n- umie pos\u0142u\u017cy\u0107 si\u0119 narz\u0119dziami zwi\u0119kszaj\u0105cymi prywatno\u015b\u0107,\r\nnp. rozszerzenia przegl\u0105darek, ustawienia prywatno\u015bci.\r\n- wie, do czego s\u0142u\u017c\u0105 regulaminy na stronach, z kt\u00f3rych korzysta.",
- "competence": 21,
- "level": 5
- }
- },
- {
- "pk": 186,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie p\u0142ynnie pos\u0142ugiwa\u0107 si\u0119 metodami i narz\u0119dziami ochrony prywatno\u015bci.\r\n- czyta ze zrozumieniem regulaminy stron, z kt\u00f3rych korzysta, i umie \u015bwiadomie podj\u0105\u0107 decyzje dotycz\u0105ce przyj\u0119cia lub odrzucenia ich postanowie\u0144.",
- "competence": 21,
- "level": 6
- }
- },
- {
- "pk": 187,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce prywatno\u015b\u0107 jest dobrem i \u017ce mamy do niej prawo.\r\n- wie, \u017ce ochrona wizerunku wymaga ochrony prywatno\u015bci.\r\n- wie, \u017ce dane prywatne mog\u0105 by\u0107 traktowane jak towar.\r\n- wie, \u017ce pewne komunikaty mog\u0105 by\u0107 przekazywane wy\u0142\u0105cznie prywatnie, a inne udost\u0119pniane publicznie.\r\n- rozumie, \u017ce bior\u0105c udzia\u0142 w komunikacji, potencjalnie odpowiada za wizerunek nie tylko sw\u00f3j, ale np. swojego pracodawcy, je\u015bli u\u017cywa np. firmowego adresu e-mail.",
- "competence": 21,
- "level": 7
- }
- },
- {
- "pk": 188,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie u\u017cywa\u0107 podstawowych narz\u0119dzi chroni\u0105cych prywatno\u015b\u0107, np. rozszerzenia do przegl\u0105darek, blokada ciasteczek.\r\n- umie precyzyjnie wskaza\u0107, kt\u00f3re, komunikaty mog\u0105 by\u0107 przekazywane wy\u0142\u0105cznie prywatnie, a kt\u00f3re udost\u0119pniane publicznie.\r\n- wie, \u017ce nawet dane anonimizowane zebrane w odpowiedniej ilo\u015bci mog\u0105 pozwoli\u0107 na naruszenie prywatno\u015bci.\r\n- wie, \u017ce jego decyzje dotycz\u0105ce prywatno\u015bci mog\u0105 r\u00f3\u017cni\u0107 si\u0119 od decyzji innych i umie to uszanowa\u0107.\r\n- umie dostosowa\u0107 sw\u00f3j wizerunek do sytuacji i roli.",
- "competence": 21,
- "level": 8
- }
- },
- {
- "pk": 189,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- \u015bwiadomie kreuje sw\u00f3j wizerunek on-line w r\u00f3\u017cnych kontekstach.\r\n- p\u0142ynnie pos\u0142uguje si\u0119 technikami i narz\u0119dziami ochrony prywatno\u015bci.\r\n- umie \u015bwiadomie podejmowa\u0107 decyzje dotycz\u0105ce udost\u0119pnienia b\u0105d\u017a nie danych swoich i swoich znajomych, uwzgl\u0119dniaj\u0105c ich preferencje w zakresie ochrony prywatno\u015bci i wizerunku.",
- "competence": 21,
- "level": 9
- }
- },
- {
- "pk": 173,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co to znaczy \u201eanonimowo\u015b\u0107\u201d.",
- "competence": 20,
- "level": 2
- }
- },
- {
- "pk": 174,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce z sieci mo\u017cemy korzysta\u0107 anonimowo.\r\n- umie poda\u0107 przyk\u0142ad sytuacji, w kt\u00f3rej anonimowo\u015b\u0107 jest wskazana.",
- "competence": 20,
- "level": 3
- }
- },
- {
- "pk": 175,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 specjalne narz\u0119dzia do zwi\u0119kszania anonimowo\u015bci w sieci i umie o nie spyta\u0107.\r\n- wie, \u017ce anonimowo\u015b\u0107 w sieci mo\u017ce by\u0107 pozorna i \u017ce cz\u0119sto mo\u017cliwe jest ustalenie autora danej informacji nawet je\u017celi u\u017cywa\u0142 pseudonimu.\r\n- wie, \u017ce je\u017celi ujawni w tre\u015bci komunikacji dane identyfikuj\u0105ce, sam fakt komunikowania si\u0119 anonimowo (np. przy u\u017cyciu odpowiednich narz\u0119dzi) nie wystarczy do zachowania anonimowo\u015bci.",
- "competence": 20,
- "level": 4
- }
- },
- {
- "pk": 176,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie pos\u0142u\u017cy\u0107 si\u0119 narz\u0119dziami zwi\u0119kszaj\u0105cymi anonimowo\u015b\u0107; np. TOR, anonimowe proxy, dystrybucja Linuksa TAILS.",
- "competence": 20,
- "level": 5
- }
- },
- {
- "pk": 177,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- \u015bwiadomie i trafnie podejmuje decyzje dotycz\u0105ce anonimowo\u015bci w r\u00f3\u017cnych sytuacjach komunikacyjnych;\r\nnp. \u015bwiadomie w pewnych sytuacjach wy\u0142\u0105cza us\u0142ugi lokalizacyjne dost\u0119pne w przegl\u0105darce.",
- "competence": 20,
- "level": 6
- }
- },
- {
- "pk": 178,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce z sieci mo\u017cemy korzysta\u0107 anonimowo\r\n- wie, \u017ce korzystanie anonimowe nie wyklucza mo\u017cliwo\u015bci ustalenia autora.\r\n- wie, \u017ce istniej\u0105 metody \u015bledzenia os\u00f3b w sieci bez ich wiedzy, np. ciasteczka.",
- "competence": 20,
- "level": 7
- }
- },
- {
- "pk": 179,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce istniej\u0105 narz\u0119dzia zwi\u0119kszaj\u0105ce anonimowo\u015b\u0107 (jak rozszerzenia do przegl\u0105darek, systemy TOR, I2P, proxy).\r\n- umie znale\u017a\u0107 i dostosowa\u0107 do swoich potrzeb ustawienia przegl\u0105darek zwi\u0119kszaj\u0105ce anonimowo\u015b\u0107.",
- "competence": 20,
- "level": 8
- }
- },
- {
- "pk": 180,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- biegle korzysta z narz\u0119dzi i technik zapewniaj\u0105cych anonimowo\u015b\u0107 w sieci.\r\n- umie kompleksowo zadba\u0107 o zachowanie anonimowo\u015bci, korzystaj\u0105c z kombinacji narz\u0119dzi, np. tryb prywatny, TOR, blokada ciasteczek.",
- "competence": 20,
- "level": 9
- }
- },
- {
- "pk": 154,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zakomunikowa\u0107, \u017ce dana tre\u015b\u0107 budzi strach lub poczucie zagro\u017cenia, ale niekoniecznie umie temu zaradzi\u0107, np. celowo prze\u0142\u0105czy\u0107 kana\u0142.",
- "competence": 18,
- "level": 1
- }
- },
- {
- "pk": 155,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, co to \u201esekret\u201d, \u201etajemnica\u201d i umie jej dochowa\u0107, r\u00f3wnie\u017c w sytuacji komunikacyjnej.\r\n- umie selekcjonowa\u0107 tre\u015bci, kt\u00f3re odbiera\r\nnp. poprzez wy\u0142\u0105czenie telewizora, zmian\u0119 filmu, zmian\u0119 strony.",
- "competence": 18,
- "level": 2
- }
- },
- {
- "pk": 156,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce pewne informacje i rodzaje komunikacji powinny by\u0107 \u201etajemnic\u0105\u201d (np. has\u0142o do poczty).\r\n- wie, \u017ce istniej\u0105 sposoby zapewnienia tej \u201etajemnicy\u201d i umie o nie spyta\u0107.\r\n- wie, \u017ce zakupy mo\u017cna zrobi\u0107 w fizycznym sklepie, jak i w sklepie internetowym czy portalu aukcyjnym; potrafi poda\u0107 przyk\u0142ady.\r\n- wie, co to spam i umie rozpozna\u0107 bardziej oczywiste jego przyk\u0142ady.",
- "competence": 18,
- "level": 3
- }
- },
- {
- "pk": 157,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce dane prywatne mog\u0105 by\u0107 traktowane jak towar.\r\n- umie skorzysta\u0107 z podstawowych narz\u0119dzi zapewniaj\u0105cych bezpiecze\u0144stwo komunikacji;\r\nnp. korzysta z https na stronach bank\u00f3w czy portalach spo\u0142eczno\u015bciowych.\r\n- wie, \u017ce nale\u017cy wylogowa\u0107 si\u0119 z portali po zako\u0144czeniu pracy.\r\n- wie, \u017ce s\u0105 r\u00f3\u017cne formy p\u0142atno\u015bci w internecie o r\u00f3\u017cnym poziomie bezpiecze\u0144stwa.\r\n- zna podstawowe zasady bezpiecze\u0144stwa przy zakupach on-line.",
- "competence": 18,
- "level": 4
- }
- },
- {
- "pk": 158,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- z du\u017c\u0105 doz\u0105 pewno\u015bci rozpoznaje spam i pr\u00f3by phishingu;\r\nnp. zwraca uwag\u0119 na to, \u017ce nie zgadza si\u0119 adres strony bankowej.\r\n- zwraca uwag\u0119 na certyfikaty;\r\nnp. nie akceptuje automatycznie ka\u017cdego napotkanego b\u0142\u0119dnego certyfikatu zg\u0142oszonego przez przegl\u0105dark\u0119.\r\n- wie, \u017ce istniej\u0105 narz\u0119dzia dodatkowo zwi\u0119kszaj\u0105ce bezpiecze\u0144stwo komunikacji i umie do nich dotrze\u0107;\r\nnp. szyfrowanie end-to-end, poczty, PGP/GPG, OTR.",
- "competence": 18,
- "level": 5
- }
- },
- {
- "pk": 159,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- p\u0142ynnie pos\u0142uguje si\u0119 narz\u0119dziami zwi\u0119kszaj\u0105cymi bezpiecze\u0144stwo komunikacji.\r\n- zna narz\u0119dzia szyfrowania end-to-end i umie ich u\u017cy\u0107 np. PGP/GPG, OTR.",
- "competence": 18,
- "level": 6
- }
- },
- {
- "pk": 160,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie skorzysta\u0107 z podstawowych narz\u0119dzi zapewniaj\u0105cych bezpiecze\u0144stwo transmisji (https).\r\n- wie, \u017ce nale\u017cy wylogowa\u0107 si\u0119 po zako\u0144czeniu pracy na publicznym terminalu lub w sytuacji, w kt\u00f3rej inni b\u0119d\u0105 korzysta\u0107 z tego samego komputera.\r\n- zwraca uwag\u0119 na ostrze\u017cenia o wygas\u0142ych/nieprawid\u0142owych certyfikatach, w razie w\u0105tpliwo\u015bci pyta (nie akceptuje automatycznie).\r\n- docenia wag\u0119 traktowania pewnych informacji jako tajnych, zdaje sobie spraw\u0119, \u017ce dzielenie si\u0119 has\u0142ami (nawet je\u015bli np. zwi\u0119ksza wygod\u0119) jest niedopuszczalne.\r\n- potrafi zachowa\u0107 \u201ehigien\u0119 informatyczn\u0105\u201d, np. zwraca uwag\u0119 na komunikaty pojawiaj\u0105ce si\u0119 na ekranie i nie akceptuje rzeczy, kt\u00f3rych nie rozumie \u2013 w takich sytuacjach pyta; zdaje sobie spraw\u0119 z zagro\u017ce\u0144 takich jak wirusy; potrafi korzysta\u0107 z tzw. \u201etrybu prywatnego\u201d przegl\u0105darek.",
- "competence": 18,
- "level": 7
- }
- },
- {
- "pk": 161,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie samodzielnie podj\u0105\u0107 decyzj\u0119 dotycz\u0105c\u0105 bezpiecze\u0144stwa komunikacji w danym przypadku, np. decyduje o zaakceptowaniu b\u0105d\u017a nie wygas\u0142ego/nieprawid\u0142owego certyfikatu.\r\n- zdaje sobie spraw\u0119 z zagro\u017ce\u0144 zwi\u0105zanych ze scentralizowanymi sieciami i us\u0142ugami; umie poda\u0107 przyk\u0142ady sieci scentralizowanych (np. Facebook, Google) oraz zagro\u017ce\u0144 z nimi zwi\u0105zanych (np. utrata kontroli nad komunikacj\u0105, pods\u0142uch).",
- "competence": 18,
- "level": 8
- }
- },
- {
- "pk": 162,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- p\u0142ynnie pos\u0142uguje si\u0119 systemami szyfrowania end-to-end (PGP/GPG, OTR).\r\n- \u015bledzi najwa\u017cniejsze doniesienia dotycz\u0105ce narusze\u0144 bezpiecze\u0144stwa i umie wdro\u017cy\u0107 rozwi\u0105zania problem\u00f3w oraz sugerowane praktyki.\r\n- podejmuje \u015bwiadome, oparte na rzetelnych przes\u0142ankach decyzje dotycz\u0105ce narz\u0119dzi, kt\u00f3rych u\u017cywa, bior\u0105c pod uwag\u0119 r\u00f3wnie\u017c przes\u0142anki pozatechniczne;\r\nnp. bierze pod uwag\u0119 to, czy wszystkie kana\u0142y komunikacji, z kt\u00f3rych korzysta, mog\u0105 by\u0107 \u0142atwo kontrolowane przez jedn\u0105 organizacj\u0119.\r\n- rozumie zalety decentralizacji i umie je uwzgl\u0119dni\u0107 w podejmowanych decyzjach.\r\n- potrafi przeprowadzi\u0107 prosty, nieformalny audyt bezpiecze\u0144stwa, wskazuj\u0105c na braki w danej sytuacji;\r\nnp. doradza szyfrowanie.",
- "competence": 18,
- "level": 9
- }
- },
- {
- "pk": 192,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co to znaczy \u201ecenzura\u201d.\r\n- wie, co to znaczy \u201epods\u0142uchiwa\u0107\u201d, r\u00f3wnie\u017c w kontek\u015bcie technologii i sieci;\r\nnp. wie, \u017ce kiedy pisze do kogo\u015b w internecie, czyta to te\u017c jeszcze kto\u015b inny.",
- "competence": 22,
- "level": 3
- }
- },
- {
- "pk": 193,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce sie\u0107 mo\u017ce by\u0107 nadzorowana.\r\n- wie, \u017ce nadz\u00f3r ten mo\u017ce mie\u0107 wiele form, w tym cenzury czy pods\u0142uchu.\r\n- wie, \u017ce nadz\u00f3r mo\u017ce nie by\u0107 zauwa\u017calny dla nadzorowanych;\r\nnp. zdaje sobie spraw\u0119, \u017ce skutkiem nadzoru mo\u017ce by\u0107 trudna do identyfikacji zmiana wynik\u00f3w wyszukiwania.",
- "competence": 22,
- "level": 4
- }
- },
- {
- "pk": 194,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce mog\u0105 by\u0107 r\u00f3\u017cne cele wprowadzania nadzoru i umie je wymieni\u0107;\r\nnp. ochrona dzieci w internecie; uzyskiwanie dodatkowych przychod\u00f3w przez dan\u0105 korporacj\u0119 ze sprzeda\u017cy prywatnych danych u\u017cytkownik\u00f3w.\r\n- wie, \u017ce nadz\u00f3r mo\u017ce by\u0107 legalny lub bezprawny; \u017ce mo\u017ce by\u0107 prowadzony przez organy pa\u0144stwowe (np. policj\u0119) i osoby prywatne czy korporacje;\r\n- wie, \u017ce istniej\u0105 metody obej\u015bcia / utrudnienia nadzoru, nie tylko techniczne;\r\nnp. potrafi wymieni\u0107 takie metody jak \u015bwiadome umieszczanie informacji fa\u0142szywych lub stosowanie szyfrowania nie tylko do tre\u015bci wra\u017cliwych, ale r\u00f3wnie\u017c banalnych, celem utrudnienia identyfikacji, kiedy zachodzi wa\u017cna / wra\u017cliwa komunikacja.",
- "competence": 22,
- "level": 5
- }
- },
- {
- "pk": 195,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie korzysta\u0107 z narz\u0119dzi obej\u015bcia / utrudnienia nadzoru.\r\n- \u015bwiadomie podejmuje decyzje o doborze narz\u0119dzi do konkretnych cel\u00f3w, bior\u0105c pod uwag\u0119 mo\u017cliwo\u015b\u0107 nadzoru os\u00f3b trzecich nad tymi narz\u0119dziami, oraz specyfik\u0119 tre\u015bci.",
- "competence": 22,
- "level": 6
- }
- },
- {
- "pk": 196,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce komunikacja w sieci mo\u017ce by\u0107 nadzorowana w spos\u00f3b niezauwa\u017calny dla korzystaj\u0105cego.\r\n- wie, \u017ce istniej\u0105 narz\u0119dzia obchodz\u0105ce nadz\u00f3r, umie znale\u017a\u0107 informacje na ich temat.\r\n- wie, \u017ce nadz\u00f3r mo\u017ce by\u0107 legalny lub bezprawny; prywatny i pa\u0144stwowy.\r\n- wie, \u017ce nadz\u00f3r mo\u017ce prowadzi\u0107 do cenzury.",
- "competence": 22,
- "level": 7
- }
- },
- {
- "pk": 197,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie skorzysta\u0107 samodzielnie z podstawowych narz\u0119dzi walki z potencjalnym nadzorem w sieci.\r\n- wie, \u017ce nadz\u00f3r nad komunikacj\u0105 w sieci jest wielopoziomowy.\r\n- umie rozpozna\u0107, kt\u00f3re kana\u0142y komunikacji s\u0105 bardziej podatne na nadz\u00f3r od innych.\r\n- umie poda\u0107 przyk\u0142ady sytuacji, w kt\u00f3rych nadz\u00f3r jest uzasadniony, i takich, w kt\u00f3rych nie jest.",
- "competence": 22,
- "level": 8
- }
- },
- {
- "pk": 198,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie aktywnie przeciwdzia\u0142a\u0107 nadzorowi w sieci, \u015bwiadomie stosuj\u0105c wiele technik w tym celu.\r\n- umie z du\u017c\u0105 doz\u0105 pewno\u015bci okre\u015bli\u0107, kt\u00f3re kana\u0142y komunikacji s\u0105 najprawdopodobniej nadzorowane i w jakich celach.",
- "competence": 22,
- "level": 9
- }
- },
- {
- "pk": 165,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie dostrzec sytuacje, w kt\u00f3rych przekroczone zostaj\u0105 granice higieny korzystania z medi\u00f3w;\r\nnp. mama za du\u017co gra w gry, kolega za du\u017co rozmawia przez telefon.\r\n- wie, \u017ce relacje przez media maj\u0105 wp\u0142yw na relacje bezpo\u015brednie, a czynno\u015bci dokonywane przez media mog\u0105 mie\u0107 bardzo realne konsekwencje (np. p\u0142atno\u015bci).",
- "competence": 19,
- "level": 3
- }
- },
- {
- "pk": 166,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce pewne wzorce zachowa\u0144 mog\u0105 prowadzi\u0107 do uzale\u017cnienia.\r\n- umie zidentyfikowa\u0107 niebezpieczne wzorce i ich unika\u0107.\r\n- wie, czym jest stalking (n\u0119kanie).",
- "competence": 19,
- "level": 4
- }
- },
- {
- "pk": 167,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie \u015bwiadomie kszta\u0142towa\u0107 swoje nawyki zwi\u0105zane z korzystaniem z technologii.\r\n- umie zaobserwowa\u0107 oznaki uzale\u017cnienia u siebie i u innych.\r\n- umie przewidzie\u0107 konsekwencje dzia\u0142a\u0144 w sieci, kt\u00f3re mog\u0105 spowodowa\u0107 gro\u017ane sytuacje tak\u017ce poza ni\u0105;\r\nnp. nie podaje publicznie informacji o planowanej d\u0142u\u017cszej nieobecno\u015bci w domu na portalu spo\u0142eczno\u015bciowym, na kt\u00f3rym podany jest r\u00f3wnie\u017c adres zamieszkania.\r\n- umie rozpozna\u0107 stalking (n\u0119kanie) i wie, jak si\u0119 przed nim broni\u0107.\r\n- umie zarz\u0105dza\u0107 wizerunkiem on-line; \u015bwiadomie podejmuje decyzj\u0119, na ile wizerunek on-line odzwierciedla jego prawdziw\u0105 to\u017csamo\u015b\u0107;\r\nnp. nie publikuje danych umo\u017cliwiaj\u0105cych odkrycie jego to\u017csamo\u015bci.",
- "competence": 19,
- "level": 5
- }
- },
- {
- "pk": 168,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zareagowa\u0107 na negatywne wzorce zachowa\u0144 u innych, np. szukaj\u0105c pomocy specjalisty.\r\n- dostrzega powi\u0105zania pomi\u0119dzy swoimi dzia\u0142aniami w mediach a innymi sferami \u017cycia, umie tymi powi\u0105zaniami zarz\u0105dza\u0107.",
- "competence": 19,
- "level": 6
- }
- },
- {
- "pk": 169,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce pewne wzorce zachowa\u0144 mog\u0105 prowadzi\u0107 do uzale\u017cnienia.\r\n- wie, \u017ce relacje przez media maj\u0105 wp\u0142yw na relacje bezpo\u015brednie a czynno\u015bci dokonywane przez media maj\u0105 bardzo realne konsekwencje (np. p\u0142atno\u015bci).\r\n- umie przewidzie\u0107 konsekwencje dzia\u0142a\u0144 w sieci, kt\u00f3re mog\u0105 spowodowa\u0107 gro\u017ane sytuacje tak\u017ce poza ni\u0105.\r\n- wie,",
- "competence": 19,
- "level": 7
- }
- },
- {
- "pk": 170,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zidentyfikowa\u0107 niebezpieczne wzorce zachowa\u0144 i unika\u0107 sytuacji, kt\u00f3re do nich prowadz\u0105.\r\n- umie \u015bwiadomie kszta\u0142towa\u0107 swoje nawyki zwi\u0105zane z korzystaniem z technologii.\r\n- umie zaobserwowa\u0107 oznaki uzale\u017cnienia u siebie i u innych.\r\n- zna podstawowe narz\u0119dzia i metody obrony przed zagro\u017ceniami zwi\u0105zanymi z komunikacj\u0105 przez media.",
- "competence": 19,
- "level": 8
- }
- },
- {
- "pk": 171,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zareagowa\u0107 na negatywne wzorce zachowa\u0144, np. szukaj\u0105c pomocy specjalisty.\r\n- umie zidentyfikowa\u0107 pr\u00f3by aktywnych atak\u00f3w w \u015brodowisku medialnym (phishing targetowany) i si\u0119 przed nimi obroni\u0107.",
- "competence": 19,
- "level": 9
- }
- },
- {
- "pk": 199,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co znaczy da\u0107 komu\u015b s\u0142owo, um\u00f3wi\u0107 si\u0119 na co\u015b\r\nnp. gdy obieca mamie, \u017ce posprz\u0105ta zabawki w pokoju.",
- "competence": 23,
- "level": 1
- }
- },
- {
- "pk": 200,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym s\u0105 zwyczajowe normy komunikacyjne i umie je zastosowa\u0107 w typowych sytuacjach;\r\nnp. wie, kiedy m\u00f3wi si\u0119 dzie\u0144 dobry, dobry wiecz\u00f3r, dzi\u0119kuj\u0119, przepraszam\r\n- wie, \u017ce prawo obowi\u0105zuje tak\u017ce w komunikacji z innymi, a naruszenie go jest karane.",
- "competence": 23,
- "level": 2
- }
- },
- {
- "pk": 201,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie poj\u0119cia wolno\u015bci s\u0142owa, prawa do prywatno\u015bci , ochrony dobrego imienia.\r\n- umie wskaza\u0107 przyk\u0142ady swoich praw i obowi\u0105zk\u00f3w w sferze komunikacji.\r\nnp. prawo do tajemnicy korespondencji\r\n- rozumie poj\u0119cie umowy.\r\n- wie, \u017ce korzystanie z us\u0142ug komunikacyjnych wi\u0105\u017ce si\u0119 z zawarciem umowy.",
- "competence": 23,
- "level": 3
- }
- },
- {
- "pk": 202,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce przed naruszeniem praw komunikacyjnych mo\u017cna si\u0119 broni\u0107 w s\u0105dzie.\r\n- wie, \u017ce istniej\u0105 regulacje prawne dotycz\u0105ce komunikacji przez media (prawo telekomunikacyjne, prawo autorskie, prawo prasowe, ochrona danych osobowych itd.)\r\n- wie, \u017ce zbiorem norm zwyczajowych w komunikacji on-line jest netykieta.",
- "competence": 23,
- "level": 4
- }
- },
- {
- "pk": 203,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie \u015bwiadomie zawrze\u0107 umow\u0119 na us\u0142ugi komunikacyjne, umie wskaza\u0107 wynikaj\u0105ce z niej swoje prawa i obowi\u0105zki.\r\n- umie egzekwowa\u0107 swoje prawa.\r\n- umie zwr\u00f3ci\u0107 si\u0119 o pomoc do organ\u00f3w regulacyjnych i rzecznik\u00f3w r\u00f3\u017cnych grup;\r\nnp. w przypadku naruszenia ochrony danych osobowych lub naruszenia praw autorskich.\r\n\r\n- umie zapisy traktatowe, konstytucyjne i ustawowe prze\u0142o\u017cy\u0107 na w\u0142asne otoczenie i dzia\u0142ania.",
- "competence": 23,
- "level": 5
- }
- },
- {
- "pk": 204,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zinterpretowa\u0107 normy prawne i zastosowa\u0107 je w ci\u0105gle zmieniaj\u0105cym si\u0119 \u015brodowisku technologicznym.",
- "competence": 23,
- "level": 6
- }
- },
- {
- "pk": 205,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym s\u0105 zwyczajowe normy komunikacyjne.\r\n- wie, \u017ce prawo obowi\u0105zuje tak\u017ce w komunikacji z innymi, a naruszenie go jest karane.\r\n- wie, \u017ce narusze\u0144 praw komunikacyjnych mo\u017ce dochodzi\u0107 w s\u0105dzie.\r\n- rozumie poj\u0119cia wolno\u015bci s\u0142owa, prawa do prywatno\u015bci (tajemnica korespondencji), ochrony dobrego imienia.\r\n- umie wskaza\u0107 przyk\u0142ady swoich praw i obowi\u0105zk\u00f3w w sferze komunikacji.\r\n- rozumie poj\u0119cie umowy.\r\n- wie, \u017ce korzystanie z us\u0142ug komunikacyjnych wi\u0105\u017ce si\u0119 z zawarciem umowy.\r\n- wie, \u017ce zbiorem norm zwyczajowych w komunikacji on-line jest netykieta.",
- "competence": 23,
- "level": 7
- }
- },
- {
- "pk": 206,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zapisy traktatowe, konstytucyjne i ustawowe prze\u0142o\u017cy\u0107 na w\u0142asne otoczenie i dzia\u0142ania.\r\n- wie, \u017ce istniej\u0105 regulacje prawne dotycz\u0105ce komunikacji przez media (prawo telekomunikacyjne, prawo autorskie, prawo prasowe, ochrona danych osobowych itd.)",
- "competence": 23,
- "level": 8
- }
- },
- {
- "pk": 207,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie egzekwowa\u0107 swoje prawa.\r\n- umie zwr\u00f3ci\u0107 si\u0119 o pomoc do organ\u00f3w regulacyjnych i rzecznik\u00f3w r\u00f3\u017cnych grup.\r\n- umie zinterpretowa\u0107 normy prawne i zastosowa\u0107 je w ci\u0105gle zmieniaj\u0105cym si\u0119 \u015brodowisku technologicznym.",
- "competence": 23,
- "level": 9
- }
- },
- {
- "pk": 244,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce media \u0142\u0105cz\u0105 z lud\u017ami;\r\nnp. mo\u017ce zadzwoni\u0107 do babci.\r\n- wie, \u017ce nie nale\u017cy ura\u017ca\u0107 innych, zar\u00f3wno w kontakcie bezpo\u015brednim, jak i przez media.\r\n- umie powiadomi\u0107 rodzic\u00f3w lub opiekun\u00f3w, gdy korzystaj\u0105c z medi\u00f3w spotyka si\u0119 z nieprzyjemn\u0105 sytuacj\u0105.",
- "competence": 28,
- "level": 1
- }
- },
- {
- "pk": 245,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ma prawo do anonimowo\u015bci, ale nie do bezkarno\u015bci;\r\nnp. mo\u017ce podpisa\u0107 rysunek pseudonimem i nie musi ujawnia\u0107 prawdziwego imienia.\r\n- umie sprzeciwi\u0107 si\u0119 naruszaniu norm komunikacyjnych.\r\n- wie, \u017ce ka\u017cdy ma prawo dost\u0119pu do wiedzy.",
- "competence": 28,
- "level": 2
- }
- },
- {
- "pk": 246,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- zna swoje prawa komunikacyjne jako dziecka, ucznia i obywatela\r\n(prawo do uczestnictwa w kulturze, wolno\u015b\u0107 s\u0142owa itd.) i wie, dlaczego s\u0105 wa\u017cne;\r\nnp. wie, \u017ce ma prawo czyta\u0107 ksi\u0105\u017cki, ma prawo komunikowa\u0107 si\u0119 z innymi.\r\n- umie dostrzec naruszenia praw, wolno\u015bci, r\u00f3wno\u015bci i prywatno\u015bci w mediach.\r\n- rozumie, \u017ce prawo ma chroni\u0107 u\u017cytkownik\u00f3w medi\u00f3w.",
- "competence": 28,
- "level": 3
- }
- },
- {
- "pk": 247,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie konkretnie prawa dziecka, cz\u0142owieka i obywatela dotycz\u0105 medi\u00f3w.\r\nnp. tejemnica korespondencji.\r\n- wie, \u017ce prawa komunikacyjne wymagaj\u0105 ochrony.\r\n- umie opisa\u0107 naruszenia praw i swob\u00f3d oraz reaguje na nie.",
- "competence": 28,
- "level": 4
- }
- },
- {
- "pk": 248,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 zadania regulator\u00f3w medi\u00f3w,\r\nrzecznik\u00f3w praw oraz s\u0105d\u00f3w krajowych i europejskich;\r\nnp. odr\u00f3\u017cnia rol\u0119, zadania i obszar dzia\u0142ania Europejskiego Trybuna\u0142u Sprawiedliwo\u015bci od Europejskiego Trybuna\u0142u Praw Cz\u0142owieka.\r\n- umie zwr\u00f3ci\u0107 si\u0119 o wsparcie urz\u0119du, rzecznika lub s\u0105du dla ochrony praw swoich i innych.\r\n- rozumie potrzeb\u0119 aktywnej obrony praw i swob\u00f3d komunikacyjnych.",
- "competence": 28,
- "level": 5
- }
- },
- {
- "pk": 249,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie u\u017cy\u0107 medi\u00f3w do publicznej obrony praw swoich i innych.",
- "competence": 28,
- "level": 6
- }
- },
- {
- "pk": 250,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ma prawo do anonimowo\u015bci, ale nie do bezkarno\u015bci.\r\n- umie godnie si\u0119 zachowa\u0107 w sytuacjach komunikacyjnych.\r\n- rozumie, \u017ce ka\u017cdy ma prawo do nauki i dost\u0119pu do wiedzy.\r\n- zna swoje prawa komunikacyjne wynikaj\u0105ce z praw cz\u0142owieka i obywatela.",
- "competence": 28,
- "level": 7
- }
- },
- {
- "pk": 251,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie dostrzec naruszenia praw, wolno\u015bci, r\u00f3wno\u015bci i prywatno\u015bci w mediach i reaguje na nie.\r\n- rozumie rol\u0119 prawa do edukacji i do udzia\u0142u w kulturze.\r\n- wie, jakie konkretnie prawa cz\u0142owieka i obywatela dotycz\u0105 medi\u00f3w.",
- "competence": 28,
- "level": 8
- }
- },
- {
- "pk": 252,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie s\u0105 zadania regulator\u00f3w medi\u00f3w, rzecznik\u00f3w i s\u0105d\u00f3w krajowych i europejskich.\r\n- umie zwr\u00f3ci\u0107 si\u0119 o wsparcie urz\u0119du, rzecznika lub s\u0105du dla ochrony praw swoich i innych os\u00f3b.\r\n- umie u\u017cy\u0107 medi\u00f3w do publicznej obrony praw swoich i innych.\r\n- rozumie potrzeb\u0119 aktywnej obrony praw i swob\u00f3d.",
- "competence": 28,
- "level": 9
- }
- },
- {
- "pk": 235,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ka\u017cde dzie\u0142o ma autora;\r\nnp. umie wskaza\u0107, \u017ce to rysunek Kasi, a ten wierszyk wymy\u015bli\u0142 Tomek.\r\n- wie, \u017ce nie powinno si\u0119 przypisywa\u0107 sobie cudzych dzie\u0142.",
- "competence": 27,
- "level": 1
- }
- },
- {
- "pk": 236,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce jest autorem i u\u017cytkownikiem informacji, np. kiedy rysuje czy ogl\u0105da bajki.\r\n- wie, \u017ce o publikacji decyduje autor, np. sam mo\u017ce zadecydowa\u0107 kiedy rysunek jest gotowy i kiedy pokaza\u0107 go kolegom.\r\n- wie, co to jest plagiat; np. umie wskaza\u0107, \u017ce ten wierszyk napisa\u0142 Tuwim, a nie kolega.\r\n- wie, czym jest cytat.\r\n- umie wskaza\u0107 cytat we w\u0142asnej i cudzej wypowiedzi.",
- "competence": 27,
- "level": 2
- }
- },
- {
- "pk": 237,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 r\u00f3\u017cne prawa wy\u0142\u0105czne: autorskie, patentowe, do znak\u00f3w towarowych.\r\n- wie, co to jest\r\ndozwolony u\u017cytek osobisty i publiczny: np. biblioteka, prawo do czytania, prawo do kopiowania informacji.\r\n- umie poprawnie cytowa\u0107 i oznacza\u0107 autorstwo\r\n- umie opisa\u0107 przyk\u0142ad dzie\u0142a zale\u017cnego:\r\nnp. t\u0142umaczenia.",
- "competence": 27,
- "level": 3
- }
- },
- {
- "pk": 238,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- potrafi rozr\u00f3\u017cni\u0107 r\u00f3\u017cne rodzaje praw wy\u0142\u0105cznych i umie wskaza\u0107, jakiego rodzaju prawo dotyczy danej sytuacji.\r\n- rozumie, \u017ce prawa wy\u0142\u0105czne ograniczaj\u0105 wolno\u015b\u0107 u\u017cytkownik\u00f3w.\r\n- wie, czym jest licencja.\r\n- rozumie i umie stosowa\u0107 prawa osobiste autora: prawo do oznaczenia autorstwa i zachowania integralno\u015bci dzie\u0142a.\r\n- wie, \u017ce prawa wy\u0142\u0105czne s\u0105 ograniczone w czasie.\r\n- wie, czym s\u0105 i czemu s\u0142u\u017c\u0105 wolne licencje.\r\n- wie, co to jest domena publiczna.\r\n- rozumie granice cytatu i dozwolonego u\u017cytku.",
- "competence": 27,
- "level": 4
- }
- },
- {
- "pk": 239,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie cele istnienia prawa autorskiego.\r\n- wie, \u017ce monopol tw\u00f3rczy jest kompromisem pomi\u0119dzy prawami u\u017cytkownika a prawami autora.\r\n- umie opisa\u0107, jak powstaj\u0105 r\u00f3\u017cne prawa wy\u0142\u0105czne i jak d\u0142ugo trwa ich ochrona;\r\nnp. wie, \u017ce dzie\u0142o uzyskuje ochron\u0119 w chwili ustalenia, a patent i znak towarowy trzeba rejestrowa\u0107.\r\n- wie, jakie s\u0105 cele organizacji zbiorowego zarz\u0105du prawami.\r\n- umie opisa\u0107 obszary stosowania monopolu autorskiego i patentowego;\r\nnp. wie, \u017ce prawo autorskie nie dotyczy dokument\u00f3w urz\u0119dowych, a ochrona patentowa odkry\u0107 naukowych, matematyki i program\u00f3w komputerowych.\r\n- umie opisa\u0107 konflikt mi\u0119dzy ochron\u0105 praw wy\u0142\u0105cznych a wolno\u015bci\u0105 dost\u0119pu do tre\u015bci.\r\n- umie stosowa\u0107 i rozumie cele wolnych licencji.\r\n- wie, czym jest copyleft.",
- "competence": 27,
- "level": 5
- }
- },
- {
- "pk": 240,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie ustali\u0107 status prawny dzie\u0142a lub rozwi\u0105zania technicznego.\r\n- rozumie konflikt mi\u0119dzy monopolem rozpowszechniania a modelem komunikowania si\u0119 w sieci.\r\n- rozumie przes\u0142anki i skutki wyboru licencji dla swoich dzie\u0142.\r\n- rozumie istot\u0119 sporu o patenty na programy, o obowi\u0105zki po\u015brednik\u00f3w oraz o prawa i wolno\u015bci prywatnego uczestnika obiegu kultury.\r\n- rozumie zasady ochrony patentowej i znak\u00f3w towarowych.\r\n- wie, czym jest ochrona baz danych.",
- "competence": 27,
- "level": 6
- }
- },
- {
- "pk": 241,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce o publikacji decyduje autor.\r\n- wie, co to jest plagiat.\r\n- wie, \u017ce s\u0105 r\u00f3\u017cne prawa wy\u0142\u0105czne: autorskie, patentowe, do znak\u00f3w towarowych.\r\n- umie poprawnie cytowa\u0107 i oznacza\u0107 autorstwo.",
- "competence": 27,
- "level": 7
- }
- },
- {
- "pk": 242,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest licencja.\r\n- rozumie i umie stosowa\u0107 prawa osobiste autora: prawo do oznaczenia autorstwa i zachowania integralno\u015bci dzie\u0142a.\r\n- wie, co to jest domena publiczna.\r\n- wie, co to jest dozwolony u\u017cytek osobisty i publiczny.\r\n- wie, \u017ce prawa wy\u0142\u0105czne s\u0105 ograniczone w czasie.\r\n- wie, co to s\u0105 dzie\u0142a zale\u017cne.\r\n- umie wskaza\u0107, jaki rodzaj prawa wy\u0142\u0105cznego dotyczy danej sytuacji.\r\n- umie opisa\u0107, jak powstaj\u0105 r\u00f3\u017cne prawa wy\u0142\u0105czne i jak d\u0142ugo trwa ich ochrona.\r\n- wie, czym s\u0105 i czemu s\u0142u\u017c\u0105 wolne licencje oraz zna ich rodzaje.\r\n- umie post\u0105pi\u0107 w typowych sytuacjach zwi\u0105zanych z publikacj\u0105 w\u0142asnej i cudzej tw\u00f3rczo\u015bci.\r\n- rozumie granice cytatu i dozwolonego u\u017cytku.\r\n- rozumie, \u017ce prawa wy\u0142\u0105czne ograniczaj\u0105 wolno\u015b\u0107 u\u017cytkownik\u00f3w.",
- "competence": 27,
- "level": 8
- }
- },
- {
- "pk": 243,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie cele istnienia prawa autorskiego.\r\n- wie, \u017ce monopol tw\u00f3rczy jest kompromisem pomi\u0119dzy prawami u\u017cytkownika a prawami autora.\r\n- wie, jakie s\u0105 cele organizacji zbiorowego zarz\u0105du prawami.\r\n- umie opisa\u0107 konflikt mi\u0119dzy ochron\u0105 praw wy\u0142\u0105cznych a wolno\u015bci\u0105 dost\u0119pu do tre\u015bci.\r\n- umie stosowa\u0107 i rozumie cele wolnych licencji.\r\n- wie, czym jest copyleft.\r\n- umie prawid\u0142owo ustali\u0107 status prawny dzie\u0142a lub rozwi\u0105zania technicznego.\r\n- rozumie konflikt mi\u0119dzy monopolem rozpowszechniania a modelem komunikowania si\u0119 w sieci.\r\n- rozumie przes\u0142anki i skutki wyboru licencji dla swoich dzie\u0142.\r\n- rozumie istot\u0119 sporu o patenty na programy, o obowi\u0105zki po\u015brednik\u00f3w oraz o prawa i wolno\u015bci prywatnego uczestnika obiegu kultury.\r\n- rozumie zasady ochrony patentowej i znak\u00f3w towarowych.\r\n- wie, czym jest ochrona baz danych.",
- "competence": 27,
- "level": 9
- }
- },
- {
- "pk": 254,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie zg\u0142osi\u0107 doros\u0142emu problem techniczny i poprosi\u0107 o wsparcie.",
- "competence": 29,
- "level": 2
- }
- },
- {
- "pk": 255,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie opisa\u0107 r\u00f3\u017cnice mi\u0119dzy rodzajami us\u0142ug telekomunikacyjnych.\r\n- umie poda\u0107 przyk\u0142ady p\u0142atnych us\u0142ug.\r\n- wie, \u017ce operatorzy maj\u0105 obowi\u0105zki i potrafi wskaza\u0107 ich przyk\u0142ady.\r\n- wie, \u017ce nie mo\u017ce samodzielnie zawiera\u0107 um\u00f3w;\r\nnp. zak\u0142ada\u0107 kont w serwisach internetowych.\r\n- umie poprosi\u0107 opiekun\u00f3w o pomoc przy zak\u0142adaniu konta w serwisach internetowych.",
- "competence": 29,
- "level": 3
- }
- },
- {
- "pk": 256,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie opisa\u0107 rol\u0119 i zadania us\u0142ugodawcy sieciowego.\r\n- umie poda\u0107 przyk\u0142ady wzajemnych zobowi\u0105za\u0144 wynikaj\u0105cych z um\u00f3w zawartych z dostawcami us\u0142ug; np. na jaki okres zawarta jest umowa, jak j\u0105 mo\u017cna rozwi\u0105za\u0107, jakie s\u0105 standardy us\u0142ugi.",
- "competence": 29,
- "level": 4
- }
- },
- {
- "pk": 257,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co to jest us\u0142uga powszechna.\r\n- umie broni\u0107 swych praw, gdy operator odetnie go od us\u0142ugi lub danych;\r\nnp. skierowa\u0107 pismo do urz\u0119du.\r\n- umie oceni\u0107 i sprawdzi\u0107 jako\u015b\u0107 us\u0142ugi.\r\n- wie, \u017ce us\u0142ugi podlegaj\u0105 regulacji, umie wskaza\u0107 powo\u0142ane do tego urz\u0119dy;\r\nnp. rozr\u00f3\u017cnia zadania UKE, UOKiK, KRRiT i GIODO.",
- "competence": 29,
- "level": 5
- }
- },
- {
- "pk": 258,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie \u017c\u0105da\u0107 dostarczenia us\u0142ug powszechnych.\r\n- rozumie obowi\u0105zki po\u015brednika wynikaj\u0105ce z\r\npowiadomienia o naruszeniu regulaminu lub prawa.",
- "competence": 29,
- "level": 6
- }
- },
- {
- "pk": 259,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce operatorzy maj\u0105 obowi\u0105zki i potrafi wskaza\u0107 ich przyk\u0142ady.\r\n- umie poda\u0107 przyk\u0142ady wzajemnych zobowi\u0105za\u0144 wynikaj\u0105cych z um\u00f3w zawartych z dostawcami us\u0142ug.\r\n- wie, co to jest us\u0142uga powszechna.",
- "competence": 29,
- "level": 7
- }
- },
- {
- "pk": 260,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce us\u0142ugi podlegaj\u0105 regulacji, umie wskaza\u0107 powo\u0142ane do tego urz\u0119dy\r\n- umie broni\u0107 swych praw, gdy operator odetnie go od us\u0142ugi lub danych.\r\n- umie oceni\u0107 i sprawdzi\u0107 jako\u015b\u0107 us\u0142ugi.",
- "competence": 29,
- "level": 8
- }
- },
- {
- "pk": 261,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie \u017c\u0105da\u0107 dostarczenia us\u0142ug powszechnych.\r\n- rozumie obowi\u0105zki po\u015brednika wynikaj\u0105ce z powiadomienia o naruszeniu.",
- "competence": 29,
- "level": 9
- }
- },
- {
- "pk": 217,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce gazeta, audycja i portal maj\u0105 redakcj\u0119.\r\n- wie, \u017ce s\u0105 ksi\u0105\u017cki, gazety, audycje i aplikacje przeznaczone dla dzieci.",
- "competence": 25,
- "level": 1
- }
- },
- {
- "pk": 218,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce w mediach za tre\u015b\u0107 odpowiada redaktor.\r\n- umie rozpozna\u0107 oznaczenie programu dla dzieci i m\u0142odzie\u017cy.",
- "competence": 25,
- "level": 2
- }
- },
- {
- "pk": 219,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce gazety i portale s\u0105 prywatne, a radio i telewizja mog\u0105 by\u0107 prywatne lub publiczne.\r\n- wie o prawie do autoryzacji i sprostowania.\r\n- wie, \u017ce materia\u0142y reklamowe i sponsorowane musz\u0105 by\u0107 odpowiednio oznaczone.\r\n- umie rozpozna\u0107 reklam\u0119.",
- "competence": 25,
- "level": 3
- }
- },
- {
- "pk": 220,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce radio i telewizja s\u0105 regulowane\r\nprzez KRRiT.\r\n- umie opisa\u0107 zadania medi\u00f3w publicznych, ich misj\u0119 oraz spos\u00f3b finansowania;\r\nnp. abonament, reklamy, datki.\r\n- umie opisa\u0107 modele zarabiania pieni\u0119dzy przez media prywatne\r\nnp. reklamy, abonament, dost\u0119p na \u017c\u0105danie, datki.\r\n- umie rozpozna\u0107 lokowanie produktu.",
- "competence": 25,
- "level": 4
- }
- },
- {
- "pk": 221,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest licencja programowa i przydzia\u0142 pasma.\r\n- umie rozpozna\u0107 ukryt\u0105 reklam\u0119 i przes\u0142anie marketingowe.\r\n- umie skorzysta\u0107 z prawa do sprostowania.\r\n- umie rozr\u00f3\u017cni\u0107 tre\u015bci informacyjne,\r\npublicystyczne i rozrywkowe.",
- "competence": 25,
- "level": 5
- }
- },
- {
- "pk": 222,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przygotowa\u0107 komunikat medialny i wie, kt\u00f3re medium mo\u017ce lub musi go zamie\u015bci\u0107.\r\n- umie rozpozna\u0107 naruszenie obowi\u0105zk\u00f3w wydawcy lub nadawcy.\r\n- umie sprawdzi\u0107 dane rejestracyjne medium.",
- "competence": 25,
- "level": 6
- }
- },
- {
- "pk": 223,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce w mediach za tre\u015b\u0107 odpowiada redaktor.\r\n- umie rozpozna\u0107 oznaczenie programu dla dzieci i m\u0142odzie\u017cy.\r\n- wie, \u017ce gazety i portale s\u0105 prywatne, a radio i telewizja mog\u0105 by\u0107 prywatne lub publiczne.",
- "competence": 25,
- "level": 7
- }
- },
- {
- "pk": 224,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce radio i telewizja s\u0105 regulowane przez KRRiT.\r\n- wie o prawie do autoryzacji i sprostowania.\r\n- wie, \u017ce materia\u0142y reklamowe i sponsorowane musz\u0105 by\u0107 odpowiednio oznaczone.\r\n- umie rozpozna\u0107 reklam\u0119 i lokowanie produktu.\r\n- umie opisa\u0107 zadania medi\u00f3w publicznych, ich misj\u0119 oraz spos\u00f3b finansowania.\r\n- umie opisa\u0107 modele zarabiania przez media prywatne.",
- "competence": 25,
- "level": 8
- }
- },
- {
- "pk": 225,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest licencja programowa i przydzia\u0142 pasma.\r\n- umie skorzysta\u0107 z prawa do sprostowania.\r\n- umie przygotowa\u0107 komunikat medialny i wie, kt\u00f3re medium mo\u017ce lub musi go zamie\u015bci\u0107.\r\n- umie rozpozna\u0107 naruszenie obowi\u0105zk\u00f3w wydawcy lub nadawcy.\r\n- umie sprawdzi\u0107 dane rejestracyjne medium.",
- "competence": 25,
- "level": 9
- }
- },
- {
- "pk": 208,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce ka\u017cdy ma prawo do korzystania z medi\u00f3w, bez wzgl\u0119du na stopie\u0144 sprawno\u015bci.\r\n- wie, \u017ce osoby niepe\u0142nosprawne maj\u0105 trudno\u015bci w korzystaniu z medi\u00f3w;\r\nnp. zdaje sobie spraw\u0119, \u017ce babcia musi nastawia\u0107 g\u0142o\u015bno telewizor, tata zak\u0142ada okulary do czytania gazety, a niewidomi nie mog\u0105 czyta\u0107 drukowanych ksi\u0105\u017cek.",
- "competence": 24,
- "level": 1
- }
- },
- {
- "pk": 209,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce niepe\u0142nosprawny ma r\u00f3wne prawo do wypowiedzi w mediach.\r\n- umie poda\u0107 przyk\u0142ady barier w dost\u0119pie do edukacji, informacji i kultury.\r\n- umie poda\u0107 przyk\u0142ad u\u0142atwie\u0144 dla niepe\u0142nosprawnych;\r\nnp. wie, \u017ce mo\u017cna powi\u0119kszy\u0107 litery, aby ka\u017cdy m\u00f3g\u0142 je przeczyta\u0107, do film\u00f3w mo\u017cna doda\u0107 napisy.",
- "competence": 24,
- "level": 2
- }
- },
- {
- "pk": 210,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie rozpozna\u0107 typowe bariery dost\u0119pno\u015bci w danym przekazie medialnym.\r\n- umie rozpozna\u0107 \u0142amanie praw s\u0142abszych w tre\u015bci przekazu.\r\n- umie dostrzec i opisa\u0107 bezpo\u015brednie bariery dost\u0119pno\u015bci; np. brak napis\u00f3w pod filmem.",
- "competence": 24,
- "level": 3
- }
- },
- {
- "pk": 211,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co to jest konwencja o prawach os\u00f3b niepe\u0142nosprawnych.\r\n- umie dostrzec i opisa\u0107 po\u015brednie bariery dost\u0119pno\u015bci; np. zbyt ma\u0142e czcionki, nieprawid\u0142owy kontrast, chaotyczny uk\u0142ad informacji.\r\n- umie reagowa\u0107 na \u0142amanie praw.",
- "competence": 24,
- "level": 4
- }
- },
- {
- "pk": 212,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o ustawowych udogodnieniach dla niepe\u0142nosprawnych, kt\u00f3re musz\u0105 stosowa\u0107 wydawcy i nadawcy;\r\nnp. audiodeskrypcja, j\u0119zyk migowy, napisy pod filmem.\r\n- wie o istnieniu standard\u00f3w dost\u0119pno\u015bci i obowi\u0105zku ich stosowania;\r\nnp. znane mu s\u0105 <em>Wytyczne dotycz\u0105ce dost\u0119pno\u015bci tre\u015bci internetowych</em> (WCAG).\r\n- wie, \u017ce informacja przedstawiona w spos\u00f3b uniwersalny dociera do wi\u0119kszej liczby odbiorc\u00f3w, a niestosowanie standard\u00f3w dost\u0119pno\u015bci \u00a0powoduje wykluczenie cz\u0119\u015bci obywateli, np. os\u00f3b starszych.",
- "competence": 24,
- "level": 5
- }
- },
- {
- "pk": 213,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie sprawdzi\u0107 spe\u0142nienie wymog\u00f3w dost\u0119pno\u015bci;\r\nnp. korzysta z narz\u0119dzi do samodzielnego badania dost\u0119pno\u015bci.\r\n- umie skutecznie reagowa\u0107 na naruszenia wymog\u00f3w dost\u0119pno\u015bci.",
- "competence": 24,
- "level": 6
- }
- },
- {
- "pk": 214,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce niepe\u0142nosprawny ma r\u00f3wne prawo do wypowiedzi w mediach.\r\n- umie poda\u0107 przyk\u0142ady barier w dost\u0119pie do edukacji, informacji i kultury.",
- "competence": 24,
- "level": 7
- }
- },
- {
- "pk": 215,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o istnieniu standard\u00f3w dost\u0119pno\u015bci.\r\n- wie, co to jest konwencja o prawach os\u00f3b niepe\u0142nosprawnych.\r\n- umie rozpozna\u0107 \u0142amanie praw s\u0142abszych w tre\u015bci przekazu.\r\n- umie dostrzec i opisa\u0107 bezpo\u015brednie i po\u015brednie bariery dost\u0119pno\u015bci.\r\n- umie reagowa\u0107 na \u0142amanie praw.",
- "competence": 24,
- "level": 8
- }
- },
- {
- "pk": 216,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o ustawowych udogodnieniach dla niepe\u0142nosprawnych, kt\u00f3re musz\u0105 stosowa\u0107 wydawcy i nadawcy.\r\n- umie sprawdzi\u0107 spe\u0142nienie wymog\u00f3w dost\u0119pno\u015bci.\r\n- umie skutecznie reagowa\u0107 na naruszenia.",
- "competence": 24,
- "level": 9
- }
- },
- {
- "pk": 226,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce nie nale\u017cy m\u00f3wi\u0107 i pisa\u0107 o sobie i o rodzinie bez potrzeby;\r\nnp. nie m\u00f3wi obcym osobom, gdzie mieszka lub jaki samoch\u00f3d maj\u0105 rodzice.",
- "competence": 26,
- "level": 1
- }
- },
- {
- "pk": 227,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie ide\u0119 ochrony prywatno\u015bci, ochrony danych osobowych i swoje prawa do takiej ochrony.",
- "competence": 26,
- "level": 2
- }
- },
- {
- "pk": 228,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce komunikacja elektroniczna wi\u0105\u017ce si\u0119 z gromadzeniem i przechowywaniem informacji o u\u017cytkownikach.\r\n- umie rozpozna\u0107 sytuacje wymuszania danych osobowych.\r\n- umie odm\u00f3wi\u0107 podania danych osobowych.\r\n- umie zak\u0142ada\u0107 konta, korzystaj\u0105c z pseudonim\u00f3w.",
- "competence": 26,
- "level": 3
- }
- },
- {
- "pk": 229,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie poda\u0107 przyk\u0142ady gromadzenia i przechowywania informacji o u\u017cytkownikach;\r\nnp. billingi, dane geolokalizacyjne, emaile, wiadomo\u015bci, wpisy na forach i w mediach spo\u0142eczno\u015bciowych.\r\n- umie w praktyce chroni\u0107 prywatno\u015b\u0107 swoj\u0105 i innych.\r\n- wie o istnieniu obowi\u0105zk\u00f3w informacyjnych administrator\u00f3w danych np. wie, \u017ce mo\u017ce uzyska\u0107 informacj\u0119 na temat swoich danych przechowywanych przez w\u0142a\u015bciciela serwisu internetowego.\r\n- wie, czego dotyczy ustawa o ochronie danych osobowych.\r\n- umie opisa\u0107 obowi\u0105zki dostawc\u00f3w us\u0142ug w zakresie ochrony danych osobowych.\r\n- umie opisa\u0107 problemy zwi\u0105zane z ochron\u0105 danych;\r\nnp. bazy danych, wycieki, \u0142\u0105czenie danych z r\u00f3\u017cnych zasob\u00f3w, dane wra\u017cliwe.",
- "competence": 26,
- "level": 4
- }
- },
- {
- "pk": 230,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest polityka prywatno\u015bci.\r\n- umie opisa\u0107 tre\u015b\u0107 ustawy o ochronie danych osobowych.\r\n- rozumie poj\u0119cia przetwarzania danych osobowych i administratora danych.\r\n- wie, co to s\u0105 dane wra\u017cliwe.\r\n- wie, co to jest GIODO i jakie s\u0105 jego zadania.",
- "competence": 26,
- "level": 5
- }
- },
- {
- "pk": 231,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie polityk\u0119 prywatno\u015bci firm, z kt\u00f3rych us\u0142ug korzysta.\r\n- umie stosowa\u0107 zasady ochrony we w\u0142asnych publikacjach i us\u0142ugach.\r\n- umie zwr\u00f3ci\u0107 si\u0119 do GIODO z pro\u015bb\u0105 o interwencj\u0119 lub interpretacj\u0119.\r\n- umie sprawdzi\u0107 w\u0142asne dane w zbiorach, w kt\u00f3rych s\u0105 zawarte.\r\n- umie zarejestrowa\u0107 zbi\u00f3r i sprawdzi\u0107, czy dany zbi\u00f3r jest zarejestrowany.",
- "competence": 26,
- "level": 6
- }
- },
- {
- "pk": 232,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie dba\u0107 o prywatno\u015b\u0107.\r\n- rozumie ide\u0119 ochrony danych osobowych i swoje prawa do takiej ochrony.\r\n- wie, \u017ce komunikacja elektroniczna wi\u0105\u017ce si\u0119 z gromadzeniem i przechowywaniem informacji o u\u017cytkownikach.\r\n- umie rozpozna\u0107 sytuacje wymuszania danych osobowych.\r\n- umie odm\u00f3wi\u0107 podania danych osobowych.",
- "competence": 26,
- "level": 7
- }
- },
- {
- "pk": 233,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co to jest polityka prywatno\u015bci.\r\n- wie, co to s\u0105 dane wra\u017cliwe.\r\n- wie, co to jest GIODO.\r\n- wie o istnieniu obowi\u0105zk\u00f3w informacyjnych administrator\u00f3w danych.\r\n- wie, co to jest powierzenie przetwarzania danych.\r\n- wie, czego dotyczy ustawa o ochronie danych osobowych.\r\n- umie opisa\u0107 obowi\u0105zki dostawc\u00f3w us\u0142ug w zakresie ochrony danych osobowych.\r\n- umie opisa\u0107 problemy zwi\u0105zane z ochron\u0105 danych.\r\n- umie w praktyce chroni\u0107 prywatno\u015b\u0107 swoj\u0105 i innych.",
- "competence": 26,
- "level": 8
- }
- },
- {
- "pk": 234,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, jakie dane i jak d\u0142ugo gromadzi i przechowuje operator us\u0142ugi.\r\n- umie opisa\u0107 tre\u015b\u0107 ustawy o ochronie danych osobowych.\r\n- umie stosowa\u0107 zasady ochrony we w\u0142asnych publikacjach i us\u0142ugach.\r\n- umie zwr\u00f3ci\u0107 si\u0119 do GIODO z pro\u015bb\u0105 o interwencj\u0119 lub interpretacj\u0119.\r\n- umie sprawdzi\u0107 w\u0142asne dane w zbiorach, w kt\u00f3rych s\u0105 zawarte.\r\n- umie zarejestrowa\u0107 zbi\u00f3r i sprawdzi\u0107, czy dany zbi\u00f3r jest zarejestrowany.\r\n- rozumie polityk\u0119 prywatno\u015bci firm, z kt\u00f3rymi zawiera umowy.",
- "competence": 26,
- "level": 9
- }
- },
- {
- "pk": 262,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 r\u00f3\u017cne rodzaje medi\u00f3w i umie to pokaza\u0107 na przyk\u0142adach;\r\nnp. umie wymieni\u0107: pismo dla dzieci do czytania, audycja telewizyjna do ogl\u0105dania, audiobook do s\u0142uchania, gra w internecie do grania itp.\r\n- wie, \u017ce media maj\u0105 odbiorc\u00f3w / u\u017cytkownik\u00f3w.",
- "competence": 30,
- "level": 1
- }
- },
- {
- "pk": 263,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce media tworz\u0105 wraz z ich u\u017cytkownikami tzw. rynek medi\u00f3w.\r\n- umie nazwa\u0107 tradycyjne rodzaje medi\u00f3w: prasa, radio, telewizja.\r\n- wie i rozumie, \u017ce internet to medium innego rodzaju.",
- "competence": 30,
- "level": 2
- }
- },
- {
- "pk": 264,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 r\u00f3\u017cne typologie medi\u00f3w: np. media tradycyjne i tzw. nowe media, mass-media i media spo\u0142eczno\u015bciowe; prasa drukowana i media elektroniczne; media publiczne i media prywatne.\r\n- umie wskaza\u0107 podstawowe r\u00f3\u017cnice mi\u0119dzy tymi typami medi\u00f3w.\r\n- wie, \u017ce w obszarze medi\u00f3w dzia\u0142aj\u0105 przedsi\u0119biorstwa: kto\u015b tam pracuje i w ten spos\u00f3b zarabia na \u017cycie, kto\u015b tym zarz\u0105dza.\r\n- rozumie \u00a0zale\u017cno\u015b\u0107 mi\u0119dzy mediami i ich u\u017cytkownikami (relacja wymiany, uczestnictwa i wsp\u00f3\u0142tworzenia).",
- "competence": 30,
- "level": 3
- }
- },
- {
- "pk": 265,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce rynek medi\u00f3w tworz\u0105 nie tylko media i ich u\u017cytkownicy, ale te\u017c instytucje publiczne powo\u0142ane do nadzoru i kontroli rynku.\r\n- wie, \u017ce przedsi\u0119biorstwa medialne maj\u0105: w\u0142a\u015bciciela, organ zarz\u0105dczy i okre\u015blon\u0105 form\u0119 prawn\u0105; maj\u0105 te\u017c okre\u015blon\u0105 lini\u0119 redakcyjn\u0105.",
- "competence": 30,
- "level": 4
- }
- },
- {
- "pk": 266,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie rozr\u00f3\u017cni\u0107 media publiczne od medi\u00f3w prywatnych i wie, jakie s\u0105 podstawowe konsekwencje tego podzia\u0142u; np. obowi\u0105zek uzyskania koncesji lub jego brak, r\u00f3\u017cnice w formie finansowania.\r\n- wie, \u017ce na rynku medi\u00f3w wyst\u0119puje zjawisko konkurencji i koncentracji.\r\n- umie wskaza\u0107 r\u00f3\u017cnice mi\u0119dzy mediami tradycyjnymi a nowymi mediami w zakresie regulacji\r\n- rozumie, \u017ce bariery wej\u015bcia na rynek s\u0105 tak\u017ce tworzone przez regulatora, np. wie, \u017ce opr\u00f3cz wymog\u00f3w kapita\u0142owych potrzebne jest zdobycie koncesji lub rejestracja.",
- "competence": 30,
- "level": 5
- }
- },
- {
- "pk": 267,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest pluralizm medi\u00f3w i rozumie, dlaczego nale\u017cy chroni\u0107 konkurencj\u0119 na rynku medi\u00f3w.\r\n- wie o istnieniu nieformalnej ekonomii medi\u00f3w, b\u0119d\u0105cej w du\u017cej cz\u0119\u015bci lub w ca\u0142o\u015bci poza zasi\u0119giem polityki pa\u0144stwa, jego regulacji i opodatkowania.\r\n- umie poda\u0107 przyk\u0142ady nieformalnej ekonomii medi\u00f3w; np. sie\u0107 wymiany plik\u00f3w.\r\n- wie, czym jest konsolidacja i koncentracja w\u0142asno\u015bci medi\u00f3w; rozumie ich podstawowe przyczyny i umie dostrzec efekty \u00a0(cho\u0107 nie musi zna\u0107 ich nazewnictwa; np. efekt skali, zakresu, czy synergii.\r\n- umie rozr\u00f3\u017cni\u0107: koncentracj\u0119 pionow\u0105, (wydawca gazety kupuje / tworzy radio) \u00a0od koncentracji poziomej (radio kupuje inne radio); np. wie, \u017ce Eurozet, kt\u00f3ry w 2008 r. naby\u0142 Radio J\u00f3zef to przyk\u0142ad koncentracji poziomej, a sp\u00f3\u0142ka Agora, do kt\u00f3rej nale\u017c\u0105 gazety, radio, portale internetowe i platformy blogerskie \u2013 koncentracji pionowej.\r\n- rozumie funkcjonowanie \u0142a\u0144cucha warto\u015bci w mediach i wie, \u017ce \u017caden z element\u00f3w nie pe\u0142ni w nim nadrz\u0119dnej roli (r\u00f3\u017cne etapy procesu s\u0105 wobec siebie komplementarne i \u201ewzajemnie si\u0119 karmi\u0105\u201d).",
- "competence": 30,
- "level": 6
- }
- },
- {
- "pk": 268,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce istniej\u0105 r\u00f3\u017cne rodzaje medi\u00f3w (radio, TV, internet, prasa).\r\n- wie, czym jest abonament radiowo-telewizyjny.\r\n- umie odr\u00f3\u017cni\u0107 media publiczne od prywatnych.\r\n- wie, \u017ce rynek medi\u00f3w jest regulowany.",
- "competence": 30,
- "level": 7
- }
- },
- {
- "pk": 269,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce prywatna stacja radiowa lub telewizyjna musi ubiega\u0107 si\u0119 o koncesj\u0119 na nadawanie, a publiczne stacje nie maj\u0105 tego obowi\u0105zku.\r\n- wie, \u017ce na rynku wyst\u0119puje zjawisko konkurencji i koncentracji i umie wskaza\u0107 ich przyk\u0142ady.\r\n- wie, \u017ce rynek medialny sk\u0142ada si\u0119 z medi\u00f3w, ich u\u017cytkownik\u00f3w oraz z otoczenia regulacyjnego.\r\n- umie wskaza\u0107 regulator\u00f3w medi\u00f3w (obecnie: KRRiT, UKE) oraz cia\u0142a samoreguluj\u0105ce (samorz\u0105dy bran\u017cowe, komisje etyki).",
- "competence": 30,
- "level": 8
- }
- },
- {
- "pk": 270,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie konsekwencje konsolidacji i koncentracji medi\u00f3w.\r\n- rozumie r\u00f3\u017cnice mi\u0119dzy koncentracj\u0105 poziom\u0105 i pionow\u0105.\r\n- umie wskaza\u0107 bariery wej\u015bcia na rynek medi\u00f3w.",
- "competence": 30,
- "level": 9
- }
- },
- {
- "pk": 271,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- intuicyjnie wie, czym jest informacja;\r\nnp. wie, na jakim kanale znajdzie ulubion\u0105 bajk\u0119, albo \u017ce ta bajka jest nadawana o takiej, a nie o innej porze dnia.\r\n- umie dzieli\u0107 si\u0119 informacjami z innymi.",
- "competence": 31,
- "level": 1
- }
- },
- {
- "pk": 272,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce informacj\u0119 mo\u017cna przekaza\u0107 bezpo\u015brednio lub po\u015brednio. Tym drugim zajmuj\u0105 si\u0119 media (prasa, media elektroniczne).\r\n- wie, \u017ce w j\u0119zyku medi\u00f3w informacje to: wydarzenia / newsy / wiadomo\u015bci.\r\n- rozumie poj\u0119cie reklamy. Wie, \u017ce s\u0105 komunikaty perswazyjne i informacyjne.",
- "competence": 31,
- "level": 2
- }
- },
- {
- "pk": 273,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, \u017ce informacja ma sw\u00f3j kontekst, kt\u00f3ry decyduje, czy mamy do czynienia z przekazem perswazyjnym, czy czysto informacyjnym.\r\n- umie rozr\u00f3\u017cni\u0107 reklam\u0119 od przekazu informacyjnego.\r\n- wie, \u017ce r\u00f3wnie\u017c reklama zawiera element informacyjny, ale jest on podporz\u0105dkowany celowi perswazyjnemu.",
- "competence": 31,
- "level": 3
- }
- },
- {
- "pk": 274,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce informacja to dobro.\r\n- wie, \u017ce nie ka\u017cdy ma do niej dost\u0119p.\r\n- zna poj\u0119cie asymetrii informacji.\r\n- wie, \u017ce w cyfrowym \u015bwiecie informacja nie tylko nie traci na znaczeniu, ale zyskuje, tyle, \u017ce zmienia si\u0119 jej ekonomika (maleje / zanika asymetria informacyjna).\r\n- wie, \u017ce tworzenie informacji, jak r\u00f3wnie\u017c jej przekazywanie, niesie za sob\u0105 koszty. Te koszty nie s\u0105 dostrzegane przez bezpo\u015brednich odbiorc\u00f3w (czytelnik\u00f3w, s\u0142uchaczy, widz\u00f3w), bo ponosz\u0105 je np. producenci.\r\n- wie, \u017ce koszt wytworzenia danego dobra nie jest r\u00f3wnoznaczny z jego warto\u015bci\u0105 ani cen\u0105.\r\n- wie o istnieniu ekonomii daru i umie rozpozna\u0107 jej elementy w relacjach dotycz\u0105cych medi\u00f3w.\r\n- wie, \u017ce jedn\u0105 z zasad biznesu w sieci jest ekonomia uwagi i umie pokaza\u0107 ten mechanizm; np. na przyk\u0142adzie historii wyszukiwania w Google.\r\n- wie, \u017ce istnieje prawo w\u0142asno\u015bci intelektualnej (w tym w szczeg\u00f3lno\u015bci prawo autorskie) i wie, \u017ce przestrzeganie jego zasad ma wp\u0142yw na ekonomiczn\u0105 warto\u015b\u0107 oraz dost\u0119pno\u015b\u0107 danego dobra.\r\n- rozumie, \u017ce cena jest warto\u015bci\u0105 umown\u0105 \u2013 sprzedawca proponuje cen\u0119, a nabywca j\u0105 akceptuje lub odrzuca.",
- "competence": 31,
- "level": 4
- }
- },
- {
- "pk": 275,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce mi\u0119dzy mediami tradycyjnymi a odbiorcami odbywa si\u0119 wymiana na poziomie ekonomicznym (w sieci \u2013 na poziomie ekonomii uwagi), cho\u0107 odbiorca nie p\u0142aci bezpo\u015brednio za informacj\u0119, co wynika ze sposobu finansowania tych medi\u00f3w.\r\n- wie, \u017ce obowi\u0105zuj\u0105ce przepisy dot. w\u0142asno\u015bci intelektualnej mog\u0105 wp\u0142ywa\u0107 na postrzeganie informacji i cen\u0119 danego dobra np. wie, \u017ce idea nie ma w\u0142a\u015bciciela, ale zapisana na kartce papieru przez autora automatycznie podlega ochronie prawnej.\r\n- rozumie ekonomiczne i prawne konsekwencje obowi\u0105zuj\u0105cych przepis\u00f3w dotycz\u0105cych w\u0142asno\u015bci intelektualnej;\r\nnp. rozumie ograniczenie mo\u017cliwo\u015bci korzystania z prywatnej kopii filmu na DVD \u2013 mo\u017cna go ogl\u0105da\u0107 samemu w domu, ale wy\u015bwietlanie w szkole kopii bez licencji na publiczne odtwarzanie grozi konsekwencjami prawnymi i ekonomicznymi.\r\n- wie, czym jest informacja publiczna.",
- "competence": 31,
- "level": 5
- }
- },
- {
- "pk": 276,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie przeanalizowa\u0107 wp\u0142yw ustawodawstwa na polityk\u0119 informacyjn\u0105 i medialn\u0105.",
- "competence": 31,
- "level": 6
- }
- },
- {
- "pk": 277,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie kontekst informacji (umie przetwarza\u0107 informacje otrzymane za po\u015brednictwem\r\n- umie odr\u00f3\u017cni\u0107 przekaz informacyjny od reklamowego.\r\n- wie, \u017ce informacja to dobro i \u017ce cz\u0119\u015bciej si\u0119 p\u0142aci za dost\u0119p ni\u017c za sam\u0105 informacj\u0119; np. op\u0142ata za korzystanie z program\u00f3w TV w sieci kablowej.",
- "competence": 31,
- "level": 7
- }
- },
- {
- "pk": 278,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, co oznacza poj\u0119cie \u201easymetria informacji\u201d i wie, \u017ce jej znaczenie maleje w \u015brodowisku cyfrowym.\r\n- wie, \u017ce koszt wytworzenia danego dobra nie jest r\u00f3wnoznaczny z jego cen\u0105 ani warto\u015bci\u0105; np. wie \u017ce minimalny koszt wyprodukowania telefonu kom\u00f3rkowego jest inny ni\u017c jego cena rynkowa, kt\u00f3ra ulega zmianom, m.in. w promocjach cenowych.\r\n- wie, \u017ce istnieje w\u0142asno\u015b\u0107 intelektualna (w tym prawo autorskie) i rozumie jej prawne oraz ekonomiczne konsekwencje.\r\n- umie poda\u0107 przyk\u0142ady ekonomii uwagi i ekonomii daru.",
- "competence": 31,
- "level": 8
- }
- },
- {
- "pk": 279,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie, na czym w \u015brodowisku cyfrowym polega zmiana ekonomicznego uj\u0119cia \u201einformacji jako dobra\u201d.\r\n- rozumie, na czym polega ekonomia uwagi i ekonomia daru.\r\n- rozumie ekonomiczne konsekwencje przepis\u00f3w dot. w\u0142asno\u015bci intelektualnej.\r\n- wie, czym jest informacja publiczna i jak uzyska\u0107 do niej dost\u0119p.",
- "competence": 31,
- "level": 9
- }
- },
- {
- "pk": 280,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce w mediach s\u0105 reklamy; np. umie wskaza\u0107 reklamy w ulubionym pi\u015bmie albo mi\u0119dzy \u00a0bajkami w telewizji.\r\n- wie, \u017ce za dost\u0119p do medi\u00f3w si\u0119 p\u0142aci np. kupowanie gazety w kiosku.\r\n- wie, \u017ce dobra mo\u017cna nabywa\u0107 w sklepie, ale te\u017c przez internet.",
- "competence": 32,
- "level": 1
- }
- },
- {
- "pk": 281,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 takie gry sieciowe, w kt\u00f3rych podstawowa us\u0142uga jest bezp\u0142atna, ale trzeba p\u0142aci\u0107 za dodatkowe funkcjonalno\u015bci.\r\n- wie, \u017ce jako nieletni nie mo\u017ce dokonywa\u0107 samodzielnie transakcji w internecie.\r\n- umie wskaza\u0107 r\u00f3\u017cne sposoby nabywania d\u00f3br; np. sklep w galerii handlowej, sklep internetowy, aukcja.\r\n- rozumie, \u017ce za dost\u0119p do medi\u00f3w si\u0119 p\u0142aci.",
- "competence": 32,
- "level": 2
- }
- },
- {
- "pk": 282,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce s\u0105 np. takie hostingi plik\u00f3w,czy takie gry sieciowe, w kt\u00f3rych podstawowa us\u0142uga jest bezp\u0142atna, ale trzeba p\u0142aci\u0107 za dodatkowe funkcjonalno\u015bci; wie, \u017ce w \u015bwietle prawa nie \u00a0mo\u017ce dokonywa\u0107 takich p\u0142atno\u015bci.\r\n- wie, \u017ce czasem informacja o podwy\u017cszonej p\u0142atno\u015bci za skorzystanie z jakiej\u015b us\u0142ugi nie jest do\u015b\u0107 wyeksponowana i trzeba umie\u0107 j\u0105 rozkodowa\u0107: np. koszt SMS-\u00f3w w g\u0142osowaniach telewizyjnych czy regu\u0142a dla telefonicznych numer\u00f3w specjalnych, gdzie cena zakodowana jest w pierwszych cyfrach danego numeru.\r\n- wie o istnieniu ukrytych p\u0142atno\u015bci w internecie; np. w serwisie Pobieraczek.\r\n- wie, \u017ce w mediach p\u0142aci si\u0119 za dost\u0119p, a nie za tre\u015b\u0107, st\u0105d potrzeba finansowania medi\u00f3w z innych \u017ar\u00f3de\u0142; np. w TVP reklamy nie przerywaj\u0105 audycji, ale jest abonament.\r\n\r\n- wie zatem, \u017ce reklama s\u0142u\u017cy r\u00f3wnie\u017c finansowaniu medi\u00f3w.\r\n- rozumie, dlaczego nie mo\u017ce samodzielnie dokonywa\u0107 transakcji w internecie.",
- "competence": 32,
- "level": 3
- }
- },
- {
- "pk": 283,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce media dziel\u0105 si\u0119 na prywatne i publiczne ze wzgl\u0119du na spos\u00f3b ich finansowania.\r\n- wie, czym jest i do czego s\u0142u\u017cy abonament radiowo-telewizyjny.\r\n- wie, \u017ce niekt\u00f3re blogi s\u0105 sponsorowane przez firmy i umie odr\u00f3\u017cni\u0107 zach\u0119t\u0119 do zakupu danego dobra od informacji o tym dobru.",
- "competence": 32,
- "level": 4
- }
- },
- {
- "pk": 284,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce serwisy, w kt\u00f3rych sprzedaje si\u0119 tre\u015bci, to wyj\u0105tek, a nie zasada finansowania medi\u00f3w; np. wie, \u017ce w internecie mo\u017cna kupi\u0107 uprzywilejowany dost\u0119p i czas \u00a0- \u00a0abonament dot. notowa\u0144 na gie\u0142dzie.\r\n- wie, na czym polegaj\u0105 podstawowe zasady handlu w sieci i p\u0142atno\u015bci on-line; np. wie, jak dzia\u0142aj\u0105 aukcje on-line.\r\n- biegle umie pos\u0142ugiwa\u0107 si\u0119 terminami dot. nast\u0119puj\u0105cych zagadnie\u0144 finansowania medi\u00f3w i rozumie ich znaczenie oraz powi\u0105zania: przychody z reklam, dotacje, abonament.\r\n- rozumie powi\u0105zanie malej\u0105cej asymetrii informacyjnej w \u015brodowisku cyfrowym z cen\u0105 na niekt\u00f3re produkty nabywane w sieci np. rozumie wp\u0142yw wyszukiwarek internetowych, por\u00f3wnywarek cenowych i internetowych platform handlowych na obni\u017ck\u0119 mar\u017c produkt\u00f3w nabywanych w sieci.",
- "competence": 32,
- "level": 5
- }
- },
- {
- "pk": 286,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, na czym polegaj\u0105 podstawowe zasady handlu w sieci i p\u0142atno\u015bci on-line; np. wie, jak dzia\u0142aj\u0105 aukcje internetowe.\r\n- wie, \u017ce s\u0105 takie us\u0142ugi w internecie, gdzie podstawowa us\u0142uga jest bezp\u0142atna, ale trzeba p\u0142aci\u0107 za dodatkowe funkcjonalno\u015bci.\r\n- wie, \u017ce czasem us\u0142uga o podwy\u017cszonej p\u0142atno\u015bci nie jest do\u015b\u0107 wyeksponowana i trzeba umie\u0107 j\u0105 rozkodowa\u0107; np. koszt SMS-\u00f3w w g\u0142osowaniach telewizyjnych lub regu\u0142a telefonicznych numer\u00f3w specjalnych, w kt\u00f3rych cena jest zakodowana w pierwszych cyfrach danego numeru.\r\n- wie, \u017ce w mediach p\u0142aci si\u0119 za dost\u0119p, a nie za tre\u015b\u0107, st\u0105d potrzeba finansowania medi\u00f3w z innych \u017ar\u00f3de\u0142, takich jak reklama czy abonament rtv.\r\n- wie, \u017ce media dziel\u0105 si\u0119 na publiczne i prywatne ze wzgl\u0119du na spos\u00f3b finansowania.",
- "competence": 32,
- "level": 7
- }
- },
- {
- "pk": 287,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, czym jest i do czego s\u0142u\u017cy abonament rtv.\r\n- wie, \u017ce niekt\u00f3re blogi s\u0105 sponsorowane przez firmy i umie odr\u00f3\u017cni\u0107 zach\u0119t\u0119 do zakupu danego dobra od informacji o nim.\r\n- wie o ukrytych p\u0142atno\u015bciach w internecie.\r\n- umie dokonywa\u0107 bezpiecznych i skutecznych transakcji internetowych oraz rozumie zasady handlu w sieci i p\u0142atno\u015bci on-line.",
- "competence": 32,
- "level": 8
- }
- },
- {
- "pk": 288,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wskaza\u0107 \u017ar\u00f3d\u0142a presji politycznej i ekonomicznej wywieranej na media ze wzgl\u0119du na model finansowania.\r\n- rozumie, \u017ce serwisy, w kt\u00f3rych sprzedaje si\u0119 tre\u015bci, to wyj\u0105tek, a nie zasada finansowania medi\u00f3w; np. internecie mo\u017cna sprzedawa\u0107 uprzywilejowany dost\u0119p i czas",
- "competence": 32,
- "level": 9
- }
- },
- {
- "pk": 291,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce polityka medialna to og\u00f3\u0142 dzia\u0142a\u0144 zwi\u0105zanych z funkcjonowaniem medi\u00f3w (ich regulacj\u0105, nadzorem i kontrol\u0105) i umie wskaza\u0107 elementy tej polityki; np. umie wskaza\u0107 przyk\u0142ady regulacji rynku.",
- "competence": 33,
- "level": 3
- }
- },
- {
- "pk": 292,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie poda\u0107 przyk\u0142ady / elementy polityki medialnej.\r\n- umie wyja\u015bni\u0107 r\u00f3\u017cnice mi\u0119dzy mediami publicznymi a prywatnymi w zakresie kontroli i regulacji (struktura w\u0142a\u015bcicielska).",
- "competence": 33,
- "level": 4
- }
- },
- {
- "pk": 293,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- umie wyja\u015bni\u0107 poj\u0119cie polityki medialnej oraz wymieni\u0107 jej wybrane cele i narz\u0119dzia; np. \u00a0 prawo medialne i telekomunikacyjne, regulacja i otoczenie instytucjonalne.",
- "competence": 33,
- "level": 5
- }
- },
- {
- "pk": 294,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o istnieniu mi\u0119dzynarodowego wymiaru polityki medialnej; zna rol\u0119 organizacji mi\u0119dzynarodowych: UE, ITU, WTO, OECD.\r\n- umie wskaza\u0107 \u017ar\u00f3d\u0142a presji politycznej i ekonomicznej wywieranej na media ze wzgl\u0119du na model finansowania.\r\n- rozumie wp\u0142yw polityki medialnej na zjawiska natury ekonomicznej zachodz\u0105ce w mediach; np. tworzenie barier wej\u015bcia na rynek, koncentracja, finansowanie medi\u00f3w.",
- "competence": 33,
- "level": 6
- }
- },
- {
- "pk": 295,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie, \u017ce rynek medi\u00f3w podlega nadzorowi i kontroli.",
- "competence": 33,
- "level": 7
- }
- },
- {
- "pk": 296,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- wie o istnieniu nieformalnych system\u00f3w medialnych, b\u0119d\u0105cych w du\u017cej cz\u0119\u015bci lub w ca\u0142o\u015bci s\u0105 poza zasi\u0119giem polityki pa\u0144stwa.\r\n- wie o istnieniu mi\u0119dzynarodowego wymiaru polityki medialnej i umie poda\u0107 przyk\u0142ady organizacji mi\u0119dzynarodowych maj\u0105cych wp\u0142yw na ten wymiar.\r\n- umie rozpozna\u0107 elementy polityki medialnej.",
- "competence": 33,
- "level": 8
- }
- },
- {
- "pk": 297,
- "model": "curriculum.competencelevel",
- "fields": {
- "description": "- rozumie podstawowe funkcje, cele i narz\u0119dzia polityki medialnej.\r\n- umie poda\u0107 przyk\u0142ady wp\u0142ywu polityki medialnej na funkcjonowanie medi\u00f3w (spos\u00f3b ich finansowania, tworzenie nowych medi\u00f3w).",
- "competence": 33,
- "level": 9
- }
- }
-]
+++ /dev/null
-[
- {
- "pk": 1,
- "model": "curriculum.curriculumlevel",
- "fields": {
- "title": "III"
- }
- },
- {
- "pk": 2,
- "model": "curriculum.curriculumlevel",
- "fields": {
- "title": "IV"
- }
- },
- {
- "pk": 1,
- "model": "curriculum.curriculumcourse",
- "fields": {
- "accusative": "j\u0119zyk polski",
- "slug": "polski",
- "title": "J\u0119zyk polski"
- }
- },
- {
- "pk": 2,
- "model": "curriculum.curriculumcourse",
- "fields": {
- "accusative": "plastyk\u0119",
- "slug": "plastyka",
- "title": "Plastyka"
- }
- },
- {
- "pk": 3,
- "model": "curriculum.curriculumcourse",
- "fields": {
- "accusative": "wiedz\u0119 o spo\u0142ecze\u0144stwie",
- "slug": "wos",
- "title": "Wiedza o spo\u0142ecze\u0144stwie"
- }
- },
- {
- "pk": 4,
- "model": "curriculum.curriculumcourse",
- "fields": {
- "accusative": "informatyk\u0119",
- "slug": "informatyka",
- "title": "Informatyka"
- }
- },
- {
- "pk": 5,
- "model": "curriculum.curriculumcourse",
- "fields": {
- "accusative": "etyk\u0119",
- "slug": "etyka",
- "title": "Etyka"
- }
- },
- {
- "pk": 1,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 1,
- "level": 1,
- "identifier": "2012/III/POLSKI/c1",
- "type": "c",
- "title": "I. Odbi\u00f3r wypowiedzi i wykorzystanie zawartych w nich informacji."
- }
- },
- {
- "pk": 2,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 1,
- "level": 1,
- "identifier": "2012/III/POLSKI/c2",
- "type": "c",
- "title": "II. Analiza i interpretacja tekst\u00f3w kultury."
- }
- },
- {
- "pk": 3,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 1,
- "level": 1,
- "identifier": "2012/III/POLSKI/c3",
- "type": "c",
- "title": "III. Tworzenie wypowiedzi."
- }
- },
- {
- "pk": 4,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 2,
- "level": 1,
- "identifier": "2012/III/PLASTYKA/c1",
- "type": "c",
- "title": "I. Odbi\u00f3r wypowiedzi i wykorzystanie zawartych w nich informacji \u2013 percepcja sztuki."
- }
- },
- {
- "pk": 5,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 2,
- "level": 1,
- "identifier": "2012/III/PLASTYKA/c2",
- "type": "c",
- "title": "II. Tworzenie wypowiedzi \u2013 ekspresja przez sztuk\u0119."
- }
- },
- {
- "pk": 6,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 2,
- "level": 1,
- "identifier": "2012/III/PLASTYKA/c3",
- "type": "c",
- "title": "III. Analiza i interpretacja tekst\u00f3w kultury \u2013 recepcja sztuki."
- }
- },
- {
- "pk": 7,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/c1",
- "type": "c",
- "title": "I. Wykorzystanie i tworzenie informacji."
- }
- },
- {
- "pk": 8,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/c2",
- "type": "c",
- "title": "II. Rozpoznawanie i rozwi\u0105zywanie problem\u00f3w."
- }
- },
- {
- "pk": 9,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/c3",
- "type": "c",
- "title": "III. Wsp\u00f3\u0142dzia\u0142anie w sprawach publicznych."
- }
- },
- {
- "pk": 10,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/c4",
- "type": "c",
- "title": "IV. Znajomo\u015b\u0107 zasad i procedur demokracji."
- }
- },
- {
- "pk": 11,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/c5",
- "type": "c",
- "title": "V. Znajomo\u015b\u0107 podstaw ustroju Rzeczypospolitej Polskiej."
- }
- },
- {
- "pk": 12,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t1",
- "type": "t",
- "title": "Podstawowe umiej\u0119tno\u015bci \u017cycia w grupie."
- }
- },
- {
- "pk": 13,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t2",
- "type": "t",
- "title": "\u017bycie spo\u0142eczne"
- }
- },
- {
- "pk": 14,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t3",
- "type": "t",
- "title": "Wsp\u00f3\u0142czesne spo\u0142ecze\u0144stwo polskie."
- }
- },
- {
- "pk": 15,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t4",
- "type": "t",
- "title": "By\u0107 obywatelem."
- }
- },
- {
- "pk": 16,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t5",
- "type": "t",
- "title": "Udzia\u0142 obywateli w \u017cyciu publicznym"
- }
- },
- {
- "pk": 17,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t6",
- "type": "t",
- "title": "\u015arodki masowego przekazu."
- }
- },
- {
- "pk": 18,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t9",
- "type": "t",
- "title": "Patriotyzm dzisiaj."
- }
- },
- {
- "pk": 19,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t10",
- "type": "t",
- "title": "Pa\u0144stwo i w\u0142adza demokratyczna."
- }
- },
- {
- "pk": 20,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t11",
- "type": "t",
- "title": "Rzeczpospolita Polska jako demokracja konstytucyjna."
- }
- },
- {
- "pk": 21,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t24",
- "type": "t",
- "title": "Praca i przedsi\u0119biorczo\u015b\u0107."
- }
- },
- {
- "pk": 22,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t25",
- "type": "t",
- "title": "Gospodarka rynkowa."
- }
- },
- {
- "pk": 23,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 1,
- "identifier": "2012/III/WOS/t26",
- "type": "t",
- "title": "Gospodarstwo domowe."
- }
- },
- {
- "pk": 24,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 4,
- "level": 1,
- "identifier": "2012/III/INFORMATYKA/c1",
- "type": "c",
- "title": "I. Bezpieczne pos\u0142ugiwanie si\u0119 komputerem i jego oprogramowaniem, wykorzystanie sieci komputerowej; komunikowanie si\u0119 za pomoc\u0105 komputera i technologii informacyjno-komunikacyjnych."
- }
- },
- {
- "pk": 25,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 4,
- "level": 1,
- "identifier": "2012/III/INFORMATYKA/c2",
- "type": "c",
- "title": "II. Wyszukiwanie, gromadzenie i przetwarzanie informacji z r\u00f3\u017cnych \u017ar\u00f3de\u0142; opracowywanie za pomoc\u0105 komputera: rysunk\u00f3w, tekst\u00f3w, danych liczbowych, motyw\u00f3w, animacji, prezentacji multimedialnych."
- }
- },
- {
- "pk": 26,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 4,
- "level": 1,
- "identifier": "2012/III/INFORMATYKA/c5",
- "type": "c",
- "title": "V. Ocena zagro\u017ce\u0144 i ogranicze\u0144, docenianie spo\u0142ecznych aspekt\u00f3w rozwoju i zastosowa\u0144 informatyki."
- }
- },
- {
- "pk": 27,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/c1",
- "type": "c",
- "title": "I. Kszta\u0142towanie refleksyjnej postawy wobec cz\u0142owieka, jego natury, powinno\u015bci moralnych oraz wobec r\u00f3\u017cnych sytuacji \u017cyciowych."
- }
- },
- {
- "pk": 28,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/c4",
- "type": "c",
- "title": "IV. Podj\u0119cie odpowiedzialno\u015bci za siebie i innych oraz za dokonywane wybory moralne; rozstrzyganie w\u0105tpliwo\u015bci i problem\u00f3w moralnych zgodnie z przyj\u0119t\u0105 hierarchi\u0105 warto\u015bci i dobrem wsp\u00f3lnym."
- }
- },
- {
- "pk": 29,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/t1",
- "type": "t",
- "title": "Cz\u0142owiek jako osoba; natura i godno\u015b\u0107 cz\u0142owieka."
- }
- },
- {
- "pk": 30,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/t5",
- "type": "t",
- "title": "Cz\u0142owiek wobec warto\u015bci; cz\u0142owiek wobec cierpienia i \u015bmierci."
- }
- },
- {
- "pk": 31,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/t9",
- "type": "t",
- "title": "Normy i warto\u015bci demokratyczne le\u017c\u0105ce u podstaw aktywno\u015bci spo\u0142ecznej na poziomie ma\u0142ej grupy, szko\u0142y, spo\u0142eczno\u015bci lokalnej."
- }
- },
- {
- "pk": 32,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 5,
- "level": 1,
- "identifier": "2012/III/ETYKA/t11",
- "type": "t",
- "title": "Praca i jej warto\u015b\u0107 dla cz\u0142owieka, znaczenie etyki zawodowej."
- }
- },
- {
- "pk": 33,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/c4",
- "type": "c",
- "title": "IV. Znajomo\u015b\u0107 zasad i procedur demokracji."
- }
- },
- {
- "pk": 34,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/c6",
- "type": "c",
- "title": "VI. Znajomo\u015b\u0107 praw cz\u0142owieka i sposob\u00f3w ich ochrony."
- }
- },
- {
- "pk": 35,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t1",
- "type": "t",
- "title": "M\u0142ody obywatel w urz\u0119dzie."
- }
- },
- {
- "pk": 36,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t2",
- "type": "t",
- "title": "Prawo i s\u0105dy."
- }
- },
- {
- "pk": 37,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t5",
- "type": "t",
- "title": "Prawa cz\u0142owieka."
- }
- },
- {
- "pk": 38,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t6",
- "type": "t",
- "title": "Ochrona praw i wolno\u015bci."
- }
- },
- {
- "pk": 39,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t10/roz",
- "type": "t",
- "title": "Edukacja w XXI w. (zakres rozszerzony)"
- }
- },
- {
- "pk": 40,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t14/roz",
- "type": "t",
- "title": "\u015arodki masowego przekazu. (zakres rozszerzony)"
- }
- },
- {
- "pk": 41,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t15/roz",
- "type": "t",
- "title": "Demokracja \u2013 zasady i procedury. (zakres rozszerzony)"
- }
- },
- {
- "pk": 42,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t27/roz",
- "type": "t",
- "title": "Organy kontroli pa\u0144stwowej, ochrony prawa i zaufania publicznego. (zakres rozszerzony)"
- }
- },
- {
- "pk": 43,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t32/roz",
- "type": "t",
- "title": "Prawo cywilne i rodzinne. (zakres rozszerzony)"
- }
- },
- {
- "pk": 44,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 3,
- "level": 2,
- "identifier": "2012/IV/WOS/t36/roz",
- "type": "t",
- "title": "Obywatel wobec prawa. (zakres rozszerzony)"
- }
- },
- {
- "pk": 45,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 4,
- "level": 2,
- "identifier": "2012/IV/INFORMATYKA/c1",
- "type": "c",
- "title": "I. Bezpieczne pos\u0142ugiwanie si\u0119 komputerem i jego oprogramowaniem, wykorzystanie sieci komputerowej; komunikowanie si\u0119 za pomoc\u0105 komputera i technologii informacyjno-komunikacyjnych."
- }
- },
- {
- "pk": 46,
- "model": "curriculum.curriculum",
- "fields": {
- "course": 4,
- "level": 2,
- "identifier": "2012/IV/INFORMATYKA/c5",
- "type": "c",
- "title": "V. Ocena zagro\u017ce\u0144 i ogranicze\u0144, docenianie spo\u0142ecznych aspekt\u00f3w rozwoju i zastosowa\u0144 informatyki."
- }
- }
-]
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-10-18 14:01+0200\n"
-"PO-Revision-Date: 2013-02-08 13:16+0100\n"
-"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2)\n"
-
-#: models.py:9 models.py:33 models.py:68
-msgid "slug"
-msgstr ""
-
-#: models.py:10 models.py:34 models.py:69
-msgid "order"
-msgstr "kolejność"
-
-#: models.py:14
-msgid "section"
-msgstr "dział"
-
-#: models.py:15
-msgid "sections"
-msgstr "działy"
-
-#: models.py:27 models.py:63 models.py:80
-msgid "name"
-msgstr "nazwa"
-
-#: models.py:38
-msgid "competence"
-msgstr "kompetencja"
-
-#: models.py:39
-msgid "competences"
-msgstr "kompetencje"
-
-#: models.py:73
-msgid "educational level"
-msgstr "poziom edukacyjny"
-
-#: models.py:74
-msgid "educational levels"
-msgstr "poziomy edukacyjne"
-
-#: models.py:81
-msgid "group"
-msgstr "grupa"
-
-#: models.py:91
-msgid "competence on level"
-msgstr "kompetencja na poziomie"
-
-#: models.py:92
-msgid "competences on levels"
-msgstr "kompetencje na poziomach"
-
-#: models.py:101
-msgid "description"
-msgstr "opis"
-
-#: models.py:109
-msgid "curriculum level"
-msgstr "poziom w podstawie programowej"
-
-#: models.py:110
-msgid "curriculum levels"
-msgstr "poziomy w podstawie programowej"
-
-#: models.py:122
-msgid "curriculum course"
-msgstr "przedmiot w podstawie programowej"
-
-#: models.py:123
-msgid "curriculum courses"
-msgstr "przedmioty w podstawie programowej"
-
-#: models.py:141
-msgid "curriculum item"
-msgstr "pozycja w podstawie programowej"
-
-#: models.py:142
-msgid "curriculum items"
-msgstr "podstawa programowa"
-
-#: views.py:51
-msgid "You must select at least one competency from the list."
-msgstr "Proszę wybrać kompetencje z listy."
-
-#: views.py:53
-msgid "You must select at least one education level."
-msgstr "Proszę wybrać poziom edukacyjny."
-
-#: templates/curriculum/competence_list.html:8
-msgid "Media, information and digital literacy competencies catalogue"
-msgstr "Katalog kompetencji medialnych, informacyjnych i cyfrowych"
-
-#: templates/curriculum/competence_list.html:15
-msgid "Browse competencies"
-msgstr "Przeglądaj kompetencje"
-
-#: templates/curriculum/competence_list.html:15
-msgid "expand"
-msgstr "rozwiń"
-
-#: templates/curriculum/competence_list.html:18
-msgid "Education level"
-msgstr "Poziom edukacyjny"
-
-#: templates/curriculum/competence_list.html:31
-msgid "Competency categories"
-msgstr "Kategorie kompetencji"
-
-#: templates/curriculum/competence_list.html:49
-msgid "Show"
-msgstr "Pokaż"
-
-#: templates/curriculum/competence_list.html:55
-msgid "Selected competencies"
-msgstr "Wybrane kompetencje"
+++ /dev/null
-# -*- 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 'Section'
- db.create_table('curriculum_section', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ))
- db.send_create_signal('curriculum', ['Section'])
-
- # Adding model 'Competence'
- db.create_table('curriculum_competence', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Section'])),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ))
- db.send_create_signal('curriculum', ['Competence'])
-
- # Adding model 'Level'
- db.create_table('curriculum_level', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
- ('order', self.gf('django.db.models.fields.IntegerField')()),
- ))
- db.send_create_signal('curriculum', ['Level'])
-
- # Adding model 'CompetenceLevel'
- db.create_table('curriculum_competencelevel', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('competence', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Competence'])),
- ('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.Level'])),
- ('description', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('curriculum', ['CompetenceLevel'])
-
-
- def backwards(self, orm):
- # Deleting model 'Section'
- db.delete_table('curriculum_section')
-
- # Deleting model 'Competence'
- db.delete_table('curriculum_competence')
-
- # Deleting model 'Level'
- db.delete_table('curriculum_level')
-
- # Deleting model 'CompetenceLevel'
- db.delete_table('curriculum_competencelevel')
-
-
- models = {
- 'curriculum.competence': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Level.group'
- db.add_column('curriculum_level', 'group',
- self.gf('django.db.models.fields.CharField')(default='', max_length=255),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Level.group'
- db.delete_column('curriculum_level', 'group')
-
-
- models = {
- 'curriculum.competence': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Level.slug'
- db.alter_column('curriculum_level', 'slug', self.gf('django.db.models.fields.CharField')(max_length=255))
- # Removing index on 'Level', fields ['slug']
- db.delete_index('curriculum_level', ['slug'])
-
-
- def backwards(self, orm):
- # Adding index on 'Level', fields ['slug']
- db.create_index('curriculum_level', ['slug'])
-
-
- # Changing field 'Level.slug'
- db.alter_column('curriculum_level', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=50))
-
- models = {
- 'curriculum.competence': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Curriculum'
- db.create_table('curriculum_curriculum', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('identifier', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('course', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.CurriculumCourse'])),
- ('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['curriculum.CurriculumLevel'])),
- ('type', self.gf('django.db.models.fields.CharField')(max_length=16)),
- ))
- db.send_create_signal('curriculum', ['Curriculum'])
-
- # Adding model 'CurriculumLevel'
- db.create_table('curriculum_curriculumlevel', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=16, db_index=True)),
- ))
- db.send_create_signal('curriculum', ['CurriculumLevel'])
-
- # Adding model 'CurriculumCourse'
- db.create_table('curriculum_curriculumcourse', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
- ))
- db.send_create_signal('curriculum', ['CurriculumCourse'])
-
-
- def backwards(self, orm):
- # Deleting model 'Curriculum'
- db.delete_table('curriculum_curriculum')
-
- # Deleting model 'CurriculumLevel'
- db.delete_table('curriculum_curriculumlevel')
-
- # Deleting model 'CurriculumCourse'
- db.delete_table('curriculum_curriculumcourse')
-
-
- models = {
- 'curriculum.competence': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
- },
- 'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.CurriculumCourse']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- 'curriculum.curriculumcourse': {
- 'Meta': {'object_name': 'CurriculumCourse'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'CurriculumCourse.accusative'
- db.add_column('curriculum_curriculumcourse', 'accusative',
- self.gf('django.db.models.fields.CharField')(default='', max_length=255),
- keep_default=False)
-
- if not db.dry_run:
- orm.CurriculumCourse.objects.all().update(accusative=models.F('title'))
-
-
- def backwards(self, orm):
- # Deleting field 'CurriculumCourse.accusative'
- db.delete_column('curriculum_curriculumcourse', 'accusative')
-
-
- models = {
- 'curriculum.competence': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Competence'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- 'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.Level']"})
- },
- 'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.CurriculumCourse']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- 'curriculum.curriculumcourse': {
- 'Meta': {'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- 'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
+++ /dev/null
-# -*- 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 'CompetenceLevel.description_pl'
- db.add_column(u'curriculum_competencelevel', 'description_pl',
- self.gf('django.db.models.fields.TextField')(null=True),
- keep_default=False)
-
- # Adding field 'CompetenceLevel.description_en'
- db.add_column(u'curriculum_competencelevel', 'description_en',
- self.gf('django.db.models.fields.TextField')(null=True),
- keep_default=False)
-
- # Adding field 'Section.name_pl'
- db.add_column(u'curriculum_section', 'name_pl',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Section.name_en'
- db.add_column(u'curriculum_section', 'name_en',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Competence.name_pl'
- db.add_column(u'curriculum_competence', 'name_pl',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Competence.name_en'
- db.add_column(u'curriculum_competence', 'name_en',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Level.name_pl'
- db.add_column(u'curriculum_level', 'name_pl',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Level.name_en'
- db.add_column(u'curriculum_level', 'name_en',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Level.group_pl'
- db.add_column(u'curriculum_level', 'group_pl',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding field 'Level.group_en'
- db.add_column(u'curriculum_level', 'group_en',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'CompetenceLevel.description_pl'
- db.delete_column(u'curriculum_competencelevel', 'description_pl')
-
- # Deleting field 'CompetenceLevel.description_en'
- db.delete_column(u'curriculum_competencelevel', 'description_en')
-
- # Deleting field 'Section.name_pl'
- db.delete_column(u'curriculum_section', 'name_pl')
-
- # Deleting field 'Section.name_en'
- db.delete_column(u'curriculum_section', 'name_en')
-
- # Deleting field 'Competence.name_pl'
- db.delete_column(u'curriculum_competence', 'name_pl')
-
- # Deleting field 'Competence.name_en'
- db.delete_column(u'curriculum_competence', 'name_en')
-
- # Deleting field 'Level.name_pl'
- db.delete_column(u'curriculum_level', 'name_pl')
-
- # Deleting field 'Level.name_en'
- db.delete_column(u'curriculum_level', 'name_en')
-
- # Deleting field 'Level.group_pl'
- db.delete_column(u'curriculum_level', 'group_pl')
-
- # Deleting field 'Level.group_en'
- db.delete_column(u'curriculum_level', 'group_en')
-
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'description_en': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'group_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- for section in orm.Section.objects.all():
- section.name_pl = section.name_en = section.name
- section.save()
- for competence in orm.Competence.objects.all():
- competence.name_pl = competence.name_en = competence.name
- competence.save()
- for level in orm.Level.objects.all():
- level.name_pl = level.name_en = level.name
- level.group_pl = level.group_en = level.group
- level.save()
- for competence_level in orm.CompetenceLevel.objects.all():
- competence_level.description_pl = competence_level.description_en = competence_level.description
- competence_level.save()
-
- def backwards(self, orm):
- raise RuntimeError("Cannot reverse this migration.")
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description': ('django.db.models.fields.TextField', [], {}),
- 'description_en': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'group_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
- symmetrical = True
+++ /dev/null
-# -*- 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 field 'CompetenceLevel.description'
- db.delete_column(u'curriculum_competencelevel', 'description')
-
- # Deleting field 'Section.name'
- db.delete_column(u'curriculum_section', 'name')
-
- # Deleting field 'Competence.name'
- db.delete_column(u'curriculum_competence', 'name')
-
- # Deleting field 'Level.group'
- db.delete_column(u'curriculum_level', 'group')
-
- # Deleting field 'Level.name'
- db.delete_column(u'curriculum_level', 'name')
-
-
- def backwards(self, orm):
-
- # User chose to not deal with backwards NULL issues for 'CompetenceLevel.description'
- raise RuntimeError("Cannot reverse this migration. 'CompetenceLevel.description' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Section.name'
- raise RuntimeError("Cannot reverse this migration. 'Section.name' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Competence.name'
- raise RuntimeError("Cannot reverse this migration. 'Competence.name' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Level.group'
- raise RuntimeError("Cannot reverse this migration. 'Level.group' and its values cannot be restored.")
-
- # User chose to not deal with backwards NULL issues for 'Level.name'
- raise RuntimeError("Cannot reverse this migration. 'Level.name' and its values cannot be restored.")
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'CompetenceLevel.description_en'
- db.alter_column(u'curriculum_competencelevel', 'description_en', self.gf('django.db.models.fields.TextField')())
-
- # Changing field 'CompetenceLevel.description_pl'
- db.alter_column(u'curriculum_competencelevel', 'description_pl', self.gf('django.db.models.fields.TextField')())
-
- # Changing field 'Section.name_en'
- db.alter_column(u'curriculum_section', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Section.name_pl'
- db.alter_column(u'curriculum_section', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Competence.name_pl'
- db.alter_column(u'curriculum_competence', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Competence.name_en'
- db.alter_column(u'curriculum_competence', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Level.name_pl'
- db.alter_column(u'curriculum_level', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Level.group_pl'
- db.alter_column(u'curriculum_level', 'group_pl', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Level.group_en'
- db.alter_column(u'curriculum_level', 'group_en', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- # Changing field 'Level.name_en'
- db.alter_column(u'curriculum_level', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255))
-
- def backwards(self, orm):
-
- # Changing field 'CompetenceLevel.description_en'
- db.alter_column(u'curriculum_competencelevel', 'description_en', self.gf('django.db.models.fields.TextField')(null=True))
-
- # Changing field 'CompetenceLevel.description_pl'
- db.alter_column(u'curriculum_competencelevel', 'description_pl', self.gf('django.db.models.fields.TextField')(null=True))
-
- # Changing field 'Section.name_en'
- db.alter_column(u'curriculum_section', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Section.name_pl'
- db.alter_column(u'curriculum_section', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Competence.name_pl'
- db.alter_column(u'curriculum_competence', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Competence.name_en'
- db.alter_column(u'curriculum_competence', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Level.name_pl'
- db.alter_column(u'curriculum_level', 'name_pl', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Level.group_pl'
- db.alter_column(u'curriculum_level', 'group_pl', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Level.group_en'
- db.alter_column(u'curriculum_level', 'group_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- # Changing field 'Level.name_en'
- db.alter_column(u'curriculum_level', 'name_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Level.meta_name'
- db.add_column(u'curriculum_level', 'meta_name',
- self.gf('django.db.models.fields.CharField')(default=' ', max_length=255),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Level.meta_name'
- db.delete_column(u'curriculum_level', 'meta_name')
-
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'meta_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- "Write your forwards methods here."
- orm.Level.objects.all().update(meta_name=models.F('slug'))
-
- def backwards(self, orm):
- "Write your backwards methods here."
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'meta_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
- symmetrical = True
+++ /dev/null
-# -*- 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 'Level', fields ['meta_name']
- db.create_unique(u'curriculum_level', ['meta_name'])
-
- # Adding unique constraint on 'Level', fields ['slug']
- db.create_unique(u'curriculum_level', ['slug'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Level', fields ['slug']
- db.delete_unique(u'curriculum_level', ['slug'])
-
- # Removing unique constraint on 'Level', fields ['meta_name']
- db.delete_unique(u'curriculum_level', ['meta_name'])
-
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'meta_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- 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 'Level.package'
- db.add_column(u'curriculum_level', 'package',
- self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Level.student_package'
- db.add_column(u'curriculum_level', 'student_package',
- self.gf('django.db.models.fields.files.FileField')(max_length=255, null=True, blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Level.package'
- db.delete_column(u'curriculum_level', 'package')
-
- # Deleting field 'Level.student_package'
- db.delete_column(u'curriculum_level', 'student_package')
-
-
- models = {
- u'curriculum.competence': {
- 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- },
- u'curriculum.competencelevel': {
- 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
- 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
- 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
- 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
- },
- u'curriculum.curriculum': {
- 'Meta': {'object_name': 'Curriculum'},
- 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.curriculumlevel': {
- 'Meta': {'object_name': 'CurriculumLevel'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'meta_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'curriculum.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['curriculum']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8
-import re
-from django.core.urlresolvers import reverse
-from django.db import models
-from django.utils.translation import ugettext_lazy as _, get_language
-from fnpdjango.storage import BofhFileSystemStorage
-from fnpdjango.utils.models.translation import add_translatable
-
-bofh_storage = BofhFileSystemStorage()
-
-
-class Section(models.Model):
- slug = models.SlugField(_('slug'))
- order = models.IntegerField(_('order'))
-
- class Meta:
- ordering = ['order']
- verbose_name = _('section')
- verbose_name_plural = _('sections')
-
- def __unicode__(self):
- return self.name
-
- def get_absolute_url(self):
- return "%s?s=%d" % (reverse("curriculum"), self.pk)
-
- def url_for_level(self, level):
- return "%s?s=%d&level=%s&d=1" % (reverse("curriculum"), self.pk, level.slug)
-
-add_translatable(Section, {
- 'name': models.CharField(_('name'), max_length=255, default='')
-})
-
-
-class Competence(models.Model):
- section = models.ForeignKey(Section)
- slug = models.SlugField(_('slug'))
- order = models.IntegerField(_('order'))
-
- class Meta:
- ordering = ['section', 'order']
- verbose_name = _('competence')
- verbose_name_plural = _('competences')
-
- def __unicode__(self):
- return self.name
-
- def get_absolute_url(self):
- return "%s?c=%d" % (reverse("curriculum"), self.pk)
-
- def for_level(self, level):
- return self.competencelevel_set.get(level=level)
-
- def url_for_level(self, level):
- return self.for_level(level).get_absolute_url()
-
- @classmethod
- def from_text(cls, text):
- """Tries to return a Competence or a Section."""
- parts = re.split(ur'[-\u2013]', text, 1)
- lookup_field_name = 'name_%s__iexact' % get_language()
- if len(parts) == 1:
- return Section.objects.get(**{lookup_field_name: text.strip()})
- else:
- return cls.objects.get(**{lookup_field_name: parts[1].strip()})
-
-add_translatable(Competence, {
- 'name': models.CharField(_('name'), max_length=255, default='')
-})
-
-
-class Level(models.Model):
- slug = models.CharField(_('slug'), max_length=255, unique=True)
- meta_name = models.CharField(_('meta name'), max_length=255, unique=True)
- order = models.IntegerField(_('order'))
- package = models.FileField(
- upload_to=lambda i, f: "curriculum/pack/edukacjamedialna_%s.zip" % i.slug,
- null=True, blank=True, max_length=255, storage=bofh_storage)
- student_package = models.FileField(
- upload_to=lambda i, f: "curriculum/pack/edukacjamedialna_%s_uczen.zip" % i.slug,
- null=True, blank=True, max_length=255, storage=bofh_storage)
-
- class Meta:
- ordering = ['order']
- verbose_name = _('educational level')
- verbose_name_plural = _('educational levels')
-
- def __unicode__(self):
- return self.name
-
- def length_course(self):
- return self.lesson_set.filter(type='course').count()
-
- def length_synthetic(self):
- return self.lesson_set.filter(type='synthetic').count()
-
- def build_package(self, student):
- from StringIO import StringIO
- import zipfile
- from django.core.files.base import ContentFile
- from catalogue.templatetags.catalogue_tags import level_box
- from catalogue.models import Lesson
-
- buff = StringIO()
- zipf = zipfile.ZipFile(buff, 'w', zipfile.ZIP_STORED)
-
- lessons = level_box(self)['lessons']
- for i, lesson in enumerate(lessons['synthetic']):
- prefix = 'Skrocony kurs/%d %s/' % (i, lesson.slug)
- lesson.add_to_zip(zipf, student, prefix)
- for c, (section, clessons) in enumerate(lessons['course'].items()):
- for i, lesson in enumerate(clessons):
- prefix = 'Pelny kurs/%d %s/%d %s/' % (c, section.slug, i, lesson.slug)
- lesson.add_to_zip(zipf, student, prefix)
- for i, lesson in enumerate(lessons['project']):
- prefix = 'Projekty/%d %s/' % (i, lesson.slug)
- lesson.add_to_zip(zipf, student, prefix)
- # Add all appendix lessons, from all levels.
- for lesson in Lesson.objects.filter(type='appendix'):
- prefix = '%s/' % lesson.slug
- lesson.add_to_zip(zipf, student, prefix)
- zipf.close()
-
- fieldname = "student_package" if student else "package"
- getattr(self, fieldname).save(None, ContentFile(buff.getvalue()))
-
- def build_packages(self):
- self.build_package(False)
- self.build_package(True)
-
-
-add_translatable(Level, {
- 'name': models.CharField(_('name'), max_length=255, default=''),
- 'group': models.CharField(_('group'), max_length=255, default='')
-})
-
-
-class CompetenceLevel(models.Model):
- competence = models.ForeignKey(Competence)
- level = models.ForeignKey(Level)
-
- class Meta:
- ordering = ['competence', 'level']
- verbose_name = _('competence on level')
- verbose_name_plural = _('competences on levels')
-
- def __unicode__(self):
- return u"%s/%s" % (self.competence, self.level)
-
- def get_absolute_url(self):
- return "%s?c=%d&level=%s&d=1" % (reverse("curriculum"), self.competence.pk, self.level.slug)
-
-add_translatable(CompetenceLevel, {
- 'description': models.TextField(_('description'), default='')
-})
-
-
-class CurriculumLevel(models.Model):
- title = models.CharField(max_length=16, db_index=True)
-
- class Meta:
- verbose_name = _("curriculum level")
- verbose_name_plural = _("curriculum levels")
-
- def __unicode__(self):
- return self.title
-
-
-class CurriculumCourse(models.Model):
- title = models.CharField(max_length=255)
- accusative = models.CharField(max_length=255)
- slug = models.CharField(max_length=255, db_index=True)
-
- class Meta:
- verbose_name = _("curriculum course")
- verbose_name_plural = _("curriculum courses")
- ordering = ['slug']
-
- def __unicode__(self):
- return self.title
-
-
-class Curriculum(models.Model):
- """Official curriculum."""
- TYPES = {'c': u'Cele kształcenia', 't': u'Treści nauczania'}
-
- identifier = models.CharField(max_length=255, db_index=True)
- title = models.CharField(max_length=255)
- course = models.ForeignKey(CurriculumCourse)
- level = models.ForeignKey(CurriculumLevel)
- type = models.CharField(max_length=16, choices=TYPES.items())
-
- class Meta:
- verbose_name = _("curriculum item")
- verbose_name_plural = _("curriculum items")
-
- def __unicode__(self):
- return self.identifier
-
- @classmethod
- def from_text(cls, identifier, title):
- m = re.match(r"^\d+/(?P<level>[^/]+)/(?P<course>[^/]+)/"
- r"(?P<type>(?:%s))[^/]+(?P<roz>/roz)?" % "|".join(cls.TYPES), identifier)
- assert m is not None, "Curriculum identifier doesn't match template."
- level, created = CurriculumLevel.objects.get_or_create(
- title=m.group('level'))
- def_title = m.group('course').title()
- course, created = CurriculumCourse.objects.get_or_create(
- slug=m.group('course').lower(),
- defaults={
- 'title': def_title,
- 'accusative': def_title,
- })
- type_ = m.group('type')
- if m.group('roz'):
- title += " (zakres rozszerzony)"
-
- try:
- curr = cls.objects.get(identifier=identifier)
- except cls.DoesNotExist:
- curr = cls(identifier=identifier)
- curr.title = title
- curr.course = course
- curr.level = level
- curr.type = type_
- curr.save()
- return curr
+++ /dev/null
-.curriculum-form {
- border: 1px solid #ddd;
- padding: 1em;
- border-radius: 0.688em;
- background: #ADAEAF;
- color: white; }
- .curriculum-form a {
- cursor: pointer; }
- .curriculum-form a:hover {
- text-decoration: underline; }
- .curriculum-form .error {
- padding-left: 1em;
- border-radius: .5em;
- background: #ed7831;
- color: white;
- font-weight: bold; }
- .curriculum-form h2 {
- margin: 0; }
- .curriculum-form h2 a {
- display: block;
- color: white; }
- .curriculum-form h2 a span {
- display: none; }
- .curriculum-form strong {
- display: inline-block;
- vertical-align: top;
- width: 12em; }
- .curriculum-form .curriculum-levels {
- display: inline-block;
- list-style: none;
- padding: 0;
- margin: 0;
- width: 40em;
- vertical-align: top; }
- .curriculum-form .curriculum-levels li {
- display: inline-block;
- width: 13em; }
- .curriculum-form .curriculum-section-toggler {
- display: none;
- color: white; }
+++ /dev/null
-$(function() {
- if (typeof(curriculum_hide_form) != "undefined") {
- $('.curriculum-form form').hide();
- $('.curriculum-form h2 a span').show();
- }
- $('.curriculum-form h2 a').click(function() {
- $('.curriculum-form form').toggle('fast');
- $('span', this).toggle();
- });
-
- /* show togglers */
- $('.curriculum-section-toggler').show();
-
- $('.curriculum-section').each(function() {
- var category = this;
-
- /* set up togglers */
- $('.curriculum-section-toggler', this).click(function() {
- $('ul', category).toggle('fast');
- });
-
- /* set up section checkboxes */
- $('.s', category).change(function() {
- if ($(this).attr('checked')) {
- $('ul input', category).attr('checked', 'checked');
- }
- else {
- $('ul input', category).removeAttr('checked');
- }
- });
-
- /* unset section checkbox on unselect single competence */
- $('ul input', category).change(function() {
- if (!$(this).attr('checked')) {
- $('.s', category).removeAttr('checked', 'checked');
- }
- });
-
- /* hide unused section details on start */
- if ($('.s', category).attr('checked') || !$('ul input[checked]', category).length)
- $('ul', category).hide();
- });
-});
+++ /dev/null
-$px: 0.0625em;
-$oranji: #ed7831;
-$ciemny: #363a3e;
-$zielony: #16a487;
-
-.curriculum-form {
- border: 1px solid #ddd;
- padding: 1em;
- border-radius: 11*$px;
- background: #ADAEAF;
- color: white;
-
- a {
- cursor: pointer;
- }
- a:hover {
- text-decoration: underline;
- }
-
- .error {
- padding-left: 1em;
- border-radius: .5em;
- background: $oranji;
- color: white;
- font-weight: bold;
-
- }
-
- h2 {
- margin: 0;
- a {
- display: block;
- color: white;
- span {display: none;}
- }
- }
-
- strong {
- display: inline-block;
- vertical-align: top;
- width: 12em;
- }
-
- .curriculum-levels {
- display: inline-block;
- list-style: none;
- padding: 0;
- margin: 0;
- width: 40em;
- vertical-align: top;
-
- li {
- display: inline-block;
- width: 13em;
- }
- }
-
- .curriculum-section-toggler {
- display: none;
- color: white;
- }
-
- .categories {
-
- }
-
-}
+++ /dev/null
-{% extends base_template %}
-
-{% block title %}{{ object }}{% endblock %}
-
-{% block body %}
-<h1>{{ object }}</h1>
-
-{% for cl in object.competencelevel_set.all %}
- <h2>{{ cl }}</h2>
- {{ cl.description|linebreaksbr }}
-{% endfor %}
-
-{% endblock %}
+++ /dev/null
-{% extends base_template %}
-{% load chunks %}
-{% load i18n %}
-
-{% block title %}{% trans 'Media, information and digital literacy competencies catalogue' %}{% endblock %}
-
-{% block body %}
-<h1>{% trans 'Media, information and digital literacy competencies catalogue' %}</h1>
-
-{% if request.LANGUAGE_CODE == 'pl' %}
- {% chunk 'katalog_kompetencji' %}
-{% endif %}
-
-<div class="curriculum-form">
-<h2><a>{% trans 'Browse competencies' %} <span>({% trans 'expand' %})</span></a></h2>
-<form>
-
-<h3>{% trans 'Education level' %}:</h3>
-{% if errors.level %}<p class="error">{{ errors.level }}</p>{% endif %}
-{% for lev_group, levels in levels.items %}
- <strong>{{ lev_group }}</strong>
- <ul class="curriculum-levels">
- {% for lev in levels %}
- <li><label><input type="radio" name="level" value="{{ lev.slug }}"
- {% if lev == level %}checked="checked"{% endif %} />
- {{ lev }}</label></li>
- {% endfor %}
- </ul>
-{% endfor %}
-
-<h3>{% trans 'Competency categories' %}:</h3>
-{% if errors.competences %}<p class="error">{{ errors.competences }}</p>{% endif %}
-<ul class="curriculum-sections">
-{% for section in sections %}
- <li class="curriculum-section">
- <label><input type="checkbox" class="s" name="s" value="{{ section.pk }}"
- {% if section.pk in sect_ids %}checked="checked"{% endif %} /> {{ section }}</label>
- <a class="curriculum-section-toggler">({% trans 'expand' %})</a>
- <ul class="competences">
- {% for competence in section.competence_set.all %}
- <li class="competence"><label><input class="c" type="checkbox" name="c" value="{{ competence.pk }}"
- {% if competence.pk in comp_ids %}checked="checked"{% endif %} />
- {{ competence }}</label></li>
- {% endfor %}
- </ul>
- </li>
-{% endfor %}
-</ul>
-<button>{% trans 'Show' %}</button>
-</form>
-</div>
-
-{% if chosen_competences %}
-
-<h2>{% trans 'Selected competencies' %} – {{ level }}</h2>
-
-{% for section, competences in chosen_competences.items %}
- <h3>{{ section }}</h3>
- {% for competence in competences %}
- <h4>{{ competence }}</h4>
- {{ competence.for_level_.description|linebreaksbr }}
- {% endfor %}
-{% endfor %}
-
-{% endif %}
-
-
-{% if request.GET.d %}
-<script type="text/javascript">
- var curriculum_hide_form = true;
-</script>
-{% endif %}
-{% endblock %}
+++ /dev/null
-{% load url_for_level from curriculum_tags %}
-{% if comps %}
- {% for competence in comps %}
- <li><a href="{{ competence|url_for_level:level }}">
- {{ competence }}</a></li>
- {% endfor %}
-{% else %}
- {% for text in texts %}
- <li>{{ text }}</li>
- {% endfor %}
-{% endif %}
-
+++ /dev/null
-{% for level, types in lessons.items %}
-{% if level.slug == "liceum" %}
- <p><strong>{{ course }}</strong>: poziom zaawansowany
- <span class="section-links"><a href="#top">wróć do spisu treści</a></span>
- </p>
-{% endif %}
-<section class="section-level section-level-{{ level.slug }}">
- {% spaceless %}
- {% for lesson_type, lesson_list in types.items %}
- <section class="section-type section-type-{{ lesson_type }}">
- {% if lesson_type == 'synthetic' %}
- <h1>Lekcje syntetyczne</h1>
- {% elif lesson_type == 'project' %}
- <h1>Projekty</h1>
- {% else %}
- <h1>Lekcje z pełnych kursów</h1>
- {% endif %}
- {% if lesson_list %}
- <ul class="section-lessons link-list">
- {% for lesson in lesson_list %}
- <li class="section-lesson">
- <a href="{{ lesson.get_absolute_url }}">{{ lesson }}{% if lesson_type == 'synthetic' %}
- <br/>(przegląd całego tematu „{{ lesson.section }}” w 45 minut)
- {% endif %}</a>
- </li>
- {% endfor %}
- </ul>
- {% else %}
- <p>(W przygotowaniu)</p>
- {% endif %}
- </section>
- {% endfor %}
- {% endspaceless %}
-</section>
-{% endfor %}
+++ /dev/null
-{% load course_box from curriculum_tags %}
-{% for course in object_list %}
- <div class="section-links">
- <a href="#top">wróć do spisu treści</a>
- </div>
- <h3 id='{{ course.slug }}'>{{ course }}</h3>
- {% course_box course %}
-{% endfor %}
+++ /dev/null
-{% url "catalogue_lessons" as lessons_url %}
-{% for level, course_list in object_list %}
-<section class="levelth" style="float: left;">{{ level }}:
-<ul class="link-list">
- {% for course in course_list %}
- <li><a href="{{ lessons_url }}#{{ level.slug }}_{{ course.slug }}">
- {% if accusative %}
- {{ course.accusative }}{% else %}
- {{ course|lower }}{% endif %}</a>
- </li>
- {% endfor %}
-</ul>
-</section>
-{% endfor %}
+++ /dev/null
-{% if currset %}
- {% for what, types in currset.items %}
- <li>
- {{ what.0 }}, {{ what.1 }} poziom edukacyjny<br/>
- {% for type, currs in types.items %}
- {{ type }}:<br>
- {% for curr in currs %}
- {{ curr.title }}<br>
- {% endfor %}
- {% endfor %}
- </li>
- {% endfor %}
-{% else %}
- {% for identifier in identifiers %}
- <li>{{ identifier }}</li>
- {% endfor %}
-{% endif %}
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django import template
-from django.utils.datastructures import SortedDict
-from ..models import Competence, Curriculum, CurriculumCourse
-from catalogue.models import Lesson
-
-register = template.Library()
-
-
-@register.inclusion_tag("curriculum/snippets/competence.html")
-def competence(texts, level):
- try:
- comps = [Competence.from_text(text) for text in texts]
- except:
- # WTF
- return {'texts': texts}
- return {
- 'comps': comps,
- 'level': level,
- }
-
-
-@register.inclusion_tag("curriculum/snippets/curriculum.html")
-def curriculum(identifiers):
- try:
- currs = [Curriculum.objects.get(identifier__iexact=identifier.replace(' ', ''))
- for identifier in identifiers]
- except Curriculum.DoesNotExist:
- return {'identifiers': identifiers}
-
- currset = SortedDict()
- for curr in currs:
- k = curr.course, curr.level
- if k not in currset:
- currset[k] = SortedDict()
- typename = Curriculum.TYPES[curr.type]
- if typename not in currset[k]:
- currset[k][typename] = []
- currset[k][typename].append(curr)
-
- return {
- 'currset': currset,
- }
-
-
-@register.filter
-def url_for_level(comp, level):
- try:
- return comp.url_for_level(level)
- except:
- # WTF
- return comp.get_absolute_url()
-
-
-@register.inclusion_tag("curriculum/snippets/course_box.html")
-def course_box(course):
- lessons = SortedDict()
- for lesson in course.lesson_set.all():
- if lesson.level not in lessons:
- newdict = SortedDict()
- newdict['synthetic'] = []
- newdict['course'] = []
- lessons[lesson.level] = newdict
- if lesson.type not in lessons[lesson.level]:
- lessons[lesson.level][lesson.type] = []
- lessons[lesson.level][lesson.type].append(lesson)
- return {
- "course": course,
- "lessons": lessons,
- }
-
-
-@register.inclusion_tag("curriculum/snippets/course_boxes.html")
-def course_boxes():
- return {'object_list': CurriculumCourse.objects.all()}
-
-
-@register.inclusion_tag("curriculum/snippets/course_boxes_toc.html")
-def course_boxes_toc(accusative=False):
- last = None, None
- object_list = []
- lessons = Lesson.curriculum_courses.through.objects\
- .select_related('lesson__level', 'curriculumcourse')\
- .order_by('lesson__level', 'curriculumcourse')
- for l in lessons:
- level, course = l.lesson.level, l.curriculumcourse
- if (level, course) == last:
- continue
- if level != last[0]:
- object_list.append((level, []))
- object_list[-1][1].append(course)
- last = (level, course)
- return {
- 'object_list': object_list,
- 'accusative': accusative,
- }
+++ /dev/null
-# -*- coding: utf-8 -*-
-"""
-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)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, url
-from .views import CompetenceDetailView, CompetencesView
-
-urlpatterns = patterns(
- '',
- url(r'^$', CompetencesView.as_view(), name='curriculum'),
- url(r'^(?P<slug>[^/]+)/$', CompetenceDetailView.as_view(), name='curriculum_competence'),
-)
+++ /dev/null
-# -*- coding: utf-8
-from django.db import models
-from django.views.generic import DetailView, ListView
-from django.utils.datastructures import SortedDict
-from django.utils.translation import ugettext as _
-
-from .models import Competence, Section, Level, CompetenceLevel
-
-
-class CompetenceDetailView(DetailView):
- model = Competence
-
-
-class CompetencesView(ListView):
- model = Competence
-
- def get_context_data(self, **kwargs):
- context = super(CompetencesView, self).get_context_data(**kwargs)
-
- context['levels'] = SortedDict()
- for level in Level.objects.all():
- context['levels'].setdefault(level.group, []).append(level)
-
- context['sections'] = Section.objects.all()
-
- errors = {}
-
- try:
- level = Level.objects.get(slug=self.request.GET.get('level'))
- except Level.DoesNotExist:
- level = None
- context['level'] = level
-
- comp_ids = set()
- for c in self.request.GET.getlist('c'):
- try:
- comp_ids.add(int(c))
- except ValueError:
- pass
- context['comp_ids'] = comp_ids
- sect_ids = set()
- for c in self.request.GET.getlist('s'):
- try:
- sect_ids.add(int(c))
- except ValueError:
- pass
- context['sect_ids'] = sect_ids
-
- if not (comp_ids or sect_ids):
- if level:
- errors["competences"] = _('You must select at least one competency from the list.')
- elif level is None:
- errors["level"] = _('You must select at least one education level.')
- else:
- chosen_competences = SortedDict()
- for competence in Competence.objects.filter(
- models.Q(pk__in=comp_ids) | models.Q(section__pk__in=sect_ids)):
- try:
- competence.for_level_ = competence.for_level(level)
- except CompetenceLevel.DoesNotExist:
- pass
- chosen_competences.setdefault(competence.section, []).append(competence)
- context['chosen_competences'] = chosen_competences
-
- context["errors"] = errors
- return context
+++ /dev/null
-# -*- coding: utf-8 -*-
-def base_template(request):
- base_template = 'base_mil.html' if request.META.get('HTTP_HOST').startswith('katalog') else 'base.html'
- return dict(base_template = base_template)
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django import forms
-from django.utils.translation import ugettext_lazy as _
-from pybb.forms import EditProfileForm
-from pybb import util
-
-
-class AvatarlessEditProfileForm(EditProfileForm):
- signature = forms.CharField(
- widget=forms.Textarea(attrs={'rows': 2, 'cols:': 60}),
- required=False,
- label=_('Signature')
- )
-
- class Meta:
- model = util.get_pybb_profile_model()
- fields = ['signature', 'time_zone', 'language', 'show_signatures']
+++ /dev/null
-# -*- coding: utf-8 -*-
-from pybb.permissions import DefaultPermissionHandler
-
-
-class ForumPermissionHandler(DefaultPermissionHandler):
- def may_post_as_admin(self, user):
- """ return True if `user` may post as admin """
- return False
-
- def may_create_topic(self, user, forum):
- """ return True if `user` is allowed to create a new topic in `forum` """
- return user.is_authenticated()
-
- def may_create_post(self, user, topic):
- """ return True if `user` is allowed to create a new post in `topic` """
-
- if topic.forum.hidden and (not user.is_staff):
- # if topic is hidden, only staff may post
- return False
-
- if topic.closed and (not user.is_staff):
- # if topic is closed, only staff may post
- return False
-
- return user.is_authenticated()
+++ /dev/null
-# Translations template for PROJECT.
-# Copyright (C) 2013 ORGANIZATION
-# This file is distributed under the same license as the PROJECT project.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2013-08-09 11:40+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
-
-#: pybb/admin.py:40
-#: pybb/admin.py:66
-#: pybb/admin.py:94
-#: pybb/admin.py:116
-msgid "Additional options"
-msgstr ""
-
-#: pybb/admin.py:99
-#: pybb/models.py:254
-msgid "Message"
-msgstr ""
-
-#: pybb/admin.py:130
-msgid "View post"
-msgstr ""
-
-#: pybb/admin.py:135
-msgid "Edit post"
-msgstr ""
-
-#: pybb/feeds.py:25
-#: pybb/feeds.py:26
-#: pybb/templates/pybb/base.html:12
-msgid "Latest posts on forum"
-msgstr ""
-
-#: pybb/feeds.py:35
-#: pybb/feeds.py:36
-#: pybb/templates/pybb/base.html:13
-msgid "Latest topics on forum"
-msgstr ""
-
-#: pybb/forms.py:27
-msgid "Attachment is too big"
-msgstr ""
-
-#: pybb/forms.py:47
-#, python-format
-msgid "You cant add more than %s answers for poll"
-msgstr ""
-
-#: pybb/forms.py:49
-msgid "Add two or more answers for this poll"
-msgstr ""
-
-#: pybb/forms.py:109
-msgid "Polls question is required when adding a poll"
-msgstr ""
-
-#: pybb/forms.py:192
-#, python-format
-msgid "Avatar is too large, max size: %s bytes"
-msgstr ""
-
-#: pybb/models.py:68
-#: pybb/models.py:99
-msgid "Name"
-msgstr ""
-
-#: pybb/models.py:69
-#: pybb/models.py:100
-msgid "Position"
-msgstr ""
-
-#: pybb/models.py:70
-#: pybb/models.py:106
-#: pybb/templates/pybb/category.html:5
-#: pybb/templates/pybb/category.html:28
-msgid "Hidden"
-msgstr ""
-
-#: pybb/models.py:71
-msgid "If checked, this category will be visible only for staff"
-msgstr ""
-
-#: pybb/models.py:76
-#: pybb/models.py:98
-msgid "Category"
-msgstr ""
-
-#: pybb/models.py:77
-msgid "Categories"
-msgstr ""
-
-#: pybb/models.py:101
-msgid "Description"
-msgstr ""
-
-#: pybb/models.py:102
-msgid "Moderators"
-msgstr ""
-
-#: pybb/models.py:103
-#: pybb/models.py:165
-#: pybb/models.py:270
-msgid "Updated"
-msgstr ""
-
-#: pybb/models.py:104
-#: pybb/models.py:172
-#: pybb/models.py:357
-msgid "Post count"
-msgstr ""
-
-#: pybb/models.py:105
-msgid "Topic count"
-msgstr ""
-
-#: pybb/models.py:108
-msgid "Headline"
-msgstr ""
-
-#: pybb/models.py:112
-#: pybb/models.py:162
-#: pybb/templates/pybb/category.html:10
-msgid "Forum"
-msgstr ""
-
-#: pybb/models.py:113
-msgid "Forums"
-msgstr ""
-
-#: pybb/models.py:157
-msgid "None"
-msgstr ""
-
-#: pybb/models.py:158
-msgid "Single answer"
-msgstr ""
-
-#: pybb/models.py:159
-msgid "Multiple answers"
-msgstr ""
-
-#: pybb/models.py:163
-msgid "Subject"
-msgstr ""
-
-#: pybb/models.py:164
-#: pybb/models.py:269
-msgid "Created"
-msgstr ""
-
-#: pybb/models.py:166
-#: pybb/models.py:268
-#: pybb/models.py:381
-#: pybb/models.py:512
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
-msgid "User"
-msgstr ""
-
-#: pybb/models.py:167
-msgid "Views count"
-msgstr ""
-
-#: pybb/models.py:168
-#: pybb/templates/pybb/topic_list.html:27
-msgid "Sticky"
-msgstr ""
-
-#: pybb/models.py:169
-#: pybb/templates/pybb/topic_list.html:28
-msgid "Closed"
-msgstr ""
-
-#: pybb/models.py:170
-#: pybb/templates/pybb/topic.html:92
-msgid "Subscribers"
-msgstr ""
-
-#: pybb/models.py:174
-#: pybb/models.py:272
-msgid "On moderation"
-msgstr ""
-
-#: pybb/models.py:175
-msgid "Poll type"
-msgstr ""
-
-#: pybb/models.py:176
-msgid "Poll question"
-msgstr ""
-
-#: pybb/models.py:180
-#: pybb/models.py:267
-#: pybb/models.py:489
-#: pybb/templates/pybb/topic_list.html:7
-msgid "Topic"
-msgstr ""
-
-#: pybb/models.py:181
-#: pybb/templates/pybb/category.html:13
-msgid "Topics"
-msgstr ""
-
-#: pybb/models.py:255
-msgid "HTML version"
-msgstr ""
-
-#: pybb/models.py:256
-msgid "Text version"
-msgstr ""
-
-#: pybb/models.py:271
-msgid "User IP"
-msgstr ""
-
-#: pybb/models.py:276
-#: pybb/models.py:397
-msgid "Post"
-msgstr ""
-
-#: pybb/models.py:277
-#: pybb/templates/pybb/category.html:16
-#: pybb/templates/pybb/topic_list.html:10
-msgid "Posts"
-msgstr ""
-
-#: pybb/models.py:346
-msgid "Signature"
-msgstr ""
-
-#: pybb/models.py:348
-msgid "Signature HTML Version"
-msgstr ""
-
-#: pybb/models.py:350
-msgid "Time zone"
-msgstr ""
-
-#: pybb/models.py:352
-msgid "Language"
-msgstr ""
-
-#: pybb/models.py:355
-msgid "Show signatures"
-msgstr ""
-
-#: pybb/models.py:358
-msgid "Avatar"
-msgstr ""
-
-#: pybb/models.py:360
-msgid "Automatically subscribe"
-msgstr ""
-
-#: pybb/models.py:361
-msgid "Automatically subscribe to topics that you answer"
-msgstr ""
-
-#: pybb/models.py:384
-msgid "Profile"
-msgstr ""
-
-#: pybb/models.py:385
-msgid "Profiles"
-msgstr ""
-
-#: pybb/models.py:394
-#: pybb/templates/pybb/post_template.html:73
-msgid "Attachment"
-msgstr ""
-
-#: pybb/models.py:395
-msgid "Attachments"
-msgstr ""
-
-#: pybb/models.py:398
-msgid "Size"
-msgstr ""
-
-#: pybb/models.py:399
-msgid "File"
-msgstr ""
-
-#: pybb/models.py:447
-msgid "Topic read tracker"
-msgstr ""
-
-#: pybb/models.py:448
-msgid "Topic read trackers"
-msgstr ""
-
-#: pybb/models.py:483
-msgid "Forum read tracker"
-msgstr ""
-
-#: pybb/models.py:484
-msgid "Forum read trackers"
-msgstr ""
-
-#: pybb/models.py:490
-msgid "Text"
-msgstr ""
-
-#: pybb/models.py:493
-#: pybb/models.py:511
-msgid "Poll answer"
-msgstr ""
-
-#: pybb/models.py:494
-msgid "Polls answers"
-msgstr ""
-
-#: pybb/models.py:516
-msgid "Poll answer user"
-msgstr ""
-
-#: pybb/models.py:517
-msgid "Polls answers users"
-msgstr ""
-
-#: pybb/util.py:58
-msgid "Can't get profile for anonymous user"
-msgstr ""
-
-#: pybb/views.py:648
-msgid "All forums marked as read"
-msgstr ""
-
-#: pybb/views.py:668
-msgid "User successfuly blocked"
-msgstr ""
-
-#: pybb/templates/pybb/_button_new_topic.html:2
-#: pybb/templates/pybb/add_post.html:24
-msgid "New topic"
-msgstr ""
-
-#: pybb/templates/pybb/_button_save.html:1
-msgid "Save"
-msgstr ""
-
-#: pybb/templates/pybb/_button_submit.html:1
-msgid "Submit"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:15
-msgid "Bold"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:16
-msgid "Italic"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:17
-msgid "Underline"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:18
-msgid "Stroke"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:20
-msgid "Picture"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:21
-msgid "Link"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:23
-msgid "Bulleted list"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:24
-msgid "Numeric list"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:25
-msgid "List item"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:27
-msgid "Quotes"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:28
-msgid "Code"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:30
-msgid "Clean"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:31
-msgid "Preview"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "Register"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "or"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "login"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "to create to post a reply"
-msgstr ""
-
-#: pybb/templates/pybb/add_post.html:24
-msgid "New reply"
-msgstr ""
-
-#: pybb/templates/pybb/attachments_formset.html:4
-msgid "Add attachments"
-msgstr ""
-
-#: pybb/templates/pybb/attachments_formset.html:10
-#: pybb/templates/pybb/edit_profile.html:27
-msgid "delete"
-msgstr ""
-
-#: pybb/templates/pybb/breadcrumb.html:5
-msgid "Home"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:19
-msgid "Last posts"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:44
-msgid "No forums created"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:45
-msgid "Add forum now"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:5
-msgid "Are you sure you want to delete this message?"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:12
-msgid "No, take me back"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:13
-msgid "Yes, I am sure"
-msgstr ""
-
-#: pybb/templates/pybb/edit_post.html:4
-#: pybb/templates/pybb/edit_post.html:13
-msgid "Editing the post"
-msgstr ""
-
-#: pybb/templates/pybb/edit_profile.html:7
-#: pybb/templates/pybb/edit_profile.html:10
-#: pybb/templates/pybb/edit_profile.html:15
-msgid "Profile editing"
-msgstr ""
-
-#: pybb/templates/pybb/edit_profile.html:20
-msgid "Subscriptions on topics"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:19
-msgid "Forum categories are not created"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:20
-msgid "Add a category now"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:25
-#: pybb/templates/pybb/latest_topics.html:7
-#: pybb/templates/pybb/latest_topics.html:17
-msgid "Last updates in topics"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:28
-msgid "Mark all forums as read"
-msgstr ""
-
-#: pybb/templates/pybb/latest_topics.html:10
-msgid "\"Last updates in topics\""
-msgstr ""
-
-#: pybb/templates/pybb/latest_topics.html:33
-msgid "Mark all topics as read"
-msgstr ""
-
-#: pybb/templates/pybb/pagination.html:7
-msgid "previous page"
-msgstr ""
-
-#: pybb/templates/pybb/pagination.html:21
-msgid "next page"
-msgstr ""
-
-#: pybb/templates/pybb/poll.html:5
-msgid "Poll"
-msgstr ""
-
-#: pybb/templates/pybb/poll.html:37
-msgid "'Cancel my poll vote'"
-msgstr ""
-
-#: pybb/templates/pybb/poll_edit_form.html:7
-msgid "Poll answers"
-msgstr ""
-
-#: pybb/templates/pybb/poll_edit_form.html:20
-msgid "remove answer"
-msgstr ""
-
-#: pybb/templates/pybb/poll_edit_form.html:21
-msgid "add answer"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:25
-msgid "Rank"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:38
-#: pybb/templates/pybb/user.html:41
-msgid "Edit"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:42
-msgid "Delete post?"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:43
-msgid "Delete"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:45
-msgid "Approve post"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:50
-#: pybb/templates/pybb/topic.html:63
-msgid "Admin"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:66
-msgid "Edited"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:78
-msgid "quote"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:24
-#: pybb/templates/pybb/topic.html:44
-#: pybb/templates/pybb/user_posts.html:8
-msgid "'Posts'"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:52
-msgid "Unstick topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:54
-msgid "Stick topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:58
-msgid "Open topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:60
-msgid "Close topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:66
-msgid "Merge topics"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:71
-msgid "Unsubscribe"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:73
-msgid "Subscribe"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:13
-msgid "Views"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:16
-msgid "Last post"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:26
-msgid "Go to first unread post"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:32
-msgid "pages"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:15
-msgid "Statistics"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:18
-msgid "Number of topics"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:24
-msgid "Number of posts"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:28
-msgid "Date of registration"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:35
-msgid "Block"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:36
-msgid "Block and delete all messages"
-msgstr ""
-
-#: pybb/templates/pybb/user_posts.html:13
-msgid "All posts created by"
-msgstr ""
-
-#: pybb/templates/pybb/user_topics.html:8
-msgid "'Topics'"
-msgstr ""
-
-#: pybb/templates/pybb/user_topics.html:11
-#: pybb/templates/pybb/user_topics.html:15
-msgid "All topics created by"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:8
-msgid "Users"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:12
-msgid "Search"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:24
-msgid "'Users'"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
-msgid "replied in topic to which you are subscribed."
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4
-msgid "Link to post:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5
-msgid "Link to topic:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8
-msgid ""
-"If you don't want to recive notifications on new messages in this topic "
-"visit following link:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2
-msgid "New answer in topic that you subscribed."
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:61
-msgid "seconds ago,seconds ago,seconds ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:64
-msgid "seconds ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:70
-msgid "minutes ago,minutes ago,minutes ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:73
-msgid "minutes ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:83
-#, python-format
-msgid "today, %s"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:85
-#, python-format
-msgid "yesterday, %s"
-msgstr ""
-
+++ /dev/null
-# Polish translations for PROJECT.
-# Copyright (C) 2013 ORGANIZATION
-# This file is distributed under the same license as the PROJECT project.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2013-08-09 11:40+0200\n"
-"PO-Revision-Date: 2013-08-09 12:17+0100\n"
-"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
-"Language-Team: pl <LL@li.org>\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
-"X-Generator: Poedit 1.5.4\n"
-
-#: pybb/admin.py:40 pybb/admin.py:66 pybb/admin.py:94 pybb/admin.py:116
-msgid "Additional options"
-msgstr ""
-
-#: pybb/admin.py:99 pybb/models.py:254
-msgid "Message"
-msgstr ""
-
-#: pybb/admin.py:130
-msgid "View post"
-msgstr ""
-
-#: pybb/admin.py:135
-msgid "Edit post"
-msgstr ""
-
-#: pybb/feeds.py:25 pybb/feeds.py:26 pybb/templates/pybb/base.html:12
-msgid "Latest posts on forum"
-msgstr ""
-
-#: pybb/feeds.py:35 pybb/feeds.py:36 pybb/templates/pybb/base.html:13
-msgid "Latest topics on forum"
-msgstr ""
-
-#: pybb/forms.py:27
-msgid "Attachment is too big"
-msgstr ""
-
-#: pybb/forms.py:47
-#, python-format
-msgid "You cant add more than %s answers for poll"
-msgstr ""
-
-#: pybb/forms.py:49
-msgid "Add two or more answers for this poll"
-msgstr ""
-
-#: pybb/forms.py:109
-msgid "Polls question is required when adding a poll"
-msgstr ""
-
-#: pybb/forms.py:192
-#, python-format
-msgid "Avatar is too large, max size: %s bytes"
-msgstr ""
-
-#: pybb/models.py:68 pybb/models.py:99
-msgid "Name"
-msgstr ""
-
-#: pybb/models.py:69 pybb/models.py:100
-msgid "Position"
-msgstr ""
-
-#: pybb/models.py:70 pybb/models.py:106 pybb/templates/pybb/category.html:5
-#: pybb/templates/pybb/category.html:28
-msgid "Hidden"
-msgstr ""
-
-#: pybb/models.py:71
-msgid "If checked, this category will be visible only for staff"
-msgstr ""
-
-#: pybb/models.py:76 pybb/models.py:98
-msgid "Category"
-msgstr ""
-
-#: pybb/models.py:77
-msgid "Categories"
-msgstr ""
-
-#: pybb/models.py:101
-msgid "Description"
-msgstr ""
-
-#: pybb/models.py:102
-msgid "Moderators"
-msgstr ""
-
-#: pybb/models.py:103 pybb/models.py:165 pybb/models.py:270
-msgid "Updated"
-msgstr ""
-
-#: pybb/models.py:104 pybb/models.py:172 pybb/models.py:357
-msgid "Post count"
-msgstr ""
-
-#: pybb/models.py:105
-msgid "Topic count"
-msgstr ""
-
-#: pybb/models.py:108
-msgid "Headline"
-msgstr ""
-
-#: pybb/models.py:112 pybb/models.py:162 pybb/templates/pybb/category.html:10
-msgid "Forum"
-msgstr ""
-
-#: pybb/models.py:113
-msgid "Forums"
-msgstr ""
-
-#: pybb/models.py:157
-msgid "None"
-msgstr ""
-
-#: pybb/models.py:158
-msgid "Single answer"
-msgstr ""
-
-#: pybb/models.py:159
-msgid "Multiple answers"
-msgstr ""
-
-#: pybb/models.py:163
-msgid "Subject"
-msgstr ""
-
-#: pybb/models.py:164 pybb/models.py:269
-msgid "Created"
-msgstr ""
-
-#: pybb/models.py:166 pybb/models.py:268 pybb/models.py:381 pybb/models.py:512
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
-msgid "User"
-msgstr ""
-
-#: pybb/models.py:167
-msgid "Views count"
-msgstr ""
-
-#: pybb/models.py:168 pybb/templates/pybb/topic_list.html:27
-msgid "Sticky"
-msgstr ""
-
-#: pybb/models.py:169 pybb/templates/pybb/topic_list.html:28
-msgid "Closed"
-msgstr ""
-
-#: pybb/models.py:170 pybb/templates/pybb/topic.html:92
-msgid "Subscribers"
-msgstr ""
-
-#: pybb/models.py:174 pybb/models.py:272
-msgid "On moderation"
-msgstr ""
-
-#: pybb/models.py:175
-msgid "Poll type"
-msgstr ""
-
-#: pybb/models.py:176
-msgid "Poll question"
-msgstr ""
-
-#: pybb/models.py:180 pybb/models.py:267 pybb/models.py:489
-#: pybb/templates/pybb/topic_list.html:7
-msgid "Topic"
-msgstr ""
-
-#: pybb/models.py:181 pybb/templates/pybb/category.html:13
-msgid "Topics"
-msgstr ""
-
-#: pybb/models.py:255
-msgid "HTML version"
-msgstr ""
-
-#: pybb/models.py:256
-msgid "Text version"
-msgstr ""
-
-#: pybb/models.py:271
-msgid "User IP"
-msgstr ""
-
-#: pybb/models.py:276 pybb/models.py:397
-msgid "Post"
-msgstr ""
-
-#: pybb/models.py:277 pybb/templates/pybb/category.html:16
-#: pybb/templates/pybb/topic_list.html:10
-msgid "Posts"
-msgstr ""
-
-#: pybb/models.py:346
-msgid "Signature"
-msgstr "Podpis"
-
-#: pybb/models.py:348
-msgid "Signature HTML Version"
-msgstr ""
-
-#: pybb/models.py:350
-msgid "Time zone"
-msgstr ""
-
-#: pybb/models.py:352
-msgid "Language"
-msgstr ""
-
-#: pybb/models.py:355
-msgid "Show signatures"
-msgstr ""
-
-#: pybb/models.py:358
-msgid "Avatar"
-msgstr ""
-
-#: pybb/models.py:360
-msgid "Automatically subscribe"
-msgstr ""
-
-#: pybb/models.py:361
-msgid "Automatically subscribe to topics that you answer"
-msgstr ""
-
-#: pybb/models.py:384
-msgid "Profile"
-msgstr ""
-
-#: pybb/models.py:385
-msgid "Profiles"
-msgstr ""
-
-#: pybb/models.py:394 pybb/templates/pybb/post_template.html:73
-msgid "Attachment"
-msgstr ""
-
-#: pybb/models.py:395
-msgid "Attachments"
-msgstr ""
-
-#: pybb/models.py:398
-msgid "Size"
-msgstr ""
-
-#: pybb/models.py:399
-msgid "File"
-msgstr ""
-
-#: pybb/models.py:447
-msgid "Topic read tracker"
-msgstr ""
-
-#: pybb/models.py:448
-msgid "Topic read trackers"
-msgstr ""
-
-#: pybb/models.py:483
-msgid "Forum read tracker"
-msgstr ""
-
-#: pybb/models.py:484
-msgid "Forum read trackers"
-msgstr ""
-
-#: pybb/models.py:490
-msgid "Text"
-msgstr ""
-
-#: pybb/models.py:493 pybb/models.py:511
-msgid "Poll answer"
-msgstr ""
-
-#: pybb/models.py:494
-msgid "Polls answers"
-msgstr ""
-
-#: pybb/models.py:516
-msgid "Poll answer user"
-msgstr ""
-
-#: pybb/models.py:517
-msgid "Polls answers users"
-msgstr ""
-
-#: pybb/util.py:58
-msgid "Can't get profile for anonymous user"
-msgstr ""
-
-#: pybb/views.py:648
-msgid "All forums marked as read"
-msgstr ""
-
-#: pybb/views.py:668
-msgid "User successfuly blocked"
-msgstr ""
-
-#: pybb/templates/pybb/_button_new_topic.html:2
-#: pybb/templates/pybb/add_post.html:24
-msgid "New topic"
-msgstr ""
-
-#: pybb/templates/pybb/_button_save.html:1
-msgid "Save"
-msgstr ""
-
-#: pybb/templates/pybb/_button_submit.html:1
-msgid "Submit"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:15
-msgid "Bold"
-msgstr "Pogrubienie"
-
-#: pybb/templates/pybb/_markitup.html:16
-msgid "Italic"
-msgstr "Kursywa"
-
-#: pybb/templates/pybb/_markitup.html:17
-msgid "Underline"
-msgstr "Podkreślenie"
-
-#: pybb/templates/pybb/_markitup.html:18
-msgid "Stroke"
-msgstr "Przekreślenie"
-
-#: pybb/templates/pybb/_markitup.html:20
-msgid "Picture"
-msgstr "Obrazek"
-
-#: pybb/templates/pybb/_markitup.html:21
-msgid "Link"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:23
-msgid "Bulleted list"
-msgstr "Lista wypunktowana"
-
-#: pybb/templates/pybb/_markitup.html:24
-msgid "Numeric list"
-msgstr "Lista numerowana"
-
-#: pybb/templates/pybb/_markitup.html:25
-msgid "List item"
-msgstr "Element listy"
-
-#: pybb/templates/pybb/_markitup.html:27
-msgid "Quotes"
-msgstr "Cytat"
-
-#: pybb/templates/pybb/_markitup.html:28
-msgid "Code"
-msgstr "Kod"
-
-#: pybb/templates/pybb/_markitup.html:30
-msgid "Clean"
-msgstr ""
-
-#: pybb/templates/pybb/_markitup.html:31
-msgid "Preview"
-msgstr "Podgląd"
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "Register"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "or"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "login"
-msgstr ""
-
-#: pybb/templates/pybb/_need_to_login_message.html:3
-msgid "to create to post a reply"
-msgstr ""
-
-#: pybb/templates/pybb/add_post.html:24
-msgid "New reply"
-msgstr ""
-
-#: pybb/templates/pybb/attachments_formset.html:4
-msgid "Add attachments"
-msgstr ""
-
-#: pybb/templates/pybb/attachments_formset.html:10
-#: pybb/templates/pybb/edit_profile.html:27
-msgid "delete"
-msgstr ""
-
-#: pybb/templates/pybb/breadcrumb.html:5
-msgid "Home"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:19
-msgid "Last posts"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:44
-msgid "No forums created"
-msgstr ""
-
-#: pybb/templates/pybb/category.html:45
-msgid "Add forum now"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:5
-msgid "Are you sure you want to delete this message?"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:12
-msgid "No, take me back"
-msgstr ""
-
-#: pybb/templates/pybb/delete_post.html:13
-msgid "Yes, I am sure"
-msgstr ""
-
-#: pybb/templates/pybb/edit_post.html:4 pybb/templates/pybb/edit_post.html:13
-msgid "Editing the post"
-msgstr ""
-
-#: pybb/templates/pybb/edit_profile.html:7
-#: pybb/templates/pybb/edit_profile.html:10
-#: pybb/templates/pybb/edit_profile.html:15
-msgid "Profile editing"
-msgstr ""
-
-#: pybb/templates/pybb/edit_profile.html:20
-msgid "Subscriptions on topics"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:19
-msgid "Forum categories are not created"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:20
-msgid "Add a category now"
-msgstr ""
-
-#: pybb/templates/pybb/index.html:25 pybb/templates/pybb/latest_topics.html:7
-#: pybb/templates/pybb/latest_topics.html:17
-msgid "Last updates in topics"
-msgstr "Ostatnio modyfikowane tematy"
-
-#: pybb/templates/pybb/index.html:28
-msgid "Mark all forums as read"
-msgstr ""
-
-#: pybb/templates/pybb/latest_topics.html:10
-msgid "\"Last updates in topics\""
-msgstr ""
-
-#: pybb/templates/pybb/latest_topics.html:33
-msgid "Mark all topics as read"
-msgstr "Oznacz wszystkie tematy jako przeczytane"
-
-#: pybb/templates/pybb/pagination.html:7
-msgid "previous page"
-msgstr ""
-
-#: pybb/templates/pybb/pagination.html:21
-msgid "next page"
-msgstr ""
-
-#: pybb/templates/pybb/poll.html:5
-msgid "Poll"
-msgstr ""
-
-#: pybb/templates/pybb/poll.html:37
-msgid "'Cancel my poll vote'"
-msgstr "Anuluj mój głos w ankiecie"
-
-#: pybb/templates/pybb/poll_edit_form.html:7
-msgid "Poll answers"
-msgstr ""
-
-#: pybb/templates/pybb/poll_edit_form.html:20
-msgid "remove answer"
-msgstr ""
-
-#: pybb/templates/pybb/poll_edit_form.html:21
-msgid "add answer"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:25
-msgid "Rank"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:38 pybb/templates/pybb/user.html:41
-msgid "Edit"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:42
-msgid "Delete post?"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:43
-msgid "Delete"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:45
-msgid "Approve post"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:50 pybb/templates/pybb/topic.html:63
-msgid "Admin"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:66
-msgid "Edited"
-msgstr ""
-
-#: pybb/templates/pybb/post_template.html:78
-msgid "quote"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:24 pybb/templates/pybb/topic.html:44
-#: pybb/templates/pybb/user_posts.html:8
-msgid "'Posts'"
-msgstr "'Posty'"
-
-#: pybb/templates/pybb/topic.html:52
-msgid "Unstick topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:54
-msgid "Stick topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:58
-msgid "Open topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:60
-msgid "Close topic"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:66
-msgid "Merge topics"
-msgstr "Połącz wątki"
-
-#: pybb/templates/pybb/topic.html:71
-msgid "Unsubscribe"
-msgstr ""
-
-#: pybb/templates/pybb/topic.html:73
-msgid "Subscribe"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:13
-msgid "Views"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:16
-msgid "Last post"
-msgstr ""
-
-#: pybb/templates/pybb/topic_list.html:26
-msgid "Go to first unread post"
-msgstr "Zobacz pierwszy nieprzeczytany post"
-
-#: pybb/templates/pybb/topic_list.html:32
-msgid "pages"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:15
-msgid "Statistics"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:18
-msgid "Number of topics"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:24
-msgid "Number of posts"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:28
-msgid "Date of registration"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:35
-msgid "Block"
-msgstr ""
-
-#: pybb/templates/pybb/user.html:36
-msgid "Block and delete all messages"
-msgstr "Zablokuj i usuń wszystkie posty"
-
-#: pybb/templates/pybb/user_posts.html:13
-msgid "All posts created by"
-msgstr "Wszystkie posty utworzone przez"
-
-#: pybb/templates/pybb/user_topics.html:8
-msgid "'Topics'"
-msgstr "'Tematy'"
-
-#: pybb/templates/pybb/user_topics.html:11
-#: pybb/templates/pybb/user_topics.html:15
-msgid "All topics created by"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:8
-msgid "Users"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:12
-msgid "Search"
-msgstr ""
-
-#: pybb/templates/pybb/users.html:24
-msgid "'Users'"
-msgstr "'Użytkownicy'"
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
-msgid "replied in topic to which you are subscribed."
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4
-msgid "Link to post:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5
-msgid "Link to topic:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8
-msgid ""
-"If you don't want to recive notifications on new messages in this topic "
-"visit following link:"
-msgstr ""
-
-#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2
-msgid "New answer in topic that you subscribed."
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:61
-msgid "seconds ago,seconds ago,seconds ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:64
-msgid "seconds ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:70
-msgid "minutes ago,minutes ago,minutes ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:73
-msgid "minutes ago"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:83
-#, python-format
-msgid "today, %s"
-msgstr ""
-
-#: pybb/templatetags/pybb_tags.py:85
-#, python-format
-msgid "yesterday, %s"
-msgstr ""
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import include, url, patterns
-from django.conf import settings
-
-from fnpdjango.utils.urls import i18n_patterns
-from .views import mil_home_view, mil_contact_view, mil_knowledge_base_view
-
-
-urlpatterns = i18n_patterns(
- '',
- url(r'^$', mil_home_view, name="mil_home"),
- url(r'^kompetencje/', include('curriculum.urls')),
- url(r'^wez-udzial/', include('comment.urls')),
- url(r'^zglos/', include('contact.urls')),
- url(r'^kontakt/$', mil_contact_view, name='mil_contact'),
- url(r'^bazawiedzy/(?P<url>.*)$', mil_knowledge_base_view,
- name="knowledge_base"),
-)
-
-handler404 = 'edumed.views.mil_404_view'
-
-if settings.DEBUG:
- urlpatterns += patterns(
- '',
- url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
- 'document_root': settings.MEDIA_ROOT,
- }),
- )
INSTALLED_APPS = (
'edumed',
- # 'curriculum',
- # 'catalogue',
- # 'comment',
'wtem',
'stage2',
- # 'publishers',
- # 'api',
'fnpdjango',
'south',
'haystack',
'chunks',
'contact',
- # 'forum',
- # 'pybb',
'django_libravatar',
'sorl.thumbnail',
'subdomains',
- # 'piston',
'django.contrib.auth',
'django.contrib.contenttypes',
"django.core.context_processors.tz",
("django.contrib.messages.context_processors.messages", 'django.contrib.messages'),
"django.core.context_processors.request",
- 'pybb.context_processors.processor',
- 'edumed.context_processors.base_template',
))
SPONSORS_THUMB_WIDTH = 100
SPONSORS_THUMB_HEIGHT = 56
-PYBB_TEMPLATE = "base_forum.html"
-PYBB_SMILES = {}
-PYBB_ENABLE_ANONYMOUS_POST = False
-
-PYBB_DEFAULT_TITLE = u'Forum'
-PYBB_DEFAULT_TIME_ZONE = 1
-PYBB_PERMISSION_HANDLER = 'edumed.forum.ForumPermissionHandler'
-
THUMBNAIL_ENGINE = 'sorl.thumbnail.engines.convert_engine.Engine'
THUMBNAIL_CONVERT = 'convert -density 300 -background white -alpha off'
MAX_UPLOAD_SIZE = 20 * 1024 * 1024
-OLIMPIADA_START = (2017, 11, 23, 10)
+OLIMPIADA_START = (2017, 11, 13, 10)
OLIMPIADA_END = (2017, 11, 23, 11)
USE_TZ = True
CONTRIB_LOCALE_APPS = (
- 'pybb',
)
LOCALE_PATHS = (
os.path.join(PROJECT_DIR, 'edumed/locale-contrib'),
('pagination.middleware.PaginationMiddleware', 'pagination'),
'django.middleware.cache.FetchFromCacheMiddleware',
'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
- # 'pybb.middleware.PybbMiddleware',
- # 'forum.middleware.ForumMiddleware',
'wtem.middleware.ThreadLocalMiddleware'
))
'css/base.scss',
'css/main.scss',
'css/form.scss',
- 'catalogue/css/carousel.scss',
'catalogue/css/layout.scss',
- 'catalogue/css/lesson.scss',
'catalogue/css/exercise.scss',
- 'catalogue/css/section_list.scss',
- 'curriculum/curriculum.scss',
'jquery/colorbox/colorbox.css',
'fnpdjango/annoy/annoy.css',
-
- 'css/forum.scss',
- 'css/mil.scss'
),
'output_filename': 'compressed/base.css',
},
PIPELINE_JS = {
'base': {
'source_filenames': (
- 'catalogue/js/jquery-ui-1.10.0.custom.js',
- 'catalogue/js/jquery.cycle.all.js',
'jquery/colorbox/jquery.colorbox-min.js',
'jquery/colorbox/jquery.colorbox-pl.js',
- 'catalogue/js/carousel.js',
'catalogue/js/edumed.js',
- 'catalogue/js/lesson.js',
- 'catalogue/js/lesson-list.js',
'sponsors/js/sponsors.js',
- 'curriculum/curriculum.js',
'js/formset.js',
- 'pybb/js/pybbjs.js',
'fnpdjango/annoy/annoy.js',
'js/checkfile.js',
),
},
'wtem': {
'source_filenames': (
- 'catalogue/js/jquery-ui-1.10.0.custom.js',
+ 'js/jquery-ui-1.10.0.custom.js',
'wtem/edumed.js',
'wtem/wtem.js',
'wtem/json2.js'
+++ /dev/null
-#catalogue-carousel {
- float: left;
- position: relative;
- width: 43.75em;
- height: 14.6875em;
- overflow: hidden;
- border-radius: 0.9375em;
-}
- #catalogue-carousel #catalogue-carousel-links {
- width: 28.75em;
- height: 14.6875em;
- list-style: none;
- margin: 0;
- padding: 0; }
- #catalogue-carousel #catalogue-carousel-links li {
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- background-size: 100% 100%;
- border-top-left-radius: 0.9375em 6.38%;
- border-bottom-left-radius: 0.9375em 6.38%;
- z-index: 100;
- background-color: #888; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link {
- display: block;
- overflow: hidden;
- width: 28.75em;
- height: 100%;
- background: url(/static/catalogue/img/carousel-left.png) 100% 0 no-repeat;
- background-size: 4.375em 100%; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note {
- position: relative;
- height: 100%;
- color: white;
- margin-top: 8.5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div:before {
- content: " ";
- display: block;
- position: absolute;
- height: 100%;
- width: 100%;
- z-index: -1;
- background-color: black;
- opacity: 0.6; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p {
- padding: .4em 3em 0 .5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p strong {
- font-size: 1.2em;
- display: block; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link .catalogue-carousel-note div p .more {
- position: absolute;
- right: 4em;
- top: 4.5em; }
- #catalogue-carousel #catalogue-carousel-links li a.catalogue-carousel-link:active {
- outline: none; }
- #catalogue-carousel #catalogue-carousel-links li .attribution {
- text-align: right;
- font-size: .75em;
- position: absolute;
- right: 5em;
- top: .1em;
- color: white;
- font-weight: bold;
- text-shadow: 0 0 5px #000; }
- #catalogue-carousel #catalogue-carousel-switcher {
- margin: 0;
- padding: 0.1875em 0 0 3.625em;
- width: 11.375em;
- height: 14.6875em;
- position: absolute;
- right: 0;
- top: 0;
- list-style: none;
- border-radius: 0 0.9375em 0.9375em 0;
- background-color: #ed7831;
- background-image: url(/static/catalogue/img/carousel-right.png);
- background-position: 0 0;
- background-repeat: no-repeat;
- background-size: auto 14.6875em;
- /* right part of mask as background */ }
- #catalogue-carousel #catalogue-carousel-switcher li {
- margin-bottom: .4em;
- font-size: .85em;
- line-height: 1em; }
- #catalogue-carousel #catalogue-carousel-switcher li a {
- text-transform: uppercase;
- color: #363a3e; }
- #catalogue-carousel #catalogue-carousel-switcher li a:before {
- vertical-align: top;
- margin-right: 1.5em; }
- #catalogue-carousel #catalogue-carousel-switcher li .knowledge:before {
- content: url(/static/img/icons/knowledge_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .activity:before {
- content: url(/static/img/icons/activity_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .lesson-plan:before {
- content: url(/static/img/icons/lesson-plan_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li .reference:before {
- content: url(/static/img/icons/reference_dark.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide a {
- color: white; }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .knowledge:before {
- content: url(/static/img/icons/knowledge_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .activity:before {
- content: url(/static/img/icons/activity_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .lesson-plan:before {
- content: url(/static/img/icons/lesson-plan_white.png); }
- #catalogue-carousel #catalogue-carousel-switcher li.activeSlide .reference:before {
- content: url(/static/img/icons/reference_white.png); }
+++ /dev/null
-$px: .0625em;
-
-$ciemny: #363a3e;
-
-
-#catalogue-carousel {
- float: left;
- position: relative;
- width: 700*$px;
- height: 235*$px;
- overflow: hidden;
- border-radius: 15*$px;
-
- #catalogue-carousel-links {
- width: 460*$px;
- height: 235*$px;
- list-style: none;
- margin: 0;
- padding: 0;
-
- li {
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- background-size: 100% 100%;
- border-top-left-radius: 15*$px 6.38%;
- border-bottom-left-radius: 15*$px 6.38%;
- z-index: 100;
- background-color: #888;
-
- a.catalogue-carousel-link {
- display: block;
- overflow: hidden;
- width: 460*$px;
- height: 100%;
- background: url(/static/catalogue/img/carousel-left.png) 100% 0 no-repeat;
- background-size: 70*$px 100%;
-
- .catalogue-carousel-note {
- position: relative;
- height: 100%;
- color: white;
- margin-top: 8.5em;
-
- div {
- &:before {
- content: " ";
- display: block;
- position: absolute;
- height: 100%;
- width: 100%;
- z-index: -1;
- background-color: black;
- opacity: 0.6;
- }
-
- p {
- padding: .4em 3em 0 .5em;
-
- strong {
- font-size: 1.2em;
- display: block;
- }
-
- .more {
- position: absolute;
- right: 4em;
- top: 4.5em;
- }
- }
- }
- }
- }
- a.catalogue-carousel-link:active {
- outline: none;
- }
- .attribution {
- text-align: right;
- font-size: .75em;
- position: absolute;
- right: 5em;
- top: .1em;
- color: white;
- font-weight: bold;
- text-shadow: 0 0 5px #000;
- }
-
- }
- }
- #catalogue-carousel-switcher {
- margin: 0;
- padding: 3*$px 0 0 58*$px;
- width: 240*$px - 58*$px;
- height: 243*$px - 8*$px;
- position: absolute;
- right: 0;
- top: 0;
- list-style: none;
- border-radius: 0 15*$px 15*$px 0;
- background-color: #ed7831;
- background-image: url(/static/catalogue/img/carousel-right.png);
- background-position: 0 0;
- background-repeat: no-repeat;
- background-size: auto 235*$px;
-
- /* right part of mask as background */
-
- li {
- margin-bottom: .4em;
- font-size: .85em;
- line-height: 1em;
-
- a {
- text-transform: uppercase;
- color: $ciemny;
- }
- a:before {
- vertical-align: top;
- margin-right: 1.5em;
- }
- .knowledge:before {content: url(/static/img/icons/knowledge_dark.png);}
- .activity:before {content: url(/static/img/icons/activity_dark.png);}
- .lesson-plan:before {content: url(/static/img/icons/lesson-plan_dark.png);}
- .reference:before {content: url(/static/img/icons/reference_dark.png);}
- }
- li.activeSlide {
- a {
- color: white;
- }
- .knowledge:before {content: url(/static/img/icons/knowledge_white.png);}
- .activity:before {content: url(/static/img/icons/activity_white.png);}
- .lesson-plan:before {content: url(/static/img/icons/lesson-plan_white.png);}
- .reference:before {content: url(/static/img/icons/reference_white.png);}
- }
- }
-
-
-}
+++ /dev/null
-/* =================================================== */
-/* = Common elements: headings, paragraphs and lines = */
-/* =================================================== */
-/*h1 {
- font-size: 3em;
- margin: 1.5em 0;
- text-align: center;
- line-height: 1.5em;
- font-weight: bold;
-}
-
-h2 {
- font-size: 2em;
- margin: 1.5em 0 0;
- font-weight: bold;
- line-height: 1.5em;
-}
-
-h3 {
- font-size: 1.5em;
- margin: 1.5em 0 0;
- font-weight: normal;
- line-height: 1.5em;
-}
-
-h4 {
- font-size: 1em;
- margin: 1.5em 0 0;
- line-height: 1.5em;
-}
-
-p {
- margin: 0;
-}
-*/
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-.annotation {
- font-style: normal;
- font-weight: normal;
- font-size: 12px;
- padding-left: 2px;
- position: relative;
- top: -4px; }
-
-#footnotes {
- margin-top: 3em; }
-
-#footnotes .annotation {
- display: block;
- float: left;
- width: 2.5em;
- clear: both; }
-
-#footnotes div {
- margin: 1.5em 0 0 0; }
-
-#footnotes p, #footnotes ul {
- margin-left: 2.5em;
- font-size: 0.875em; }
-
-#footnotes .permalink {
- font-size: .75em; }
-
-blockquote {
- font-size: 0.875em; }
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.verse, .paragraph {
- position: relative; }
-
-.anchor {
- position: absolute;
- margin: -0.25em -0.5em;
- left: -3em;
- color: #777;
- font-size: 12px;
- width: 2em;
- text-align: center;
- padding: 0.25em 0.5em;
- line-height: 1.5em; }
-
-.anchor:hover, #book-text .anchor:active {
- color: #FFF;
- background-color: #CCC; }
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-span.author {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-bottom: 0.25em; }
-
-span.collection {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-bottom: -0.25em; }
-
-span.subtitle {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-top: -0.25em; }
-
-span.translator {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-top: 0.25em; }
-
-div.didaskalia {
- font-style: italic;
- margin: 0.5em 0 0 1.5em; }
-
-div.kwestia {
- margin: 0.5em 0 0; }
-
-div.stanza {
- margin: 1.5em 0 0; }
-
-div.kwestia div.stanza {
- margin: 0; }
-
-p.paragraph {
- text-align: justify;
- margin: 1.5em 0 0; }
-
-p.motto {
- text-align: justify;
- font-style: italic;
- margin: 1.5em 0 0; }
-
-p.motto_podpis {
- font-size: 0.875em;
- text-align: right; }
-
-div.fragment {
- border-bottom: 0.1em solid #999;
- padding-bottom: 1.5em; }
-
-div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph {
- text-align: right;
- font-style: italic; }
-
-hr.spacer {
- height: 3em;
- visibility: hidden; }
-
-hr.spacer-line {
- margin: 1.5em 0;
- border: none;
- border-bottom: 0.1em solid #000; }
-
-p.spacer-asterisk {
- padding: 0;
- margin: 1.5em 0;
- text-align: center; }
-
-div.person-list ol {
- list-style: none;
- padding: 0 0 0 1.5em; }
-
-p.place-and-time {
- font-style: italic; }
-
-em.math, em.foreign-word, em.book-title, em.didaskalia {
- font-style: italic; }
-
-em.author-emphasis {
- letter-spacing: 0.1em; }
-
-em.person {
- font-style: normal;
- font-variant: small-caps; }
-
-.verse:after {
- content: "\feff"; }
-
-/* =================================== */
-/* = Hide some elements for printing = */
-/* =================================== */
-@media print {
- #menu {
- display: none; } }
-.activity {
- clear: both; }
-
-.activity .text {
- width: 27.5em;
- margin-right: 20px;
- float: left; }
-
-.activity .description p:first-child {
- margin-top: 0; }
-
-.activity {
- margin-top: 2em; }
- .activity .act_counter {
- float: left;
- margin-right: .5em;
- font-size: 2em; }
- .activity .info {
- float: right;
- width: 8.4375em; }
- .activity .info .infobox {
- padding: 1em 0;
- border-top: 1px solid #c9ccce; }
- .activity .info .infobox h1 {
- text-transform: uppercase;
- font-weight: bold;
- margin: 0 0 0.5em -2.1875em;
- padding-left: 2.1875em;
- line-height: 24px;
- font-size: 1em; }
- .activity .info .infobox p {
- margin: 0; }
- .activity .info .time h1 {
- background: url(/static/img/icons/activity-time.png) 0 0 no-repeat; }
- .activity .info .kind h1 {
- background: url(/static/img/icons/activity-kind.png) 0 0 no-repeat; }
- .activity .info .materials h1 {
- background: url(/static/img/icons/activity-tools.png) 0 0 no-repeat; }
-
-.lista .paragraph {
- margin: .3em 0; }
-.lista li {
- margin: .75em 0; }
-
-.clearboth {
- clear: both; }
-
-#book-text .caption {
- margin: 1.5em; }
- #book-text .caption p {
- margin: 0; }
-
-/* utils */
-.clr {
- clear: both; }
-
-#book-text .top-link {
- margin-top: 1em; }
-
-.help {
- font-size: .7em;
- padding: 0 .5em;
- color: #888;
- vertical-align: super; }
+++ /dev/null
-$px: .0625em;
-
-/* =================================================== */
-/* = Common elements: headings, paragraphs and lines = */
-/* =================================================== */
-
-/*h1 {
- font-size: 3em;
- margin: 1.5em 0;
- text-align: center;
- line-height: 1.5em;
- font-weight: bold;
-}
-
-h2 {
- font-size: 2em;
- margin: 1.5em 0 0;
- font-weight: bold;
- line-height: 1.5em;
-}
-
-h3 {
- font-size: 1.5em;
- margin: 1.5em 0 0;
- font-weight: normal;
- line-height: 1.5em;
-}
-
-h4 {
- font-size: 1em;
- margin: 1.5em 0 0;
- line-height: 1.5em;
-}
-
-p {
- margin: 0;
-}
-*/
-
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-
-.annotation {
- font-style: normal;
- font-weight: normal;
- font-size: 12px;
- padding-left: 2px;
- position: relative;
- top: -4px;
-}
-
-#footnotes {
- margin-top: 3em;
-}
-
-#footnotes .annotation {
- display: block;
- float: left;
- width: 2.5em;
- clear: both;
-}
-
-#footnotes div {
- margin: 1.5em 0 0 0;
-}
-
-#footnotes p, #footnotes ul {
- margin-left: 2.5em;
- font-size: 0.875em;
-}
-
-#footnotes .permalink {
- font-size: .75em;
-}
-
-blockquote {
- font-size: 0.875em;
-}
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.verse, .paragraph {
- position:relative;
-}
-.anchor {
- position: absolute;
- margin: -0.25em -0.5em;
- left: -3em;
- color: #777;
- font-size: 12px;
- width: 2em;
- text-align: center;
- padding: 0.25em 0.5em;
- line-height: 1.5em;
-}
-
-.anchor:hover, #book-text .anchor:active {
- color: #FFF;
- background-color: #CCC;
-}
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-span.author {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-bottom: 0.25em;
-}
-
-span.collection {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-bottom: -0.25em;
-}
-
-span.subtitle {
- font-size: 0.5em;
- display: block;
- line-height: 1.5em;
- margin-top: -0.25em;
-}
-
-span.translator {
- font-size: 0.375em;
- display: block;
- line-height: 1.5em;
- margin-top: 0.25em;
-}
-
-div.didaskalia {
- font-style: italic;
- margin: 0.5em 0 0 1.5em;
-}
-
-div.kwestia {
- margin: 0.5em 0 0;
-}
-
-div.stanza {
- margin: 1.5em 0 0;
-}
-
-div.kwestia div.stanza {
- margin: 0;
-}
-
-p.paragraph {
- text-align: justify;
- margin: 1.5em 0 0;
-}
-
-p.motto {
- text-align: justify;
- font-style: italic;
- margin: 1.5em 0 0;
-}
-
-p.motto_podpis {
- font-size: 0.875em;
- text-align: right;
-}
-
-div.fragment {
- border-bottom: 0.1em solid #999;
- padding-bottom: 1.5em;
-}
-
-div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph {
- text-align: right;
- font-style: italic;
-}
-
-hr.spacer {
- height: 3em;
- visibility: hidden;
-}
-
-hr.spacer-line {
- margin: 1.5em 0;
- border: none;
- border-bottom: 0.1em solid #000;
-}
-
-p.spacer-asterisk {
- padding: 0;
- margin: 1.5em 0;
- text-align: center;
-}
-
-div.person-list ol {
- list-style: none;
- padding: 0 0 0 1.5em;
-}
-
-p.place-and-time {
- font-style: italic;
-}
-
-em.math, em.foreign-word, em.book-title, em.didaskalia {
- font-style: italic;
-}
-
-em.author-emphasis {
- letter-spacing: 0.1em;
-}
-
-em.person {
- font-style: normal;
- font-variant: small-caps;
-}
-
-.verse:after {
- content: "\feff";
-}
-
-
-/* =================================== */
-/* = Hide some elements for printing = */
-/* =================================== */
-
-@media print {
- #menu {display: none;}
-}
-
-
-
-.activity {
- clear:both;
-}
-
-.activity .text {
- width: 440*$px;
- margin-right: 20px;
- float: left;
-}
-
-.activity .description p:first-child {
- margin-top: 0;
-}
-
-
-
-.activity {
- margin-top: 2em;
-
- .act_counter {
- float: left;
- margin-right: .5em;
- font-size: 2em;
- }
-
- .info {
- float: right;
- width: 135*$px;
-
- .infobox {
- padding: 1em 0;
- border-top: 1px solid #c9ccce;
- h1 {
- text-transform: uppercase;
- font-weight: bold;
- margin: 0 0 .5em -35*$px;
- padding-left: 35*$px;
- line-height: 24px;
- font-size: 1em;
- }
- p {
- margin: 0;
- }
-
- }
- .time h1 {
- background: url(/static/img/icons/activity-time.png) 0 0 no-repeat;
- }
- .kind h1 {
- background: url(/static/img/icons/activity-kind.png) 0 0 no-repeat;
- }
- .materials h1 {
- background: url(/static/img/icons/activity-tools.png) 0 0 no-repeat;
- }
- }
-}
-
-.lista {
- .paragraph {
- margin: .3em 0;
- }
- li {
- margin: .75em 0;
- }
-}
-
-
-.clearboth {
- clear: both;
-}
-
-#book-text {
- .caption {
- margin: 1.5em;
- p {
- margin: 0;
- }
- }
-}
-
-/* utils */
-
-.clr {
- clear: both;
-}
-
-#book-text .top-link {
- margin-top: 1em;
-}
-
-.help {
- font-size: .7em;
- padding: 0 .5em;
- color: #888;
- vertical-align: super;
-}
+++ /dev/null
-#level-chooser-place {
- min-height: 5.9375em;
- margin-top: 2em; }
- #level-chooser-place ul#level-chooser {
- margin: 0;
- padding: 1em 0 1em 8.75em;
- background-color: white;
- width: 31.25em;
- z-index: 300;
- position: relative;
- text-transform: uppercase;
- text-align: right; }
- #level-chooser-place ul#level-chooser .home {
- display: none;
- position: absolute;
- top: 1.5em;
- left: 0; }
- #level-chooser-place ul#level-chooser .home a {
- background: none;
- padding: 0; }
- #level-chooser-place ul#level-chooser .home a img {
- width: 7.5em; }
- #level-chooser-place ul#level-chooser.fixed {
- position: fixed;
- top: 0;
- border-bottom: 1px solid #c9ccce; }
- #level-chooser-place ul#level-chooser.fixed .home {
- display: block; }
- #level-chooser-place ul#level-chooser li {
- display: inline-block;
- list-style: none;
- max-width: 175px; }
- #level-chooser-place ul#level-chooser li a {
- display: table-cell;
- padding: .5em 1em;
- border-radius: 0.3125em;
- background: #eee;
- height: 2.625em;
- vertical-align: middle; }
- #level-chooser-place ul#level-chooser li a.active {
- color: white;
- background: #ED7831; }
-
-.level .link-list {
- margin-left: 1em; }
-.level .level-toc {
- overflow: hidden;
- /* Because we're changing bg color lower. */ }
- .level .level-toc.fixed {
- position: fixed; }
- .level .level-toc .link-list {
- margin-left: 1em; }
- .level .level-toc .link-list li {
- margin-bottom: 0; }
- .level .level-toc .link-list li.curriculumcourses {
- margin: 10px -17px -17px;
- padding: 10px 16px 16px;
- background-color: #eee; }
+++ /dev/null
-$px: 0.0625em;
-
-#level-chooser-place {
- min-height: 95*$px;
- margin-top: 2em;
-
- ul#level-chooser {
- margin: 0;
- padding: 16*$px 0 16*$px 140*$px;
- background-color: white;
- width: 500*$px;
- z-index: 300;
- position: relative;
- text-transform: uppercase;
- text-align: right;
-
- .home {
- display: none;
- position: absolute;
- top: 1.5em;
- left: 0;
-
- a {
- background: none;
- padding: 0;
- img {
- width: 120*$px;
- }
- }
- }
-
- &.fixed {
- position: fixed;
- top: 0;
- border-bottom: 1px solid #c9ccce;
-
- .home {
- display: block;
- }
- }
-
- li {
- display: inline-block;
- list-style: none;
- max-width: 175px;
-
- a {
- display: table-cell;
- padding: .5em 1em;
- border-radius: 5*$px;
- background: #eee;
- height: 42*$px;
- vertical-align: middle;
-
- &.active {
- color: white;
- background: #ED7831;
- }
- }
- }
- }
-}
-
-.level {
- .link-list {
- margin-left: 1em;
- }
-
- .level-toc {
- overflow: hidden; /* Because we're changing bg color lower. */
-
- &.fixed {
- position: fixed;
- }
-
- .link-list {
- margin-left: 1em;
-
- li {
- margin-bottom: 0;
-
- &.curriculumcourses {
- margin: 10px -17px -17px;
- padding: 10px 16px 16px;
- background-color: #eee;
- }
- }
- }
- }
-}
+++ /dev/null
-(function($){
-$(function() {
-
-
-$("#catalogue-carousel-links").each(function() {
- $slides = $(this);
-
- $slides.cycle({
- fx: 'fade',
- speed: 1000,
- timeout: 5000,
- pager: '#catalogue-carousel-switcher',
- pagerAnchorBuilder: function() {},
- });
-
- $("#catalogue-carousel-switcher li").each(function(i, e) {
- $("a", e).click(function(ev) {
- ev.preventDefault();
- $slides.cycle(i);
- });
- });
-
-});
-
-
-});
-})(jQuery);
+++ /dev/null
-/*! jQuery UI - v1.10.0 - 2013-01-24
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js
-* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// prevent duplicate loading
-// this is only a problem because we proxy existing functions
-// and we don't want to double proxy them
-$.ui = $.ui || {};
-if ( $.ui.version ) {
- return;
-}
-
-$.extend( $.ui, {
- version: "1.10.0",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- _focus: $.fn.focus,
- focus: function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- this._focus.apply( this, arguments );
- },
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.support.selectstart = "onselectstart" in document.createElement( "div" );
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.10.0",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown."+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click."+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("."+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.10.0",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
- this.element[0].style.position = "relative";
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var element,
- that = this,
- elementInDom = false,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- element = this.element[0];
- while ( element && (element = element.parentNode) ) {
- if (element === document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" ) {
- return false;
- }
-
- if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
- $(this.options.handle, this.element)
- .find("*")
- .addBack()
- .each(function() {
- if(this === event.target) {
- handle = true;
- }
- });
-
- return handle;
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
-
- if(!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- //This needs to be actually done for all browsers, since pageX/pageY includes this information
- //Ugly IE fix
- if((this.offsetParent[0] === document.body) ||
- (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var over, c, ce,
- o = this.options;
-
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- (o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
- (o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) {
- c = $(o.containment);
- ce = c[0];
-
- if(!ce) {
- return;
- }
-
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
-
- } else if(o.containment.constructor === Array) {
- this.containment = o.containment;
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
-
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var containment, co, top, left,
- o = this.options,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
- pageX = event.pageX,
- pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
- if(this.containment) {
- if (this.relative_container){
- co = this.relative_container.offset();
- containment = [ this.containment[0] + co.left,
- this.containment[1] + co.top,
- this.containment[2] + co.left,
- this.containment[3] + co.top ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) {
- pageX = containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < containment[1]) {
- pageY = containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > containment[2]) {
- pageX = containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > containment[3]) {
- pageY = containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- //The absolute position has to be recalculated after plugins
- if(type === "drag") {
- this.positionAbs = this._convertPositionTo("absolute");
- }
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function() {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, "ui-sortable");
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("ui-draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
- if(this.shouldRevert) {
- this.instance.options.revert = true;
- }
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper === "original") {
- this.instance.currentItem.css({ top: "auto", left: "auto" });
- }
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), that = this;
-
- $.each(inst.sortables, function() {
-
- var innermostIntersecting = false,
- thisSortable = this;
-
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this !== thisSortable &&
- this.instance._intersectsWith(this.instance.containerCache) &&
- $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])
- ) {
- innermostIntersecting = false;
- }
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) {
- this.instance._mouseDrag(event);
- }
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger("out", event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) {
- this.instance.placeholder.remove();
- }
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- }
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function() {
- var t = $("body"), o = $(this).data("ui-draggable").options;
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function() {
- var o = $(this).data("ui-draggable").options;
- if (o._cursor) {
- $("body").css("cursor", o._cursor);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function() {
- var i = $(this).data("ui-draggable");
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
- i.overflowOffset = i.scrollParent.offset();
- }
- },
- drag: function( event ) {
-
- var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
-
- if(!o.axis || o.axis !== "x") {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
- }
-
- } else {
-
- if(!o.axis || o.axis !== "x") {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
- }
-
- if(!o.axis || o.axis !== "y") {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(i, event);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function() {
-
- var i = $(this).data("ui-draggable"),
- o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $o = $t.offset();
- if(this !== i.element[0]) {
- i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- }
- });
-
- },
- drag: function(event, ui) {
-
- var ts, bs, ls, rs, l, r, t, b, i, first,
- inst = $(this).data("ui-draggable"),
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- l = inst.snapElements[i].left;
- r = l + inst.snapElements[i].width;
- t = inst.snapElements[i].top;
- b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
- if(inst.snapElements[i].snapping) {
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode !== "inner") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- rs = Math.abs(r - x1) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if(o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- rs = Math.abs(r - x2) <= d;
- if(ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- }
- if(bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- }
- if(ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- }
- if(rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function() {
-
- var min,
- o = $(this).data("ui-draggable").options,
- group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
-
- if (!group.length) { return; }
-
- min = parseInt(group[0].style.zIndex, 10) || 0;
- $(group).each(function(i) {
- this.style.zIndex = min + i;
- });
-
- this[0].style.zIndex = min + group.length;
-
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.droppable", {
- version: "1.10.0",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var i = 0,
- drop = $.ui.ddmanager.droppables[this.options.scope];
-
- for ( ; i < drop.length; i++ ) {
- if ( drop[i] === this ) {
- drop.splice(i, 1);
- }
- }
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key === "accept") {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.addClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("activate", event, this.ui(draggable));
- }
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(draggable){
- this._trigger("deactivate", event, this.ui(draggable));
- }
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.addClass(this.options.hoverClass);
- }
- this._trigger("over", event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("out", event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return false;
- }
-
- this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, "ui-droppable");
- if(
- inst.options.greedy &&
- !inst.options.disabled &&
- inst.options.scope === draggable.options.scope &&
- inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
- $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) {
- return false;
- }
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) {
- this.element.removeClass(this.options.activeClass);
- }
- if(this.options.hoverClass) {
- this.element.removeClass(this.options.hoverClass);
- }
- this._trigger("drop", event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) {
- return false;
- }
-
- var draggableLeft, draggableTop,
- x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case "fit":
- return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
- case "intersect":
- return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
- x2 - (draggable.helperProportions.width / 2) < r && // Left Half
- t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
- y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- case "pointer":
- draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
- return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
- case "touch":
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- default:
- return false;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function(t, event) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[t.options.scope] || [],
- type = event ? event.type : null, // workaround for #2317
- list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
-
- droppablesLoop: for (i = 0; i < m.length; i++) {
-
- //No disabled and non-accepted
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for (j=0; j < list.length; j++) {
- if(list[j] === m[i].element[0]) {
- m[i].proportions.height = 0;
- continue droppablesLoop;
- }
- }
-
- m[i].visible = m[i].element.css("display") !== "none";
- if(!m[i].visible) {
- continue;
- }
-
- //Activate the droppable if used directly from draggables
- if(type === "mousedown") {
- m[i]._activate.call(m[i], event);
- }
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(!this.options) {
- return;
- }
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
- dropped = this._drop.call(this, event) || dropped;
- }
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) {
- $.ui.ddmanager.prepareOffsets(draggable, event);
- }
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect(draggable, this, this.options.tolerance),
- c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
- if(!c) {
- return;
- }
-
- if (this.options.greedy) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents(":data(ui-droppable)").filter(function () {
- return $.data(this, "ui-droppable").options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], "ui-droppable");
- parentInstance.greedyChild = (c === "isover");
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c === "isover") {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c === "isout") {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.10.0",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass("ui-selected"),
- selecting: $this.hasClass("ui-selecting"),
- unselecting: $this.hasClass("ui-unselecting")
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled) {
- return;
- }
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
- }
-
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
-
- if (options.tolerance === "touch") {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance === "fit") {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
- } else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-/*jshint loopfunc: true */
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.10.0",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
- if(this === event.target) {
- validHandle = true;
- }
- });
- if(!validHandle) {
- return false;
- }
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var i,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if(o.cursor) { // cursor option
- if ($("body").css("cursor")) {
- this._storedCursor = $("body").css("cursor");
- }
- $("body").css("cursor", o.cursor);
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) {
- this._storedOpacity = this.helper.css("opacity");
- }
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) {
- this._storedZIndex = this.helper.css("zIndex");
- }
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
- this.overflowOffset = this.scrollParent.offset();
- }
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions) {
- this._cacheHelperProportions();
- }
-
-
- //Post "activate" events to possible containers
- if( !noActivation ) {
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
-
- //Rearrange
- for (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
- }
-
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset();
-
- this.reverting = true;
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- str = [];
- o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
- if (res) {
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
- }
- });
-
- if(!str.length && o.key) {
- str.push(o.key + "=");
- }
-
- return str.join("&");
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- ret = [];
-
- o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement) {
- return false;
- }
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta !== 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta !== 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
- }
- }
- }
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
- for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- }
- }
- }
-
- for (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
- continue;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- p = t.offset();
- item.left = p.left;
- item.top = p.top;
- }
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var el = $(document.createElement(that.currentItem[0].nodeName))
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper")[0];
-
- if(!className) {
- el.style.visibility = "hidden";
- }
-
- return el;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) {
- return;
- }
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) {
- return;
- }
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- posProperty = this.containers[innermostIndex].floating ? "left" : "top";
- sizeProperty = this.containers[innermostIndex].floating ? "width" : "height";
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var ce, co, over,
- o = this.options;
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) {
- pageX = this.containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < this.containment[1]) {
- pageY = this.containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > this.containment[2]) {
- pageX = this.containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > this.containment[3]) {
- pageY = this.containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
- }
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- }
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if(this._storedCursor) {
- $("body").css("cursor", this._storedCursor);
- }
- if(this._storedOpacity) {
- this.helper.css("opacity", this._storedOpacity);
- }
- if(this._storedZIndex) {
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
- }
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] !== this.currentItem[0]) {
- this.helper.remove();
- }
- this.helper = null;
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-;(jQuery.effects || (function($, undefined) {
-
-var dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- _addClass: $.fn.addClass,
- addClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- this._addClass( classNames );
- },
-
- _removeClass: $.fn.removeClass,
- removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
- },
-
- _toggleClass: $.fn.toggleClass,
- toggleClass: function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return this._toggleClass( classNames, force );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- },
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.10.0",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardSpeed( speed ) {
- // valid standard speeds
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
- return true;
- }
-
- // invalid strings - treat as "normal" speed
- return typeof speed === "string" && !$.effects.effect[ speed ];
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- _show: $.fn.show,
- show: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._show.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- },
-
- _hide: $.fn.hide,
- hide: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._hide.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- },
-
- // jQuery core overloads toggle and creates _toggle
- __toggle: $.fn.toggle,
- toggle: function( speed ) {
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
- return this.__toggle.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery));
+++ /dev/null
-/*!
- * jQuery Cycle Plugin (with Transition Definitions)
- * Examples and documentation at: http://jquery.malsup.com/cycle/
- * Copyright (c) 2007-2012 M. Alsup
- * Version: 2.9999.81 (15-JAN-2013)
- * Dual licensed under the MIT and GPL licenses.
- * http://jquery.malsup.com/license.html
- * Requires: jQuery v1.7.1 or later
- */
-;(function($, undefined) {
-"use strict";
-
-var ver = '2.9999.81';
-
-function debug(s) {
- if ($.fn.cycle.debug)
- log(s);
-}
-function log() {
- if (window.console && console.log)
- console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
-}
-$.expr[':'].paused = function(el) {
- return el.cyclePause;
-};
-
-
-// the options arg can be...
-// a number - indicates an immediate transition should occur to the given slide index
-// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
-// an object - properties to control the slideshow
-//
-// the arg2 arg can be...
-// the name of an fx (only used in conjunction with a numeric value for 'options')
-// the value true (only used in first arg == 'resume') and indicates
-// that the resume should occur immediately (not wait for next timeout)
-
-$.fn.cycle = function(options, arg2) {
- var o = { s: this.selector, c: this.context };
-
- // in 1.3+ we can fix mistakes with the ready state
- if (this.length === 0 && options != 'stop') {
- if (!$.isReady && o.s) {
- log('DOM not ready, queuing slideshow');
- $(function() {
- $(o.s,o.c).cycle(options,arg2);
- });
- return this;
- }
- // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
- log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
- return this;
- }
-
- // iterate the matched nodeset
- return this.each(function() {
- var opts = handleArguments(this, options, arg2);
- if (opts === false)
- return;
-
- opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
-
- // stop existing slideshow for this container (if there is one)
- if (this.cycleTimeout)
- clearTimeout(this.cycleTimeout);
- this.cycleTimeout = this.cyclePause = 0;
- this.cycleStop = 0; // issue #108
-
- var $cont = $(this);
- var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
- var els = $slides.get();
-
- if (els.length < 2) {
- log('terminating; too few slides: ' + els.length);
- return;
- }
-
- var opts2 = buildOptions($cont, $slides, els, opts, o);
- if (opts2 === false)
- return;
-
- var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
-
- // if it's an auto slideshow, kick it off
- if (startTime) {
- startTime += (opts2.delay || 0);
- if (startTime < 10)
- startTime = 10;
- debug('first timeout: ' + startTime);
- this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
- }
- });
-};
-
-function triggerPause(cont, byHover, onPager) {
- var opts = $(cont).data('cycle.opts');
- if (!opts)
- return;
- var paused = !!cont.cyclePause;
- if (paused && opts.paused)
- opts.paused(cont, opts, byHover, onPager);
- else if (!paused && opts.resumed)
- opts.resumed(cont, opts, byHover, onPager);
-}
-
-// process the args that were passed to the plugin fn
-function handleArguments(cont, options, arg2) {
- if (cont.cycleStop === undefined)
- cont.cycleStop = 0;
- if (options === undefined || options === null)
- options = {};
- if (options.constructor == String) {
- switch(options) {
- case 'destroy':
- case 'stop':
- var opts = $(cont).data('cycle.opts');
- if (!opts)
- return false;
- cont.cycleStop++; // callbacks look for change
- if (cont.cycleTimeout)
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- if (opts.elements)
- $(opts.elements).stop();
- $(cont).removeData('cycle.opts');
- if (options == 'destroy')
- destroy(cont, opts);
- return false;
- case 'toggle':
- cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
- checkInstantResume(cont.cyclePause, arg2, cont);
- triggerPause(cont);
- return false;
- case 'pause':
- cont.cyclePause = 1;
- triggerPause(cont);
- return false;
- case 'resume':
- cont.cyclePause = 0;
- checkInstantResume(false, arg2, cont);
- triggerPause(cont);
- return false;
- case 'prev':
- case 'next':
- opts = $(cont).data('cycle.opts');
- if (!opts) {
- log('options not found, "prev/next" ignored');
- return false;
- }
- $.fn.cycle[options](opts);
- return false;
- default:
- options = { fx: options };
- }
- return options;
- }
- else if (options.constructor == Number) {
- // go to the requested slide
- var num = options;
- options = $(cont).data('cycle.opts');
- if (!options) {
- log('options not found, can not advance slide');
- return false;
- }
- if (num < 0 || num >= options.elements.length) {
- log('invalid slide index: ' + num);
- return false;
- }
- options.nextSlide = num;
- if (cont.cycleTimeout) {
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- }
- if (typeof arg2 == 'string')
- options.oneTimeFx = arg2;
- go(options.elements, options, 1, num >= options.currSlide);
- return false;
- }
- return options;
-
- function checkInstantResume(isPaused, arg2, cont) {
- if (!isPaused && arg2 === true) { // resume now!
- var options = $(cont).data('cycle.opts');
- if (!options) {
- log('options not found, can not resume');
- return false;
- }
- if (cont.cycleTimeout) {
- clearTimeout(cont.cycleTimeout);
- cont.cycleTimeout = 0;
- }
- go(options.elements, options, 1, !options.backwards);
- }
- }
-}
-
-function removeFilter(el, opts) {
- if (!$.support.opacity && opts.cleartype && el.style.filter) {
- try { el.style.removeAttribute('filter'); }
- catch(smother) {} // handle old opera versions
- }
-}
-
-// unbind event handlers
-function destroy(cont, opts) {
- if (opts.next)
- $(opts.next).unbind(opts.prevNextEvent);
- if (opts.prev)
- $(opts.prev).unbind(opts.prevNextEvent);
-
- if (opts.pager || opts.pagerAnchorBuilder)
- $.each(opts.pagerAnchors || [], function() {
- this.unbind().remove();
- });
- opts.pagerAnchors = null;
- $(cont).unbind('mouseenter.cycle mouseleave.cycle');
- if (opts.destroy) // callback
- opts.destroy(opts);
-}
-
-// one-time initialization
-function buildOptions($cont, $slides, els, options, o) {
- var startingSlideSpecified;
- // support metadata plugin (v1.0 and v2.0)
- var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
- var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
- if (meta)
- opts = $.extend(opts, meta);
- if (opts.autostop)
- opts.countdown = opts.autostopCount || els.length;
-
- var cont = $cont[0];
- $cont.data('cycle.opts', opts);
- opts.$cont = $cont;
- opts.stopCount = cont.cycleStop;
- opts.elements = els;
- opts.before = opts.before ? [opts.before] : [];
- opts.after = opts.after ? [opts.after] : [];
-
- // push some after callbacks
- if (!$.support.opacity && opts.cleartype)
- opts.after.push(function() { removeFilter(this, opts); });
- if (opts.continuous)
- opts.after.push(function() { go(els,opts,0,!opts.backwards); });
-
- saveOriginalOpts(opts);
-
- // clearType corrections
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
- clearTypeFix($slides);
-
- // container requires non-static position so that slides can be position within
- if ($cont.css('position') == 'static')
- $cont.css('position', 'relative');
- if (opts.width)
- $cont.width(opts.width);
- if (opts.height && opts.height != 'auto')
- $cont.height(opts.height);
-
- if (opts.startingSlide !== undefined) {
- opts.startingSlide = parseInt(opts.startingSlide,10);
- if (opts.startingSlide >= els.length || opts.startSlide < 0)
- opts.startingSlide = 0; // catch bogus input
- else
- startingSlideSpecified = true;
- }
- else if (opts.backwards)
- opts.startingSlide = els.length - 1;
- else
- opts.startingSlide = 0;
-
- // if random, mix up the slide array
- if (opts.random) {
- opts.randomMap = [];
- for (var i = 0; i < els.length; i++)
- opts.randomMap.push(i);
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- if (startingSlideSpecified) {
- // try to find the specified starting slide and if found set start slide index in the map accordingly
- for ( var cnt = 0; cnt < els.length; cnt++ ) {
- if ( opts.startingSlide == opts.randomMap[cnt] ) {
- opts.randomIndex = cnt;
- }
- }
- }
- else {
- opts.randomIndex = 1;
- opts.startingSlide = opts.randomMap[1];
- }
- }
- else if (opts.startingSlide >= els.length)
- opts.startingSlide = 0; // catch bogus input
- opts.currSlide = opts.startingSlide || 0;
- var first = opts.startingSlide;
-
- // set position and zIndex on all the slides
- $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
- var z;
- if (opts.backwards)
- z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
- else
- z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
- $(this).css('z-index', z);
- });
-
- // make sure first slide is visible
- $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
- removeFilter(els[first], opts);
-
- // stretch slides
- if (opts.fit) {
- if (!opts.aspect) {
- if (opts.width)
- $slides.width(opts.width);
- if (opts.height && opts.height != 'auto')
- $slides.height(opts.height);
- } else {
- $slides.each(function(){
- var $slide = $(this);
- var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
- if( opts.width && $slide.width() != opts.width ) {
- $slide.width( opts.width );
- $slide.height( opts.width / ratio );
- }
-
- if( opts.height && $slide.height() < opts.height ) {
- $slide.height( opts.height );
- $slide.width( opts.height * ratio );
- }
- });
- }
- }
-
- if (opts.center && ((!opts.fit) || opts.aspect)) {
- $slides.each(function(){
- var $slide = $(this);
- $slide.css({
- "margin-left": opts.width ?
- ((opts.width - $slide.width()) / 2) + "px" :
- 0,
- "margin-top": opts.height ?
- ((opts.height - $slide.height()) / 2) + "px" :
- 0
- });
- });
- }
-
- if (opts.center && !opts.fit && !opts.slideResize) {
- $slides.each(function(){
- var $slide = $(this);
- $slide.css({
- "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
- "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
- });
- });
- }
-
- // stretch container
- var reshape = (opts.containerResize || opts.containerResizeHeight) && !$cont.innerHeight();
- if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
- var maxw = 0, maxh = 0;
- for(var j=0; j < els.length; j++) {
- var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
- if (!w) w = e.offsetWidth || e.width || $e.attr('width');
- if (!h) h = e.offsetHeight || e.height || $e.attr('height');
- maxw = w > maxw ? w : maxw;
- maxh = h > maxh ? h : maxh;
- }
- if (opts.containerResize && maxw > 0 && maxh > 0)
- $cont.css({width:maxw+'px',height:maxh+'px'});
- if (opts.containerResizeHeight && maxh > 0)
- $cont.css({height:maxh+'px'});
- }
-
- var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
- if (opts.pause)
- $cont.bind('mouseenter.cycle', function(){
- pauseFlag = true;
- this.cyclePause++;
- triggerPause(cont, true);
- }).bind('mouseleave.cycle', function(){
- if (pauseFlag)
- this.cyclePause--;
- triggerPause(cont, true);
- });
-
- if (supportMultiTransitions(opts) === false)
- return false;
-
- // apparently a lot of people use image slideshows without height/width attributes on the images.
- // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
- var requeue = false;
- options.requeueAttempts = options.requeueAttempts || 0;
- $slides.each(function() {
- // try to get height/width of each slide
- var $el = $(this);
- this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
- this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
-
- if ( $el.is('img') ) {
- var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
- // don't requeue for images that are still loading but have a valid size
- if (loading) {
- if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
- log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
- setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
- requeue = true;
- return false; // break each loop
- }
- else {
- log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
- }
- }
- }
- return true;
- });
-
- if (requeue)
- return false;
-
- opts.cssBefore = opts.cssBefore || {};
- opts.cssAfter = opts.cssAfter || {};
- opts.cssFirst = opts.cssFirst || {};
- opts.animIn = opts.animIn || {};
- opts.animOut = opts.animOut || {};
-
- $slides.not(':eq('+first+')').css(opts.cssBefore);
- $($slides[first]).css(opts.cssFirst);
-
- if (opts.timeout) {
- opts.timeout = parseInt(opts.timeout,10);
- // ensure that timeout and speed settings are sane
- if (opts.speed.constructor == String)
- opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
- if (!opts.sync)
- opts.speed = opts.speed / 2;
-
- var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
- while((opts.timeout - opts.speed) < buffer) // sanitize timeout
- opts.timeout += opts.speed;
- }
- if (opts.easing)
- opts.easeIn = opts.easeOut = opts.easing;
- if (!opts.speedIn)
- opts.speedIn = opts.speed;
- if (!opts.speedOut)
- opts.speedOut = opts.speed;
-
- opts.slideCount = els.length;
- opts.currSlide = opts.lastSlide = first;
- if (opts.random) {
- if (++opts.randomIndex == els.length)
- opts.randomIndex = 0;
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else if (opts.backwards)
- opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
- else
- opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
-
- // run transition init fn
- if (!opts.multiFx) {
- var init = $.fn.cycle.transitions[opts.fx];
- if ($.isFunction(init))
- init($cont, $slides, opts);
- else if (opts.fx != 'custom' && !opts.multiFx) {
- log('unknown transition: ' + opts.fx,'; slideshow terminating');
- return false;
- }
- }
-
- // fire artificial events
- var e0 = $slides[first];
- if (!opts.skipInitializationCallbacks) {
- if (opts.before.length)
- opts.before[0].apply(e0, [e0, e0, opts, true]);
- if (opts.after.length)
- opts.after[0].apply(e0, [e0, e0, opts, true]);
- }
- if (opts.next)
- $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
- if (opts.prev)
- $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
- if (opts.pager || opts.pagerAnchorBuilder)
- buildPager(els,opts);
-
- exposeAddSlide(opts, els);
-
- return opts;
-}
-
-// save off original opts so we can restore after clearing state
-function saveOriginalOpts(opts) {
- opts.original = { before: [], after: [] };
- opts.original.cssBefore = $.extend({}, opts.cssBefore);
- opts.original.cssAfter = $.extend({}, opts.cssAfter);
- opts.original.animIn = $.extend({}, opts.animIn);
- opts.original.animOut = $.extend({}, opts.animOut);
- $.each(opts.before, function() { opts.original.before.push(this); });
- $.each(opts.after, function() { opts.original.after.push(this); });
-}
-
-function supportMultiTransitions(opts) {
- var i, tx, txs = $.fn.cycle.transitions;
- // look for multiple effects
- if (opts.fx.indexOf(',') > 0) {
- opts.multiFx = true;
- opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
- // discard any bogus effect names
- for (i=0; i < opts.fxs.length; i++) {
- var fx = opts.fxs[i];
- tx = txs[fx];
- if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
- log('discarding unknown transition: ',fx);
- opts.fxs.splice(i,1);
- i--;
- }
- }
- // if we have an empty list then we threw everything away!
- if (!opts.fxs.length) {
- log('No valid transitions named; slideshow terminating.');
- return false;
- }
- }
- else if (opts.fx == 'all') { // auto-gen the list of transitions
- opts.multiFx = true;
- opts.fxs = [];
- for (var p in txs) {
- if (txs.hasOwnProperty(p)) {
- tx = txs[p];
- if (txs.hasOwnProperty(p) && $.isFunction(tx))
- opts.fxs.push(p);
- }
- }
- }
- if (opts.multiFx && opts.randomizeEffects) {
- // munge the fxs array to make effect selection random
- var r1 = Math.floor(Math.random() * 20) + 30;
- for (i = 0; i < r1; i++) {
- var r2 = Math.floor(Math.random() * opts.fxs.length);
- opts.fxs.push(opts.fxs.splice(r2,1)[0]);
- }
- debug('randomized fx sequence: ',opts.fxs);
- }
- return true;
-}
-
-// provide a mechanism for adding slides after the slideshow has started
-function exposeAddSlide(opts, els) {
- opts.addSlide = function(newSlide, prepend) {
- var $s = $(newSlide), s = $s[0];
- if (!opts.autostopCount)
- opts.countdown++;
- els[prepend?'unshift':'push'](s);
- if (opts.els)
- opts.els[prepend?'unshift':'push'](s); // shuffle needs this
- opts.slideCount = els.length;
-
- // add the slide to the random map and resort
- if (opts.random) {
- opts.randomMap.push(opts.slideCount-1);
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- }
-
- $s.css('position','absolute');
- $s[prepend?'prependTo':'appendTo'](opts.$cont);
-
- if (prepend) {
- opts.currSlide++;
- opts.nextSlide++;
- }
-
- if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
- clearTypeFix($s);
-
- if (opts.fit && opts.width)
- $s.width(opts.width);
- if (opts.fit && opts.height && opts.height != 'auto')
- $s.height(opts.height);
- s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
- s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
-
- $s.css(opts.cssBefore);
-
- if (opts.pager || opts.pagerAnchorBuilder)
- $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
-
- if ($.isFunction(opts.onAddSlide))
- opts.onAddSlide($s);
- else
- $s.hide(); // default behavior
- };
-}
-
-// reset internal state; we do this on every pass in order to support multiple effects
-$.fn.cycle.resetState = function(opts, fx) {
- fx = fx || opts.fx;
- opts.before = []; opts.after = [];
- opts.cssBefore = $.extend({}, opts.original.cssBefore);
- opts.cssAfter = $.extend({}, opts.original.cssAfter);
- opts.animIn = $.extend({}, opts.original.animIn);
- opts.animOut = $.extend({}, opts.original.animOut);
- opts.fxFn = null;
- $.each(opts.original.before, function() { opts.before.push(this); });
- $.each(opts.original.after, function() { opts.after.push(this); });
-
- // re-init
- var init = $.fn.cycle.transitions[fx];
- if ($.isFunction(init))
- init(opts.$cont, $(opts.elements), opts);
-};
-
-// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
-function go(els, opts, manual, fwd) {
- var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
-
- // opts.busy is true if we're in the middle of an animation
- if (manual && opts.busy && opts.manualTrump) {
- // let manual transitions requests trump active ones
- debug('manualTrump in go(), stopping active transition');
- $(els).stop(true,true);
- opts.busy = 0;
- clearTimeout(p.cycleTimeout);
- }
-
- // don't begin another timeout-based transition if there is one active
- if (opts.busy) {
- debug('transition active, ignoring new tx request');
- return;
- }
-
-
- // stop cycling if we have an outstanding stop request
- if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
- return;
-
- // check to see if we should stop cycling based on autostop options
- if (!manual && !p.cyclePause && !opts.bounce &&
- ((opts.autostop && (--opts.countdown <= 0)) ||
- (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
- if (opts.end)
- opts.end(opts);
- return;
- }
-
- // if slideshow is paused, only transition on a manual trigger
- var changed = false;
- if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
- changed = true;
- var fx = opts.fx;
- // keep trying to get the slide size if we don't have it yet
- curr.cycleH = curr.cycleH || $(curr).height();
- curr.cycleW = curr.cycleW || $(curr).width();
- next.cycleH = next.cycleH || $(next).height();
- next.cycleW = next.cycleW || $(next).width();
-
- // support multiple transition types
- if (opts.multiFx) {
- if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
- opts.lastFx = 0;
- else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
- opts.lastFx = opts.fxs.length - 1;
- fx = opts.fxs[opts.lastFx];
- }
-
- // one-time fx overrides apply to: $('div').cycle(3,'zoom');
- if (opts.oneTimeFx) {
- fx = opts.oneTimeFx;
- opts.oneTimeFx = null;
- }
-
- $.fn.cycle.resetState(opts, fx);
-
- // run the before callbacks
- if (opts.before.length)
- $.each(opts.before, function(i,o) {
- if (p.cycleStop != opts.stopCount) return;
- o.apply(next, [curr, next, opts, fwd]);
- });
-
- // stage the after callacks
- var after = function() {
- opts.busy = 0;
- $.each(opts.after, function(i,o) {
- if (p.cycleStop != opts.stopCount) return;
- o.apply(next, [curr, next, opts, fwd]);
- });
- if (!p.cycleStop) {
- // queue next transition
- queueNext();
- }
- };
-
- debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
-
- // get ready to perform the transition
- opts.busy = 1;
- if (opts.fxFn) // fx function provided?
- opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
- $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- else
- $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
- }
- else {
- queueNext();
- }
-
- if (changed || opts.nextSlide == opts.currSlide) {
- // calculate the next slide
- var roll;
- opts.lastSlide = opts.currSlide;
- if (opts.random) {
- opts.currSlide = opts.nextSlide;
- if (++opts.randomIndex == els.length) {
- opts.randomIndex = 0;
- opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
- }
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- if (opts.nextSlide == opts.currSlide)
- opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
- }
- else if (opts.backwards) {
- roll = (opts.nextSlide - 1) < 0;
- if (roll && opts.bounce) {
- opts.backwards = !opts.backwards;
- opts.nextSlide = 1;
- opts.currSlide = 0;
- }
- else {
- opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
- opts.currSlide = roll ? 0 : opts.nextSlide+1;
- }
- }
- else { // sequence
- roll = (opts.nextSlide + 1) == els.length;
- if (roll && opts.bounce) {
- opts.backwards = !opts.backwards;
- opts.nextSlide = els.length-2;
- opts.currSlide = els.length-1;
- }
- else {
- opts.nextSlide = roll ? 0 : opts.nextSlide+1;
- opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
- }
- }
- }
- if (changed && opts.pager)
- opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
-
- function queueNext() {
- // stage the next transition
- var ms = 0, timeout = opts.timeout;
- if (opts.timeout && !opts.continuous) {
- ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
- if (opts.fx == 'shuffle')
- ms -= opts.speedOut;
- }
- else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
- ms = 10;
- if (ms > 0)
- p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
- }
-}
-
-// invoked after transition
-$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
- $(pager).each(function() {
- $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
- });
-};
-
-// calculate timeout value for current transition
-function getTimeout(curr, next, opts, fwd) {
- if (opts.timeoutFn) {
- // call user provided calc fn
- var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
- while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
- t += opts.speed;
- debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
- if (t !== false)
- return t;
- }
- return opts.timeout;
-}
-
-// expose next/prev function, caller must pass in state
-$.fn.cycle.next = function(opts) { advance(opts,1); };
-$.fn.cycle.prev = function(opts) { advance(opts,0);};
-
-// advance slide forward or back
-function advance(opts, moveForward) {
- var val = moveForward ? 1 : -1;
- var els = opts.elements;
- var p = opts.$cont[0], timeout = p.cycleTimeout;
- if (timeout) {
- clearTimeout(timeout);
- p.cycleTimeout = 0;
- }
- if (opts.random && val < 0) {
- // move back to the previously display slide
- opts.randomIndex--;
- if (--opts.randomIndex == -2)
- opts.randomIndex = els.length-2;
- else if (opts.randomIndex == -1)
- opts.randomIndex = els.length-1;
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else if (opts.random) {
- opts.nextSlide = opts.randomMap[opts.randomIndex];
- }
- else {
- opts.nextSlide = opts.currSlide + val;
- if (opts.nextSlide < 0) {
- if (opts.nowrap) return false;
- opts.nextSlide = els.length - 1;
- }
- else if (opts.nextSlide >= els.length) {
- if (opts.nowrap) return false;
- opts.nextSlide = 0;
- }
- }
-
- var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
- if ($.isFunction(cb))
- cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
- go(els, opts, 1, moveForward);
- return false;
-}
-
-function buildPager(els, opts) {
- var $p = $(opts.pager);
- $.each(els, function(i,o) {
- $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
- });
- opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
-}
-
-$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
- var a;
- if ($.isFunction(opts.pagerAnchorBuilder)) {
- a = opts.pagerAnchorBuilder(i,el);
- debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
- }
- else
- a = '<a href="#">'+(i+1)+'</a>';
-
- if (!a)
- return;
- var $a = $(a);
- // don't reparent if anchor is in the dom
- if ($a.parents('body').length === 0) {
- var arr = [];
- if ($p.length > 1) {
- $p.each(function() {
- var $clone = $a.clone(true);
- $(this).append($clone);
- arr.push($clone[0]);
- });
- $a = $(arr);
- }
- else {
- $a.appendTo($p);
- }
- }
-
- opts.pagerAnchors = opts.pagerAnchors || [];
- opts.pagerAnchors.push($a);
-
- var pagerFn = function(e) {
- e.preventDefault();
- opts.nextSlide = i;
- var p = opts.$cont[0], timeout = p.cycleTimeout;
- if (timeout) {
- clearTimeout(timeout);
- p.cycleTimeout = 0;
- }
- var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
- if ($.isFunction(cb))
- cb(opts.nextSlide, els[opts.nextSlide]);
- go(els,opts,1,opts.currSlide < i); // trigger the trans
-// return false; // <== allow bubble
- };
-
- if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
- $a.hover(pagerFn, function(){/* no-op */} );
- }
- else {
- $a.bind(opts.pagerEvent, pagerFn);
- }
-
- if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
- $a.bind('click.cycle', function(){return false;}); // suppress click
-
- var cont = opts.$cont[0];
- var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
- if (opts.pauseOnPagerHover) {
- $a.hover(
- function() {
- pauseFlag = true;
- cont.cyclePause++;
- triggerPause(cont,true,true);
- }, function() {
- if (pauseFlag)
- cont.cyclePause--;
- triggerPause(cont,true,true);
- }
- );
- }
-};
-
-// helper fn to calculate the number of slides between the current and the next
-$.fn.cycle.hopsFromLast = function(opts, fwd) {
- var hops, l = opts.lastSlide, c = opts.currSlide;
- if (fwd)
- hops = c > l ? c - l : opts.slideCount - l;
- else
- hops = c < l ? l - c : l + opts.slideCount - c;
- return hops;
-};
-
-// fix clearType problems in ie6 by setting an explicit bg color
-// (otherwise text slides look horrible during a fade transition)
-function clearTypeFix($slides) {
- debug('applying clearType background-color hack');
- function hex(s) {
- s = parseInt(s,10).toString(16);
- return s.length < 2 ? '0'+s : s;
- }
- function getBg(e) {
- for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
- var v = $.css(e,'background-color');
- if (v && v.indexOf('rgb') >= 0 ) {
- var rgb = v.match(/\d+/g);
- return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
- }
- if (v && v != 'transparent')
- return v;
- }
- return '#ffffff';
- }
- $slides.each(function() { $(this).css('background-color', getBg(this)); });
-}
-
-// reset common props before the next transition
-$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
- $(opts.elements).not(curr).hide();
- if (typeof opts.cssBefore.opacity == 'undefined')
- opts.cssBefore.opacity = 1;
- opts.cssBefore.display = 'block';
- if (opts.slideResize && w !== false && next.cycleW > 0)
- opts.cssBefore.width = next.cycleW;
- if (opts.slideResize && h !== false && next.cycleH > 0)
- opts.cssBefore.height = next.cycleH;
- opts.cssAfter = opts.cssAfter || {};
- opts.cssAfter.display = 'none';
- $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
- $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
-};
-
-// the actual fn for effecting a transition
-$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
- var $l = $(curr), $n = $(next);
- var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
- $n.css(opts.cssBefore);
- if (speedOverride) {
- if (typeof speedOverride == 'number')
- speedIn = speedOut = speedOverride;
- else
- speedIn = speedOut = 1;
- easeIn = easeOut = null;
- }
- var fn = function() {
- $n.animate(opts.animIn, speedIn, easeIn, function() {
- cb();
- });
- };
- $l.animate(opts.animOut, speedOut, easeOut, function() {
- $l.css(opts.cssAfter);
- if (!opts.sync)
- fn();
- });
- if (opts.sync) fn();
-};
-
-// transition definitions - only fade is defined here, transition pack defines the rest
-$.fn.cycle.transitions = {
- fade: function($cont, $slides, opts) {
- $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
- opts.before.push(function(curr,next,opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.opacity = 0;
- });
- opts.animIn = { opacity: 1 };
- opts.animOut = { opacity: 0 };
- opts.cssBefore = { top: 0, left: 0 };
- }
-};
-
-$.fn.cycle.ver = function() { return ver; };
-
-// override these globally if you like (they are all optional)
-$.fn.cycle.defaults = {
- activePagerClass: 'activeSlide', // class name used for the active pager link
- after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
- allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
- animIn: null, // properties that define how the slide animates in
- animOut: null, // properties that define how the slide animates out
- aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
- autostop: 0, // true to end slideshow after X transitions (where X == slide count)
- autostopCount: 0, // number of transitions (optionally used with autostop to define X)
- backwards: false, // true to start slideshow at last slide and move backwards through the stack
- before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
- center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
- cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
- cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
- containerResize: 1, // resize container to fit largest slide
- containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic
- continuous: 0, // true to start next transition immediately after current one completes
- cssAfter: null, // properties that defined the state of the slide after transitioning out
- cssBefore: null, // properties that define the initial state of the slide before transitioning in
- delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
- easeIn: null, // easing for "in" transition
- easeOut: null, // easing for "out" transition
- easing: null, // easing method for both in and out transitions
- end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
- fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
- fit: 0, // force slides to fit container
- fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
- fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
- height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
- manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
- metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
- next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
- nowrap: 0, // true to prevent slideshow from wrapping
- onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
- onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
- pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
- pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
- pagerEvent: 'click.cycle', // name of event which drives the pager navigation
- pause: 0, // true to enable "pause on hover"
- pauseOnPagerHover: 0, // true to pause when hovering over pager link
- prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
- prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
- random: 0, // true for random, false for sequence (not applicable to shuffle fx)
- randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
- requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
- requeueTimeout: 250, // ms delay for requeue
- rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
- shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
- skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
- slideExpr: null, // expression for selecting slides (if something other than all children is required)
- slideResize: 1, // force slide width/height to fixed size before every transition
- speed: 1000, // speed of the transition (any valid fx speed value)
- speedIn: null, // speed of the 'in' transition
- speedOut: null, // speed of the 'out' transition
- startingSlide: undefined,// zero-based index of the first slide to be displayed
- sync: 1, // true if in/out transitions should occur simultaneously
- timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
- timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
- updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
- width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
-};
-
-})(jQuery);
-
-
-/*!
- * jQuery Cycle Plugin Transition Definitions
- * This script is a plugin for the jQuery Cycle Plugin
- * Examples and documentation at: http://malsup.com/jquery/cycle/
- * Copyright (c) 2007-2010 M. Alsup
- * Version: 2.73
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-(function($) {
-"use strict";
-
-//
-// These functions define slide initialization and properties for the named
-// transitions. To save file size feel free to remove any of these that you
-// don't need.
-//
-$.fn.cycle.transitions.none = function($cont, $slides, opts) {
- opts.fxFn = function(curr,next,opts,after){
- $(next).show();
- $(curr).hide();
- after();
- };
-};
-
-// not a cross-fade, fadeout only fades out the top slide
-$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
- $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
- opts.before.push(function(curr,next,opts,w,h,rev) {
- $(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
- $(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
- });
- opts.animIn.opacity = 1;
- opts.animOut.opacity = 0;
- opts.cssBefore.opacity = 1;
- opts.cssBefore.display = 'block';
- opts.cssAfter.zIndex = 0;
-};
-
-// scrollUp/Down/Left/Right
-$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var h = $cont.height();
- opts.cssBefore.top = h;
- opts.cssBefore.left = 0;
- opts.cssFirst.top = 0;
- opts.animIn.top = 0;
- opts.animOut.top = -h;
-};
-$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var h = $cont.height();
- opts.cssFirst.top = 0;
- opts.cssBefore.top = -h;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.top = h;
-};
-$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var w = $cont.width();
- opts.cssFirst.left = 0;
- opts.cssBefore.left = w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = 0-w;
-};
-$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push($.fn.cycle.commonReset);
- var w = $cont.width();
- opts.cssFirst.left = 0;
- opts.cssBefore.left = -w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = w;
-};
-$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
- $cont.css('overflow','hidden').width();
- opts.before.push(function(curr, next, opts, fwd) {
- if (opts.rev)
- fwd = !fwd;
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
- opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
- });
- opts.cssFirst.left = 0;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.top = 0;
-};
-$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
- $cont.css('overflow','hidden');
- opts.before.push(function(curr, next, opts, fwd) {
- if (opts.rev)
- fwd = !fwd;
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
- opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.left = 0;
-};
-
-// slideX/slideY
-$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $(opts.elements).not(curr).hide();
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.animIn.width = next.cycleW;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
- opts.animIn.width = 'show';
- opts.animOut.width = 0;
-};
-$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $(opts.elements).not(curr).hide();
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.animIn.height = next.cycleH;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.height = 0;
- opts.animIn.height = 'show';
- opts.animOut.height = 0;
-};
-
-// shuffle
-$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
- var i, w = $cont.css('overflow', 'visible').width();
- $slides.css({left: 0, top: 0});
- opts.before.push(function(curr,next,opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- });
- // only adjust speed once!
- if (!opts.speedAdjusted) {
- opts.speed = opts.speed / 2; // shuffle has 2 transitions
- opts.speedAdjusted = true;
- }
- opts.random = 0;
- opts.shuffle = opts.shuffle || {left:-w, top:15};
- opts.els = [];
- for (i=0; i < $slides.length; i++)
- opts.els.push($slides[i]);
-
- for (i=0; i < opts.currSlide; i++)
- opts.els.push(opts.els.shift());
-
- // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
- opts.fxFn = function(curr, next, opts, cb, fwd) {
- if (opts.rev)
- fwd = !fwd;
- var $el = fwd ? $(curr) : $(next);
- $(next).css(opts.cssBefore);
- var count = opts.slideCount;
- $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
- var hops = $.fn.cycle.hopsFromLast(opts, fwd);
- for (var k=0; k < hops; k++) {
- if (fwd)
- opts.els.push(opts.els.shift());
- else
- opts.els.unshift(opts.els.pop());
- }
- if (fwd) {
- for (var i=0, len=opts.els.length; i < len; i++)
- $(opts.els[i]).css('z-index', len-i+count);
- }
- else {
- var z = $(curr).css('z-index');
- $el.css('z-index', parseInt(z,10)+1+count);
- }
- $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
- $(fwd ? this : curr).hide();
- if (cb) cb();
- });
- });
- };
- $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
-};
-
-// turnUp/Down/Left/Right
-$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.cssBefore.top = next.cycleH;
- opts.animIn.height = next.cycleH;
- opts.animOut.width = next.cycleW;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.cssBefore.height = 0;
- opts.animIn.top = 0;
- opts.animOut.height = 0;
-};
-$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssFirst.top = 0;
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.height = 0;
- opts.animOut.height = 0;
-};
-$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.cssBefore.left = next.cycleW;
- opts.animIn.width = next.cycleW;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
- opts.animIn.left = 0;
- opts.animOut.width = 0;
-};
-$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.animIn.width = next.cycleW;
- opts.animOut.left = curr.cycleW;
- });
- $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
- opts.animIn.left = 0;
- opts.animOut.width = 0;
-};
-
-// zoom
-$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,false,true);
- opts.cssBefore.top = next.cycleH/2;
- opts.cssBefore.left = next.cycleW/2;
- $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
- $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
- });
- opts.cssFirst.top = 0;
- opts.cssFirst.left = 0;
- opts.cssBefore.width = 0;
- opts.cssBefore.height = 0;
-};
-
-// fadeZoom
-$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,false);
- opts.cssBefore.left = next.cycleW/2;
- opts.cssBefore.top = next.cycleH/2;
- $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
- });
- opts.cssBefore.width = 0;
- opts.cssBefore.height = 0;
- opts.animOut.opacity = 0;
-};
-
-// blindX
-$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
- var w = $cont.css('overflow','hidden').width();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.width = next.cycleW;
- opts.animOut.left = curr.cycleW;
- });
- opts.cssBefore.left = w;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
- opts.animOut.left = w;
-};
-// blindY
-$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
- var h = $cont.css('overflow','hidden').height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssBefore.top = h;
- opts.cssBefore.left = 0;
- opts.animIn.top = 0;
- opts.animOut.top = h;
-};
-// blindZ
-$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
- var h = $cont.css('overflow','hidden').height();
- var w = $cont.width();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH;
- });
- opts.cssBefore.top = h;
- opts.cssBefore.left = w;
- opts.animIn.top = 0;
- opts.animIn.left = 0;
- opts.animOut.top = h;
- opts.animOut.left = w;
-};
-
-// growX - grow horizontally from centered 0 width
-$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true);
- opts.cssBefore.left = this.cycleW/2;
- opts.animIn.left = 0;
- opts.animIn.width = this.cycleW;
- opts.animOut.left = 0;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
-};
-// growY - grow vertically from centered 0 height
-$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false);
- opts.cssBefore.top = this.cycleH/2;
- opts.animIn.top = 0;
- opts.animIn.height = this.cycleH;
- opts.animOut.top = 0;
- });
- opts.cssBefore.height = 0;
- opts.cssBefore.left = 0;
-};
-
-// curtainX - squeeze in both edges horizontally
-$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,false,true,true);
- opts.cssBefore.left = next.cycleW/2;
- opts.animIn.left = 0;
- opts.animIn.width = this.cycleW;
- opts.animOut.left = curr.cycleW/2;
- opts.animOut.width = 0;
- });
- opts.cssBefore.top = 0;
- opts.cssBefore.width = 0;
-};
-// curtainY - squeeze in both edges vertically
-$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,false,true);
- opts.cssBefore.top = next.cycleH/2;
- opts.animIn.top = 0;
- opts.animIn.height = next.cycleH;
- opts.animOut.top = curr.cycleH/2;
- opts.animOut.height = 0;
- });
- opts.cssBefore.height = 0;
- opts.cssBefore.left = 0;
-};
-
-// cover - curr slide covered by next slide
-$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
- var d = opts.direction || 'left';
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts);
- opts.cssAfter.display = '';
- if (d == 'right')
- opts.cssBefore.left = -w;
- else if (d == 'up')
- opts.cssBefore.top = h;
- else if (d == 'down')
- opts.cssBefore.top = -h;
- else
- opts.cssBefore.left = w;
- });
- opts.animIn.left = 0;
- opts.animIn.top = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.left = 0;
-};
-
-// uncover - curr slide moves off next slide
-$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
- var d = opts.direction || 'left';
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- if (d == 'right')
- opts.animOut.left = w;
- else if (d == 'up')
- opts.animOut.top = -h;
- else if (d == 'down')
- opts.animOut.top = h;
- else
- opts.animOut.left = -w;
- });
- opts.animIn.left = 0;
- opts.animIn.top = 0;
- opts.cssBefore.top = 0;
- opts.cssBefore.left = 0;
-};
-
-// toss - move top slide and fade away
-$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
- var w = $cont.css('overflow','visible').width();
- var h = $cont.height();
- opts.before.push(function(curr, next, opts) {
- $.fn.cycle.commonReset(curr,next,opts,true,true,true);
- // provide default toss settings if animOut not provided
- if (!opts.animOut.left && !opts.animOut.top)
- $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
- else
- opts.animOut.opacity = 0;
- });
- opts.cssBefore.left = 0;
- opts.cssBefore.top = 0;
- opts.animIn.left = 0;
-};
-
-// wipe - clip animation
-$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
- var w = $cont.css('overflow','hidden').width();
- var h = $cont.height();
- opts.cssBefore = opts.cssBefore || {};
- var clip;
- if (opts.clip) {
- if (/l2r/.test(opts.clip))
- clip = 'rect(0px 0px '+h+'px 0px)';
- else if (/r2l/.test(opts.clip))
- clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
- else if (/t2b/.test(opts.clip))
- clip = 'rect(0px '+w+'px 0px 0px)';
- else if (/b2t/.test(opts.clip))
- clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
- else if (/zoom/.test(opts.clip)) {
- var top = parseInt(h/2,10);
- var left = parseInt(w/2,10);
- clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
- }
- }
-
- opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
-
- var d = opts.cssBefore.clip.match(/(\d+)/g);
- var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
-
- opts.before.push(function(curr, next, opts) {
- if (curr == next) return;
- var $curr = $(curr), $next = $(next);
- $.fn.cycle.commonReset(curr,next,opts,true,true,false);
- opts.cssAfter.display = 'block';
-
- var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
- (function f() {
- var tt = t ? t - parseInt(step * (t/count),10) : 0;
- var ll = l ? l - parseInt(step * (l/count),10) : 0;
- var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
- var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
- $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
- (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
- })();
- });
- $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
- opts.animIn = { left: 0 };
- opts.animOut = { left: 0 };
-};
-
-})(jQuery);
+++ /dev/null
-(function($){
-$(function() {
-
-
-function scrollTo(thing) {
- $('html, body').scrollTop($(thing).offset().top - $('#level-chooser').outerHeight());
-}
-
-function updateView() {
- var scrolltop = $(window).scrollTop();
-
- $('#level-chooser-place').each(function(i, el){
- if (scrolltop > $(el).offset().top) {
- $("#level-chooser").addClass("fixed");
- }
- else {
- $("#level-chooser").removeClass("fixed");
- }
- });
-
- $('.level-toc').each(function(i, el) {
- var $sect = $($(el).parent());
- var menu_top = $('#level-chooser').outerHeight();
- var menu_scrolltop = scrolltop + menu_top;
-
- if (menu_scrolltop + 2 >= $sect.offset().top &&
- menu_scrolltop < $sect.offset().top + $sect.outerHeight()) {
- $(el).addClass("fixed").css("top", Math.min(
- menu_top,
- - scrolltop + $sect.offset().top + $sect.outerHeight() - $(el).outerHeight()
- ));
- $("#level-chooser a[href='#" + $sect.attr('id') + "']").addClass('active');
- }
- else {
- $(el).removeClass("fixed");
- $("#level-chooser a[href='#" + $sect.attr('id') + "']").removeClass('active');
- }
- });
-}
-
-
-
-$("#level-chooser a, .level-toc a").click(function(ev) {
- ev.preventDefault();
- scrollTo($(this).attr('href'));
-});
-
-
-
-
-
-updateView();
-$(document).scroll(updateView);
-if (window.location.hash) {
- scrollTo(window.location.hash);
-}
-
-
-});
-})(jQuery);
+++ /dev/null
-(function($){
-$(function() {
-
-
-$('a.image').colorbox({
- maxWidth: '100%',
- maxHeight: '100%',
-});
-
-
-});
-})($);
text-align: center;
margin: auto;
margin-bottom: .8em; }
- header.main nav .menu-lekcje:before {
- background: url(../img/menu/lekcje.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-kompetencje:before {
- background: url(../img/menu/katalog.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-wspolpraca:before {
- background: url(../img/menu/wspolpraca.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-szkolenia:before {
- background: url(../img/menu/szkolenia.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-wesprzyj:before {
- background: url(../img/menu/wesprzyj.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-o-nas:before {
- background: url(../img/menu/o-nas.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-kontakt:before {
- background: url(../img/menu/kontakt.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-lekcje:hover:before {
- background: url(../img/menu/lekcje_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-kompetencje:hover:before {
- background: url(../img/menu/katalog_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-wspolpraca:hover:before {
- background: url(../img/menu/wspolpraca_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-szkolenia:hover:before {
- background: url(../img/menu/szkolenia_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-wesprzyj:hover:before {
- background: url(../img/menu/wesprzyj_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-o-nas:hover:before {
- background: url(../img/menu/o-nas_active.png) no-repeat 0 0;
- background-size: 100%; }
- header.main nav .menu-kontakt:hover:before {
- background: url(../img/menu/kontakt_active.png) no-repeat 0 0;
- background-size: 100%; }
header.main nav .menu-oc-program:before {
background: url(../img/menu/olimpiada/program.png) no-repeat 0 0;
background-size: 100%; }
margin: auto;
margin-bottom: .8em;
}
- .menu-lekcje:before { background: url(../img/menu/lekcje.png) no-repeat 0 0; background-size: 100%;}
- .menu-kompetencje:before { background: url(../img/menu/katalog.png) no-repeat 0 0; background-size: 100%;}
- .menu-wspolpraca:before { background: url(../img/menu/wspolpraca.png) no-repeat 0 0; background-size: 100%;}
- .menu-szkolenia:before { background: url(../img/menu/szkolenia.png) no-repeat 0 0; background-size: 100%;}
- .menu-wesprzyj:before { background: url(../img/menu/wesprzyj.png) no-repeat 0 0; background-size: 100%;}
- .menu-o-nas:before { background: url(../img/menu/o-nas.png) no-repeat 0 0; background-size: 100%;}
- .menu-kontakt:before { background: url(../img/menu/kontakt.png) no-repeat 0 0; background-size: 100%;}
- .menu-lekcje:hover:before { background: url(../img/menu/lekcje_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-kompetencje:hover:before { background: url(../img/menu/katalog_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-wspolpraca:hover:before { background: url(../img/menu/wspolpraca_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-szkolenia:hover:before { background: url(../img/menu/szkolenia_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-wesprzyj:hover:before { background: url(../img/menu/wesprzyj_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-o-nas:hover:before { background: url(../img/menu/o-nas_active.png) no-repeat 0 0; background-size: 100%;}
- .menu-kontakt:hover:before { background: url(../img/menu/kontakt_active.png) no-repeat 0 0; background-size: 100%;}
.menu-oc-program:before { background: url(../img/menu/olimpiada/program.png) no-repeat 0 0; background-size: 100%;}
.menu-oc-harmonogram:before { background: url(../img/menu/olimpiada/harmonogram.png) no-repeat 0 0; background-size: 100%;}
+++ /dev/null
-ul.breadcrumb {
- margin: 0;
- padding: 0;
- list-style: none; }
- ul.breadcrumb li {
- display: inline; }
-
-.forum-body {
- position: relative;
- /* --- Unread --- */
- /* --- Moderation --- */
- /* --- Mini pagination --- */ }
- .forum-body .search-result em {
- background-color: yellow; }
- .forum-body .pagination ul {
- margin: 0;
- padding: 0;
- list-style: none; }
- .forum-body .pagination ul li {
- display: inline-block; }
- .forum-body .pagination ul li a {
- display: block;
- padding: .5em; }
- .forum-body .pagination ul .disabled a {
- color: black; }
- .forum-body .table {
- width: 100%;
- margin: 1em 0; }
- .forum-body .forum-description {
- margin: 5px; }
- .forum-body .forum-row, .forum-body .topic-row {
- width: 100%; }
- .forum-body .forum-name, .forum-body .topic-name {
- width: 40%;
- text-align: left; }
- .forum-body .forum-topic-count, .forum-body .forum-post-count, .forum-body .topic-post-count, .forum-body .topic-view-count {
- width: 10%;
- text-align: center; }
- .forum-body .forum-last-post, .forum-body .topic-last-post {
- width: 32%;
- text-align: center; }
- .forum-body .first-unread-post-link, .forum-body .first-unread-post-link:hover {
- text-decoration: none; }
- .forum-body .post:nth-child(4n+4) {
- background-color: #eaeaea; }
- .forum-body .post-header {
- padding: 3px 0 3px 20px; }
- .forum-body .post-header th {
- text-align: left; }
- .forum-body .post-info {
- width: 200px;
- padding: 10px; }
- .forum-body .post-info .post-author {
- padding: 5px 0; }
- .forum-body .post-content {
- vertical-align: top;
- padding: 10px; }
- .forum-body .post-signature {
- color: #CCC;
- margin-top: 15px;
- border-top: 1px dotted #cccccc;
- display: block; }
- .forum-body .post-related {
- margin-top: 20px; }
- .forum-body .forum-headline {
- margin-top: 10px; }
- .forum-body .attachments-form {
- padding-bottom: 15px; }
- .forum-body .attachment-link {
- border-bottom: 1px dotted; }
- .forum-body .state-indicator {
- display: block;
- float: left;
- height: 10px;
- width: 10px;
- margin: 3px 5px; }
- .forum-body .topic-unread a, .forum-body .forum-unread a {
- font-weight: bold; }
- .forum-body .on-moderation {
- background: #ffcccc; }
- .forum-body .mini-pagination {
- padding: 3px 0 3px 10px; }
- .forum-body .post-form input, .forum-body .post-form textarea {
- font-family: Dosis;
- background: white;
- color: #363a3e;
- font-size: 1.6em; }
- .forum-body .post-form #id_name {
- width: 698px; }
+++ /dev/null
-@import "mixins";
-
-
-ul.breadcrumb {
- margin: 0;
- padding: 0;
- list-style: none;
- li {
- display: inline;
- }
-}
-
-
-
-.forum-body {
-
- position: relative;
-
- .search-result {
- em {
- background-color: yellow;
- }
- }
-
- .pagination {
- ul {
- margin: 0;
- padding: 0;
- list-style: none;
-
- li {
- display: inline-block;
- a {
- display: block;
- padding: .5em;
- }
- }
-
- .disabled {
- a {
- color: black;
- }
- }
- }
- }
-
- .table {
- width: 100%;
- margin: 1em 0;
- }
-
- .forum-description {
- margin: 5px;
- }
-
- .forum-row, .topic-row {
- width: 100%;
- }
-
- .forum-name, .topic-name {
- width: 40%;
- text-align: left;
- }
-
- .forum-topic-count, .forum-post-count, .topic-post-count, .topic-view-count {
- width: 10%;
- text-align: center;
- }
-
- .forum-last-post, .topic-last-post {
- width: 32%;
- text-align: center;
- }
-
- .first-unread-post-link, .first-unread-post-link:hover {
- text-decoration: none;
- }
-
-
-
- .post:nth-child(4n+4) {
- background-color: lighten(#D0D0D0 , 10%);
- }
-
- .post-header {
- padding: 3px 0 3px 20px;
- th {
- text-align: left;
- }
- }
-
- .post-info {
- width: 200px;
- padding: 10px;
-
- .avatar {
-
- }
-
- .post-author {
- padding: 5px 0;
- }
-
- .post-extra-info {
- }
-
- .post-controls {
- }
- }
-
- .post-content {
- vertical-align: top;
- padding: 10px;
- }
-
- .post-signature {
- color: #CCC;
- margin-top: 15px;
- border-top: 1px dotted #CCC;
- display: block;
- }
-
- .post-related {
- margin-top: 20px;
- }
-
-
-
-
- .forum-headline {
- margin-top: 10px;
- }
-
- .attachments-form {
- padding-bottom: 15px;
- }
-
- .attachment-link {
- border-bottom: 1px dotted;
- }
-
- /* --- Unread --- */
-
- .state-indicator {
- display: block;
- float: left;
- height: 10px;
- width: 10px;
- margin: 3px 5px;
- }
-
- .topic-unread, .forum-unread {
- a {
- font-weight: bold;
- }
- .state-indicator {
- }
- }
-
- /* --- Moderation --- */
- .on-moderation {
- background: #ffcccc;
- }
-
- /* --- Mini pagination --- */
- .mini-pagination {
- padding: 3px 0 3px 10px;
- }
-
-
- .post-form {
- input, textarea {
- @include base-font;
- font-size: 1.6em;
- }
- #id_name {
- width: 698px;
- }
- }
-}
+++ /dev/null
-header.header-mil {
- background-color: #f47b3b; }
- header.header-mil #organizer {
- color: white;
- float: none;
- position: absolute;
- top: 10px;
- right: 12px; }
- header.header-mil nav ul {
- margin-top: 0; }
- header.header-mil nav ul li {
- vertical-align: text-bottom; }
- header.header-mil nav a, header.header-mil nav a:hover {
- color: white; }
- header.header-mil nav a:before {
- content: " ";
- display: block;
- margin-bottom: .8em;
- width: 5.5em;
- height: 4.25em;
- text-align: center;
- margin: auto;
- margin-bottom: .8em; }
- header.header-mil nav .menu-consultations:before {
- background: url(../img/menu/mil/consultations.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .menu-takepart:before {
- background: url(../img/menu/mil/takepart.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .menu-knowledgebase:before {
- background: url(../img/menu/mil/knowledgebase.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .menu-kompetencje:before, header.header-mil nav .menu-kontakt:before {
- width: 3.625em;
- height: 2.8125em; }
- header.header-mil nav .menu-kompetencje:before, header.header-mil nav .menu-kompetencje:hover:before {
- background: url(../img/menu/mil/catalog.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .menu-kontakt:before, header.header-mil nav .menu-kontakt:hover:before {
- background: url(../img/menu/mil/contact.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .lang-switcher-en:before {
- background: url(../img/menu/mil/lang_en.png) no-repeat 0 0;
- background-size: 100%; }
- header.header-mil nav .lang-switcher-pl:before {
- background: url(../img/menu/mil/lang_pl.png) no-repeat 0 0;
- background-size: 100%; }
+++ /dev/null
-@import "vars";
-
-header.header-mil {
-
- background-color: #f47b3b;
-
- #organizer {
- color: white;
- float: none;
- position: absolute;
- top: 10px;
- right:12px;
- }
-
- nav {
- ul {
- margin-top: 0;
- li {
- vertical-align: text-bottom;
- }
- }
-
- a,a:hover {
- color: white;
- }
-
- a:before {
- content: " ";
- display: block;
- margin-bottom: .8em;
- width: 88*$px;
- height: 68*$px;
- text-align:center;
- margin: auto;
- margin-bottom: .8em;
- }
-
- .menu-consultations:before { background: url(../img/menu/mil/consultations.png) no-repeat 0 0; background-size: 100%;}
- .menu-takepart:before { background: url(../img/menu/mil/takepart.png) no-repeat 0 0; background-size: 100%;}
- .menu-knowledgebase:before { background: url(../img/menu/mil/knowledgebase.png) no-repeat 0 0; background-size: 100%;}
-
- .menu-kompetencje:before, .menu-kontakt:before {
- width: 58*$px;
- height: 45*$px;
- }
-
- .menu-kompetencje:before, .menu-kompetencje:hover:before {
- background: url(../img/menu/mil/catalog.png) no-repeat 0 0; background-size: 100%;
- }
- .menu-kontakt:before, .menu-kontakt:hover:before {
- background: url(../img/menu/mil/contact.png) no-repeat 0 0; background-size: 100%;
- }
-
- .lang-switcher-en:before { background: url(../img/menu/mil/lang_en.png) no-repeat 0 0; background-size: 100%;}
- .lang-switcher-pl:before { background: url(../img/menu/mil/lang_pl.png) no-repeat 0 0; background-size: 100%;}
- }
-}
\ No newline at end of file
+++ /dev/null
-/*TODO: delete cause is not used*/
-
-#main-promobox {
- h1 {
- color: white;
- margin: 0;
- background: red;
- }
-}
\ No newline at end of file
--- /dev/null
+/*! jQuery UI - v1.10.0 - 2013-01-24
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js
+* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
+
+(function( $, undefined ) {
+
+var uuid = 0,
+ runiqueId = /^ui-id-\d+$/;
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+ return;
+}
+
+$.extend( $.ui, {
+ version: "1.10.0",
+
+ keyCode: {
+ BACKSPACE: 8,
+ COMMA: 188,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+});
+
+// plugins
+$.fn.extend({
+ _focus: $.fn.focus,
+ focus: function( delay, fn ) {
+ return typeof delay === "number" ?
+ this.each(function() {
+ var elem = this;
+ setTimeout(function() {
+ $( elem ).focus();
+ if ( fn ) {
+ fn.call( elem );
+ }
+ }, delay );
+ }) :
+ this._focus.apply( this, arguments );
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
+ },
+
+ zIndex: function( zIndex ) {
+ if ( zIndex !== undefined ) {
+ return this.css( "zIndex", zIndex );
+ }
+
+ if ( this.length ) {
+ var elem = $( this[ 0 ] ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
+ // This makes behavior of this function consistent across browsers
+ // WebKit always returns auto if the element is positioned
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ // IE returns 0 when zIndex is not specified
+ // other browsers return a string
+ // we ignore the case of nested elements with an explicit value of 0
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ }
+
+ return 0;
+ },
+
+ uniqueId: function() {
+ return this.each(function() {
+ if ( !this.id ) {
+ this.id = "ui-id-" + (++uuid);
+ }
+ });
+ },
+
+ removeUniqueId: function() {
+ return this.each(function() {
+ if ( runiqueId.test( this.id ) ) {
+ $( this ).removeAttr( "id" );
+ }
+ });
+ }
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+ var map, mapName, img,
+ nodeName = element.nodeName.toLowerCase();
+ if ( "area" === nodeName ) {
+ map = element.parentNode;
+ mapName = map.name;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap=#" + mapName + "]" )[0];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
+ !element.disabled :
+ "a" === nodeName ?
+ element.href || isTabIndexNotNaN :
+ isTabIndexNotNaN) &&
+ // the element and all of its ancestors must be visible
+ visible( element );
+}
+
+function visible( element ) {
+ return $.expr.filters.visible( element ) &&
+ !$( element ).parents().addBack().filter(function() {
+ return $.css( this, "visibility" ) === "hidden";
+ }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo(function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ }) :
+ // support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
+
+ focusable: function( element ) {
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+ },
+
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+ }
+});
+
+// support: jQuery <1.8
+if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+ $.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+ }
+ });
+ return size;
+ }
+
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+
+ return this.each(function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ });
+ };
+
+ $.fn[ "outer" + name] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each(function() {
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
+ });
+ };
+ });
+}
+
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
+// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+ $.fn.removeData = (function( removeData ) {
+ return function( key ) {
+ if ( arguments.length ) {
+ return removeData.call( this, $.camelCase( key ) );
+ } else {
+ return removeData.call( this );
+ }
+ };
+ })( $.fn.removeData );
+}
+
+
+
+
+
+// deprecated
+$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+$.support.selectstart = "onselectstart" in document.createElement( "div" );
+$.fn.extend({
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
+ }
+});
+
+$.extend( $.ui, {
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function( module, option, set ) {
+ var i,
+ proto = $.ui[ module ].prototype;
+ for ( i in set ) {
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
+ }
+ },
+ call: function( instance, name, args ) {
+ var i,
+ set = instance.plugins[ name ];
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
+ return;
+ }
+
+ for ( i = 0; i < set.length; i++ ) {
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
+ set[ i ][ 1 ].apply( instance.element, args );
+ }
+ }
+ }
+ },
+
+ // only used by resizable
+ hasScroll: function( el, a ) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ( $( el ).css( "overflow" ) === "hidden") {
+ return false;
+ }
+
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+ has = false;
+
+ if ( el[ scroll ] > 0 ) {
+ return true;
+ }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ el[ scroll ] = 0;
+ return has;
+ }
+});
+
+})( jQuery );
+(function( $, undefined ) {
+
+var uuid = 0,
+ slice = Array.prototype.slice,
+ _cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ try {
+ $( elem ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ }
+ _cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+ var fullName, existingConstructor, constructor, basePrototype,
+ // proxiedPrototype allows the provided prototype to remain unmodified
+ // so that it can be used as a mixin for multiple widgets (#8876)
+ proxiedPrototype = {},
+ namespace = name.split( "." )[ 0 ];
+
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
+ // allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+ // extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+ // copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+ // track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ });
+
+ basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( !$.isFunction( value ) ) {
+ proxiedPrototype[ prop ] = value;
+ return;
+ }
+ proxiedPrototype[ prop ] = (function() {
+ var _super = function() {
+ return base.prototype[ prop ].apply( this, arguments );
+ },
+ _superApply = function( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ };
+ return function() {
+ var __super = this._super,
+ __superApply = this._superApply,
+ returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ })();
+ });
+ constructor.prototype = $.widget.extend( basePrototype, {
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+ }, proxiedPrototype, {
+ constructor: constructor,
+ namespace: namespace,
+ widgetName: name,
+ widgetFullName: fullName
+ });
+
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+ });
+ // remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+ var input = slice.call( arguments, 1 ),
+ inputIndex = 0,
+ inputLength = input.length,
+ key,
+ value;
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
+$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = slice.call( arguments, 1 ),
+ returnValue = this;
+
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length ?
+ $.widget.extend.apply( null, [ options ].concat(args) ) :
+ options;
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var methodValue,
+ instance = $.data( this, fullName );
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, fullName );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, fullName, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ defaultElement: "<div>",
+ options: {
+ disabled: false,
+
+ // callbacks
+ create: null
+ },
+ _createWidget: function( options, element ) {
+ element = $( element || this.defaultElement || this )[ 0 ];
+ this.element = $( element );
+ this.uuid = uuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+
+ if ( element !== this ) {
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ });
+ this.document = $( element.style ?
+ // element within the document
+ element.ownerDocument :
+ // element is window or document
+ element.document || element );
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+ }
+
+ this._create();
+ this._trigger( "create", null, this._getCreateEventData() );
+ this._init();
+ },
+ _getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
+ _create: $.noop,
+ _init: $.noop,
+
+ destroy: function() {
+ this._destroy();
+ // we can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
+ this.element
+ .unbind( this.eventNamespace )
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ .removeData( this.widgetName )
+ .removeData( this.widgetFullName )
+ // support: jquery <1.6.3
+ // http://bugs.jquery.com/ticket/9413
+ .removeData( $.camelCase( this.widgetFullName ) );
+ this.widget()
+ .unbind( this.eventNamespace )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetFullName + "-disabled " +
+ "ui-state-disabled" );
+
+ // clean up events and states
+ this.bindings.unbind( this.eventNamespace );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ },
+ _destroy: $.noop,
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key,
+ parts,
+ curOption,
+ i;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.widget.extend( {}, this.options );
+ }
+
+ if ( typeof key === "string" ) {
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( value === undefined ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( value === undefined ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
+ }
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var key;
+
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+ .attr( "aria-disabled", value );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement,
+ instance = this;
+
+ // no suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // no element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ // accept selectors, DOM elements
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+ // allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^(\w+)\s*(.*)$/ ),
+ eventName = match[1] + instance.eventNamespace,
+ selector = match[2];
+ if ( selector ) {
+ delegateElement.delegate( selector, eventName, handlerProxy );
+ } else {
+ element.bind( eventName, handlerProxy );
+ }
+ });
+ },
+
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
+ }
+ });
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
+ }
+ });
+ },
+
+ _trigger: function( type, event, data ) {
+ var prop, orig,
+ callback = this.options[ type ];
+
+ data = data || {};
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ // the original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.element[ 0 ];
+
+ // copy original event properties over to the new event
+ orig = event.originalEvent;
+ if ( orig ) {
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ }
+
+ this.element.trigger( event, data );
+ return !( $.isFunction( callback ) &&
+ callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ if ( typeof options === "string" ) {
+ options = { effect: options };
+ }
+ var hasOptions,
+ effectName = !options ?
+ method :
+ options === true || typeof options === "number" ?
+ defaultEffect :
+ options.effect || defaultEffect;
+ options = options || {};
+ if ( typeof options === "number" ) {
+ options = { duration: options };
+ }
+ hasOptions = !$.isEmptyObject( options );
+ options.complete = callback;
+ if ( options.delay ) {
+ element.delay( options.delay );
+ }
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+ element[ method ]( options );
+ } else if ( effectName !== method && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element.queue(function( next ) {
+ $( this )[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ next();
+ });
+ }
+ };
+});
+
+})( jQuery );
+(function( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function() {
+ mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+ version: "1.10.0",
+ options: {
+ cancel: "input,textarea,button,select,option",
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var that = this;
+
+ this.element
+ .bind("mousedown."+this.widgetName, function(event) {
+ return that._mouseDown(event);
+ })
+ .bind("click."+this.widgetName, function(event) {
+ if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
+ $.removeData(event.target, that.widgetName + ".preventClickEvent");
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind("."+this.widgetName);
+ if ( this._mouseMoveDelegate ) {
+ $(document)
+ .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+ }
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ if( mouseHandled ) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var that = this,
+ btnIsLeft = (event.which === 1),
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ that.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // Click event may never have fired (Gecko & Opera)
+ if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
+ $.removeData(event.target, this.widgetName + ".preventClickEvent");
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return that._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return that._mouseUp(event);
+ };
+ $(document)
+ .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
+
+ event.preventDefault();
+
+ mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+ .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+
+ if (event.target === this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + ".preventClickEvent", true);
+ }
+
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(/* event */) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(/* event */) {},
+ _mouseDrag: function(/* event */) {},
+ _mouseStop: function(/* event */) {},
+ _mouseCapture: function(/* event */) { return true; }
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+ version: "1.10.0",
+ widgetEventPrefix: "drag",
+ options: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false,
+
+ // callbacks
+ drag: null,
+ start: null,
+ stop: null
+ },
+ _create: function() {
+
+ if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
+ this.element[0].style.position = "relative";
+ }
+ if (this.options.addClasses){
+ this.element.addClass("ui-draggable");
+ }
+ if (this.options.disabled){
+ this.element.addClass("ui-draggable-disabled");
+ }
+
+ this._mouseInit();
+
+ },
+
+ _destroy: function() {
+ this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ // among others, prevent a drag on a resizable-handle
+ if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
+ return false;
+ }
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle) {
+ return false;
+ }
+
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
+ .css({
+ width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+ position: "absolute", opacity: "0.001", zIndex: 1000
+ })
+ .css($(this).offset())
+ .appendTo("body");
+ });
+
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ this.helper.addClass("ui-draggable-dragging");
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.current = this;
+ }
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css("position");
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.positionAbs = this.element.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this.position = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Set a containment if given in the options
+ if(o.containment) {
+ this._setContainment();
+ }
+
+ //Trigger event + callbacks
+ if(this._trigger("start", event) === false) {
+ this._clear();
+ return false;
+ }
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStart(this, event);
+ }
+
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if (!noPropagation) {
+ var ui = this._uiHash();
+ if(this._trigger("drag", event, ui) === false) {
+ this._mouseUp({});
+ return false;
+ }
+ this.position = ui.position;
+ }
+
+ if(!this.options.axis || this.options.axis !== "y") {
+ this.helper[0].style.left = this.position.left+"px";
+ }
+ if(!this.options.axis || this.options.axis !== "x") {
+ this.helper[0].style.top = this.position.top+"px";
+ }
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.drag(this, event);
+ }
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ //If we are using droppables, inform the manager about the drop
+ var element,
+ that = this,
+ elementInDom = false,
+ dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour) {
+ dropped = $.ui.ddmanager.drop(this, event);
+ }
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ //if the original element is no longer in the DOM don't bother to continue (see #8269)
+ element = this.element[0];
+ while ( element && (element = element.parentNode) ) {
+ if (element === document ) {
+ elementInDom = true;
+ }
+ }
+ if ( !elementInDom && this.options.helper === "original" ) {
+ return false;
+ }
+
+ if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ if(that._trigger("stop", event) !== false) {
+ that._clear();
+ }
+ });
+ } else {
+ if(this._trigger("stop", event) !== false) {
+ this._clear();
+ }
+ }
+
+ return false;
+ },
+
+ _mouseUp: function(event) {
+ //Remove frame helpers
+ $("div.ui-draggable-iframeFix").each(function() {
+ this.parentNode.removeChild(this);
+ });
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+ if( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStop(this, event);
+ }
+
+ return $.ui.mouse.prototype._mouseUp.call(this, event);
+ },
+
+ cancel: function() {
+
+ if(this.helper.is(".ui-draggable-dragging")) {
+ this._mouseUp({});
+ } else {
+ this._clear();
+ }
+
+ return this;
+
+ },
+
+ _getHandle: function(event) {
+
+ var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+ $(this.options.handle, this.element)
+ .find("*")
+ .addBack()
+ .each(function() {
+ if(this === event.target) {
+ handle = true;
+ }
+ });
+
+ return handle;
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options,
+ helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
+
+ if(!helper.parents("body").length) {
+ helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
+ }
+
+ if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
+ helper.css("position", "absolute");
+ }
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj === "string") {
+ obj = obj.split(" ");
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ("left" in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ("right" in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ("top" in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ("bottom" in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ //Ugly IE fix
+ if((this.offsetParent[0] === document.body) ||
+ (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+ po = { top: 0, left: 0 };
+ }
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition === "relative") {
+ var p = this.element.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.element.css("marginLeft"),10) || 0),
+ top: (parseInt(this.element.css("marginTop"),10) || 0),
+ right: (parseInt(this.element.css("marginRight"),10) || 0),
+ bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var over, c, ce,
+ o = this.options;
+
+ if(o.containment === "parent") {
+ o.containment = this.helper[0].parentNode;
+ }
+ if(o.containment === "document" || o.containment === "window") {
+ this.containment = [
+ o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+ o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+ (o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
+ (o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) {
+ c = $(o.containment);
+ ce = c[0];
+
+ if(!ce) {
+ return;
+ }
+
+ over = ($(ce).css("overflow") !== "hidden");
+
+ this.containment = [
+ (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+ (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
+ (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+ (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
+ ];
+ this.relative_container = c;
+
+ } else if(o.containment.constructor === Array) {
+ this.containment = o.containment;
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) {
+ pos = this.position;
+ }
+
+ var mod = d === "absolute" ? 1 : -1,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top + // The absolute mouse position
+ this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left + // The absolute mouse position
+ this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var containment, co, top, left,
+ o = this.options,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
+ scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
+ pageX = event.pageX,
+ pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+ if(this.containment) {
+ if (this.relative_container){
+ co = this.relative_container.offset();
+ containment = [ this.containment[0] + co.left,
+ this.containment[1] + co.top,
+ this.containment[2] + co.left,
+ this.containment[3] + co.top ];
+ }
+ else {
+ containment = this.containment;
+ }
+
+ if(event.pageX - this.offset.click.left < containment[0]) {
+ pageX = containment[0] + this.offset.click.left;
+ }
+ if(event.pageY - this.offset.click.top < containment[1]) {
+ pageY = containment[1] + this.offset.click.top;
+ }
+ if(event.pageX - this.offset.click.left > containment[2]) {
+ pageX = containment[2] + this.offset.click.left;
+ }
+ if(event.pageY - this.offset.click.top > containment[3]) {
+ pageY = containment[3] + this.offset.click.top;
+ }
+ }
+
+ if(o.grid) {
+ //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+ top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+ pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+ pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY - // The absolute mouse position
+ this.offset.click.top - // Click offset (relative to the element)
+ this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX - // The absolute mouse position
+ this.offset.click.left - // Click offset (relative to the element)
+ this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging");
+ if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
+ this.helper.remove();
+ }
+ this.helper = null;
+ this.cancelHelperRemoval = false;
+ },
+
+ // From now on bulk stuff - mainly helpers
+
+ _trigger: function(type, event, ui) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call(this, type, [event, ui]);
+ //The absolute position has to be recalculated after plugins
+ if(type === "drag") {
+ this.positionAbs = this._convertPositionTo("absolute");
+ }
+ return $.Widget.prototype._trigger.call(this, type, event, ui);
+ },
+
+ plugins: {},
+
+ _uiHash: function() {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ };
+ }
+
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(event, ui) {
+
+ var inst = $(this).data("ui-draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
+ inst.sortables = [];
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, "ui-sortable");
+ if (sortable && !sortable.options.disabled) {
+ inst.sortables.push({
+ instance: sortable,
+ shouldRevert: sortable.options.revert
+ });
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+ sortable._trigger("activate", event, uiSortable);
+ }
+ });
+
+ },
+ stop: function(event, ui) {
+
+ //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+ var inst = $(this).data("ui-draggable"),
+ uiSortable = $.extend({}, ui, { item: inst.element });
+
+ $.each(inst.sortables, function() {
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+
+ inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+ this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+ //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
+ if(this.shouldRevert) {
+ this.instance.options.revert = true;
+ }
+
+ //Trigger the stop of the sortable
+ this.instance._mouseStop(event);
+
+ this.instance.options.helper = this.instance.options._helper;
+
+ //If the helper has been the original item, restore properties in the sortable
+ if(inst.options.helper === "original") {
+ this.instance.currentItem.css({ top: "auto", left: "auto" });
+ }
+
+ } else {
+ this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+ this.instance._trigger("deactivate", event, uiSortable);
+ }
+
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("ui-draggable"), that = this;
+
+ $.each(inst.sortables, function() {
+
+ var innermostIntersecting = false,
+ thisSortable = this;
+
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
+ innermostIntersecting = true;
+ $.each(inst.sortables, function () {
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+ if (this !== thisSortable &&
+ this.instance._intersectsWith(this.instance.containerCache) &&
+ $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])
+ ) {
+ innermostIntersecting = false;
+ }
+ return innermostIntersecting;
+ });
+ }
+
+
+ if(innermostIntersecting) {
+ //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+ if(!this.instance.isOver) {
+
+ this.instance.isOver = 1;
+ //Now we fake the start of dragging for the sortable instance,
+ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+ //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+ this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
+ this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+ this.instance.options.helper = function() { return ui.helper[0]; };
+
+ event.target = this.instance.currentItem[0];
+ this.instance._mouseCapture(event, true);
+ this.instance._mouseStart(event, true, true);
+
+ //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+ this.instance.offset.click.top = inst.offset.click.top;
+ this.instance.offset.click.left = inst.offset.click.left;
+ this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+ this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+ inst._trigger("toSortable", event);
+ inst.dropped = this.instance.element; //draggable revert needs that
+ //hack so receive/update callbacks work (mostly)
+ inst.currentItem = inst.element;
+ this.instance.fromOutside = inst;
+
+ }
+
+ //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+ if(this.instance.currentItem) {
+ this.instance._mouseDrag(event);
+ }
+
+ } else {
+
+ //If it doesn't intersect with the sortable, and it intersected before,
+ //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+ this.instance.cancelHelperRemoval = true;
+
+ //Prevent reverting on this forced stop
+ this.instance.options.revert = false;
+
+ // The out event needs to be triggered independently
+ this.instance._trigger("out", event, this.instance._uiHash(this.instance));
+
+ this.instance._mouseStop(event, true);
+ this.instance.options.helper = this.instance.options._helper;
+
+ //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+ this.instance.currentItem.remove();
+ if(this.instance.placeholder) {
+ this.instance.placeholder.remove();
+ }
+
+ inst._trigger("fromSortable", event);
+ inst.dropped = false; //draggable revert needs that
+ }
+
+ }
+
+ });
+
+ }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+ start: function() {
+ var t = $("body"), o = $(this).data("ui-draggable").options;
+ if (t.css("cursor")) {
+ o._cursor = t.css("cursor");
+ }
+ t.css("cursor", o.cursor);
+ },
+ stop: function() {
+ var o = $(this).data("ui-draggable").options;
+ if (o._cursor) {
+ $("body").css("cursor", o._cursor);
+ }
+ }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+ if(t.css("opacity")) {
+ o._opacity = t.css("opacity");
+ }
+ t.css("opacity", o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("ui-draggable").options;
+ if(o._opacity) {
+ $(ui.helper).css("opacity", o._opacity);
+ }
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function() {
+ var i = $(this).data("ui-draggable");
+ if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+ i.overflowOffset = i.scrollParent.offset();
+ }
+ },
+ drag: function( event ) {
+
+ var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
+
+ if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+
+ if(!o.axis || o.axis !== "x") {
+ if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+ } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+ }
+
+ if(!o.axis || o.axis !== "y") {
+ if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+ } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+ }
+
+ } else {
+
+ if(!o.axis || o.axis !== "x") {
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+ }
+
+ if(!o.axis || o.axis !== "y") {
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(i, event);
+ }
+
+ }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+ start: function() {
+
+ var i = $(this).data("ui-draggable"),
+ o = i.options;
+
+ i.snapElements = [];
+
+ $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
+ var $t = $(this),
+ $o = $t.offset();
+ if(this !== i.element[0]) {
+ i.snapElements.push({
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ });
+ }
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var ts, bs, ls, rs, l, r, t, b, i, first,
+ inst = $(this).data("ui-draggable"),
+ o = inst.options,
+ d = o.snapTolerance,
+ x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (i = inst.snapElements.length - 1; i >= 0; i--){
+
+ l = inst.snapElements[i].left;
+ r = l + inst.snapElements[i].width;
+ t = inst.snapElements[i].top;
+ b = t + inst.snapElements[i].height;
+
+ //Yes, I know, this is insane ;)
+ if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+ if(inst.snapElements[i].snapping) {
+ (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ }
+ inst.snapElements[i].snapping = false;
+ continue;
+ }
+
+ if(o.snapMode !== "inner") {
+ ts = Math.abs(t - y2) <= d;
+ bs = Math.abs(b - y1) <= d;
+ ls = Math.abs(l - x2) <= d;
+ rs = Math.abs(r - x1) <= d;
+ if(ts) {
+ ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ }
+ if(bs) {
+ ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+ }
+ if(ls) {
+ ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+ }
+ if(rs) {
+ ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+ }
+ }
+
+ first = (ts || bs || ls || rs);
+
+ if(o.snapMode !== "outer") {
+ ts = Math.abs(t - y1) <= d;
+ bs = Math.abs(b - y2) <= d;
+ ls = Math.abs(l - x1) <= d;
+ rs = Math.abs(r - x2) <= d;
+ if(ts) {
+ ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+ }
+ if(bs) {
+ ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ }
+ if(ls) {
+ ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+ }
+ if(rs) {
+ ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+ }
+ }
+
+ if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
+ (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ }
+ inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+ }
+
+ }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+ start: function() {
+
+ var min,
+ o = $(this).data("ui-draggable").options,
+ group = $.makeArray($(o.stack)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+ });
+
+ if (!group.length) { return; }
+
+ min = parseInt(group[0].style.zIndex, 10) || 0;
+ $(group).each(function(i) {
+ this.style.zIndex = min + i;
+ });
+
+ this[0].style.zIndex = min + group.length;
+
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+ if(t.css("zIndex")) {
+ o._zIndex = t.css("zIndex");
+ }
+ t.css("zIndex", o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("ui-draggable").options;
+ if(o._zIndex) {
+ $(ui.helper).css("zIndex", o._zIndex);
+ }
+ }
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+function isOverAxis( x, reference, size ) {
+ return ( x > reference ) && ( x < ( reference + size ) );
+}
+
+$.widget("ui.droppable", {
+ version: "1.10.0",
+ widgetEventPrefix: "drop",
+ options: {
+ accept: "*",
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: "default",
+ tolerance: "intersect",
+
+ // callbacks
+ activate: null,
+ deactivate: null,
+ drop: null,
+ out: null,
+ over: null
+ },
+ _create: function() {
+
+ var o = this.options,
+ accept = o.accept;
+
+ this.isover = false;
+ this.isout = true;
+
+ this.accept = $.isFunction(accept) ? accept : function(d) {
+ return d.is(accept);
+ };
+
+ //Store the droppable's proportions
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+ // Add the reference and positions to the manager
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+ $.ui.ddmanager.droppables[o.scope].push(this);
+
+ (o.addClasses && this.element.addClass("ui-droppable"));
+
+ },
+
+ _destroy: function() {
+ var i = 0,
+ drop = $.ui.ddmanager.droppables[this.options.scope];
+
+ for ( ; i < drop.length; i++ ) {
+ if ( drop[i] === this ) {
+ drop.splice(i, 1);
+ }
+ }
+
+ this.element.removeClass("ui-droppable ui-droppable-disabled");
+ },
+
+ _setOption: function(key, value) {
+
+ if(key === "accept") {
+ this.accept = $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ }
+ $.Widget.prototype._setOption.apply(this, arguments);
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) {
+ this.element.addClass(this.options.activeClass);
+ }
+ if(draggable){
+ this._trigger("activate", event, this.ui(draggable));
+ }
+ },
+
+ _deactivate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) {
+ this.element.removeClass(this.options.activeClass);
+ }
+ if(draggable){
+ this._trigger("deactivate", event, this.ui(draggable));
+ }
+ },
+
+ _over: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return;
+ }
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) {
+ this.element.addClass(this.options.hoverClass);
+ }
+ this._trigger("over", event, this.ui(draggable));
+ }
+
+ },
+
+ _out: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return;
+ }
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) {
+ this.element.removeClass(this.options.hoverClass);
+ }
+ this._trigger("out", event, this.ui(draggable));
+ }
+
+ },
+
+ _drop: function(event,custom) {
+
+ var draggable = custom || $.ui.ddmanager.current,
+ childrenIntersection = false;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return false;
+ }
+
+ this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
+ var inst = $.data(this, "ui-droppable");
+ if(
+ inst.options.greedy &&
+ !inst.options.disabled &&
+ inst.options.scope === draggable.options.scope &&
+ inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
+ $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+ ) { childrenIntersection = true; return false; }
+ });
+ if(childrenIntersection) {
+ return false;
+ }
+
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) {
+ this.element.removeClass(this.options.activeClass);
+ }
+ if(this.options.hoverClass) {
+ this.element.removeClass(this.options.hoverClass);
+ }
+ this._trigger("drop", event, this.ui(draggable));
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+ if (!droppable.offset) {
+ return false;
+ }
+
+ var draggableLeft, draggableTop,
+ x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
+ l = droppable.offset.left, r = l + droppable.proportions.width,
+ t = droppable.offset.top, b = t + droppable.proportions.height;
+
+ switch (toleranceMode) {
+ case "fit":
+ return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
+ case "intersect":
+ return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
+ x2 - (draggable.helperProportions.width / 2) < r && // Left Half
+ t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
+ y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+ case "pointer":
+ draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
+ return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
+ case "touch":
+ return (
+ (y1 >= t && y1 <= b) || // Top edge touching
+ (y2 >= t && y2 <= b) || // Bottom edge touching
+ (y1 < t && y2 > b) // Surrounded vertically
+ ) && (
+ (x1 >= l && x1 <= r) || // Left edge touching
+ (x2 >= l && x2 <= r) || // Right edge touching
+ (x1 < l && x2 > r) // Surrounded horizontally
+ );
+ default:
+ return false;
+ }
+
+};
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { "default": [] },
+ prepareOffsets: function(t, event) {
+
+ var i, j,
+ m = $.ui.ddmanager.droppables[t.options.scope] || [],
+ type = event ? event.type : null, // workaround for #2317
+ list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
+
+ droppablesLoop: for (i = 0; i < m.length; i++) {
+
+ //No disabled and non-accepted
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
+ continue;
+ }
+
+ // Filter out elements in the current dragged item
+ for (j=0; j < list.length; j++) {
+ if(list[j] === m[i].element[0]) {
+ m[i].proportions.height = 0;
+ continue droppablesLoop;
+ }
+ }
+
+ m[i].visible = m[i].element.css("display") !== "none";
+ if(!m[i].visible) {
+ continue;
+ }
+
+ //Activate the droppable if used directly from draggables
+ if(type === "mousedown") {
+ m[i]._activate.call(m[i], event);
+ }
+
+ m[i].offset = m[i].element.offset();
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+ }
+
+ },
+ drop: function(draggable, event) {
+
+ var dropped = false;
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(!this.options) {
+ return;
+ }
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
+ dropped = this._drop.call(this, event) || dropped;
+ }
+
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = true;
+ this.isover = false;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ dragStart: function( draggable, event ) {
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+ draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+ if( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ });
+ },
+ drag: function(draggable, event) {
+
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+ if(draggable.options.refreshPositions) {
+ $.ui.ddmanager.prepareOffsets(draggable, event);
+ }
+
+ //Run through all droppables and check their positions based on specific tolerance options
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(this.options.disabled || this.greedyChild || !this.visible) {
+ return;
+ }
+
+ var parentInstance, scope, parent,
+ intersects = $.ui.intersect(draggable, this, this.options.tolerance),
+ c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
+ if(!c) {
+ return;
+ }
+
+ if (this.options.greedy) {
+ // find droppable parents with same scope
+ scope = this.options.scope;
+ parent = this.element.parents(":data(ui-droppable)").filter(function () {
+ return $.data(this, "ui-droppable").options.scope === scope;
+ });
+
+ if (parent.length) {
+ parentInstance = $.data(parent[0], "ui-droppable");
+ parentInstance.greedyChild = (c === "isover");
+ }
+ }
+
+ // we just moved into a greedy child
+ if (parentInstance && c === "isover") {
+ parentInstance.isover = false;
+ parentInstance.isout = true;
+ parentInstance._out.call(parentInstance, event);
+ }
+
+ this[c] = true;
+ this[c === "isout" ? "isover" : "isout"] = false;
+ this[c === "isover" ? "_over" : "_out"].call(this, event);
+
+ // we just moved out of a greedy child
+ if (parentInstance && c === "isout") {
+ parentInstance.isout = false;
+ parentInstance.isover = true;
+ parentInstance._over.call(parentInstance, event);
+ }
+ });
+
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+ if( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ }
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.widget("ui.selectable", $.ui.mouse, {
+ version: "1.10.0",
+ options: {
+ appendTo: "body",
+ autoRefresh: true,
+ distance: 0,
+ filter: "*",
+ tolerance: "touch",
+
+ // callbacks
+ selected: null,
+ selecting: null,
+ start: null,
+ stop: null,
+ unselected: null,
+ unselecting: null
+ },
+ _create: function() {
+ var selectees,
+ that = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ this.refresh = function() {
+ selectees = $(that.options.filter, that.element[0]);
+ selectees.addClass("ui-selectee");
+ selectees.each(function() {
+ var $this = $(this),
+ pos = $this.offset();
+ $.data(this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass("ui-selected"),
+ selecting: $this.hasClass("ui-selecting"),
+ unselecting: $this.hasClass("ui-unselecting")
+ });
+ });
+ };
+ this.refresh();
+
+ this.selectees = selectees.addClass("ui-selectee");
+
+ this._mouseInit();
+
+ this.helper = $("<div class='ui-selectable-helper'></div>");
+ },
+
+ _destroy: function() {
+ this.selectees
+ .removeClass("ui-selectee")
+ .removeData("selectable-item");
+ this.element
+ .removeClass("ui-selectable ui-selectable-disabled");
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function(event) {
+ var that = this,
+ options = this.options;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled) {
+ return;
+ }
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "left": event.pageX,
+ "top": event.pageY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter(".ui-selected").each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey && !event.ctrlKey) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().addBack().each(function() {
+ var doSelect,
+ selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
+ selectee.$element
+ .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+ .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+ // selectable (UN)SELECTING callback
+ if (doSelect) {
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ } else {
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+
+ this.dragged = true;
+
+ if (this.options.disabled) {
+ return;
+ }
+
+ var tmp,
+ that = this,
+ options = this.options,
+ x1 = this.opos[0],
+ y1 = this.opos[1],
+ x2 = event.pageX,
+ y2 = event.pageY;
+
+ if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+ this.selectees.each(function() {
+ var selectee = $.data(this, "selectable-item"),
+ hit = false;
+
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element === that.element[0]) {
+ return;
+ }
+
+ if (options.tolerance === "touch") {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance === "fit") {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass("ui-unselecting");
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass("ui-selecting");
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
+ selectee.$element.removeClass("ui-selecting");
+ selectee.selecting = false;
+ selectee.$element.addClass("ui-selected");
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass("ui-selecting");
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var that = this;
+
+ this.dragged = false;
+
+ $(".ui-unselecting", this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass("ui-unselecting");
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ that._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $(".ui-selecting", this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ that._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+
+ return false;
+ }
+
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+/*jshint loopfunc: true */
+
+function isOverAxis( x, reference, size ) {
+ return ( x > reference ) && ( x < ( reference + size ) );
+}
+
+$.widget("ui.sortable", $.ui.mouse, {
+ version: "1.10.0",
+ widgetEventPrefix: "sort",
+ ready: false,
+ options: {
+ appendTo: "parent",
+ axis: false,
+ connectWith: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: "> *",
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000,
+
+ // callbacks
+ activate: null,
+ beforeStop: null,
+ change: null,
+ deactivate: null,
+ out: null,
+ over: null,
+ receive: null,
+ remove: null,
+ sort: null,
+ start: null,
+ stop: null,
+ update: null
+ },
+ _create: function() {
+
+ var o = this.options;
+ this.containerCache = {};
+ this.element.addClass("ui-sortable");
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine if the items are being displayed horizontally
+ this.floating = this.items.length ? o.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ //We're ready to go
+ this.ready = true;
+
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- ) {
+ this.items[i].item.removeData(this.widgetName + "-item");
+ }
+
+ return this;
+ },
+
+ _setOption: function(key, value){
+ if ( key === "disabled" ) {
+ this.options[ key ] = value;
+
+ this.widget().toggleClass( "ui-sortable-disabled", !!value );
+ } else {
+ // Don't call widget base _setOption for disable as it adds ui-state-disabled class
+ $.Widget.prototype._setOption.apply(this, arguments);
+ }
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+ var currentItem = null,
+ validHandle = false,
+ that = this;
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type === "static") {
+ return false;
+ }
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ $(event.target).parents().each(function() {
+ if($.data(this, that.widgetName + "-item") === that) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, that.widgetName + "-item") === that) {
+ currentItem = $(event.target);
+ }
+
+ if(!currentItem) {
+ return false;
+ }
+ if(this.options.handle && !overrideHandle) {
+ $(this.options.handle, currentItem).find("*").addBack().each(function() {
+ if(this === event.target) {
+ validHandle = true;
+ }
+ });
+ if(!validHandle) {
+ return false;
+ }
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var i,
+ o = this.options;
+
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] !== this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment) {
+ this._setContainment();
+ }
+
+ if(o.cursor) { // cursor option
+ if ($("body").css("cursor")) {
+ this._storedCursor = $("body").css("cursor");
+ }
+ $("body").css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) {
+ this._storedOpacity = this.helper.css("opacity");
+ }
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) {
+ this._storedZIndex = this.helper.css("zIndex");
+ }
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
+ this.overflowOffset = this.scrollParent.offset();
+ }
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions) {
+ this._cacheHelperProportions();
+ }
+
+
+ //Post "activate" events to possible containers
+ if( !noActivation ) {
+ for ( i = this.containers.length - 1; i >= 0; i-- ) {
+ this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
+ }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.current = this;
+ }
+
+ if ($.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+ var i, item, itemElement, intersection,
+ o = this.options,
+ scrolled = false;
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper position
+ if(!this.options.axis || this.options.axis !== "y") {
+ this.helper[0].style.left = this.position.left+"px";
+ }
+ if(!this.options.axis || this.options.axis !== "x") {
+ this.helper[0].style.top = this.position.top+"px";
+ }
+
+ //Rearrange
+ for (i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ item = this.items[i];
+ itemElement = item.item[0];
+ intersection = this._intersectsWithPointer(item);
+ if (!intersection) {
+ continue;
+ }
+
+ // Only put the placeholder inside the current Container, skip all
+ // items form other containers. This works because when moving
+ // an item from one container to another the
+ // currentContainer is switched before the placeholder is moved.
+ //
+ // Without this moving items in "sub-sortables" can cause the placeholder to jitter
+ // beetween the outer and inner container.
+ if (item.instance !== this.currentContainer) {
+ continue;
+ }
+
+ // cannot intersect with itself
+ // no useless actions that have been done before
+ // no action if the item moved is the parent of the item checked
+ if (itemElement !== this.currentItem[0] &&
+ this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
+ !$.contains(this.placeholder[0], itemElement) &&
+ (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
+ ) {
+
+ this.direction = intersection === 1 ? "down" : "up";
+
+ if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.drag(this, event);
+ }
+
+ //Call callbacks
+ this._trigger("sort", event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) {
+ return;
+ }
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour) {
+ $.ui.ddmanager.drop(this, event);
+ }
+
+ if(this.options.revert) {
+ var that = this,
+ cur = this.placeholder.offset();
+
+ this.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ that._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ if(this.dragging) {
+
+ this._mouseUp({ target: null });
+
+ if(this.options.helper === "original") {
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, this._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) {
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ }
+ if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
+ this.helper.remove();
+ }
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+ }
+
+ return this;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected),
+ str = [];
+ o = o || {};
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
+ if (res) {
+ str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
+ }
+ });
+
+ if(!str.length && o.key) {
+ str.push(o.key + "=");
+ }
+
+ return str.join("&");
+
+ },
+
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected),
+ ret = [];
+
+ o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height,
+ l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height,
+ dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left,
+ isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if ( this.options.tolerance === "pointer" ||
+ this.options.forcePointerForContainers ||
+ (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) && // Right Half
+ x2 - (this.helperProportions.width / 2) < r && // Left Half
+ t < y1 + (this.helperProportions.height / 2) && // Bottom Half
+ y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (!isOverElement) {
+ return false;
+ }
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
+ } else {
+ return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta !== 0 && (delta > 0 ? "down" : "up");
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta !== 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
+ this.refreshPositions();
+ return this;
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var i, j, cur, inst,
+ items = [],
+ queries = [],
+ connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (i = connectWith.length - 1; i >= 0; i--){
+ cur = $(connectWith[i]);
+ for ( j = cur.length - 1; j >= 0; j--){
+ inst = $.data(cur[j], this.widgetFullName);
+ if(inst && inst !== this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
+ }
+ }
+ }
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
+
+ for (i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ }
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
+
+ this.items = $.grep(this.items, function (item) {
+ for (var j=0; j < list.length; j++) {
+ if(list[j] === item.item[0]) {
+ return false;
+ }
+ }
+ return true;
+ });
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+
+ var i, j, cur, inst, targetData, _queries, item, queriesLength,
+ items = this.items,
+ queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
+ connectWith = this._connectWith();
+
+ if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
+ for (i = connectWith.length - 1; i >= 0; i--){
+ cur = $(connectWith[i]);
+ for (j = cur.length - 1; j >= 0; j--){
+ inst = $.data(cur[j], this.widgetFullName);
+ if(inst && inst !== this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+ this.containers.push(inst);
+ }
+ }
+ }
+ }
+
+ for (i = queries.length - 1; i >= 0; i--) {
+ targetData = queries[i][1];
+ _queries = queries[i][0];
+
+ for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ item = $(_queries[j]);
+
+ item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ }
+ }
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ var i, item, t, p;
+
+ for (i = this.items.length - 1; i >= 0; i--){
+ item = this.items[i];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
+ continue;
+ }
+
+ t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ }
+
+ if(this.options.custom && this.options.custom.refreshContainers) {
+ this.options.custom.refreshContainers.call(this);
+ } else {
+ for (i = this.containers.length - 1; i >= 0; i--){
+ p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ }
+ }
+
+ return this;
+ },
+
+ _createPlaceholder: function(that) {
+ that = that || this;
+ var className,
+ o = that.options;
+
+ if(!o.placeholder || o.placeholder.constructor === String) {
+ className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var el = $(document.createElement(that.currentItem[0].nodeName))
+ .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className) {
+ el.style.visibility = "hidden";
+ }
+
+ return el;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) {
+ return;
+ }
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
+ if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
+ }
+ };
+ }
+
+ //Create the placeholder
+ that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
+
+ //Append it after the actual current item
+ that.currentItem.after(that.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(that, that.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+ var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
+ innermostContainer = null,
+ innermostIndex = null;
+
+ // get innermost container that intersects with item
+ for (i = this.containers.length - 1; i >= 0; i--) {
+
+ // never consider a container that's located within the item itself
+ if($.contains(this.currentItem[0], this.containers[i].element[0])) {
+ continue;
+ }
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+
+ // if we've already found a container and it's more "inner" than this, then continue
+ if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
+ continue;
+ }
+
+ innermostContainer = this.containers[i];
+ innermostIndex = i;
+
+ } else {
+ // container doesn't intersect. trigger "out" event if necessary
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ // if no intersecting containers found, return
+ if(!innermostContainer) {
+ return;
+ }
+
+ // move the item into the container if it's not there already
+ if(this.containers.length === 1) {
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ } else {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ dist = 10000;
+ itemWithLeastDistance = null;
+ posProperty = this.containers[innermostIndex].floating ? "left" : "top";
+ sizeProperty = this.containers[innermostIndex].floating ? "width" : "height";
+ base = this.positionAbs[posProperty] + this.offset.click[posProperty];
+ for (j = this.items.length - 1; j >= 0; j--) {
+ if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
+ continue;
+ }
+ if(this.items[j].item[0] === this.currentItem[0]) {
+ continue;
+ }
+ cur = this.items[j].item.offset()[posProperty];
+ nearBottom = false;
+ if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
+ nearBottom = true;
+ cur += this.items[j][sizeProperty];
+ }
+
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ this.direction = nearBottom ? "up": "down";
+ }
+ }
+
+ //Check if dropOnEmpty is enabled
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
+ return;
+ }
+
+ this.currentContainer = this.containers[innermostIndex];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ }
+
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options,
+ helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
+
+ //Add the helper to the DOM if that didn't happen already
+ if(!helper.parents("body").length) {
+ $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+ }
+
+ if(helper[0] === this.currentItem[0]) {
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+ }
+
+ if(!helper[0].style.width || o.forceHelperSize) {
+ helper.width(this.currentItem.width());
+ }
+ if(!helper[0].style.height || o.forceHelperSize) {
+ helper.height(this.currentItem.height());
+ }
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj === "string") {
+ obj = obj.split(" ");
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ("left" in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ("right" in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ("top" in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ("bottom" in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ // This needs to be actually done for all browsers, since pageX/pageY includes this information
+ // with an ugly IE fix
+ if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+ po = { top: 0, left: 0 };
+ }
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition === "relative") {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var ce, co, over,
+ o = this.options;
+ if(o.containment === "parent") {
+ o.containment = this.helper[0].parentNode;
+ }
+ if(o.containment === "document" || o.containment === "window") {
+ this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ ce = $(o.containment)[0];
+ co = $(o.containment).offset();
+ over = ($(ce).css("overflow") !== "hidden");
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) {
+ pos = this.position;
+ }
+ var mod = d === "absolute" ? 1 : -1,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
+ scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top + // The absolute mouse position
+ this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left + // The absolute mouse position
+ this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var top, left,
+ o = this.options,
+ pageX = event.pageX,
+ pageY = event.pageY,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) {
+ pageX = this.containment[0] + this.offset.click.left;
+ }
+ if(event.pageY - this.offset.click.top < this.containment[1]) {
+ pageY = this.containment[1] + this.offset.click.top;
+ }
+ if(event.pageX - this.offset.click.left > this.containment[2]) {
+ pageX = this.containment[2] + this.offset.click.left;
+ }
+ if(event.pageY - this.offset.click.top > this.containment[3]) {
+ pageY = this.containment[3] + this.offset.click.top;
+ }
+ }
+
+ if(o.grid) {
+ top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY - // The absolute mouse position
+ this.offset.click.top - // Click offset (relative to the element)
+ this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX - // The absolute mouse position
+ this.offset.click.left - // Click offset (relative to the element)
+ this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var counter = this.counter;
+
+ this._delay(function() {
+ if(counter === this.counter) {
+ this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ }
+ });
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var i,
+ delayedTriggers = [];
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem.parent().length) {
+ this.placeholder.before(this.currentItem);
+ }
+ this._noFinalSort = null;
+
+ if(this.helper[0] === this.currentItem[0]) {
+ for(i in this._storedCSS) {
+ if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
+ this._storedCSS[i] = "";
+ }
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ }
+ if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ }
+
+ // Check if the items Container has Changed and trigger appropriate
+ // events.
+ if (this !== this.currentContainer) {
+ if(!noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ }
+ }
+
+
+ //Post events to containers
+ for (i = this.containers.length - 1; i >= 0; i--){
+ if(!noPropagation) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ }
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if(this._storedCursor) {
+ $("body").css("cursor", this._storedCursor);
+ }
+ if(this._storedOpacity) {
+ this.helper.css("opacity", this._storedOpacity);
+ }
+ if(this._storedZIndex) {
+ this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
+ }
+
+ this.dragging = false;
+ if(this.cancelHelperRemoval) {
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (i=0; i < delayedTriggers.length; i++) {
+ delayedTriggers[i].call(this, event);
+ } //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return false;
+ }
+
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] !== this.currentItem[0]) {
+ this.helper.remove();
+ }
+ this.helper = null;
+
+ if(!noPropagation) {
+ for (i=0; i < delayedTriggers.length; i++) {
+ delayedTriggers[i].call(this, event);
+ } //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(_inst) {
+ var inst = _inst || this;
+ return {
+ helper: inst.helper,
+ placeholder: inst.placeholder || $([]),
+ position: inst.position,
+ originalPosition: inst.originalPosition,
+ offset: inst.positionAbs,
+ item: inst.currentItem,
+ sender: _inst ? _inst.element : null
+ };
+ }
+
+});
+
+})(jQuery);
+;(jQuery.effects || (function($, undefined) {
+
+var dataSpace = "ui-effects-";
+
+$.effects = {
+ effect: {}
+};
+
+/*!
+ * jQuery Color Animations v2.1.2
+ * https://github.com/jquery/jquery-color
+ *
+ * Copyright 2013 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * Date: Wed Jan 16 08:47:09 2013 -0600
+ */
+(function( jQuery, undefined ) {
+
+ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
+
+ // plusequals test for += 100 -= 100
+ rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
+ // a set of RE's that can match strings and generate color tuples.
+ stringParsers = [{
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ],
+ execResult[ 3 ],
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ] * 2.55,
+ execResult[ 2 ] * 2.55,
+ execResult[ 3 ] * 2.55,
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ space: "hsla",
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ] / 100,
+ execResult[ 3 ] / 100,
+ execResult[ 4 ]
+ ];
+ }
+ }],
+
+ // jQuery.Color( )
+ color = jQuery.Color = function( color, green, blue, alpha ) {
+ return new jQuery.Color.fn.parse( color, green, blue, alpha );
+ },
+ spaces = {
+ rgba: {
+ props: {
+ red: {
+ idx: 0,
+ type: "byte"
+ },
+ green: {
+ idx: 1,
+ type: "byte"
+ },
+ blue: {
+ idx: 2,
+ type: "byte"
+ }
+ }
+ },
+
+ hsla: {
+ props: {
+ hue: {
+ idx: 0,
+ type: "degrees"
+ },
+ saturation: {
+ idx: 1,
+ type: "percent"
+ },
+ lightness: {
+ idx: 2,
+ type: "percent"
+ }
+ }
+ }
+ },
+ propTypes = {
+ "byte": {
+ floor: true,
+ max: 255
+ },
+ "percent": {
+ max: 1
+ },
+ "degrees": {
+ mod: 360,
+ floor: true
+ }
+ },
+ support = color.support = {},
+
+ // element for support tests
+ supportElem = jQuery( "<p>" )[ 0 ],
+
+ // colors = jQuery.Color.names
+ colors,
+
+ // local aliases of functions called often
+ each = jQuery.each;
+
+// determine rgba support immediately
+supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
+support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
+
+// define cache name and alpha properties
+// for rgba and hsla spaces
+each( spaces, function( spaceName, space ) {
+ space.cache = "_" + spaceName;
+ space.props.alpha = {
+ idx: 3,
+ type: "percent",
+ def: 1
+ };
+});
+
+function clamp( value, prop, allowEmpty ) {
+ var type = propTypes[ prop.type ] || {};
+
+ if ( value == null ) {
+ return (allowEmpty || !prop.def) ? null : prop.def;
+ }
+
+ // ~~ is an short way of doing floor for positive numbers
+ value = type.floor ? ~~value : parseFloat( value );
+
+ // IE will pass in empty strings as value for alpha,
+ // which will hit this case
+ if ( isNaN( value ) ) {
+ return prop.def;
+ }
+
+ if ( type.mod ) {
+ // we add mod before modding to make sure that negatives values
+ // get converted properly: -10 -> 350
+ return (value + type.mod) % type.mod;
+ }
+
+ // for now all property types without mod have min and max
+ return 0 > value ? 0 : type.max < value ? type.max : value;
+}
+
+function stringParse( string ) {
+ var inst = color(),
+ rgba = inst._rgba = [];
+
+ string = string.toLowerCase();
+
+ each( stringParsers, function( i, parser ) {
+ var parsed,
+ match = parser.re.exec( string ),
+ values = match && parser.parse( match ),
+ spaceName = parser.space || "rgba";
+
+ if ( values ) {
+ parsed = inst[ spaceName ]( values );
+
+ // if this was an rgba parse the assignment might happen twice
+ // oh well....
+ inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
+ rgba = inst._rgba = parsed._rgba;
+
+ // exit each( stringParsers ) here because we matched
+ return false;
+ }
+ });
+
+ // Found a stringParser that handled it
+ if ( rgba.length ) {
+
+ // if this came from a parsed string, force "transparent" when alpha is 0
+ // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
+ if ( rgba.join() === "0,0,0,0" ) {
+ jQuery.extend( rgba, colors.transparent );
+ }
+ return inst;
+ }
+
+ // named colors
+ return colors[ string ];
+}
+
+color.fn = jQuery.extend( color.prototype, {
+ parse: function( red, green, blue, alpha ) {
+ if ( red === undefined ) {
+ this._rgba = [ null, null, null, null ];
+ return this;
+ }
+ if ( red.jquery || red.nodeType ) {
+ red = jQuery( red ).css( green );
+ green = undefined;
+ }
+
+ var inst = this,
+ type = jQuery.type( red ),
+ rgba = this._rgba = [];
+
+ // more than 1 argument specified - assume ( red, green, blue, alpha )
+ if ( green !== undefined ) {
+ red = [ red, green, blue, alpha ];
+ type = "array";
+ }
+
+ if ( type === "string" ) {
+ return this.parse( stringParse( red ) || colors._default );
+ }
+
+ if ( type === "array" ) {
+ each( spaces.rgba.props, function( key, prop ) {
+ rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
+ });
+ return this;
+ }
+
+ if ( type === "object" ) {
+ if ( red instanceof color ) {
+ each( spaces, function( spaceName, space ) {
+ if ( red[ space.cache ] ) {
+ inst[ space.cache ] = red[ space.cache ].slice();
+ }
+ });
+ } else {
+ each( spaces, function( spaceName, space ) {
+ var cache = space.cache;
+ each( space.props, function( key, prop ) {
+
+ // if the cache doesn't exist, and we know how to convert
+ if ( !inst[ cache ] && space.to ) {
+
+ // if the value was null, we don't need to copy it
+ // if the key was alpha, we don't need to copy it either
+ if ( key === "alpha" || red[ key ] == null ) {
+ return;
+ }
+ inst[ cache ] = space.to( inst._rgba );
+ }
+
+ // this is the only case where we allow nulls for ALL properties.
+ // call clamp with alwaysAllowEmpty
+ inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
+ });
+
+ // everything defined but alpha?
+ if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+ // use the default of 1
+ inst[ cache ][ 3 ] = 1;
+ if ( space.from ) {
+ inst._rgba = space.from( inst[ cache ] );
+ }
+ }
+ });
+ }
+ return this;
+ }
+ },
+ is: function( compare ) {
+ var is = color( compare ),
+ same = true,
+ inst = this;
+
+ each( spaces, function( _, space ) {
+ var localCache,
+ isCache = is[ space.cache ];
+ if (isCache) {
+ localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
+ each( space.props, function( _, prop ) {
+ if ( isCache[ prop.idx ] != null ) {
+ same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
+ return same;
+ }
+ });
+ }
+ return same;
+ });
+ return same;
+ },
+ _space: function() {
+ var used = [],
+ inst = this;
+ each( spaces, function( spaceName, space ) {
+ if ( inst[ space.cache ] ) {
+ used.push( spaceName );
+ }
+ });
+ return used.pop();
+ },
+ transition: function( other, distance ) {
+ var end = color( other ),
+ spaceName = end._space(),
+ space = spaces[ spaceName ],
+ startColor = this.alpha() === 0 ? color( "transparent" ) : this,
+ start = startColor[ space.cache ] || space.to( startColor._rgba ),
+ result = start.slice();
+
+ end = end[ space.cache ];
+ each( space.props, function( key, prop ) {
+ var index = prop.idx,
+ startValue = start[ index ],
+ endValue = end[ index ],
+ type = propTypes[ prop.type ] || {};
+
+ // if null, don't override start value
+ if ( endValue === null ) {
+ return;
+ }
+ // if null - use end
+ if ( startValue === null ) {
+ result[ index ] = endValue;
+ } else {
+ if ( type.mod ) {
+ if ( endValue - startValue > type.mod / 2 ) {
+ startValue += type.mod;
+ } else if ( startValue - endValue > type.mod / 2 ) {
+ startValue -= type.mod;
+ }
+ }
+ result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
+ }
+ });
+ return this[ spaceName ]( result );
+ },
+ blend: function( opaque ) {
+ // if we are already opaque - return ourself
+ if ( this._rgba[ 3 ] === 1 ) {
+ return this;
+ }
+
+ var rgb = this._rgba.slice(),
+ a = rgb.pop(),
+ blend = color( opaque )._rgba;
+
+ return color( jQuery.map( rgb, function( v, i ) {
+ return ( 1 - a ) * blend[ i ] + a * v;
+ }));
+ },
+ toRgbaString: function() {
+ var prefix = "rgba(",
+ rgba = jQuery.map( this._rgba, function( v, i ) {
+ return v == null ? ( i > 2 ? 1 : 0 ) : v;
+ });
+
+ if ( rgba[ 3 ] === 1 ) {
+ rgba.pop();
+ prefix = "rgb(";
+ }
+
+ return prefix + rgba.join() + ")";
+ },
+ toHslaString: function() {
+ var prefix = "hsla(",
+ hsla = jQuery.map( this.hsla(), function( v, i ) {
+ if ( v == null ) {
+ v = i > 2 ? 1 : 0;
+ }
+
+ // catch 1 and 2
+ if ( i && i < 3 ) {
+ v = Math.round( v * 100 ) + "%";
+ }
+ return v;
+ });
+
+ if ( hsla[ 3 ] === 1 ) {
+ hsla.pop();
+ prefix = "hsl(";
+ }
+ return prefix + hsla.join() + ")";
+ },
+ toHexString: function( includeAlpha ) {
+ var rgba = this._rgba.slice(),
+ alpha = rgba.pop();
+
+ if ( includeAlpha ) {
+ rgba.push( ~~( alpha * 255 ) );
+ }
+
+ return "#" + jQuery.map( rgba, function( v ) {
+
+ // default to 0 when nulls exist
+ v = ( v || 0 ).toString( 16 );
+ return v.length === 1 ? "0" + v : v;
+ }).join("");
+ },
+ toString: function() {
+ return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
+ }
+});
+color.fn.parse.prototype = color.fn;
+
+// hsla conversions adapted from:
+// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
+
+function hue2rgb( p, q, h ) {
+ h = ( h + 1 ) % 1;
+ if ( h * 6 < 1 ) {
+ return p + (q - p) * h * 6;
+ }
+ if ( h * 2 < 1) {
+ return q;
+ }
+ if ( h * 3 < 2 ) {
+ return p + (q - p) * ((2/3) - h) * 6;
+ }
+ return p;
+}
+
+spaces.hsla.to = function ( rgba ) {
+ if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
+ return [ null, null, null, rgba[ 3 ] ];
+ }
+ var r = rgba[ 0 ] / 255,
+ g = rgba[ 1 ] / 255,
+ b = rgba[ 2 ] / 255,
+ a = rgba[ 3 ],
+ max = Math.max( r, g, b ),
+ min = Math.min( r, g, b ),
+ diff = max - min,
+ add = max + min,
+ l = add * 0.5,
+ h, s;
+
+ if ( min === max ) {
+ h = 0;
+ } else if ( r === max ) {
+ h = ( 60 * ( g - b ) / diff ) + 360;
+ } else if ( g === max ) {
+ h = ( 60 * ( b - r ) / diff ) + 120;
+ } else {
+ h = ( 60 * ( r - g ) / diff ) + 240;
+ }
+
+ // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
+ // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
+ if ( diff === 0 ) {
+ s = 0;
+ } else if ( l <= 0.5 ) {
+ s = diff / add;
+ } else {
+ s = diff / ( 2 - add );
+ }
+ return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
+};
+
+spaces.hsla.from = function ( hsla ) {
+ if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
+ return [ null, null, null, hsla[ 3 ] ];
+ }
+ var h = hsla[ 0 ] / 360,
+ s = hsla[ 1 ],
+ l = hsla[ 2 ],
+ a = hsla[ 3 ],
+ q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
+ p = 2 * l - q;
+
+ return [
+ Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
+ Math.round( hue2rgb( p, q, h ) * 255 ),
+ Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
+ a
+ ];
+};
+
+
+each( spaces, function( spaceName, space ) {
+ var props = space.props,
+ cache = space.cache,
+ to = space.to,
+ from = space.from;
+
+ // makes rgba() and hsla()
+ color.fn[ spaceName ] = function( value ) {
+
+ // generate a cache for this space if it doesn't exist
+ if ( to && !this[ cache ] ) {
+ this[ cache ] = to( this._rgba );
+ }
+ if ( value === undefined ) {
+ return this[ cache ].slice();
+ }
+
+ var ret,
+ type = jQuery.type( value ),
+ arr = ( type === "array" || type === "object" ) ? value : arguments,
+ local = this[ cache ].slice();
+
+ each( props, function( key, prop ) {
+ var val = arr[ type === "object" ? key : prop.idx ];
+ if ( val == null ) {
+ val = local[ prop.idx ];
+ }
+ local[ prop.idx ] = clamp( val, prop );
+ });
+
+ if ( from ) {
+ ret = color( from( local ) );
+ ret[ cache ] = local;
+ return ret;
+ } else {
+ return color( local );
+ }
+ };
+
+ // makes red() green() blue() alpha() hue() saturation() lightness()
+ each( props, function( key, prop ) {
+ // alpha is included in more than one space
+ if ( color.fn[ key ] ) {
+ return;
+ }
+ color.fn[ key ] = function( value ) {
+ var vtype = jQuery.type( value ),
+ fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
+ local = this[ fn ](),
+ cur = local[ prop.idx ],
+ match;
+
+ if ( vtype === "undefined" ) {
+ return cur;
+ }
+
+ if ( vtype === "function" ) {
+ value = value.call( this, cur );
+ vtype = jQuery.type( value );
+ }
+ if ( value == null && prop.empty ) {
+ return this;
+ }
+ if ( vtype === "string" ) {
+ match = rplusequals.exec( value );
+ if ( match ) {
+ value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
+ }
+ }
+ local[ prop.idx ] = value;
+ return this[ fn ]( local );
+ };
+ });
+});
+
+// add cssHook and .fx.step function for each named hook.
+// accept a space separated string of properties
+color.hook = function( hook ) {
+ var hooks = hook.split( " " );
+ each( hooks, function( i, hook ) {
+ jQuery.cssHooks[ hook ] = {
+ set: function( elem, value ) {
+ var parsed, curElem,
+ backgroundColor = "";
+
+ if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
+ value = color( parsed || value );
+ if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
+ curElem = hook === "backgroundColor" ? elem.parentNode : elem;
+ while (
+ (backgroundColor === "" || backgroundColor === "transparent") &&
+ curElem && curElem.style
+ ) {
+ try {
+ backgroundColor = jQuery.css( curElem, "backgroundColor" );
+ curElem = curElem.parentNode;
+ } catch ( e ) {
+ }
+ }
+
+ value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
+ backgroundColor :
+ "_default" );
+ }
+
+ value = value.toRgbaString();
+ }
+ try {
+ elem.style[ hook ] = value;
+ } catch( e ) {
+ // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
+ }
+ }
+ };
+ jQuery.fx.step[ hook ] = function( fx ) {
+ if ( !fx.colorInit ) {
+ fx.start = color( fx.elem, hook );
+ fx.end = color( fx.end );
+ fx.colorInit = true;
+ }
+ jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
+ };
+ });
+
+};
+
+color.hook( stepHooks );
+
+jQuery.cssHooks.borderColor = {
+ expand: function( value ) {
+ var expanded = {};
+
+ each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+ expanded[ "border" + part + "Color" ] = value;
+ });
+ return expanded;
+ }
+};
+
+// Basic color names only.
+// Usage of any of the other color names requires adding yourself or including
+// jquery.color.svg-names.js.
+colors = jQuery.Color.names = {
+ // 4.1. Basic color keywords
+ aqua: "#00ffff",
+ black: "#000000",
+ blue: "#0000ff",
+ fuchsia: "#ff00ff",
+ gray: "#808080",
+ green: "#008000",
+ lime: "#00ff00",
+ maroon: "#800000",
+ navy: "#000080",
+ olive: "#808000",
+ purple: "#800080",
+ red: "#ff0000",
+ silver: "#c0c0c0",
+ teal: "#008080",
+ white: "#ffffff",
+ yellow: "#ffff00",
+
+ // 4.2.3. "transparent" color keyword
+ transparent: [ null, null, null, 0 ],
+
+ _default: "#ffffff"
+};
+
+})( jQuery );
+
+
+/******************************************************************************/
+/****************************** CLASS ANIMATIONS ******************************/
+/******************************************************************************/
+(function() {
+
+var classAnimationActions = [ "add", "remove", "toggle" ],
+ shorthandStyles = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+
+$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
+ $.fx.step[ prop ] = function( fx ) {
+ if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
+ jQuery.style( fx.elem, prop, fx.end );
+ fx.setAttr = true;
+ }
+ };
+});
+
+function getElementStyles( elem ) {
+ var key, len,
+ style = elem.ownerDocument.defaultView ?
+ elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
+ elem.currentStyle,
+ styles = {};
+
+ if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
+ len = style.length;
+ while ( len-- ) {
+ key = style[ len ];
+ if ( typeof style[ key ] === "string" ) {
+ styles[ $.camelCase( key ) ] = style[ key ];
+ }
+ }
+ // support: Opera, IE <9
+ } else {
+ for ( key in style ) {
+ if ( typeof style[ key ] === "string" ) {
+ styles[ key ] = style[ key ];
+ }
+ }
+ }
+
+ return styles;
+}
+
+
+function styleDifference( oldStyle, newStyle ) {
+ var diff = {},
+ name, value;
+
+ for ( name in newStyle ) {
+ value = newStyle[ name ];
+ if ( oldStyle[ name ] !== value ) {
+ if ( !shorthandStyles[ name ] ) {
+ if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
+ diff[ name ] = value;
+ }
+ }
+ }
+ }
+
+ return diff;
+}
+
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
+$.effects.animateClass = function( value, duration, easing, callback ) {
+ var o = $.speed( duration, easing, callback );
+
+ return this.queue( function() {
+ var animated = $( this ),
+ baseClass = animated.attr( "class" ) || "",
+ applyClassChange,
+ allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
+
+ // map the animated objects to store the original styles.
+ allAnimations = allAnimations.map(function() {
+ var el = $( this );
+ return {
+ el: el,
+ start: getElementStyles( this )
+ };
+ });
+
+ // apply class change
+ applyClassChange = function() {
+ $.each( classAnimationActions, function(i, action) {
+ if ( value[ action ] ) {
+ animated[ action + "Class" ]( value[ action ] );
+ }
+ });
+ };
+ applyClassChange();
+
+ // map all animated objects again - calculate new styles and diff
+ allAnimations = allAnimations.map(function() {
+ this.end = getElementStyles( this.el[ 0 ] );
+ this.diff = styleDifference( this.start, this.end );
+ return this;
+ });
+
+ // apply original class
+ animated.attr( "class", baseClass );
+
+ // map all animated objects again - this time collecting a promise
+ allAnimations = allAnimations.map(function() {
+ var styleInfo = this,
+ dfd = $.Deferred(),
+ opts = $.extend({}, o, {
+ queue: false,
+ complete: function() {
+ dfd.resolve( styleInfo );
+ }
+ });
+
+ this.el.animate( this.diff, opts );
+ return dfd.promise();
+ });
+
+ // once all animations have completed:
+ $.when.apply( $, allAnimations.get() ).done(function() {
+
+ // set the final class
+ applyClassChange();
+
+ // for each animated element,
+ // clear all css properties that were animated
+ $.each( arguments, function() {
+ var el = this.el;
+ $.each( this.diff, function(key) {
+ el.css( key, "" );
+ });
+ });
+
+ // this is guarnteed to be there if you use jQuery.speed()
+ // it also handles dequeuing the next anim...
+ o.complete.call( animated[ 0 ] );
+ });
+ });
+};
+
+$.fn.extend({
+ _addClass: $.fn.addClass,
+ addClass: function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { add: classNames }, speed, easing, callback ) :
+ this._addClass( classNames );
+ },
+
+ _removeClass: $.fn.removeClass,
+ removeClass: function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { remove: classNames }, speed, easing, callback ) :
+ this._removeClass( classNames );
+ },
+
+ _toggleClass: $.fn.toggleClass,
+ toggleClass: function( classNames, force, speed, easing, callback ) {
+ if ( typeof force === "boolean" || force === undefined ) {
+ if ( !speed ) {
+ // without speed parameter
+ return this._toggleClass( classNames, force );
+ } else {
+ return $.effects.animateClass.call( this,
+ (force ? { add: classNames } : { remove: classNames }),
+ speed, easing, callback );
+ }
+ } else {
+ // without force parameter
+ return $.effects.animateClass.call( this,
+ { toggle: classNames }, force, speed, easing );
+ }
+ },
+
+ switchClass: function( remove, add, speed, easing, callback) {
+ return $.effects.animateClass.call( this, {
+ add: add,
+ remove: remove
+ }, speed, easing, callback );
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EFFECTS **********************************/
+/******************************************************************************/
+
+(function() {
+
+$.extend( $.effects, {
+ version: "1.10.0",
+
+ // Saves a set of properties in a data storage
+ save: function( element, set ) {
+ for( var i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+ }
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function( element, set ) {
+ var val, i;
+ for( i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ val = element.data( dataSpace + set[ i ] );
+ // support: jQuery 1.6.2
+ // http://bugs.jquery.com/ticket/9917
+ // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
+ // We can't differentiate between "" and 0 here, so we just assume
+ // empty string since it's likely to be a more common value...
+ if ( val === undefined ) {
+ val = "";
+ }
+ element.css( set[ i ], val );
+ }
+ }
+ },
+
+ setMode: function( el, mode ) {
+ if (mode === "toggle") {
+ mode = el.is( ":hidden" ) ? "show" : "hide";
+ }
+ return mode;
+ },
+
+ // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ getBaseline: function( origin, original ) {
+ var y, x;
+ switch ( origin[ 0 ] ) {
+ case "top": y = 0; break;
+ case "middle": y = 0.5; break;
+ case "bottom": y = 1; break;
+ default: y = origin[ 0 ] / original.height;
+ }
+ switch ( origin[ 1 ] ) {
+ case "left": x = 0; break;
+ case "center": x = 0.5; break;
+ case "right": x = 1; break;
+ default: x = origin[ 1 ] / original.width;
+ }
+ return {
+ x: x,
+ y: y
+ };
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function( element ) {
+
+ // if the element is already wrapped, return it
+ if ( element.parent().is( ".ui-effects-wrapper" )) {
+ return element.parent();
+ }
+
+ // wrap the element
+ var props = {
+ width: element.outerWidth(true),
+ height: element.outerHeight(true),
+ "float": element.css( "float" )
+ },
+ wrapper = $( "<div></div>" )
+ .addClass( "ui-effects-wrapper" )
+ .css({
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ }),
+ // Store the size in case width/height are defined in % - Fixes #5245
+ size = {
+ width: element.width(),
+ height: element.height()
+ },
+ active = document.activeElement;
+
+ // support: Firefox
+ // Firefox incorrectly exposes anonymous content
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+ try {
+ active.id;
+ } catch( e ) {
+ active = document.body;
+ }
+
+ element.wrap( wrapper );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
+
+ // transfer positioning properties to the wrapper
+ if ( element.css( "position" ) === "static" ) {
+ wrapper.css({ position: "relative" });
+ element.css({ position: "relative" });
+ } else {
+ $.extend( props, {
+ position: element.css( "position" ),
+ zIndex: element.css( "z-index" )
+ });
+ $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
+ props[ pos ] = element.css( pos );
+ if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+ props[ pos ] = "auto";
+ }
+ });
+ element.css({
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ });
+ }
+ element.css(size);
+
+ return wrapper.css( props ).show();
+ },
+
+ removeWrapper: function( element ) {
+ var active = document.activeElement;
+
+ if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+ element.parent().replaceWith( element );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+ }
+
+
+ return element;
+ },
+
+ setTransition: function( element, list, factor, value ) {
+ value = value || {};
+ $.each( list, function( i, x ) {
+ var unit = element.cssUnit( x );
+ if ( unit[ 0 ] > 0 ) {
+ value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
+ }
+ });
+ return value;
+ }
+});
+
+// return an effect options object for the given parameters:
+function _normalizeArguments( effect, options, speed, callback ) {
+
+ // allow passing all options as the first parameter
+ if ( $.isPlainObject( effect ) ) {
+ options = effect;
+ effect = effect.effect;
+ }
+
+ // convert to an object
+ effect = { effect: effect };
+
+ // catch (effect, null, ...)
+ if ( options == null ) {
+ options = {};
+ }
+
+ // catch (effect, callback)
+ if ( $.isFunction( options ) ) {
+ callback = options;
+ speed = null;
+ options = {};
+ }
+
+ // catch (effect, speed, ?)
+ if ( typeof options === "number" || $.fx.speeds[ options ] ) {
+ callback = speed;
+ speed = options;
+ options = {};
+ }
+
+ // catch (effect, options, callback)
+ if ( $.isFunction( speed ) ) {
+ callback = speed;
+ speed = null;
+ }
+
+ // add options to effect
+ if ( options ) {
+ $.extend( effect, options );
+ }
+
+ speed = speed || options.duration;
+ effect.duration = $.fx.off ? 0 :
+ typeof speed === "number" ? speed :
+ speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+ $.fx.speeds._default;
+
+ effect.complete = callback || options.complete;
+
+ return effect;
+}
+
+function standardSpeed( speed ) {
+ // valid standard speeds
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
+ return true;
+ }
+
+ // invalid strings - treat as "normal" speed
+ return typeof speed === "string" && !$.effects.effect[ speed ];
+}
+
+$.fn.extend({
+ effect: function( /* effect, options, speed, callback */ ) {
+ var args = _normalizeArguments.apply( this, arguments ),
+ mode = args.mode,
+ queue = args.queue,
+ effectMethod = $.effects.effect[ args.effect ];
+
+ if ( $.fx.off || !effectMethod ) {
+ // delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args.duration, args.complete );
+ } else {
+ return this.each( function() {
+ if ( args.complete ) {
+ args.complete.call( this );
+ }
+ });
+ }
+ }
+
+ function run( next ) {
+ var elem = $( this ),
+ complete = args.complete,
+ mode = args.mode;
+
+ function done() {
+ if ( $.isFunction( complete ) ) {
+ complete.call( elem[0] );
+ }
+ if ( $.isFunction( next ) ) {
+ next();
+ }
+ }
+
+ // if the element is hiddden and mode is hide,
+ // or element is visible and mode is show
+ if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+ done();
+ } else {
+ effectMethod.call( elem[0], args, done );
+ }
+ }
+
+ return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
+ },
+
+ _show: $.fn.show,
+ show: function( speed ) {
+ if ( standardSpeed( speed ) ) {
+ return this._show.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "show";
+ return this.effect.call( this, args );
+ }
+ },
+
+ _hide: $.fn.hide,
+ hide: function( speed ) {
+ if ( standardSpeed( speed ) ) {
+ return this._hide.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "hide";
+ return this.effect.call( this, args );
+ }
+ },
+
+ // jQuery core overloads toggle and creates _toggle
+ __toggle: $.fn.toggle,
+ toggle: function( speed ) {
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
+ return this.__toggle.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "toggle";
+ return this.effect.call( this, args );
+ }
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css( key ),
+ val = [];
+
+ $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
+ if ( style.indexOf( unit ) > 0 ) {
+ val = [ parseFloat( style ), unit ];
+ }
+ });
+ return val;
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EASING ***********************************/
+/******************************************************************************/
+
+(function() {
+
+// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
+
+var baseEasings = {};
+
+$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
+ baseEasings[ name ] = function( p ) {
+ return Math.pow( p, i + 2 );
+ };
+});
+
+$.extend( baseEasings, {
+ Sine: function ( p ) {
+ return 1 - Math.cos( p * Math.PI / 2 );
+ },
+ Circ: function ( p ) {
+ return 1 - Math.sqrt( 1 - p * p );
+ },
+ Elastic: function( p ) {
+ return p === 0 || p === 1 ? p :
+ -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
+ },
+ Back: function( p ) {
+ return p * p * ( 3 * p - 2 );
+ },
+ Bounce: function ( p ) {
+ var pow2,
+ bounce = 4;
+
+ while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
+ return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
+ }
+});
+
+$.each( baseEasings, function( name, easeIn ) {
+ $.easing[ "easeIn" + name ] = easeIn;
+ $.easing[ "easeOut" + name ] = function( p ) {
+ return 1 - easeIn( 1 - p );
+ };
+ $.easing[ "easeInOut" + name ] = function( p ) {
+ return p < 0.5 ?
+ easeIn( p * 2 ) / 2 :
+ 1 - easeIn( p * -2 + 2 ) / 2;
+ };
+});
+
+})();
+
+})(jQuery));
+++ /dev/null
-{% extends "base_mil.html" %}
-{% load i18n %}
-
-{% block title %}{% trans "Page not found" %}{% endblock %}
-
-{% block body %}
-
-<h1>{% trans "Page not found" %}</h1>
-
-<p class="notice">
- {% trans "The page you were looking for doesn't exist." %}
-</p>
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-
-{% block body %}
-<div class="forum-body">
- {% block breadcrumb %}{% endblock %}
- <a href="{% url 'forum_search' %}" style="position: absolute; top: 0; right: 5px;">{% trans 'Forum search' %}</a>
- {% block content %}{% endblock %}
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base_super.html" %}
-{% load subdomainurls %}
-{% load fnp_lang %}
-{% load sponsor_tags %}
-{% load static %}
-
-{% load i18n %}
-
-{% block header_class %}header-mil{% endblock %}
-
-{% block logo %}
-<img src="{% static "img/logo-mil.png" %}" alt="Edukacja medialna"/>
-{% endblock %}
-
-{% block top_navigation %}
- <li><a class="menu-consultations" href="{% url "mil_home" "katalog" %}">{% trans 'About Catalogue' %}</a></li>
- <li><a class="menu-kompetencje" href="{% url "curriculum" %}">{% trans 'Competencies' %}</a></li>
- {% comment %}<li><a class="menu-takepart" href="{% url "comment_document_index" %}">{% trans 'Take Part' %}</a></li>{% endcomment %}
- {% if request.LANGUAGE_CODE == 'pl' %}
- <li><a class="menu-knowledgebase" href="{% url 'knowledge_base' 'katalog' url='' %}">Baza wiedzy</a></li>
- {% endif %}
- <li><a class="menu-kontakt" href="{% url 'mil_contact' 'katalog' %}">{% trans 'Contact' %}</a></li>
- <li>{% lang_switcher %}</li>
-{% endblock %}
-
-{% block sponsors %}
- {% sponsor_page "footer_mil" %}
-{% endblock %}
-
-{% block organizer %}
- Projekt prowadzi:<br/>
- <a href="http://nowoczesnapolska.org.pl">
- <img src="{% static "img/logo_fnp_white.png" %}" alt="Fundacja Nowoczesna Polska" />
- </a><br/>
- <a href="http://http://www.nina.gov.pl/">
- <img src="{% static "img/nina-white.png" %}" alt="Narodowy Instytut Audiowizualny" />
- </a>
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-Dziękujemy za rejestrację udziału w konkursie MediaLog.
-
-Przypominamy, że prace można nadsyłać do 6 maja 2013 na adres
-edukacjamedialna@nowoczesnapolska.org.pl. W mailu należy podać dane
-kontaktowe Autora/ów pracy, Opiekuna (osoby, która zarejestrowała udział
-danej instytucji w konkursie i prowadziła zajęcia z edukacji medialnej)
-oraz nazwę instytucji (szkoły, biblioteki, domu kultury itp.).
-W przypadku prac opublikowanych już wcześniej wystarczy w mailu podać
-link do odpowiedniej strony.
-
-W razie jakichkolwiek wątpliwości prosimy o kontakt:
-http://edukacjamedialna.edu.pl/info/kontakt/
-
---
-Wiadomość wysłana automatycznie. Prosimy na nią nie odpowiadać.
+++ /dev/null
-Zgłoszenie na konkurs MediaLog zostało zarejestrowane.
+++ /dev/null
-{% extends "contact/thanks.html" %}
-
-{% block contact_form_description %}
-<p>Dziękujemy za rejestrację udziału w konkursie MediaLog.</p>
-
-<p>Przypominamy, że prace można nadsyłać do 6 maja 2013 na adres
-edukacjamedialna@nowoczesnapolska.org.pl. W mailu należy podać dane
-kontaktowe Autora/ów pracy, Opiekuna (osoby, która zarejestrowała udział
-danej instytucji w konkursie i prowadziła zajęcia z edukacji medialnej)
-oraz nazwę instytucji (szkoły, biblioteki, domu kultury itp.).
-W przypadku prac opublikowanych już wcześniej wystarczy w mailu podać
-link do odpowiedniej strony.</p>
-{% endblock %}
+++ /dev/null
-Dziękujemy,
-
-Zgłoszenie na stronie {{ site_name }}
-zostało przekazane koordynatorce projektu.
-
-W razie jakichkolwiek dodatkowych wątpliwości prosimy o kontakt:
-http://edukacjamedialna.edu.pl/info/kontakt/
-
---
-Wiadomość wysłana automatycznie. Prosimy na nią nie odpowiadać.
+++ /dev/null
-Zgłoszenie na stronie {{ site_name }} zostało zarejestrowane.
+++ /dev/null
-{% extends "contact/thanks.html" %}
-
-{% block contact_form_description %}
-<p>Dziękujemy, zgłoszenie zostało zarejestrowane.</p>
-{% endblock %}
+++ /dev/null
-Dziękujemy za przesłanie zgłoszenia.
-
-O wynikach rekrutacji poinformujemy uczestników do 30 kwietnia.
-
-Z pozdrowieniami
-
-Zespół Edukacji Medialnej
-fundacja Nowoczesna Polska
+++ /dev/null
-TEM - szkolenie dla trenerów edukacji medialnej
+++ /dev/null
-{% extends "contact/thanks.html" %}
-
-{% block contact_form_description %}
-<p>Dziękujemy za przesłanie zgłoszenia.</p>
-
-<p>O wynikach rekrutacji poinformujemy uczestników do 30 kwietnia.</p>
-{% endblock %}
+++ /dev/null
-Dziękujemy,
-
-Zgłoszenie na stronie {{ site_name }} zostało zarejestrowane.
-
-W razie jakichkolwiek dodatkowych wątpliwości prosimy o kontakt:
-http://edukacjamedialna.edu.pl/info/kontakt/
-
---
-Wiadomość wysłana automatycznie. Prosimy na nią nie odpowiadać.
+++ /dev/null
-Zgłoszenie na stronie {{ site_name }} zostało zarejestrowane.
+++ /dev/null
-{% extends "contact/thanks.html" %}
-
-{% block contact_form_description %}
-<p>Dziękujemy, zgłoszenie zostało zarejestrowane.</p>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load chunks %}
-
-{% block title %}{{ form.form_title }}{% endblock %}
-
-{% block body %}
-
-
-
-
-
-
- <h1>{% block contact_form_title %}{{ form.form_title }}{% endblock %}</h1>
-
- <div class="form-info">
- {% block contact_form_description %}
- {% chunk "contact_form__"|add:form.form_tag %}
- {% endblock %}
- </div>
-
- <form method="POST" action="." enctype="multipart/form-data" class="submit-form">
- {% csrf_token %}
- <h3>Dane Opiekuna/Opiekunki i instytucji zgłaszającej Uczestnika:</h3>
- <table>
- {{ form.as_table }}
- </table>
-
- {% for formset in formsets %}
-
- <h3>Dane Uczestników i Uczestniczek:</h3>
- <p>Można zgłosić 3 do 5 osób.</p>
-
- {{ formset.management_form }}
-
- <ul class="errorlist">
- {% for err in formset.non_form_errors %}
- <li>{{ err }}</li>
- {% endfor %}
- </ul>
-
- {% for form in formset.forms %}
- <h4>Uczestnik lub Uczestniczka nr {{ forloop.counter }}:</h4>
-
- <table>
- {{ form.as_table }}
- </table>
- {% endfor %}
-
-{% comment %}
- <div id="formstub-{{ formset.prefix }}" style="display:none">
- <h3>Dane Uczestnika/Uczestniczki:</h3>
- <table>
- {{ formset.empty_form.as_table }}
- </table>
- </div>
-
- <input type="button" value="+ Dodaj kolejną osobę" class="add_more" data-selector="#formstub-{{formset.prefix}}" data-prefix="{{formset.prefix}}">
-{% endcomment %}
- <script>
-
- </script>
-
- {% endfor %}
-
- <p>
- <button style="font-size:1.5em;">{% block contact_form_submit %}{{ form.submit_label }}{% endblock %}</button>
- </p>
- </form>
-
-
-{% endblock %}
+++ /dev/null
-Dziękujemy za rejestrację w Olimpiadzie Cyfrowej.
-Do udziału zostały zgłoszone następujące osoby:
-{% for student in contact.body.student %}* {{ student.first_name }} {{ student.last_name }}{% endfor %}
-
-Każdy zgłoszony uczeń powinien otrzymać wiadomość z potwierdzeniem
-rejestracji. Prosimy upewnić się, czy potwierdzenie dotarło do każdego
-ze zgłoszonych uczniów. W ten sposób zweryfikujemy, czy podane adresy
-są prawidłowe.
-
-Pierwszy etap Olimpiady (test on-line) odbędzie się
-15 listopada 2016 r. o godz. 10:00 i potrwa 90 minut.
-
-Wszystkie ogłoszenia związane z Turniejem będą publikowane na stronie https://olimpiadacyfrowa.pl.
-W razie pytań lub wątpliwości można kontaktować się z nami, pisząc na adres: olimpiada@nowoczesnapolska.org.pl.
-
-Z pozdrowieniami,
-
-Zespół Olimpiady Cyfrowej
-Fundacja Nowoczesna Polska
\ No newline at end of file
+++ /dev/null
-Potwierdzenie zgłoszenia uczniów do Olimpiady Cyfrowej
\ No newline at end of file
+++ /dev/null
-Witaj,
-
-Przewodniczący Komisji Szkolnej właśnie zgłosił Cię do Olimpiady Cyfrowej.
-Cieszymy się, że chcesz wziąć w niej udział.
-
-Pierwszy etap Olimpiady (test on-line) odbędzie się 15 listopada 2016 r.
-o godz. 10:00 i potrwa 90 minut.
-
-Szczegółowe informacje na temat pierwszego etapu Olimpiady oraz wszystkie
-ogłoszenia z nią związane będą publikowane na stronie https://olimpiadacyfrowa.pl.
-W razie pytań lub wątpliwości możesz kontaktować się z nami, pisząc na adres
-olimpiada@nowoczesnapolska.org.pl.
-
-Z pozdrowieniami,
-
-Zespół Olimpiady Cyfrowej
-Fundacja Nowoczesna Polska
+++ /dev/null
-Potwierdzenie zgłoszenia do Olimpiady Cyfrowej
\ No newline at end of file
+++ /dev/null
-{% extends "contact/thanks.html" %}
-
-{% block contact_form_description %}
-<p>Dziękujemy za rejestrację w Wielkim Turnieju Edukacji Medialnej.</p>
-
-<p>Na adres adres e-mail Opiekuna została wysłana wiadomość potwierdzająca
-rejestrację.</p>
-
-<p>Każdy zgłoszony uczeń powinien otrzymać wiadomość z potwierdzeniem rejestracji.
-Prosimy upewnić się, czy potwierdzenie dotarło do każdego ze zgłoszonych uczniów.
-W ten sposób zweryfikujemy, czy podane adresy są prawidłowe. </p>
-
-<p>Zespół Edukacji Medialnej<br>
-fundacja Nowoczesna Polska</p>
-{% endblock %}
+++ /dev/null
-{% extends "base_mil.html" %}
-{% load textile_pl from fnp_markup %}
-
-{% block title %}{{ flatpage.title }}{% endblock %}
-
-{% block body %}
-<div id="main-bar" class="flatpage">
-{{ flatpage.content|textile_pl }}
-</div>
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load catalogue_tags %}
-{% load course_boxes_toc from curriculum_tags %}
-{% load chunk from chunks %}
-{% load static %}
-
-{% block full_title %}Edukacja medialna{% endblock %}
-
-{% block body %}
-
-{% catalogue_carousel %}
-
-<section id="main-promobox">
- <h1>Co nowego?</h1>
-
- {% chunk "promobox" %}
-</section>
-
-<section id="main-sections">
- <h1>Lekcje:</h1>
- {% catalogue_levels_main %}
-</section>
-
-<section id="main-howto">
- <h1>Nasze lekcje to:</h1>
- <ul class="link-list">
- <li><a class="knowledge" href="/info/jak-korzystac/#wiedza-w-pigulce">wiedza w pigułce</a></li>
- <li><a class="activity" href="/info/jak-korzystac/#zadania">zadania</a></li>
- <li><a class="lesson-plan" href="/info/jak-korzystac/#scenariusze">scenariusze</a></li>
- <li><a class="reference" href="/info/jak-korzystac/#slowniczek">słowniczek</a></li>
- </ul>
- <p>Zobacz, <a href="{% url 'info' 'dobre-praktyki' %}">jak przeprowadzili je inni.</a></p>
-
- <iframe width="220" height="124" src="//www.youtube.com/embed/XJ2q_ZCPIA8?controls=2&rel=0&showinfo=0&theme=light" frameborder="0" allowfullscreen></iframe>
-</section>
-
-<section id="main-chosen">
-<h1>Według podstawy programowej:</h1>
-{% course_boxes_toc %}
-</section>
-
-
-<section id="main-tools">
-
-<section class="main-tools-box">
-<h1>Aktualności na stronie Fundacji</h1>
-{% latest_blog_posts "http://nowoczesnapolska.org.pl/feed" 5 %}
-</section>
-
-<section class="main-tools-box">
-<h1>Narzędzia</h1>
-<ul class="link-list">
- <li><a href="{% url 'contact_form' 'sugestie' %}">Zgłoś błąd lub sugestię</a></li>
- <li><a href="{% url 'info' 'jak-korzystac/' %}">Jak korzystać?</a></li>
- <li><a href="{% url 'catalogue_lesson' 'slowniczek' %}">Słowniczek</a></li>
- <li><a href="{% url 'catalogue_lesson' 'metody' %}">Metody edukacyjne</a></li>
- {% if request.user.is_authenticated %}<li><a href="{% url 'pybb:index' %}">Forum</a></li>{% endif %}
- <li><a href="{% url 'info' 'infografiki' %}">Infografiki</a></li>
- <li><a href="{% url 'info' 'aplikacje-mobilne' %}">Aplikacje mobilne</a></li>
- <li><a href="/media/chunks/attachment/poradnik-bezpieczenstwa-mobilnego.pdf">Poradnik bezpieczeństwa mobilnego (PDF)</a></li>
- <li><a href="http://nowoczesnapolska.org.pl/prywatnosc/">Polityka prywatności i ciasteczka</a></li>
-</ul>
-</section>
-
-<div style="clear:both"></div>
-</section>
-
-
-{% endblock %}
-
+++ /dev/null
-{% extends "base_mil.html" %}
-
-{% block body %}
-mil
-{% endblock %}
+++ /dev/null
-{% extends "base_super.html" %}
-{% load textile_pl from fnp_markup %}
-{% load sponsor_tags %}
-{% load compressed %}
-{% load static %}
-
-{% block full_title %}Olimpiada cyfrowa{% endblock %}
-
-{% block og_site_name %}Olimpiada cyfrowa{% endblock %}
-
-{% block ogurl %}https://olimpiadacyfrowa.pl{% endblock %}
-
-{% block og_image %}http://olimpiadacyfrowa.pl/media/chunks/attachment/olimpiada_cyfrowa_logo.png{% endblock %}
-
-{% block logo %}<img src="{% static "img/logo-oc.png" %}" height="73" alt="Olimpiada cyfrowa"/>{% endblock %}
-
-{% block searchbox %}{% endblock %}
-
-{% block top_navigation %}
- <li><a class="menu-oc-regulamin" href="/regulamin/">Regulamin</a></li>
- <li><a class="menu-oc-program" href="/program/">Program</a></li>
- <li><a class="menu-oc-literatura" href="/literatura/">Literatura</a></li>
- <li><a class="menu-oc-harmonogram" href="/harmonogram/">Harmonogram</a></li>
- <li><a class="menu-oc-komitet" href="/sklad/">Rada i komitet</a></li>
- <li><a class="menu-oc-kontakt" href="/kontakt/">Kontakt</a></li>
-{% endblock %}
-
-{% block body %}
- <div id="main-bar" class="flatpage">
- {{ flatpage.content|textile_pl }}
- </div>
-{% endblock %}
-
-{% block copyrights %}
- <br/>Ikonki w menu:
- <a href="http://www.flaticon.com/authors/freepik">Designed by Freepik and distributed by Flaticon</a>
-{% endblock %}
-
-{% block sponsors %}
- {% sponsor_page "footer_olimpiada" %}
-{% endblock %}
-
-{% block extra_script %}
- {% compressed_js 'base' %}
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% load i18n %}
-<a href="{% url 'login' %}">{% trans "Login" %} / {% trans "register" %}</a> {% trans "to create to post a reply" %}.
+++ /dev/null
-{% load pybb_tags %}
-{% load libravatar_tags %}
-<div class="avatar">
- {% pybb_get_profile user=user as user_profile %}
- <a href="{{ user_profile.get_absolute_url }}">
- <img src="{% libravatar user.email PYBB_AVATAR_WIDTH %}" alt="{{ user }} libravatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
- </a>
-</div>
+++ /dev/null
-{% load i18n pybb_tags %}
-<ul class='breadcrumb'>
- {% include "pybb/breadcrumb_top_extra_crumb.html" %}
- <li><a href="{% url 'pybb:index' %}">Forum</a> <span class="divider">/</span></li>
- {% if object %}
- {% if object.get_parents %}
- {% for obj in object.get_parents %}
- <li>{% pybb_link obj %} <span class="divider">/</span></li>
- {% endfor %}
- {% endif %}
- {% if extra_crumb %}
- <li>{% pybb_link object %} <span class="divider">/</span></li>
- {% else %}
- <li>{{ object }}</li>
- {% endif %}
- {% endif %}
- {% if extra_crumb %}
- <li>{% trans extra_crumb %}</li>
- {% endif %}
-</ul>
+++ /dev/null
-<li><a href="{% url 'home' %}">Strona główna</a> <span class="divider">/</span></li>
# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
from django.conf import settings
from django.contrib.flatpages.views import flatpage
-# from django.shortcuts import redirect
-# from .views import HomeView, AvatarlessProfileEditView, flatpage_with_template
-
-urlpatterns = patterns(
- '',
- # url(r'^$', HomeView.as_view(), name="home"),
- # url(r'^lekcje/', include('catalogue.urls')),
- # url(r'^info/turniej/(?P<url>.*)$', lambda request, url: redirect('olimpiada', url)),
- # url(r'^info/(?P<url>.*)$', flatpage, name="info"),
- # url(r'^olimpiada/$', lambda request: flatpage(request, 'turniej/'), name='olimpiada'),
- # url(r'^olimpiada/(?P<url>.*)$', lambda request, url: flatpage(request, 'turniej/' + url), name='olimpiada'),
+urlpatterns = [
url(r'^szukaj/', include('haystack.urls')),
- # url(r'^olimpiada-teaser/(?P<url>.*)$',
- # lambda request, url: flatpage_with_template(request, 'turniej/' + url, 'olimpiada_teaser.html'),
- # name='olimpiada_teaser'),
-
url(r'^zglos/', include('contact.urls')),
- # url(r'^forum/profile/edit/$', AvatarlessProfileEditView.as_view(), name='edit_profile'),
- # url(r'^forum/', include('forum.urls')),
- # url(r'^forum/', include('pybb.urls', namespace='pybb')),
- # url(r'^kompetencje/', include('curriculum.urls')),
url(r'^zadania/', include('wtem.urls')),
url(r'^drugi-etap/', include('stage2.urls')),
-)
+]
# Admin stuff, if necessary.
admin.autodiscover()
if 'django_cas' in settings.INSTALLED_APPS:
- urlpatterns += patterns(
- '',
- (r'^admin/logout/$', 'django_cas.views.logout'),
- )
- urlpatterns += patterns(
- '',
+ urlpatterns += [
+ url(r'^admin/logout/$', 'django_cas.views.logout'),
+ ]
+ urlpatterns += [
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
- )
+ ]
# Auth stuff, if necessary
if 'django_cas' in settings.INSTALLED_APPS:
- urlpatterns += patterns(
- '',
+ urlpatterns += [
url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
- )
+ ]
else:
from django.contrib.auth.views import login, logout
- urlpatterns += (
+ urlpatterns += [
url(r'^accounts/login/$', login, name='login'),
url(r'^accounts/logout/$', logout, name='logout'),
- )
+ ]
urlpatterns += (
url(r'^(?P<url>[^/]*/|)$',
lambda request, url: flatpage(request, 'turniej/' + url)),
)
-
-if settings.DEBUG:
- urlpatterns += (
- # url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
- # 'document_root': settings.MEDIA_ROOT,
- # }),
- )
# -*- coding: utf-8 -*-
-from django.contrib.flatpages.views import flatpage
-from django.views.defaults import page_not_found
+from django.conf import settings
+from django.contrib.flatpages.models import FlatPage
+from django.contrib.flatpages.views import render_flatpage
+from django.contrib.sites.models import get_current_site
+from django.http.response import Http404, HttpResponsePermanentRedirect
+from django.shortcuts import get_object_or_404
from django.views.generic import TemplateView
-from .forms import AvatarlessEditProfileForm
-
-
-class HomeView(TemplateView):
- template_name = "home.html"
-
-
-def mil_home_view(request):
- return flatpage(request, url='/' if request.LANGUAGE_CODE == 'pl' else '/en/')
-
-
-def mil_404_view(request):
- return page_not_found(request, '404_mil.html')
-
-
-def mil_contact_view(request):
- return flatpage(request, url='/kontakt_mil/' if request.LANGUAGE_CODE == 'pl' else '/contact_mil/')
-
-
-def mil_knowledge_base_view(request, url):
- return flatpage(request, url='bazawiedzy/' + url)
-
def flatpage_with_template(request, url, template_name):
"""
flatpage
`flatpages.flatpages` object
"""
- from django.conf import settings
- from django.contrib.flatpages.models import FlatPage
- from django.contrib.flatpages.views import render_flatpage
- from django.contrib.sites.models import get_current_site
- from django.http.response import Http404, HttpResponsePermanentRedirect
- from django.shortcuts import get_object_or_404
if not url.startswith('/'):
url = '/' + url
site_id = get_current_site(request).id
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django import forms
-from django.forms.models import ModelChoiceIterator
-from django.utils.translation import ugettext as _
-import pybb.forms
-
-from catalogue.models import Lesson
-
-
-class GroupedModelChoiceIterator(ModelChoiceIterator):
- def __init__(self, field):
- super(GroupedModelChoiceIterator, self).__init__(field)
- self.queryset = self.field.grouping_model.objects
- self.items_queryset = self.field.queryset
-
- def choice(self, obj):
- items_query = self.items_queryset.filter(**{self.field.grouping_fk_field: obj})
- items = [super(GroupedModelChoiceIterator, self).choice(item) for item in items_query.all()]
- return unicode(obj), items
-
-
-class GroupedModelChoiceField(forms.ModelChoiceField):
-
- def __init__(self, queryset, grouping_fk_field, **kwargs):
- self.grouping_fk_field = grouping_fk_field
- self.grouping_model = queryset.model._meta.get_field(grouping_fk_field).rel.to
- super(GroupedModelChoiceField, self).__init__(queryset, **kwargs)
-
- def _get_choices(self):
- toret = super(GroupedModelChoiceField, self)._get_choices()
- if isinstance(toret, ModelChoiceIterator):
- toret = GroupedModelChoiceIterator(self)
- return toret
-
- choices = property(_get_choices, forms.ModelChoiceField.choices.fset)
-
-
-class PostForm(pybb.forms.PostForm):
- lesson = GroupedModelChoiceField(
- label=_('Related lesson'), queryset=Lesson.objects.all(),
- grouping_fk_field='section', required=False)
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-08-29 10:00+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-
-#: forms.py:9 templates/forum/related_lesson_info.html:2
-msgid "Related lesson"
-msgstr "Powiązana lekcja"
-
-#: templates/pybb/topic.html:27 templates/pybb/topic.html.py:47
-msgid "Posts"
-msgstr ""
-
-#: templates/pybb/topic.html:55
-msgid "Unstick topic"
-msgstr ""
-
-#: templates/pybb/topic.html:57
-msgid "Stick topic"
-msgstr ""
-
-#: templates/pybb/topic.html:61
-msgid "Open topic"
-msgstr ""
-
-#: templates/pybb/topic.html:63
-msgid "Close topic"
-msgstr ""
-
-#: templates/pybb/topic.html:66
-msgid "Admin"
-msgstr ""
-
-#: templates/pybb/topic.html:75
-msgid "Unsubscribe"
-msgstr ""
-
-#: templates/pybb/topic.html:77
-msgid "Subscribe"
-msgstr ""
-
-#: templates/pybb/topic.html:96
-msgid "Subscribers"
-msgstr ""
+++ /dev/null
-# -*- coding: utf-8 -*-
-from urllib import urlencode
-
-from django.contrib.auth import REDIRECT_FIELD_NAME
-from django.http import HttpResponseRedirect
-from django.core.urlresolvers import reverse
-from django_cas.views import login as cas_login
-
-
-class ForumMiddleware(object):
- @staticmethod
- def process_request(request):
- if request.path.startswith(reverse('pybb:index')) \
- and (not hasattr(request, 'user') or not request.user.is_authenticated()):
- params = urlencode({REDIRECT_FIELD_NAME: request.get_full_path()})
- return HttpResponseRedirect(reverse(cas_login) + '?' + params)
+++ /dev/null
-# -*- 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 'Topic'
- db.create_table(u'forum_topic', (
- ('pybb_topic', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['pybb.Topic'], unique=True, primary_key=True)),
- ('lesson', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Lesson'], null=True, blank=True)),
- ))
- db.send_create_signal(u'forum', ['Topic'])
-
-
- def backwards(self, orm):
- # Deleting model 'Topic'
- db.delete_table(u'forum_topic')
-
-
- 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'catalogue.lesson': {
- 'Meta': {'ordering': "['section', 'level', 'order']", 'object_name': 'Lesson'},
- 'curriculum_courses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['curriculum.CurriculumCourse']", 'symmetrical': 'False', 'blank': 'True'}),
- 'dc': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"}),
- 'order': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Section']", 'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'student_package': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'student_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- u'catalogue.section': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
- 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
- },
- 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'})
- },
- u'curriculum.curriculumcourse': {
- 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
- 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'curriculum.level': {
- 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
- 'group': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'order': ('django.db.models.fields.IntegerField', [], {}),
- 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- u'forum.topic': {
- 'Meta': {'object_name': 'Topic'},
- 'lesson': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['catalogue.Lesson']", 'null': 'True', 'blank': 'True'}),
- 'pybb_topic': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['pybb.Topic']", 'unique': 'True', 'primary_key': 'True'})
- },
- u'pybb.category': {
- 'Meta': {'ordering': "['position']", 'object_name': 'Category'},
- 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
- 'position': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'})
- },
- u'pybb.forum': {
- 'Meta': {'ordering': "['position']", 'object_name': 'Forum'},
- 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'forums'", 'to': u"orm['pybb.Category']"}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'headline': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'moderators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
- 'position': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
- 'post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
- 'readed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'readed_forums'", 'symmetrical': 'False', 'through': u"orm['pybb.ForumReadTracker']", 'to': u"orm['auth.User']"}),
- 'topic_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
- 'updated': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
- },
- u'pybb.forumreadtracker': {
- 'Meta': {'unique_together': "(('user', 'forum'),)", 'object_name': 'ForumReadTracker'},
- 'forum': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['pybb.Forum']", 'null': 'True', 'blank': 'True'}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
- },
- u'pybb.topic': {
- 'Meta': {'ordering': "['-created']", 'object_name': 'Topic'},
- 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
- 'forum': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'topics'", 'to': u"orm['pybb.Forum']"}),
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'on_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'poll_question': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'poll_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
- 'readed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'readed_topics'", 'symmetrical': 'False', 'through': u"orm['pybb.TopicReadTracker']", 'to': u"orm['auth.User']"}),
- 'sticky': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'subscriptions'", 'blank': 'True', 'to': u"orm['auth.User']"}),
- 'updated': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
- 'views': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'})
- },
- u'pybb.topicreadtracker': {
- 'Meta': {'unique_together': "(('user', 'topic'),)", 'object_name': 'TopicReadTracker'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'topic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['pybb.Topic']", 'null': 'True', 'blank': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
- }
- }
-
- complete_apps = ['forum']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.db import models
-
-import pybb.models
-
-from catalogue.models import Lesson
-
-
-class Topic(models.Model):
- pybb_topic = models.OneToOneField(pybb.models.Topic, primary_key=True, related_name='edumed_topic')
- lesson = models.ForeignKey(Lesson, null=True, blank=True, related_name='forum_topics')
+++ /dev/null
-# -*- coding: utf-8 -*-
-from haystack import indexes
-from pybb.models import Post
-
-
-class PostIndex(indexes.SearchIndex, indexes.Indexable):
- text = indexes.CharField(document=True, use_template=True)
-
- def get_model(self):
- return Post
+++ /dev/null
-{% load i18n %}
-{% if lesson %}
-<h5 style="margin-top: -20px;">{% trans 'Related lesson' %}: <a href="{{lesson.get_absolute_url}}">{{lesson.title}}</a></h5>
-{% endif %}
\ No newline at end of file
+++ /dev/null
-{% extends 'pybb/base.html' %}
-{% load i18n %}
-
-
-{% block content %}
-
- <h1>{% trans 'Search' %}</h1>
- <form method="get">
- {{form.q}}
- <tr>
- <td> </td>
- <td>
- <input type="submit" value="{% trans 'Search' %}">
- </td>
- </tr>
- </form>
-
- {% if query %}
- <hr/>
- {% for result in page.object_list %}
- <p class="search-result">
- <strong>Temat:</strong> <a href="{{ result.object.get_absolute_url }}">{{ result.object.topic.name }}</a><br/>
- {% autoescape off %}
- {% for snippet in result.highlighted.text %}
- {{snippet}}{% if not forloop.last %} <strong>...</strong> {% endif %}
- {% endfor %}
- {% endautoescape %}
- </p>
- {% empty %}
- <p>Brak wyników.</p>
- {% endfor %}
-
- {% if page.has_previous or page.has_next %}
- <div>
- {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Poprzednie{% if page.has_previous %}</a>{% endif %}
- |
- {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Następne »{% if page.has_next %}</a>{% endif %}
- </div>
- {% endif %}
- {% endif %}
-{% endblock %}
\ No newline at end of file
+++ /dev/null
-{% load url from future %}
-{% load i18n pybb_tags %}
-
-{% if category.forums_accessed|pybb_forum_unread:user|length > 0 %}
-<div class='category'>
- <table class="table category-table">
- <thead>
- <tr class="forum-row head-row">
- <th class="forum-name">
- {% trans "Forum" %}
- </th>
- <th class="forum-topic-count">
- {% trans "Topics" %}
- </th>
- <th class="forum-post-count">
- {% trans "Posts" %}
- </th>
- <th class="forum-last-post">
- {% trans "Last posts" %}
- </th>
- </tr>
- </thead>
- <tbody>
- {% for forum in category.forums_accessed|pybb_forum_unread:user %}
- <tr class="forum-row">
- <td class="forum-name {% if forum.unread %} forum-unread{% endif %}">
- <div class="state-indicator"></div>
- <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a> {% if forum.hidden %}[{% trans "Hidden" %}]{% endif %}
- <div class="forum-description">
- {{ forum.description|safe }}
- </div>
- </td>
- <td class="forum-topic-count">
- {{ forum.topic_count }}
- </td>
- <td class="forum-post-count">
- {{ forum.post_count }}
- </td>
- <td class="forum-last-post">
- {% include "pybb/forum_last_update_info.html" %}
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-</div>
-{% endif %}
\ No newline at end of file
+++ /dev/null
-{% load humanize %}
-{% if forum.updated %}
- {{ forum.last_post.user }}
- {{ forum.updated|naturaltime }}
-{% endif %}
\ No newline at end of file
+++ /dev/null
-{% load url from future %}
-{% load i18n pybb_tags %}
-<form class="post-form" action="
- {% if forum %}
- {% url 'pybb:add_topic' forum.pk %}
- {% else %}
- {% if topic %}
- {% url 'pybb:add_post' topic.pk %}
- {% else %}
- {% url 'pybb:edit_post' pk=object.pk %}
- {% endif %}
- {% endif %}" method="post" enctype="multipart/form-data">
- {% csrf_token %}
- <fieldset>
- {% include "pybb/form_errors.html" %}
- {% if form.name %} {% include "pybb/form_field.html" with field=form.name %} {% endif %}
-
- {% if lesson_editable %}
- {% include "pybb/form_field.html" with field=form.lesson %}
- {% endif %}
-
- {% if form.login %} {% include "pybb/form_field.html" with field=form.login %} {% endif %}
- {% if form.body %} {% include "pybb/form_field.html" with field=form.body %} {% endif %}
- <div id='emoticons'>
- {% for smile, url in form.available_smiles.items %}
- <a href='#' title='{{ smile|safe }}'><img src='{{ STATIC_URL }}{{ form.smiles_prefix }}{{ url }}'></a>
- {% endfor %}
- </div>
-
- {% if form.poll_type and request.user.is_superuser %}
- {% include "pybb/poll_edit_form.html" %}
- {% endif %}
- {% include "pybb/attachments_formset.html" %}
- <p class="submit">{% include "pybb/_button_submit.html" %}</p>
- </fieldset>
-</form>
+++ /dev/null
-{% extends 'pybb/base.html' %}
-
-{% load url from future %}
-
-{% load pybb_tags i18n %}
-
-{% block title %}{{ topic }}{% endblock %}
-
-{% block extra_script %}
- {{ block.super }}
- {% include "pybb/_markitup.html" %}
- <script type="text/javascript" src="{{ STATIC_URL }}pybb/js/jquery.formset.min.js"></script>
-{% endblock %}
-
-{% block breadcrumb %}
- {% with object=topic %}
- {% include "pybb/breadcrumb.html" %}
- {% endwith %}
-{% endblock %}
-
-{% block content %}
- <div class="topic">
- <h1>{{ topic.name }}</h1>
-
- {% include 'forum/related_lesson_info.html' with lesson=topic.edumed_topic.lesson %}
-
- {% with _('Posts') as label %}
- {% include "pybb/pagination.html" %}
- {% endwith %}
-
- {% if topic.poll_type %}
- {% include 'pybb/poll.html' %}
- {% endif %}
-
- <div class="posts">
- {% if first_post %}{% ifnotequal first_post post_list.0 %}
- {% with first_post as post %}
- <li class="first_post">{% include "pybb/post_template.html" %}</li>
- {% endwith %}
- {% endifnotequal %}{% endif %}
- {% for post in post_list %}
- {% cycle 'odd' 'even' as rowcolors silent %}
- {% include "pybb/post_template.html" %}
- {% endfor %}
- </div>
- <div> </div>
- {% with _('Posts') as label %}
- {% include "pybb/pagination.html" %}
- {% endwith %}
-
- {% if user.is_authenticated %}
- <div class="controls">
- {% if user.is_moderator %}
- {% if topic.sticky %}
- <a href="{% url 'pybb:unstick_topic' topic.id %}">{% trans "Unstick topic" %}</a> /
- {% else %}
- <a href="{% url 'pybb:stick_topic' topic.id %}">{% trans "Stick topic" %}</a> /
- {% endif %}
-
- {% if topic.closed %}
- <a href="{% url 'pybb:open_topic' topic.id %}">{% trans "Open topic" %}</a> /
- {% else %}
- <a href="{% url 'pybb:close_topic' topic.id %}">{% trans "Close topic" %}</a> /
- {% endif %}
- {% if perms.pybb.change_topic and user.is_staff %}
- <a href="{% url 'admin:pybb_topic_change' topic.id %}">{% trans 'Admin' %}</a> /
- {% endif %}
- {% comment %}
- <a href="{% url 'pybb:merge_topics' %}?topic={{ topic.id }}">{% trans 'Merge topics' %}</a> /
- {% endcomment %}
- {% endif %}
-
- {% if user.is_subscribed %}
- <a href="{% url 'pybb:delete_subscription' topic.id %}?from_topic">{% trans "Unsubscribe" %}</a>
- {% else %}
- <a href="{% url 'pybb:add_subscription' topic.id %}">{% trans "Subscribe" %}</a>
- {% endif %}
- </div>
- {% endif %}
-
- {% if user.is_authenticated or PYBB_ENABLE_ANONYMOUS_POST %}
- {% pybb_get_profile user=user as user_profile %}
-
- {% if not user_profile.is_banned %}
- {% if not topic.closed %}
- {% include "pybb/post_form.html" %}
- {% endif %}
- {% endif %}
- {% else %}
- {% include 'pybb/_need_to_login_message.html' %}
- {% endif %}
-
- {% if user.is_staff %}
- <div class="subscriber-list">
- {% trans "Subscribers" %}:
- {% for subscriber in topic.subscribers.all %}
- <a href="{% url 'pybb:user' subscriber.username %}">{{ subscriber.username }}</a>,
- {% endfor %}
- </div>
- {% endif %}
- </div>
-{% endblock %}
+++ /dev/null
-{% load humanize %}
-{% if topic.updated %}
- {{ topic.last_post.user }}
- {{ topic.updated|naturaltime }}
-
-{% endif %}
\ No newline at end of file
+++ /dev/null
-{{object.body_text}}
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.conf.urls import patterns, url
-from haystack.query import SearchQuerySet
-from haystack.views import SearchView, search_view_factory
-from haystack.forms import SearchForm
-from pybb.models import Post
-
-from .views import AddPostView, EditPostView
-
-
-urlpatterns = patterns(
- '',
- url(r'^forum/(?P<forum_id>\d+)/topic/add/$', AddPostView.as_view()),
- url(r'^post/(?P<pk>\d+)/edit/$', EditPostView.as_view()),
-)
-
-PostsSearchQuerySet = SearchQuerySet().models(Post).highlight()
-
-urlpatterns += patterns(
- 'haystack.views',
- url(r'^szukaj/$', search_view_factory(
- view_class=SearchView,
- template='forum/search_results.html',
- searchqueryset=PostsSearchQuerySet,
- form_class=SearchForm
- ), name='forum_search'))
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.core.exceptions import ObjectDoesNotExist
-import pybb.views
-import pybb.forms
-
-from .forms import PostForm
-from .models import Topic
-
-
-class PostEditMixin(pybb.views.PostEditMixin):
-
- def get_form_class(self):
- toret = super(PostEditMixin, self).get_form_class()
- if issubclass(toret, pybb.forms.PostForm):
- toret = PostForm
- return toret
-
- def form_valid(self, form):
- toret = super(PostEditMixin, self).form_valid(form)
-
- pybb_post = self.object
- pybb_topic = pybb_post.topic
- topic, topic_created = Topic.objects.get_or_create(pybb_topic=pybb_topic)
-
- if pybb_post == pybb_topic.head:
- topic.lesson = form.cleaned_data['lesson']
- topic.save()
-
- return toret
-
-
-class AddPostView(PostEditMixin, pybb.views.AddPostView):
- def get_context_data(self, **kwargs):
- ctx = super(AddPostView, self).get_context_data(**kwargs)
- ctx['lesson_editable'] = self._creates_new_topic()
- return ctx
-
- def _creates_new_topic(self):
- return self.forum is not None
-
-
-class EditPostView(PostEditMixin, pybb.views.EditPostView):
- def get_context_data(self, **kwargs):
- ctx = super(EditPostView, self).get_context_data(**kwargs)
- ctx['lesson_editable'] = self._edits_topics_head()
- return ctx
-
- def _edits_topics_head(self):
- return self.object == self.object.topic.head
-
- def get_form_kwargs(self):
- kwargs = super(EditPostView, self).get_form_kwargs()
- try:
- lesson = self.object.topic.edumed_topic.lesson
- except ObjectDoesNotExist:
- lesson = None
- kwargs['initial']['lesson'] = lesson
- return kwargs
+++ /dev/null
-Subproject commit 05a4485b020b9252f5ffc02d19c163705cbf26e2
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.contrib import admin
-from .models import Publisher
-
-admin.site.register(Publisher)
+++ /dev/null
-# -*- 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 'Publisher'
- db.create_table(u'publishers_publisher', (
- (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('logo', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
- ))
- db.send_create_signal(u'publishers', ['Publisher'])
-
-
- def backwards(self, orm):
- # Deleting model 'Publisher'
- db.delete_table(u'publishers_publisher')
-
-
- models = {
- u'publishers.publisher': {
- 'Meta': {'object_name': 'Publisher'},
- u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- }
- }
-
- complete_apps = ['publishers']
\ No newline at end of file
+++ /dev/null
-# -*- coding: utf-8 -*-
-from django.db import models
-
-
-class Publisher(models.Model):
- name = models.CharField(max_length=255)
- logo = models.ImageField(upload_to='publishers/logo')
-
- def __unicode__(self):
- return self.name
django-haystack>=2.0,<2.1
pysolr>=3,<4
-pybbm>=0.14,<0.15
django-libravatar
sorl-thumbnail>=12,<13