missed commits at top level for the merge forward - catching up on the things that were not in ietf. Made one ietf/url tweak for static tests

- Legacy-Id: 7478
This commit is contained in:
Robert Sparks 2014-03-15 20:20:13 +00:00
commit e5fa8339f7
73 changed files with 9045 additions and 683 deletions

View file

@ -0,0 +1,33 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
env:
- DJANGO=django==1.3
- DJANGO=django==1.4
- DJANGO=https://github.com/django/django/tarball/stable/1.5.x
install:
- pip install -q $DJANGO --use-mirrors
- pip install https://github.com/jorgebastida/django-app-test-runner/zipball/master
script:
- app-test-runner dajaxice dajaxice
branches:
only:
- master
- develop
matrix:
exclude:
# Django < 1.5 not supported on python 3
- python: "3.2"
env: DJANGO=django==1.3
- python: "3.2"
env: DJANGO=django==1.4
# Django 1.5 strongly recommends python 2.7 or later (so skip 2.6)
- python: "2.6"
env: DJANGO=https://github.com/django/django/tarball/stable/1.5.x

18
django-dajaxice/AUTHORS Normal file
View file

@ -0,0 +1,18 @@
Glue is mainly developed and maintained by Jorge Bastida <me@jorgebastida.com>
A big thanks to all the contributors:
Angel Abad for the Debian and Ubuntu distribution package.
Denis Darii <denis.darii@gmail.com>
Florian Le Goff <florian@9h37.fr>
Youen Péron <@youen>
Clément Nodet <clement.nodet@gmail.com>
Francisco Vianna <@fvianna>
Paweł Krawczyk <@kravietz>
Michael Fladischer <michael@fladi.at>
Anton Agestam <msn@antonagestam.se>
Michal Hořejšek <horejsekmichal@gmail.com>
Ken <@kkansky>
And the authors of:
XmlHttpRequest.js project (License inside COPYING)
json2.js Library (License inside COPYING)

62
django-dajaxice/COPYING Normal file
View file

@ -0,0 +1,62 @@
# django-dajaxixe License ################################################
Copyright (c) 2009-2012 Benito Jorge Bastida
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
3. Neither the name of the author nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# XMLHttpRequest.js License ################################################
XMLHttpRequest.js Copyright (C) 2008 Sergey Ilinsky (http://www.ilinsky.com)
This work is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This work is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# json2.js License ###########################################################
http://www.json.org/json2.js 2009-09-29
Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
You are free to copy, modify, or redistribute.
################################################################################

View file

@ -0,0 +1,8 @@
include *.py
include COPYING
include AUTHORS
recursive-include dajaxice *
recursive-exclude dajaxice *.pyc
recursive-include examples *
recursive-exclude examples *.pyc
recursive-include docs *

View file

@ -0,0 +1,19 @@
django-dajaxice
===============
Dajaxice is the communication core of dajaxproject. It's main goal is to trivialize the asynchronous communication within the django server side code and your js code.
dajaxice is JS-framework agnostic and focuses on decoupling the presentation logic from the server-side logic. dajaxice only requieres 5 minutes to start working.
Project Aims
------------
* Isolate the communication between the client and the server.
* JS Framework agnostic (No Prototype, JQuery... needed ).
* Presentation logic outside the views (No presentation code inside ajax functions).
* Lightweight.
* Crossbrowsing ready.
* Unobtrusive standard-compliant (W3C) XMLHttpRequest 1.0 object usage.
Official site http://dajaxproject.com
Documentation http://readthedocs.org/projects/django-dajaxice/

View file

@ -1,4 +1,4 @@
import json
from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
@ -9,7 +9,7 @@ def test_registered_function(request):
@dajaxice_register
def test_string(request):
return json.dumps({'string': 'hello world'})
return simplejson.dumps({'string': 'hello world'})
@dajaxice_register
@ -19,25 +19,25 @@ def test_ajax_exception(request):
@dajaxice_register
def test_foo(request):
return json.dumps({'foo': 'bar'})
return simplejson.dumps({'foo': 'bar'})
@dajaxice_register
def test_foo_with_params(request, param1):
return json.dumps({'param1': param1})
return simplejson.dumps({'param1': param1})
@dajaxice_register(method='GET')
def test_get_register(request):
return json.dumps({'foo': 'user'})
return simplejson.dumps({'foo': 'user'})
@dajaxice_register(method='GET', name="get_user_data")
def test_get_with_name_register(request):
return json.dumps({'bar': 'user'})
return simplejson.dumps({'bar': 'user'})
@dajaxice_register(method='GET', name="get_multi")
@dajaxice_register(name="post_multi")
def test_multi_register(request):
return json.dumps({'foo': 'multi'})
return simplejson.dumps({'foo': 'multi'})

View file

@ -1,4 +1,4 @@
from django.conf.urls import *
from django.conf.urls import patterns, url, include
from .views import DajaxiceRequest
urlpatterns = patterns('dajaxice.views',

View file

@ -1,6 +1,7 @@
import logging, json
import logging
from django.conf import settings
import json
from django.views.generic.base import View
from django.http import HttpResponse, Http404
@ -50,11 +51,10 @@ class DajaxiceRequest(View):
try:
response = function.call(request, **data)
except Exception:
raise # always give us a backtrace
if settings.DEBUG:
raise
response = dajaxice_config.DAJAXICE_EXCEPTION
return HttpResponse(response, mimetype="application/x-json")
return HttpResponse(response, content_type="application/x-json")
else:
raise FunctionNotCallableError(name)

View file

@ -0,0 +1,130 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-dajaxice.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-dajaxice.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/django-dajaxice"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-dajaxice"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View file

@ -0,0 +1,38 @@
Available Settings
==================
DAJAXICE_MEDIA_PREFIX
---------------------
This will be the namespace that dajaxice will use as endpoint.
Defaults to ``dajaxice``
Optional: ``True``
DAJAXICE_XMLHTTPREQUEST_JS_IMPORT
---------------------------------
Include XmlHttpRequest.js inside dajaxice.core.js
Defaults to ``True``
Optional: ``True``
DAJAXICE_JSON2_JS_IMPORT
------------------------
Include json2.js inside dajaxice.core.js
Defaults to ``True``
Optional: ``True``
DAJAXICE_EXCEPTION
------------------
Default data sent when an exception occurs.
Defaults to ``"DAJAXICE_EXCEPTION"``
Optional: ``True``

View file

@ -0,0 +1,124 @@
Changelog
=========
0.5.5
^^^^^
* Return XMLHttpRequest from concreate functions as well as from function call.
* Fixed django 1.5 compatibility: Content-Type have to be application/x-www-form-urlencoded otherwise Django discards POST data.
* Fix JS generation errors
* Fix @dajaxice_register legacy decorator
0.5.4.1
^^^^^^^
* Fix JS generation errors.
0.5.4
^^^^^
* Fix JS generation errors.
0.5.3
^^^^^
* Fix some Windows bugs.
* Fix some JS generation errors.
* Make dajaxice use CSRF_COOKIE_NAME.
0.5.2
^^^^^
* Fix GET dajaxice requests in order to send args as part of the url.
0.5.1
^^^^^
* Make django-dajaxice work with django 1.3
* Fix installation steps
* Update json2.js
0.5
^^^
* General Project clean-up
* Django>=1.3 is now a requirement
* Fixed numerous CSRF issues
* Dajaxice now use django.contrib.staticfiles
* Fix SERVER_ROOT_URL issues
* Fixed js_core issues accepting multiple arguments
* New upgraded documentation
* Marketing site (http://dajaxproject.com) is now open-source
* Fix JS generation issues
* Travis-ci integration
0.2
^^^
* Fix bug with the 'is_callback_a_function' variable in dajaxice.core.js
* Fix bug with csrftoken in landing pages using dajaxice.
* Improve reliability handling server errors.
* Exception handling was fully rewritten. Dajaxice default_error_callback is now configurable using Dajaxice.setup.
* Custom error messages per dajaxice call.
* Dajaxice now propagate docstrings to javascript dajaxice functions.
* Added DAJAXICE_JS_DOCSTRINGS to configure docstrings propagation behaviour, default=False.
* Updated installation guide for compatibility with django 1.3
* dajaxice now uses the logger 'dajaxice' and not 'dajaxice.DajaxiceRequest'
* Documentation Updated.
0.1.8.1
^^^^^^^
* Fixed bug #25 related to CSRF verification on Django 1.2.5
0.1.8
^^^^^
* Add build dir to ignores
* Remove MANIFEST file and auto-generate it through MANIFEST.in
* Add MANIFEST to ignores
* Include examples and docs dirs to source distribution
* Add long_description to setup.py
* Fixed Flaw in AJAX CSRF handling (X-CSRFToken Django 1.2.5)
0.1.7
^^^^^
* Fixing dajaxice callback model to improve security against XSS attacks.
* Dajaxice callbacks should be passed as functions and not as strings.
* Old string-callback maintained for backward compatibility.(usage not recommended)
* New documentation using Sphinx
* Adding a decorators.py file with a helper decorator to register functions (Douglas Soares de Andrade)
0.1.6
^^^^^
* Fixing registration bugs
* Added some tests
0.1.5
^^^^^
* Now dajaxice functions must be registered using dajaxice_functions.register instead of adding that functions to DAJAXICE_FUNCTIONS list inside settings.py. This pattern is very similar to django.contrib.admin model registration.
* Now dajaxice functions could be placed inside any module depth.
* With this approach dajaxice app reusability was improved.
* Old style registration (using DAJAXICE_FUNCTIONS) works too, but isn't recommended.
* New tests added.
0.1.3
^^^^^
* CSRF middleware buf fixed
* Improved production and development logging
* New custom Exception message
* New notify_exception to send traceback to admins
* Fixed semicolon issues
* Fixed unicode errors
* Fixed generate_static_dajaxice before easy_install usage
* Fixed IE6 bug in dajaxice.core.js
0.1.2
^^^^^
* New and cleaned setup.py
0.1.1
^^^^^
* json2.js and XMLHttpRequest libs included
* New settings DAJAXICE_XMLHTTPREQUEST_JS_IMPORT and DAJAXICE_JSON2_JS_IMPORT
0.1.0
^^^^^
* dajaxice AJAX functions now receive parameters as function arguments.
* dajaxice now uses standard python logging
* some bugs fixed
0.0.1
^^^^^
* First Release

View file

@ -0,0 +1,224 @@
# -*- coding: utf-8 -*-
#
# django-dajaxice documentation build configuration file, created by
# sphinx-quickstart on Fri May 25 08:02:23 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'django-dajaxice'
copyright = u'2012, Jorge Bastida'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
import pkg_resources
try:
release = pkg_resources.get_distribution('django-dajaxice').version
except pkg_resources.DistributionNotFound:
print 'To build the documentation, The distribution information of django-dajaxice'
print 'Has to be available. Either install the package into your'
print 'development environment or run "setup.py develop" to setup the'
print 'metadata. A virtualenv is recommended!'
sys.exit(1)
del pkg_resources
version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'nature'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'django-dajaxicedoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'django-dajaxice.tex', u'django-dajaxice Documentation',
u'Jorge Bastida', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'django-dajaxice', u'django-dajaxice Documentation',
[u'Jorge Bastida'], 1)
]

View file

@ -0,0 +1,31 @@
Custom error callbacks
======================
How dajaxice handle errors
--------------------------
When one of your functions raises an exception dajaxice returns as response the ``DAJAXICE_EXCEPTION`` message.
On every response ``dajaxice.core.js`` checks if that response was an error or not and shows the user a default
error message ``Something goes wrong``.
Customize the default error message
-----------------------------------
This behaviour is configurable using the new ``Dajaxice.setup`` function.
.. code-block:: javascript
Dajaxice.setup({'default_exception_callback': function(){ alert('Error!'); }});
Customize error message per call
--------------------------------
In this new version you can also specify an error callback per dajaxice call.
.. code-block:: javascript
function custom_error(){
alert('Custom error of my_function.');
}
Dajaxice.simple.my_function(callback, {'user': 'tom'}, {'error_callback': custom_error});

View file

@ -0,0 +1,45 @@
.. django-dajaxice documentation master file, created by
sphinx-quickstart on Fri May 25 08:02:23 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
django-dajaxice
===============
Dajaxixe is an Easy to use AJAX library for django. Its main goal is to trivialize the asynchronous communication within the django server code and your js code. Dajaxice uses the unobtrusive standard-compliant (W3C) XMLHttpRequest 1.0 object.
django-dajaxice is a **JS-framework agnostic** library and focuses on decoupling the presentation logic from the server-side logic. dajaxice only requieres **5 minutes to start working.**
Dajaxice has the following aims:
* Isolate the communication between the client and the server.
* JS Framework agnostic (No Prototype, JQuery... needed ).
* Presentation logic outside the views (No presentation code inside ajax functions).
* Lightweight.
* Crossbrowsing ready.
* `Unobtrusive standard-compliant (W3C) XMLHttpRequest 1.0 <http://code.google.com/p/xmlhttprequest/>`_ object usage.
Documentation
-------------
.. toctree::
:maxdepth: 2
installation
quickstart
custom-error-callbacks
utils
production-environment
migrating-to-05
available-settings
changelog
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View file

@ -0,0 +1,92 @@
Installation
============
Follow this instructions to start using dajaxice in your django project.
Installing dajaxice
-------------------
Add `dajaxice` in your project settings.py inside ``INSTALLED_APPS``::
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'dajaxice',
...
)
Ensure that your ``TEMPLATE_LOADERS``, looks like the following. Probably you'll only need to uncomment the last line.::
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'django.template.loaders.eggs.Loader',
)
Ensure that ``TEMPLATE_CONTEXT_PROCESSORS`` has ``django.core.context_processors.request``. Probably you'll only need to add the last line::
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.request',
'django.contrib.messages.context_processors.messages'
)
Add ``dajaxice.finders.DajaxiceFinder`` to ``STATICFILES_FINDERS``::
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'dajaxice.finders.DajaxiceFinder',
)
Configure dajaxice url
----------------------
Add the following code inside urls.py::
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()
Add a new line in urls.py urlpatterns with this code::
urlpatterns = patterns('',
...
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
...
)
If you aren't using ``django.contrib.staticfiles``, you should also enable it importing::
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
and adding this line to the bottom of your urls.py::
urlpatterns += staticfiles_urlpatterns()
Install dajaxice in your templates
----------------------------------
Dajaxice needs some JS to work. To include it in your templates, you should load ``dajaxice_templatetags`` and use ``dajaxice_js_import`` TemplateTag inside your head section. This TemplateTag will print needed js.
.. code-block:: html
{% load dajaxice_templatetags %}
<html>
<head>
<title>My base template</title>
...
{% dajaxice_js_import %}
</head>
...
</html>
This templatetag will include all the js dajaxice needs.
Use Dajaxice!
-------------
Now you can create your first ajax function following the :doc:`quickstart`.

View file

@ -0,0 +1,55 @@
Migrating to 0.5
=================
Upgrade to django 1.3 or 1.4
----------------------------
Dajaxice ``0.5`` requires ``django>=1.3``, so in order to make dajaxice work you'll need to upgrade your app to any of these ones.
* `Django 1.3 release notes <https://docs.djangoproject.com/en/dev/releases/1.3/>`_
* `Django 1.4 release notes <https://docs.djangoproject.com/en/dev/releases/1.4/>`_
Make django static-files work
-----------------------------
Add this at the beginning of your ``urls.py`` file::
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
and add this line to the bottom of your urls.py::
urlpatterns += staticfiles_urlpatterns()
Add a new staticfiles finder named ``dajaxice.finders.DajaxiceFinder`` to the list of ``STATICFILES_FINDERS``::
STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'dajaxice.finders.DajaxiceFinder')
Update dajaxice core url
------------------------
Add ``dajaxice_config`` to the list of modules to import::
# Old import
from dajaxice.core import dajaxice_autodiscover
# New import
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
And replate your old dajaxice url with the new one::
# Old style
(r'^%s/' % settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
# New style
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
Done!
-----
Your app should be working now!
You can now read the :doc:`quickstart <quickstart>` to discover some of the new dajaxice features.

View file

@ -0,0 +1,7 @@
Production Environment
======================
Since ``0.5`` dajaxice takes advantage of ``django.contrib.staticfiles`` so deploying a dajaxice application live is much easy than in previous versions.
You need to remember to run ``python manage.py collectstatic`` before deploying your code live. This command will collect all the static files your application need into ``STATIC_ROOT``. For further information, this is the `Django static files docuemntation <https://docs.djangoproject.com/en/dev/howto/static-files/>`_

View file

@ -0,0 +1,80 @@
Quickstart
==========
Create your first ajax function
-------------------------------
Create a file named ``ajax.py`` inside any of your apps. For example ``example/ajax.py``.
Inside this file create a simple function that return json.::
from django.utils import simplejson
def sayhello(request):
return simplejson.dumps({'message':'Hello World'})
Now you'll need to register this function as a dajaxice function using the ``dajaxice_register`` decorator::
from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
@dajaxice_register
def sayhello(request):
return simplejson.dumps({'message':'Hello World'})
Invoque it from your JS
-----------------------
You can invoque your ajax fuctions from javascript using:
.. code-block:: javascript
onclick="Dajaxice.example.sayhello(my_js_callback);"
The function ``my_js_callback`` is your JS function that will use your example return data. For example alert the message:
.. code-block:: javascript
function my_js_callback(data){
alert(data.message);
}
That callback will alert the message ``Hello World``.
How can I do a GET request instead of a POST one?
-------------------------------------------------
When you register your functions as ajax functions, you can choose the http method using::
from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method='GET')
def saybye(request):
return simplejson.dumps({'message':'Bye!'})
This function will be executed doing a GET request and not a POST one.
Can I combine both?
-------------------
Yes! You can register a function as many times as you want, for example::
from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method='POST', name='user.update')
@dajaxice_register(method='GET', name='user.info')
def list_user(request):
if request.method == 'POST':
...
else:
...
In this case you'll be able to call this two JS functions::
Dajaxice.user.info( callback );
Dajaxice.user.update( callback );
The first one will be a GET call and the second one a POST one.

View file

@ -0,0 +1,16 @@
Utils
=====
dajaxice.utils.deserialize_form
-------------------------------
Using ``deserialize_form`` you will be able to deserialize a query_string and use it as input of a Form::
from dajaxice.utils import deserialize_form
@dajaxice_register
def send_form(request, form):
form = ExampleForm(deserialize_form(form))
if form.is_valid():
...
...

View file

@ -0,0 +1,177 @@
# Django settings for examples project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = 'static'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = '$zr@-0lstgzehu)k(-pbg7wz=mv8%n%o7+j_@h&amp;-yy&amp;sx)pyau'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'examples.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'examples.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'dajaxice',
'simple'
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'dajaxice': {
'handlers': ['console'],
'level': 'INFO',
'propagate': True,
},
}
}
STATICFILES_FINDERS = ("django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"dajaxice.finders.DajaxiceFinder")
TEMPLATE_CONTEXT_PROCESSORS = ("django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
"django.contrib.messages.context_processors.messages")

View file

@ -0,0 +1,25 @@
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'examples.views.home', name='home'),
# url(r'^examples/', include('examples.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
url(r'', 'simple.views.index')
)
urlpatterns += staticfiles_urlpatterns()

View file

@ -0,0 +1,28 @@
"""
WSGI config for examples project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setting.
Usually you will have the standard Django WSGI application here, but it also
might make sense to replace the whole Django WSGI application with a custom one
that later delegates to the Django one. For example, you could introduce WSGI
middleware here, or combine a Django application with an application of another
framework.
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "examples.settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

View file

@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "examples.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

View file

@ -0,0 +1,26 @@
import simplejson
from dajaxice.decorators import dajaxice_register
@dajaxice_register(method='GET')
@dajaxice_register(method='POST', name='other_post')
def hello(request):
return simplejson.dumps({'message': 'hello'})
@dajaxice_register(method='GET')
@dajaxice_register(method='POST', name="more.complex.bye")
def bye(request):
raise Exception("PUMMMM")
return simplejson.dumps({'message': 'bye'})
@dajaxice_register
def lol(request):
return simplejson.dumps({'message': 'lol'})
@dajaxice_register(method='GET')
def get_args(request, foo):
return simplejson.dumps({'message': 'hello get args %s' % foo})

View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View file

@ -0,0 +1,13 @@
{% load dajaxice_templatetags %}
<html>
<head>
{% dajaxice_js_import 'nocsrf' %}
</head>
<body>
<button onclick="Dajaxice.simple.hello(function(d){alert(d.message);})">Hello</button>
<button onclick="Dajaxice.simple.bye(function(d){alert(d.message);})">Bye</button>
<button onclick="Dajaxice.more.complex.bye(function(d){alert(d.message);})">Complex Bye</button>
<button onclick="Dajaxice.simple.lol(function(d){alert(d.message);})">LOL</button>
<button onclick="Dajaxice.simple.get_args(function(d){alert(d.message);}, {'foo': 'var'})">GET args</button>
</body>
</html>

View file

@ -0,0 +1,16 @@
"""
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)

View file

@ -0,0 +1,9 @@
# Create your views here.
from django.shortcuts import render
from dajaxice.core import dajaxice_functions
def index(request):
return render(request, 'simple/index.html')

31
django-dajaxice/setup.py Normal file
View file

@ -0,0 +1,31 @@
from distutils.core import setup
setup(
name='django-dajaxice',
version='0.5.5',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Agnostic and easy to use ajax library for django',
url='http://dajaxproject.com',
license='BSD',
packages=['dajaxice',
'dajaxice.templatetags',
'dajaxice.core'],
package_data={'dajaxice': ['templates/dajaxice/*']},
long_description=("Easy to use AJAX library for django, all the "
"presentation logic resides outside the views and "
"doesn't require any JS Framework. Dajaxice uses the "
"unobtrusive standard-compliant (W3C) XMLHttpRequest "
"1.0 object."),
install_requires=[
'Django>=1.3'
],
classifiers=['Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities']
)

View file

@ -69,7 +69,7 @@ urlpatterns = patterns('',
if settings.SERVER_MODE in ('development', 'test'):
urlpatterns += patterns('',
(r'^(?P<path>(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>(?:images|css|js|test)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>admin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>secretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>robots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT+"dev/"}),

View file

@ -251,8 +251,9 @@ div.agenda_slot{
#session-info{
min-height: 150px;
min-height: 160px;
position: relative;
width:100%;
}
.ss_info {
@ -315,6 +316,18 @@ div.agenda_slot{
}
.wg_style {
font-style:normal;
}
.bof_style {
font-style:italic;
}
#grp_type {
display: inline;
float: right;
}
.ss_info tr{
/* border-right: 1px solid #89D; */
/* border-top: 1px solid #89D; */
@ -354,36 +367,36 @@ td.ss_info_name_short{
min-width:50px;
}
.agenda_find_free{
.agenda_nice_button {
border: 1px solid #89D;
background-color: #EDF5FF;
padding: 5px;
max-width: 150px;
float:left;
margin-top:70px;
margin-left:3px;
margin-top: 5px;
margin-bottom: 10px;
margin-left:10px;
}
.agenda_find_free{
}
.agenda_double_slot {
border: 1px solid #89D;
background-color: #EDF5FF;
padding: 5px;
max-width: 150px;
float:left;
margin-top:70px;
margin-left:3px;
}
#agenda_pin_slot {
border: 1px solid #89D;
background-color: #EDF5FF;
padding: 5px;
max-width: 150px;
float:left;
margin-top:70px;
margin-left:3px;
}
#agenda_prev_session {
}
#agenda_show {
}
#agenda_next_session {
}
.button_disabled {
color: #EDF4FF;
text-color: #EDF4FF;
@ -1045,3 +1058,47 @@ div.line{
padding-top: 0px;
padding-bottom: 0px;
}
.ui-resizable-s {
height:6px;
/* background-color:aqua; */
/* background: #99beff; /\* Old browsers *\/ */
/* background: -moz-linear-gradient(top, #99beff 0%, #1e5799 100%); /\* FF3.6+ *\/ */
/* expect error on firefox */
background: -webkit-gradient(linear, top, bottom, color-stop(0%,#99beff), color-stop(100%,#1e5799)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #99beff 0%,#1e5799 100%); /* Chrome10+,Safari5.1+ */
/* background: -o-linear-gradient(left, #99beff 0%,#1e5799 100%); /\* Opera 11.10+ *\/ */
/* background: -ms-linear-gradient(left, #99beff 0%,#1e5799 100%); /\* IE10+ *\/ */
/* background: linear-gradient(to right, #99beff 0%,#1e5799 100%); /\* W3C *\/ */
/* expect error on firefox */
/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99beff', endColorstr='#1e5799',GradientType=1 ); /\* IE6-9 *\/ */
}
.resource_image {
float: left;
}
.resource_list {
width: 75px;
}
.room_features {
background-color:#2647A0;
}
.agenda_requested_feature {
float: right;
}
/* copied from doc.css, maybe with some modifications. */
a.editlink {
background-image: url("/images/pencil.png");
background-size: 10px;
background-position: right top;
background-attachment: scroll;
background-repeat: no-repeat;
padding-right: 12px;
}
a.editlink:link {text-decoration:none; color:inherit;}
a.editlink:visited {text-decoration:none; color:inherit;}

View file

@ -0,0 +1,11 @@
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
.ui-timepicker-rtl{ direction: rtl; }
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }

View file

@ -0,0 +1,244 @@
/**
* QUnit v1.12.0 - A JavaScript Unit Testing Framework
*
* http://qunitjs.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
/** Font Family and Sizes */
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
#qunit-tests { font-size: smaller; }
/** Resets */
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
margin: 0;
padding: 0;
}
/** Header */
#qunit-header {
padding: 0.5em 0 0.5em 1em;
color: #8699a4;
background-color: #0d3349;
font-size: 1.5em;
line-height: 1em;
font-weight: normal;
border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-top-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
}
#qunit-header a {
text-decoration: none;
color: #c2ccd1;
}
#qunit-header a:hover,
#qunit-header a:focus {
color: #fff;
}
#qunit-testrunner-toolbar label {
display: inline-block;
padding: 0 .5em 0 .1em;
}
#qunit-banner {
height: 5px;
}
#qunit-testrunner-toolbar {
padding: 0.5em 0 0.5em 2em;
color: #5E740B;
background-color: #eee;
overflow: hidden;
}
#qunit-userAgent {
padding: 0.5em 0 0.5em 2.5em;
background-color: #2b81af;
color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
}
#qunit-modulefilter-container {
float: right;
}
/** Tests: Pass/Fail */
#qunit-tests {
list-style-position: inside;
}
#qunit-tests li {
padding: 0.4em 0.5em 0.4em 2.5em;
border-bottom: 1px solid #fff;
list-style-position: inside;
}
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
display: none;
}
#qunit-tests li strong {
cursor: pointer;
}
#qunit-tests li a {
padding: 0.5em;
color: #c2ccd1;
text-decoration: none;
}
#qunit-tests li a:hover,
#qunit-tests li a:focus {
color: #000;
}
#qunit-tests li .runtime {
float: right;
font-size: smaller;
}
.qunit-assert-list {
margin-top: 0.5em;
padding: 0.5em;
background-color: #fff;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.qunit-collapsed {
display: none;
}
#qunit-tests table {
border-collapse: collapse;
margin-top: .2em;
}
#qunit-tests th {
text-align: right;
vertical-align: top;
padding: 0 .5em 0 0;
}
#qunit-tests td {
vertical-align: top;
}
#qunit-tests pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
#qunit-tests del {
background-color: #e0f2be;
color: #374e0c;
text-decoration: none;
}
#qunit-tests ins {
background-color: #ffcaca;
color: #500;
text-decoration: none;
}
/*** Test Counts */
#qunit-tests b.counts { color: black; }
#qunit-tests b.passed { color: #5E740B; }
#qunit-tests b.failed { color: #710909; }
#qunit-tests li li {
padding: 5px;
background-color: #fff;
border-bottom: none;
list-style-position: inside;
}
/*** Passing Styles */
#qunit-tests li li.pass {
color: #3c510c;
background-color: #fff;
border-left: 10px solid #C6E746;
}
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests .pass .test-name { color: #366097; }
#qunit-tests .pass .test-actual,
#qunit-tests .pass .test-expected { color: #999999; }
#qunit-banner.qunit-pass { background-color: #C6E746; }
/*** Failing Styles */
#qunit-tests li li.fail {
color: #710909;
background-color: #fff;
border-left: 10px solid #EE5757;
white-space: pre;
}
#qunit-tests > li:last-child {
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
#qunit-tests .fail .test-name,
#qunit-tests .fail .module-name { color: #000000; }
#qunit-tests .fail .test-actual { color: #EE5757; }
#qunit-tests .fail .test-expected { color: green; }
#qunit-banner.qunit-fail { background-color: #EE5757; }
/** Result */
#qunit-testresult {
padding: 0.5em 0.5em 0.5em 2.5em;
color: #2b81af;
background-color: #D2E0E6;
border-bottom: 1px solid white;
}
#qunit-testresult .module-name {
font-weight: bold;
}
/** Fixture */
#qunit-fixture {
position: absolute;
top: -10000px;
left: -10000px;
width: 1000px;
height: 1000px;
}

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- Created with Inkscape (http://www.inkscape.org/) --><svg height="80.000000pt" id="svg1" inkscape:version="0.40" sodipodi:docbase="/home/nicu/Desktop/pins" sodipodi:docname="bluepin.svg" sodipodi:version="0.32" width="80.000000pt" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink">
<metadata>
<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work rdf:about="">
<dc:title>pin - blue</dc:title>
<dc:description></dc:description>
<dc:subject>
<rdf:Bag>
<rdf:li>office</rdf:li>
<rdf:li></rdf:li>
</rdf:Bag>
</dc:subject>
<dc:publisher>
<cc:Agent rdf:about="http://www.openclipart.org">
<dc:title>Nicu Buculei</dc:title>
</cc:Agent>
</dc:publisher>
<dc:creator>
<cc:Agent>
<dc:title>Nicu Buculei</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>Nicu Buculei</dc:title>
</cc:Agent>
</dc:rights>
<dc:date></dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
<dc:language>en</dc:language>
</cc:Work>
<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs id="defs3">
<linearGradient id="linearGradient4810">
<stop id="stop4811" offset="0.0000000" style="stop-color:#ffffff;stop-opacity:0.0000000;"/>
<stop id="stop4812" offset="1.0000000" style="stop-color:#ffffff;stop-opacity:0.68041235;"/>
</linearGradient>
<linearGradient id="linearGradient2931">
<stop id="stop2932" offset="0.0000000" style="stop-color:#ffffff;stop-opacity:1.0000000;"/>
<stop id="stop2933" offset="1.0000000" style="stop-color:#ffffff;stop-opacity:0.0000000;"/>
</linearGradient>
<linearGradient gradientTransform="scale(1.806421,0.553581)" gradientUnits="userSpaceOnUse" id="linearGradient5443" inkscape:collect="always" x1="145.63139" x2="145.63139" xlink:href="#linearGradient2931" y1="712.78033" y2="772.31848"/>
<radialGradient cx="124.36100" cy="1082.2069" fx="125.14262" fy="1084.0195" gradientTransform="scale(2.175919,0.459576)" gradientUnits="userSpaceOnUse" id="radialGradient5444" inkscape:collect="always" r="54.577564" xlink:href="#linearGradient4810"/>
</defs>
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="40.000000" inkscape:cy="40.000000" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="753" inkscape:window-width="958" inkscape:window-x="26" inkscape:window-y="25" inkscape:zoom="7.1625000" pagecolor="#ffffff"/>
<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
<g id="g8582">
<path d="M 263.75000,501.11218 L 267.50000,707.36218 L 278.75000,761.11218 L 286.25000,706.11218 L 282.50000,502.36218 L 263.75000,501.11218 z " id="path1684" sodipodi:nodetypes="cccccc" style="fill:#9e9d9b;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:4.8927894;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 265.37352,538.01031 L 268.16112,707.31019 L 278.15032,752.49956 L 270.68998,537.71983 L 265.37352,538.01031 z " id="path4813" sodipodi:nodetypes="ccccc" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 47.853127,40.988541 C 56.075476,56.812966 64.270603,72.652676 72.495918,88.474884 C 75.387683,92.150116 83.137425,100.52810 82.532330,99.736721 C 81.066331,95.446317 79.849393,89.204867 78.337002,84.933957 C 70.273127,69.392997 62.377631,54.378767 54.317596,38.835824 C 52.452933,39.609814 49.713423,40.204129 47.853127,40.988541 z M 49.593395,41.622707 C 50.683882,41.168118 51.774370,40.713528 52.864857,40.258938 C 60.765236,55.502991 68.882678,69.332768 76.756478,84.588139 C 77.866557,87.881796 78.976635,92.222575 80.086713,95.516233 C 77.928546,92.728974 75.501521,90.351573 73.402278,87.526326 C 65.465984,72.225120 57.529690,56.923913 49.593395,41.622707 z " id="path6692" sodipodi:nodetypes="cccccccccccc" style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:4.8927894;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
<path d="M 266.25000,361.26166 C 215.88000,361.26166 175.00000,378.34505 175.00000,399.39423 C 175.00000,403.53049 176.74525,407.46554 179.68750,411.18066 C 181.43767,420.67385 183.55201,434.39840 183.31250,446.85194 C 164.43916,456.32637 152.90625,468.84725 152.90625,482.59255 C 152.90625,512.12465 205.92967,536.08211 271.25000,536.08214 C 336.57032,536.08214 389.59376,512.12466 389.59375,482.59255 C 389.59375,467.81002 376.14852,454.57147 354.62500,444.94531 C 351.71542,434.28130 350.02631,422.82075 351.87500,412.25530 C 355.39117,408.23677 357.50000,403.93193 357.50000,399.39423 C 357.50000,398.81798 357.34188,398.26562 357.28125,397.69559 C 357.36116,397.57026 357.41834,397.43882 357.50000,397.31427 C 357.44366,397.13929 357.27081,396.99722 357.18750,396.82895 C 354.00151,376.98464 314.53966,361.26166 266.25000,361.26166 z " id="path1061" style="fill:#0000d3;fill-opacity:1.0000000;stroke:none;stroke-width:4.8927894;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 336.25000 417.36218 A 77.500000 23.750000 0 1 1 181.25000,417.36218 A 77.500000 23.750000 0 1 1 336.25000 417.36218 z" id="path2309" sodipodi:cx="258.75000" sodipodi:cy="417.36218" sodipodi:rx="77.500000" sodipodi:ry="23.750000" sodipodi:type="arc" style="fill:url(#linearGradient5443);fill-opacity:1.0000000;stroke:none;stroke-width:2.0521364;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" transform="matrix(0.256132,-0.127006,0.153507,0.309576,-92.66068,-79.75977)"/>
<path d="M 348.54157,411.25942 C 326.15065,427.59874 289.69574,431.77062 257.71875,430.84375 C 241.73026,430.38032 226.55820,428.15413 214.25000,424.59375 C 201.94180,421.03337 190.72405,418.18039 186.29912,412.92579 L 184.37500,413.93750 C 189.95007,420.55790 200.09726,425.57601 212.90625,429.28125 C 225.71524,432.98649 241.23849,435.27593 257.59375,435.75000 C 290.30426,436.69813 326.32842,430.50443 350.18750,413.09375 L 348.54157,411.25942 z " id="path2935" sodipodi:nodetypes="ccccccccc" style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:4.8927894;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 351.45088,447.13671 C 332.11482,464.05577 298.58377,475.22314 267.15625,475.53125 C 235.72873,475.83936 204.38333,466.48027 186.34772,449.64703 L 185.16457,450.48423 C 204.62896,468.65099 234.89627,480.75439 267.21875,480.43750 C 299.54123,480.12061 331.89240,467.07926 352.55634,448.99832 L 351.45088,447.13671 z " id="path3557" sodipodi:nodetypes="ccccccc" style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:4.8927894;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 157.50000,487.36218 C 204.01668,522.54648 331.42487,527.56909 386.25000,482.36218 C 378.33176,545.59131 185.36558,554.84125 157.50000,487.36218 z " id="path4179" sodipodi:nodetypes="ccc" style="fill:url(#radialGradient5444);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" transform="matrix(0.228884,-0.113495,0.113495,0.228884,-68.50043,-44.07814)"/>
<path d="M 33.318230,7.9252710 C 27.215884,11.044142 21.205920,15.038942 17.459858,20.916861 C 15.909772,23.341527 14.735120,28.452360 19.100117,29.562094 C 21.103833,30.646438 20.541915,32.411847 21.795175,34.234322 C 22.939480,35.958635 24.866038,37.092702 22.791698,38.750178 C 20.825671,41.934310 19.044130,47.092568 21.465680,50.387341 C 24.305049,54.044199 29.350987,54.417249 33.674482,54.296096 C 43.510136,53.782469 52.915078,50.093273 61.188863,44.917575 C 67.017920,41.080696 72.737539,36.400227 75.792011,29.971363 C 77.375191,26.756307 77.463894,22.323064 74.512347,19.846313 C 71.528442,17.299724 67.393066,16.903866 63.619015,16.987519 C 61.976677,14.783236 58.759800,12.489943 59.104992,9.5691842 C 59.411426,7.4278307 58.985334,5.3889748 57.202566,4.3823833 C 53.135243,2.2487783 48.275091,3.0623370 43.984172,3.9816103 C 40.290194,4.8714406 36.720836,6.2420975 33.318230,7.9252710 z M 33.875065,9.0482330 C 39.754580,6.2254347 46.216107,3.9323746 52.827216,4.3959927 C 55.250918,4.5884597 58.492905,5.7149230 58.598104,8.5748892 C 58.028039,10.364457 58.765097,12.064180 59.652578,13.610363 C 60.617852,15.220044 61.833115,16.576598 63.261167,17.777540 C 65.134419,17.993188 66.958374,18.117125 68.836337,18.602079 C 71.983508,19.092749 75.452803,21.186266 75.630017,24.692122 C 75.778639,29.281869 72.721638,33.694705 69.762569,36.904845 C 62.726075,44.072040 53.616500,48.844901 44.055597,51.752455 C 38.282749,53.350356 31.978353,54.163016 26.137532,52.246241 C 23.306342,51.377078 21.003388,48.628354 21.396869,45.566280 C 21.612112,42.644524 23.270903,40.083437 24.838068,37.736859 C 24.837824,36.153761 23.443240,34.843731 22.784323,33.444992 C 21.811946,31.989412 21.065589,30.284732 19.886800,28.996132 C 17.485785,28.162991 16.655344,25.408810 17.688898,23.282068 C 19.887216,18.285800 24.409437,14.813081 28.851983,11.877822 C 30.473423,10.844502 32.152697,9.9025167 33.875065,9.0482330 z " id="path6693" sodipodi:nodetypes="cccccccccccccccccccccccccccccccc" style="fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:4.8927894;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
</g>
</g>
</svg>

After

(image error) Size: 11 KiB

View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="30"
height="46"
id="svg7594"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docname="hw_board.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs7596" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="14.818182"
inkscape:cx="15.982682"
inkscape:cy="20.30673"
inkscape:document-units="px"
inkscape:current-layer="g11262"
showgrid="false"
inkscape:window-width="1680"
inkscape:window-height="1003"
inkscape:window-x="-4"
inkscape:window-y="-4"
showguides="true"
inkscape:guide-bbox="true" />
<metadata
id="metadata7599">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>hw_board</dc:title>
<dc:date>2008-05-15</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Jean Cartier</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:language>fr-FR</dc:language>
<dc:subject>
<rdf:Bag>
<rdf:li>hardware</rdf:li>
<rdf:li>computer</rdf:li>
<rdf:li>desk</rdf:li>
<rdf:li>business</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:contributor>
<cc:Agent>
<dc:title>Jean-Victor Balin (jean.victor.balin@gmail.com)</dc:title>
</cc:Agent>
</dc:contributor>
<dc:description>http://www.jcartier.net</dc:description>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8460" />
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8462" />
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8464" />
<g
id="g11262"
transform="translate(-279.1135,-276.31506)">
<g
id="g9079">
<path
style="fill:#edd400;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4277"
sodipodi:nodetypes="cccccc"
d="M 305.1135,316.85015 L 281.1135,304.85015 L 281.1135,302.85015 L 281.12856,302.82044 L 305.1135,314.85015 L 305.1135,316.85015 z" />
<path
style="fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4273"
sodipodi:nodetypes="czzzz"
d="M 281.1135,302.85016 C 281.1135,301.85017 282.1135,301.85015 283.1135,301.85015 C 284.1135,301.85015 307.1135,313.28194 307.1135,313.85015 C 307.1135,314.41836 306.1135,314.85015 305.1135,314.85015 C 304.1135,314.85015 281.1135,303.85015 281.1135,302.85016 z" />
<path
style="fill:#fce94f;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4275"
d="M 307.1135,313.85015 L 307.1135,315.85015 L 305.1135,316.85015 L 305.1135,314.85015 L 307.1135,313.85015 z" />
<path
id="path6219"
d="M 283.125,301.34375 C 282.625,301.34375 282.09524,301.33284 281.59375,301.5 C 281.343,301.58358 281.09119,301.73097 280.90625,301.96875 C 280.72131,302.20653 280.625,302.51042 280.625,302.84375 C 280.625,303.84375 280.62501,303.84374 280.625,304.84375 C 280.625,305.11458 280.73624,305.2247 280.8125,305.3125 C 280.88876,305.4003 280.96438,305.45244 281.0625,305.53125 C 281.25873,305.68886 281.51944,305.85868 281.84375,306.0625 C 282.49237,306.47015 283.40886,307.00501 284.5,307.59375 C 286.68227,308.77123 289.58992,310.24813 292.53125,311.6875 C 295.47258,313.12687 298.41606,314.51298 300.71875,315.5625 C 301.87009,316.08726 302.86048,316.5374 303.59375,316.84375 C 303.96038,316.99693 304.2633,317.10187 304.5,317.1875 C 304.61835,317.23031 304.72198,317.2866 304.8125,317.3125 C 304.90302,317.3384 304.97917,317.34375 305.125,317.34375 C 305.625,317.34375 306.15476,317.35466 306.65625,317.1875 C 306.907,317.10392 307.15881,316.98778 307.34375,316.75 C 307.52869,316.51222 307.625,316.17708 307.625,315.84375 C 307.625,314.84375 307.62501,314.84374 307.625,313.84375 C 307.625,313.57292 307.51376,313.49405 307.4375,313.40625 C 307.36124,313.31845 307.25437,313.23506 307.15625,313.15625 C 306.96002,312.99864 306.69931,312.82882 306.375,312.625 C 305.72638,312.21735 304.84114,311.71374 303.75,311.125 C 301.56773,309.94752 298.66008,308.47062 295.71875,307.03125 C 292.77742,305.59188 289.80269,304.17452 287.5,303.125 C 286.34866,302.60024 285.35827,302.18135 284.625,301.875 C 284.25836,301.72182 283.95545,301.58563 283.71875,301.5 C 283.6004,301.45719 283.49677,301.43215 283.40625,301.40625 C 283.31573,301.38035 283.27084,301.34375 283.125,301.34375 z M 283.125,302.34375 C 283.04167,302.34375 283.06983,302.35921 283.125,302.375 C 283.18017,302.39079 283.26996,302.3995 283.375,302.4375 C 283.58508,302.51349 283.89203,302.63169 284.25,302.78125 C 284.96595,303.08037 285.91697,303.50914 287.0625,304.03125 C 289.35356,305.07548 292.34758,306.50187 295.28125,307.9375 C 298.21492,309.37313 301.11977,310.83373 303.28125,312 C 304.36199,312.58313 305.23065,313.08343 305.84375,313.46875 C 306.1503,313.66141 306.39008,313.82412 306.53125,313.9375 C 306.58419,313.98002 306.60398,314.01038 306.625,314.03125 C 306.625,314.7835 306.625,314.9375 306.625,315.84375 C 306.625,316.01041 306.59631,316.08153 306.5625,316.125 C 306.52869,316.16847 306.46801,316.20858 306.34375,316.25 C 306.09524,316.33284 305.625,316.34375 305.125,316.34375 C 305.20833,316.34375 305.14892,316.35954 305.09375,316.34375 C 305.03858,316.32796 304.94879,316.288 304.84375,316.25 C 304.63367,316.174 304.35797,316.05581 304,315.90625 C 303.28405,315.60713 302.30178,315.17836 301.15625,314.65625 C 298.86519,313.61202 295.90242,312.21688 292.96875,310.78125 C 290.03508,309.34562 287.13023,307.88502 284.96875,306.71875 C 283.88801,306.13562 282.9881,305.60407 282.375,305.21875 C 282.06845,305.02609 281.82867,304.86338 281.6875,304.75 C 281.64797,304.71825 281.64745,304.70854 281.625,304.6875 C 281.625,303.89841 281.625,303.76562 281.625,302.84375 C 281.625,302.67708 281.65369,302.63722 281.6875,302.59375 C 281.72131,302.55028 281.782,302.47892 281.90625,302.4375 C 282.15476,302.35466 282.625,302.34375 283.125,302.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
id="path9069"
d="M 284.2086,277.50524 L 304.25155,287.56045 L 304.04909,313.06966 L 284.14111,303.2169 L 284.2086,277.50524 z"
style="fill:#edd400;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4" />
<path
id="path4269"
d="M 284.40625,277.28125 C 284.30032,277.26783 284.18881,277.2693 284.03125,277.3125 C 283.95247,277.3341 283.84394,277.3678 283.75,277.46875 C 283.65606,277.5697 283.625,277.72396 283.625,277.84375 C 283.625,278.84375 283.62501,301.84378 283.625,302.84375 C 283.625,303.08333 283.712,303.19301 283.78125,303.28125 C 283.8505,303.36949 283.91245,303.42354 284,303.5 C 284.1751,303.65292 284.40433,303.84112 284.6875,304.03125 C 285.25384,304.41151 286.0564,304.87154 287,305.40625 C 288.8872,306.47566 291.36904,307.80952 293.875,309.0625 C 296.38096,310.31548 298.89194,311.4938 300.78125,312.3125 C 301.7259,312.72185 302.51771,313.02948 303.09375,313.21875 C 303.38177,313.31339 303.60063,313.37941 303.8125,313.40625 C 303.91843,313.41967 304.02994,313.44945 304.1875,313.40625 C 304.26628,313.38465 304.37481,313.3197 304.46875,313.21875 C 304.56269,313.1178 304.625,312.96354 304.625,312.84375 C 304.625,311.84375 304.62501,288.84378 304.625,287.84375 C 304.625,287.60417 304.50675,287.52574 304.4375,287.4375 C 304.36825,287.34926 304.3063,287.26396 304.21875,287.1875 C 304.04365,287.03458 303.81442,286.87763 303.53125,286.6875 C 302.96491,286.30724 302.1936,285.81596 301.25,285.28125 C 299.3628,284.21184 296.84971,282.90923 294.34375,281.65625 C 291.83779,280.40327 289.32681,279.22495 287.4375,278.40625 C 286.49285,277.9969 285.70104,277.65802 285.125,277.46875 C 284.83698,277.37412 284.61812,277.30809 284.40625,277.28125 z M 284.625,278.375 C 284.69989,278.39599 284.72017,278.40716 284.8125,278.4375 C 285.33021,278.6076 286.1009,278.90935 287.03125,279.3125 C 288.89195,280.1188 291.38096,281.31548 293.875,282.5625 C 296.36904,283.80952 298.8872,285.10066 300.75,286.15625 C 301.6814,286.68404 302.44134,287.14588 302.96875,287.5 C 303.23246,287.67706 303.44463,287.83456 303.5625,287.9375 C 303.60179,287.97181 303.60764,287.98161 303.625,288 C 303.625,289.23981 303.625,310.53023 303.625,312.34375 C 303.54164,312.32109 303.51404,312.31667 303.40625,312.28125 C 302.88854,312.11114 302.11785,311.8094 301.1875,311.40625 C 299.32681,310.59995 296.83779,309.40327 294.34375,308.15625 C 291.84971,306.90923 289.3628,305.58684 287.5,304.53125 C 286.5686,304.00346 285.77741,303.54162 285.25,303.1875 C 284.98629,303.01044 284.77412,302.85294 284.65625,302.75 C 284.6366,302.73284 284.63952,302.73275 284.625,302.71875 C 284.625,301.5318 284.625,280.23986 284.625,278.375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
id="rect9054"
d="M 6.9509201,4.1595091 L 23.01227,12.122699 L 23.079754,33.852761 L 6.8159508,25.754602 L 6.9509201,4.1595091 z"
style="fill:#d3d7cf;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4"
transform="translate(279.1135,276.31506)" />
<path
id="path4271"
d="M 286.3125,280.25 C 286.21212,280.24665 286.09177,280.27159 285.9375,280.34375 C 285.78323,280.41591 285.625,280.64583 285.625,280.84375 C 285.625,281.92814 285.62501,300.84378 285.625,301.84375 C 285.625,302.04167 285.68994,302.16185 285.75,302.25 C 285.81006,302.33815 285.86335,302.39707 285.9375,302.46875 C 286.0858,302.6121 286.2698,302.77307 286.5,302.9375 C 286.96041,303.26636 287.61754,303.6519 288.375,304.09375 C 289.88992,304.97745 291.86755,306.05877 293.875,307.0625 C 295.88245,308.06623 297.88804,308.99241 299.40625,309.625 C 300.16535,309.94129 300.80595,310.1767 301.28125,310.3125 C 301.5189,310.3804 301.7055,310.43081 301.90625,310.4375 C 302.00663,310.44085 302.12698,310.44716 302.28125,310.375 C 302.43552,310.30284 302.625,310.04167 302.625,309.84375 C 302.625,308.84375 302.62501,289.84378 302.625,288.84375 C 302.625,288.64583 302.52881,288.5569 302.46875,288.46875 C 302.40869,288.3806 302.3554,288.29043 302.28125,288.21875 C 302.13295,288.0754 301.94895,287.94568 301.71875,287.78125 C 301.25834,287.45239 300.63246,287.0356 299.875,286.59375 C 298.36008,285.71005 296.3512,284.65998 294.34375,283.65625 C 292.3363,282.65252 290.33071,281.69508 288.8125,281.0625 C 288.0534,280.74621 287.4128,280.5108 286.9375,280.375 C 286.69985,280.3071 286.51325,280.25669 286.3125,280.25 z M 286.625,281.34375 C 286.64007,281.34783 286.64058,281.33927 286.65625,281.34375 C 287.05595,281.45795 287.66535,281.69129 288.40625,282 C 289.88804,282.61741 291.88245,283.56623 293.875,284.5625 C 295.86755,285.55877 297.88992,286.60245 299.375,287.46875 C 300.11754,287.9019 300.71041,288.29761 301.125,288.59375 C 301.3323,288.74182 301.50767,288.85429 301.59375,288.9375 C 301.62024,288.9631 301.61381,288.98685 301.625,289 C 301.625,290.22815 301.625,307.64251 301.625,309.375 C 301.59302,309.36691 301.59777,309.35383 301.5625,309.34375 C 301.1628,309.22955 300.5534,308.99621 299.8125,308.6875 C 298.33071,308.07009 296.3363,307.15252 294.34375,306.15625 C 292.3512,305.15998 290.36008,304.08505 288.875,303.21875 C 288.13246,302.7856 287.50834,302.42114 287.09375,302.125 C 286.88645,301.97693 286.74233,301.83321 286.65625,301.75 C 286.6397,301.734 286.63577,301.7306 286.625,301.71875 C 286.625,300.54277 286.625,283.20004 286.625,281.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path4279"
d="M 294,281.34375 L 293.875,281.40625 L 291.875,282.40625 L 292.34375,283.3125 L 294.28125,282.34375 L 294.625,282.34375 L 294.625,283.4375 L 295.625,283.4375 L 295.625,281.84375 L 295.625,281.34375 L 295.125,281.34375 L 294.125,281.34375 L 294,281.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path4281"
d="M 293.625,311.84375 L 293.625,315.6875 L 290.6875,320.59375 L 291.53125,321.09375 L 294.53125,316.09375 L 294.625,316 L 294.625,315.84375 L 294.625,311.84375 L 293.625,311.84375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccccc"
id="path4283"
d="M 293.6875,316.09375 L 296.6875,321.09375 L 297.53125,320.59375 L 295.21875,316.71875 L 296.96875,317.3125 L 297.28125,316.375 L 294.28125,315.375 L 293.6875,316.09375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</g>
</svg>

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 4 KiB

Binary file not shown.

After

(image error) Size: 2.9 KiB

Binary file not shown.

After

(image error) Size: 1.5 KiB

Binary file not shown.

Binary file not shown.

After

(image error) Size: 2.4 KiB

View file

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="30"
height="46"
id="svg7594"
sodipodi:version="0.32"
inkscape:version="0.48.3.1 r9886"
version="1.0"
sodipodi:docname="projector2.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/mcr/galaxy/orlando/r6743/static/images/projector2.png"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100">
<defs
id="defs7596" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="14.818182"
inkscape:cx="16.117651"
inkscape:cy="20.30673"
inkscape:document-units="px"
inkscape:current-layer="g11262"
showgrid="false"
inkscape:window-width="1680"
inkscape:window-height="1003"
inkscape:window-x="-6"
inkscape:window-y="-6"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-maximized="0" />
<metadata
id="metadata7599">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:date>2008-05-15</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Jean Cartier</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:language>fr-FR</dc:language>
<dc:subject>
<rdf:Bag>
<rdf:li>hardware</rdf:li>
<rdf:li>computer</rdf:li>
<rdf:li>desk</rdf:li>
<rdf:li>business</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:contributor>
<cc:Agent>
<dc:title>Jean-Victor Balin (jean.victor.balin@gmail.com)</dc:title>
</cc:Agent>
</dc:contributor>
<dc:description>http://www.jcartier.net</dc:description>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8460" />
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8462" />
<path
style="opacity:1;fill:#888888;fill-opacity:1;stroke:none;stroke-width:0.69999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path8464" />
<g
id="g11262"
transform="translate(-279.1135,-276.31506)">
<g
id="g9079">
<path
style="fill:#edd400;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4277"
sodipodi:nodetypes="cccccc"
d="M 305.1135,316.85015 L 281.1135,304.85015 L 281.1135,302.85015 L 281.12856,302.82044 L 305.1135,314.85015 L 305.1135,316.85015 z" />
<path
style="fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4273"
sodipodi:nodetypes="czzzz"
d="M 281.1135,302.85016 C 281.1135,301.85017 282.1135,301.85015 283.1135,301.85015 C 284.1135,301.85015 307.1135,313.28194 307.1135,313.85015 C 307.1135,314.41836 306.1135,314.85015 305.1135,314.85015 C 304.1135,314.85015 281.1135,303.85015 281.1135,302.85016 z" />
<path
style="fill:#fce94f;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path4275"
d="M 307.1135,313.85015 L 307.1135,315.85015 L 305.1135,316.85015 L 305.1135,314.85015 L 307.1135,313.85015 z" />
<path
id="path6219"
d="M 283.125,301.34375 C 282.625,301.34375 282.09524,301.33284 281.59375,301.5 C 281.343,301.58358 281.09119,301.73097 280.90625,301.96875 C 280.72131,302.20653 280.625,302.51042 280.625,302.84375 C 280.625,303.84375 280.62501,303.84374 280.625,304.84375 C 280.625,305.11458 280.73624,305.2247 280.8125,305.3125 C 280.88876,305.4003 280.96438,305.45244 281.0625,305.53125 C 281.25873,305.68886 281.51944,305.85868 281.84375,306.0625 C 282.49237,306.47015 283.40886,307.00501 284.5,307.59375 C 286.68227,308.77123 289.58992,310.24813 292.53125,311.6875 C 295.47258,313.12687 298.41606,314.51298 300.71875,315.5625 C 301.87009,316.08726 302.86048,316.5374 303.59375,316.84375 C 303.96038,316.99693 304.2633,317.10187 304.5,317.1875 C 304.61835,317.23031 304.72198,317.2866 304.8125,317.3125 C 304.90302,317.3384 304.97917,317.34375 305.125,317.34375 C 305.625,317.34375 306.15476,317.35466 306.65625,317.1875 C 306.907,317.10392 307.15881,316.98778 307.34375,316.75 C 307.52869,316.51222 307.625,316.17708 307.625,315.84375 C 307.625,314.84375 307.62501,314.84374 307.625,313.84375 C 307.625,313.57292 307.51376,313.49405 307.4375,313.40625 C 307.36124,313.31845 307.25437,313.23506 307.15625,313.15625 C 306.96002,312.99864 306.69931,312.82882 306.375,312.625 C 305.72638,312.21735 304.84114,311.71374 303.75,311.125 C 301.56773,309.94752 298.66008,308.47062 295.71875,307.03125 C 292.77742,305.59188 289.80269,304.17452 287.5,303.125 C 286.34866,302.60024 285.35827,302.18135 284.625,301.875 C 284.25836,301.72182 283.95545,301.58563 283.71875,301.5 C 283.6004,301.45719 283.49677,301.43215 283.40625,301.40625 C 283.31573,301.38035 283.27084,301.34375 283.125,301.34375 z M 283.125,302.34375 C 283.04167,302.34375 283.06983,302.35921 283.125,302.375 C 283.18017,302.39079 283.26996,302.3995 283.375,302.4375 C 283.58508,302.51349 283.89203,302.63169 284.25,302.78125 C 284.96595,303.08037 285.91697,303.50914 287.0625,304.03125 C 289.35356,305.07548 292.34758,306.50187 295.28125,307.9375 C 298.21492,309.37313 301.11977,310.83373 303.28125,312 C 304.36199,312.58313 305.23065,313.08343 305.84375,313.46875 C 306.1503,313.66141 306.39008,313.82412 306.53125,313.9375 C 306.58419,313.98002 306.60398,314.01038 306.625,314.03125 C 306.625,314.7835 306.625,314.9375 306.625,315.84375 C 306.625,316.01041 306.59631,316.08153 306.5625,316.125 C 306.52869,316.16847 306.46801,316.20858 306.34375,316.25 C 306.09524,316.33284 305.625,316.34375 305.125,316.34375 C 305.20833,316.34375 305.14892,316.35954 305.09375,316.34375 C 305.03858,316.32796 304.94879,316.288 304.84375,316.25 C 304.63367,316.174 304.35797,316.05581 304,315.90625 C 303.28405,315.60713 302.30178,315.17836 301.15625,314.65625 C 298.86519,313.61202 295.90242,312.21688 292.96875,310.78125 C 290.03508,309.34562 287.13023,307.88502 284.96875,306.71875 C 283.88801,306.13562 282.9881,305.60407 282.375,305.21875 C 282.06845,305.02609 281.82867,304.86338 281.6875,304.75 C 281.64797,304.71825 281.64745,304.70854 281.625,304.6875 C 281.625,303.89841 281.625,303.76562 281.625,302.84375 C 281.625,302.67708 281.65369,302.63722 281.6875,302.59375 C 281.72131,302.55028 281.782,302.47892 281.90625,302.4375 C 282.15476,302.35466 282.625,302.34375 283.125,302.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
id="path9069"
d="M 284.2086,277.50524 L 304.25155,287.56045 L 304.04909,313.06966 L 284.14111,303.2169 L 284.2086,277.50524 z"
style="fill:#edd400;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4" />
<path
id="path4269"
d="M 284.40625,277.28125 C 284.30032,277.26783 284.18881,277.2693 284.03125,277.3125 C 283.95247,277.3341 283.84394,277.3678 283.75,277.46875 C 283.65606,277.5697 283.625,277.72396 283.625,277.84375 C 283.625,278.84375 283.62501,301.84378 283.625,302.84375 C 283.625,303.08333 283.712,303.19301 283.78125,303.28125 C 283.8505,303.36949 283.91245,303.42354 284,303.5 C 284.1751,303.65292 284.40433,303.84112 284.6875,304.03125 C 285.25384,304.41151 286.0564,304.87154 287,305.40625 C 288.8872,306.47566 291.36904,307.80952 293.875,309.0625 C 296.38096,310.31548 298.89194,311.4938 300.78125,312.3125 C 301.7259,312.72185 302.51771,313.02948 303.09375,313.21875 C 303.38177,313.31339 303.60063,313.37941 303.8125,313.40625 C 303.91843,313.41967 304.02994,313.44945 304.1875,313.40625 C 304.26628,313.38465 304.37481,313.3197 304.46875,313.21875 C 304.56269,313.1178 304.625,312.96354 304.625,312.84375 C 304.625,311.84375 304.62501,288.84378 304.625,287.84375 C 304.625,287.60417 304.50675,287.52574 304.4375,287.4375 C 304.36825,287.34926 304.3063,287.26396 304.21875,287.1875 C 304.04365,287.03458 303.81442,286.87763 303.53125,286.6875 C 302.96491,286.30724 302.1936,285.81596 301.25,285.28125 C 299.3628,284.21184 296.84971,282.90923 294.34375,281.65625 C 291.83779,280.40327 289.32681,279.22495 287.4375,278.40625 C 286.49285,277.9969 285.70104,277.65802 285.125,277.46875 C 284.83698,277.37412 284.61812,277.30809 284.40625,277.28125 z M 284.625,278.375 C 284.69989,278.39599 284.72017,278.40716 284.8125,278.4375 C 285.33021,278.6076 286.1009,278.90935 287.03125,279.3125 C 288.89195,280.1188 291.38096,281.31548 293.875,282.5625 C 296.36904,283.80952 298.8872,285.10066 300.75,286.15625 C 301.6814,286.68404 302.44134,287.14588 302.96875,287.5 C 303.23246,287.67706 303.44463,287.83456 303.5625,287.9375 C 303.60179,287.97181 303.60764,287.98161 303.625,288 C 303.625,289.23981 303.625,310.53023 303.625,312.34375 C 303.54164,312.32109 303.51404,312.31667 303.40625,312.28125 C 302.88854,312.11114 302.11785,311.8094 301.1875,311.40625 C 299.32681,310.59995 296.83779,309.40327 294.34375,308.15625 C 291.84971,306.90923 289.3628,305.58684 287.5,304.53125 C 286.5686,304.00346 285.77741,303.54162 285.25,303.1875 C 284.98629,303.01044 284.77412,302.85294 284.65625,302.75 C 284.6366,302.73284 284.63952,302.73275 284.625,302.71875 C 284.625,301.5318 284.625,280.23986 284.625,278.375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccc"
id="rect9054"
d="M 6.9509201,4.1595091 L 23.01227,12.122699 L 23.079754,33.852761 L 6.8159508,25.754602 L 6.9509201,4.1595091 z"
style="fill:#d3d7cf;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4"
transform="translate(279.1135,276.31506)" />
<path
id="path4271"
d="M 286.3125,280.25 C 286.21212,280.24665 286.09177,280.27159 285.9375,280.34375 C 285.78323,280.41591 285.625,280.64583 285.625,280.84375 C 285.625,281.92814 285.62501,300.84378 285.625,301.84375 C 285.625,302.04167 285.68994,302.16185 285.75,302.25 C 285.81006,302.33815 285.86335,302.39707 285.9375,302.46875 C 286.0858,302.6121 286.2698,302.77307 286.5,302.9375 C 286.96041,303.26636 287.61754,303.6519 288.375,304.09375 C 289.88992,304.97745 291.86755,306.05877 293.875,307.0625 C 295.88245,308.06623 297.88804,308.99241 299.40625,309.625 C 300.16535,309.94129 300.80595,310.1767 301.28125,310.3125 C 301.5189,310.3804 301.7055,310.43081 301.90625,310.4375 C 302.00663,310.44085 302.12698,310.44716 302.28125,310.375 C 302.43552,310.30284 302.625,310.04167 302.625,309.84375 C 302.625,308.84375 302.62501,289.84378 302.625,288.84375 C 302.625,288.64583 302.52881,288.5569 302.46875,288.46875 C 302.40869,288.3806 302.3554,288.29043 302.28125,288.21875 C 302.13295,288.0754 301.94895,287.94568 301.71875,287.78125 C 301.25834,287.45239 300.63246,287.0356 299.875,286.59375 C 298.36008,285.71005 296.3512,284.65998 294.34375,283.65625 C 292.3363,282.65252 290.33071,281.69508 288.8125,281.0625 C 288.0534,280.74621 287.4128,280.5108 286.9375,280.375 C 286.69985,280.3071 286.51325,280.25669 286.3125,280.25 z M 286.625,281.34375 C 286.64007,281.34783 286.64058,281.33927 286.65625,281.34375 C 287.05595,281.45795 287.66535,281.69129 288.40625,282 C 289.88804,282.61741 291.88245,283.56623 293.875,284.5625 C 295.86755,285.55877 297.88992,286.60245 299.375,287.46875 C 300.11754,287.9019 300.71041,288.29761 301.125,288.59375 C 301.3323,288.74182 301.50767,288.85429 301.59375,288.9375 C 301.62024,288.9631 301.61381,288.98685 301.625,289 C 301.625,290.22815 301.625,307.64251 301.625,309.375 C 301.59302,309.36691 301.59777,309.35383 301.5625,309.34375 C 301.1628,309.22955 300.5534,308.99621 299.8125,308.6875 C 298.33071,308.07009 296.3363,307.15252 294.34375,306.15625 C 292.3512,305.15998 290.36008,304.08505 288.875,303.21875 C 288.13246,302.7856 287.50834,302.42114 287.09375,302.125 C 286.88645,301.97693 286.74233,301.83321 286.65625,301.75 C 286.6397,301.734 286.63577,301.7306 286.625,301.71875 C 286.625,300.54277 286.625,283.20004 286.625,281.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path4279"
d="M 294,281.34375 L 293.875,281.40625 L 291.875,282.40625 L 292.34375,283.3125 L 294.28125,282.34375 L 294.625,282.34375 L 294.625,283.4375 L 295.625,283.4375 L 295.625,281.84375 L 295.625,281.34375 L 295.125,281.34375 L 294.125,281.34375 L 294,281.34375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path4281"
d="M 293.625,311.84375 L 293.625,315.6875 L 290.6875,320.59375 L 291.53125,321.09375 L 294.53125,316.09375 L 294.625,316 L 294.625,315.84375 L 294.625,311.84375 L 293.625,311.84375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccccc"
id="path4283"
d="M 293.6875,316.09375 L 296.6875,321.09375 L 297.53125,320.59375 L 295.21875,316.71875 L 296.96875,317.3125 L 297.28125,316.375 L 294.28125,315.375 L 293.6875,316.09375 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<text
xml:space="preserve"
style="font-size:22.81445312px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial Black;-inkscape-font-specification:Arial Black"
x="277.74319"
y="272.51889"
id="text2998"
sodipodi:linespacing="125%"
transform="matrix(1.0132707,0.11796914,0.02070387,0.98931351,0,0)"><tspan
sodipodi:role="line"
id="tspan3000"
x="277.74319"
y="272.51889">2</tspan></text>
</g>
</g>
</svg>

After

(image error) Size: 16 KiB

View file

@ -19,16 +19,21 @@
//////////////-GLOBALS----////////////////////////////////////////
var meeting_number = 0; // is the meeting name.
var schedule_id = 0; // what is the schedule we are editing.
var schedule_owner_href = ''; // who owns this schedule
var is_secretariat = false;
var meeting_objs = {}; // contains a list of session objects -- by session_id
var session_objs = {}; // contains a list of session objects -- by session_name
var slot_status = {}; // indexed by domid, contains an array of ScheduledSessions objects
var slot_objs = {}; // scheduledsession indexed by id.
// these need to be setup in landscape_edit's setup_slots() inline function:
//var meeting_number = 0; // is the meeting name.
//var schedule_id = 0; // what is the schedule we are editing.
//var schedule_name; // what is the schedule we are editing.
//var schedule_owner_href = ''; // who owns this schedule
//var scheduledsession_post_href;
//var meeting_base_url;
//var site_base_url;
//var total_rooms = 0; // the number of rooms
//var total_days = 0; // the number of days
var is_secretariat = false;
var agenda_globals;
var group_objs = {}; // list of working groups
var area_directors = {}; // list of promises of area directors, index by href.
var read_only = true; // it is true until we learn otherwise.
@ -47,9 +52,7 @@ var last_json_txt = ""; // last txt from a json call.
var last_json_reply = []; // last parsed content
var hidden_rooms = [];
var total_rooms = 0; // the number of rooms
var hidden_days = [];
var total_days = 0; // the number of days
/****************************************************/
@ -67,21 +70,38 @@ $(document).ready(function() {
This is ran at page load and sets up the entire page.
*/
function initStuff(){
agenda_globals = new AgendaGlobals();
//agenda_globals.__debug_session_move = true;
log("initstuff() running...");
setup_slots();
directorpromises = mark_area_directors();
var directorpromises = [];
/* define a slot for unscheduled items */
var unassigned = new ScheduledSlot();
unassigned.make_unassigned();
setup_slots(directorpromises);
mark_area_directors(directorpromises);
log("setup_slots() ran");
droppable();
log("droppable() ran");
$.when.apply($,directorpromises).done(function() {
/* can not load events until area director info has been loaded */
log("droppable() ran");
/* can not load events until area director info,
timeslots, sessions, and scheduledsessions
have been loaded
*/
log("loading/linking objects");
load_events();
log("load_events() ran");
find_meeting_no_room();
calculate_name_select_box();
calculate_room_select_box();
listeners();
droppable();
duplicate_sessions = find_double_timeslots();
empty_info_table();
count_sessions();
if(load_conflicts) {
recalculate(null);
@ -90,7 +110,6 @@ function initStuff(){
static_listeners();
log("listeners() ran");
calculate_name_select_box();
start_spin();
@ -99,7 +118,7 @@ function initStuff(){
read_only_check();
stop_spin();
meeting_objs_length = Object.keys(meeting_objs).length;
meeting_objs_length = Object.keys(agenda_globals.meeting_objs).length;
/* Comment this out for fast loading */
//load_conflicts = false;
@ -134,7 +153,8 @@ function read_only_result(msg) {
// XX go fetch the owner and display it.
console.log("owner href:", schedule_owner_href);
empty_info_table();
$("#pageloaded").show();
listeners();
droppable();
}

View file

@ -39,83 +39,25 @@ function log(text){
console.log(text);
}
/* move_slot
Moves a meeting(from) to a slot (to).
No checks are done to see if the slot it's moving to is free,
this can be considered a method of forcing a slot to a place.
@params:
'from' - meeting key (searching in meeting_objs[])
'to' - slot_status key (searching in slot_status[])
*/
var gfrom = null;
function move_slot(from,to){
console.log("!!!");
var meeting = meeting_objs[from];
var from_slot = meeting_objs[from].slot_status_key;
var to_slot = slot_status[to];
console.log(meeting_objs[from]);
console.log(from_slot);
var result = update_to_slot(from, to, true); // true if the job succeeded
if(result){
if(update_from_slot(from,from_slot)){
console.log("move_slot: success");
}else{
console.log("move_slot: fail");
}
}
meeting_objs[from].slot_status_key = to;
//***** do dajaxice call here ****** //
var eTemplate = meeting.event_template()
$("#session_"+from).remove();
$("#"+to).append(eTemplate);
var session_id = from;
var scheduledsession_id = slot_status[to].scheduledsession_id;
console.log(session_id);
console.log(scheduledsession_id);
// start_spin();
Dajaxice.ietf.meeting.update_timeslot(dajaxice_callback,
{
'schedule_id':schedule_id,
'session_id':session_id,
'scheduledsession_id': scheduledsession_id,
});
}
function print_all(){
console.log("all");
console.log(meeting_objs.length);
for(var i=0; i<meeting_objs.length; i++){
meeting_objs[i].print_out();
console.log(agenda_globals.meeting_objs.length);
for(var i=0; i<agenda_globals.meeting_objs.length; i++){
agenda_globals.meeting_objs[i].print_out();
}
}
function find_title(title){
$.each(meeting_objs, function(key){
if (meeting_objs[key].title == title) {
console.log(meeting_objs[key]);
$.each(agenda_globals.meeting_objs, function(key){
if (agenda_globals.meeting_objs[key].title == title) {
console.log(agenda_globals.meeting_objs[key]);
}
});
}
function find_session_id(session_id){
$.each(meeting_objs, function(key){
if (meeting_objs[key].session_id == session_id) {
console.log(meeting_objs[key]);
$.each(agenda_globals.meeting_objs, function(key){
if (agenda_globals.meeting_objs[key].session_id == session_id) {
console.log(agenda_globals.meeting_objs[key]);
}
});
}
@ -123,7 +65,7 @@ function find_session_id(session_id){
function find_same_area(area){
var areas = []
area = area.toUpperCase();
$.each(meeting_objs, function(index,obj){
$.each(agenda_globals.meeting_objs, function(index,obj){
if(obj.area == area){
areas.push({id:index,slot_status_key:obj.slot_status_key})
}
@ -138,6 +80,8 @@ function style_empty_slots(){
var __debug_load_events = false;
/* this pushes every event into the agendas */
function load_events(){
var slot_id;
console.log("load events...");
/* first delete all html items that might have gotten saved if
@ -146,17 +90,38 @@ function load_events(){
if(__debug_load_events) {
console.log("processing double slot status relations");
}
$.each(slot_status, function(key) {
ssid_arr = slot_status[key];
/* clear out all the timeslots */
$.each(agenda_globals.timeslot_bydomid, function(key) {
insert_cell(key, "", true);
var timeslot = agenda_globals.timeslot_bydomid[key];
slot_id = ("#"+key);
$(slot_id).addClass("agenda_slot_" + timeslot.roomtype);
if(timeslot.roomtype == "unavail") {
$(slot_id).removeClass("ui-droppable");
$(slot_id).removeClass("free_slot");
$(slot_id).addClass("agenda_slot_unavailable");
} else {
$(slot_id).removeClass("agenda_slot_unavailable");
$(slot_id).addClass("ui-droppable");
}
});
$.each(agenda_globals.slot_status, function(key) {
ssid_arr = agenda_globals.slot_status[key];
for(var q = 0; q<ssid_arr.length; q++){
ssid = ssid_arr[q];
insert_cell(ssid.domid, "", true);
ssid.connect_to_timeslot_session();
// also see if the slots have any declared relationship, and take it forward as
// well as backwards.
if(ssid.extendedfrom_id != false) {
other = slot_objs[ssid.extendedfrom_id];
other = agenda_globals.slot_objs[ssid.extendedfrom_id];
if(__debug_load_events) {
console.log("slot:",ssid.scheduledsession_id, "extended from: ",key,ssid.extendedfrom_id); // ," is: ", other);
}
@ -177,8 +142,8 @@ function load_events(){
if(__debug_load_events) {
console.log("marking extended slots for slots with multiple sessions");
}
$.each(slot_status, function(key) {
ssid_arr = slot_status[key];
$.each(agenda_globals.slot_status, function(key) {
ssid_arr = agenda_globals.slot_status[key];
var extendedto = undefined;
for(var q = 0; q<ssid_arr.length; q++){
@ -186,7 +151,7 @@ function load_events(){
if(extendedto == undefined &&
ssid.extendedto != undefined) {
if(__debug_load_events) {
console.log("ssid",ssid.session_id,"extended");
console.log("ssid",ssid.session_id,"extended 1");
}
extendedto = ssid.extendedto;
}
@ -195,7 +160,7 @@ function load_events(){
ssid = ssid_arr[q];
ssid.extendedto = extendedto;
if(__debug_load_events) {
console.log("ssid",ssid.session_id,"extended");
console.log("ssid",ssid.session_id,"extended 2");
}
}
});
@ -203,35 +168,26 @@ function load_events(){
if(__debug_load_events) {
console.log("finding responsible ad");
}
$.each(meeting_objs, function(key) {
session = meeting_objs[key];
$.each(agenda_globals.meeting_objs, function(key) {
session = agenda_globals.meeting_objs[key];
session.find_responsible_ad();
});
$.each(slot_status, function(key) {
ssid_arr = slot_status[key]
$.each(agenda_globals.slot_status, function(key) {
ssid_arr = agenda_globals.slot_status[key]
if(key == "sortable-list"){
console.log("sortable list");
}else {
for(var q = 0; q<ssid_arr.length; q++){
ssid = ssid_arr[q];
slot_id = ("#"+ssid.domid);
slot_id = ("#"+ssid.domid());
if(__debug_load_events) {
console.log("populating slot: ",slot_id,key);
}
/* also, since we are HERE, set the class to indicate if slot is available */
$(slot_id).addClass("agenda_slot_" + ssid.roomtype);
if(ssid.roomtype == "unavail") {
$(slot_id).removeClass("ui-droppable");
$(slot_id).removeClass("free_slot");
$(slot_id).addClass("agenda_slot_unavailable");
} else {
$(slot_id).removeClass("agenda_slot_unavailable");
$(slot_id).addClass("ui-droppable");
session = meeting_objs[ssid.session_id];
if(ssid.timeslot.roomtype != "unavail") {
session = agenda_globals.meeting_objs[ssid.session_id];
if (session != null) {
if(ssid.extendedto != undefined) {
session.double_wide = true;
@ -250,7 +206,7 @@ function load_events(){
session.populate_event(key);
}
session.placed(ssid, false);
session.placed(ssid.timeslot, false, ssid);
} else {
$(slot_id).addClass('free_slot');
}
@ -259,8 +215,8 @@ function load_events(){
}
});
$.each(meeting_objs, function(key) {
session = meeting_objs[key];
$.each(agenda_globals.meeting_objs, function(key) {
session = agenda_globals.meeting_objs[key];
// note in the group, what the set of column classes is.
// this is an array, as the group might have multiple
@ -278,18 +234,15 @@ function load_events(){
function check_free(inp){
var empty = false;
slot = slot_status[inp.id];
slot = agenda_globals.timeslot_bydomid[inp.id];
if(slot == null){
// console.log("\t from check_free, slot is null?", inp,inp.id, slot_status[inp.id]);
//console.log("\t from check_free, slot is null?", inp,inp.id, agenda_globals.slot_status[inp.id]);
return false;
}
for(var i =0;i<slot.length; i++){
if (slot[i].empty == false || slot[i].empty == "False"){
return false;
}
if (slot.empty == false) {
return false;
}
return true;
}
/* clears any background highlight colors of scheduled sessions */
@ -308,7 +261,7 @@ function clear_highlight(inp_arr){ // @args: array from slot_status{}
/* based on any meeting object, it finds any other objects inside the same timeslot. */
function find_friends(inp){
var ts = $(inp).parent().attr('id');
var ss_arr = slot_status[ts];
var ss_arr = agenda_globals.slot_status[ts];
if (ss_arr != null){
return ss_arr;
}
@ -320,7 +273,7 @@ function find_friends(inp){
function json_to_id(j){
return (j.room+"_"+j.date+"_"+j.time);
return (j.room()+"_"+j.date()+"_"+j.time());
}
function id_to_json(id){
@ -359,6 +312,10 @@ function empty_info_table(){
}
$("#info_responsible").html("");
$("#info_requestedby").html("");
$("#agenda_requested_features").html("");
/* need to reset listeners, because we just changed the HTML */
listeners();
}
@ -367,49 +324,83 @@ var temp_1;
takes in a json.
*/
function compare_timeslot(a,b) {
//console.log("day: a,b", a.day, b.day);
// sometimes (a.day==b.say)==false and (a.day===b.day)==false,
// for days that appear identical, but built from different strings,
// yet (a.day-b.day)==0.
if((a.day - b.day) == 0) {
//console.log("time: a,b", a.starttime, b.starttime);
if(a.starttime == b.starttime) {
//console.log("room: a,b", a.room, b.room, a.room < b.room);
if(a.room > b.room) {
return 1;
} else {
return -1;
}
};
if(a.starttime > b.starttime) {
return 1;
} else {
return -1;
}
}
if(a.day > b.day) {
return 1;
} else {
return -1;
}
}
var room_select_html = "";
function calculate_room_select_box() {
var html = "<select id='info_location_select'>";
var mobj_array = [];
var keys = Object.keys(slot_status)
var sorted = keys.sort(function(a,b) {
a1=slot_status[a];
b1=slot_status[b];
if (a1.date != b1.date) {
return a1.date-b1.date;
}
return a1.time - b1.time;
});
$.each(agenda_globals.timeslot_byid, function(key, value){
mobj_array.push(value)
});
for (n in sorted) {
var k1 = sorted[n];
var val_arr = slot_status[k1];
var sorted = mobj_array.sort(compare_timeslot);
var lastone_id = undefined;
/* k1 is the slot_status key */
/* v1 is the slot_obj */
for(var i = 0; i<val_arr.length; i++){
var v1 = val_arr[i];
html=html+"<option value='"+k1;
html=html+"' id='info_location_select_option_";
html=html+v1.timeslot_id+"'>";
html=html+v1.short_string;
html=html+"</option>";
}
}
$.each(sorted, function(index, value) {
// this check removes duplicates from the list, if there are any.
if(value.roomtype == "break" || value.roomtype=="reg") {
return;
}
if(value.timeslot_id == lastone_id) {
return; // from subfunction.
}
//console.log("room_select_html", index, value, value.short_string);
html=html+"<option value='"+value.timeslot_id;
html=html+"' id='info_location_select_option_";
html=html+value.timeslot_id+"'>";
html=html+value.short_string;
if(value.roomtype != "session") {
html = html+ "(" + value.roomtype + ")";
}
html=html+"</option>";
lastone_id = value.timeslot_id;
});
html = html+"</select>";
room_select_html = html;
return room_select_html;
}
var name_select_html = "";
var name_select_html = undefined;
var temp_sorted = null;
function calculate_name_select_box(){
var html = "<select id='info_name_select'>";
var keys = Object.keys(meeting_objs)
var mobj_array = []
$.each(meeting_objs, function(key, value){ mobj_array.push(value) });
var mobj_array = [];
var mobj_array2;
$.each(agenda_globals.meeting_objs, function(key, value){ mobj_array.push(value) });
mobj_array2 = mobj_array.sort(function(a,b) { return a.title.localeCompare(b.title); });
temp_sorted =mobj_array;
for(var i = 0; i < mobj_array.length; i++){
var mlen = mobj_array.length;
console.log("calculate name_select box with",mlen,"objects");
for(var i = 0; i < mlen; i++){
//console.log("select box mobj["+i+"]="+mobj_array[i]);
// html=html+"<option value='"+mobj_array[i].slot_status_key;
html=html+"<option value='"+mobj_array[i].session_id;
@ -435,13 +426,15 @@ function calculate_name_select_box(){
html = html+"</select>";
name_select_html = html;
return html;
}
function generate_select_box(){
if(!room_select_html) {
calculate_name_select_box();
}
return room_select_html;
}
@ -472,23 +465,10 @@ function insert_cell(js_room_id, text, replace){
}
function find_empty_test(){
$.each(slot_status, function(key){
ss_arr = slot_status[key];
for(var i = 0; i < ss_arr.length; i++){
if(ss_arr[i].scheduledsession_id == null || ss_arr[i].session_id == null){
console.log(ss_arr[i]);
}
}
})
}
function find_meeting_no_room(){
$.each(meeting_objs, function(key){
if(meeting_objs[key].slot_status_key == null) {
session = meeting_objs[key]
$.each(agenda_globals.meeting_objs, function(key){
if(agenda_globals.meeting_objs[key].slot_status_key == null) {
session = agenda_globals.meeting_objs[key]
session.slot_status_key = null;
session.populate_event(bucketlist_id);
}
@ -509,10 +489,10 @@ function find_meeting_no_room(){
function find_double_timeslots(){
var duplicate = {};
$.each(slot_status, function(key){
for(var i =0; i<slot_status[key].length; i++){
$.each(agenda_globals.slot_status, function(key){
for(var i =0; i<agenda_globals.slot_status[key].length; i++){
// goes threw all the slots
var ss_id = slot_status[key][i].session_id;
var ss_id = agenda_globals.slot_status[key][i].session_id;
if(duplicate[ss_id]){
duplicate[ss_id]['count']++;
duplicate[ss_id]['ts'].push(key);
@ -533,7 +513,6 @@ function find_double_timeslots(){
}
});
return dup;
}
@ -564,6 +543,7 @@ function auto_remove(){
}
/* for the spinnner */
/* spinner code from:
@ -629,13 +609,14 @@ function start_spin(opts){
// $("#schedule_name").hide();
$("#spinner").show();
$("#spinner").spin({lines:16, radius:8, length:16, width:4});
$("#pageloaded").hide();
}
function stop_spin(){
//spinner
$("#schedule_name").show();
$("#spinner").hide();
$("#spinner").spin(false);
$("#pageloaded").show();
}
/*

File diff suppressed because it is too large Load diff

View file

@ -20,6 +20,18 @@
*
*/
function AgendaGlobals() {
this.group_objs = {};
this.slot_status = {};
this.slot_objs = {};
this.meeting_objs = {};
this.sessions_objs = {};
this.timeslot_bydomid = {};
this.timeslot_byid = {};
this.scheduledsession_promise = undefined;
this.timeslot_promise = undefined;
this.__debug_session_move = false;
}
function createLine(x1,y1, x2,y2){
var length = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
@ -45,7 +57,7 @@ function empty_callback(inp){
}
function get_all_constraints(){
for(s in meeting_objs){
for(s in agenda_globals.meeting_objs){
show_non_conflicting_spots(s)
}
@ -53,8 +65,8 @@ function get_all_constraints(){
function show_all_conflicts(){
console.log("showing all conflicts");
for(sk in meeting_objs) {
var s = meeting_objs[sk];
for(sk in agenda_globals.meeting_objs) {
var s = agenda_globals.meeting_objs[sk];
s.display_conflict();
s.display_personconflict();
}
@ -62,8 +74,8 @@ function show_all_conflicts(){
// not really used anymore -- just for debugging
function hide_all_conflicts(){
for(sk in meeting_objs) {
var s = meeting_objs[sk];
for(sk in agenda_globals.meeting_objs) {
var s = agenda_globals.meeting_objs[sk];
s.hide_conflict();
}
}
@ -73,8 +85,8 @@ function get_all_conflicts(){
var one_constraint;
var sess1;
//console.log("get_all_conflicts()");
for(var s in meeting_objs){
sess1 = meeting_objs[s];
for(var s in agenda_globals.meeting_objs){
sess1 = agenda_globals.meeting_objs[s];
sess1.clear_conflict();
sess1.display_conflict();
@ -86,8 +98,8 @@ function get_all_conflicts(){
var all_constraints = $.when.apply($,all_constraint_promises);
all_constraints.done(function() {
for(var s in meeting_objs) {
var sess2 = meeting_objs[s];
for(var s in agenda_globals.meeting_objs) {
var sess2 = agenda_globals.meeting_objs[s];
sess2.examine_people_conflicts();
}
});
@ -273,80 +285,80 @@ function ColumnClass(room,date,time) {
// ++++++++++++++++++
// ScheduledSlot Object
// ScheduledSession is DJANGO name for this object, but needs to be renamed.
// It represents a TimeSlot that can be assigned in this schedule.
// { "scheduledsession_id": "{{s.id}}",
// "empty": "{{s.empty_str}}",
// "timeslot_id":"{{s.timeslot.id}}",
// "session_id" :"{{s.session.id}}",
// "room" :"{{s.timeslot.location|slugify}}",
// "extendedfrom_id" :refers to another scheduledsession by ss.id
// "time" :"{{s.timeslot.time|date:'Hi' }}",
// "date" :"{{s.timeslot.time|date:'Y-m-d'}}",
// "domid" :"{{s.timeslot.js_identifier}}"}
function ScheduledSlot(){
this.extendedfrom = undefined;
this.extendedto = undefined;
this.extendedfrom_id = false;
// TimeSlot Object
//
// { "timeslot_id":"{{timeslot.id}}",
// "room" :"{{timeslot.location|slugify}}",
// "time" :"{{timeslot.time|date:'Hi' }}",
// "date" :"{{timeslot.time|date:'Y-m-d'}}",
// "domid" :"{{timeslot.js_identifier}}"}
function TimeSlot(){
this.timeslot_id = undefined;
this.room = undefined;
this.time = undefined;
this.date = undefined;
this.domid = undefined;
this.empty = true;
this.scheduledsessions = [];
this.following_timeslot_id = undefined;
this.unscheduled_box = false;
}
ScheduledSlot.prototype.initialize = function(json) {
TimeSlot.prototype.initialize = function(json) {
for(var key in json) {
this[key]=json[key];
}
//console.log("timeslot processing: ", this.timeslot_id,
// this.room, this.date, this.time);
/* this needs to be an object */
this.column_class=new ColumnClass(this.room, this.date, this.time);
var d = new Date(this.date);
var t = d.getUTCDay();
this.day = new Date(this.date);
this.starttime = parseInt(this.time,10);
var t = this.day.getUTCDay();
if(this.room == "Unassigned"){
this.short_string = "Unassigned";
}
else{
this.short_string = daysofweek[t] + ", "+ this.time + ", " + upperCaseWords(this.room);
}
if(!this.domid) {
this.domid = json_to_id(this);
//console.log("gen "+timeslot_id+" is domid: "+this.domid);
}
//console.log("extend "+this.domid+" with "+JSON.stringify(this));
// translate Python booleans to JS.
if(this.pinned == "True") {
this.pinned = true;
} else {
this.pinned = false;
this.short_string = daysofweek[t] + ", "+ this.time + ", " + this.room;
}
// the key so two sessions in the same timeslot
if(slot_status[this.domid] == null) {
slot_status[this.domid]=[];
}
slot_status[this.domid].push(this);
//console.log("filling slot_objs", this.scheduledsession_id);
slot_objs[this.scheduledsession_id] = this;
agenda_globals.timeslot_bydomid[this.domid] = this;
agenda_globals.timeslot_byid[this.timeslot_id] = this;
};
ScheduledSlot.prototype.session = function() {
if(this.session_id != undefined) {
return meeting_objs[this.session_id];
} else {
return undefined;
TimeSlot.prototype.title = function() {
return this.room + " "+this.date+" "+this.time;
};
TimeSlot.prototype.slot_title = function() {
return "id#"+this.timeslot_id+" dom:"+this.domid;
};
TimeSlot.prototype.mark_empty = function() {
if(agenda_globals.__debug_session_move) {
console.log("marking slot empty", this.domid);
$("#"+this.domid).html("empty");
}
this.empty = true;
};
ScheduledSlot.prototype.slot_title = function() {
return "id#"+this.scheduledsession_id+" dom:"+this.domid;
TimeSlot.prototype.mark_occupied = function() {
if(agenda_globals.__debug_session_move) {
console.log("marking slot occupied", this.domid);
// if it was empty before, then clear it (might have word "empty" in it)
if(this.empty == true) {
$("#"+this.domid).html("");
}
}
this.empty = false;
};
ScheduledSlot.prototype.can_extend_right = function() {
TimeSlot.prototype.can_extend_right = function() {
if(this.following_timeslot == undefined) {
if(this.following_timeslot_id != undefined) {
this.following_timeslot = slot_objs[this.following_timeslot_id];
this.following_timeslot = agenda_globals.timeslot_byid[this.following_timeslot_id];
}
}
if(this.following_timeslot == undefined) {
console.log("can_extend_right:",this.scheduledsession_id," no slot to check");
console.log("can_extend_right:",this.timeslot_id," no slot to check");
return false;
} else {
console.log("can_extend_right:",
@ -357,22 +369,279 @@ ScheduledSlot.prototype.can_extend_right = function() {
}
};
function make_timeslot(json) {
var ts = new TimeSlot();
ts.initialize(json);
return ts;
}
/* feed this an array of timeslots */
function make_timeslots(json, status, jqXHR) {
$.each(json, function(index) {
var thing = json[index];
make_timeslot(thing);
});
}
function load_timeslots(href) {
if(agenda_globals.timeslot_promise == undefined) {
agenda_globals.timeslot_promise = $.Deferred();
var ts_promise = agenda_globals.timeslot_promise;
var ts = $.ajax(href);
ts.success(function(newobj, status, jqXHR) {
make_timeslots(newobj);
ts_promise.resolve(newobj);
console.log("finished timeslot promise");
});
}
return agenda_globals.timeslot_promise;
}
// ++++++++++++++++++
// ScheduledSlot Object
// ScheduledSession is DJANGO name for this object, but needs to be renamed.
// It represents a TimeSlot that can be assigned in this schedule.
// { "scheduledsession_id": "{{s.id}}",
// "timeslot_id":"{{s.timeslot.id}}",
// "session_id" :"{{s.session.id}}",
// "extendedfrom_id" :refers to another scheduledsession by ss.id
function ScheduledSlot(){
this.extendedfrom = undefined;
this.extendedto = undefined;
this.extendedfrom_id = false;
this.pinned = false;
}
ScheduledSlot.prototype.room = function() {
return this.timeslot.room;
};
ScheduledSlot.prototype.time = function() {
return this.timeslot.time;
};
ScheduledSlot.prototype.date = function() {
return this.timeslot.date;
};
ScheduledSlot.prototype.domid = function() {
return this.timeslot.domid;
};
ScheduledSlot.prototype.column_class = function() {
return this.timeslot.column_class;
};
ScheduledSlot.prototype.short_string = function() {
return this.timeslot.short_string;
};
ScheduledSlot.prototype.saveit = function() {
var myss = this;
stuffjson = new Object();
stuffjson.session_id = this.session_id;
stuffjson.timeslot_id = this.timeslot_id;
if(this.extendedfrom_id != undefined && this.extendedfrom_id != false) {
stuffjson.extendedfrom_id = this.extendedfrom_id;
}
var stuff = JSON.stringify(stuffjson, null, '\t');
var saveit = $.ajax(scheduledsession_post_href,{
"content-type": "text/json",
"type": "POST",
"data": stuff,
});
// should do something on success and failure.
saveit.done(function(result, status, jqXHR) {
myss.initialize(result, "saveit");
var session = myss.session;
if(session != undefined) {
session.placed(myss.timeslot);
}
});
// return the promise, in case someone (tests!) needs to know when we are done.
return saveit;
};
function remove_from_slot_status(domid, ss_id) {
var found_at;
if(agenda_globals.__debug_session_move) {
console.log("remove", domid, agenda_globals.slot_status[domid]);
}
if(agenda_globals.slot_status[domid] != undefined) {
$.each(agenda_globals.slot_status[domid], function(index, value) {
if(agenda_globals.__debug_session_move) {
console.log(" checking", index, value, ss_id);
}
if(value.scheduledsession_id == ss_id) {
found_at = index;
return;
}
});
if(found_at != undefined) {
agenda_globals.slot_status[domid].splice(found_at, 1);
console.log("removed", found_at, agenda_globals.slot_status[domid]);
}
} else {
//console.log(" already empty");
}
};
ScheduledSlot.prototype.deleteit = function() {
var deleteit = $.ajax(this.href, {
"content-type": "text/json",
"type": "DELETE",
});
// now nuke self!
var me = this;
delete agenda_globals.slot_objs[this.scheduledsession_id];
remove_from_slot_status(this.domid(), this.scheduledsession_id);
return deleteit;
};
function update_if_not_undefined(old, newval) {
if(newval != undefined) {
return newval;
} else {
return old;
}
}
ScheduledSlot.prototype.make_unassigned = function() {
this.scheduledsession_id = 0;
this.empty = true;
this.session_id = null;
this.room = "unassigned";
this.time = null;
this.date = null;
this.timeslot = new TimeSlot();
this.timeslot.initialize({"domid":"sortable-list"});
this.timeslot.unscheduled_box = true;
this.timeslot.short_string = "Unscheduled";
agenda_globals.slot_status[this.domid()]=[];
agenda_globals.slot_status[this.domid()].push(this);
agenda_globals.slot_objs[this.scheduledsession_id] = this;
};
ScheduledSlot.prototype.real_initialize = function(json, extra) {
/* do not copy everything over */
this.pinned = update_if_not_undefined(this.pinned, json.pinned);
this.scheduledsession_id = update_if_not_undefined(this.scheduledsession_id, json.scheduledsession_id);
this.session_id = update_if_not_undefined(this.session_id, json.session_id);
this.timeslot_id = update_if_not_undefined(this.timeslot_id, json.timeslot_id);
this.href = update_if_not_undefined(this.href, json.href);
this.extendedfrom_id = update_if_not_undefined(this.extendedfrom_id, json.extendedfrom_id);
//console.log("timeslot_id", this.timeslot_id);
this.timeslot = agenda_globals.timeslot_byid[this.timeslot_id];
if(this.timeslot != undefined && this.session_id != undefined) {
this.timeslot.mark_occupied();
}
if(this.session_id != undefined) {
this.session = agenda_globals.meeting_objs[this.session_id];
}
// translate Python booleans to JS.
if(this.pinned == "True") {
this.pinned = true;
} else {
this.pinned = false;
}
// timeslot should never be null, but if there is old/flaky
// data it could happen, so guard against it.
if(this.timeslot != undefined) {
// do not include in data structures if session_id is nil
// the key so two sessions in the same timeslot
if(agenda_globals.slot_status[this.domid()] == null) {
agenda_globals.slot_status[this.domid()]=[];
}
if(this.session_id != undefined) {
// remove any old duplicate that might exist.
remove_from_slot_status(this.domid(), this.scheduledsession_id);
if(agenda_globals.__debug_session_move) {
console.log(extra, "adding to slot_status", this.domid());
}
agenda_globals.slot_status[this.domid()].push(this);
//console.log("filling slot_objs", this.scheduledsession_id);
}
}
agenda_globals.slot_objs[this.scheduledsession_id] = this;
};
ScheduledSlot.prototype.initialize = ScheduledSlot.prototype.real_initialize;
function load_scheduledsessions(ts_promise, session_promise, href) {
if(agenda_globals.scheduledsession_promise == undefined) {
agenda_globals.scheduledsession_promise = $.Deferred();
var ss = $.ajax(href);
var ss_loaded = $.when(ss,ts_promise,session_promise);
ss_loaded.done(function(result, status, jqXHR) {
console.log("finished ss promise");
newobj = result[0]
$.each(newobj, function(index) {
one = newobj[index];
//console.log("ss has:", one);
make_ss(one);
});
agenda_globals.scheduledsession_promise.resolve(newobj);
});
}
return agenda_globals.scheduledsession_promise;
}
ScheduledSlot.prototype.connect_to_timeslot_session = function() {
if(this.timeslot == undefined) {
if(this.timeslot_id != undefined) {
this.timeslot = agenda_globals.timeslot_byid[this.timeslot_id];
} else {
/* must be the unassigned one?! */
this.timeslot = new TimeSlot();
this.timeslot.domid = "sortable-list";
}
}
/* session could be hooked up, but it is now always session() */
};
ScheduledSlot.prototype.session = function() {
if(this.session_id != undefined) {
return agenda_globals.meeting_objs[this.session_id];
} else {
console.log("ss id:", this.scheduledsession_id, "timeslot:", this.timeslot_id, this.timeslot.title(), "has null session");
return undefined;
}
};
ScheduledSlot.prototype.slot_title = function() {
return "id#"+this.scheduledsession_id+" dom:"+this.domid();
};
function make_ss(json) {
var ss = new ScheduledSlot();
ss.initialize(json);
ss.initialize(json, "make_ss");
return ss;
}
// ++++++++++++++++++
// Session Objects
//
// initialized from landscape_edit.html template with:
// session_obj({"title" : "{{ s.short_name }}",
// initialized by loading a json from /meeting/XX/sessions.json, return JSON that looks like:
//
// {"title" : "{{ s.short_name }}",
// "description":"{{ s.group.name }}",
// "special_request": "{{ s.special_request_token }}",
// "session_id":"{{s.id}}",
// "owner": "{{s.owner.owner}}",
// "group_id":"{{s.group.id}}",
// "area":"{{s.group.parent.acronym|upper}}",
// "duration":"{{s.requested_duration.seconds|durationFormat}}"});
//
@ -392,27 +661,40 @@ function Session() {
this.special_request = "";
this.conflicted = false;
this.double_wide = false;
this.attendees = undefined;
}
function session_obj(json) {
session = new Session();
for(var key in json) {
if(json[key].length > 0) {
//console.log("copying", key, "value: ", json[key]);
if(json[key] != undefined && json[key] != "") {
session[key]=json[key];
}
}
// dict will not pass .length > 0 above.
session.group = json.group;
if(session.requested_duration == undefined) {
session.requested_duration = session.duration;
}
// make it a number.
session.attendees = parseInt(session.attendees);
session.ogroup = session.group;
if(session.group != undefined) {
/* it has an inline group object, intern it, and redirect to interned object */
//console.log("using embedded group: ",session.group.href);
//console.log(session.title, "using embedded group: ",
// session.group.acronym, session.group.href, session.group);
session.group = load_group_from_json(session.group);
session.group_href = session.group.href;
//console.log(session.title, "2 using embedded group: ",
// session.group.acronym, session.group.href, session.group);
} else if(session.group_href != undefined) {
console.log("session has no embedded group, load by href", session.group_href);
console.log("session ",session.session_id,
"has no embedded group, load by href", session.group_href);
session.group = find_group_by_href(session.group_href, "session_load");
} else {
// bogus
@ -421,16 +703,60 @@ function session_obj(json) {
// keep a list of sessions by name
// this is mostly used for debug purposes only.
if(session_objs[session.title] == undefined) {
session_objs[session.title] = [];
if(agenda_globals.sessions_objs[session.title] == undefined) {
agenda_globals.sessions_objs[session.title] = [];
}
session_objs[session.title].push(session); // an array since there can be more than one session/wg
agenda_globals.sessions_objs[session.title].push(session); // an array since there can be more than one session/wg
meeting_objs[session.session_id] = session;
agenda_globals.meeting_objs[session.session_id] = session;
return session;
}
/* feed this an array of sessions */
function make_sessions(json, status, jqXHR) {
$.each(json, function(index) {
var thing = json[index];
session_obj(thing);
});
}
function load_sessions(href) {
if(agenda_globals.session_promise == undefined) {
agenda_globals.session_promise = $.Deferred();
var ss = $.ajax(href);
ss.success(function(newobj, status, jqXHR) {
console.log("finished session promise");
make_sessions(newobj);
agenda_globals.session_promise.resolve(newobj);
});
}
return agenda_globals.session_promise;
}
function count_sessions() {
$.each(agenda_globals.sessions_objs, function(title) {
//console.log("title", title, this);
var lastone = null;
var sessions = agenda_globals.sessions_objs[title];
var num_sessions = sessions.length;
$.each(sessions, function(index) {
//console.log("session", index, this);
this.number = index; // a number
this.maxNum = num_sessions;
this.prev_session = lastone;
this.next_session = null;
if(index < num_sessions) {
this.next_session = sessions[index+1];
}
lastone = this;
});
});
}
// augument to jQuery.getJSON( url, [data], [callback] )
Session.prototype.load_session_obj = function(andthen, arg) {
session = this;
@ -494,18 +820,28 @@ Session.prototype.on_bucket_list = function() {
this.column_class_list = [];
this.element().parent("div").addClass("meeting_box_bucket_list");
};
Session.prototype.placed = function(where, forceslot) {
Session.prototype.placed = function(where, forceslot, scheduledsession) {
this.is_placed = true;
// forceslot is set on a move, but unset on initial placement,
// as placed might be called more than once for a double slot session.
if(forceslot || this.slot==undefined) {
this.slot = where;
this.scheduledsession = scheduledsession;
/* we can not mark old slot as empty, because it
might have multiple sessions in it.
we can do the opposite: mark it was not empty when we fill it.
*/
if(where != undefined) {
where.empty = false;
}
}
if(where != undefined) {
this.add_column_class(where.column_class);
}
//console.log("session:",session.title, "column_class", ssid.column_class);
//console.log("session:",session.title, "column_class", ssid.column_class());
this.element().parent("div").removeClass("meeting_box_bucket_list");
this.pinned = where.pinned;
};
@ -555,11 +891,11 @@ Session.prototype.clear_all_conflicts = function(old_column_classes) {
$.each(session_obj.constraints.bethere, function(i) {
var conflict = session_obj.constraints.bethere[i];
var person = conflict.person;
person.clear_session(session_obj, old_column_classes);
});
}
};
};
Session.prototype.show_conflict = function() {
if(_conflict_debug) {
@ -621,7 +957,7 @@ Session.prototype.examine_people_conflicts = function() {
// reset people conflicts.
session_obj.person_conflicted = false;
for(ccn in session_obj.column_class_list) {
var vertical_location = session_obj.column_class_list[ccn].column_tag;
var room_tag = session_obj.column_class_list[ccn].room_tag;
@ -651,6 +987,17 @@ Session.prototype.area_scheme = function() {
return this.area.toUpperCase() + "-scheme";
};
Session.prototype.is_bof = function() {
return this.bof == "True";
}
Session.prototype.wg_scheme = function() {
if(this.is_bof()) {
return "bof_style";
} else {
return "wg_style";
}
};
Session.prototype.add_column_class = function(column_class) {
if(__column_class_debug) {
console.log("adding:",column_class, "to ", this.title);
@ -660,9 +1007,9 @@ Session.prototype.add_column_class = function(column_class) {
var _LAST_MOVED_OLD;
var _LAST_MOVED_NEW;
// scheduledsession_list is a list of slots where the session has been located.
// timeslot_list is a list of slots where the session has been located.
// bucket_list is a boolean.
Session.prototype.update_column_classes = function(scheduledsession_list, bucket_list) {
Session.prototype.update_column_classes = function(timeslot_list, bucket_list) {
// COLUMN CLASSES MUST BE A LIST because of multiple slot use
console.log("updating column_classes for ", this.title);
@ -680,9 +1027,10 @@ Session.prototype.update_column_classes = function(scheduledsession_list, bucket
this.on_bucket_list();
} else {
for(ssn in scheduledsession_list) {
ss = scheduledsession_list[ssn];
this.add_column_class(ss.column_class);
for(tsn in timeslot_list) {
var ts = timeslot_list[tsn];
console.log("timeslot_list", tsn, ts);
this.add_column_class(ts.column_class);
}
new_column_tag = this.column_class_list[0].column_tag;
}
@ -709,8 +1057,8 @@ Session.prototype.update_column_classes = function(scheduledsession_list, bucket
// utility/debug function, draws all events.
function update_all_templates() {
for(key in meeting_objs) {
session = meeting_objs[key];
for(key in agenda_globals.meeting_objs) {
session = agenda_globals.meeting_objs[key];
var slot = session.slot_status_key;
if(slot != null) {
session.repopulate_event(slot);
@ -722,29 +1070,34 @@ Session.prototype.event_template = function() {
// the extra div is present so that the table can have a border which does not
// affect the total height of the box. The border otherwise screws up the height,
// causing things to the right to avoid this box.
var area_mark = "";
if(this.responsible_ad != undefined) {
area_mark = this.responsible_ad.area_mark;
if(area_mark == undefined) {
area_mark = "ad:" + this.responsible_ad.href;
}
}
var bucket_list_style = "meeting_box_bucket_list"
if(this.is_placed) {
bucket_list_style = "";
area_mark = ""; /* no mark for unplaced items: it goes to the wrong place */
}
if(this.double_wide) {
bucket_list_style = bucket_list_style + " meeting_box_double";
}
var area_mark = "";
if(this.responsible_ad != undefined) {
area_mark = this.responsible_ad.area_mark;
}
pinned = "";
var pinned = "";
if(this.pinned) {
bucket_list_style = bucket_list_style + " meeting_box_pinned";
pinned="<td class=\"pinned-tack\">P</td>";
}
groupacronym = "nogroup";
var groupacronym = "nogroup";
if(this.group != undefined) {
groupacronym = this.group.acronym;
}
//console.log("acronym", groupacronym, this.group.acronym, this.visible_title());
// see comment in ietf.ccs, and
// http://stackoverflow.com/questions/5148041/does-firefox-support-position-relative-on-table-elements
@ -754,9 +1107,10 @@ Session.prototype.event_template = function() {
this.session_id+
"' session_id=\""+this.session_id+"\"" +
"><tr id='meeting_event_title'><th class='"+
this.wg_scheme()+" "+
this.area_scheme() +" meeting_obj'>"+
this.visible_title()+
"<span> ("+this.duration+")</span>" +
"<span> ("+this.requested_duration+")</span>" +
"</th>"+pinned+"</tr></table>"+ area_mark +"</div></div>";
};
@ -766,6 +1120,12 @@ function andthen_alert(object, result, arg) {
Session.prototype.generate_info_table = function() {
$("#info_grp").html(name_select_html);
if(this.is_bof()) {
$("#grp_type").html("BOF");
} else {
$("#grp_type").html("WG");
}
$("#info_name_select").val($("#info_name_select_option_"+this.session_id).val());
if(this.description.length > 33) {
$("#info_name").html("<span title=\""+this.description+"\">"+this.description.substring(0,35)+"...</span>");
@ -795,7 +1155,7 @@ Session.prototype.generate_info_table = function() {
if(this.slot != undefined) {
ss = this.slot;
if(ss.timeslot_id == null){
$("#info_location_select").val(meeting_objs[ss.scheduledsession_id]);
$("#info_location_select").val(agenda_globals.meeting_objs[ss.scheduledsession_id]);
}else{
$("#info_location_select").val(ss.timeslot_id); // ***
}
@ -812,8 +1172,8 @@ Session.prototype.generate_info_table = function() {
};
function load_all_groups() {
for(key in meeting_objs) {
session = meeting_objs[key];
for(key in agenda_globals.meeting_objs) {
session = agenda_globals.meeting_objs[key];
session.group = find_group_by_href(session.group_href, "load all");
}
}
@ -842,6 +1202,7 @@ Session.prototype.retrieve_constraints_by_session = function() {
return this.constraints_promise;
};
var __verbose_person_conflicts = false;
Session.prototype.calculate_bethere = function() {
var session_obj = this;
@ -849,7 +1210,9 @@ Session.prototype.calculate_bethere = function() {
$.each(this.constraints["bethere"], function(index) {
var bethere = session_obj.constraints["bethere"][index];
find_person_by_href(bethere.person_href).done(function(person) {
console.log("person",person.ascii,"attends session",session_obj.group.acronym);
if(__verbose_person_conflicts) {
console.log("person",person.ascii,"attends session",session_obj.group.acronym);
}
person.attend_session(session_obj);
});
});
@ -888,7 +1251,7 @@ Session.prototype.fill_in_constraints = function(constraint_list) {
// ++++++++++++++++++
// Group Objects
function Group() {
this.andthen_list = [];
this.andthen_list = []; /* should be removed, or replaced with promise */
this.all_sessions = [];
}
@ -958,7 +1321,7 @@ Group.prototype.del_column_class = function(column_class) {
}
for(n in this.column_class_list) {
if(this.column_class_list[n] == column_class) {
delete this.column_class_list[n];
this.column_class_list.splice(n,1);
}
}
};
@ -978,17 +1341,20 @@ Group.prototype.del_column_classes = function(column_class_list) {
var __debug_group_load = false;
function create_group_by_href(href) {
if(group_objs[href] == undefined) {
group_objs[href]=new Group();
g = group_objs[href];
if(agenda_globals.group_objs[href] == undefined) {
agenda_globals.group_objs[href]=new Group();
var g = agenda_globals.group_objs[href];
if(__debug_group_load) {
console.log("creating new group for", href);
}
g.loaded = false;
g.loading= false;
}
return g;
return agenda_globals.group_objs[href];
}
function load_group_by_href(href) {
var g = group_objs[href];
var g = agenda_globals.group_objs[href];
if(!g.loaded) {
g.href = href;
if(__debug_group_load) {
@ -1004,7 +1370,7 @@ function load_group_by_href(href) {
// fields are added to the group object, and the group
// is marked loaded. The resulting group object is returned.
function load_group_from_json(json) {
g = create_group_by_href(json.href);
var g = create_group_by_href(json.href);
for(var key in json) {
if(json[key].length > 0) {
g[key]=json[key];
@ -1019,7 +1385,7 @@ var group_references = 0;
var group_demand_loads = 0;
function find_group_by_href(href, msg) {
group_references++;
g=group_objs[href];
var g=agenda_globals.group_objs[href];
if(g == undefined) {
group_demand_loads++;
if(__debug_group_load) {
@ -1178,7 +1544,7 @@ Constraint.prototype.build_people_conflict_view = function() {
area_mark = this.person.area_mark_basic;
}
return "<div class='conflict our-"+this.conflict_type+"' id='"+this.dom_id+
"'>"+this.person.ascii+area_mark+"</div>";
"'>"+area_mark+"</div>";
};
Constraint.prototype.build_othername = function() {
@ -1327,8 +1693,7 @@ function find_person_by_href(href) {
var area_result;
// this function creates a unique per-area director mark
function mark_area_directors() {
var directorpromises = [];
function mark_area_directors(directorpromises) {
$.each(area_directors, function(areaname) {
var adnum = 1;
$.each(area_directors[areaname], function(key) {

View file

@ -18,10 +18,7 @@
//////////////-GLOBALS----////////////////////////////////////////
var meeting_objs = {}; // contains a list of session objects
var slot_status = {}; // the status of the slot, in format { room_year-month-day_hour: { free: t/f, timeslotid: id } }
var slot_objs = {};
var group_objs = {}; // list of working groups
var agenda_globals;
var days = [];
var legend_status = {}; // agenda area colors.
@ -59,41 +56,102 @@ $(document).ready(function() {
This is ran at page load and sets up the entire page.
*/
function init_timeslot_edit(){
agenda_globals = new AgendaGlobals();
log("initstuff() ran");
setup_slots();
var directorpromises = [];
setup_slots(directorpromises);
log("setup_slots() ran");
fill_timeslots();
resize_listeners();
static_listeners();
$.when.apply($,directorpromises).done(function() {
fill_timeslots();
resize_listeners();
$(".delete_room").unbind('click');
$(".delete_room").click(delete_room);
static_listeners();
$("#add_room").unbind('click')
$("#add_room").click(add_room);
$(".delete_room").unbind('click');
$(".delete_room").click(delete_room);
$(".delete_slot").unbind('click');
$(".delete_slot").click(delete_slot);
$("#add_room").unbind('click')
$("#add_room").click(add_room);
$("#add_day").unbind('click')
$("#add_day").click(add_day);
$(".delete_slot").unbind('click');
$(".delete_slot").click(delete_slot);
$("#add_day").unbind('click')
$("#add_day").click(add_day);
console.log("timeslot editor ready");
});
/* datepicker stuff */
create_datetimepicker();
/* hide the django form stuff we don't need */
$("#id_duration").hide();
$("label[for*='id_duration']").hide();
$("#duration_time").val("01:00");
format_datetime();
$("#pageloaded").show();
}
function create_datetimepicker(){
$("#start_date").datepicker({
dateFormat: "yy-mm-dd",
});
$("#duration_time").timepicker({
timeFormat: 'HH:mm',
hourMin: 0,
hourMax: 8,
stepMinute:5,
defaultValue: "01:00",
onSelect: function(selected){
$("input[name*='duration_hours']").val($(this).val().split(':')[0]);
$("input[name*='duration_minutes']").val($(this).val().split(':')[1]);
format_datetime();
}
})
$("#id_time").datetimepicker({
timeFormat: 'HH:mm',
dateFormat: "yy-mm-dd",
defaultValue: first_day,
hourMin: 9,
hourMax: 22,
stepMinute:5,
onSelect: function(selected){
duration_set($(this).datetimepicker('getDate'));
format_datetime()
}
});
$("#id_time").datepicker('setDate', first_day);
}
function format_datetime(){
var startDate = $("#id_time").datetimepicker('getDate');
var endTime = $("#id_time").datetimepicker('getDate');
endTime.setHours(endTime.getHours()+parseInt($("#duration_time").val().split(':')[0]))
endTime.setMinutes(endTime.getMinutes()+parseInt($("#duration_time").val().split(':')[1]))
$("#timespan").html(moment($("#id_time").datetimepicker('getDate')).format('HH:mm') + " <-> " + moment(endTime).format('HH:mm'));
}
function duration_set(d){
$("input[name*='duration_hours']").val(d.getHours());
$("input[name*='duration_minutes']").val(d.getMinutes());
}
function add_room(event) {
event.preventDefault();
var rooms_url = $(event.target).attr('href');
$("#add_room_dialog").dialog({
"title" : "Add new room",
buttons : {
"Cancel" : function() {
$(this).dialog("close");
buttons : {
"Cancel" : function() {
$(this).dialog("close");
}
}
}
});
$("#room_delete_dialog").dialog("open");
$("#add_room_dialog").dialog("open");
}
function delete_room(event) {
@ -168,33 +226,29 @@ function delete_slot(event) {
}
function fill_timeslots() {
$.each(slot_status, function(key) {
ssid_arr = slot_status[key];
for(var q = 0; q<ssid_arr.length; q++){
ssid = ssid_arr[q];
insert_timeslotedit_cell(ssid);
}
// add no_timeslot class to all timeslots, it will be removed
// when an item is placed into the slot.
$(".agenda_slot").addClass("no_timeslot");
$.each(agenda_globals.timeslot_bydomid, function(key) {
ts = agenda_globals.timeslot_bydomid[key];
insert_timeslotedit_cell(ts);
});
// now add a create option for every slot which hasn't got a timeslot
$.each($(".no_timeslot"),function(slot) {
create_timeslotedit_cell(this);
});
}
function insert_timeslotedit_cell(ssid) {
var domid = ssid.domid
var roomtype=ssid.roomtype
var slot_id = ("#"+domid)
function build_select_box(roomtype, domid, slot_id, select_id) {
//console.log("updating for", ts);
roomtypesession="";
roomtypeother="";
roomtypeplenary="";
roomtypereserved="";
roomtypeclass="";
roomtypeunavailable="";
//console.log("domid: "+domid+" has roomtype: "+roomtype)
$(slot_id).removeClass("agenda_slot_unavailable")
$(slot_id).removeClass("agenda_slot_other")
$(slot_id).removeClass("agenda_slot_session")
$(slot_id).removeClass("agenda_slot_plenary")
$(slot_id).removeClass("agenda_slot_reserved")
if(roomtype == "session") {
roomtypesession="selected";
@ -213,7 +267,6 @@ function insert_timeslotedit_cell(ssid) {
roomtypeclass="agenda_slot_unavailable";
}
var select_id = domid + "_select"
html = "<form action=\"/some/place\" method=\"post\"><select id='"+select_id+"'>";
html = html + "<option value='session' "+roomtypesession+" id='option_"+domid+"_session'>session</option>";
html = html + "<option value='other' "+roomtypeother+" id='option_"+domid+"_other'>non-session</option>";
@ -222,9 +275,26 @@ function insert_timeslotedit_cell(ssid) {
html = html + "<option value='unavail' "+roomtypeunavailable+" id='option_"+domid+"_unavail'>unavailable</option>";
html = html + "</select>";
$(slot_id).html(html)
$(slot_id).addClass(roomtypeclass)
$(slot_id).addClass(roomtypeclass);
return roomtypeclass;
}
function insert_timeslotedit_cell(ts) {
var roomtype=ts.roomtype;
var domid =ts.domid;
var slot_id =("#" + domid);
$(slot_id).removeClass("agenda_slot_unavailable")
$(slot_id).removeClass("agenda_slot_other")
$(slot_id).removeClass("agenda_slot_session")
$(slot_id).removeClass("agenda_slot_plenary")
$(slot_id).removeClass("agenda_slot_reserved")
$(slot_id).removeClass("no_timeslot");
var select_id = domid + "_select";
var roomtypeclass = build_select_box(roomtype, domid, slot_id, select_id);
$("#"+select_id).change(function(eventObject) {
start_spin();
@ -239,18 +309,68 @@ function insert_timeslotedit_cell(ssid) {
} else {
stop_spin();
for(var key in json) {
ssid[key]=json[key];
ts[key]=json[key];
}
console.log("server replied, updating cell contents: "+ssid.roomtype);
insert_timeslotedit_cell(ssid);
console.log("server replied, updating cell contents: "+ts.roomtype);
insert_timeslotedit_cell(ts);
}
},
{
'timeslot_id': ssid.timeslot_id,
'meeting_num': meeting_number,
'timeslot_id': ts.timeslot_id,
'purpose': newpurpose,
});
});
}
var __debug_object;
function create_timeslotedit_cell(slot_id) {
var roomtype = "unavailable";
__debug_object = object;
var object = $(slot_id);
var room = object.attr('slot_room');
var time = object.attr('slot_time');
var duration=object.attr('slot_duration');
var domid= object.attr('id');
//$(slot_id).removeClass("agenda_slot_unavailable")
$(slot_id).removeClass("agenda_slot_other")
$(slot_id).removeClass("agenda_slot_session")
$(slot_id).removeClass("agenda_slot_plenary")
$(slot_id).removeClass("agenda_slot_reserved")
var select_id = domid + "_select";
var roomtypeclass = build_select_box(roomtype, "default", slot_id, select_id);
$("#"+select_id).change(function(eventObject) {
start_spin();
var newpurpose = $("#"+select_id).val()
console.log("creating setting id: #"+select_id+" to "+newpurpose+" ("+roomtypeclass+")");
Dajaxice.ietf.meeting.update_timeslot_purpose(
function(json) {
if(json == "") {
console.log("No reply from server....");
} else {
stop_spin();
for(var key in json) {
ts[key]=json[key];
}
console.log("server replied, updating cell contents: "+ts.roomtype);
insert_timeslotedit_cell(ts);
}
},
{
'timeslot_id': "0", /* 0 indicates to make a new one */
'meeting_num': meeting_number,
'room_id': room,
'time' : time,
'duration':duration,
'purpose': newpurpose,
});
});
}
/*

View file

@ -0,0 +1,91 @@
/*
* jQuery UI Slider Access
* By: Trent Richardson [http://trentrichardson.com]
* Version 0.3
* Last Modified: 10/20/2012
*
* Copyright 2011 Trent Richardson
* Dual licensed under the MIT and GPL licenses.
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
*
*/
(function($){
$.fn.extend({
sliderAccess: function(options){
options = options || {};
options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device
if(options.touchonly === true && !("ontouchend" in document)){
return $(this);
}
return $(this).each(function(i,obj){
var $t = $(this),
o = $.extend({},{
where: 'after',
step: $t.slider('option','step'),
upIcon: 'ui-icon-plus',
downIcon: 'ui-icon-minus',
text: false,
upText: '+',
downText: '-',
buttonset: true,
buttonsetTag: 'span',
isRTL: false
}, options),
$buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+
'<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+
'<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+
'</'+ o.buttonsetTag +'>');
$buttons.children('button').each(function(j, jobj){
var $jt = $(this);
$jt.button({
text: o.text,
icons: { primary: $jt.data('icon') }
})
.click(function(e){
var step = $jt.data('step'),
curr = $t.slider('value'),
newval = curr += step*1,
minval = $t.slider('option','min'),
maxval = $t.slider('option','max'),
slidee = $t.slider("option", "slide") || function(){},
stope = $t.slider("option", "stop") || function(){};
e.preventDefault();
if(newval < minval || newval > maxval){
return;
}
$t.slider('value', newval);
slidee.call($t, null, { value: newval });
stope.call($t, null, { value: newval });
});
});
// before or after
$t[o.where]($buttons);
if(o.buttonset){
$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();
$buttons.eq(0).addClass('ui-corner-left');
$buttons.eq(1).addClass('ui-corner-right');
}
// adjust the width so we don't break the original layout
var bOuterWidth = $buttons.css({
marginLeft: ((o.where === 'after' && !o.isRTL) || (o.where === 'before' && o.isRTL)? 10:0),
marginRight: ((o.where === 'before' && !o.isRTL) || (o.where === 'after' && o.isRTL)? 10:0)
}).outerWidth(true) + 5;
var tOuterWidth = $t.outerWidth(true);
$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);
});
}
});
})(jQuery);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

6
static/js/moment.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,316 @@
// globals needed for tests cases.
var agenda_globals;
var scheduledsession_post_href = "/test/agenda_ui.html";
var read_only = false;
var days = [];
function reset_globals() {
// hack to reach in and manipulate global specifically.
window.agenda_globals = new AgendaGlobals();
}
function three_by_eight_grid() {
var rooms = ["apple", "orange", "grape", "pineapple",
"tomato","squash", "raisin","cucumber" ];
var times = [
{"time":"0900", "date":"2013-12-02"},
{"time":"1300", "date":"2013-12-02"},
{"time":"0900", "date":"2013-12-03"}
];
var slots = [{}];
var slotid= 1;
days.push("2013-12-02");
days.push("2013-12-03");
for(var roomkey in rooms) {
var room = rooms[roomkey];
for(var timekey in times) {
var time = times[timekey];
//console.log("data", room, time.date, time.time);
slot = make_timeslot({"timeslot_id": slotid,
"room" : room,
"roomtype" : "session",
"date" : time.date,
"time" : time.time,
"domid": "room" + roomkey + "_" + time.date + "_" + time.time
});
slots[slotid] = slot;
slotid += 1;
}
}
return slots;
}
function make_6_sessions() {
monarchs = ["henry", "george", "richard", "victoria", "william", "elizabeth"];
$.each(monarchs, function(index) {
monarch = monarchs[index];
console.log("monarch", monarch);
var group = create_group_by_href("http://localhost:8000/group/"+monarch+".json");
group.acronym = monarch;
group.name = "Royalty fun" + monarch;
group.type = "wg";
group.group_id = 1
});
var sessions = {};
var sessionid = 1;
monarch = "henry";
sessions[monarch] =
session_obj({"title": monarch,
"description": "Henry Beauclerc",
"session_id": sessionid,
"attendees": 50,
"short_name": monarch,
"comments": "Long Live the King!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Pope Francis",
"requested_duration": "1.0",
"area" : "TSV",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
monarch = "george";
sessions[monarch] =
session_obj({"title": monarch,
"description": "Georg Ludwig",
"session_id": sessionid,
"attendees": 60,
"short_name": monarch,
"comments": "Long Live the King!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Pope Bacon",
"requested_duration": "1.5",
"area" : "SEC",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
monarch = "richard";
sessions[monarch] =
session_obj({"title": monarch,
"description": "Richard the Lionheart",
"session_id": sessionid,
"attendees": 70,
"short_name": monarch,
"comments": "Lion Hart!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Robin Hood",
"requested_duration": "2.0",
"area" : "RTG",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
monarch = "victoria";
sessions[monarch] =
session_obj({"title": monarch,
"description": "the grandmother of Europe",
"session_id": sessionid,
"attendees": 80,
"short_name": monarch,
"comments": "Long Live the Queen!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Docter Who",
"requested_duration": "1.0",
"area" : "INT",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
monarch = "william";
sessions[monarch] =
session_obj({"title": monarch,
"description": "William the Conqueror",
"session_id": sessionid,
"attendees": 90,
"short_name": monarch,
"comments": "Just Married!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Pope Francis",
"requested_duration": "2.5",
"area" : "RAI",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
monarch = "elizabeth";
sessions[monarch] =
session_obj({"title": monarch,
"session_id": sessionid,
"description": "Head of the Commonwealth",
"attendees": 100,
"short_name": monarch,
"comments": "Long Live the Queen!",
"special_request": "",
"requested_time": "2013-11-27",
"requested_by": "Margaret Thatcher",
"requested_duration": "1.0",
"area" : "GEN",
"group_href": "http://localhost:8000/group/"+monarch+".json"
});
sessionid += 1;
return sessions;
}
function place_6_sessions(slots, sessions) {
var ss_id = 1;
make_ss({"scheduledsession_id": ss_id,
"timeslot_id": slots[3].timeslot_id,
"session_id": sessions["henry"].session_id});
ss_id += 1;
make_ss({"scheduledsession_id": ss_id,
"timeslot_id": slots[20].timeslot_id,
"session_id": sessions["george"].session_id});
ss_id += 1;
make_ss({"scheduledsession_id": ss_id,
"timeslot_id": slots[5].timeslot_id,
"session_id": sessions["richard"].session_id});
ss_id += 1;
make_ss({"scheduledsession_id": ss_id,
"timeslot_id": slots[9].timeslot_id,
"session_id": sessions["victoria"].session_id});
ss_id += 1;
make_ss({"scheduledsession_id": ss_id,
"timeslot_id": slots[13].timeslot_id,
"session_id": sessions["william"].session_id});
// last session is unscheduled.
}
function conflict_4_sessions(sessions) {
// fill in session constraints
$.each(sessions, function(index) {
var session = sessions[index];
var deferred = $.Deferred();
session.constraints_promise = deferred;
// $.ajax has a success option.
deferred.success = function(func) {
deferred.done(function(obj) {
func(obj, "success", {});
});
};
deferred.resolve({});
session.fill_in_constraints([]);
find_and_populate_conflicts(session);
});
sessions["henry"].fill_in_constraints([
{ "constraint_id": 21046,
"href": "http://localhost:8000/meeting/83/constraint/21046.json",
"meeting_href": "http://localhost:8000/meeting/83.json",
"name": "conflict",
"source_href": "http://localhost:8000/group/henry.json",
"target_href": "http://localhost:8000/group/george.json"
},
{ "constraint_id": 21047,
"href": "http://localhost:8000/meeting/83/constraint/21047.json",
"meeting_href": "http://localhost:8000/meeting/83.json",
"name": "conflic2",
"source_href": "http://localhost:8000/group/henry.json",
"target_href": "http://localhost:8000/group/richard.json"
}]);
find_and_populate_conflicts(sessions["henry"]);
}
function full_83_setup() {
reset_globals();
scheduledsession_post_href = "/meeting/83/schedule/mtg_83/sessions.json";
var ts_promise = load_timeslots("/meeting/83/timeslots.json");
var session_promise = load_sessions("/meeting/83/sessions.json");
var ss_promise = load_scheduledsessions(ts_promise, session_promise,
scheduledsession_post_href)
return ss_promise;
}
function henry_setup(sessions) {
reset_globals();
/* define a slot for unscheduled items */
var unassigned = new ScheduledSlot();
unassigned.make_unassigned();
t_slots = three_by_eight_grid();
t_sessions = make_6_sessions();
place_6_sessions(t_slots, t_sessions);
conflict_4_sessions(t_sessions);
load_events();
var henry0 = agenda_globals.sessions_objs["henry"];
var henry = henry0[0];
return henry;
}
var ss_id_next = 999;
function mock_scheduledslot_id(json) {
if(json.scheduledsession_id == undefined) {
console.log("adding scheduledsession_id to answer", ss_id_next);
ss_id_next += 1;
json.scheduledsession_id = ss_id_next;
}
};
ScheduledSlot.prototype.initialize = function(json) {
mock_scheduledslot_id(json);
this.real_initialize(json);
}
function mock_ui_draggable() {
// mock up the ui object.
var ui = new Object();
ui.draggable = new Object();
ui.draggable.remove = function() { return true; };
return ui;
}
function mock_dom_obj(domid) {
// mock up the dom object
var dom_obj = "#" + domid;
// in the unit tests, the object won't exist, so make it.
// when testing this test code, it might already be there
if($(dom_obj).length == 0) {
var div = document.createElement("div");
div.innerHTML = "welcome";
div.id = dom_obj;
}
return dom_obj;
}
function richard_move() {
var richard0 = agenda_globals.sessions_objs["richard"];
var richard = richard0[0];
var ui = mock_ui_draggable();
var dom_obj = mock_dom_obj(t_slots[4].domid);
/* current situation was tested in above test, so go ahead */
/* and move "richard" to another slot */
move_slot({"session": richard,
"to_slot_id": t_slots[4].domid,
"to_slot": t_slots[4],
"from_slot_id":t_slots[5].domid,
"from_slot": [t_slots[5]],
"bucket_list": false,
"ui": ui,
"dom_obj": dom_obj,
"force": true});
return richard;
}

View file

@ -0,0 +1,370 @@
test( "hello test", function() {
ok( 1 == "1", "Passed!" );
});
test( "TimeSlot Create test", function() {
reset_globals();
var nts = make_timeslot({"timeslot_id":"123",
"room" :"Regency A",
"time" :"0900",
"date" :"2013-11-04",
"domid" :"regencya_2013-11-04_0900"});
equal(nts.slot_title(), "id#123 dom:regencya_2013-11-04_0900", "slot_title correct");
});
asyncTest("Load Timeslots", function() {
reset_globals();
expect( 1 ); // expect one assertion.
var ts_promise = load_timeslots("/meeting/83/timeslots.json");
ts_promise.done(function() {
equal(Object.keys(agenda_globals.timeslot_byid).length, 179, "179 timeslots loaded");
start();
});
});
asyncTest("Load Sessions", function() {
reset_globals();
expect( 1 ); // expect one assertion.
var session_promise = load_sessions("/meeting/83/sessions.json");
session_promise.done(function() {
equal(Object.keys(agenda_globals.meeting_objs).length, 145, "145 sessions loaded");
start();
});
});
asyncTest("Load ScheduledSlot (ticket 1210)", function() {
expect( 1 ); // expect one assertion.
var ss_promise = full_83_setup();
ss_promise.done(function() {
equal(Object.keys(agenda_globals.slot_objs).length, 148, "148 scheduled sessions loaded");
start();
});
});
asyncTest( "move a session using the API (ticket 1211)", function() {
expect(4);
var ss_promise = full_83_setup();
ss_promise.done(function() {
equal(Object.keys(agenda_globals.slot_objs).length, 148, "148 scheduled sessions loaded");
// now move a session.. like selenium test, move forced from Monday to Friday:
// monday_room_253 = is #room208_2012-03-26_1510
// friday_room_252A = is #room209_2012-03-30_1230
var forces_list = agenda_globals.sessions_objs["forces"];
var forces = forces_list[0];
var from_slot_id = "room208_2012-03-26_1510";
var from_slot = agenda_globals.timeslot_bydomid[from_slot_id];
var to_slot_id = "room209_2012-03-30_1230";
var to_slot = agenda_globals.timeslot_bydomid[to_slot_id];
var ui = mock_ui_draggable();
var dom_obj = "#" + to_slot_id;
/* current situation was tested in above test, so go ahead */
/* and move "richard" to another slot */
var move_promise = move_slot({"session": forces,
"to_slot_id": to_slot_id,
"to_slot": to_slot,
"from_slot_id":from_slot_id,
"from_slot": [from_slot],
"bucket_list": false,
"ui": ui,
"dom_obj": dom_obj,
"force": true});
notEqual(move_promise, undefined);
if(move_promise != undefined) {
// now we need to check that it is all been done.
move_promise.done(function() {
// see that the placed is right.
equal(forces.slot.domid, to_slot_id);
// now move the item back again.
var return_promise = move_slot({"session": forces,
"to_slot_id": from_slot_id,
"to_slot": from_slot,
"from_slot_id":to_slot_id,
"from_slot": [to_slot],
"bucket_list": false,
"ui": ui,
"dom_obj": dom_obj,
"force": true});
return_promise.done(function() {
// see that the placed is right.
equal(forces.slot.domid, from_slot_id);
start();
});
});
} else {
// it is not legitimate to wind up here, but it does
// keep the test cases from hanging.
start();
}
});
});
test( "3x8 grid create (ticket 1212 - part 1)", function() {
expect(0); // just make sure things run without error
reset_globals();
t_slots = three_by_eight_grid();
t_sessions = make_6_sessions();
place_6_sessions(t_slots, t_sessions);
});
test( "calculate conflict columns for henry (ticket 1212 - part 2)", function() {
expect(10);
scheduledsession_post_href = "/test/agenda_ui.html";
var henry = henry_setup();
equal(henry.session_id, 1);
equal(henry.column_class_list.length, 1);
equal(henry.column_class_list[0].room, "apple");
equal(henry.column_class_list[0].time, "0900");
equal(henry.column_class_list[0].date, "2013-12-03");
equal(henry.conflicts.length, 2);
var conflict0 = henry.conflicts[0];
equal(conflict0.conflict_groupP(), true);
var classes = conflict0.column_class_list();
var cc00 = classes[0];
equal(cc00.th_tag, ".day_2013-12-02-1300");
var conflict1 = henry.conflicts[1];
equal(conflict1.conflict_groupP(), true);
var classes = conflict1.column_class_list();
var cc10 = classes[0];
equal(cc10.th_tag, ".day_2013-12-02-1300");
});
test( "re-calculate conflict columns for henry (ticket 1213)", function() {
expect(5);
reset_globals();
scheduledsession_post_href = "/test/agenda_ui.html";
agenda_globals.__debug_session_move = true;
var henry = henry_setup();
equal(henry.session_id, 1);
var richard = richard_move();
var conflict0 = henry.conflicts[0];
equal(conflict0.conflict_groupP(), true);
var classes = conflict0.column_class_list();
var cc00 = classes[0];
equal(cc00.th_tag, ".day_2013-12-02-1300");
var conflict1 = henry.conflicts[1];
equal(conflict1.conflict_groupP(), true);
var classes = conflict1.column_class_list();
var cc10 = classes[0];
equal(cc10.th_tag, ".day_2013-12-02-0900");
});
test( "build WG template for regular group (ticket #1135)", function() {
reset_globals();
var nts = make_timeslot({"timeslot_id":"123",
"room" :"Regency A",
"time" :"0900",
"date" :"2013-11-04",
"domid" :"regencya_2013-11-04_0900"});
// this is from http://localhost:8000/meeting/83/session/2157.json
var group1 = session_obj(
{
"agenda_note": "",
"area": "SEC",
"attendees": "45",
"bof": "False",
"comments": "please, no evening sessions.",
"description": "Public-Key Infrastructure (X.509)",
"group": {
"acronym": "pkix",
"ad_href": "http://localhost:8000/person/19483.json",
"comments": "1st met, 34th IETF Dallas, TX (December 4-8, 1995)",
"href": "http://localhost:8000/group/pkix.json",
"list_archive": "http://www.ietf.org/mail-archive/web/pkix/",
"list_email": "pkix@ietf.org",
"list_subscribe": "pkix-request@ietf.org",
"name": "Public-Key Infrastructure (X.509)",
"parent_href": "http://localhost:8000/group/sec.json",
"state": "active",
"type": "wg"
},
"group_acronym": "pkix",
"group_href": "http://localhost:8000/group/pkix.json",
"group_id": "1223",
"href": "http://localhost:8000/meeting/83/session/2157.json",
"name": "",
"requested_by": "Stephen Kent",
"requested_duration": "2.0",
"requested_time": "2011-12-19",
"session_id": "2157",
"short_name": "pkix",
"special_request": "*",
"status": "Scheduled",
"title": "pkix"
});
// validate that the session id is there as a basic check.
ok(group1.event_template().search(/meeting_box_container/) > 0);
ok(group1.event_template().search(/session_2157/) > 0);
ok(group1.event_template().search(/wg_style /) > 0);
});
test( "build WG template for BOF group (ticket #1135)", function() {
reset_globals();
// this is from http://localhost:8000/meeting/83/session/2157.json
var group1 = session_obj(
{
"agenda_note": "",
"area": "GEN",
"attendees": "50",
"bof": "True",
"comments": "",
"description": "RFC Format",
"group": {
"acronym": "rfcform",
"ad_href": "http://localhost:8000/person/5376.json",
"comments": "",
"href": "http://localhost:8000/group/rfcform.json",
"list_archive": "",
"list_email": "",
"list_subscribe": "",
"name": "RFC Format",
"parent_href": "http://localhost:8000/group/gen.json",
"state": "bof",
"type": "wg"
},
"group_acronym": "rfcform",
"group_href": "http://localhost:8000/group/rfcform.json",
"group_id": "1845",
"href": "http://localhost:8000/meeting/83/session/22081.json",
"name": "",
"requested_by": "Wanda Lo",
"requested_duration": "1.0",
"requested_time": "2012-02-27",
"session_id": "22081",
"short_name": "rfcform",
"special_request": "",
"status": "Scheduled",
"title": "rfcform"
}
);
// validate that the session id is there as a basic check.
ok(group1.event_template().search(/meeting_box_container/) > 0);
ok(group1.event_template().search(/session_22081/) > 0);
ok(group1.event_template().search(/bof_style /) > 0);
});
test( "compare timeslots sanely (ticket #1135)", function() {
var timeSlotA = {"timeslot_id":2383,
"room":"243",
"day":"2012-03-26T00:00:00.000Z",
"starttime":1300};
var timeSlotB = {"timeslot_id":2389,
"room":"241",
"day":"2012-03-26T00:00:00.000Z",
"starttime":900};
var timeSlotC = {"timeslot_id":2381,
"room":"245A",
"day":"2012-03-26T00:00:00.000Z",
"starttime":1300};
var timeSlotD = {"timeslot_id":2382,
"room":"245A",
"day":"2012-03-27T00:00:00.000Z",
"starttime":1510};
// three have the same day
ok(timeSlotA.day == timeSlotB.day);
ok(timeSlotA.day == timeSlotC.day);
ok(timeSlotA.day < timeSlotD.day);
// two have the same starttime
ok(timeSlotA.starttime == timeSlotC.starttime);
// canonical order is B, A, C, D.
equal(compare_timeslot(timeSlotB, timeSlotA), -1, "B < A");
equal(compare_timeslot(timeSlotA, timeSlotC), -1, "A < C");
equal(compare_timeslot(timeSlotC, timeSlotD), -1, "C < D");
equal(compare_timeslot(timeSlotB, timeSlotD), -1, "B < D");
equal(compare_timeslot(timeSlotA, timeSlotD), -1, "A < D");
});
asyncTest( "calculate info_room_select box (ticket 1220/1214)", function() {
expect(3);
var ss_promise = full_83_setup();
ss_promise.done(function() {
var box = calculate_room_select_box();
// this is a box which has no session, and therefore no ss.
// validate that calculate_name_select_box() provides all the timeslots
ok(box.search(/Mon, 1510, Maillot/) > 0);
ok(box.search(/undefined/) == -1);
// this one crept in: it is breakfast!
ok(box.search(/Mon, 0800, Halle Maillot A/) == -1);
start();
});
});
asyncTest( "calculate info_group_select box (ticket 1214)", function() {
expect(1);
var ss_promise = full_83_setup();
ss_promise.done(function() {
var box = calculate_name_select_box();
// the list of all of the groups.
// count the number of occurances of value=
var count = 0;
var valueloc = box.search(/value=/);
while(valueloc != -1) {
//console.log(count, "valueat",valueloc, "box contains", box);
count += 1;
// eat everything upto value=, and then a bit.
box = box.substring(valueloc+1);
valueloc = box.search(/value=/);
}
// 145 WG and other requests that "can meet"
equal(count, 145);
start();
});
});
asyncTest( "look for an empty slot(ticket 1215)", function() {
expect(1);
var ss_promise = full_83_setup();
ss_promise.done(function() {
target_session = agenda_globals.sessions_objs["pcp"][0];
ok(find_empty_slot(target_session) != null);
start();
});
});

View file

@ -608,6 +608,11 @@ tr.bg2 {
background: #EEEEEE;
}
tr.bg3 {
background: #DDDDDD;
}
/*
table#sessions-new-table td {
padding: 2px;

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Agenda JS Unit Testing</title>
<link rel="stylesheet" href="/css/lib/qunit-1.12.0.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="/js/lib/qunit-1.12.0.js"></script>
<script type="text/javascript" src="/js/lib/jquery-1.8.2.min.js"></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery-ui.custom.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.widget.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.droppable.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.sortable.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.accordion.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.draggable.min.js'></script>
<script type='text/javascript' src='/js/spin/dist/spin.min.js'></script>
<script src="/js/agenda/agenda_objects.js"></script>
<script src="/js/agenda/agenda_helpers.js"></script>
<script src="/js/agenda/agenda_listeners.js"></script>
<script src="/js/test/agenda_funcs.js"></script>
<script src="/js/test/agenda_tests.js"></script>
</body>
</html>

603
static/test/agenda_ui.html Normal file
View file

@ -0,0 +1,603 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Agenda JS Unit Testing</title>
<link rel="stylesheet" type="text/css" href="/css/yui/yui-20100305.css"></link>
<link rel="stylesheet" type="text/css" href="/css/base2.css"></link>
<style type="text/css">
.APP-scheme, .meeting_event th.APP-scheme, #APP-groups, #selector-APP { color:#008; background-color: #eef }
.director-mark-APP {
border: 2px solid #008;
color:#008;
background-color: #eef
}
.GEN-scheme, .meeting_event th.GEN-scheme, #GEN-groups, #selector-GEN { color:#080; background-color: #efe }
.director-mark-GEN {
border: 2px solid #080;
color:#080;
background-color: #efe
}
.INT-scheme, .meeting_event th.INT-scheme, #INT-groups, #selector-INT { color:#088; background-color: #eff }
.director-mark-INT {
border: 2px solid #088;
color:#088;
background-color: #eff
}
.IRTF-scheme, .meeting_event th.IRTF-scheme, #IRTF-groups, #selector-IRTF { color:#448; background-color: #ddf }
.director-mark-IRTF {
border: 2px solid #448;
color:#448;
background-color: #ddf
}
.OPS-scheme, .meeting_event th.OPS-scheme, #OPS-groups, #selector-OPS { color:#800; background-color: #fee }
.director-mark-OPS {
border: 2px solid #800;
color:#800;
background-color: #fee
}
.RAI-scheme, .meeting_event th.RAI-scheme, #RAI-groups, #selector-RAI { color:#808; background-color: #fef }
.director-mark-RAI {
border: 2px solid #808;
color:#808;
background-color: #fef
}
.RTG-scheme, .meeting_event th.RTG-scheme, #RTG-groups, #selector-RTG { color:#880; background-color: #ffe }
.director-mark-RTG {
border: 2px solid #880;
color:#880;
background-color: #ffe
}
.SEC-scheme, .meeting_event th.SEC-scheme, #SEC-groups, #selector-SEC { color:#488; background-color: #dff }
.director-mark-SEC {
border: 2px solid #488;
color:#488;
background-color: #dff
}
.TSV-scheme, .meeting_event th.TSV-scheme, #TSV-groups, #selector-TSV { color:#484; background-color: #dfd }
.director-mark-TSV {
border: 2px solid #484;
color:#484;
background-color: #dfd
}
</style>
<link rel='stylesheet' type='text/css' href='/css/jquery-ui-themes/jquery-ui-1.8.11.custom.css' />
<link rel="stylesheet" type="text/css" href="/css/base2.css"></link>
<link rel='stylesheet' type='text/css' href='/css/agenda.css' />
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="text/javascript" src="/js/lib/jquery-1.8.2.min.js"></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery-ui.custom.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.widget.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.droppable.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.sortable.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.accordion.min.js'></script>
<script type='text/javascript' src='/js/jquery-ui-1.9.0.custom/minified/jquery.ui.draggable.min.js'></script>
<script type='text/javascript' src='/js/spin/dist/spin.min.js'></script>
<div id="unassigned-items">
<div id="all_agendas" class="events_bar_buttons">
<a href="/meeting/83/agendas/edit">
<button class="styled_button">all agendas</button>
</a>
</div>
<div id="hidden_room" class="hide_buttons events_bar_buttons">
<div class="very_small left">hidden rooms:<span id="hidden_rooms" >0/11</span></div>
<div><button class="small_button" id="show_hidden_rooms">Show</button></div>
</div>
<div id="hidden_day" class="hide_buttons events_bar_buttons">
<div class="very_small left">hidden days:<span id="hidden_days" >0/7</span></div>
<div><button class="small_button" id="show_hidden_days">Show</button></div>
</div>
</div>
<div id="unassigned_order" class="events_bar_buttons">
<select id="unassigned_sort_button" class="dialog">
<option id="unassigned_alpha" value="alphaname" selected>Alphabetical</option>
<option id="unassigned_area" value="area">By Area</option>
<option id="unassigned_duration" value="duration">By Duration</option>
<option id="unassigned_special" value="special">Special Request</option>
</select>
</div>
<div class="agenda_slot_title" >
<div style="ui-icon ui-icon-arrow-1-w" id="close_ietf_menubar">
&lt;
</div>
<b>Unassigned Events:</b>
<span id="schedule_name">name: mtg_83</span>
</div>
<div id="sortable-list" class="ui-droppable bucket-list room_title">
</div>
</div>
<div class="agenda_div">
<div id="dialog-confirm" title="" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
Are you sure you want to put two sessions into the same slot?
</p>
</div>
<div id="can-extend-dialog" title="" class="ui-dialog dialog" style="display:none">
</div>
<div id="can-not-extend-dialog" title="" class="ui-dialog dialog" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
You can not extend this session. The slot is not available.
</p>
</div>
<div id="dialog-confirm" title="" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
Are you sure you want to put two sessions into the same slot?
</p>
</div>
<table id="meetings" class="ietf-navbar" style="width:100%">
<tr>
<th class="schedule_title"><div id="spinner"><!-- spinney goes here --></div></th>
<th colspan="2" id="2013-12-02-btn" class="day_2013-12-02 agenda_slot_title agenda_slot_unavailable">
<div id="close_2013-12-02" class="close top_left very_small close_day">x</div>
Mon&nbsp;(2013-12-02)
</th>
<th class="day_2013-12-02 spacer 2013-12-02-spacer" id="">
<div class="ui-widget-content ui-resizable" id="resize-2013-12-02-spacer">
<div class="spacer_grip ui-resizable-handle ui-resizable-e"></div>
</div>
</th>
<th colspan="1" id="2013-12-03-btn" class="day_2013-12-03 agenda_slot_title agenda_slot_unavailable">
<div id="close_2013-12-03" class="close top_left very_small close_day">x</div>
Tue&nbsp;(2013-12-03)
</th>
<th class="day_2013-12-03 spacer 2013-12-03-spacer" id="">
<div class="ui-widget-content ui-resizable" id="resize-2013-12-03-spacer">
<div class="spacer_grip ui-resizable-handle ui-resizable-e"></div>
</div>
</th>
</tr>
<tr>
<th class="th_column"><button id="show_all_button" class="styled_button">show all</button></th>
<th class="day_2013-12-02-0900 day_2013-12-02 room_title ">0900-1130 </th>
<th class="day_2013-12-02-1300 day_2013-12-02 room_title ">1300-1500 </th>
<th class="day_2013-12-02 spacer 2013-12-02-spacer"></th>
<th class="day_2013-12-03-0900 day_2013-12-03 room_title ">0900-1130 </th>
<th class="day_2013-12-03 spacer 2013-12-03-spacer"></th>
</tr>
<tr id="room0" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room0">X</div>
<div class="right room_name">apple <span class="capacity">(61)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room0_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="62" ></td>
<td id="room0_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="63" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room0_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="64" ></td>
</tr>
<tr id="room1" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room1">X</div>
<div class="right room_name">orange <span class="capacity">(70)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room1_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="71" ></td>
<td id="room1_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="72" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room1_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="73" ></td>
</tr>
<tr id="room2" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room2">X</div>
<div class="right room_name">grape <span class="capacity">(80)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room2_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="81" ></td>
<td id="room2_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="82" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room2_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="83" ></td>
</tr>
<tr id="room3" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room3">X</div>
<div class="right room_name">pineapple <span class="capacity">(90)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room3_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="91" ></td>
<td id="room3_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="92" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room3_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="93" ></td>
</tr>
<tr id="room4" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room4">X</div>
<div class="right room_name">tomato <span class="capacity">(100)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room4_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="101" ></td>
<td id="room4_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="102" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room4_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="103" ></td>
</tr>
<tr id="room5" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room5">X</div>
<div class="right room_name">squash <span class="capacity">(110)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room5_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="111" ></td>
<td id="room5_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="112" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room5_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="113" ></td>
</tr>
<tr id="room6" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room6">X</div>
<div class="right room_name">raisin <span class="capacity">(120)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room6_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="121" ></td>
<td id="room6_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="122" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room6_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="123" ></td>
</tr>
<tr id="room7" class="agenda_row_alt agenda_slot">
<th class="vert_time">
<div class="close very_small close_room top_left small_button" id="close_room7">X</div>
<div class="right room_name">cucumber <span class="capacity">(130)</span></div>
<!-- <span class="hide_room light_blue_border">X</span><span class="left">212/213</span>-->
</th>
<td id="room7_2013-12-02_0900" class="day_2013-12-02 agenda-column-2013-12-02-0900 agenda_slot agenda_slot_unavailable" capacity="131" ></td>
<td id="room7_2013-12-02_1300" class="day_2013-12-02 agenda-column-2013-12-02-1300 agenda_slot agenda_slot_unavailable" capacity="132" ></td>
<td class="day_2013-12-02 spacer 2013-12-02-spacer"></td>
<td id="room7_2013-12-03_0900" class="day_2013-12-03 agenda-column-2013-12-03-0900 agenda_slot agenda_slot_unavailable" capacity="133" ></td>
</tr>
</table>
</div>
<div id="session-info" class="ui-droppable bucket-list room_title">
<div class="agenda_slot_title"><b>Session Information:</b></div>
<div class="ss_info_box">
<div class="ss_info ss_info_left">
<table>
<tr><td class="ss_info_name_short">Group:</td><td><span id="info_grp"></span>
<!-- <button id="agenda_sreq_button" class="right">Edit Request</button> --></tr>
<tr><td class="ss_info_name_short">Name:</td> <td id="info_name"></td></tr>
<tr><td class="ss_info_name_short">Area:</td> <td><span id="info_area"></span><button id="show_all_area" class="right">Show All</button></td></tr>
</table>
</div>
<div class="ss_info ss_info_right">
<table>
<tr><td class="ss_info_name_long">Duration/Capacity:</td><td class="info_split" id="info_duration"></td> <td class="info_split" id="info_capacity"></td></tr>
<tr><td class="ss_info_name_long">Location:</td><td colspan=2 id="info_location"></td></tr>
<tr><td class="ss_info_name_long">Responsible AD:</td><td colspan=2 id="info_responsible"></td></tr>
<tr><td class="ss_info_name_long">Requested By:</td><td colspan=2 id="info_requestedby"></td></tr>
</table>
</div>
<div id="conflict_table">
<div id="special_requests">Special Requests</div>
<table>
<tbody id="conflict_table_body">
<tr class="conflict_list_row">
<td class="conflict_list_title">
Group conflicts
</td>
<td id="conflict_group_list">
<ul>
</ul>
</td>
</tr>
<tr class="conflict_list_row">
<td class="conflict_list_title">
<b>be present</b>
</td>
<td id="conflict_people_list">
<ul>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="agenda_find_free"><button class="agenda_selected_buttons small_button" id="find_free">Find Free</button></div>
<div class="agenda_double_slot button_disabled">
<button class="agenda_selected_buttons small_button" disabled
id="double_slot">Extend</button>
</div>
<div id="agenda_pin_slot" class="button_disabled">
<button class="agenda_selected_buttons small_button" disabled
id="pin_slot">Pin</button>
</div>
<div class="color_legend">
<span class="APP-scheme"><input class='color_checkboxes' type="checkbox" id="APP" value="APP-value" checked>APP</span>
<span class="GEN-scheme"><input class='color_checkboxes' type="checkbox" id="GEN" value="GEN-value" checked>GEN</span>
<span class="INT-scheme"><input class='color_checkboxes' type="checkbox" id="INT" value="INT-value" checked>INT</span>
<span class="IRTF-scheme"><input class='color_checkboxes' type="checkbox" id="IRTF" value="IRTF-value" checked>IRTF</span>
<span class="OPS-scheme"><input class='color_checkboxes' type="checkbox" id="OPS" value="OPS-value" checked>OPS</span>
<span class="RAI-scheme"><input class='color_checkboxes' type="checkbox" id="RAI" value="RAI-value" checked>RAI</span>
<span class="RTG-scheme"><input class='color_checkboxes' type="checkbox" id="RTG" value="RTG-value" checked>RTG</span>
<span class="SEC-scheme"><input class='color_checkboxes' type="checkbox" id="SEC" value="SEC-value" checked>SEC</span>
<span class="TSV-scheme"><input class='color_checkboxes' type="checkbox" id="TSV" value="TSV-value" checked>TSV</span>
</div>
</div>
<div class="agenda_save_box">
<div id="agenda_title"><b>Agenda name: </b><span>mtg_83</span></div>
<div id="agenda_saveas">
<form action="/meeting/83/schedule/mtg_83/edit" method="post">
<p><label for="id_savename">Savename:</label> <input id="id_savename" type="text" name="savename" maxlength="100" /></p>
<input type="submit" name="saveas" value="saveas">
</form>
</div>
</div>
</div>
<!-- <div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-ew">*</div> -->
</div>
<!-- some boxes for dialogues -->
<div id="dialog-confirm-two" title="" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
<span class="dialog-confirm-text">Are you sure you want to put two sessions into the same slot?</span>
</p>
</div>
<div id="dialog-confirm-toosmall" title="" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
<span class="dialog-confirm-text">The room you are moving to has a lower
room capacity then the requested capacity,<br>
Are you sure you want to continue?
</span>
</p>
</div>
<div id="dialog-confirm-twotoosmall" title="" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
<span class="dialog-confirm-text">
The slot you are moving to already has a session in it, <br>
the room is also smaller than the requested amount.<br>
Are you sure you want to continue?
</span>
</p>
</div>
<div id="can-extend-dialog" title="" class="ui-dialog dialog" style="display:none">
</div>
<div id="can-not-extend-dialog" title="" class="ui-dialog dialog" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="background: white; float: left; margin: 0 7px 20px 0;"></span>
You can not extend this session. The slot is not available.
</p>
</div>
<script type="text/javascript" src="/js/yui/yui-20100305.js"></script>
<script type="text/javascript">
//<![CDATA[
YAHOO.util.Event.onContentReady("wgs", function () {
var oMenu = new YAHOO.widget.Menu("wgs", { position: "static", hidedelay: 750, lazyload: true });
oMenu.render();
});
//]]>
</script>
<script src="/dajaxice/dajaxice.core.js" type="text/javascript" charset="utf-8"></script>
<script type='text/javascript' src='/js/agenda/agenda_edit.js'></script>
<script type='text/javascript' src='/js/agenda/agenda_helpers.js'></script>
<script type='text/javascript' src='/js/agenda/agenda_objects.js'></script>
<script type='text/javascript' src='/js/agenda/agenda_listeners.js'></script>
<script type='text/javascript' src='/js/test/agenda_funcs.js'></script>
<script type='text/javascript'>
__debug_conflict_calculate = true;
var meeting_number = "83";
var schedule_id = 24;
var schedule_owner_href = "wlo@amsl.com";
var schedule_name = "83";
var scheduledsession_post_href = "/test/agenda_ui.html";
var meeting_base_url = "http://localhost:8000/meeting/83";
var site_base_url = "http://localhost:8000";
var total_days = 7;
var total_rooms = 11;
function setup_slots(promiselist){
days.push("2013-12-02");
days.push("2013-12-03");
area_directors["app"] = [];
area_directors["app"] = [];
area_directors["gen"] = [];
area_directors["int"] = [];
area_directors["int"] = [];
area_directors["ops"] = [];
area_directors["ops"] = [];
area_directors["rai"] = [];
area_directors["rai"] = [];
area_directors["rtg"] = [];
area_directors["rtg"] = [];
area_directors["sec"] = [];
area_directors["sec"] = [];
area_directors["tsv"] = [];
area_directors["tsv"] = [];
//area_directors["app"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/21684.json"));
//area_directors["app"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/18321.json"));
//area_directors["gen"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/21072.json"));
//area_directors["int"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/100664.json"));
//area_directors["int"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/20356.json"));
//area_directors["ops"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/105682.json"));
//area_directors["ops"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/20959.json"));
//area_directors["rai"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/103539.json"));
//area_directors["rai"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/108049.json"));
//area_directors["rtg"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/2329.json"));
//area_directors["rtg"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/104198.json"));
//area_directors["sec"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/19177.json"));
//area_directors["sec"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/19483.json"));
//area_directors["tsv"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/105519.json"));
//area_directors["tsv"].push(find_person_by_href("http://knothole.gatineau.credil.org:8000/person/107190.json"));
t_slots = three_by_eight_grid();
t_sessions = make_6_sessions();
place_6_sessions(t_slots, t_sessions);
conflict_4_sessions(t_sessions);
console.log("setup_slots run");
legend_status["APP"] = true;
legend_status["GEN"] = true;
legend_status["INT"] = true;
legend_status["IRTF"] = true;
legend_status["OPS"] = true;
legend_status["RAI"] = true;
legend_status["RTG"] = true;
legend_status["SEC"] = true;
legend_status["TSV"] = true;
}
</script>
<style type='text/css'>
</style>
<div id="ietf-extras"></div>
</body></html>
</body>
</html>