# Path: exe/webui/common.py
# def newId():
# def docType():
# def header(style=u'default'):
# def footer():
# def hiddenField(name, value=u""):
# def textInput(name, value=u"", size=40, disabled=u"", **kwargs):
# def textArea(name, value="", disabled="", cols="80", rows="8"):
# def richTextArea(name, value="", width="100%", height=100, package=None):
# def image(name, value, width="", height="", alt=None):
# def flash(src, width, height, id_=None, params=None, **kwparams):
# def flashMovie(movie, width, height, resourcesDir='', autoplay='false'):
# def submitButton(name, value, enabled=True, **kwargs):
# def button(name, value, enabled=True, **kwargs):
# def feedbackButton(name, value=None, enabled=True, **kwparams):
# def submitImage(action, object_, imageFile, title=u"", isChanged=1):
# def insertSymbol(name, image, title, string, text ='', num=0):
# def confirmThenSubmitImage(message, action, object_, imageFile, 
#                            title=u"", isChanged=1):
# def option(name, checked, value):
# def checkbox(name, checked, value="", title="", instruction=""):
# def elementInstruc(instruc, imageFile="help.gif", label=None):
# def formField(type_, package, caption, action, object_='', instruction='', \
#         *args, **kwargs):
# def select(action, object_='', options=[], selection=None):
# def editModeHeading(text):
# def removeInternalLinks(html, anchor_name=""):
# def removeInternalLinkNodes(html):
# def findLinkedField(package, exe_node_path, anchor_name):
# def findLinkedNode(package, exe_node_path, anchor_name, check_fields=True):
# def getAnchorNameFromLinkName(link_name):
# def renderInternalLinkNodeFilenames(package, html):
# def requestHasCancel(request):


import logging
from twisted.web.resource      import Resource
from exe.webui                 import common
from exe.webui.renderable      import RenderableResource
        html += u"<head>\n"
        html += u"<style type=\"text/css\">\n"
        html += u"@import url(/css/exe.css);\n"
        html += u'@import url(/style/base.css);\n'
        html += u"@import url(/style/standardwhite/content.css);</style>\n"
        html += u'''<script language="javascript" type="text/javascript">
            function setLocaleAndAnchors(l,anchors) {
                opener.nevow_clientToServerEvent('setLocale', this, '', l)
                opener.nevow_clientToServerEvent('setInternalAnchors', this, '', anchors)
                window.close()
            }
        </script>'''
        html += u"<title>"+_("eXe : elearning XHTML editor")+"</title>\n"
        html += u"<meta http-equiv=\"content-type\" content=\"text/html; "
        html += u" charset=UTF-8\"></meta>\n";
        html += u"</head>\n"
        html += u"<body>\n"
        html += u"<div id=\"main\"> \n"     
        html += u"<form method=\"post\" action=\"\" "
        html += u"id=\"contentForm\" >"  

        # package not needed for the preferences, only for rich-text fields:
        this_package = None
        html += common.formField('select', this_package, _(u"Select Language"),
                                 'locale',
                                 options = self.localeNames,
                                 selection = self.config.locale)

        internal_anchor_options = [(_(u"Enable All Internal Linking"), "enable_all"),
                                   (_(u"Disable Auto-Top Internal Linking"), "disable_autotop"),

# Path: exe/webui/common.py
# def newId():
# def docType():
# def header(style=u'default'):
# def footer():
# def hiddenField(name, value=u""):
# def textInput(name, value=u"", size=40, disabled=u"", **kwargs):
# def textArea(name, value="", disabled="", cols="80", rows="8"):
# def richTextArea(name, value="", width="100%", height=100, package=None):
# def image(name, value, width="", height="", alt=None):
# def flash(src, width, height, id_=None, params=None, **kwparams):
# def flashMovie(movie, width, height, resourcesDir='', autoplay='false'):
# def submitButton(name, value, enabled=True, **kwargs):
# def button(name, value, enabled=True, **kwargs):
# def feedbackButton(name, value=None, enabled=True, **kwparams):
# def submitImage(action, object_, imageFile, title=u"", isChanged=1):
# def insertSymbol(name, image, title, string, text ='', num=0):
# def confirmThenSubmitImage(message, action, object_, imageFile, 
#                            title=u"", isChanged=1):
# def option(name, checked, value):
# def checkbox(name, checked, value="", title="", instruction=""):
# def elementInstruc(instruc, imageFile="help.gif", label=None):
# def formField(type_, package, caption, action, object_='', instruction='', \
#         *args, **kwargs):
# def select(action, object_='', options=[], selection=None):
# def editModeHeading(text):
# def removeInternalLinks(html, anchor_name=""):
# def removeInternalLinkNodes(html):
# def findLinkedField(package, exe_node_path, anchor_name):
# def findLinkedNode(package, exe_node_path, anchor_name, check_fields=True):
# def getAnchorNameFromLinkName(link_name):
# def renderInternalLinkNodeFilenames(package, html):
# def requestHasCancel(request):


# Path: exe/webui/preferencespage.py
import logging
from twisted.web.resource      import Resource
from exe.webui                 import common
from exe.webui.renderable      import RenderableResource

        html += u"<head>\n"
        html += u"<style type=\"text/css\">\n"
        html += u"@import url(/css/exe.css);\n"
        html += u'@import url(/style/base.css);\n'
        html += u"@import url(/style/standardwhite/content.css);</style>\n"
        html += u'''<script language="javascript" type="text/javascript">
            function setLocaleAndAnchors(l,anchors) {
                opener.nevow_clientToServerEvent('setLocale', this, '', l)
                opener.nevow_clientToServerEvent('setInternalAnchors', this, '', anchors)
                window.close()
            }
        </script>'''
        html += u"<title>"+_("eXe : elearning XHTML editor")+"</title>\n"
        html += u"<meta http-equiv=\"content-type\" content=\"text/html; "
        html += u" charset=UTF-8\"></meta>\n";
        html += u"</head>\n"
        html += u"<body>\n"
        html += u"<div id=\"main\"> \n"     
        html += u"<form method=\"post\" action=\"\" "
        html += u"id=\"contentForm\" >"  

        # package not needed for the preferences, only for rich-text fields:
        this_package = None
        html += common.formField('select', this_package, _(u"Select Language"),
                                 'locale',
                                 options = self.localeNames,
                                 selection = self.config.locale)

        internal_anchor_options = [(_(u"Enable All Internal Linking"), "enable_all"),
                                   (_(u"Disable Auto-Top Internal Linking"), "disable_autotop"),

                                   (_(u"Disable All Internal Linking"), "disable_all")]