Index: /main/waeup.kofa/branches/uli-diazo-themed/setup.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/setup.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/setup.py	(revision 11016)
@@ -124,6 +124,6 @@
       entry_points="""
       # Add entry points here
-      [hurry.resource.libraries]
-      waeup_kofa = waeup.kofa.browser.resources:waeup_kofa
+      #[hurry.resource.libraries]
+      #waeup_kofa = waeup.kofa.browser.resources:waeup_kofa
       [console_scripts]
       kofa-debug = grokcore.startup:interactive_debug_prompt
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/browser.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/browser.py	(revision 11016)
@@ -46,10 +46,8 @@
 from waeup.kofa.browser.interfaces import ICaptchaManager
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
-from waeup.kofa.browser.resources import toggleall
 from waeup.kofa.browser.layout import (
     NullValidator, jsaction, action, UtilityView, JSAction)
 from waeup.kofa.browser.pages import (
     add_local_role, del_local_roles, doll_up, ExportCSVView)
-from waeup.kofa.browser.resources import datepicker, warning
 from waeup.kofa.interfaces import (
     IKofaObject, ILocalRolesAssignable, IExtFileStore, IPDF,
@@ -147,8 +145,4 @@
     tabthreeactions2 = [_('Add local role')]
     subunits = _('Applicants Containers')
-
-    def update(self):
-        warning.need()
-        return super(ApplicantsRootManageFormPage, self).update()
 
     def getLocalRoles(self):
@@ -228,8 +222,4 @@
         IApplicantsContainerAdd).omit('code').omit('title')
 
-    def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        return super(ApplicantsContainerAddFormPage, self).update()
-
     @action(_('Add applicants container'))
     def addApplicantsContainer(self, **data):
@@ -371,10 +361,4 @@
             return True
         return False
-
-    def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        toggleall.need()
-        warning.need()
-        return super(ApplicantsContainerManageFormPage, self).update()
 
     def getLocalRoles(self):
@@ -840,6 +824,4 @@
 
     def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        warning.need()
         super(ApplicantManageFormPage, self).update()
         self.wf_info = IWorkflowInfo(self.context)
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/async.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/async.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/async.py	(revision 11016)
@@ -4,5 +4,4 @@
 from waeup.kofa.async import IJob, IJobManager
 from waeup.kofa.browser.layout import KofaPage
-from waeup.kofa.browser.resources import jquery, loadbar
 from waeup.kofa.interfaces import IKofaObject, IDataCenter
 from waeup.kofa.interfaces import MessageFactory as _
@@ -51,5 +50,4 @@
         self.exports = self.getRunningExports()
         self.uncompleted = [x for x in self.exports if x[0] != 'completed']
-        loadbar.need()
 
     def render(self):
@@ -126,5 +124,4 @@
 
     def update(self, START_NEW=None, REMOVE=None, job_id=None):
-        jquery.need()
         if REMOVE and job_id:
             self.context.remove(job_id)
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/browser.txt
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/browser.txt	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/browser.txt	(revision 11016)
@@ -30,11 +30,9 @@
   >>> browser = Browser()
 
-Let's get the default view of a university and see if the
-favicon is properly referenced::
+Let's get the default view of a university::
 
   >>> browser.open('http://localhost/myuniversity')
   >>> print browser.contents
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...href="http://localhost/myuniversity/@@/waeup_kofa/favicon.ico"
   ...Welcome to WAeUP.Kofa...
   ...
@@ -102,9 +100,4 @@
 
   >>> 'Sample University' in browser.contents
-  True
-
-The edit form contains the default value for the portal skin::
-
-  >>> 'waeup-base.css' in browser.contents
   True
 
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/captcha.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/captcha.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/captcha.py	(revision 11016)
@@ -28,5 +28,4 @@
 from zope.interface import Interface
 from zope.publisher.interfaces.http import IHTTPRequest
-from waeup.kofa.browser import resources
 from waeup.kofa.browser.layout import KofaPage
 from waeup.kofa.browser.interfaces import (
@@ -229,6 +228,4 @@
     #: name of challenge field in HTTP request
     chal_field = 'recaptcha_challenge_field'
-    #: resource to set theme and other options
-    theme = resources.recaptcha_white
 
     # Do not use the following keys in productive environments!  As
@@ -294,6 +291,4 @@
         form).
         """
-        if self.theme is not None:
-            self.theme.need()
         error_param = ''
         if error_code:
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/interfaces.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/interfaces.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/interfaces.py	(revision 11016)
@@ -59,39 +59,4 @@
         """Get the list of breadcrumbs as real Python list.
         """
-class ITheme(Interface):
-    """An theme or 'skin'.
-
-    Themes are basically collections of CSS- and/or JavaScript files
-    stored somewhere. In Grok-contexts these files can be registered
-    as 'resources' (see :mod:`waeup.kofa.browser.resources`).
-
-    Furthermore, to make themes selectable and distinctable from each
-    other we assign them short descriptions.
-
-    Themes should be registered as named utilities so that they can be
-    defined also in third-party packages and be looked up by other
-    components like theme-selectors.
-    """
-    description = schema.TextLine(
-        title = u'Description',
-        description = u'Short description of the theme for choice fields',
-        required = False,
-        )
-
-    def getResources():
-        """Get resources of the theme.
-
-        Deliver a list of resources that must be included in a web page to
-        let it be rendered in the theme's style.
-
-        A resource is normally defined in the `resources` module. If a
-        theme needs several of them which normally do not depend on
-        each other then all these resources can be returned by this
-        method. Normally, you will only return one resource.
-
-        These resources will (if the theme is selected) be `need()`-ed
-        by the `update()` method of the general site layout.
-        """
-
 class ICaptchaRequest(Interface):
     """A set of data required to verify captcha solutions.
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/layout.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/layout.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/layout.py	(revision 11016)
@@ -26,5 +26,4 @@
 from zope.i18n import translate
 from zope.i18nmessageid import Message
-from hurry.resource import mode
 from megrok.layout import Page, Layout, Form, EditForm, DisplayForm, AddForm
 from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver
@@ -37,6 +36,5 @@
 from waeup.kofa.utils.helpers import to_timezone
 from waeup.kofa.browser.interfaces import (
-    ITheme, IStudentNavigationBase, IApplicantBase)
-from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase
+    IStudentNavigationBase, IApplicantBase)
 from waeup.kofa.authentication import get_principal_role_manager
 
@@ -114,5 +112,5 @@
         msg = translate(self.msg, context=self.form.request)
         return ('<input type="submit" id="%s" name="%s" value="%s"'
-                ' class="btn btn-%s" onclick="return confirmPost(%s)" />' %
+                ' class="btn btn-%s" onclick="return window.confirm(%s)" />' %
                 (self.__name__, self.__name__, escape(label, quote=True),
                  self.style, msg)
@@ -230,5 +228,4 @@
 
     #: An instance of the default theme to use for the site layout
-    default_theme = KofaThemeBase()
     stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt')
     studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt')
@@ -310,26 +307,4 @@
             return None          
 
-    def update(self):
-        """Include the resources required by the chosen skin/theme.
-
-        University instances provide a 'skin' attribute, that should
-        hold the internal name of a theme.
-
-        A theme in the waeup.kofa sense consists of a list of
-        CSS/JavaScript resources defined in the
-        :mod:`waeup.kofa.browser.resources` module.
-
-        If the context University object has no such attribute or the
-        set value is not a valid theme name, we pick 'gray waeup
-        theme' as default.
-        """
-        mode('minified')
-        theme_name = getattr(grok.getSite()['configuration'], 'skin', '')
-        theme = queryUtility(ITheme, name=theme_name,
-                             default=self.default_theme)
-        for resource in theme.getResources():
-            resource.need()
-        return
-
     def render(self):
         if self.isStudent() or self.isApplicant() or not self.isAuthenticated():
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/pages.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/pages.py	(revision 11016)
@@ -51,6 +51,4 @@
     ICaptchaManager, IChangePassword)
 from waeup.kofa.browser.layout import jsaction, action, UtilityView
-from waeup.kofa.browser.resources import (
-    warning, tabs)
 from waeup.kofa.interfaces import MessageFactory as _
 from waeup.kofa.interfaces import(
@@ -790,8 +788,4 @@
         'frontpage_dict')
 
-    def update(self):
-        warning.need()
-        return super(ConfigurationContainerManageFormPage, self).update()
-
     def _frontpage(self):
         view = ConfigurationContainerDisplayFormPage(
@@ -900,8 +894,4 @@
     label = _(u'Data Center')
     pnav = 0
-
-    def update(self):
-        warning.need()
-        return super(DatacenterPage, self).update()
 
     @jsaction(_('Remove selected'))
@@ -1723,8 +1713,4 @@
         return _('Manage academic section')
 
-    def update(self):
-        warning.need()
-        return super(FacultiesContainerManageFormPage, self).update()
-
     @jsaction(_('Remove selected'))
     def delFaculties(self, **data):
@@ -1812,8 +1798,4 @@
     def label(self):
         return _('Manage faculty')
-
-    def update(self):
-        warning.need()
-        return super(FacultyManageFormPage, self).update()
 
     @jsaction(_('Remove selected'))
@@ -1995,9 +1977,4 @@
             url = self.url(val)
             yield(dict(url=url, name=key, container=val))
-
-    def update(self):
-        warning.need()
-        super(DepartmentManageFormPage, self).update()
-        return
 
     @action(_('Save'), style='primary')
@@ -2158,8 +2135,4 @@
     form_fields = grok.AutoFields(ICourse).omit('code')
 
-    def update(self):
-        warning.need()
-        return super(CourseManageFormPage, self).update()
-
     @action(_('Save'), style='primary')
     def save(self, **data):
@@ -2222,8 +2195,4 @@
     def label(self):
         return _('Manage certificate')
-
-    def update(self):
-        warning.need()
-        return super(CertificateManageFormPage, self).update()
 
     @action(_('Save'), style='primary')
Index: in/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/resources.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/resources.py	(revision 11015)
+++ 	(revision )
@@ -1,314 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program 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 General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-"""Special JavaScript and CSS resources provided by waeup.kofa.
-"""
-#from hurry import yui
-from hurry.resource import Library, ResourceInclusion
-from hurry.resource.core import inclusion_renderers, EXTENSIONS
-from hurry.jqueryui import jqueryui, base, blitzer, ui_lightness, humanity
-from hurry.jquery import jquery
-
-
-#: All local resources are registered under the name ``waeup_kofa``.
-waeup_kofa = Library('waeup_kofa', 'static')
-
-def render_ico(url):
-    """An inclusion renderer for hurry.resource for files with .ico extension.
-    """
-    return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url
-
-# Monkey patch hurry.resource to support .ico inclusions.
-inclusion_renderers['.ico'] = render_ico
-EXTENSIONS.append('.ico')
-
-#: A resource that includes a favicon.
-#:
-#: In the `getResource()` method of any theme include the
-#: HTML code to be rendered into the page::
-#:
-#:   from waeup.kofa.browser.resources import favicon
-#:   # ...
-#:   class MyTheme(grok.GlobalUtility):
-#:     # ...
-#:     def getResources(self):
-#:       return [favicon, ...]
-#:
-favicon = ResourceInclusion(waeup_kofa, 'favicon.ico')
-
-
-#: A resource that binds a jQueryUI datepicker widget to each
-#: <div> or <input> tag with class ``datepicker``.
-#: If you want to let a JavaScript datepicker appear when
-#: clicking into some input field, then you have to perform
-#: two steps:
-#:
-#: * In the `update()` method of the responsible view/page/form
-#:   require the JavaScript code to be rendered into the page::
-#:
-#:     from waeup.kofa.browser.resources import datepicker
-#:     # ...
-#:     class MyPage(...):
-#:       # ...
-#:       def update(self):
-#:         datepicker.need()
-#:
-#:   This way all required JavaScript will be rendered correctly
-#:   into the HTML page generated.
-#:
-#: * In your HTML code add some ``<input>`` or ``<div>`` tag with
-#:   ``class`` set to ``datepicker``, like this:
-#:
-#:   .. code-block:: html
-#:
-#:     <input type="text" name="entrydate" class="datepicker" />
-#:
-#: When the HTML is rendered, clicking into the field will open
-#: a datepicker widget. The datepicker functionality will be
-#: delivered by jQueryUI for every ``<div>/<input>`` field with class
-#: ``datepicker`` set.
-#:
-#: That means, you can also have several date input fields on a
-#: single page as long as each one has class ``datepicker``.
-#:
-#: Furthermore :func:`datepicker` supports different kinds of date
-#: representation from which you can choose simply by setting a
-#: different CSS class. The ``datepicker`` CSS mentioned above is
-#: only one of the following possibilities:
-#:
-#: ``"datepicker"``
-#:    renders date in format ``YYYY-MM-DD`` (ISO standard)
-#:
-#: ``"datepicker-year"``
-#:    same but also adds a select field for year
-#:
-#: ``"datepicker-le"``
-#:    renders date in format ``DD/MM/YYYY`` (little endian)
-#:
-#: ``"datepicker-le-year"``
-#:    same but also adds a select field for year
-#:
-#: ``"datepicker-de"``
-#:    renders date in format ``DD.MM.YYYY`` (german format)
-#:
-#: ``"datepicker-de-year"``
-#:    same but also adds a select field for year
-#:
-#: ``"datepicker-us"``
-#:    renders date in format ``MM/DD/YYYY`` (U.S. format)
-#:
-#: ``"datepicker-us-year"``
-#:    same but also adds a select field for year
-datepicker = ResourceInclusion(waeup_kofa, 'datepicker.js',
-                               depends=[jqueryui])
-
-
-#: If you want generate alert or confirm messages then you have to perform
-#: two steps:
-#:
-#: * In the `update()` method of the responsible view/page/form
-#:   require the JavaScript code to be rendered into the page::
-#:
-#:     from waeup.kofa.browser.resources import warning
-#:     # ...
-#:     class MyPage(...):
-#:       # ...
-#:       def update(self):
-#:         warning.need()
-#:
-#:   This way all required JavaScripts will be rendered correctly
-#:   into the HTML page generated.
-#:
-#:   In your HTML code add some <input> or <a> tag with onClick event:
-#:
-#:   .. code-block:: html
-#:
-#:        <input type="submit" name="xyz" value="abc">
-#:               onclick="return confirmPost('Are you sure?')"/>
-warning = ResourceInclusion(waeup_kofa, 'warning.js')
-
-#: If you have many select boxes in a from which have to be selected at the same
-#: time you have to perform two steps:
-#:
-#: * In the `update()` method of the responsible view/page/form
-#:   require the JavaScript code to be rendered into the page::
-#:
-#:     from waeup.kofa.browser.resources import toggleall
-#:     # ...
-#:     class MyPage(...):
-#:       # ...
-#:       def update(self):
-#:         toggleall.need()
-#:
-#:   This way all required JavaScripts will be rendered correctly
-#:   into the HTML page generated.
-#:
-#:   In your HTML code add some <input> tag with onClick event:
-#:
-#:   .. code-block:: html
-#:
-#:    <input type="checkbox" onClick="toggle(this, 'entries')" />
-toggleall = ResourceInclusion(waeup_kofa, 'toggleall.js')
-
-#: A resource that binds Bootstrap tabs to <div> tags with class
-#: ``tabs``.
-#:
-#: If you want Bootstrap tabs in your page then you
-#: have to perform two steps:
-#:
-#: * In the `update()` method of the responsible view/page/form
-#:   require the JavaScript code to be rendered into the page and set
-#:   tab for redirection::
-#:
-#:     from waeup.kofa.browser.resources import tabs
-#:
-#:     class MyPage(...):
-#:
-#:       def update(self):
-#:         tabs.need()
-#:         self.tab1 = self.tab2 = self.tab3 = ''
-#:         qs = self.request.get('QUERY_STRING', '')
-#:         if not qs:
-#:           qs = 'tab1'
-#:         setattr(self, qs, 'active')
-#:
-#:   This way all required JavaScripts will be rendered correctly
-#:   into the HTML page generated.
-#:
-#: * In your HTML code add some tags with like this:
-#:
-#:    .. code-block:: html
-#:
-#:     <ul class="tabs" data-tabs="tabs" >
-#:       <li tal:attributes="class view/tab1"><a href="#tab-1">Tab 1 Heading</a></li>
-#:       <li tal:attributes="class view/tab2"><a href="#tab-2">Tab 2 Heading</a></li>
-#:       <li tal:attributes="class view/tab3"><a href="#tab-3">Tab 3 Heading</a></li>
-#:     </ul>
-
-#:     <div class="tab-content">
-#:       <div id="tab-1" tal:attributes="class view/tab1">...</div>
-#:       <div id="tab-2" tal:attributes="class view/tab2">...</div>
-#:       <div id="tab-3" tal:attributes="class view/tab3">...</div>
-#:     </div>
-#:
-#: When the HTML is rendered, clicking into one of the tabs will make
-#: other <div>s disappear. See
-#:
-#:   http://twitter.github.com/bootstrap/javascript.html#tabs
-#:
-#: for details.
-#:
-tabs = ResourceInclusion(waeup_kofa, 'bootstrap-tabs-1.4.0.js',
-                          depends=[jquery])
-
-
-#: Resource that makes datatables for jQuery UI available.
-#:
-#: We register a normal version and a minified version. To make real
-#: use of datatables you might want to add some specialized CSS like
-#: `datatable_css` below.
-datatables = ResourceInclusion(waeup_kofa, 'jquery.dataTables.js',
-                               minified='jquery.dataTables.min.js',
-                               depends=[jquery])
-
-#: A stylesheet for datatables
-datatables_css = ResourceInclusion(waeup_kofa, 'datatables.css')
-
-#: A resource that turns HTML tables into sortable, searchable and :
-#: multi-page widgets using jQuery and the dataTables plugin available
-#: from http://www.datatables.net.
-#:
-#: If you want jQuery datatables for some <table> in your page then you
-#: have to perform two steps:
-#:
-#: * In the `update()` method of the responsible view/page/form
-#:   require the JavaScript code to be rendered into the page::
-#:
-#:     from waeup.kofa.browser.resources import datatable
-#:     # ...
-#:     class MyPage(...):
-#:       # ...
-#:       def update(self):
-#:         datatable.need()
-#:
-#:   This way all required JavaScripts will be rendered correctly
-#:   into the HTML page generated.
-#:
-#: * Assign a ``display dataTable`` class to the HTML table you want to tune:
-#:
-#:   .. code-block:: html
-#:
-#:      <table class="display dataTable">
-#:        <thead>
-#:          <tr>
-#:            <th>Name</th><th>Title</th>
-#:          </tr>
-#:        </thead>
-#:        <tbody>
-#:          <tr class="gradeA">
-#: 	      <td>Manfred</td><td>Mammoth of the year</td>
-#:          </tr>
-#:          <tr class="gradeA">
-#: 	      <td>Wolfgang</td><td>Junior</td>
-#:          </tr>
-#:        </tbody>
-#:      </table>
-#:
-#: When the HTML is rendered, clicking into one of the tabs will make
-#: other <div>s disappear. See
-#:
-#:   http://www.datatables.net/
-#:
-#: for details.
-#:
-datatable = ResourceInclusion(waeup_kofa, 'datatable.js',
-                              depends=[datatables, datatables_css])
-
-#: Register Twitter's Bootsrap css including dropdown js as a resource.
-bootstrap_min = ResourceInclusion(
-    waeup_kofa, 'bootstrap-1.4.0.css')
-
-dropdown = ResourceInclusion(
-    waeup_kofa, 'bootstrap-dropdown-1.4.0.js',
-    depends=[jquery])
-
-#: Register basic Kofa CSS (which is based on ``bootstrap.min-1.4.0.css``
-#: and ``base`` as a resource.
-waeup_base_css = ResourceInclusion(
-    waeup_kofa, 'waeup-base.css',
-    depends=[dropdown,bootstrap_min, base])
-
-#: A basic theme based on jQuery only (crappy yet).
-waeuptheme_empty = ResourceInclusion(
-    waeup_kofa, 'empty.css',
-    depends=[humanity])
-
-#: Render ReCaptcha with white theme.
-recaptcha_white = ResourceInclusion(
-    waeup_kofa, 'recaptcha_white.js'
-    )
-
-#: A page reloader (reloads after 3 secs)
-page_reloader = ResourceInclusion(
-    waeup_kofa, 'page_reloader.js', depends=[jquery])
-
-#: Disables page reloader (which is triggered by a JavaScript timer).
-page_not_reloader = ResourceInclusion(
-    waeup_kofa, 'page_not_reloader.js', depends=[jquery])
-
-loadbar = ResourceInclusion(
-    waeup_kofa, 'loadbar.js', depends=[jquery])
Index: in/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/theming.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/theming.py	(revision 11015)
+++ 	(revision )
@@ -1,97 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program 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 General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-"""
-Components to support themes.
-"""
-import grok
-from zope.component import getUtilitiesFor
-from zope.interface import Interface
-from zope.schema.interfaces import IVocabularyFactory
-from waeup.kofa.interfaces import SimpleKofaVocabulary
-from waeup.kofa.browser.interfaces import ITheme
-from waeup.kofa.browser.resources import (
-    waeuptheme_empty, waeup_base_css, favicon
-    )
-
-class KofaThemeBase(grok.GlobalUtility):
-    grok.implements(ITheme)
-    grok.name('base waeup theme')
-
-    description = u"Base Theme"
-
-    def getResources(self):
-        return [waeup_base_css, favicon]
-
-class KofaThemeEmpty(grok.GlobalUtility):
-    """A theme based on jQuery only.
-
-    XXX: crappy yet.
-    """
-    grok.implements(ITheme)
-    grok.name('empty theme')
-    description = u'Empty Theme'
-
-    def getResources(self):
-        return [waeuptheme_empty]
-
-def get_all_themes():
-    """Return all themes registered as `ITheme` somewhere.
-
-    Returns a list of ``(<NAME>, <THEME>)`` tuples where ``<NAME>`` is
-    the internal name under which a theme was registered and
-    ``<THEME>`` is the real theme implementing `ITheme`.
-    """
-    for name, theme in getUtilitiesFor(ITheme):
-        yield name, theme
-
-class ThemesVocabulary(grok.GlobalUtility):
-    """A vocabulary that provides all themes available.
-
-    A named global utility implementing
-
-      :class:`zope.schema.interfaces.IVocabularyFactory`
-
-    and registered under the name
-
-      'waeup.kofa.browser.theming.ThemesVocabulary'
-
-    Interface fields that wish to provide a list of available themes
-    can require a 'named vocabulary', i.e. set:
-
-      vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary'
-
-    and the vocabulary will deliver themes and their descriptive text
-    for instance in select boxes of forms.
-
-    The name is chosen so that the location of this vocabulary can be
-    found easily when used in an interface definition.
-    """
-    grok.implements(IVocabularyFactory)
-    grok.name('waeup.kofa.browser.theming.ThemesVocabulary')
-
-    def __call__(self, context):
-        """Deliver a vocabulary of available themes.
-
-        The `description`s of available themes are used as 'title' and
-        the utility names delivering the different themes as 'value'
-        and 'token'.
-        """
-        terms = [(theme.description, name)
-                 for name, theme in get_all_themes()]
-        vocab = SimpleKofaVocabulary(*terms)
-        return vocab
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/hostels/browser.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/hostels/browser.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/hostels/browser.py	(revision 11016)
@@ -26,5 +26,4 @@
     NullValidator)
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
-from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
 from waeup.kofa.browser.layout import default_primary_nav_template
 from waeup.kofa.browser.pages import delSubobjects
@@ -134,15 +133,4 @@
         _('Clear all hostels'),
         _('Remove selected')]
-
-    def update(self):
-        tabs.need()
-        self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''
-        qs = self.request.get('QUERY_STRING', '')
-        if not qs:
-            qs = 'tab1'
-        setattr(self, qs, 'active')
-        warning.need()
-        datatable.need()
-        return super(HostelsContainerManagePage, self).update()
 
     # It's quite dangerous to remove entire hostels with its content (beds).
@@ -167,10 +155,10 @@
         return
 
-    @jsaction(_('Clear all hostels'))
+    @jsaction(_('Clear all hostels'), style='danger')
     def clearHostels(self, **data):
         self.context.clearAllHostels()
         self.flash(_('All hostels cleared.'))
         write_log_message(self, 'all hostels cleared')
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -201,5 +189,5 @@
             self.context.addHostel(hostel)
         except KeyError:
-            self.flash(_('The hostel already exists.'))
+            self.flash(_('The hostel already exists.'), type='warning')
             return
         self.flash(_('Hostel created.'))
@@ -251,23 +239,10 @@
         return self.url(grok.getSite(),'students')
 
-    def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        tabs.need()
-        datatable.need()
-        warning.need()
-        self.tab1 = self.tab2 = ''
-        qs = self.request.get('QUERY_STRING', '')
-        if not qs:
-            qs = 'tab1'
-        setattr(self, qs, 'active')
-        super(HostelManageFormPage, self).update()
-        return
-
-    @action(_('Save'))
+    @action(_('Save'), style='primary')
     def save(self, **data):
         msave(self, **data)
         return
 
-    @action(_('Update all beds'))
+    @action(_('Update all beds'), style='primary')
     def updateBeds(self, **data):
         removed, added, modified, modified_beds = self.context.updateBeds()
@@ -280,5 +255,5 @@
         self.flash(flash_message)
         write_log_message(self, message)
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -289,6 +264,6 @@
             child_id = form['val_id']
         else:
-            self.flash(_('No item selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.flash(_('No item selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
             return
         if not isinstance(child_id, list):
@@ -310,5 +285,5 @@
                 mapping = {'a':m_translated}))
             write_log_message(self, 'switched: %s' % message)
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -319,6 +294,6 @@
             child_id = form['val_id']
         else:
-            self.flash(_('No item selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.flash(_('No item selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
             return
         if not isinstance(child_id, list):
@@ -334,16 +309,16 @@
                 mapping = {'a':message}))
             write_log_message(self, 'released: %s' % message)
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
         else:
-            self.flash(_('No allocated bed selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
-        return
-
-    @jsaction(_('Clear hostel'))
+            self.flash(_('No allocated bed selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
+        return
+
+    @jsaction(_('Clear hostel'), style='danger')
     def clearHostel(self, **data):
         self.context.clearHostel()
         self.flash(_('Hostel cleared.'))
         write_log_message(self, 'cleared')
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -362,9 +337,9 @@
     def save(self, **data):
         if data['owner'] == NOT_OCCUPIED:
-            self.flash(_('No valid student id.'))
+            self.flash(_('No valid student id.'), type='warning')
             self.redirect(self.url(self.context))
             return
         msave(self, **data)
-        self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
         return
 
@@ -374,4 +349,4 @@
             # Beds must be released first before they can be allocated to
             # other students.
-            self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
-        return
+            self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
+        return
Index: /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser.py	(revision 11015)
+++ /main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser.py	(revision 11016)
@@ -39,6 +39,4 @@
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
 from waeup.kofa.browser.pages import ContactAdminForm, ExportCSVView, doll_up
-from waeup.kofa.browser.resources import (
-    datepicker, warning, toggleall)
 from waeup.kofa.browser.layout import jsaction, action, UtilityView
 from waeup.kofa.browser.interfaces import ICaptchaManager
@@ -307,6 +305,4 @@
 
     def update(self, *args, **kw):
-        toggleall.need()
-        warning.need()
         form = self.request.form
         self.hitlist = []
@@ -535,5 +531,4 @@
 
     def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
         super(StudentBaseManageFormPage, self).update()
         self.wf_info = IWorkflowInfo(self.context)
@@ -758,8 +753,4 @@
         return form_fields
 
-    def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        return super(StudentClearanceManageFormPage, self).update()
-
     @action(_('Save'), style='primary')
     def save(self, **data):
@@ -975,5 +966,4 @@
             return
         super(StudyCourseManageFormPage, self).update()
-        warning.need()
         return
 
@@ -1294,9 +1284,4 @@
     pnav = 4
 
-    def update(self):
-        super(StudentTransferFormPage, self).update()
-        warning.need()
-        return
-
     @jsaction(_('Transfer'))
     def transferStudent(self, **data):
@@ -1325,5 +1310,4 @@
 
     def update(self):
-        warning.need()
         if not self.context.has_key('studycourse_1'):
             self.flash(_('No previous transfer.'), type="warning")
@@ -1470,5 +1454,4 @@
             return
         super(StudyLevelManageFormPage, self).update()
-        warning.need()
         if ADD is not None:
             if not course:
@@ -1691,9 +1674,4 @@
         return _('${a}: Payments',
             mapping = {'a':self.context.__parent__.display_fullname})
-
-    def update(self):
-        super(PaymentsManageFormPage, self).update()
-        warning.need()
-        return
 
     @jsaction(_('Remove selected tickets'))
@@ -1961,9 +1939,4 @@
         return _('${a}: Accommodation',
             mapping = {'a':self.context.__parent__.display_fullname})
-
-    def update(self):
-        super(AccommodationManageFormPage, self).update()
-        warning.need()
-        return
 
     @jsaction(_('Remove selected'))
@@ -2634,5 +2607,4 @@
             return
         super(StudyLevelEditFormPage, self).update()
-        warning.need()
         if ADD is not None:
             if not course:
