[MERGE] Latest trunk.
bzr revid: vta@openerp.com-20121108132049-7ape10oz1gvz4vi8
|
@ -17,7 +17,7 @@ This module provides the core of the OpenERP Web Client.
|
|||
"static/lib/datejs/parser.js",
|
||||
"static/lib/datejs/sugarpak.js",
|
||||
"static/lib/datejs/extras.js",
|
||||
"static/lib/jquery/jquery-1.7.2.js",
|
||||
"static/lib/jquery/jquery-1.8.2.js",
|
||||
"static/lib/jquery.MD5/jquery.md5.js",
|
||||
"static/lib/jquery.form/jquery.form.js",
|
||||
"static/lib/jquery.validate/jquery.validate.js",
|
||||
|
@ -25,7 +25,7 @@ This module provides the core of the OpenERP Web Client.
|
|||
"static/lib/spinjs/spin.js",
|
||||
"static/lib/jquery.autosize/jquery.autosize.js",
|
||||
"static/lib/jquery.blockUI/jquery.blockUI.js",
|
||||
"static/lib/jquery.ui/js/jquery-ui-1.8.17.custom.min.js",
|
||||
"static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js",
|
||||
"static/lib/jquery.ui.timepicker/js/jquery-ui-timepicker-addon.js",
|
||||
"static/lib/jquery.ui.notify/js/jquery.notify.js",
|
||||
"static/lib/jquery.deferred-queue/jquery.deferred-queue.js",
|
||||
|
@ -55,7 +55,7 @@ This module provides the core of the OpenERP Web Client.
|
|||
"static/src/js/view_tree.js",
|
||||
],
|
||||
'css' : [
|
||||
"static/lib/jquery.ui.bootstrap/css/custom-theme/jquery-ui-1.8.16.custom.css",
|
||||
"static/lib/jquery.ui.bootstrap/css/custom-theme/jquery-ui-1.9.0.custom.css",
|
||||
"static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css",
|
||||
"static/lib/jquery.ui.notify/css/ui.notify.css",
|
||||
"static/lib/jquery.tipsy/tipsy.css",
|
||||
|
|
|
@ -575,6 +575,20 @@ def from_elementtree(el, preserve_whitespaces=False):
|
|||
res["children"] = kids
|
||||
return res
|
||||
|
||||
|
||||
def content_disposition(filename, req):
|
||||
filename = filename.encode('utf8')
|
||||
escaped = urllib2.quote(filename)
|
||||
browser = req.httprequest.user_agent.browser
|
||||
version = int((req.httprequest.user_agent.version or '0').split('.')[0])
|
||||
if browser == 'msie' and version < 9:
|
||||
return "attachment; filename=%s" % escaped
|
||||
elif browser == 'safari':
|
||||
return "attachment; filename=%s" % filename
|
||||
else:
|
||||
return "attachment; filename*=UTF-8''%s" % escaped
|
||||
|
||||
|
||||
#----------------------------------------------------------
|
||||
# OpenERP Web web Controllers
|
||||
#----------------------------------------------------------
|
||||
|
@ -841,7 +855,7 @@ class Database(openerpweb.Controller):
|
|||
}
|
||||
return req.make_response(db_dump,
|
||||
[('Content-Type', 'application/octet-stream; charset=binary'),
|
||||
('Content-Disposition', 'attachment; filename="' + filename + '"')],
|
||||
('Content-Disposition', content_disposition(filename, req))],
|
||||
{'fileToken': int(token)}
|
||||
)
|
||||
except xmlrpclib.Fault, e:
|
||||
|
@ -1520,17 +1534,6 @@ class Binary(openerpweb.Controller):
|
|||
def placeholder(self, req):
|
||||
addons_path = openerpweb.addons_manifest['web']['addons_path']
|
||||
return open(os.path.join(addons_path, 'web', 'static', 'src', 'img', 'placeholder.png'), 'rb').read()
|
||||
def content_disposition(self, filename, req):
|
||||
filename = filename.encode('utf8')
|
||||
escaped = urllib2.quote(filename)
|
||||
browser = req.httprequest.user_agent.browser
|
||||
version = int((req.httprequest.user_agent.version or '0').split('.')[0])
|
||||
if browser == 'msie' and version < 9:
|
||||
return "attachment; filename=%s" % escaped
|
||||
elif browser == 'safari':
|
||||
return "attachment; filename=%s" % filename
|
||||
else:
|
||||
return "attachment; filename*=UTF-8''%s" % escaped
|
||||
|
||||
@openerpweb.httprequest
|
||||
def saveas(self, req, model, field, id=None, filename_field=None, **kw):
|
||||
|
@ -1566,7 +1569,7 @@ class Binary(openerpweb.Controller):
|
|||
filename = res.get(filename_field, '') or filename
|
||||
return req.make_response(filecontent,
|
||||
[('Content-Type', 'application/octet-stream'),
|
||||
('Content-Disposition', self.content_disposition(filename, req))])
|
||||
('Content-Disposition', content_disposition(filename, req))])
|
||||
|
||||
@openerpweb.httprequest
|
||||
def saveas_ajax(self, req, data, token):
|
||||
|
@ -1596,7 +1599,7 @@ class Binary(openerpweb.Controller):
|
|||
filename = res.get(filename_field, '') or filename
|
||||
return req.make_response(filecontent,
|
||||
headers=[('Content-Type', 'application/octet-stream'),
|
||||
('Content-Disposition', self.content_disposition(filename, req))],
|
||||
('Content-Disposition', content_disposition(filename, req))],
|
||||
cookies={'fileToken': int(token)})
|
||||
|
||||
@openerpweb.httprequest
|
||||
|
@ -1861,7 +1864,8 @@ class Export(View):
|
|||
|
||||
|
||||
return req.make_response(self.from_data(columns_headers, import_data),
|
||||
headers=[('Content-Disposition', 'attachment; filename="%s"' % self.filename(model)),
|
||||
headers=[('Content-Disposition',
|
||||
content_disposition(self.filename(model), req)),
|
||||
('Content-Type', self.content_type)],
|
||||
cookies={'fileToken': int(token)})
|
||||
|
||||
|
@ -1997,11 +2001,11 @@ class Reports(View):
|
|||
file_name = reports.read(res_id[0], ['name'], context)['name']
|
||||
else:
|
||||
file_name = action['report_name']
|
||||
file_name = '%s.%s' % (file_name, report_struct['format'])
|
||||
|
||||
return req.make_response(report,
|
||||
headers=[
|
||||
# maybe we should take of what characters can appear in a file name?
|
||||
('Content-Disposition', 'attachment; filename="%s.%s"' % (file_name, report_struct['format'])),
|
||||
('Content-Disposition', content_disposition(file_name, req)),
|
||||
('Content-Type', report_mimetype),
|
||||
('Content-Length', len(report))],
|
||||
cookies={'fileToken': int(token)})
|
||||
|
|
|
@ -11,12 +11,15 @@ Contents:
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
presentation
|
||||
|
||||
changelog-7.0
|
||||
|
||||
async
|
||||
rpc
|
||||
|
||||
widget
|
||||
qweb
|
||||
search-view
|
||||
|
||||
list-view
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
Presentation
|
||||
============
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Prerequisites to code addons for the OpenERP Web Client:
|
||||
|
||||
- Html
|
||||
- Css
|
||||
- Javascript
|
||||
- jQuery
|
||||
|
||||
Once you know all this, that's only the beginning. Most usages of Javascript/jQuery are small hacks to make a web page nicer. The OpenERP Client Web is different: it's a web application, not a web site. It doesn't have multiple pages generated by a server side code. Only one unique empty page is loaded and all the html is generated by Javascript code, the page is never reloaded. If you never developed that kind of application you still have lot of good practices to learn.
|
||||
|
||||
Recommendations
|
||||
---------------
|
||||
|
||||
First, here are the 5 golden rules when you create web 2.0 applications:
|
||||
|
||||
* **Do not use ids**. Html ids are evil, the key anti-feature that makes your components non-reusable. You want to identify a dom part? Save a jQuery object over that dom element. If you really need to use ids, use _.uniqueId(), but 99% of the time you don't need to, classes are sufficient.
|
||||
* **Do not use predictable css class names** like "content" or "navigation", ten other developers will have the same idea than you and there will be clashes. A simple way to avoid this is to use prefixes. For example, if you need a css class for the button named "new" that is contained in the form view which is itself contained in the OpenERP application, name it "oe-form-view-new-button".
|
||||
* **Do not use global selectors** like *$(".my-class")*, you never know if your component will be instantiated multiple times. Limit the selector with a context, like *$(".my-class", this.$el)*.
|
||||
* As a general advice, **Never assume you own the page**. When you create a component, it is never unique and is always surrounded by a bunch of crazy html. You have to do with it.
|
||||
* **Learn how to use jQuery's deferreds** [1]_. That concept may seem over-complicated, but the experience tell us that it is nearly impossible to create big-size javascript applications without that.
|
||||
|
||||
More recommendations related to the specific case of the OpenERP Web Client:
|
||||
|
||||
* Your components should inherit from the *Widget* class.
|
||||
* Use QWeb templates for html rendering.
|
||||
* Use *Widget* 's methods (*appendTo*, *replace*,...) to insert your component and its content into the dom.
|
||||
* All css classes should have the prefix *oe-* .
|
||||
* Functions that call rpc() should return a deferred, even if it calls it indirectly. So a function that calls a function that calls a function that calls rpc() should return a deferred too.
|
||||
|
||||
.. [1] http://api.jquery.com/category/deferred-object/
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
QWeb Cookbook
|
||||
=============
|
||||
|
||||
QWeb is the template engine used by the OpenERP Web Client. It is a home made engine create by OpenERP developers. There are a few things to note about it:
|
||||
|
||||
* Template are rendered in javascript on the client-side, the server does nothing.
|
||||
* It is an xml template engine, like Facelets_ for example. The source file must be a valid xml.
|
||||
* Templates are not interpreted. There are compiled to javascript. This makes them a lot faster to render, but sometimes harder to debug.
|
||||
* Most of the time it is used through the Widget class, but you can also use it directly using *openerp.web.qweb.render()* .
|
||||
|
||||
.. _Facelets: http://en.wikipedia.org/wiki/Facelets
|
||||
|
||||
Here is a typical QWeb file:
|
||||
|
||||
::
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates>
|
||||
<t t-name="Template1">
|
||||
<div>...</div>
|
||||
</t>
|
||||
<t t-name="Template2">
|
||||
<div>...</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
A QWeb file contains multiple templates, they are simply identified by a name.
|
||||
|
||||
Here is a sample QWeb template:
|
||||
|
||||
::
|
||||
|
||||
<t t-name="UserPage">
|
||||
<div>
|
||||
<p>Name: <t t-esc="widget.user_name"/></p>
|
||||
<p>Password: <input type="text" t-att-value="widget.password"/></p>
|
||||
<p t-if="widget.is_admin">This user is an Administrator</p>
|
||||
<t t-foreach="widget.roles" t-as="role">
|
||||
<p>User has role: <t t-esc="role"/></p>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
*widget* is a variable given to the template engine by Widget sub-classes when they decide to render their associated template, it is simply *this*. Here is the corresponding Widget sub-class:
|
||||
|
||||
::
|
||||
|
||||
UserPageWidget = openerp.base.Widget.extend({
|
||||
template: "UserPage",
|
||||
init: function(parent) {
|
||||
this._super(parent);
|
||||
this.user_name = "Xavier";
|
||||
this.password = "lilo";
|
||||
this.is_admin = true;
|
||||
this.roles = ["Web Developer", "IE Hater", "Steve Jobs Worshiper"];
|
||||
},
|
||||
});
|
||||
|
||||
It could output something like this:
|
||||
|
||||
::
|
||||
|
||||
<div>
|
||||
<p>Name: Xavier</p>
|
||||
<p>Password: <input type="text" value="lilo"/></p>
|
||||
<p>This user is an Administrator</p
|
||||
<p>User has role: Web Developer</p>
|
||||
<p>User has role: IE Hater</p>
|
||||
<p>User has role: Steve Jobs Worshiper</p>
|
||||
</div>
|
||||
|
||||
A QWeb template should always contain one unique root element to be used effectively with the Widget class, here it is a *<div>*. QWeb only react to *<t>* elements or attributes prefixed by *t-*. The *<t>* is simply a null element, it is only used when you need to use a *t-* attribute without outputting an html element at the same time. Here are the effects of the most common QWeb attributes:
|
||||
|
||||
* *t-esc* outputs the result of the evaluation of the given javascript expression
|
||||
* *t-att-ATTR* sets the value of the *ATTR* attribute to the result of the evaluation of the given javascript expression
|
||||
* *t-if* outputs the element and its content only if the given javascript expression returns true
|
||||
* *t-foreach* outputs as many times as contained in the list returned by the given javascript expression. For each iteration, a variable with the name defined by *t-as* contains the current element in the list.
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-08-24 09:16+0000\n"
|
||||
"PO-Revision-Date: 2012-10-26 12:17+0000\n"
|
||||
"Last-Translator: Herczeg Péter <herczegp@gmail.com>\n"
|
||||
"Language-Team: Hungarian <hu@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-21 05:02+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-27 05:15+0000\n"
|
||||
"X-Generator: Launchpad (build 16194)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/chrome.js:176
|
||||
|
@ -755,7 +755,7 @@ msgstr "Választani kell legalább egy rekordot!"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:875
|
||||
msgid "Uploading..."
|
||||
msgstr ""
|
||||
msgstr "Feltöltés"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:885
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-10-23 14:30+0000\n"
|
||||
"PO-Revision-Date: 2012-11-01 12:07+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-24 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16179)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16218)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/chrome.js:176
|
||||
|
@ -306,7 +306,7 @@ msgstr "Группировать по: %s"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1132
|
||||
msgid "GroupBy"
|
||||
msgstr ""
|
||||
msgstr "Группировать по"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1267
|
||||
|
@ -535,7 +535,7 @@ msgstr "Удалить"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:762
|
||||
msgid "Duplicate"
|
||||
msgstr "Клонировать"
|
||||
msgstr "Дублировать"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_form.js:133
|
||||
|
@ -867,13 +867,13 @@ msgstr "Удалить"
|
|||
#: addons/web/static/src/xml/base.xml:166
|
||||
#: addons/web/static/src/xml/base.xml:329
|
||||
msgid "Backup"
|
||||
msgstr "Резервное копирование"
|
||||
msgstr "Резервная копия"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:195
|
||||
#: addons/web/static/src/xml/base.xml:330
|
||||
msgid "Restore"
|
||||
msgstr "Востановить"
|
||||
msgstr "Восстановить"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:332
|
||||
|
@ -908,7 +908,7 @@ msgstr "Язык по умолчанию:"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:91
|
||||
msgid "Admin password:"
|
||||
msgstr "Пароль Администратора:"
|
||||
msgstr "Пароль администратора:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:95
|
||||
|
@ -1080,7 +1080,7 @@ msgstr "Изменить действие"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:486
|
||||
msgid "Edit Workflow"
|
||||
msgstr "Редактировать Процесс"
|
||||
msgstr "Редактировать процесс"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:491
|
||||
|
@ -1222,7 +1222,7 @@ msgstr "При изменении:"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:981
|
||||
msgid "Relation:"
|
||||
msgstr "Отношение:"
|
||||
msgstr "Связь:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:985
|
||||
|
@ -1411,12 +1411,12 @@ msgstr "Применить"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1509
|
||||
msgid "Save & New"
|
||||
msgstr "Сохранить и Создать"
|
||||
msgstr "Сохранить и создать"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1510
|
||||
msgid "Save & Close"
|
||||
msgstr "Сохранить и Закрыть"
|
||||
msgstr "Сохранить и закрыть"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1617
|
||||
|
@ -1556,7 +1556,7 @@ msgid ""
|
|||
"For use if CSV files have titles on multiple lines, skips more than a single "
|
||||
"line during import"
|
||||
msgstr ""
|
||||
"Применимо если в CSV файле заголовки расположены в нескольких строках и из "
|
||||
"Применимо если в CSV файле заголовки расположены в нескольких строках и их "
|
||||
"необходимо пропустить"
|
||||
|
||||
#. openerp-web
|
||||
|
@ -1669,9 +1669,6 @@ msgstr "Предпросмотр файла, который система не
|
|||
#~ msgid "Activate the developper mode"
|
||||
#~ msgstr "Активировать режим разработчика"
|
||||
|
||||
#~ msgid "Notebook Page \""
|
||||
#~ msgstr "Страница Блокнота \""
|
||||
|
||||
#~ msgid "Filter disabled due to invalid syntax"
|
||||
#~ msgstr "Фильтр отключен из-за неверного синтаксиса"
|
||||
|
||||
|
@ -1686,3 +1683,6 @@ msgstr "Предпросмотр файла, который система не
|
|||
|
||||
#~ msgid "Advanced Filters"
|
||||
#~ msgstr "Расширенные фильтры"
|
||||
|
||||
#~ msgid "Notebook Page \""
|
||||
#~ msgstr "Страница блокнота \""
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-01-31 06:25+0000\n"
|
||||
"Last-Translator: ERP Basing <erp@basing.si>\n"
|
||||
"PO-Revision-Date: 2012-11-01 16:38+0000\n"
|
||||
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
|
||||
"Language-Team: Slovenian <sl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-21 05:02+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16218)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/chrome.js:176
|
||||
|
@ -129,62 +129,62 @@ msgstr "OpenERP-Community Version"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:619
|
||||
msgid "less than a minute ago"
|
||||
msgstr ""
|
||||
msgstr "manj kot minuto nazaj"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:620
|
||||
msgid "about a minute ago"
|
||||
msgstr ""
|
||||
msgstr "približno pred minuto"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:621
|
||||
#, python-format
|
||||
msgid "%d minutes ago"
|
||||
msgstr ""
|
||||
msgstr "pred %d minutami"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:622
|
||||
msgid "about an hour ago"
|
||||
msgstr ""
|
||||
msgstr "pred približno eno uro"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:623
|
||||
#, python-format
|
||||
msgid "%d hours ago"
|
||||
msgstr ""
|
||||
msgstr "Pred %d urami"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:624
|
||||
msgid "a day ago"
|
||||
msgstr ""
|
||||
msgstr "pred enim dnevom"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:625
|
||||
#, python-format
|
||||
msgid "%d days ago"
|
||||
msgstr ""
|
||||
msgstr "pred %d dnevi"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:626
|
||||
msgid "about a month ago"
|
||||
msgstr ""
|
||||
msgstr "približno pred enim mesecem"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:627
|
||||
#, python-format
|
||||
msgid "%d months ago"
|
||||
msgstr ""
|
||||
msgstr "pred %d meseci"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:628
|
||||
msgid "about a year ago"
|
||||
msgstr ""
|
||||
msgstr "približno pred enim letom"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:629
|
||||
#, python-format
|
||||
msgid "%d years ago"
|
||||
msgstr ""
|
||||
msgstr "Pred %d leti"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/data_export.js:6
|
||||
|
@ -293,13 +293,13 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:999
|
||||
msgid "Filter"
|
||||
msgstr ""
|
||||
msgstr "Filter:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1108
|
||||
#, python-format
|
||||
msgid "Group by: %s"
|
||||
msgstr ""
|
||||
msgstr "Združi po: %s"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1132
|
||||
|
@ -347,7 +347,7 @@ msgstr "Filtri"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1762
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
msgstr "Napredeno"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/search.js:1853
|
||||
|
@ -632,7 +632,7 @@ msgstr "Dodaj: "
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_form.js:4230
|
||||
msgid "Save As..."
|
||||
msgstr ""
|
||||
msgstr "Shrani kot ..."
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_form.js:4230
|
||||
|
@ -669,7 +669,7 @@ msgstr "Skupina"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_list.js:549
|
||||
msgid "Do you really want to remove these records?"
|
||||
msgstr ""
|
||||
msgstr "Res želite odstraniti te zapise?"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:925
|
||||
|
@ -679,7 +679,7 @@ msgstr "Opozorilo"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_list.js:716
|
||||
msgid "You must select at least one record."
|
||||
msgstr ""
|
||||
msgstr "Izbrati morate vsaj en zapis"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/view_list.js:1243
|
||||
|
@ -727,17 +727,17 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:716
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
msgstr "Tiskanje"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:717
|
||||
msgid "Attachment"
|
||||
msgstr ""
|
||||
msgstr "Priponka"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:718 addons/web/static/src/xml/base.xml:276
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
msgstr "Dodatno"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:810
|
||||
|
@ -757,7 +757,7 @@ msgstr "Izbrati morate vsaj en zapis."
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:875
|
||||
msgid "Uploading..."
|
||||
msgstr ""
|
||||
msgstr "Pošiljanje ..."
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/views.js:885
|
||||
|
@ -963,7 +963,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:327
|
||||
msgid "Log out"
|
||||
msgstr ""
|
||||
msgstr "Odjava"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:333
|
||||
|
@ -1028,7 +1028,7 @@ msgstr "Potrditev gesla:"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:390
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
msgstr "Odpri"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:390
|
||||
|
@ -1123,18 +1123,18 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:527
|
||||
msgid "Add..."
|
||||
msgstr ""
|
||||
msgstr "Dodaj ..."
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:622
|
||||
#: addons/web/static/src/xml/base.xml:687
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "ali"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:687
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
msgstr "Opusti"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:806
|
||||
|
@ -1220,7 +1220,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:981
|
||||
msgid "Relation:"
|
||||
msgstr ""
|
||||
msgstr "Relacija:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:985
|
||||
|
@ -1235,7 +1235,7 @@ msgstr "Odpri vir"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1063
|
||||
msgid "Select date"
|
||||
msgstr ""
|
||||
msgstr "Izberi datum"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:948
|
||||
|
@ -1298,7 +1298,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1260
|
||||
msgid "Button Type:"
|
||||
msgstr ""
|
||||
msgstr "Vrsta tipke:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1264
|
||||
|
@ -1318,7 +1318,7 @@ msgstr "Polje"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1205
|
||||
msgid "Advanced Search..."
|
||||
msgstr ""
|
||||
msgstr "Napredno iskanje ..."
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1287
|
||||
|
@ -1363,7 +1363,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1381
|
||||
msgid "Filter name"
|
||||
msgstr ""
|
||||
msgstr "Ime filtra"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:1383
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-02-17 07:29+0000\n"
|
||||
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n"
|
||||
"PO-Revision-Date: 2012-11-06 04:40+0000\n"
|
||||
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
|
||||
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-21 05:03+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-07 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16232)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/chrome.js:176
|
||||
|
@ -129,56 +129,56 @@ msgstr "OpenERP社区支持版"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:619
|
||||
msgid "less than a minute ago"
|
||||
msgstr ""
|
||||
msgstr "一分钟内"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:620
|
||||
msgid "about a minute ago"
|
||||
msgstr ""
|
||||
msgstr "大约一分钟"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:621
|
||||
#, python-format
|
||||
msgid "%d minutes ago"
|
||||
msgstr ""
|
||||
msgstr "%d 分钟之前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:622
|
||||
msgid "about an hour ago"
|
||||
msgstr ""
|
||||
msgstr "大约一小时前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:623
|
||||
#, python-format
|
||||
msgid "%d hours ago"
|
||||
msgstr ""
|
||||
msgstr "%d 小时前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:624
|
||||
msgid "a day ago"
|
||||
msgstr ""
|
||||
msgstr "一天前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:625
|
||||
#, python-format
|
||||
msgid "%d days ago"
|
||||
msgstr ""
|
||||
msgstr "%d 天前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:626
|
||||
msgid "about a month ago"
|
||||
msgstr ""
|
||||
msgstr "大约一月前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:627
|
||||
#, python-format
|
||||
msgid "%d months ago"
|
||||
msgstr ""
|
||||
msgstr "%d 月前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:628
|
||||
msgid "about a year ago"
|
||||
msgstr ""
|
||||
msgstr "大约一年前"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:629
|
||||
|
@ -247,13 +247,13 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/data_import.js:386
|
||||
msgid "*Required Fields are not selected :"
|
||||
msgstr ""
|
||||
msgstr "*没有选择必须的字段:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/formats.js:139
|
||||
#, python-format
|
||||
msgid "(%d records)"
|
||||
msgstr ""
|
||||
msgstr "(%d 条记录)"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/formats.js:325
|
||||
|
|
|
@ -295,7 +295,12 @@
|
|||
|
||||
// Bind the window resize event when the width or height is auto or %
|
||||
if (/auto|%/.test("" + options.width + options.height))
|
||||
$(window).resize(function() {refresh(editor);});
|
||||
$(window).resize(function() {
|
||||
// CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor
|
||||
if(editor.$main.parent().parent().size()) {
|
||||
refresh(editor);
|
||||
}
|
||||
});
|
||||
|
||||
// Create the iframe and resize the controls
|
||||
refresh(editor);
|
||||
|
@ -562,7 +567,7 @@
|
|||
//==================
|
||||
// Private Functions
|
||||
//==================
|
||||
|
||||
|
||||
// checksum - returns a checksum using the Adler-32 method
|
||||
function checksum(text)
|
||||
{
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
Copyright 2011 Xavier Morel. 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.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY XAVIER MOREL ``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 <COPYRIGHT HOLDER> 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.
|
|
@ -1,59 +0,0 @@
|
|||
.. -*- restructuredtext -*-
|
||||
|
||||
In jQuery 1.5, jQuery has introduced a Deferred object in order to
|
||||
better handle callbacks.
|
||||
|
||||
Along with Deferred, it introduced ``jQuery.when`` which allows, among
|
||||
other things, for multiplexing deferreds (waiting on multiple
|
||||
deferreds at the same time).
|
||||
|
||||
While this is very nice if all deferreds are available at the same
|
||||
point, it doesn't really work if the resolution of a deferred can
|
||||
generate more deferreds, or for collections of deferreds coming from
|
||||
multiple sources (which may not be aware of one another).
|
||||
|
||||
Deferred.queue tries to be a solution to this. It is based on the
|
||||
principle of FIFO multiple-producers multiple-consumers tasks queues,
|
||||
such as Python's `queue.Queue`_. Any code with a reference to the
|
||||
queue can add a promise to the queue, and the queue (which is a
|
||||
promise itself) will only be resolved once all promises within are
|
||||
resolved.
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
Deferred.queue has a very simple life cycle: it is dormant when
|
||||
created, it starts working as soon as promises get added to it (via
|
||||
``.push``, or by providing them directly to its constructor), and as
|
||||
soon as the last promise in the queue is resolved it resolves itself.
|
||||
|
||||
If any promise in the queue fails, the queue itself will be rejected
|
||||
(without waiting for further promises).
|
||||
|
||||
Once a queue has been resolved or rejected, adding new promises to it
|
||||
results in an error.
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
``jQuery.Deferred.queue([promises...])``
|
||||
Creates a new deferred queue. Can be primed with a series of promise
|
||||
objects.
|
||||
|
||||
``.push(promise...)``
|
||||
Adds promises to the queue. Returns the queue itself (can be
|
||||
chained).
|
||||
|
||||
If the queue has already been resolved or rejected, raises an error.
|
||||
|
||||
``.then([doneCallbacks][, failCallbacks])``
|
||||
Promise/A ``then`` method.
|
||||
|
||||
``.done(doneCallbacks)``
|
||||
jQuery ``done`` extension to promise objects
|
||||
|
||||
``.fail(failCallbacks)``
|
||||
jQuery ``fail`` extension to promise objects
|
||||
|
||||
.. _queue.Queue:
|
||||
http://docs.python.org/dev/library/queue.html
|
|
@ -1,34 +0,0 @@
|
|||
(function ($) {
|
||||
"use strict";
|
||||
$.extend($.Deferred, {
|
||||
queue: function () {
|
||||
var queueDeferred = $.Deferred();
|
||||
var promises = 0;
|
||||
|
||||
function resolve() {
|
||||
if (--promises > 0) {
|
||||
return;
|
||||
}
|
||||
setTimeout($.proxy(queueDeferred, 'resolve'), 0);
|
||||
}
|
||||
|
||||
var promise = $.extend(queueDeferred.promise(), {
|
||||
push: function () {
|
||||
if (this.isResolved() || this.isRejected()) {
|
||||
throw new Error("Can not add promises to a resolved "
|
||||
+ "or rejected promise queue");
|
||||
}
|
||||
|
||||
promises += 1;
|
||||
$.when.apply(null, arguments).then(
|
||||
resolve, $.proxy(queueDeferred, 'reject'));
|
||||
return this;
|
||||
}
|
||||
});
|
||||
if (arguments.length) {
|
||||
promise.push.apply(promise, arguments);
|
||||
}
|
||||
return promise;
|
||||
}
|
||||
});
|
||||
})(jQuery)
|
|
@ -0,0 +1,31 @@
|
|||
#jQuery UI Bootstrap
|
||||
|
||||
##Summary
|
||||
|
||||
This is a project I started to bring the beauty of Twitter's Bootstrap to jQuery UI widgets.
|
||||
|
||||
Twitter's Bootstrap was one of my favorite projects to come out of 2011, but having used it regularly it left me wanting two things:
|
||||
|
||||
* The ability to work side-by-side with jQuery UI (something which caused a number of widgets to break visually)
|
||||
* The ability to theme jQuery UI widgets using Bootstrap styles. Whilst I love jQuery UI, I (like others) find some of the current themes to look a little dated. My hope is that this theme provides a decent alternative for others that feel the same.
|
||||
|
||||
To clarify, this project doesn't aim or intend to replace Twitter Bootstrap. It merely provides a jQuery UI-compatible theme inspired by Bootstrap's design. It also provides a version of Bootstrap CSS with a few (minor) sections commented out which enable the theme to work along-side it.
|
||||
|
||||
I welcome any and all feedback as I'd very much like this theme to be as solid as possible.
|
||||
|
||||
##Browser-support
|
||||
|
||||
All modern browsers are targeted by this theme with 'lo-res' experiences (i.e no gradients, border-radius etc.) provided for users using older browsers.
|
||||
|
||||
There *are* some minor known issues lingering that I'm working on, but the hope is that in time those will all get ironed out.
|
||||
|
||||
##jQuery UI support
|
||||
|
||||
This theme targets jQuery UI 1.8.16 and the default version of jQuery included in the (current) jQuery UI builds (jQuery 1.6.2). I'm aware of jQuery 1.7.1 and intend on upgrading anything necessary in the theme to use it when the jQuery UI team officially include it in their theme packs.
|
||||
|
||||
|
||||
##Demo
|
||||
|
||||
For a live preview of the theme, see [http://addyosmani.github.com/jquery-ui-bootstrap](http://addyosmani.github.com/jquery-ui-bootstrap).
|
||||
|
||||
A [blog post](http://addyosmani.com/blog/jquery-ui-bootstrap/) with some more details about the project is also available.
|
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png
Executable file → Normal file
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_glass_55_fbf9ee_1x400.png
Executable file → Normal file
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 120 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png
Executable file → Normal file
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_glass_75_dadada_1x400.png
Executable file → Normal file
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_glass_75_e6e6e6_1x400.png
Executable file → Normal file
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_glass_75_ffffff_1x400.png
Executable file → Normal file
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 107 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Executable file → Normal file
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 101 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png
Executable file → Normal file
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-icons_222222_256x240.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-icons_2e83ff_256x240.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-icons_454545_256x240.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-icons_888888_256x240.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
addons/web/static/lib/jquery.ui.bootstrap/css/custom-theme/images/ui-icons_cd0a0a_256x240.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
@ -23,6 +23,7 @@
|
|||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
@ -59,7 +60,7 @@
|
|||
----------------------------------*/
|
||||
.ui-widget { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size:13px; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
/*.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }*/
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #404040; }
|
||||
.ui-widget-content a { color: #404040; }
|
||||
.ui-widget-header {
|
||||
|
@ -399,7 +400,6 @@
|
|||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
||||
|
@ -432,9 +432,9 @@
|
|||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.16
|
||||
* jQuery UI Accordion 1.9.0
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
@ -445,7 +445,7 @@
|
|||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; font-weight:bold; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 1.7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
|
@ -465,46 +465,55 @@
|
|||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.16
|
||||
* jQuery UI Menu 1.9.0
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
background:#0064CD;
|
||||
color:#fff
|
||||
|
||||
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float:left; outline: none; }
|
||||
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
|
||||
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1;float: left;clear: left; width: 100%; }
|
||||
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
|
||||
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
|
||||
.ui-menu .ui-menu-item a.ui-state-focus,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
color: #ffffff;
|
||||
background: #0064cd;
|
||||
background-color: #0064cd;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
||||
background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
|
||||
background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -o-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: linear-gradient(top, #049cdb, #0064cd);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
border-color: #0064cd #0064cd #003f81;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
|
||||
.ui-menu .ui-state-disabled a { cursor: default; }
|
||||
|
||||
/* icon support */
|
||||
.ui-menu-icons { position: relative; }
|
||||
.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
|
||||
|
||||
/* left-aligned */
|
||||
.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
|
||||
|
||||
/* right-aligned */
|
||||
.ui-menu .ui-menu-icon { position: static; float: right; }
|
||||
|
||||
.ui-menu { width: 200px; margin-bottom: 2em; }
|
||||
|
||||
/*
|
||||
* jQuery UI Button 1.8.16
|
||||
|
@ -651,7 +660,31 @@ button.ui-button-icons-only { width: 3.7em; }
|
|||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
|
||||
/*
|
||||
* jQuery UI spinner 1.9.0
|
||||
*
|
||||
* Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
|
||||
.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
|
||||
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
|
||||
.ui-spinner{}
|
||||
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
|
||||
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
|
||||
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
|
||||
.ui-spinner-up { top: 0; }
|
||||
.ui-spinner-down { bottom: 0; }
|
||||
|
||||
/* TR overrides */
|
||||
span.ui-spinner { background: none; }
|
||||
.ui-spinner .ui-icon-triangle-1-s {
|
||||
/* need to fix icons sprite */
|
||||
background-position:-65px -16px;
|
||||
}
|
||||
|
||||
/*
|
||||
* jQuery UI Dialog 1.8.16
|
||||
|
@ -805,14 +838,16 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.16
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
||||
|
||||
/*
|
||||
* jQuery UI Tabs 1.9.0
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
* http://jqueryui.com/tabs/
|
||||
*/
|
||||
.ui-tabs .ui-tabs-nav{ background:none; border-color: #ddd;
|
||||
border-style: solid;
|
||||
|
@ -824,14 +859,11 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
background:whiteSmoke;
|
||||
border-bottom:1px solid #ddd;
|
||||
padding-bottom:0px;
|
||||
color:#4c4c4c;
|
||||
color:#00438A;
|
||||
}
|
||||
|
||||
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
|
||||
.ui-tabs .ui-tabs-nav li { text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px;
|
||||
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li { text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px; }
|
||||
|
||||
.ui-tabs-nav .ui-state-default{
|
||||
-webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
|
||||
|
@ -853,25 +885,24 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
|
||||
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 0px; outline:none;}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; padding-bottom: 0px; outline:none;}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
|
||||
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom-color: #ffffff;
|
||||
cursor: default;
|
||||
color:#4c4c4c;
|
||||
color:gray;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected:hover{
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active:hover{
|
||||
background:#ffffff;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
|
||||
/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs-panel .ui-button{text-decoration:none;}
|
||||
|
@ -883,16 +914,39 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
filter:none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.16
|
||||
* jQuery UI Tooltip 1.9.0
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
* http://jqueryui.com/tooltip/
|
||||
*/
|
||||
.ui-tooltip {
|
||||
padding:8px;
|
||||
position:absolute;
|
||||
z-index:9999;
|
||||
-o-box-shadow: 0 0 5px #ddd;
|
||||
-moz-box-shadow: 0 0 5px #ddd;
|
||||
-webkit-box-shadow: 0 0 5px #ddd;
|
||||
/*box-shadow: 0 2px 5px #ddd;*/
|
||||
box-shadow: inset 0 1px 0 #ffffff;
|
||||
}
|
||||
/* Fades and background-images don't work well together in IE6, drop the image */
|
||||
* html .ui-tooltip {
|
||||
background-image: none;
|
||||
}
|
||||
body .ui-tooltip { border-width:2px; }
|
||||
|
||||
/*
|
||||
* jQuery UI Datepicker 1.9.0
|
||||
*
|
||||
* Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://jqueryui.com/datepicker/
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
|
||||
|
@ -982,7 +1036,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
}
|
||||
|
||||
.ui-datepicker td:hover{
|
||||
color:white;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.ui-datepicker td .ui-state-default {
|
||||
|
@ -1001,21 +1055,34 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
margin-bottom:0px;
|
||||
font-size:normal;
|
||||
text-shadow: 0px;
|
||||
color:white;
|
||||
color: #ffffff;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.ui-datepicker td .ui-state-default:hover{
|
||||
background:#0064cd;
|
||||
color:white;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
.ui-datepicker td .ui-state-hover {
|
||||
color: #ffffff;
|
||||
background: #0064cd;
|
||||
background-color: #0064cd;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
||||
background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
|
||||
background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: -o-linear-gradient(top, #049cdb, #0064cd);
|
||||
background-image: linear-gradient(top, #049cdb, #0064cd);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
border-color: #0064cd #0064cd #003f81;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI Progressbar 1.8.16
|
||||
*
|
||||
|
@ -1065,16 +1132,17 @@ input:focus, textarea:focus {
|
|||
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
||||
}
|
||||
/*input[type=file]:focus, input[type=checkbox]:focus, select:focus {
|
||||
input[type=file]:focus, input[type=checkbox]:focus, select:focus {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
outline: 1px dotted #666;
|
||||
}*/
|
||||
}
|
||||
|
||||
/*input[type="text"],
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
textarea,*/
|
||||
.ui-autocomplete-input,
|
||||
textarea,
|
||||
.uneditable-input {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
|
@ -1,5 +1,15 @@
|
|||
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-left, .ui-corner-bottom{ border-radius:0px;}
|
||||
/*
|
||||
* jQuery UI Tabs 1.9.0
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://jqueryui.com/tabs/
|
||||
*/
|
||||
|
||||
.ui-state-active,.ui-tabs-selected { border-radius:0px;}
|
||||
.ui-tabs-selected { border-radius:0px;}
|
||||
.ui-tabs .ui-tabs-nav li{ filter:none;}
|
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -1,12 +1,8 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
/*! jQuery UI - v1.9.1 - 2012-10-29
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
|
@ -36,20 +32,198 @@
|
|||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
|
||||
.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
|
||||
.ui-autocomplete {
|
||||
position: absolute;
|
||||
top: 0; /* #8656 */
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
*/
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
|
||||
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
|
||||
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
|
||||
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
|
||||
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
|
||||
.ui-menu .ui-menu-item a.ui-state-focus,
|
||||
.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
|
||||
|
||||
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
|
||||
.ui-menu .ui-state-disabled a { cursor: default; }
|
||||
|
||||
/* icon support */
|
||||
.ui-menu-icons { position: relative; }
|
||||
.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
|
||||
|
||||
/* left-aligned */
|
||||
.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
|
||||
|
||||
/* right-aligned */
|
||||
.ui-menu .ui-menu-icon { position: static; float: right; }
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
|
||||
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
|
||||
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
|
||||
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
|
||||
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
|
||||
.ui-spinner-up { top: 0; }
|
||||
.ui-spinner-down { bottom: 0; }
|
||||
|
||||
/* TR overrides */
|
||||
.ui-spinner .ui-icon-triangle-1-s {
|
||||
/* need to fix icons sprite */
|
||||
background-position:-65px -16px;
|
||||
}
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tooltip {
|
||||
padding: 8px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
max-width: 300px;
|
||||
-webkit-box-shadow: 0 0 5px #aaa;
|
||||
box-shadow: 0 0 5px #aaa;
|
||||
}
|
||||
/* Fades and background-images don't work well together in IE6, drop the image */
|
||||
* html .ui-tooltip {
|
||||
background-image: none;
|
||||
}
|
||||
body .ui-tooltip { border-width: 2px; }
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
|
@ -66,10 +240,9 @@
|
|||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
|
@ -81,6 +254,7 @@
|
|||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
@ -222,8 +396,8 @@
|
|||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
|
@ -283,283 +457,5 @@
|
|||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
||||
* jQuery UI Resizable 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Selectable 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*
|
||||
* jQuery UI Autocomplete 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.17
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Button 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*
|
||||
* jQuery UI Dialog 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*
|
||||
* jQuery UI Slider 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*
|
||||
* jQuery UI Progressbar 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
5
addons/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.min.css
vendored
Normal file
|
@ -25,7 +25,6 @@
|
|||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.openerp.openerp_webclient_container {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -45,7 +44,7 @@
|
|||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
|
||||
/* http://www.quirksmode.org/dom/inputfile.html
|
||||
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
|
||||
*/ */
|
||||
*/
|
||||
}
|
||||
.openerp :-moz-placeholder {
|
||||
color: #afafb6 !important;
|
||||
|
@ -218,7 +217,7 @@
|
|||
background-clip: padding-box;
|
||||
}
|
||||
.openerp.ui-dialog .ui-dialog-content {
|
||||
padding: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane {
|
||||
padding: 16px;
|
||||
|
@ -660,7 +659,7 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_dropdown_toggle {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
font-weight: normal;
|
||||
}
|
||||
.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
|
||||
|
@ -2061,10 +2060,11 @@
|
|||
padding-bottom: 0;
|
||||
}
|
||||
.openerp .oe_form div.oe_chatter {
|
||||
min-width: 650px;
|
||||
max-width: 860px;
|
||||
box-sizing: border-box;
|
||||
min-width: 682px;
|
||||
max-width: 892px;
|
||||
margin: 0 auto;
|
||||
padding: 16px 0 48px;
|
||||
padding: 16px 16px 48px;
|
||||
}
|
||||
.openerp .oe_form div.oe_form_configuration p, .openerp .oe_form div.oe_form_configuration ul, .openerp .oe_form div.oe_form_configuration ol {
|
||||
color: #aaaaaa;
|
||||
|
@ -2519,6 +2519,9 @@
|
|||
.openerp .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page, .openerp .oe_form_field_many2many > .oe_view_manager .oe_list_pager_single_page {
|
||||
display: none !important;
|
||||
}
|
||||
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_view_list, .openerp .oe_form_field_many2many > .oe_view_manager .oe_view_manager_view_list {
|
||||
min-height: 132px;
|
||||
}
|
||||
.openerp .oe_form_field_one2many .oe_form_field_one2many_list_row_add, .openerp .oe_form_field_many2many .oe_form_field_one2many_list_row_add {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -2562,13 +2565,11 @@
|
|||
background-color: #eeeeee;
|
||||
}
|
||||
.openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {
|
||||
padding: 4px 6px 3px 6px;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable td.oe_list_record_delete {
|
||||
position: absolute;
|
||||
padding: 4px 6px 3px;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) {
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * {
|
||||
visibility: hidden;
|
||||
|
@ -2645,6 +2646,9 @@
|
|||
margin: 0 !important;
|
||||
padding: 0;
|
||||
}
|
||||
.openerp .oe_list .oe_form .oe_form_field_boolean {
|
||||
padding: 1px 6px 3px;
|
||||
}
|
||||
.openerp .oe_list .oe_list_content .oe_group_header {
|
||||
background-color: #fcfcfc;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
|
||||
|
@ -2776,6 +2780,9 @@
|
|||
content: "}";
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.openerp .oe_list_content .oe_list_field_progressbar progress {
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .tree_header {
|
||||
background-color: #f0f0f0;
|
||||
border-bottom: 1px solid #cacaca;
|
||||
|
@ -2875,6 +2882,78 @@
|
|||
color: #333333;
|
||||
}
|
||||
|
||||
.openerp .oe_fileupload {
|
||||
display: inline-block;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add {
|
||||
float: left;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
left: 2px;
|
||||
top: 7px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add button {
|
||||
display: inline;
|
||||
height: 24px;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add button.oe_attach {
|
||||
width: 24px;
|
||||
overflow: hidden;
|
||||
width: 24px;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
color: #7c7bad;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add button.oe_attach .oe_e {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
left: -9px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add input.oe_form_binary_file {
|
||||
display: inline-block;
|
||||
margin-left: -5px;
|
||||
height: 28px;
|
||||
width: 52px;
|
||||
margin-top: -26px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_add .oe_attach_label {
|
||||
color: #7c7bad;
|
||||
margin-left: -3px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments {
|
||||
margin-bottom: 4px;
|
||||
margin-right: 0px;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
border: solid 1px rgba(124, 123, 173, 0.14);
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments .oe_attachment {
|
||||
padding: 2px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e {
|
||||
font-size: 23px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(odd) {
|
||||
background: white;
|
||||
}
|
||||
.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(even) {
|
||||
background: #f4f5fa;
|
||||
}
|
||||
|
||||
.kitten-mode-activated {
|
||||
background-image: url(http://placekitten.com/g/1365/769);
|
||||
background-size: cover;
|
||||
|
|
|
@ -10,6 +10,8 @@ $tag-border-selected: #a6a6fe
|
|||
$hover-background: #f0f0fa
|
||||
$link-color: #7C7BAD
|
||||
$sheet-max-width: 860px
|
||||
$sheet-min-width: 650px
|
||||
$sheet-padding: 16px
|
||||
// }}}
|
||||
// Mixins {{{
|
||||
@font-face
|
||||
|
@ -256,6 +258,7 @@ $sheet-max-width: 860px
|
|||
// so remove position:relative
|
||||
.ui-tabs
|
||||
position: static
|
||||
|
||||
// Modal box
|
||||
&.ui-dialog
|
||||
display: none
|
||||
|
@ -269,7 +272,7 @@ $sheet-max-width: 860px
|
|||
@include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
|
||||
@include background-clip()
|
||||
.ui-dialog-content
|
||||
padding: 0px
|
||||
padding: 0
|
||||
.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
|
||||
padding: 16px
|
||||
.ui-dialog-titlebar
|
||||
|
@ -566,7 +569,7 @@ $sheet-max-width: 860px
|
|||
position: relative
|
||||
cursor: pointer
|
||||
.oe_dropdown_toggle
|
||||
color: rgba(0,0,0,0.5)
|
||||
color: rgba(0,0,0,0.3)
|
||||
font-weight: normal
|
||||
.oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
|
||||
display: block
|
||||
|
@ -1634,10 +1637,11 @@ $sheet-max-width: 860px
|
|||
width: 400px
|
||||
padding-bottom: 0
|
||||
div.oe_chatter
|
||||
min-width: 650px
|
||||
max-width: $sheet-max-width
|
||||
box-sizing: border-box
|
||||
min-width: $sheet-min-width + 2* $sheet-padding
|
||||
max-width: $sheet-max-width + 2* $sheet-padding
|
||||
margin: 0 auto
|
||||
padding: 16px 0 48px
|
||||
padding: 16px 16px 48px
|
||||
div.oe_form_configuration
|
||||
p, ul, ol
|
||||
color: #aaa
|
||||
|
@ -1983,6 +1987,9 @@ $sheet-max-width: 860px
|
|||
> .oe_view_manager
|
||||
.oe_list_pager_single_page
|
||||
display: none !important
|
||||
.oe_view_manager_view_list
|
||||
min-height: 132px
|
||||
|
||||
.oe_form_field_one2many_list_row_add
|
||||
font-weight: bold
|
||||
.oe_list_content
|
||||
|
@ -2023,18 +2030,14 @@ $sheet-max-width: 860px
|
|||
background-color: #eee
|
||||
|
||||
$row-height: 27px
|
||||
.oe_list_editable
|
||||
.oe_list_content
|
||||
td.oe_list_field_cell
|
||||
padding: 4px 6px 3px 6px
|
||||
.oe_list.oe_list_editable
|
||||
td.oe_list_record_delete
|
||||
position: absolute
|
||||
.oe_list_editable .oe_list_content td.oe_list_field_cell
|
||||
padding: 4px 6px 3px
|
||||
.oe_list.oe_list_editable.oe_editing
|
||||
.oe_edition .oe_list_field_cell:not(.oe_readonly)
|
||||
*
|
||||
visibility: hidden
|
||||
color: transparent
|
||||
text-shadow: none
|
||||
.oe_m2o_drop_down_button
|
||||
top: 5px
|
||||
.oe_m2o_cm_button
|
||||
|
@ -2101,6 +2104,10 @@ $sheet-max-width: 860px
|
|||
position: absolute
|
||||
margin: 0 !important // dammit
|
||||
padding: 0
|
||||
.oe_form_field_boolean
|
||||
// use padding similar to actual cell to correctly position the
|
||||
// checkbox
|
||||
padding: 1px 6px 3px
|
||||
.oe_list_content .oe_group_header
|
||||
@include vertical-gradient(#fcfcfc, #dedede)
|
||||
|
||||
|
@ -2188,6 +2195,8 @@ $sheet-max-width: 860px
|
|||
.oe_list_handle
|
||||
@include text-to-entypo-icon("}",#E0E0E0,18px)
|
||||
margin-right: 7px
|
||||
.oe_list_field_progressbar progress
|
||||
width: 100%
|
||||
// }}}
|
||||
// Tree view {{{
|
||||
.tree_header
|
||||
|
@ -2273,6 +2282,67 @@ $sheet-max-width: 860px
|
|||
float: right
|
||||
color: #333
|
||||
// }}}
|
||||
|
||||
.openerp
|
||||
.oe_fileupload
|
||||
display: inline-block
|
||||
clear: both
|
||||
width: 100%
|
||||
.oe_add
|
||||
float: left
|
||||
position: relative
|
||||
width: 100%
|
||||
left: +2px
|
||||
top: +7px
|
||||
button
|
||||
display: inline
|
||||
height: 24px
|
||||
font-size: 12px
|
||||
line-height: 12px
|
||||
vertical-align: middle
|
||||
button.oe_attach
|
||||
width: 24px
|
||||
overflow: hidden
|
||||
width: 24px
|
||||
overflow: hidden
|
||||
background: transparent
|
||||
color: #7C7BAD
|
||||
box-shadow: none
|
||||
border: none
|
||||
text-shadow: none
|
||||
.oe_e
|
||||
position: relative
|
||||
top: -1px
|
||||
left: -9px
|
||||
input.oe_form_binary_file
|
||||
display: inline-block
|
||||
margin-left: -5px
|
||||
height: 28px
|
||||
width: 52px
|
||||
margin-top: -26px
|
||||
.oe_attach_label
|
||||
color: #7C7BAD
|
||||
margin-left: -3px
|
||||
.oe_attachments
|
||||
margin-bottom: 4px
|
||||
margin-right: 0px
|
||||
font-size: 12px
|
||||
border-radius: 2px
|
||||
border: solid 1px rgba(124,123,173,0.14)
|
||||
.oe_attachment
|
||||
padding: 2px
|
||||
padding-left: 4px
|
||||
padding-right: 4px
|
||||
.oe_e
|
||||
font-size: 23px
|
||||
margin-top: -5px
|
||||
.oe_e:hover
|
||||
text-decoration: none
|
||||
.oe_attachment:nth-child(odd)
|
||||
background: white
|
||||
.oe_attachment:nth-child(even)
|
||||
background: #F4F5FA
|
||||
|
||||
// Kitten Mode {{{
|
||||
.kitten-mode-activated
|
||||
background-image: url(http://placekitten.com/g/1365/769)
|
||||
|
|
|
@ -81,9 +81,6 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
}
|
||||
}
|
||||
if (options) {
|
||||
if (options.buttons) {
|
||||
this.params_buttons = true;
|
||||
}
|
||||
_.extend(this.dialog_options, options);
|
||||
}
|
||||
this.on("closing", this, this._closing);
|
||||
|
@ -129,6 +126,8 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
if (! this.dialog_inited)
|
||||
this.init_dialog();
|
||||
var o = this.get_options(options);
|
||||
this.add_buttons(o.buttons);
|
||||
delete(o.buttons);
|
||||
this.$buttons.appendTo($("body"));
|
||||
instance.web.dialog(this.$el, o).dialog('open');
|
||||
this.$el.dialog("widget").find(".ui-dialog-buttonpane").remove();
|
||||
|
@ -138,22 +137,30 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
}
|
||||
return this;
|
||||
},
|
||||
add_buttons: function(buttons) {
|
||||
var self = this;
|
||||
_.each(buttons, function(fn, but) {
|
||||
var $but = $(QWeb.render('WidgetButton', { widget : { string: but, node: { attrs: {} }}}));
|
||||
self.$buttons.append($but);
|
||||
$but.on('click', function(ev) {
|
||||
fn.call(self.$el, ev);
|
||||
});
|
||||
});
|
||||
},
|
||||
init_dialog: function(options) {
|
||||
this.renderElement();
|
||||
var o = this.get_options(options);
|
||||
instance.web.dialog(this.$el, o);
|
||||
if (! this.params_buttons) {
|
||||
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
|
||||
this.$el.dialog("widget").append(this.$buttons);
|
||||
} else {
|
||||
this.$buttons = this.$el.dialog("widget").find(".ui-dialog-buttonpane");
|
||||
}
|
||||
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
|
||||
this.$el.dialog("widget").append(this.$buttons);
|
||||
this.dialog_inited = true;
|
||||
var res = this.start();
|
||||
return res;
|
||||
},
|
||||
close: function() {
|
||||
this.$el.dialog('close');
|
||||
if (this.dialog_inited && this.$el.is(":data(dialog)")) {
|
||||
this.$el.dialog('close');
|
||||
}
|
||||
},
|
||||
_closing: function() {
|
||||
if (this.__tmp_dialog_destroying)
|
||||
|
@ -175,7 +182,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
this.close();
|
||||
this.__tmp_dialog_destroying = undefined;
|
||||
}
|
||||
if (! this.isDestroyed()) {
|
||||
if (this.dialog_inited && !this.isDestroyed()) {
|
||||
this.$el.dialog('destroy');
|
||||
}
|
||||
this._super();
|
||||
|
@ -294,7 +301,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
|||
start: function() {
|
||||
var self = this;
|
||||
$('.oe_secondary_menus_container,.oe_user_menu_placeholder').empty();
|
||||
var fetch_db = this.rpc("/web/database/get_list", {}).pipe(
|
||||
var fetch_db = this.rpc("/web/database/get_list", {}).then(
|
||||
function(result) {
|
||||
self.db_list = result.db_list;
|
||||
},
|
||||
|
@ -302,10 +309,10 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
|||
ev.preventDefault();
|
||||
self.db_list = null;
|
||||
});
|
||||
var fetch_langs = this.rpc("/web/session/get_lang_list", {}).then(function(result) {
|
||||
var fetch_langs = this.rpc("/web/session/get_lang_list", {}).done(function(result) {
|
||||
self.lang_list = result.lang_list;
|
||||
});
|
||||
return $.when(fetch_db, fetch_langs).then(self.do_render);
|
||||
return $.when(fetch_db, fetch_langs).done(self.do_render);
|
||||
},
|
||||
do_render: function() {
|
||||
var self = this;
|
||||
|
@ -394,7 +401,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
|||
do_create: function(form) {
|
||||
var self = this;
|
||||
var fields = $(form).serializeArray();
|
||||
self.rpc("/web/database/create", {'fields': fields}).then(function(result) {
|
||||
self.rpc("/web/database/create", {'fields': fields}).done(function(result) {
|
||||
var form_obj = self.to_object(fields);
|
||||
var client_action = {
|
||||
type: 'ir.actions.client',
|
||||
|
@ -420,7 +427,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
|||
if (!db || !confirm("Do you really want to delete the database: " + db + " ?")) {
|
||||
return;
|
||||
}
|
||||
self.rpc("/web/database/drop", {'fields': fields}).then(function(result) {
|
||||
self.rpc("/web/database/drop", {'fields': fields}).done(function(result) {
|
||||
if (result.error) {
|
||||
self.display_error(result);
|
||||
return;
|
||||
|
@ -483,7 +490,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
|
|||
var self = this;
|
||||
self.rpc("/web/database/change_password", {
|
||||
'fields': $(form).serializeArray()
|
||||
}).then(function(result) {
|
||||
}).done(function(result) {
|
||||
if (result.error) {
|
||||
self.display_error(result);
|
||||
return;
|
||||
|
@ -504,13 +511,13 @@ instance.web.Login = instance.web.Widget.extend({
|
|||
template: "Login",
|
||||
remember_credentials: true,
|
||||
|
||||
init: function(parent, params) {
|
||||
init: function(parent, action) {
|
||||
this._super(parent);
|
||||
this.has_local_storage = typeof(localStorage) != 'undefined';
|
||||
this.db_list = null;
|
||||
this.selected_db = null;
|
||||
this.selected_login = null;
|
||||
this.params = params || {};
|
||||
this.params = action.params || {};
|
||||
|
||||
if (this.params.login_successful) {
|
||||
this.on('login_successful', this, this.params.login_successful);
|
||||
|
@ -581,7 +588,7 @@ instance.web.Login = instance.web.Widget.extend({
|
|||
var self = this;
|
||||
self.hide_error();
|
||||
self.$(".oe_login_pane").fadeOut("slow");
|
||||
return this.session.session_authenticate(db, login, password).pipe(function() {
|
||||
return this.session.session_authenticate(db, login, password).then(function() {
|
||||
if (self.has_local_storage) {
|
||||
if(self.remember_credentials) {
|
||||
localStorage.setItem('last_db_login_success', db);
|
||||
|
@ -616,8 +623,9 @@ instance.web.client_actions.add("login", "instance.web.Login");
|
|||
* Client action to reload the whole interface.
|
||||
* If params has an entry 'menu_id', it opens the given menu entry.
|
||||
*/
|
||||
instance.web.Reload = function(parent, params) {
|
||||
var menu_id = (params && params.menu_id) || false;
|
||||
instance.web.Reload = function(parent, action) {
|
||||
var params = action.params || {};
|
||||
var menu_id = params.menu_id || false;
|
||||
var l = window.location;
|
||||
|
||||
var sobj = $.deparam(l.search.substr(1));
|
||||
|
@ -638,7 +646,7 @@ instance.web.client_actions.add("reload", "instance.web.Reload");
|
|||
* Client action to go back in breadcrumb history.
|
||||
* If can't go back in history stack, will go back to home.
|
||||
*/
|
||||
instance.web.HistoryBack = function(parent, params) {
|
||||
instance.web.HistoryBack = function(parent) {
|
||||
if (!parent.history_back()) {
|
||||
window.location = '/' + (window.location.search || '');
|
||||
}
|
||||
|
@ -649,7 +657,7 @@ instance.web.client_actions.add("history_back", "instance.web.HistoryBack");
|
|||
* Client action to go back home.
|
||||
*/
|
||||
instance.web.Home = instance.web.Widget.extend({
|
||||
init: function(parent, params) {
|
||||
init: function(parent) {
|
||||
window.location = '/' + (window.location.search || '');
|
||||
}
|
||||
});
|
||||
|
@ -663,7 +671,7 @@ instance.web.ChangePassword = instance.web.Widget.extend({
|
|||
submitHandler: function (form) {
|
||||
self.rpc("/web/session/change_password",{
|
||||
'fields': $(form).serializeArray()
|
||||
}).then(function(result) {
|
||||
}).done(function(result) {
|
||||
if (result.error) {
|
||||
self.display_error(result);
|
||||
return;
|
||||
|
@ -702,7 +710,7 @@ instance.web.Menu = instance.web.Widget.extend({
|
|||
},
|
||||
do_reload: function() {
|
||||
var self = this;
|
||||
return this.rpc("/web/menu/load", {}).then(function(r) {
|
||||
return this.rpc("/web/menu/load", {}).done(function(r) {
|
||||
self.menu_loaded(r);
|
||||
});
|
||||
},
|
||||
|
@ -872,7 +880,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
|
|||
if (!self.session.uid)
|
||||
return;
|
||||
var func = new instance.web.Model("res.users").get_func("read");
|
||||
return func(self.session.uid, ["name", "company_id"]).pipe(function(res) {
|
||||
return func(self.session.uid, ["name", "company_id"]).then(function(res) {
|
||||
var topbar_name = res.name;
|
||||
if(instance.session.debug)
|
||||
topbar_name = _.str.sprintf("%s (%s)", topbar_name, instance.session.db);
|
||||
|
@ -883,7 +891,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
|
|||
$avatar.attr('src', avatar_src);
|
||||
});
|
||||
};
|
||||
this.update_promise = this.update_promise.pipe(fct, fct);
|
||||
this.update_promise = this.update_promise.then(fct, fct);
|
||||
},
|
||||
on_menu_logout: function() {
|
||||
this.trigger('user_logout');
|
||||
|
@ -899,7 +907,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
|
|||
},
|
||||
on_menu_about: function() {
|
||||
var self = this;
|
||||
self.rpc("/web/webclient/version_info", {}).then(function(res) {
|
||||
self.rpc("/web/webclient/version_info", {}).done(function(res) {
|
||||
var $help = $(QWeb.render("UserMenu.about", {version_info: res}));
|
||||
$help.find('a.oe_activate_debug_mode').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
@ -919,7 +927,7 @@ instance.web.Client = instance.web.Widget.extend({
|
|||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
return instance.session.session_bind(this.origin).pipe(function() {
|
||||
return instance.session.session_bind(this.origin).then(function() {
|
||||
var $e = $(QWeb.render(self._template, {}));
|
||||
self.replaceElement($e);
|
||||
self.bind_events();
|
||||
|
@ -986,7 +994,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
return $.when(this._super()).pipe(function() {
|
||||
return $.when(this._super()).then(function() {
|
||||
self.$el.on('click', '.oe_logo', function() {
|
||||
self.action_manager.do_action('home');
|
||||
});
|
||||
|
@ -1055,8 +1063,8 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
},
|
||||
do_reload: function() {
|
||||
var self = this;
|
||||
return this.session.session_reload().pipe(function () {
|
||||
instance.session.load_modules(true).pipe(
|
||||
return this.session.session_reload().then(function () {
|
||||
instance.session.load_modules(true).then(
|
||||
self.menu.proxy('do_reload')); });
|
||||
|
||||
},
|
||||
|
@ -1071,7 +1079,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
on_logout: function() {
|
||||
var self = this;
|
||||
if (!this.has_uncommitted_changes()) {
|
||||
this.session.session_logout().then(function () {
|
||||
this.session.session_logout().done(function () {
|
||||
$(window).unbind('hashchange', self.on_hashchange);
|
||||
self.do_push_state({});
|
||||
window.location.reload();
|
||||
|
@ -1084,7 +1092,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
|
||||
var state = $.bbq.getState(true);
|
||||
if (_.isEmpty(state) || state.action == "login") {
|
||||
self.menu.has_been_loaded.then(function() {
|
||||
self.menu.has_been_loaded.done(function() {
|
||||
var first_menu_id = self.menu.$el.find("a:first").data("menu");
|
||||
if(first_menu_id) {
|
||||
self.menu.menu_click(first_menu_id);
|
||||
|
@ -1099,8 +1107,8 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
var state = event.getState(true);
|
||||
if (!_.isEqual(this._current_state, state)) {
|
||||
if(state.action_id === undefined && state.menu_id) {
|
||||
self.menu.has_been_loaded.then(function() {
|
||||
self.menu.do_reload().then(function() {
|
||||
self.menu.has_been_loaded.done(function() {
|
||||
self.menu.do_reload().done(function() {
|
||||
self.menu.menu_click(state.menu_id)
|
||||
});
|
||||
});
|
||||
|
@ -1122,7 +1130,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
on_menu_action: function(options) {
|
||||
var self = this;
|
||||
return this.rpc("/web/action/load", { action_id: options.action_id })
|
||||
.pipe(function (result) {
|
||||
.then(function (result) {
|
||||
var action = result;
|
||||
if (options.needaction) {
|
||||
action.context.search_default_message_unread = true;
|
||||
|
@ -1168,9 +1176,9 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
|
|||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
return $.when(this._super()).pipe(function() {
|
||||
return instance.session.session_authenticate(self.dbname, self.login, self.key, true).pipe(function() {
|
||||
return self.rpc("/web/action/load", { action_id: self.action_id }).then(function(result) {
|
||||
return $.when(this._super()).then(function() {
|
||||
return instance.session.session_authenticate(self.dbname, self.login, self.key, true).then(function() {
|
||||
return self.rpc("/web/action/load", { action_id: self.action_id }).done(function(result) {
|
||||
var action = result;
|
||||
action.flags = _.extend({
|
||||
//views_switcher : false,
|
||||
|
|
|
@ -809,12 +809,12 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, {
|
|||
return false;
|
||||
},
|
||||
rpc: function(url, data, success, error) {
|
||||
var def = $.Deferred().then(success, error);
|
||||
var def = $.Deferred().done(success).fail(error);
|
||||
var self = this;
|
||||
instance.session.rpc(url, data).then(function() {
|
||||
instance.session.rpc(url, data).done(function() {
|
||||
if (!self.isDestroyed())
|
||||
def.resolve.apply(def, arguments);
|
||||
}, function() {
|
||||
}).fail(function() {
|
||||
if (!self.isDestroyed())
|
||||
def.reject.apply(def, arguments);
|
||||
});
|
||||
|
@ -1287,7 +1287,7 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
|
|||
};
|
||||
var deferred = $.Deferred();
|
||||
this.trigger('request', url, payload);
|
||||
var request = this.rpc_function(url, payload).then(
|
||||
var request = this.rpc_function(url, payload).done(
|
||||
function (response, textStatus, jqXHR) {
|
||||
self.trigger('response', response);
|
||||
if (!response.error) {
|
||||
|
@ -1300,7 +1300,8 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
|
|||
} else {
|
||||
deferred.reject(response.error, $.Event());
|
||||
}
|
||||
},
|
||||
}
|
||||
).fail(
|
||||
function(jqXHR, textStatus, errorThrown) {
|
||||
self.trigger('response_failed', jqXHR);
|
||||
var error = {
|
||||
|
@ -1387,10 +1388,11 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
|
|||
$iframe.unbind('load').bind('load', function() {
|
||||
$.ajax(ajax).always(function() {
|
||||
cleanUp();
|
||||
}).then(
|
||||
function() { deferred.resolve.apply(deferred, arguments); },
|
||||
function() { deferred.reject.apply(deferred, arguments); }
|
||||
);
|
||||
}).done(function() {
|
||||
deferred.resolve.apply(deferred, arguments);
|
||||
}).fail(function() {
|
||||
deferred.reject.apply(deferred, arguments);
|
||||
});
|
||||
});
|
||||
// now that the iframe can receive data, we fill and submit the form
|
||||
$form.submit();
|
||||
|
|
|
@ -51,15 +51,15 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
var self = this;
|
||||
// TODO: session store in cookie should be optional
|
||||
this.session_id = this.get_cookie('session_id');
|
||||
return this.session_reload().pipe(function(result) {
|
||||
return this.session_reload().then(function(result) {
|
||||
var modules = instance._modules.join(',');
|
||||
var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).pipe(self.do_load_qweb);
|
||||
var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).then(self.do_load_qweb);
|
||||
if(self.session_is_valid()) {
|
||||
return deferred.pipe(function() { return self.load_modules(); });
|
||||
return deferred.then(function() { return self.load_modules(); });
|
||||
}
|
||||
return $.when(
|
||||
deferred,
|
||||
self.rpc('/web/webclient/bootstrap_translations', {mods: instance._modules}).pipe(function(trans) {
|
||||
self.rpc('/web/webclient/bootstrap_translations', {mods: instance._modules}).then(function(trans) {
|
||||
instance.web._t.database.set_bundle(trans);
|
||||
})
|
||||
);
|
||||
|
@ -73,7 +73,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
*/
|
||||
session_reload: function () {
|
||||
var self = this;
|
||||
return this.rpc("/web/session/get_session_info", {}).then(function(result) {
|
||||
return this.rpc("/web/session/get_session_info", {}).done(function(result) {
|
||||
// If immediately follows a login (triggered by trying to restore
|
||||
// an invalid session or no session at all), refresh session data
|
||||
// (should not change, but just in case...)
|
||||
|
@ -96,7 +96,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
var self = this;
|
||||
var base_location = document.location.protocol + '//' + document.location.host;
|
||||
var params = { db: db, login: login, password: password, base_location: base_location };
|
||||
return this.rpc("/web/session/authenticate", params).pipe(function(result) {
|
||||
return this.rpc("/web/session/authenticate", params).then(function(result) {
|
||||
if (!result.uid) {
|
||||
return $.Deferred().reject();
|
||||
}
|
||||
|
@ -154,30 +154,30 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
*/
|
||||
load_modules: function() {
|
||||
var self = this;
|
||||
return this.rpc('/web/session/modules', {}).pipe(function(result) {
|
||||
return this.rpc('/web/session/modules', {}).then(function(result) {
|
||||
var lang = self.user_context.lang,
|
||||
all_modules = _.uniq(self.module_list.concat(result));
|
||||
var params = { mods: all_modules, lang: lang};
|
||||
var to_load = _.difference(result, self.module_list).join(',');
|
||||
self.module_list = all_modules;
|
||||
|
||||
var loaded = self.rpc('/web/webclient/translations', params).then(function(trans) {
|
||||
var loaded = self.rpc('/web/webclient/translations', params).done(function(trans) {
|
||||
instance.web._t.database.set_bundle(trans);
|
||||
});
|
||||
var file_list = ["/web/static/lib/datejs/globalization/" + lang.replace("_", "-") + ".js"];
|
||||
if(to_load.length) {
|
||||
loaded = $.when(
|
||||
loaded,
|
||||
self.rpc('/web/webclient/csslist', {mods: to_load}).then(self.do_load_css),
|
||||
self.rpc('/web/webclient/qweblist', {mods: to_load}).pipe(self.do_load_qweb),
|
||||
self.rpc('/web/webclient/jslist', {mods: to_load}).then(function(files) {
|
||||
self.rpc('/web/webclient/csslist', {mods: to_load}).done(self.do_load_css),
|
||||
self.rpc('/web/webclient/qweblist', {mods: to_load}).then(self.do_load_qweb),
|
||||
self.rpc('/web/webclient/jslist', {mods: to_load}).done(function(files) {
|
||||
file_list = file_list.concat(files);
|
||||
})
|
||||
);
|
||||
}
|
||||
return loaded.pipe(function () {
|
||||
return loaded.then(function () {
|
||||
return self.do_load_js(file_list);
|
||||
}).then(function() {
|
||||
}).done(function() {
|
||||
self.on_modules_loaded();
|
||||
self.trigger('module_loaded');
|
||||
if (!Date.CultureInfo.pmDesignator) {
|
||||
|
@ -212,7 +212,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
if ( (tag.readyState && tag.readyState != "loaded" && tag.readyState != "complete") || tag.onload_done )
|
||||
return;
|
||||
tag.onload_done = true;
|
||||
self.do_load_js(files).then(function () {
|
||||
self.do_load_js(files).done(function () {
|
||||
d.resolve();
|
||||
});
|
||||
};
|
||||
|
@ -227,7 +227,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
|||
var self = this;
|
||||
_.each(files, function(file) {
|
||||
self.qweb_mutex.exec(function() {
|
||||
return self.rpc('/web/proxy/load', {path: file}).pipe(function(xml) {
|
||||
return self.rpc('/web/proxy/load', {path: file}).then(function(xml) {
|
||||
if (!xml) { return; }
|
||||
instance.web.qweb.add_template(_.str.trim(xml));
|
||||
});
|
||||
|
@ -462,7 +462,7 @@ $.Mutex = (function() {
|
|||
Mutex.prototype.exec = function(action) {
|
||||
var current = this.def;
|
||||
var next = this.def = $.Deferred();
|
||||
return current.pipe(function() {
|
||||
return current.then(function() {
|
||||
return $.when(action()).always(function() {
|
||||
next.resolve();
|
||||
});
|
||||
|
@ -474,7 +474,7 @@ $.Mutex = (function() {
|
|||
$.async_when = function() {
|
||||
var async = false;
|
||||
var def = $.Deferred();
|
||||
$.when.apply($, arguments).then(function() {
|
||||
$.when.apply($, arguments).done(function() {
|
||||
var args = arguments;
|
||||
var action = function() {
|
||||
def.resolve.apply(def, args);
|
||||
|
@ -483,7 +483,7 @@ $.async_when = function() {
|
|||
action();
|
||||
else
|
||||
setTimeout(action, 0);
|
||||
}, function() {
|
||||
}).fail(function() {
|
||||
var args = arguments;
|
||||
var action = function() {
|
||||
def.reject.apply(def, args);
|
||||
|
@ -530,7 +530,8 @@ instance.web.qweb.default_dict['__debug__'] = instance.session.debug; // Which o
|
|||
instance.web.qweb.debug = instance.session.debug;
|
||||
instance.web.qweb.default_dict = {
|
||||
'_' : _,
|
||||
'_t' : instance.web._t
|
||||
'_t' : instance.web._t,
|
||||
'JSON': JSON,
|
||||
};
|
||||
instance.web.qweb.preprocess_node = function() {
|
||||
// Note that 'this' is the Qweb Node
|
||||
|
|
|
@ -66,7 +66,7 @@ instance.web.Query = instance.web.Class.extend({
|
|||
offset: this._offset,
|
||||
limit: this._limit,
|
||||
sort: instance.web.serialize_sort(this._order_by)
|
||||
}).pipe(function (results) {
|
||||
}).then(function (results) {
|
||||
self._count = results.length;
|
||||
return results.records;
|
||||
}, null);
|
||||
|
@ -78,7 +78,7 @@ instance.web.Query = instance.web.Class.extend({
|
|||
*/
|
||||
first: function () {
|
||||
var self = this;
|
||||
return this.clone({limit: 1})._execute().pipe(function (records) {
|
||||
return this.clone({limit: 1})._execute().then(function (records) {
|
||||
delete self._count;
|
||||
if (records.length) { return records[0]; }
|
||||
return null;
|
||||
|
@ -132,7 +132,7 @@ instance.web.Query = instance.web.Class.extend({
|
|||
offset: this._offset,
|
||||
limit: this._limit,
|
||||
orderby: instance.web.serialize_sort(this._order_by) || false
|
||||
}).pipe(function (results) {
|
||||
}).then(function (results) {
|
||||
return _(results).map(function (result) {
|
||||
// FIX: querygroup initialization
|
||||
result.__context = result.__context || {};
|
||||
|
@ -443,7 +443,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
return this._model.query(fields)
|
||||
.limit(options.limit || false)
|
||||
.offset(options.offset || 0)
|
||||
.all().then(function (records) {
|
||||
.all().done(function (records) {
|
||||
self.ids = _(records).pluck('id');
|
||||
});
|
||||
},
|
||||
|
@ -456,7 +456,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
*/
|
||||
read_index: function (fields, options) {
|
||||
options = options || {};
|
||||
return this.read_ids([this.ids[this.index]], fields, options).pipe(function (records) {
|
||||
return this.read_ids([this.ids[this.index]], fields, options).then(function (records) {
|
||||
if (_.isEmpty(records)) { return $.Deferred().reject().promise(); }
|
||||
return records[0];
|
||||
});
|
||||
|
@ -471,7 +471,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
default_get: function(fields, options) {
|
||||
options = options || {};
|
||||
return this._model.call('default_get',
|
||||
[fields], {context: this._model.context(options.context)});
|
||||
[fields], {context: this.get_context(options.context)});
|
||||
},
|
||||
/**
|
||||
* Creates a new record in db
|
||||
|
@ -480,7 +480,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
* @returns {$.Deferred}
|
||||
*/
|
||||
create: function(data) {
|
||||
return this._model.call('create', [data], {context: this._model.context()});
|
||||
return this._model.call('create', [data], {context: this.get_context()});
|
||||
},
|
||||
/**
|
||||
* Saves the provided data in an existing db record
|
||||
|
@ -493,7 +493,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
*/
|
||||
write: function (id, data, options) {
|
||||
options = options || {};
|
||||
return this._model.call('write', [[id], data], {context: this._model.context(options.context)}).then(this.trigger('dataset_changed', id, data, options));
|
||||
return this._model.call('write', [[id], data], {context: this.get_context(options.context)}).done(this.trigger('dataset_changed', id, data, options));
|
||||
},
|
||||
/**
|
||||
* Deletes an existing record from the database
|
||||
|
@ -501,7 +501,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
* @param {Number|String} ids identifier of the record to delete
|
||||
*/
|
||||
unlink: function(ids) {
|
||||
return this._model.call('unlink', [ids], {context: this._model.context()}).then(this.trigger('dataset_changed', ids));
|
||||
return this._model.call('unlink', [ids], {context: this.get_context()}).done(this.trigger('dataset_changed', ids));
|
||||
},
|
||||
/**
|
||||
* Calls an arbitrary RPC method
|
||||
|
@ -532,7 +532,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
* @returns {$.Deferred}
|
||||
*/
|
||||
name_get: function(ids) {
|
||||
return this._model.call('name_get', [ids], {context: this._model.context()});
|
||||
return this._model.call('name_get', [ids], {context: this.get_context()});
|
||||
},
|
||||
/**
|
||||
*
|
||||
|
@ -556,7 +556,7 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
* @param name
|
||||
*/
|
||||
name_create: function(name) {
|
||||
return this._model.call('name_create', [name], {context: this._model.context()});
|
||||
return this._model.call('name_create', [name], {context: this.get_context()});
|
||||
},
|
||||
exec_workflow: function (id, signal) {
|
||||
return this._model.exec_workflow(id, signal);
|
||||
|
@ -606,8 +606,8 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
|
|||
return instance.session.rpc('/web/dataset/resequence', {
|
||||
model: this.model,
|
||||
ids: ids,
|
||||
context: this._model.context(options.context),
|
||||
}).pipe(function (results) {
|
||||
context: this.get_context(options.context),
|
||||
}).then(function (results) {
|
||||
return results;
|
||||
});
|
||||
},
|
||||
|
@ -682,9 +682,9 @@ instance.web.DataSetSearch = instance.web.DataSet.extend({
|
|||
.limit(options.limit || false);
|
||||
q = q.order_by.apply(q, this._sort);
|
||||
|
||||
return q.all().then(function (records) {
|
||||
return q.all().done(function (records) {
|
||||
// FIXME: not sure about that one, *could* have discarded count
|
||||
q.count().then(function (count) { self._length = count; });
|
||||
q.count().done(function (count) { self._length = count; });
|
||||
self.ids = _(records).pluck('id');
|
||||
});
|
||||
},
|
||||
|
@ -693,7 +693,7 @@ instance.web.DataSetSearch = instance.web.DataSet.extend({
|
|||
},
|
||||
unlink: function(ids, callback, error_callback) {
|
||||
var self = this;
|
||||
return this._super(ids).then(function(result) {
|
||||
return this._super(ids).done(function(result) {
|
||||
self.ids = _(self.ids).difference(ids);
|
||||
if (self._length) {
|
||||
self._length -= 1;
|
||||
|
@ -722,7 +722,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
|
|||
this.last_default_get = {};
|
||||
},
|
||||
default_get: function(fields, options) {
|
||||
return this._super(fields, options).then(this.on_default_get);
|
||||
return this._super(fields, options).done(this.on_default_get);
|
||||
},
|
||||
on_default_get: function(res) {
|
||||
this.last_default_get = res;
|
||||
|
@ -774,7 +774,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
|
|||
this.cache = _.reject(this.cache, function(x) { return _.include(ids, x.id);});
|
||||
this.set_ids(_.without.apply(_, [this.ids].concat(ids)));
|
||||
this.trigger("dataset_changed", ids, callback, error_callback);
|
||||
return $.async_when({result: true}).then(callback);
|
||||
return $.async_when({result: true}).done(callback);
|
||||
},
|
||||
reset_ids: function(ids) {
|
||||
this.set_ids(ids);
|
||||
|
@ -836,7 +836,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
|
|||
completion.resolve(records);
|
||||
};
|
||||
if(to_get.length > 0) {
|
||||
var rpc_promise = this._super(to_get, fields, options).then(function(records) {
|
||||
var rpc_promise = this._super(to_get, fields, options).done(function(records) {
|
||||
_.each(records, function(record, index) {
|
||||
var id = to_get[index];
|
||||
var cached = _.detect(self.cache, function(x) {return x.id === id;});
|
||||
|
@ -991,14 +991,14 @@ instance.web.DropMisordered = instance.web.Class.extend({
|
|||
var res = $.Deferred();
|
||||
|
||||
var self = this, seq = this.lsn++;
|
||||
deferred.then(function () {
|
||||
deferred.done(function () {
|
||||
if (seq > self.rsn) {
|
||||
self.rsn = seq;
|
||||
res.resolve.apply(res, arguments);
|
||||
} else if (self.failMisordered) {
|
||||
res.reject();
|
||||
}
|
||||
}, function () {
|
||||
}).fail(function () {
|
||||
res.reject.apply(res, arguments);
|
||||
});
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
|||
self.rpc("/web/export/get_fields", {
|
||||
model: self.dataset.model,
|
||||
import_compat: Boolean(import_comp)
|
||||
}).then(function (records) {
|
||||
}).done(function (records) {
|
||||
got_fields.resolve();
|
||||
self.on_show_data(records);
|
||||
});
|
||||
|
@ -59,7 +59,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
|||
|
||||
return $.when(
|
||||
got_fields,
|
||||
this.rpc('/web/export/formats', {}).then(this.do_setup_export_formats),
|
||||
this.rpc('/web/export/formats', {}).done(this.do_setup_export_formats),
|
||||
this.show_exports_list());
|
||||
},
|
||||
do_setup_export_formats: function (formats) {
|
||||
|
@ -84,7 +84,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
|||
}
|
||||
return this.exports.read_slice(['name'], {
|
||||
domain: [['resource', '=', this.dataset.model]]
|
||||
}).then(function (export_list) {
|
||||
}).done(function (export_list) {
|
||||
if (!export_list.length) {
|
||||
return;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
|||
self.$el.find('#fields_list option').remove();
|
||||
var export_id = self.$el.find('#saved_export_list option:selected').val();
|
||||
if (export_id) {
|
||||
self.rpc('/web/export/namelist', {'model': self.dataset.model, export_id: parseInt(export_id)}).then(self.do_load_export_field);
|
||||
self.rpc('/web/export/namelist', {'model': self.dataset.model, export_id: parseInt(export_id)}).done(self.do_load_export_field);
|
||||
}
|
||||
});
|
||||
self.$el.find('#delete_export_list').click(function() {
|
||||
|
@ -183,7 +183,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
|
|||
import_compat: Boolean(import_comp),
|
||||
parent_field_type : record['field_type'],
|
||||
exclude: exclude_fields
|
||||
}).then(function(results) {
|
||||
}).done(function(results) {
|
||||
record.loaded = true;
|
||||
self.on_show_data(results, record.id);
|
||||
});
|
||||
|
|
|
@ -124,19 +124,10 @@ function assert(condition, message) {
|
|||
}
|
||||
my.InputView = instance.web.Widget.extend({
|
||||
template: 'SearchView.InputView',
|
||||
start: function () {
|
||||
var p = this._super.apply(this, arguments);
|
||||
this.$el.on('focus', this.proxy('onFocus'));
|
||||
this.$el.on('blur', this.proxy('onBlur'));
|
||||
this.$el.on('keydown', this.proxy('onKeydown'));
|
||||
return p;
|
||||
},
|
||||
onFocus: function () {
|
||||
this.trigger('focused', this);
|
||||
},
|
||||
onBlur: function () {
|
||||
this.$el.text('');
|
||||
this.trigger('blurred', this);
|
||||
events: {
|
||||
focus: function () { this.trigger('focused', this); },
|
||||
blur: function () { this.$el.text(''); this.trigger('blurred', this); },
|
||||
keydown: 'onKeydown'
|
||||
},
|
||||
getSelection: function () {
|
||||
// get Text node
|
||||
|
@ -212,6 +203,27 @@ my.InputView = instance.web.Widget.extend({
|
|||
});
|
||||
my.FacetView = instance.web.Widget.extend({
|
||||
template: 'SearchView.FacetView',
|
||||
events: {
|
||||
'focus': function () { this.trigger('focused', this); },
|
||||
'blur': function () { this.trigger('blurred', this); },
|
||||
'click': function (e) {
|
||||
if ($(e.target).is('.oe_facet_remove')) {
|
||||
this.model.destroy();
|
||||
return false;
|
||||
}
|
||||
this.$el.focus();
|
||||
e.stopPropagation();
|
||||
},
|
||||
'keydown': function (e) {
|
||||
var keys = $.ui.keyCode;
|
||||
switch (e.which) {
|
||||
case keys.BACKSPACE:
|
||||
case keys.DELETE:
|
||||
this.model.destroy();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
init: function (parent, model) {
|
||||
this._super(parent);
|
||||
this.model = model;
|
||||
|
@ -223,33 +235,11 @@ my.FacetView = instance.web.Widget.extend({
|
|||
},
|
||||
start: function () {
|
||||
var self = this;
|
||||
this.$el.on('focus', function () { self.trigger('focused', self); });
|
||||
this.$el.on('blur', function () { self.trigger('blurred', self); });
|
||||
this.$el.on('click', function (e) {
|
||||
if ($(e.target).is('.oe_facet_remove')) {
|
||||
self.model.destroy();
|
||||
return false;
|
||||
}
|
||||
self.$el.focus();
|
||||
e.stopPropagation();
|
||||
});
|
||||
this.$el.on('keydown', function (e) {
|
||||
var keys = $.ui.keyCode;
|
||||
switch (e.which) {
|
||||
case keys.BACKSPACE:
|
||||
case keys.DELETE:
|
||||
self.model.destroy();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
var $e = self.$el.find('> span:last-child');
|
||||
var q = $.when(this._super());
|
||||
return q.pipe(function () {
|
||||
var values = self.model.values.map(function (value) {
|
||||
var $e = this.$('> span:last-child');
|
||||
return $.when(this._super()).then(function () {
|
||||
return $.when.apply(null, self.model.values.map(function (value) {
|
||||
return new my.FacetValueView(self, value).appendTo($e);
|
||||
});
|
||||
|
||||
return $.when.apply(null, values);
|
||||
}));
|
||||
});
|
||||
},
|
||||
model_changed: function () {
|
||||
|
@ -274,6 +264,39 @@ my.FacetValueView = instance.web.Widget.extend({
|
|||
|
||||
instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.SearchView# */{
|
||||
template: "SearchView",
|
||||
events: {
|
||||
// focus last input if view itself is clicked
|
||||
'click': function (e) {
|
||||
if (e.target === this.$('.oe_searchview_facets')[0]) {
|
||||
this.$('.oe_searchview_input:last').focus();
|
||||
}
|
||||
},
|
||||
// search button
|
||||
'click button.oe_searchview_search': function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
this.do_search();
|
||||
},
|
||||
'click .oe_searchview_clear': function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
this.query.reset();
|
||||
},
|
||||
'click .oe_searchview_unfold_drawer': function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
this.$el.toggleClass('oe_searchview_open_drawer');
|
||||
},
|
||||
'keydown .oe_searchview_input, .oe_searchview_facet': function (e) {
|
||||
switch(e.which) {
|
||||
case $.ui.keyCode.LEFT:
|
||||
this.focusPreceding(this);
|
||||
e.preventDefault();
|
||||
break;
|
||||
case $.ui.keyCode.RIGHT:
|
||||
this.focusFollowing(this);
|
||||
e.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @constructs instance.web.SearchView
|
||||
* @extends instance.web.Widget
|
||||
|
@ -324,62 +347,18 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
context: this.dataset.get_context() });
|
||||
|
||||
$.when(load_view)
|
||||
.pipe(function(r) {
|
||||
.then(function(r) {
|
||||
self.search_view_loaded(r)
|
||||
}).fail(function () {
|
||||
self.ready.reject.apply(null, arguments);
|
||||
});
|
||||
}
|
||||
|
||||
// Launch a search on clicking the oe_searchview_search button
|
||||
this.$el.on('click', 'button.oe_searchview_search', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
self.do_search();
|
||||
});
|
||||
|
||||
this.$el.on('keydown',
|
||||
'.oe_searchview_input, .oe_searchview_facet', function (e) {
|
||||
switch(e.which) {
|
||||
case $.ui.keyCode.LEFT:
|
||||
self.focusPreceding(this);
|
||||
e.preventDefault();
|
||||
break;
|
||||
case $.ui.keyCode.RIGHT:
|
||||
self.focusFollowing(this);
|
||||
e.preventDefault();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
this.$el.on('click', '.oe_searchview_clear', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
self.query.reset();
|
||||
});
|
||||
this.$el.on('click', '.oe_searchview_unfold_drawer', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
self.$el.toggleClass('oe_searchview_open_drawer');
|
||||
});
|
||||
instance.web.bus.on('click', this, function(ev) {
|
||||
if ($(ev.target).parents('.oe_searchview').length === 0) {
|
||||
self.$el.removeClass('oe_searchview_open_drawer');
|
||||
}
|
||||
});
|
||||
// Focus last input if the view itself is clicked (empty section of
|
||||
// facets element)
|
||||
this.$el.on('click', function (e) {
|
||||
if (e.target === self.$el.find('.oe_searchview_facets')[0]) {
|
||||
self.$el.find('.oe_searchview_input:last').focus();
|
||||
}
|
||||
});
|
||||
// when the completion list opens/refreshes, automatically select the
|
||||
// first completion item so if the user just hits [RETURN] or [TAB] it
|
||||
// automatically selects it
|
||||
this.$el.on('autocompleteopen', function () {
|
||||
var menu = self.$el.data('autocomplete').menu;
|
||||
menu.activate(
|
||||
$.Event({ type: "mouseenter" }),
|
||||
menu.element.children().first());
|
||||
});
|
||||
|
||||
return $.when(p, this.ready);
|
||||
},
|
||||
|
@ -429,58 +408,46 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
setup_global_completion: function () {
|
||||
var self = this;
|
||||
|
||||
// autocomplete only correctly handles being initialized on the actual
|
||||
// editable element (and only an element with a @value in 1.8 e.g.
|
||||
// input or textarea), cheat by setting val() on $el
|
||||
this.$el.on('keydown', function () {
|
||||
// keydown is triggered *before* the element's value is set, so
|
||||
// delay this. Pray that setTimeout are executed in FIFO (if they
|
||||
// have the same delay) as autocomplete uses the exact same trick.
|
||||
// FIXME: brittle as fuck
|
||||
setTimeout(function () {
|
||||
self.$el.val(self.currentInputValue());
|
||||
}, 0);
|
||||
|
||||
});
|
||||
|
||||
this.$el.autocomplete({
|
||||
var autocomplete = this.$el.autocomplete({
|
||||
source: this.proxy('complete_global_search'),
|
||||
select: this.proxy('select_completion'),
|
||||
focus: function (e) { e.preventDefault(); },
|
||||
html: true,
|
||||
autoFocus: true,
|
||||
minLength: 1,
|
||||
delay: 0
|
||||
}).data('autocomplete')._renderItem = function (ul, item) {
|
||||
// item of completion list
|
||||
var $item = $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.appendTo( ul );
|
||||
}).data('autocomplete');
|
||||
|
||||
if (item.facet !== undefined) {
|
||||
// regular completion item
|
||||
return $item.append(
|
||||
(item.label)
|
||||
? $('<a>').html(item.label)
|
||||
: $('<a>').text(item.value));
|
||||
}
|
||||
return $item.text(item.label)
|
||||
.css({
|
||||
borderTop: '1px solid #cccccc',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
zoom: 1,
|
||||
'float': 'left',
|
||||
clear: 'left',
|
||||
width: '100%'
|
||||
});
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Gets value out of the currently focused "input" (a
|
||||
* div[contenteditable].oe_searchview_input)
|
||||
*/
|
||||
currentInputValue: function () {
|
||||
return this.$el.find('div.oe_searchview_input:focus').text();
|
||||
// MonkeyPatch autocomplete instance
|
||||
_.extend(autocomplete, {
|
||||
_renderItem: function (ul, item) {
|
||||
// item of completion list
|
||||
var $item = $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.appendTo( ul );
|
||||
|
||||
if (item.facet !== undefined) {
|
||||
// regular completion item
|
||||
return $item.append(
|
||||
(item.label)
|
||||
? $('<a>').html(item.label)
|
||||
: $('<a>').text(item.value));
|
||||
}
|
||||
return $item.text(item.label)
|
||||
.css({
|
||||
borderTop: '1px solid #cccccc',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
zoom: 1,
|
||||
'float': 'left',
|
||||
clear: 'left',
|
||||
width: '100%'
|
||||
});
|
||||
},
|
||||
_value: function() {
|
||||
return self.$('div.oe_searchview_input').text();
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Provide auto-completion result for req.term (an array to `resp`)
|
||||
|
@ -492,7 +459,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
complete_global_search: function (req, resp) {
|
||||
$.when.apply(null, _(this.inputs).chain()
|
||||
.invoke('complete', req.term)
|
||||
.value()).then(function () {
|
||||
.value()).done(function () {
|
||||
resp(_(_(arguments).compact()).flatten(true));
|
||||
});
|
||||
},
|
||||
|
@ -510,7 +477,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
|
||||
var input_index = _(this.input_subviews).indexOf(
|
||||
this.subviewForRoot(
|
||||
this.$el.find('div.oe_searchview_input:focus')[0]));
|
||||
this.$('div.oe_searchview_input:focus')[0]));
|
||||
this.query.add(ui.item.facet, {at: input_index / 2});
|
||||
},
|
||||
childFocused: function () {
|
||||
|
@ -539,7 +506,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
// _2: undefined if event=change, otherwise model
|
||||
var self = this;
|
||||
var started = [];
|
||||
var $e = this.$el.find('div.oe_searchview_facets');
|
||||
var $e = this.$('div.oe_searchview_facets');
|
||||
_.invoke(this.input_subviews, 'destroy');
|
||||
this.input_subviews = [];
|
||||
|
||||
|
@ -560,7 +527,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
childView.on('blurred', self, self.proxy('childBlurred'));
|
||||
});
|
||||
|
||||
$.when.apply(null, started).then(function () {
|
||||
$.when.apply(null, started).done(function () {
|
||||
var input_to_focus;
|
||||
// options.at: facet inserted at given index, focus next input
|
||||
// otherwise just focus last input
|
||||
|
@ -664,16 +631,16 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
// build drawer
|
||||
var drawer_started = $.when.apply(
|
||||
null, _(this.select_for_drawer()).invoke(
|
||||
'appendTo', this.$el.find('.oe_searchview_drawer')));
|
||||
'appendTo', this.$('.oe_searchview_drawer')));
|
||||
|
||||
// load defaults
|
||||
var defaults_fetched = $.when.apply(null, _(this.inputs).invoke(
|
||||
'facet_for_defaults', this.defaults)).then(function () {
|
||||
'facet_for_defaults', this.defaults)).done(function () {
|
||||
self.query.reset(_(arguments).compact(), {preventSearch: true});
|
||||
});
|
||||
|
||||
return $.when(drawer_started, defaults_fetched)
|
||||
.then(function () {
|
||||
.done(function () {
|
||||
self.trigger("search_view_loaded", data);
|
||||
self.ready.resolve();
|
||||
});
|
||||
|
@ -736,6 +703,9 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
*
|
||||
* If at least one field failed its validation, triggers
|
||||
* :js:func:`instance.web.SearchView.on_invalid` instead.
|
||||
*
|
||||
* @param [_query]
|
||||
* @param {Object} [options]
|
||||
*/
|
||||
do_search: function (_query, options) {
|
||||
if (options && options.preventSearch) {
|
||||
|
@ -788,6 +758,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
instance.web.search.fields = new instance.web.Registry({
|
||||
'char': 'instance.web.search.CharField',
|
||||
'text': 'instance.web.search.CharField',
|
||||
'html': 'instance.web.search.CharField',
|
||||
'boolean': 'instance.web.search.BooleanField',
|
||||
'integer': 'instance.web.search.IntegerField',
|
||||
'id': 'instance.web.search.IntegerField',
|
||||
|
@ -960,7 +931,7 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in
|
|||
*/
|
||||
search_change: function () {
|
||||
var self = this;
|
||||
var $filters = this.$el.find('> li').removeClass('oe_selected');
|
||||
var $filters = this.$('> li').removeClass('oe_selected');
|
||||
var facet = this.view.query.find(_.bind(this.match_facet, this));
|
||||
if (!facet) { return; }
|
||||
facet.values.each(function (v) {
|
||||
|
@ -1438,7 +1409,7 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
|
|||
name: needle,
|
||||
limit: 8,
|
||||
context: {}
|
||||
}).pipe(function (results) {
|
||||
}).then(function (results) {
|
||||
if (_.isEmpty(results)) { return null; }
|
||||
return [{label: self.attrs.string}].concat(
|
||||
_(results).map(function (result) {
|
||||
|
@ -1461,7 +1432,7 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
|
|||
// to handle this as if it were a single value.
|
||||
value = value[0];
|
||||
}
|
||||
return this.model.call('name_get', [value]).pipe(function (names) {
|
||||
return this.model.call('name_get', [value]).then(function (names) {
|
||||
if (_(names).isEmpty()) { return null; }
|
||||
return facet_from(self, names[0]);
|
||||
})
|
||||
|
@ -1508,10 +1479,10 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
|
|||
// FIXME: local eval of domain and context to get rid of special endpoint
|
||||
return this.rpc('/web/searchview/get_filters', {
|
||||
model: this.view.model
|
||||
}).pipe(this.proxy('set_filters'));
|
||||
}).then(this.proxy('set_filters'));
|
||||
},
|
||||
clear_selection: function () {
|
||||
this.$el.find('li.oe_selected').removeClass('oe_selected');
|
||||
this.$('li.oe_selected').removeClass('oe_selected');
|
||||
},
|
||||
append_filter: function (filter) {
|
||||
var self = this;
|
||||
|
@ -1523,7 +1494,7 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
|
|||
} else {
|
||||
var id = filter.id;
|
||||
$filter = this.filters[key] = $('<li></li>')
|
||||
.appendTo(this.$el.find('.oe_searchview_custom_list'))
|
||||
.appendTo(this.$('.oe_searchview_custom_list'))
|
||||
.addClass(filter.user_id ? 'oe_searchview_custom_private'
|
||||
: 'oe_searchview_custom_public')
|
||||
.text(filter.name);
|
||||
|
@ -1531,7 +1502,7 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
|
|||
$('<a class="oe_searchview_custom_delete">x</a>')
|
||||
.click(function (e) {
|
||||
e.stopPropagation();
|
||||
self.model.call('unlink', [id]).then(function () {
|
||||
self.model.call('unlink', [id]).done(function () {
|
||||
$filter.remove();
|
||||
});
|
||||
})
|
||||
|
@ -1558,15 +1529,15 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
|
|||
},
|
||||
save_current: function () {
|
||||
var self = this;
|
||||
var $name = this.$el.find('input:first');
|
||||
var private_filter = !this.$el.find('input:last').prop('checked');
|
||||
var $name = this.$('input:first');
|
||||
var private_filter = !this.$('input:last').prop('checked');
|
||||
|
||||
var search = this.view.build_search_data();
|
||||
this.rpc('/web/session/eval_domain_and_context', {
|
||||
domains: search.domains,
|
||||
contexts: search.contexts,
|
||||
group_by_seq: search.groupbys || []
|
||||
}).then(function (results) {
|
||||
}).done(function (results) {
|
||||
if (!_.isEmpty(results.group_by)) {
|
||||
results.context.group_by = results.group_by;
|
||||
}
|
||||
|
@ -1578,7 +1549,7 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
|
|||
domain: results.domain
|
||||
};
|
||||
// FIXME: current context?
|
||||
return self.model.call('create_or_replace', [filter]).then(function (id) {
|
||||
return self.model.call('create_or_replace', [filter]).done(function (id) {
|
||||
filter.id = id;
|
||||
self.append_filter(filter);
|
||||
self.$el
|
||||
|
@ -1655,20 +1626,29 @@ instance.web.search.Advanced = instance.web.search.Input.extend({
|
|||
});
|
||||
return $.when(
|
||||
this._super(),
|
||||
this.rpc("/web/searchview/fields_get", {model: this.view.model}).then(function(data) {
|
||||
this.rpc("/web/searchview/fields_get", {model: this.view.model}).done(function(data) {
|
||||
self.fields = _.extend({
|
||||
id: { string: 'ID', type: 'id' }
|
||||
}, data.fields);
|
||||
})).then(function () {
|
||||
})).done(function () {
|
||||
self.append_proposition();
|
||||
});
|
||||
},
|
||||
append_proposition: function () {
|
||||
var self = this;
|
||||
return (new instance.web.search.ExtendedSearchProposition(this, this.fields))
|
||||
.appendTo(this.$el.find('ul'));
|
||||
.appendTo(this.$('ul')).done(function () {
|
||||
self.$('button.oe_apply').prop('disabled', false);
|
||||
});
|
||||
},
|
||||
remove_proposition: function (prop) {
|
||||
// removing last proposition, disable apply button
|
||||
if (this.getChildren().length <= 1) {
|
||||
this.$('button.oe_apply').prop('disabled', true);
|
||||
}
|
||||
prop.destroy();
|
||||
},
|
||||
commit_search: function () {
|
||||
var self = this;
|
||||
// Get domain sections from all propositions
|
||||
var children = this.getChildren();
|
||||
var propositions = _.invoke(children, 'get_proposition');
|
||||
|
@ -1698,6 +1678,13 @@ instance.web.search.Advanced = instance.web.search.Input.extend({
|
|||
|
||||
instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @lends instance.web.search.ExtendedSearchProposition# */{
|
||||
template: 'SearchView.extended_search.proposition',
|
||||
events: {
|
||||
'change .searchview_extended_prop_field': 'changed',
|
||||
'click .searchview_extended_delete_prop': function (e) {
|
||||
e.stopPropagation();
|
||||
this.getParent().remove_proposition(this);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @constructs instance.web.search.ExtendedSearchProposition
|
||||
* @extends instance.web.Widget
|
||||
|
@ -1715,17 +1702,10 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
|
|||
this.value = null;
|
||||
},
|
||||
start: function () {
|
||||
var _this = this;
|
||||
this.$el.find(".searchview_extended_prop_field").change(function() {
|
||||
_this.changed();
|
||||
});
|
||||
this.$el.find('.searchview_extended_delete_prop').click(function () {
|
||||
_this.destroy();
|
||||
});
|
||||
this.changed();
|
||||
return this._super().done(this.proxy('changed'));
|
||||
},
|
||||
changed: function() {
|
||||
var nval = this.$el.find(".searchview_extended_prop_field").val();
|
||||
var nval = this.$(".searchview_extended_prop_field").val();
|
||||
if(this.attrs.selected == null || nval != this.attrs.selected.name) {
|
||||
this.select_field(_.detect(this.fields, function(x) {return x.name == nval;}));
|
||||
}
|
||||
|
@ -1740,7 +1720,7 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
|
|||
if(this.attrs.selected != null) {
|
||||
this.value.destroy();
|
||||
this.value = null;
|
||||
this.$el.find('.searchview_extended_prop_op').html('');
|
||||
this.$('.searchview_extended_prop_op').html('');
|
||||
}
|
||||
this.attrs.selected = field;
|
||||
if(field == null) {
|
||||
|
@ -1756,9 +1736,9 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
|
|||
_.each(this.value.operators, function(operator) {
|
||||
$('<option>', {value: operator.value})
|
||||
.text(String(operator.text))
|
||||
.appendTo(self.$el.find('.searchview_extended_prop_op'));
|
||||
.appendTo(self.$('.searchview_extended_prop_op'));
|
||||
});
|
||||
var $value_loc = this.$el.find('.searchview_extended_prop_value').empty();
|
||||
var $value_loc = this.$('.searchview_extended_prop_value').empty();
|
||||
this.value.appendTo($value_loc);
|
||||
|
||||
},
|
||||
|
@ -1766,7 +1746,7 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
|
|||
if ( this.attrs.selected == null)
|
||||
return null;
|
||||
var field = this.attrs.selected;
|
||||
var op = this.$el.find('.searchview_extended_prop_op')[0];
|
||||
var op = this.$('.searchview_extended_prop_op')[0];
|
||||
var operator = op.options[op.selectedIndex];
|
||||
return {
|
||||
label: _.str.sprintf(_t('%(field)s %(operator)s "%(value)s"'), {
|
||||
|
|
|
@ -32,20 +32,20 @@ openerp.test_support = {
|
|||
window.openerp.web[tested_core](oe);
|
||||
var done = openerp.test_support.setup_session(oe.session);
|
||||
if (nonliterals) {
|
||||
done = done.pipe(function () {
|
||||
done = done.then(function () {
|
||||
return oe.session.rpc('/tests/add_nonliterals', {
|
||||
domains: nonliterals.domains || [],
|
||||
contexts: nonliterals.contexts || []
|
||||
}).then(function (r) {
|
||||
}).done(function (r) {
|
||||
oe.domains = r.domains;
|
||||
oe.contexts = r.contexts;
|
||||
});
|
||||
});
|
||||
}
|
||||
done.always(QUnit.start)
|
||||
.then(function () {
|
||||
.done(function () {
|
||||
conf.openerp = oe;
|
||||
}, function (e) {
|
||||
}).fail(function (e) {
|
||||
QUnit.test(title, function () {
|
||||
console.error(e);
|
||||
QUnit.ok(false, 'Could not obtain a session:' + e.debug);
|
||||
|
|
|
@ -508,7 +508,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
_.pluck(_(this.columns).filter(function (r) {
|
||||
return r.tag === 'field';
|
||||
}), 'name')
|
||||
).then(function (records) {
|
||||
).done(function (records) {
|
||||
_(records[0]).each(function (value, key) {
|
||||
record.set(key, value, {silent: true});
|
||||
});
|
||||
|
@ -553,7 +553,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
this.no_leaf = !!context['group_by_no_leaf'];
|
||||
this.grouped = !!group_by;
|
||||
|
||||
return this.load_view(context).pipe(
|
||||
return this.load_view(context).then(
|
||||
this.proxy('reload_content'));
|
||||
},
|
||||
/**
|
||||
|
@ -566,7 +566,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
return;
|
||||
}
|
||||
var self = this;
|
||||
return $.when(this.dataset.unlink(ids)).then(function () {
|
||||
return $.when(this.dataset.unlink(ids)).done(function () {
|
||||
_(ids).each(function (id) {
|
||||
self.records.remove(self.records.get(id));
|
||||
});
|
||||
|
@ -970,13 +970,13 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
|||
// set) a human-readable version. m2o does not have this issue
|
||||
// because the non-human-readable is just a number, where the
|
||||
// human-readable version is a pair
|
||||
if (value && (ref_match = /([\w\.]+),(\d+)/.exec(value))) {
|
||||
if (value && (ref_match = /^([\w\.]+),(\d+)$/.exec(value))) {
|
||||
// reference values are in the shape "$model,$id" (as a
|
||||
// string), we need to split and name_get this pair in order
|
||||
// to get a correctly displayable value in the field
|
||||
var model = ref_match[1],
|
||||
id = parseInt(ref_match[2], 10);
|
||||
new instance.web.DataSet(this.view, model).name_get([id]).then(function(names) {
|
||||
new instance.web.DataSet(this.view, model).name_get([id]).done(function(names) {
|
||||
if (!names.length) { return; }
|
||||
record.set(column.id, names[0][1]);
|
||||
});
|
||||
|
@ -992,7 +992,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
|||
// and let the various registered events handle refreshing the
|
||||
// row
|
||||
new instance.web.DataSet(this.view, column.relation)
|
||||
.name_get([value]).then(function (names) {
|
||||
.name_get([value]).done(function (names) {
|
||||
if (!names.length) { return; }
|
||||
record.set(column.id, names[0]);
|
||||
});
|
||||
|
@ -1015,7 +1015,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
|||
ids = value;
|
||||
}
|
||||
new instance.web.Model(column.relation)
|
||||
.call('name_get', [ids]).then(function (names) {
|
||||
.call('name_get', [ids]).done(function (names) {
|
||||
record.set(column.id, _(names).pluck(1).join(', '));
|
||||
})
|
||||
}
|
||||
|
@ -1100,7 +1100,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
|||
}, this);
|
||||
if (!this.$current) { return; }
|
||||
this.$current.remove();
|
||||
this.$current = null;
|
||||
},
|
||||
get_records: function () {
|
||||
return this.records.map(function (record) {
|
||||
|
@ -1307,9 +1306,11 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
process_modifiers: false
|
||||
});
|
||||
} catch (e) {
|
||||
group_label = row_data[group_column.id].value;
|
||||
group_label = _.str.escapeHTML(row_data[group_column.id].value);
|
||||
}
|
||||
$group_column.text(_.str.sprintf("%s (%d)",
|
||||
// group_label is html-clean (through format or explicit
|
||||
// escaping if format failed), can inject straight into HTML
|
||||
$group_column.html(_.str.sprintf("%s (%d)",
|
||||
group_label, group.length));
|
||||
|
||||
if (group.length && group.openable) {
|
||||
|
@ -1384,43 +1385,45 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
var fields = _.pluck(_.select(this.columns, function(x) {return x.tag == "field"}), 'name');
|
||||
var options = { offset: page * limit, limit: limit, context: {bin_size: true} };
|
||||
//TODO xmo: investigate why we need to put the setTimeout
|
||||
$.async_when().then(function() {dataset.read_slice(fields, options).then(function (records) {
|
||||
// FIXME: ignominious hacks, parents (aka form view) should not send two ListView#reload_content concurrently
|
||||
if (self.records.length) {
|
||||
self.records.reset(null, {silent: true});
|
||||
}
|
||||
if (!self.datagroup.openable) {
|
||||
view.configure_pager(dataset);
|
||||
} else {
|
||||
if (dataset.size() == records.length) {
|
||||
// only one page
|
||||
self.$row.find('td.oe_list_group_pagination').empty();
|
||||
} else {
|
||||
var pages = Math.ceil(dataset.size() / limit);
|
||||
self.$row
|
||||
.find('.oe_list_pager_state')
|
||||
.text(_.str.sprintf(_t("%(page)d/%(page_count)d"), {
|
||||
page: page + 1,
|
||||
page_count: pages
|
||||
}))
|
||||
.end()
|
||||
.find('button[data-pager-action=previous]')
|
||||
.css('visibility',
|
||||
page === 0 ? 'hidden' : '')
|
||||
.end()
|
||||
.find('button[data-pager-action=next]')
|
||||
.css('visibility',
|
||||
page === pages - 1 ? 'hidden' : '');
|
||||
$.async_when().done(function() {
|
||||
dataset.read_slice(fields, options).done(function (records) {
|
||||
// FIXME: ignominious hacks, parents (aka form view) should not send two ListView#reload_content concurrently
|
||||
if (self.records.length) {
|
||||
self.records.reset(null, {silent: true});
|
||||
}
|
||||
if (!self.datagroup.openable) {
|
||||
view.configure_pager(dataset);
|
||||
} else {
|
||||
if (dataset.size() == records.length) {
|
||||
// only one page
|
||||
self.$row.find('td.oe_list_group_pagination').empty();
|
||||
} else {
|
||||
var pages = Math.ceil(dataset.size() / limit);
|
||||
self.$row
|
||||
.find('.oe_list_pager_state')
|
||||
.text(_.str.sprintf(_t("%(page)d/%(page_count)d"), {
|
||||
page: page + 1,
|
||||
page_count: pages
|
||||
}))
|
||||
.end()
|
||||
.find('button[data-pager-action=previous]')
|
||||
.css('visibility',
|
||||
page === 0 ? 'hidden' : '')
|
||||
.end()
|
||||
.find('button[data-pager-action=next]')
|
||||
.css('visibility',
|
||||
page === pages - 1 ? 'hidden' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.records.add(records, {silent: true});
|
||||
list.render();
|
||||
d.resolve(list);
|
||||
if (_.isEmpty(records)) {
|
||||
view.no_result();
|
||||
}
|
||||
});});
|
||||
self.records.add(records, {silent: true});
|
||||
list.render();
|
||||
d.resolve(list);
|
||||
if (_.isEmpty(records)) {
|
||||
view.no_result();
|
||||
}
|
||||
});
|
||||
});
|
||||
return d.promise();
|
||||
},
|
||||
setup_resequence_rows: function (list, dataset) {
|
||||
|
@ -1476,7 +1479,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
// Accounting > Taxes > Taxes, child tax accounts)
|
||||
// when synchronous (without setTimeout)
|
||||
(function (dataset, id, seq) {
|
||||
$.async_when().then(function () {
|
||||
$.async_when().done(function () {
|
||||
var attrs = {};
|
||||
attrs[seqname] = seq;
|
||||
dataset.write(id, attrs);
|
||||
|
@ -1501,7 +1504,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
self.render_groups(groups));
|
||||
if (post_render) { post_render(); }
|
||||
}, function (dataset) {
|
||||
self.render_dataset(dataset).then(function (list) {
|
||||
self.render_dataset(dataset).done(function (list) {
|
||||
self.children[null] = list;
|
||||
self.elements =
|
||||
[list.$current.replaceAll($el)[0]];
|
||||
|
@ -1561,7 +1564,7 @@ var DataGroup = instance.web.CallbackEnabled.extend({
|
|||
list: function (fields, ifGroups, ifRecords) {
|
||||
var self = this;
|
||||
var query = this.model.query(fields).order_by(this.sort).group_by(this.group_by);
|
||||
$.when(query).then(function (querygroups) {
|
||||
$.when(query).done(function (querygroups) {
|
||||
// leaf node
|
||||
if (!querygroups) {
|
||||
var ds = new instance.web.DataSetSearch(self, self.model.name, self.model.context(), self.model.domain());
|
||||
|
@ -2011,6 +2014,7 @@ instance.web.list.columns = new instance.web.Registry({
|
|||
'field.progressbar': 'instance.web.list.ProgressBar',
|
||||
'field.handle': 'instance.web.list.Handle',
|
||||
'button': 'instance.web.list.Button',
|
||||
'field.many2onebutton': 'instance.web.list.Many2OneButton',
|
||||
});
|
||||
instance.web.list.columns.for_ = function (id, field, node) {
|
||||
var description = _.extend({tag: node.tag}, field, node.attrs);
|
||||
|
@ -2198,5 +2202,11 @@ instance.web.list.Handle = instance.web.list.Column.extend({
|
|||
return '<div class="oe_list_handle">';
|
||||
}
|
||||
});
|
||||
instance.web.list.Many2OneButton = instance.web.list.Column.extend({
|
||||
_format: function (row_data, options) {
|
||||
this.has_value = !!row_data[this.id].value;
|
||||
return QWeb.render('Many2OneButton.cell', {'widget': this});
|
||||
},
|
||||
});
|
||||
};
|
||||
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
|
||||
|
|
|
@ -12,6 +12,8 @@ openerp.web.list_editable = function (instance) {
|
|||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
this.saving_mutex = new $.Mutex();
|
||||
|
||||
this._force_editability = null;
|
||||
this._context_editable = false;
|
||||
this.editor = this.make_editor();
|
||||
|
@ -127,7 +129,7 @@ openerp.web.list_editable = function (instance) {
|
|||
// restartable
|
||||
this.editor = this.make_editor();
|
||||
var editor_ready = this.editor.prependTo(this.$el)
|
||||
.then(this.proxy('setup_events'));
|
||||
.done(this.proxy('setup_events'));
|
||||
|
||||
return $.when(result, editor_ready);
|
||||
} else {
|
||||
|
@ -146,7 +148,7 @@ openerp.web.list_editable = function (instance) {
|
|||
},
|
||||
do_button_action: function (name, id, callback) {
|
||||
var self = this, args = arguments;
|
||||
this.ensure_saved().then(function (done) {
|
||||
this.ensure_saved().done(function (done) {
|
||||
if (!id && done.created) {
|
||||
id = done.record.get('id');
|
||||
}
|
||||
|
@ -162,10 +164,13 @@ openerp.web.list_editable = function (instance) {
|
|||
* @returns {$.Deferred}
|
||||
*/
|
||||
ensure_saved: function () {
|
||||
if (!this.editor.is_editing()) {
|
||||
return $.when();
|
||||
}
|
||||
return this.save_edition();
|
||||
var self = this;
|
||||
return this.saving_mutex.exec(function() {
|
||||
if (!self.editor.is_editing()) {
|
||||
return $.when();
|
||||
}
|
||||
return self.save_edition();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Set up the edition of a record of the list view "inline"
|
||||
|
@ -191,7 +196,7 @@ openerp.web.list_editable = function (instance) {
|
|||
at: this.prepends_on_create() ? 0 : null});
|
||||
}
|
||||
|
||||
return this.ensure_saved().pipe(function () {
|
||||
return this.ensure_saved().then(function () {
|
||||
var $recordRow = self.groups.get_row_for(record);
|
||||
var cells = self.get_cells_for($recordRow);
|
||||
self.fields_for_resize.splice(0, self.fields_for_resize.length);
|
||||
|
@ -208,7 +213,7 @@ openerp.web.list_editable = function (instance) {
|
|||
// FIXME: need better way to get the field back from bubbling (delegated) DOM events somehow
|
||||
field.$el.attr('data-fieldname', field_name);
|
||||
self.fields_for_resize.push({field: field, cell: cell});
|
||||
}, options).pipe(function () {
|
||||
}, options).then(function () {
|
||||
$recordRow.addClass('oe_edition');
|
||||
self.resize_fields();
|
||||
return record.attributes;
|
||||
|
@ -252,9 +257,10 @@ openerp.web.list_editable = function (instance) {
|
|||
var position = $cell.position();
|
||||
|
||||
field.set_dimensions($cell.outerHeight(), $cell.outerWidth());
|
||||
field.$el.css({
|
||||
top: position.top,
|
||||
left: position.left,
|
||||
field.$el.position({
|
||||
my: 'left top',
|
||||
at: 'left top',
|
||||
of: $cell
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -267,7 +273,7 @@ openerp.web.list_editable = function (instance) {
|
|||
form: this.editor.form,
|
||||
cancel: false
|
||||
}, function () {
|
||||
return this.editor.save().pipe(function (attrs) {
|
||||
return this.editor.save().then(function (attrs) {
|
||||
var created = false;
|
||||
var record = self.records.get(attrs.id);
|
||||
if (!record) {
|
||||
|
@ -281,9 +287,9 @@ openerp.web.list_editable = function (instance) {
|
|||
// record which has *just* been saved, so first perform all
|
||||
// onwrites then do a final reload of the record
|
||||
return self.handle_onwrite(record)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
return self.reload_record(record); })
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
return { created: created, record: record }; });
|
||||
});
|
||||
});
|
||||
|
@ -299,7 +305,7 @@ openerp.web.list_editable = function (instance) {
|
|||
form: this.editor.form,
|
||||
cancel: false
|
||||
}, function () {
|
||||
return this.editor.cancel(force).pipe(function (attrs) {
|
||||
return this.editor.cancel(force).then(function (attrs) {
|
||||
if (attrs.id) {
|
||||
var record = self.records.get(attrs.id);
|
||||
if (!record) {
|
||||
|
@ -343,7 +349,7 @@ openerp.web.list_editable = function (instance) {
|
|||
message: _.str.sprintf("Event %s:before cancelled",
|
||||
event_name)});
|
||||
}
|
||||
return $.when(action.call(this)).then(function () {
|
||||
return $.when(action.call(this)).done(function () {
|
||||
self.trigger.apply(self, [event_name + ':after']
|
||||
.concat(_.toArray(arguments)));
|
||||
});
|
||||
|
@ -373,7 +379,7 @@ openerp.web.list_editable = function (instance) {
|
|||
var on_write_callback = self.fields_view.arch.attrs.on_write;
|
||||
if (!on_write_callback) { return $.when(); }
|
||||
return this.dataset.call(on_write_callback, [source_record.get('id')])
|
||||
.pipe(function (ids) {
|
||||
.then(function (ids) {
|
||||
return $.when.apply(
|
||||
null, _(ids).map(
|
||||
_.bind(self.handle_onwrite_record, self, source_record)));
|
||||
|
@ -410,15 +416,15 @@ openerp.web.list_editable = function (instance) {
|
|||
});
|
||||
|
||||
this.editor.$el.on('keyup keydown', function (e) {
|
||||
if (!self.editor.is_editing()) { return; }
|
||||
if (!self.editor.is_editing()) { return true; }
|
||||
var key = _($.ui.keyCode).chain()
|
||||
.map(function (v, k) { return {name: k, code: v}; })
|
||||
.find(function (o) { return o.code === e.which; })
|
||||
.value();
|
||||
if (!key) { return; }
|
||||
if (!key) { return true; }
|
||||
var method = e.type + '_' + key.name;
|
||||
if (!(method in self)) { return; }
|
||||
self[method](e);
|
||||
if (!(method in self)) { return true; }
|
||||
return self[method](e);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -434,7 +440,7 @@ openerp.web.list_editable = function (instance) {
|
|||
_next: function (next_record, options) {
|
||||
next_record = next_record || 'succ';
|
||||
var self = this;
|
||||
return this.save_edition().pipe(function (saveInfo) {
|
||||
return this.save_edition().then(function (saveInfo) {
|
||||
if (saveInfo.created) {
|
||||
return self.start_edition();
|
||||
}
|
||||
|
@ -446,7 +452,10 @@ openerp.web.list_editable = function (instance) {
|
|||
keyup_ENTER: function () {
|
||||
return this._next();
|
||||
},
|
||||
keyup_ESCAPE: function () {
|
||||
keydown_ESCAPE: function (e) {
|
||||
return false;
|
||||
},
|
||||
keyup_ESCAPE: function (e) {
|
||||
return this.cancel_edition();
|
||||
},
|
||||
/**
|
||||
|
@ -638,7 +647,7 @@ openerp.web.list_editable = function (instance) {
|
|||
var _super = this._super();
|
||||
this.form.embedded_view = this._validate_view(
|
||||
this.delegate.edition_view(this));
|
||||
var form_ready = this.form.appendTo(this.$el).then(
|
||||
var form_ready = this.form.appendTo(this.$el).done(
|
||||
self.form.proxy('do_hide'));
|
||||
return $.when(_super, form_ready);
|
||||
},
|
||||
|
@ -719,9 +728,9 @@ openerp.web.list_editable = function (instance) {
|
|||
var loaded = record
|
||||
? form.trigger('load_record', _.extend({}, record))
|
||||
: form.load_defaults();
|
||||
return $.when(loaded).pipe(function () {
|
||||
return $.when(loaded).then(function () {
|
||||
return form.do_show({reload: false});
|
||||
}).pipe(function () {
|
||||
}).then(function () {
|
||||
self.record = form.datarecord;
|
||||
_(form.fields).each(function (field, name) {
|
||||
configureField(name, field);
|
||||
|
@ -734,7 +743,7 @@ openerp.web.list_editable = function (instance) {
|
|||
var self = this;
|
||||
return this.form
|
||||
.save(this.delegate.prepends_on_create())
|
||||
.pipe(function (result) {
|
||||
.then(function (result) {
|
||||
var created = result.created && !self.record.id;
|
||||
if (created) {
|
||||
self.record.id = result.result;
|
||||
|
|
|
@ -45,7 +45,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
view_type: "tree",
|
||||
toolbar: this.view_manager ? !!this.view_manager.sidebar : false,
|
||||
context: this.dataset.get_context()
|
||||
}).then(this.on_loaded);
|
||||
}).done(this.on_loaded);
|
||||
},
|
||||
/**
|
||||
* Returns the list of fields needed to correctly read objects.
|
||||
|
@ -63,12 +63,6 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
}
|
||||
return fields;
|
||||
},
|
||||
store_record:function(records){
|
||||
var self = this;
|
||||
_(records).each(function (record) {
|
||||
self.records[record.id] = record;
|
||||
});
|
||||
},
|
||||
on_loaded: function (fields_view) {
|
||||
var self = this;
|
||||
var has_toolbar = !!fields_view.arch.attrs.toolbar;
|
||||
|
@ -92,20 +86,18 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
}));
|
||||
this.$el.addClass(this.fields_view.arch.attrs['class']);
|
||||
|
||||
this.dataset.read_slice(this.fields_list()).then(function(records) {
|
||||
self.store_record(records);
|
||||
this.dataset.read_slice(this.fields_list()).done(function(records) {
|
||||
if (!has_toolbar) {
|
||||
// WARNING: will do a second read on the same ids, but only on
|
||||
// first load so not very important
|
||||
self.render_data({'null':records})
|
||||
self.getdata(_.pluck(records,"id"));
|
||||
self.getdata(null, _(records).pluck('id'));
|
||||
return;
|
||||
}
|
||||
|
||||
var $select = self.$el.find('select')
|
||||
.change(function () {
|
||||
var $option = $(this).find(':selected');
|
||||
self.getdata($option.val());
|
||||
self.getdata($option.val(), $option.data('children'));
|
||||
});
|
||||
_(records).each(function (record) {
|
||||
self.records[record.id] = record;
|
||||
|
@ -120,12 +112,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
$select.change();
|
||||
}
|
||||
});
|
||||
this.$el.find("#tree_view_expand").click(function(){
|
||||
self.expand_all();
|
||||
});
|
||||
this.$el.find("#tree_view_collapse").click(function(){
|
||||
self.collpase_all();
|
||||
});
|
||||
|
||||
// TODO store open nodes in url ?...
|
||||
this.do_push_state({});
|
||||
|
||||
|
@ -141,22 +128,6 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
return [color, py.parse(py.tokenize(expr)), expr];
|
||||
}).value();
|
||||
},
|
||||
expand_all: function(){
|
||||
var self = this;
|
||||
var tr = this.$el.find(".oe-treeview-table tbody tr[id^='treerow_']");
|
||||
_.each(tr,function(rec){
|
||||
self.showcontent($(rec).attr('data-id'),true);
|
||||
});
|
||||
},
|
||||
collpase_all: function(){
|
||||
var self = this;
|
||||
var root_tr = this.$el.find(".oe-treeview-table tbody tr[data-level='"+1+"']");
|
||||
_.each(root_tr,function(rec){
|
||||
if($(rec).hasClass('oe_open')){
|
||||
self.showcontent($(rec).attr('data-id'),false);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Returns the color for the provided record in the current view (from the
|
||||
* ``@colors`` attribute)
|
||||
|
@ -193,44 +164,50 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
});
|
||||
|
||||
this.$el.delegate('.treeview-tr', 'click', function () {
|
||||
var $this = $(this),
|
||||
var is_loaded = 0,
|
||||
$this = $(this),
|
||||
record_id = $this.data('id'),
|
||||
bool = $this.parent().hasClass('oe_open');
|
||||
self.showcontent(record_id, !bool);
|
||||
record = self.records[record_id],
|
||||
children_ids = record[self.children_field];
|
||||
|
||||
_(children_ids).each(function(childid) {
|
||||
if (self.$el.find('#treerow_' + childid).length) {
|
||||
if (self.$el.find('#treerow_' + childid).is(':hidden')) {
|
||||
is_loaded = -1;
|
||||
} else {
|
||||
is_loaded++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (is_loaded === 0) {
|
||||
if (!$this.parent().hasClass('oe_open')) {
|
||||
self.getdata(record_id, children_ids);
|
||||
}
|
||||
} else {
|
||||
self.showcontent(record_id, is_loaded < 0);
|
||||
}
|
||||
});
|
||||
},
|
||||
// get child data of selected value
|
||||
getdata: function (id) {
|
||||
getdata: function (id, children_ids) {
|
||||
var self = this;
|
||||
var parent_child ={};
|
||||
id = _.isArray(id)?id:parseInt(id);
|
||||
var ir_model_data = new instance.web.Model(this.model,self.dataset.get_context() || {},[['id','child_of',id]]).query();
|
||||
ir_model_data._execute().then(function(records){
|
||||
self.store_record(records);
|
||||
_.each(records,function(rec){
|
||||
if(rec[self.children_field].length === 0)return;
|
||||
parent_child[rec.id] = [];
|
||||
_.each(rec[self.children_field],function(key){
|
||||
parent_child[rec.id].push(self.records[key]);
|
||||
});
|
||||
})
|
||||
self.render_data(parent_child);
|
||||
});
|
||||
},
|
||||
render_data: function(groupby){
|
||||
var self = this;
|
||||
_.each(_.keys(groupby),function(key){
|
||||
var $curr_node = self.$el.find('#treerow_' + key);
|
||||
var record = groupby[key];
|
||||
|
||||
self.dataset.read_ids(children_ids, this.fields_list()).done(function(records) {
|
||||
_(records).each(function (record) {
|
||||
self.records[record.id] = record;
|
||||
});
|
||||
|
||||
var $curr_node = self.$el.find('#treerow_' + id);
|
||||
var children_rows = QWeb.render('TreeView.rows', {
|
||||
'records': record,
|
||||
'records': records,
|
||||
'children_field': self.children_field,
|
||||
'fields_view': self.fields_view.arch.children,
|
||||
'fields': self.fields,
|
||||
'level': ($curr_node.data('level') || 0) + 1,
|
||||
'level': $curr_node.data('level') || 0,
|
||||
'render': instance.web.format_value,
|
||||
'color_for': self.color_for
|
||||
});
|
||||
|
||||
if ($curr_node.length) {
|
||||
$curr_node.addClass('oe_open');
|
||||
$curr_node.after(children_rows);
|
||||
|
@ -238,10 +215,8 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
self.$el.find('tbody').html(children_rows);
|
||||
}
|
||||
});
|
||||
self.collpase_all();
|
||||
},
|
||||
|
||||
|
||||
// Get details in listview
|
||||
activate: function(id) {
|
||||
var self = this;
|
||||
|
@ -254,7 +229,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
model: this.dataset.model,
|
||||
context: new instance.web.CompoundContext(
|
||||
this.dataset.get_context(), local_context)
|
||||
}).pipe(function (actions) {
|
||||
}).then(function (actions) {
|
||||
if (!actions.length) { return; }
|
||||
var action = actions[0][2];
|
||||
var c = new instance.web.CompoundContext(local_context);
|
||||
|
@ -263,7 +238,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
}
|
||||
return self.rpc('/web/session/eval_domain_and_context', {
|
||||
contexts: [c], domains: []
|
||||
}).pipe(function (res) {
|
||||
}).then(function (res) {
|
||||
action.context = res.context;
|
||||
return self.do_action(action);
|
||||
}, null);
|
||||
|
@ -284,5 +259,13 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
|||
}, this);
|
||||
},
|
||||
|
||||
do_show: function () {
|
||||
this.$el.show();
|
||||
},
|
||||
|
||||
do_hide: function () {
|
||||
this.$el.hide();
|
||||
this.hidden = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -208,7 +208,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
if (run_action) {
|
||||
this.null_action();
|
||||
action_loaded = this.do_action(state.action);
|
||||
instance.webclient.menu.has_been_loaded.then(function() {
|
||||
instance.webclient.menu.has_been_loaded.done(function() {
|
||||
instance.webclient.menu.open_action(state.action);
|
||||
});
|
||||
}
|
||||
|
@ -226,14 +226,14 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
} else if (state.sa) {
|
||||
// load session action
|
||||
this.null_action();
|
||||
action_loaded = this.rpc('/web/session/get_session_action', {key: state.sa}).pipe(function(action) {
|
||||
action_loaded = this.rpc('/web/session/get_session_action', {key: state.sa}).then(function(action) {
|
||||
if (action) {
|
||||
return self.do_action(action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$.when(action_loaded || null).then(function() {
|
||||
$.when(action_loaded || null).done(function() {
|
||||
if (self.inner_widget && self.inner_widget.do_load_state) {
|
||||
self.inner_widget.do_load_state(state, warm);
|
||||
}
|
||||
|
@ -247,11 +247,11 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
action_menu_id: null,
|
||||
});
|
||||
if (_.isString(action) && instance.web.client_actions.contains(action)) {
|
||||
var action_client = { type: "ir.actions.client", tag: action };
|
||||
var action_client = { type: "ir.actions.client", tag: action, params: {} };
|
||||
return this.do_action(action_client, options);
|
||||
} else if (_.isNumber(action) || _.isString(action)) {
|
||||
var self = this;
|
||||
return self.rpc("/web/action/load", { action_id: action }).pipe(function(result) {
|
||||
return self.rpc("/web/action/load", { action_id: action }).then(function(result) {
|
||||
return self.do_action(result, options);
|
||||
});
|
||||
}
|
||||
|
@ -346,14 +346,14 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
|
||||
if (!(ClientWidget.prototype instanceof instance.web.Widget)) {
|
||||
var next;
|
||||
if (next = ClientWidget(this, action.params)) {
|
||||
if (next = ClientWidget(this, action)) {
|
||||
return this.do_action(next, options);
|
||||
}
|
||||
return $.when();
|
||||
}
|
||||
|
||||
return this.ir_actions_common({
|
||||
widget: function () { return new ClientWidget(self, action.params); },
|
||||
widget: function () { return new ClientWidget(self, action); },
|
||||
action: action,
|
||||
klass: 'oe_act_client',
|
||||
post_process: function(widget) {
|
||||
|
@ -379,7 +379,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
this.rpc('/web/action/run', {
|
||||
action_id: action.id,
|
||||
context: action.context || {}
|
||||
}).then(function (action) {
|
||||
}).done(function (action) {
|
||||
self.do_action(action, options)
|
||||
});
|
||||
},
|
||||
|
@ -389,7 +389,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
self.rpc("/web/session/eval_domain_and_context", {
|
||||
contexts: [action.context],
|
||||
domains: []
|
||||
}).then(function(res) {
|
||||
}).done(function(res) {
|
||||
action = _.clone(action);
|
||||
action.context = res.context;
|
||||
self.session.get_file({
|
||||
|
@ -487,7 +487,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
} else if (this.searchview
|
||||
&& self.flags.auto_search
|
||||
&& view.controller.searchable !== false) {
|
||||
this.searchview.ready.then(this.searchview.do_search);
|
||||
this.searchview.ready.done(this.searchview.do_search);
|
||||
}
|
||||
|
||||
if (this.searchview) {
|
||||
|
@ -499,7 +499,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
.find('.oe_view_manager_switch a').filter('[data-view-type="' + view_type + '"]')
|
||||
.parent().addClass('active');
|
||||
|
||||
r = $.when(view_promise).then(function () {
|
||||
r = $.when(view_promise).done(function () {
|
||||
_.each(_.keys(self.views), function(view_name) {
|
||||
var controller = self.views[view_name].controller;
|
||||
if (controller) {
|
||||
|
@ -551,11 +551,11 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
var view_promise = controller.appendTo(container);
|
||||
this.views[view_type].controller = controller;
|
||||
this.views[view_type].deferred.resolve(view_type);
|
||||
return $.when(view_promise).then(function() {
|
||||
return $.when(view_promise).done(function() {
|
||||
if (self.searchview
|
||||
&& self.flags.auto_search
|
||||
&& view.controller.searchable !== false) {
|
||||
self.searchview.ready.then(self.searchview.do_search);
|
||||
self.searchview.ready.done(self.searchview.do_search);
|
||||
}
|
||||
self.trigger("controller_inited",view_type,controller);
|
||||
});
|
||||
|
@ -582,7 +582,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
var view_to_select = views[index];
|
||||
var state = self.url_states[view_to_select];
|
||||
self.do_push_state(state || {});
|
||||
$.when(self.switch_mode(view_to_select)).then(function() {
|
||||
$.when(self.switch_mode(view_to_select)).done(function() {
|
||||
self.$el.show();
|
||||
});
|
||||
},
|
||||
|
@ -661,7 +661,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
domains: [this.action.domain || []].concat(domains || []),
|
||||
contexts: [action_context].concat(contexts || []),
|
||||
group_by_seq: groupbys || []
|
||||
}).then(function (results) {
|
||||
}).done(function (results) {
|
||||
self.dataset._model = new instance.web.Model(
|
||||
self.dataset.model, results.context, results.domain);
|
||||
var groupby = results.group_by.length
|
||||
|
@ -786,7 +786,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
case 'perm_read':
|
||||
var ids = current_view.get_selected_ids();
|
||||
if (ids.length === 1) {
|
||||
this.dataset.call('perm_read', [ids]).then(function(result) {
|
||||
this.dataset.call('perm_read', [ids]).done(function(result) {
|
||||
var dialog = new instance.web.Dialog(this, {
|
||||
title: _.str.sprintf(_t("View Log (%s)"), self.dataset.model),
|
||||
width: 400
|
||||
|
@ -812,7 +812,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
});
|
||||
break;
|
||||
case 'fields':
|
||||
this.dataset.call('fields_get', [false, {}]).then(function (fields) {
|
||||
this.dataset.call('fields_get', [false, {}]).done(function (fields) {
|
||||
var $root = $('<dl>');
|
||||
_(fields).each(function (attributes, name) {
|
||||
$root.append($('<dt>').append($('<h4>').text(name)));
|
||||
|
@ -899,7 +899,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
switch_mode: function (view_type, no_store, options) {
|
||||
var self = this;
|
||||
|
||||
return $.when(this._super.apply(this, arguments)).then(function () {
|
||||
return $.when(this._super.apply(this, arguments)).done(function () {
|
||||
var controller = self.views[self.active_view].controller;
|
||||
self.$el.find('.oe_debug_view').html(QWeb.render('ViewManagerDebug', {
|
||||
view: controller,
|
||||
|
@ -938,13 +938,13 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
defs = [];
|
||||
if (state.view_type && state.view_type !== this.active_view) {
|
||||
defs.push(
|
||||
this.views[this.active_view].deferred.pipe(function() {
|
||||
this.views[this.active_view].deferred.then(function() {
|
||||
return self.switch_mode(state.view_type, true);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
$.when(defs).then(function() {
|
||||
$.when(defs).done(function() {
|
||||
self.views[self.active_view].controller.do_load_state(state, warm);
|
||||
});
|
||||
},
|
||||
|
@ -1051,7 +1051,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
},
|
||||
on_item_action_clicked: function(item) {
|
||||
var self = this;
|
||||
self.getParent().sidebar_context().then(function (context) {
|
||||
self.getParent().sidebar_context().done(function (context) {
|
||||
var ids = self.getParent().get_selected_ids();
|
||||
if (ids.length == 0) {
|
||||
instance.web.dialog($("<div />").text(_t("You must choose at least one record.")), { title: _t("Warning"), modal: true });
|
||||
|
@ -1065,7 +1065,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
self.rpc("/web/action/load", {
|
||||
action_id: item.action.id,
|
||||
context: additional_context
|
||||
}).then(function(result) {
|
||||
}).done(function(result) {
|
||||
result.context = _.extend(result.context || {},
|
||||
additional_context);
|
||||
result.flags = result.flags || {};
|
||||
|
@ -1087,7 +1087,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
} else {
|
||||
var dom = [ ['res_model', '=', dataset.model], ['res_id', '=', model_id], ['type', 'in', ['binary', 'url']] ];
|
||||
var ds = new instance.web.DataSetSearch(this, 'ir.attachment', dataset.get_context(), dom);
|
||||
ds.read_slice(['name', 'url', 'type'], {}).then(this.on_attachments_loaded);
|
||||
ds.read_slice(['name', 'url', 'type'], {}).done(this.on_attachments_loaded);
|
||||
}
|
||||
},
|
||||
on_attachments_loaded: function(attachments) {
|
||||
|
@ -1122,7 +1122,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
var self = this;
|
||||
var $e = $(e.currentTarget);
|
||||
if (confirm(_t("Do you really want to delete this attachment ?"))) {
|
||||
(new instance.web.DataSet(this, 'ir.attachment')).unlink([parseInt($e.attr('data-id'), 10)]).then(function() {
|
||||
(new instance.web.DataSet(this, 'ir.attachment')).unlink([parseInt($e.attr('data-id'), 10)]).done(function() {
|
||||
self.do_attachement_update(self.dataset, self.model_id);
|
||||
});
|
||||
}
|
||||
|
@ -1150,7 +1150,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
var view_loaded;
|
||||
if (this.embedded_view) {
|
||||
view_loaded = $.Deferred();
|
||||
$.async_when().then(function() {
|
||||
$.async_when().done(function() {
|
||||
view_loaded.resolve(self.embedded_view);
|
||||
});
|
||||
} else {
|
||||
|
@ -1164,7 +1164,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
context: this.dataset.get_context(context)
|
||||
});
|
||||
}
|
||||
return view_loaded.pipe(function(r) {
|
||||
return view_loaded.then(function(r) {
|
||||
self.trigger('view_loaded', r);
|
||||
// add css classes that reflect the (absence of) access rights
|
||||
self.$el.addClass('oe_view')
|
||||
|
@ -1220,7 +1220,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
return self.rpc('/web/session/eval_domain_and_context', {
|
||||
contexts: [ncontext],
|
||||
domains: []
|
||||
}).pipe(function (results) {
|
||||
}).then(function (results) {
|
||||
action.context = results.context;
|
||||
/* niv: previously we were overriding once more with action_data.context,
|
||||
* I assumed this was not a correct behavior and removed it
|
||||
|
@ -1249,11 +1249,11 @@ instance.web.View = instance.web.Widget.extend({
|
|||
}
|
||||
}
|
||||
args.push(context);
|
||||
return dataset.call_button(action_data.name, args).then(handler);
|
||||
return dataset.call_button(action_data.name, args).done(handler);
|
||||
} else if (action_data.type=="action") {
|
||||
return this.rpc('/web/action/load', { action_id: action_data.name, context: context, do_not_eval: true}).then(handler);
|
||||
return this.rpc('/web/action/load', { action_id: action_data.name, context: context, do_not_eval: true}).done(handler);
|
||||
} else {
|
||||
return dataset.exec_workflow(record_id, action_data.name).then(handler);
|
||||
return dataset.exec_workflow(record_id, action_data.name).done(handler);
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -567,16 +567,14 @@
|
|||
</t>
|
||||
|
||||
<t t-name="TreeView">
|
||||
<div class = "tree_header">
|
||||
<select t-if="toolbar" ></select>
|
||||
<button id = "tree_view_collapse">Collapse All</button>
|
||||
<button id = "tree_view_expand">Expand All</button>
|
||||
</div>
|
||||
<table class="oe-treeview-table">
|
||||
<select t-if="toolbar" style="width: 30%">
|
||||
</select>
|
||||
<table class="oe_tree_table oe-treeview-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th t-foreach="fields_view" t-as="field"
|
||||
t-if="!field.attrs.modifiers.tree_invisible">
|
||||
t-if="!field.attrs.modifiers.tree_invisible"
|
||||
class="treeview-header">
|
||||
<t t-esc="field_value.attrs.string || fields[field.attrs.name].string" />
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -588,11 +586,11 @@
|
|||
<tr t-name="TreeView.rows"
|
||||
t-foreach="records" t-as="record"
|
||||
t-att-id="'treerow_' + record.id"
|
||||
t-att-data-id="record.id" t-att-data-level="level">
|
||||
t-att-data-id="record.id" t-att-data-level="level + 1">
|
||||
<t t-set="children" t-value="record[children_field]"/>
|
||||
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
|
||||
<t t-set="rank" t-value="'oe-treeview-first'"/>
|
||||
<t t-set="style" t-value="'background-position: ' + 19*(level-1) + 'px; padding-left: ' + (4 + 19*(level-1)) + 'px;'"/>
|
||||
<t t-set="style" t-value="'background-position: ' + 19*(level) + 'px; padding-left: ' + (4 + 19*(level)) + 'px;'"/>
|
||||
|
||||
<td t-foreach="fields_view" t-as="field"
|
||||
t-if="!field.attrs.modifiers.tree_invisible"
|
||||
|
@ -1029,6 +1027,13 @@
|
|||
</t>
|
||||
</span>
|
||||
</t>
|
||||
<t t-name="Many2OneButton">
|
||||
<span class="oe_form_field">
|
||||
</span>
|
||||
</t>
|
||||
<t t-name="Many2OneButton.cell"
|
||||
><img t-attf-src="#{_s}/web/static/src/img/icons/gtk-#{widget.has_value ? 'yes' : 'no'}.png" width="16" height="16"/>
|
||||
</t>
|
||||
<t t-name="FieldMany2ManyTags">
|
||||
<div class="oe_form_field oe_tags" t-att-style="widget.node.attrs.style">
|
||||
<t t-if="! widget.get('effective_readonly')">
|
||||
|
@ -1169,11 +1174,54 @@
|
|||
<input type="hidden" name="session_id" value=""/>
|
||||
<input type="hidden" name="callback" t-att-value="fileupload_id"/>
|
||||
<t t-raw="__content__"/>
|
||||
<input type="file" class="oe_form_binary_file" name="ufile"/>
|
||||
<input type="file" class="oe_form_binary_file" name="ufile" t-if="widget.widget!='image'"/>
|
||||
<input type="file" class="oe_form_binary_file" name="ufile" accept="image/*" t-if="widget.widget=='image'"/>
|
||||
</form>
|
||||
<iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="FieldBinaryFileUploader.files">
|
||||
<div class="oe_attachments">
|
||||
<t t-if="!widget.get('effective_readonly')" t-foreach="widget.get('value')" t-as="file">
|
||||
<div class="oe_attachment">
|
||||
<span t-if="(file.upload or file.percent_loaded<100)" t-attf-title="{(file.name || file.filename) + (file.date?' \n('+file.date+')':'' )}" t-attf-name="{file.name || file.filename}">
|
||||
<span class="oe_fileuploader_in_process">...Upload in progress...</span>
|
||||
<t t-raw="file.name || file.filename"/>
|
||||
</span>
|
||||
<a t-if="(!file.upload or file.percent_loaded>=100)" t-att-href="file.url" t-attf-title="{(file.name || file.filename) + (file.date?' \n('+file.date+')':'' )}">
|
||||
<t t-raw="file.name || file.filename"/>
|
||||
</a>
|
||||
<t t-if="(!file.upload or file.percent_loaded>=100)">
|
||||
<a class="oe_right oe_delete oe_e" title="Delete this file" t-attf-data-id="{file.id}">[</a>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="widget.get('effective_readonly')" t-foreach="widget.get('value')" t-as="file">
|
||||
<div>
|
||||
<a t-att-href="file.url" t-attf-title="{(file.name || file.filename) + (file.date?' \n('+file.date+')':'' )}">
|
||||
<t t-raw="file.name || file.filename"/>
|
||||
</a>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="FieldBinaryFileUploader">
|
||||
<div t-att-style="widget.node.attrs.style" t-attf-class="oe_fileupload #{widget.node.attrs.class ? widget.node.attrs.class :''}">
|
||||
<div class="oe_placeholder_files"/>
|
||||
<div class="oe_add" t-if="!widget.get('effective_readonly')">
|
||||
<!-- uploader of file -->
|
||||
<button class="oe_attach"><span class="oe_e">'</span></button>
|
||||
<span class='oe_attach_label'>File</span>
|
||||
<t t-call="HiddenInputFile">
|
||||
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
|
||||
<t t-set="fileupload_action">/web/binary/upload_attachment</t>
|
||||
<input type="hidden" name="model" t-att-value="widget.view.model"/>
|
||||
<input type="hidden" name="id" value="0"/>
|
||||
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="WidgetButton">
|
||||
<button type="button" class="oe_button oe_form_button"
|
||||
t-att-style="widget.node.attrs.style"
|
||||
|
|
|
@ -82,7 +82,7 @@ $(document).ready(function () {
|
|||
});
|
||||
t.test('call', function (openerp) {
|
||||
var ds = new openerp.web.DataSet({session: openerp.session}, 'mod');
|
||||
t.expect(ds.call('frob', ['a', 'b', 42]).then(function (r) {
|
||||
t.expect(ds.call('frob', ['a', 'b', 42]).done(function (r) {
|
||||
strictEqual(r.method, 'frob');
|
||||
|
||||
strictEqual(r.args.length, 3);
|
||||
|
@ -91,7 +91,7 @@ $(document).ready(function () {
|
|||
ok(_.isEmpty(r.kwargs));
|
||||
}));
|
||||
});
|
||||
t.test('name_get').then(function (openerp) {
|
||||
t.test('name_get').done(function (openerp) {
|
||||
var ds = new openerp.web.DataSet({session: openerp.session}, 'mod');
|
||||
t.expect(ds.name_get([1, 2], null), function (r) {
|
||||
strictEqual(r.method, 'name_get');
|
||||
|
|
|
@ -107,12 +107,12 @@ $(document).ready(function () {
|
|||
});
|
||||
var counter = 0;
|
||||
e.appendTo($fix)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
return e.edit({}, function () {
|
||||
++counter;
|
||||
});
|
||||
})
|
||||
.pipe(function (form) {
|
||||
.then(function (form) {
|
||||
ok(e.is_editing(), "should be editing");
|
||||
equal(counter, 3, "should have configured all fields");
|
||||
return e.save();
|
||||
|
@ -137,12 +137,12 @@ $(document).ready(function () {
|
|||
});
|
||||
var counter = 0;
|
||||
e.appendTo($fix)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
return e.edit({}, function () {
|
||||
++counter;
|
||||
});
|
||||
})
|
||||
.pipe(function (form) {
|
||||
.then(function (form) {
|
||||
return e.cancel();
|
||||
})
|
||||
.always(start)
|
||||
|
@ -170,12 +170,12 @@ $(document).ready(function () {
|
|||
var counter = 0;
|
||||
var warnings = 0;
|
||||
e.appendTo($fix)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
return e.edit({}, function () {
|
||||
++counter;
|
||||
});
|
||||
})
|
||||
.pipe(function (form) {
|
||||
.then(function (form) {
|
||||
return e.save();
|
||||
})
|
||||
.always(start)
|
||||
|
@ -243,16 +243,16 @@ $(document).ready(function () {
|
|||
var l = new instance.web.ListView({}, ds, false, {editable: 'top'});
|
||||
|
||||
l.appendTo($fix)
|
||||
.pipe(l.proxy('reload_content'))
|
||||
.pipe(function () {
|
||||
.then(l.proxy('reload_content'))
|
||||
.then(function () {
|
||||
return l.start_edition();
|
||||
})
|
||||
.always(start)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
ok(got_defaults, "should have fetched default values for form");
|
||||
return l.save_edition();
|
||||
})
|
||||
.pipe(function (result) {
|
||||
.then(function (result) {
|
||||
ok(result.created, "should yield newly created record");
|
||||
equal(result.record.get('a'), "qux",
|
||||
"should have used default values");
|
||||
|
@ -307,14 +307,14 @@ $(document).ready(function () {
|
|||
var l = new instance.web.ListView({}, ds, false, {editable: 'top'});
|
||||
l.on('edit:before edit:after', o, o.onEvent);
|
||||
l.appendTo($fix)
|
||||
.pipe(l.proxy('reload_content'))
|
||||
.then(l.proxy('reload_content'))
|
||||
.always(start)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
ok(l.options.editable, "should be editable");
|
||||
equal(o.counter, 0, "should have seen no event yet");
|
||||
return l.start_edition(l.records.get(1));
|
||||
})
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
ok(l.editor.is_editing(), "should be editing");
|
||||
equal(o.counter, 2, "should have seen two edition events");
|
||||
})
|
||||
|
@ -332,14 +332,14 @@ $(document).ready(function () {
|
|||
edit_after = true;
|
||||
});
|
||||
l.appendTo($fix)
|
||||
.pipe(l.proxy('reload_content'))
|
||||
.then(l.proxy('reload_content'))
|
||||
.always(start)
|
||||
.pipe(function () {
|
||||
.then(function () {
|
||||
ok(l.options.editable, "should be editable");
|
||||
return l.start_edition();
|
||||
})
|
||||
// cancelling an event rejects the deferred
|
||||
.pipe($.Deferred().reject(), function () {
|
||||
.then($.Deferred().reject(), function () {
|
||||
ok(!l.editor.is_editing(), "should not be editing");
|
||||
ok(!edit_after, "should not have fired the edit:after event");
|
||||
return $.when();
|
||||
|
|
|
@ -29,10 +29,10 @@ $(document).ready(function () {
|
|||
fail1 = false, fail2 = false;
|
||||
|
||||
var d1 = $.Deferred(), d2 = $.Deferred();
|
||||
dm.add(d1).then(function () { done1 = true; },
|
||||
function () { fail1 = true; });
|
||||
dm.add(d2).then(function () { done2 = true; },
|
||||
function () { fail2 = true; });
|
||||
dm.add(d1).done(function () { done1 = true; })
|
||||
.fail(function () { fail1 = true; });
|
||||
dm.add(d2).done(function () { done2 = true; })
|
||||
.fail(function () { fail2 = true; });
|
||||
|
||||
d2.resolve();
|
||||
d1.resolve();
|
||||
|
@ -50,10 +50,10 @@ $(document).ready(function () {
|
|||
fail1 = false, fail2 = false;
|
||||
|
||||
var d1 = $.Deferred(), d2 = $.Deferred();
|
||||
dm.add(d1).then(function () { done1 = true; },
|
||||
function () { fail1 = true; });
|
||||
dm.add(d2).then(function () { done2 = true; },
|
||||
function () { fail2 = true; });
|
||||
dm.add(d1).done(function () { done1 = true; })
|
||||
.fail(function () { fail1 = true; });
|
||||
dm.add(d2).done(function () { done2 = true; })
|
||||
.fail(function () { fail2 = true; });
|
||||
|
||||
d2.resolve();
|
||||
d1.resolve();
|
||||
|
@ -86,10 +86,10 @@ $(document).ready(function () {
|
|||
fail1 = false, fail2 = false;
|
||||
|
||||
var d1 = $.Deferred(), d2 = $.Deferred();
|
||||
dm.add(d1).then(function () { done1 = true; },
|
||||
function () { fail1 = true; });
|
||||
dm.add(d2).then(function () { done2 = true; },
|
||||
function () { fail2 = true; });
|
||||
dm.add(d1).done(function () { done1 = true; })
|
||||
.fail(function () { fail1 = true; });
|
||||
dm.add(d2).done(function () { done2 = true; })
|
||||
.fail(function () { fail2 = true; });
|
||||
|
||||
setTimeout(function () { d1.resolve(); }, 200);
|
||||
setTimeout(function () { d2.resolve(); }, 100);
|
||||
|
@ -110,10 +110,10 @@ $(document).ready(function () {
|
|||
fail1 = false, fail2 = false;
|
||||
|
||||
var d1 = $.Deferred(), d2 = $.Deferred();
|
||||
dm.add(d1).then(function () { done1 = true; },
|
||||
function () { fail1 = true; });
|
||||
dm.add(d2).then(function () { done2 = true; },
|
||||
function () { fail2 = true; });
|
||||
dm.add(d1).done(function () { done1 = true; })
|
||||
.fail(function () { fail1 = true; });
|
||||
dm.add(d2).done(function () { done2 = true; })
|
||||
.fail(function () { fail2 = true; });
|
||||
|
||||
setTimeout(function () { d1.resolve(); }, 200);
|
||||
setTimeout(function () { d2.resolve(); }, 100);
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<script src="/web/static/lib/backbone/backbone.js" type="text/javascript"></script>
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="/web/static/lib/jquery/jquery-1.7.2.js"></script>
|
||||
<script src="/web/static/lib/jquery.ui/js/jquery-ui-1.8.17.custom.min.js"></script>
|
||||
<script src="/web/static/lib/jquery/jquery-1.8.2.js"></script>
|
||||
<script src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
|
||||
<script src="/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js"></script>
|
||||
|
||||
<script src="/web/static/lib/datejs/globalization/en-US.js"></script>
|
||||
|
|
|
@ -9,12 +9,14 @@ OpenERP Web Calendar view.
|
|||
'version': '2.0',
|
||||
'depends': ['web'],
|
||||
'js': [
|
||||
'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler_debug.js',
|
||||
'static/lib/dhtmlxScheduler/sources/ext/ext_minical.js',
|
||||
'static/lib/dhtmlxScheduler/sources/dhtmlxscheduler.js',
|
||||
'static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_minical.js',
|
||||
'static/src/js/calendar.js'
|
||||
],
|
||||
'css': [
|
||||
'static/lib/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_ext.css',
|
||||
#'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler.css',
|
||||
#'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler_dhx_terrace.css',
|
||||
'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler_glossy.css',
|
||||
'static/src/css/web_calendar.css'
|
||||
],
|
||||
'qweb' : [
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-01-30 17:43+0000\n"
|
||||
"Last-Translator: ERP Basing <erp@basing.si>\n"
|
||||
"PO-Revision-Date: 2012-11-01 18:19+0000\n"
|
||||
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
|
||||
"Language-Team: Slovenian <sl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-21 05:03+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-02 05:20+0000\n"
|
||||
"X-Generator: Launchpad (build 16218)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:11
|
||||
|
@ -25,114 +25,114 @@ msgstr "Koledar"
|
|||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:70
|
||||
msgid "Filter"
|
||||
msgstr ""
|
||||
msgstr "Filter:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:144
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
msgstr "Danes"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:145
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
msgstr "Dan"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:146
|
||||
msgid "Week"
|
||||
msgstr ""
|
||||
msgstr "Teden"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:147
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
msgstr "Mesec"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:148
|
||||
msgid "New event"
|
||||
msgstr ""
|
||||
msgstr "Nov dogodek"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:149
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
msgstr "Shrani"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:150
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Prekliči"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:151
|
||||
msgid "Details"
|
||||
msgstr ""
|
||||
msgstr "Podrobnosti"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:152
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
msgstr "Uredi"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:153
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
msgstr "Izbriši"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:155
|
||||
msgid "Event will be deleted permanently, are you sure?"
|
||||
msgstr ""
|
||||
msgstr "Dogodek bo trajno izbrisan. Ste prepričani?"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:156
|
||||
#: addons/web_calendar/static/src/js/calendar.js:169
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
msgstr "Opis"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:157
|
||||
msgid "Time period"
|
||||
msgstr ""
|
||||
msgstr "Obdobje"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:158
|
||||
msgid "Full day"
|
||||
msgstr ""
|
||||
msgstr "Cel dan"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:161
|
||||
msgid "Do you want to edit the whole set of repeated events?"
|
||||
msgstr ""
|
||||
msgstr "Želite urediti celotno zbirko ponavljajočih dogodkov?"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:162
|
||||
msgid "Repeat event"
|
||||
msgstr ""
|
||||
msgstr "Ponavljajoč dogodek"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:163
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
msgstr "Onemogočeno"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:164
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
msgstr "Omogočeno"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:167
|
||||
#: addons/web_calendar/static/src/js/calendar.js:175
|
||||
msgid "Agenda"
|
||||
msgstr ""
|
||||
msgstr "Dnevni red"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:168
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Datum"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/js/calendar.js:172
|
||||
msgid "Year"
|
||||
msgstr ""
|
||||
msgstr "Leto"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_calendar/static/src/xml/web_calendar.xml:5
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
dhtmlx=function(a){for(var b in a)dhtmlx[b]=a[b];return dhtmlx};
|
||||
dhtmlx.extend_api=function(a,b,c){var d=window[a];if(d)window[a]=function(a){if(a&&typeof a=="object"&&!a.tagName&&!(a instanceof Array)){var c=d.apply(this,b._init?b._init(a):arguments),g;for(g in dhtmlx)if(b[g])this[b[g]](dhtmlx[g]);for(g in a)if(b[g])this[b[g]](a[g]);else g.indexOf("on")==0&&this.attachEvent(g,a[g])}else c=d.apply(this,arguments);b._patch&&b._patch(this);return c||this},window[a].prototype=d.prototype,c&&dhtmlXHeir(window[a].prototype,c)};
|
||||
dhtmlxAjax={get:function(a,b){var c=new dtmlXMLLoaderObject(!0);c.async=arguments.length<3;c.waitCall=b;c.loadXML(a);return c},post:function(a,b,c){var d=new dtmlXMLLoaderObject(!0);d.async=arguments.length<4;d.waitCall=c;d.loadXML(a,!0,b);return d},getSync:function(a){return this.get(a,null,!0)},postSync:function(a,b){return this.post(a,b,null,!0)}};
|
||||
function dtmlXMLLoaderObject(a,b,c,d){this.xmlDoc="";this.async=typeof c!="undefined"?c:!0;this.onloadAction=a||null;this.mainObject=b||null;this.waitCall=null;this.rSeed=d||!1;return this}
|
||||
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(a){var b=!0;return this.check=function(){if(a&&a.onloadAction!=null&&(!a.xmlDoc.readyState||a.xmlDoc.readyState==4)&&b){b=!1;if(typeof a.onloadAction=="function")a.onloadAction(a.mainObject,null,null,null,a);if(a.waitCall)a.waitCall.call(this,a),a.waitCall=null}}};
|
||||
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(a,b){if(this.xmlDoc.responseXML){var c=this.xmlDoc.responseXML.getElementsByTagName(a);c.length==0&&a.indexOf(":")!=-1&&(c=this.xmlDoc.responseXML.getElementsByTagName(a.split(":")[1]));var d=c[0]}else d=this.xmlDoc.documentElement;if(d)return this._retry=!1,d;if(_isIE&&!this._retry){var e=this.xmlDoc.responseText,b=this.xmlDoc;this._retry=!0;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=!1;this.xmlDoc.loadXML(e);return this.getXMLTopNode(a,
|
||||
b)}dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(a){try{var b=new DOMParser;this.xmlDoc=b.parseFromString(a,"text/xml")}catch(c){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),this.xmlDoc.async=this.async,this.xmlDoc.loadXML(a)}this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall)this.waitCall(),this.waitCall=null};
|
||||
dtmlXMLLoaderObject.prototype.loadXML=function(a,b,c,d){this.rSeed&&(a+=(a.indexOf("?")!=-1?"&":"?")+"a_dhx_rSeed="+(new Date).valueOf());this.filePath=a;this.xmlDoc=!_isIE&&window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(this.async)this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.open(b?"POST":"GET",a,this.async);d?(this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")"),this.xmlDoc.setRequestHeader("Content-type",
|
||||
"text/xml")):b&&this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(c);this.async||(new this.waitLoadFunction(this))()};dtmlXMLLoaderObject.prototype.destructor=function(){return this.xmlDoc=this.mainObject=this.onloadAction=null};
|
||||
dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(a){for(var b={},c=0;c<a.attributes.length;c++)b[a.attributes[c].name]=a.attributes[c].value;b._tagvalue=a.firstChild?a.firstChild.nodeValue:"";for(c=0;c<a.childNodes.length;c++){var d=a.childNodes[c].tagName;d&&(b[d]||(b[d]=[]),b[d].push(this.xmlNodeToJSON(a.childNodes[c])))}return b};function callerFunction(a,b){return this.handler=function(c){if(!c)c=window.event;a(c,b);return!0}}function getAbsoluteLeft(a){return getOffset(a).left}
|
||||
function getAbsoluteTop(a){return getOffset(a).top}function getOffsetSum(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetTop),c+=parseInt(a.offsetLeft),a=a.offsetParent;return{top:b,left:c}}
|
||||
function getOffsetRect(a){var b=a.getBoundingClientRect(),c=document.body,d=document.documentElement,e=window.pageYOffset||d.scrollTop||c.scrollTop,f=window.pageXOffset||d.scrollLeft||c.scrollLeft,g=d.clientTop||c.clientTop||0,h=d.clientLeft||c.clientLeft||0,i=b.top+e-g,k=b.left+f-h;return{top:Math.round(i),left:Math.round(k)}}function getOffset(a){return a.getBoundingClientRect&&!_isChrome?getOffsetRect(a):getOffsetSum(a)}
|
||||
function convertStringToBoolean(a){typeof a=="string"&&(a=a.toLowerCase());switch(a){case "1":case "true":case "yes":case "y":case 1:case !0:return!0;default:return!1}}function getUrlSymbol(a){return a.indexOf("?")!=-1?"&":"?"}function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.dragStartObject=this.dragStartNode=this.dragNode=this.lastLanding=0;this.tempDOMM=this.tempDOMU=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this}
|
||||
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(a){a.onmousedown=null;a.dragStarter=null;a.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(a,b){a.onmousedown=this.preCreateDragCopy;a.dragStarter=b;this.addDragLanding(a,b)};dhtmlDragAndDropObject.prototype.addDragLanding=function(a,b){a.dragLanding=b};
|
||||
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(a){if(!((a||event)&&(a||event).button==2)){if(window.dhtmlDragAndDrop.waitDrag)return window.dhtmlDragAndDrop.waitDrag=0,document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU,document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM,!1;window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=
|
||||
this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;window.dhtmlDragAndDrop.downtime=(new Date).valueOf();a&&a.preventDefault&&a.preventDefault();return!1}};
|
||||
dhtmlDragAndDropObject.prototype.callDrag=function(a){if(!a)a=window.event;dragger=window.dhtmlDragAndDrop;if(!((new Date).valueOf()-dragger.downtime<100)){if(a.button==0&&_isIE)return dragger.stopDrag();if(!dragger.dragNode&&dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,a);if(!dragger.dragNode)return dragger.stopDrag();dragger.dragNode.onselectstart=function(){return!1};dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);
|
||||
document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()}if(dragger.dragNode.parentNode!=window.document.body){var b=dragger.gldragNode;if(dragger.gldragNode.old)b=dragger.gldragNode.old;b.parentNode.removeChild(b);var c=dragger.dragNode.pWindow;if(_isIE){var d=document.createElement("Div");d.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=d.childNodes[0]}else dragger.dragNode=dragger.dragNode.cloneNode(!0);dragger.dragNode.pWindow=
|
||||
window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);c.dhtmlDragAndDrop.dragNode=dragger.dragNode}dragger.dragNode.style.left=a.clientX+15+(dragger.fx?dragger.fx*-1:0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=a.clientY+3+(dragger.fy?dragger.fy*-1:0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";var e=a.srcElement?a.srcElement:a.target;dragger.checkLanding(e,a)}};
|
||||
dhtmlDragAndDropObject.prototype.calculateFramePosition=function(a){if(window.name){for(var b=parent.frames[window.name].frameElement.offsetParent,c=0,d=0;b;)c+=b.offsetLeft,d+=b.offsetTop,b=b.offsetParent;if(parent.dhtmlDragAndDrop){var e=parent.dhtmlDragAndDrop.calculateFramePosition(1);c+=e.split("_")[0]*1;d+=e.split("_")[1]*1}if(a)return c+"_"+d;else this.fx=c;this.fy=d}return"0_0"};
|
||||
dhtmlDragAndDropObject.prototype.checkLanding=function(a,b){a&&a.dragLanding?(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding),this.lastLanding=a,this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,b.clientX,b.clientY,b),this.lastLanding_scr=_isIE?b.srcElement:b.target):a&&a.tagName!="BODY"?this.checkLanding(a.parentNode,b):(this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding,b.clientX,b.clientY,b),this.lastLanding=
|
||||
0,this._onNotFound&&this._onNotFound())};
|
||||
dhtmlDragAndDropObject.prototype.stopDrag=function(a,b){dragger=window.dhtmlDragAndDrop;if(!b){dragger.stopFrameRoute();var c=dragger.lastLanding;dragger.lastLanding=null;c&&c.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,c,_isIE?event.srcElement:a.target)}dragger.lastLanding=null;dragger.dragNode&&dragger.dragNode.parentNode==document.body&&dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=
|
||||
0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(a){a&&window.dhtmlDragAndDrop.stopDrag(1,1);for(var b=0;b<window.frames.length;b++)try{window.frames[b]!=a&&window.frames[b].dhtmlDragAndDrop&&window.frames[b].dhtmlDragAndDrop.stopFrameRoute(window)}catch(c){}try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.stopFrameRoute(window)}catch(d){}};
|
||||
dhtmlDragAndDropObject.prototype.initFrameRoute=function(a,b){if(a)window.dhtmlDragAndDrop.preCreateDragCopy({}),window.dhtmlDragAndDrop.dragStartNode=a.dhtmlDragAndDrop.dragStartNode,window.dhtmlDragAndDrop.dragStartObject=a.dhtmlDragAndDrop.dragStartObject,window.dhtmlDragAndDrop.dragNode=a.dhtmlDragAndDrop.dragNode,window.dhtmlDragAndDrop.gldragNode=a.dhtmlDragAndDrop.dragNode,window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag,window.waitDrag=0,!_isIE&&b&&(!_isFF||w<1.8)&&window.dhtmlDragAndDrop.calculateFramePosition();
|
||||
try{parent.dhtmlDragAndDrop&&parent!=window&&parent!=a&&parent.dhtmlDragAndDrop.initFrameRoute(window)}catch(c){}for(var d=0;d<window.frames.length;d++)try{window.frames[d]!=a&&window.frames[d].dhtmlDragAndDrop&&window.frames[d].dhtmlDragAndDrop.initFrameRoute(window,!a||b?1:0)}catch(e){}};w=_OperaRv=x=_isChrome=_isMacOS=_isKHTML=_isOpera=_isIE=_isFF=!1;navigator.userAgent.indexOf("Macintosh")!=-1&&(_isMacOS=!0);navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&(_isChrome=!0);
|
||||
if(navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("Konqueror")!=-1){var x=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5));if(x>525){_isFF=!0;var w=1.9}else _isKHTML=!0}else navigator.userAgent.indexOf("Opera")!=-1?(_isOpera=!0,_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3))):navigator.appName.indexOf("Microsoft")!=-1?(_isIE=!0,navigator.appVersion.indexOf("MSIE 8.0")!=-1&&document.compatMode!="BackCompat"&&
|
||||
(_isIE=8)):(_isFF=!0,w=parseFloat(navigator.userAgent.split("rv:")[1]));
|
||||
dtmlXMLLoaderObject.prototype.doXPath=function(a,b,c,d){if(_isKHTML||!_isIE&&!window.XPathResult)return this.doXPathOpera(a,b);if(_isIE)return b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]),c!=null&&b.setProperty("SelectionNamespaces","xmlns:xsl='"+c+"'"),d=="single"?b.selectSingleNode(a):b.selectNodes(a)||[];else{var e=b;b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);b||dhtmlxError.throwError("LoadXML",
|
||||
"Incorrect XML",[b||this.xmlDoc,this.mainObject]);b.nodeName.indexOf("document")!=-1?e=b:(e=b,b=b.ownerDocument);var f=XPathResult.ANY_TYPE;if(d=="single")f=XPathResult.FIRST_ORDERED_NODE_TYPE;var g=[],h=b.evaluate(a,e,function(){return c},f,null);if(f==XPathResult.FIRST_ORDERED_NODE_TYPE)return h.singleNodeValue;for(var i=h.iterateNext();i;)g[g.length]=i,i=h.iterateNext();return g}};function z(){if(!this.catches)this.catches=[];return this}z.prototype.catchError=function(a,b){this.catches[a]=b};
|
||||
z.prototype.throwError=function(a,b,c){if(this.catches[a])return this.catches[a](a,b,c);if(this.catches.ALL)return this.catches.ALL(a,b,c);alert("Error type: "+a+"\nDescription: "+b);return null};window.dhtmlxError=new z;
|
||||
dtmlXMLLoaderObject.prototype.doXPathOpera=function(a,b){var c=a.replace(/[\/]+/gi,"/").split("/"),d=null,e=1;if(!c.length)return[];if(c[0]==".")d=[b];else if(c[0]=="")d=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(c[e].replace(/\[[^\]]*\]/g,"")),e++;else return[];for(;e<c.length;e++)d=this._getAllNamedChilds(d,c[e]);c[e-1].indexOf("[")!=-1&&(d=this._filterXPath(d,c[e-1]));return d};
|
||||
dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){for(var c=[],b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,""),d=0;d<a.length;d++)a[d].getAttribute(b)&&(c[c.length]=a[d]);return c};
|
||||
dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=[];_isKHTML&&(b=b.toUpperCase());for(var d=0;d<a.length;d++)for(var e=0;e<a[d].childNodes.length;e++)_isKHTML?a[d].childNodes[e].tagName&&a[d].childNodes[e].tagName.toUpperCase()==b&&(c[c.length]=a[d].childNodes[e]):a[d].childNodes[e].tagName==b&&(c[c.length]=a[d].childNodes[e]);return c};function dhtmlXHeir(a,b){for(var c in b)typeof b[c]=="function"&&(a[c]=b[c]);return a}
|
||||
function dhtmlxEvent(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(a,b,c){if(!c)c=this.xslDoc;if(c.responseXML)c=c.responseXML;var d=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+a+"']",c,"http://www.w3.org/1999/XSL/Transform","single");if(d!=null)d.firstChild.nodeValue=b};
|
||||
dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(a,b){if(!a)a=this.xslDoc;if(a.responseXML)a=a.responseXML;if(!b)b=this.xmlDoc;if(b.responseXML)b=b.responseXML;if(_isIE){d=new ActiveXObject("Msxml2.DOMDocument.3.0");try{b.transformNodeToObject(a,d)}catch(c){d=b.transformNode(a)}}else{if(!this.XSLProcessor)this.XSLProcessor=new XSLTProcessor,this.XSLProcessor.importStylesheet(a);var d=this.XSLProcessor.transformToDocument(b)}return d};
|
||||
dtmlXMLLoaderObject.prototype.doXSLTransToString=function(a,b){var c=this.doXSLTransToObject(a,b);return typeof c=="string"?c:this.doSerialization(c)};dtmlXMLLoaderObject.prototype.doSerialization=function(a){if(!a)a=this.xmlDoc;if(a.responseXML)a=a.responseXML;if(_isIE)return a.xml;else{var b=new XMLSerializer;return b.serializeToString(a)}};
|
||||
dhtmlxEventable=function(a){a.dhx_SeverCatcherPath="";a.attachEvent=function(a,c,d){a="ev_"+a.toLowerCase();this[a]||(this[a]=new this.eventCatcher(d||this));return a+":"+this[a].addEvent(c)};a.callEvent=function(a,c){a="ev_"+a.toLowerCase();return this[a]?this[a].apply(this,c):!0};a.checkEvent=function(a){return!!this["ev_"+a.toLowerCase()]};a.eventCatcher=function(a){var c=[],d=function(){for(var d=!0,f=0;f<c.length;f++)if(c[f]!=null)var g=c[f].apply(a,arguments),d=d&&g;return d};d.addEvent=function(a){typeof a!=
|
||||
"function"&&(a=eval(a));return a?c.push(a)-1:!1};d.removeEvent=function(a){c[a]=null};return d};a.detachEvent=function(a){if(a!=!1){var c=a.split(":");this[c[0]].removeEvent(c[1])}};a.detachAllEvents=function(){for(var a in this)a.indexOf("ev_")==0&&delete this[a]}};
|
||||
function dataProcessor(a){this.serverProcessor=a;this.action_param="!nativeeditor_status";this.object=null;this.updatedRows=[];this.autoUpdate=!0;this.updateMode="cell";this._tMode="GET";this.post_delim="_";this._waitMode=0;this._in_progress={};this._invalid={};this.mandatoryFields=[];this.messages=[];this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",clear:"font-weight:normal;text-decoration:none;"};
|
||||
this.enableUTFencoding(!0);dhtmlxEventable(this);return this}
|
||||
dataProcessor.prototype={setTransactionMode:function(a,b){this._tMode=a;this._tSend=b},escape:function(a){return this._utf?encodeURIComponent(a):escape(a)},enableUTFencoding:function(a){this._utf=convertStringToBoolean(a)},setDataColumns:function(a){this._columns=typeof a=="string"?a.split(","):a},getSyncState:function(){return!this.updatedRows.length},enableDataNames:function(a){this._endnm=convertStringToBoolean(a)},enablePartialDataSend:function(a){this._changed=convertStringToBoolean(a)},setUpdateMode:function(a,
|
||||
b){this.autoUpdate=a=="cell";this.updateMode=a;this.dnd=b},ignore:function(a,b){this._silent_mode=!0;a.call(b||window);this._silent_mode=!1},setUpdated:function(a,b,c){if(!this._silent_mode){var d=this.findRow(a),c=c||"updated",e=this.obj.getUserData(a,this.action_param);e&&c=="updated"&&(c=e);b?(this.set_invalid(a,!1),this.updatedRows[d]=a,this.obj.setUserData(a,this.action_param,c),this._in_progress[a]&&(this._in_progress[a]="wait")):this.is_invalid(a)||(this.updatedRows.splice(d,1),this.obj.setUserData(a,
|
||||
this.action_param,""));b||this._clearUpdateFlag(a);this.markRow(a,b,c);b&&this.autoUpdate&&this.sendData(a)}},_clearUpdateFlag:function(){},markRow:function(a,b,c){var d="",e=this.is_invalid(a);e&&(d=this.styles[e],b=!0);if(this.callEvent("onRowMark",[a,b,c,e])&&(d=this.styles[b?c:"clear"]+d,this.obj[this._methods[0]](a,d),e&&e.details)){d+=this.styles[e+"_cell"];for(var f=0;f<e.details.length;f++)if(e.details[f])this.obj[this._methods[1]](a,f,d)}},getState:function(a){return this.obj.getUserData(a,
|
||||
this.action_param)},is_invalid:function(a){return this._invalid[a]},set_invalid:function(a,b,c){c&&(b={value:b,details:c,toString:function(){return this.value.toString()}});this._invalid[a]=b},checkBeforeUpdate:function(){return!0},sendData:function(a){if(!this._waitMode||!(this.obj.mytype=="tree"||this.obj._h2)){this.obj.editStop&&this.obj.editStop();if(typeof a=="undefined"||this._tSend)return this.sendAllData();if(this._in_progress[a])return!1;this.messages=[];if(!this.checkBeforeUpdate(a)&&this.callEvent("onValidatationError",
|
||||
[a,this.messages]))return!1;this._beforeSendData(this._getRowData(a),a)}},_beforeSendData:function(a,b){if(!this.callEvent("onBeforeUpdate",[b,this.getState(b),a]))return!1;this._sendData(a,b)},serialize:function(a,b){if(typeof a=="string")return a;if(typeof b!="undefined")return this.serialize_one(a,"");else{var c=[],d=[],e;for(e in a)a.hasOwnProperty(e)&&(c.push(this.serialize_one(a[e],e+this.post_delim)),d.push(e));c.push("ids="+this.escape(d.join(",")));return c.join("&")}},serialize_one:function(a,
|
||||
b){if(typeof a=="string")return a;var c=[],d;for(d in a)a.hasOwnProperty(d)&&c.push(this.escape((b||"")+d)+"="+this.escape(a[d]));return c.join("&")},_sendData:function(a,b){if(a){if(!this.callEvent("onBeforeDataSending",b?[b,this.getState(b),a]:[null,null,a]))return!1;b&&(this._in_progress[b]=(new Date).valueOf());var c=new dtmlXMLLoaderObject(this.afterUpdate,this,!0),d=this.serverProcessor+(this._user?getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+this.obj.getUserData(0,
|
||||
"version")].join("&"):"");this._tMode!="POST"?c.loadXML(d+(d.indexOf("?")!=-1?"&":"?")+this.serialize(a,b)):c.loadXML(d,!0,this.serialize(a,b));this._waitMode++}},sendAllData:function(){if(this.updatedRows.length){this.messages=[];for(var a=!0,b=0;b<this.updatedRows.length;b++)a&=this.checkBeforeUpdate(this.updatedRows[b]);if(!a&&!this.callEvent("onValidatationError",["",this.messages]))return!1;if(this._tSend)this._sendData(this._getAllData());else for(b=0;b<this.updatedRows.length;b++)if(!this._in_progress[this.updatedRows[b]]&&
|
||||
!this.is_invalid(this.updatedRows[b])&&(this._beforeSendData(this._getRowData(this.updatedRows[b]),this.updatedRows[b]),this._waitMode&&(this.obj.mytype=="tree"||this.obj._h2)))break}},_getAllData:function(){for(var a={},b=!1,c=0;c<this.updatedRows.length;c++){var d=this.updatedRows[c];!this._in_progress[d]&&!this.is_invalid(d)&&this.callEvent("onBeforeUpdate",[d,this.getState(d)])&&(a[d]=this._getRowData(d,d+this.post_delim),b=!0,this._in_progress[d]=(new Date).valueOf())}return b?a:null},setVerificator:function(a,
|
||||
b){this.mandatoryFields[a]=b||function(a){return a!=""}},clearVerificator:function(a){this.mandatoryFields[a]=!1},findRow:function(a){for(var b=0,b=0;b<this.updatedRows.length;b++)if(a==this.updatedRows[b])break;return b},defineAction:function(a,b){if(!this._uActions)this._uActions=[];this._uActions[a]=b},afterUpdateCallback:function(a,b,c,d){var e=a,f=c!="error"&&c!="invalid";f||this.set_invalid(a,c);if(this._uActions&&this._uActions[c]&&!this._uActions[c](d))return delete this._in_progress[e];this._in_progress[e]!=
|
||||
"wait"&&this.setUpdated(a,!1);var g=a;switch(c){case "update":case "updated":case "inserted":case "insert":b!=a&&(this.obj[this._methods[2]](a,b),a=b);break;case "delete":case "deleted":return this.obj.setUserData(a,this.action_param,"true_deleted"),this.obj[this._methods[3]](a),delete this._in_progress[e],this.callEvent("onAfterUpdate",[a,c,b,d])}this._in_progress[e]!="wait"?(f&&this.obj.setUserData(a,this.action_param,""),delete this._in_progress[e]):(delete this._in_progress[e],this.setUpdated(b,
|
||||
!0,this.obj.getUserData(a,this.action_param)));this.callEvent("onAfterUpdate",[a,c,b,d])},afterUpdate:function(a,b,c,d,e){e.getXMLTopNode("data");if(e.xmlDoc.responseXML){for(var f=e.doXPath("//data/action"),g=0;g<f.length;g++){var h=f[g],i=h.getAttribute("type"),k=h.getAttribute("sid"),j=h.getAttribute("tid");a.afterUpdateCallback(k,j,i,h)}a.finalizeUpdate()}},finalizeUpdate:function(){this._waitMode&&this._waitMode--;(this.obj.mytype=="tree"||this.obj._h2)&&this.updatedRows.length&&this.sendData();
|
||||
this.callEvent("onAfterUpdateFinish",[]);this.updatedRows.length||this.callEvent("onFullSync",[])},init:function(a){this.obj=a;this.obj._dp_init&&this.obj._dp_init(this)},setOnAfterUpdate:function(a){this.attachEvent("onAfterUpdate",a)},enableDebug:function(){},setOnBeforeUpdateHandler:function(a){this.attachEvent("onBeforeDataSending",a)},setAutoUpdate:function(a,b){a=a||2E3;this._user=b||(new Date).valueOf();this._need_update=!1;this._loader=null;this._update_busy=!1;this.attachEvent("onAfterUpdate",
|
||||
function(a,b,c,g){this.afterAutoUpdate(a,b,c,g)});this.attachEvent("onFullSync",function(){this.fullSync()});var c=this;window.setInterval(function(){c.loadUpdate()},a)},afterAutoUpdate:function(a,b){return b=="collision"?(this._need_update=!0,!1):!0},fullSync:function(){if(this._need_update==!0)this._need_update=!1,this.loadUpdate();return!0},getUpdates:function(a,b){if(this._update_busy)return!1;else this._update_busy=!0;this._loader=this._loader||new dtmlXMLLoaderObject(!0);this._loader.async=
|
||||
!0;this._loader.waitCall=b;this._loader.loadXML(a)},_v:function(a){return a.firstChild?a.firstChild.nodeValue:""},_a:function(a){for(var b=[],c=0;c<a.length;c++)b[c]=this._v(a[c]);return b},loadUpdate:function(){var a=this,b=this.obj.getUserData(0,"version"),c=this.serverProcessor+getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+b].join("&"),c=c.replace("editing=true&","");this.getUpdates(c,function(){var b=a._loader.doXPath("//userdata");a.obj.setUserData(0,"version",a._v(b[0]));
|
||||
var c=a._loader.doXPath("//update");if(c.length){a._silent_mode=!0;for(var f=0;f<c.length;f++){var g=c[f].getAttribute("status"),h=c[f].getAttribute("id"),i=c[f].getAttribute("parent");switch(g){case "inserted":a.callEvent("insertCallback",[c[f],h,i]);break;case "updated":a.callEvent("updateCallback",[c[f],h,i]);break;case "deleted":a.callEvent("deleteCallback",[c[f],h,i])}}a._silent_mode=!1}a._update_busy=!1;a=null})}};
|
||||
if(window.dhtmlXGridObject)dhtmlXGridObject.prototype._init_point_connector=dhtmlXGridObject.prototype._init_point,dhtmlXGridObject.prototype._init_point=function(){var a=function(a){a=a.replace(/(\?|\&)connector[^\f]*/g,"");return a+(a.indexOf("?")!=-1?"&":"?")+"connector=true"+(this.hdr.rows.length>0?"&dhx_no_header=1":"")},b=function(b){return a.call(this,b)+(this._connector_sorting||"")+(this._connector_filter||"")},c=function(a,c,d){this._connector_sorting="&dhx_sort["+c+"]="+d;return b.call(this,
|
||||
a)},d=function(a,c,d){for(var h=0;h<c.length;h++)c[h]="dhx_filter["+c[h]+"]="+encodeURIComponent(d[h]);this._connector_filter="&"+c.join("&");return b.call(this,a)};this.attachEvent("onCollectValues",function(a){return this._con_f_used[a]?typeof this._con_f_used[a]=="object"?this._con_f_used[a]:!1:!0});this.attachEvent("onDynXLS",function(){this.xmlFileUrl=b.call(this,this.xmlFileUrl);return!0});this.attachEvent("onBeforeSorting",function(a,b,d){if(b=="connector"){var h=this;this.clearAndLoad(c.call(this,
|
||||
this.xmlFileUrl,a,d),function(){h.setSortImgState(!0,a,d)});return!1}return!0});this.attachEvent("onFilterStart",function(a,b){return this._con_f_used.length?(this.clearAndLoad(d.call(this,this.xmlFileUrl,a,b)),!1):!0});this.attachEvent("onXLE",function(){});this._init_point_connector&&this._init_point_connector()},dhtmlXGridObject.prototype._con_f_used=[],dhtmlXGridObject.prototype._in_header_connector_text_filter=function(a,b){this._con_f_used[b]||(this._con_f_used[b]=1);return this._in_header_text_filter(a,
|
||||
b)},dhtmlXGridObject.prototype._in_header_connector_select_filter=function(a,b){this._con_f_used[b]||(this._con_f_used[b]=2);return this._in_header_select_filter(a,b)},dhtmlXGridObject.prototype.load_connector=dhtmlXGridObject.prototype.load,dhtmlXGridObject.prototype.load=function(a,b,c){if(!this._colls_loaded&&this.cellType){for(var d=[],e=0;e<this.cellType.length;e++)(this.cellType[e].indexOf("co")==0||this._con_f_used[e]==2)&&d.push(e);d.length&&(arguments[0]+=(arguments[0].indexOf("?")!=-1?"&":
|
||||
"?")+"connector=true&dhx_colls="+d.join(","))}return this.load_connector.apply(this,arguments)},dhtmlXGridObject.prototype._parseHead_connector=dhtmlXGridObject.prototype._parseHead,dhtmlXGridObject.prototype._parseHead=function(a,b,c){this._parseHead_connector.apply(this,arguments);if(!this._colls_loaded){for(var d=this.xmlLoader.doXPath("./coll_options",arguments[0]),e=0;e<d.length;e++){var f=d[e].getAttribute("for"),g=[],h=null;this.cellType[f]=="combo"&&(h=this.getColumnCombo(f));this.cellType[f].indexOf("co")==
|
||||
0&&(h=this.getCombo(f));for(var i=this.xmlLoader.doXPath("./item",d[e]),k=0;k<i.length;k++){var j=i[k].getAttribute("value");if(h){var l=i[k].getAttribute("label")||j;h.addOption?h.addOption([[j,l]]):h.put(j,l);g[g.length]=l}else g[g.length]=j}this._con_f_used[f*1]&&(this._con_f_used[f*1]=g)}this._colls_loaded=!0}};
|
||||
if(window.dataProcessor)dataProcessor.prototype.init_original=dataProcessor.prototype.init,dataProcessor.prototype.init=function(a){this.init_original(a);a._dataprocessor=this;this.setTransactionMode("POST",!0);this.serverProcessor+=(this.serverProcessor.indexOf("?")!=-1?"&":"?")+"editing=true"};dhtmlxError.catchError("LoadXML",function(a,b,c){c[0].status!=0&&alert(c[0].responseText)});window.dhtmlXScheduler=window.scheduler={version:3};dhtmlxEventable(scheduler);
|
||||
scheduler.init=function(a,b,c){b=b||new Date;c=c||"week";scheduler.date.init();this._obj=typeof a=="string"?document.getElementById(a):a;this._els=[];this._scroll=!0;this._quirks=_isIE&&document.compatMode=="BackCompat";this._quirks7=_isIE&&navigator.appVersion.indexOf("MSIE 8")==-1;this.get_elements();this.init_templates();this.set_actions();dhtmlxEvent(window,"resize",function(){window.clearTimeout(scheduler._resize_timer);scheduler._resize_timer=window.setTimeout(function(){scheduler.callEvent("onSchedulerResize",
|
||||
[])&&scheduler.update_view()},100)});this.set_sizes();scheduler.callEvent("onSchedulerReady",[]);this.setCurrentView(b,c)};scheduler.xy={nav_height:22,min_event_height:40,scale_width:50,bar_height:20,scroll_width:18,scale_height:20,month_scale_height:20,menu_width:25,margin_top:0,margin_left:0,editor_width:140};scheduler.keys={edit_save:13,edit_cancel:27};
|
||||
scheduler.set_sizes=function(){var a=this._x=this._obj.clientWidth-this.xy.margin_left,b=this._y=this._obj.clientHeight-this.xy.margin_top,c=this._table_view?0:this.xy.scale_width+this.xy.scroll_width,d=this._table_view?-1:this.xy.scale_width;this.set_xy(this._els.dhx_cal_navline[0],a,this.xy.nav_height,0,0);this.set_xy(this._els.dhx_cal_header[0],a-c,this.xy.scale_height,d,this.xy.nav_height+(this._quirks?-1:1));var e=this._els.dhx_cal_navline[0].offsetHeight;if(e>0)this.xy.nav_height=e;var f=this.xy.scale_height+
|
||||
this.xy.nav_height+(this._quirks?-2:0);this.set_xy(this._els.dhx_cal_data[0],a,b-(f+2),0,f+2)};scheduler.set_xy=function(a,b,c,d,e){a.style.width=Math.max(0,b)+"px";a.style.height=Math.max(0,c)+"px";if(arguments.length>3)a.style.left=d+"px",a.style.top=e+"px"};
|
||||
scheduler.get_elements=function(){for(var a=this._obj.getElementsByTagName("DIV"),b=0;b<a.length;b++){var c=a[b].className;this._els[c]||(this._els[c]=[]);this._els[c].push(a[b]);var d=scheduler.locale.labels[a[b].getAttribute("name")||c];if(d)a[b].innerHTML=d}};
|
||||
scheduler.set_actions=function(){for(var a in this._els)if(this._click[a])for(var b=0;b<this._els[a].length;b++)this._els[a][b].onclick=scheduler._click[a];this._obj.onselectstart=function(){return!1};this._obj.onmousemove=function(a){scheduler._on_mouse_move(a||event)};this._obj.onmousedown=function(a){scheduler._on_mouse_down(a||event)};this._obj.onmouseup=function(a){scheduler._on_mouse_up(a||event)};this._obj.ondblclick=function(a){scheduler._on_dbl_click(a||event)}};
|
||||
scheduler.select=function(a){if(!this._table_view&&this.getEvent(a)._timed&&this._select_id!=a)this.editStop(!1),this.unselect(),this._select_id=a,this.updateEvent(a)};scheduler.unselect=function(a){if(!(a&&a!=this._select_id)){var b=this._select_id;this._select_id=null;b&&this.updateEvent(b)}};scheduler.getState=function(){return{mode:this._mode,date:this._date,min_date:this._min_date,max_date:this._max_date,editor_id:this._edit_id,lightbox_id:this._lightbox_id,new_event:this._new_event}};
|
||||
scheduler._click={dhx_cal_data:function(a){var b=a?a.target:event.srcElement,c=scheduler._locate_event(b),a=a||event;if(!(c&&!scheduler.callEvent("onClick",[c,a])||scheduler.config.readonly))if(c){scheduler.select(c);var d=b.className;if(d.indexOf("_icon")!=-1)scheduler._click.buttons[d.split(" ")[1].replace("icon_","")](c)}else scheduler._close_not_saved()},dhx_cal_prev_button:function(){scheduler._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(a,b){scheduler.setCurrentView(scheduler.date.add(scheduler.date[scheduler._mode+
|
||||
"_start"](scheduler._date),b||1,scheduler._mode))},dhx_cal_today_button:function(){scheduler.setCurrentView(new Date)},dhx_cal_tab:function(){var a=this.getAttribute("name"),b=a.substring(0,a.search("_tab"));scheduler.setCurrentView(scheduler._date,b)},buttons:{"delete":function(a){var b=scheduler.locale.labels.confirm_deleting;(!b||confirm(b))&&scheduler.deleteEvent(a)},edit:function(a){scheduler.edit(a)},save:function(){scheduler.editStop(!0)},details:function(a){scheduler.showLightbox(a)},cancel:function(){scheduler.editStop(!1)}}};
|
||||
scheduler.addEventNow=function(a,b,c){var d={};a&&a.constructor.toString().match(/object/i)!==null&&(d=a,a=null);var e=(this.config.event_duration||this.config.time_step)*6E4;a||(a=Math.round((new Date).valueOf()/e)*e);var f=new Date(a);if(!b){var g=this.config.first_hour;g>f.getHours()&&(f.setHours(g),a=f.valueOf());b=a+e}var h=new Date(b);f.valueOf()==h.valueOf()&&h.setTime(h.valueOf()+e);d.start_date=d.start_date||f;d.end_date=d.end_date||h;d.text=d.text||this.locale.labels.new_event;d.id=this._drag_id=
|
||||
this.uid();this._drag_mode="new-size";this._loading=!0;this.addEvent(d);this.callEvent("onEventCreated",[this._drag_id,c]);this._loading=!1;this._drag_event={};this._on_mouse_up(c)};
|
||||
scheduler._on_dbl_click=function(a,b){b=b||a.target||a.srcElement;if(!this.config.readonly){var c=b.className.split(" ")[0];switch(c){case "dhx_scale_holder":case "dhx_scale_holder_now":case "dhx_month_body":case "dhx_wa_day_data":if(!scheduler.config.dblclick_create)break;var d=this._mouse_coords(a),e=this._min_date.valueOf()+(d.y*this.config.time_step+(this._table_view?0:d.x)*1440)*6E4,e=this._correct_shift(e);this.addEventNow(e,null,a);break;case "dhx_body":case "dhx_wa_ev_body":case "dhx_cal_event_line":case "dhx_cal_event_clear":var f=
|
||||
this._locate_event(b);if(!this.callEvent("onDblClick",[f,a]))break;this.config.details_on_dblclick||this._table_view||!this.getEvent(f)._timed?this.showLightbox(f):this.edit(f);break;case "":if(b.parentNode)return scheduler._on_dbl_click(a,b.parentNode);default:var g=this["dblclick_"+c];g&&g.call(this,a)}}};
|
||||
scheduler._mouse_coords=function(a){var b,c=document.body,d=document.documentElement;b=a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:{x:a.clientX+(c.scrollLeft||d.scrollLeft||0)-c.clientLeft,y:a.clientY+(c.scrollTop||d.scrollTop||0)-c.clientTop};b.x-=getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);b.y-=getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els.dhx_cal_data[0].scrollTop;b.ev=a;var e=this["mouse_"+this._mode];if(e)return e.call(this,
|
||||
b);if(this._table_view){for(var f=0,f=1;f<this._colsS.heights.length;f++)if(this._colsS.heights[f]>b.y)break;b.y=(Math.max(0,Math.ceil(b.x/this._cols[0])-1)+Math.max(0,f-1)*7)*1440/this.config.time_step;b.x=0}else b.x=Math.max(0,Math.ceil(b.x/this._cols[0])-1),b.y=Math.max(0,Math.ceil(b.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);return b};
|
||||
scheduler._close_not_saved=function(){if((new Date).valueOf()-(scheduler._new_event||0)>500&&scheduler._edit_id){var a=scheduler.locale.labels.confirm_closing;(!a||confirm(a))&&scheduler.editStop(scheduler.config.positive_closing)}};scheduler._correct_shift=function(a,b){return a-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(a)).getTimezoneOffset())*6E4*(b?-1:1)};
|
||||
scheduler._on_mouse_move=function(a){if(this._drag_mode){var b=this._mouse_coords(a);if(!this._drag_pos||b.custom||this._drag_pos.x!=b.x||this._drag_pos.y!=b.y){this._edit_id!=this._drag_id&&this._close_not_saved();this._drag_pos=b;if(this._drag_mode=="create"){this._close_not_saved();this._loading=!0;var c=this._min_date.valueOf()+(b.y*this.config.time_step+(this._table_view?0:b.x)*1440)*6E4,c=this._correct_shift(c);if(!this._drag_start){this._drag_start=c;return}var d=c;if(d==this._drag_start)return;
|
||||
this._drag_id=this.uid();this.addEvent(new Date(this._drag_start),new Date(d),this.locale.labels.new_event,this._drag_id,b.fields);this.callEvent("onEventCreated",[this._drag_id,a]);this._loading=!1;this._drag_mode="new-size"}var e=this.getEvent(this._drag_id);if(this._drag_mode=="move")c=this._min_date.valueOf()+(b.y*this.config.time_step+b.x*1440)*6E4,!b.custom&&this._table_view&&(c+=this.date.time_part(e.start_date)*1E3),c=this._correct_shift(c),d=e.end_date.valueOf()-(e.start_date.valueOf()-c);
|
||||
else{c=e.start_date.valueOf();if(this._table_view)d=this._min_date.valueOf()+b.y*this.config.time_step*6E4+(b.custom?0:864E5),this._mode=="month"&&(d=this._correct_shift(d,!1));else if(d=this.date.date_part(new Date(e.end_date)).valueOf()+b.y*this.config.time_step*6E4,this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode=="week"||this._mode=="day")d=this._correct_shift(d);if(this._drag_mode=="new-size")if(d<=this._drag_start)var f=b.shift||(this._table_view&&!b.custom?864E5:0),c=d-(b.shift?
|
||||
0:f),d=this._drag_start+(f||this.config.time_step*6E4);else c=this._drag_start;else d<=c&&(d=c+this.config.time_step*6E4)}var g=new Date(d-1),h=new Date(c);if(this._table_view||g.getDate()==h.getDate()&&g.getHours()<this.config.last_hour||scheduler._wa&&scheduler._wa._dnd)e.start_date=h,e.end_date=new Date(d),this.config.update_render?this.update_view():this.updateEvent(this._drag_id);this._table_view&&this.for_rendered(this._drag_id,function(a){a.className+=" dhx_in_move"})}}else if(scheduler.checkEvent("onMouseMove")){var i=
|
||||
this._locate_event(a.target||a.srcElement);this.callEvent("onMouseMove",[i,a])}};scheduler._on_mouse_context=function(a,b){return this.callEvent("onContextMenu",[this._locate_event(b),a])};
|
||||
scheduler._on_mouse_down=function(a,b){if(!this.config.readonly&&!this._drag_mode){b=b||a.target||a.srcElement;if(a.button==2||a.ctrlKey)return this._on_mouse_context(a,b);switch(b.className.split(" ")[0]){case "dhx_cal_event_line":case "dhx_cal_event_clear":if(this._table_view)this._drag_mode="move";break;case "dhx_header":case "dhx_title":case "dhx_wa_ev_body":this._drag_mode="move";break;case "dhx_footer":this._drag_mode="resize";break;case "dhx_scale_holder":case "dhx_scale_holder_now":case "dhx_month_body":case "dhx_matrix_cell":this._drag_mode=
|
||||
"create";break;case "":if(b.parentNode)return scheduler._on_mouse_down(a,b.parentNode);default:this._drag_id=this._drag_mode=null}if(this._drag_mode){var c=this._locate_event(b);!this.config["drag_"+this._drag_mode]||!this.callEvent("onBeforeDrag",[c,this._drag_mode,a])?this._drag_mode=this._drag_id=0:(this._drag_id=c,this._drag_event=scheduler._lame_copy({},this._copy_event(this.getEvent(this._drag_id)||{})))}this._drag_start=null}};
|
||||
scheduler._on_mouse_up=function(a){if(this._drag_mode&&this._drag_id){this._els.dhx_cal_data[0].style.cursor="default";var b=this.getEvent(this._drag_id);if(this._drag_event._dhx_changed||!this._drag_event.start_date||b.start_date.valueOf()!=this._drag_event.start_date.valueOf()||b.end_date.valueOf()!=this._drag_event.end_date.valueOf()){var c=this._drag_mode=="new-size";if(this.callEvent("onBeforeEventChanged",[b,a,c]))if(c&&this.config.edit_on_create){this.unselect();this._new_event=new Date;if(this._table_view||
|
||||
this.config.details_on_create)return this._drag_mode=null,this.showLightbox(this._drag_id);this._drag_pos=!0;this._select_id=this._edit_id=this._drag_id}else this._new_event||this.callEvent(c?"onEventAdded":"onEventChanged",[this._drag_id,this.getEvent(this._drag_id)]);else c?this.deleteEvent(b.id,!0):(this._drag_event._dhx_changed=!1,scheduler._lame_copy(b,this._drag_event),this.updateEvent(b.id))}this._drag_pos&&this.render_view_data()}this._drag_pos=this._drag_mode=null};
|
||||
scheduler.update_view=function(){this._reset_scale();if(this._load_mode&&this._load())return this._render_wait=!0;this.render_view_data()};
|
||||
scheduler.setCurrentView=function(a,b){a=a||this._date;b=b||this._mode;if(this.callEvent("onBeforeViewChange",[this._mode,this._date,b,a])){var c="dhx_cal_data",d=this._mode==b&&this.config.preserve_scroll?this._els[c][0].scrollTop:!1;if(this[this._mode+"_view"]&&b&&this._mode!=b)this[this._mode+"_view"](!1);this._close_not_saved();var e="dhx_multi_day";this._els[e]&&(this._els[e][0].parentNode.removeChild(this._els[e][0]),this._els[e]=null);this._mode=b;this._date=a;this._table_view=this._mode==
|
||||
"month";for(var f=this._els.dhx_cal_tab,g=0;g<f.length;g++)f[g].className="dhx_cal_tab"+(f[g].getAttribute("name")==this._mode+"_tab"?" active":"");var h=this[this._mode+"_view"];h?h(!0):this.update_view();if(typeof d=="number")this._els[c][0].scrollTop=d;this.callEvent("onViewChange",[this._mode,this._date])}};
|
||||
scheduler._render_x_header=function(a,b,c,d){var e=document.createElement("DIV");e.className="dhx_scale_bar";this.set_xy(e,this._cols[a]-1,this.xy.scale_height-2,b,0);e.innerHTML=this.templates[this._mode+"_scale_date"](c,this._mode);d.appendChild(e)};
|
||||
scheduler._reset_scale=function(){if(this.templates[this._mode+"_date"]){var a=this._els.dhx_cal_header[0],b=this._els.dhx_cal_data[0],c=this.config;a.innerHTML="";b.scrollTop=0;b.innerHTML="";var d=(c.readonly||!c.drag_resize?" dhx_resize_denied":"")+(c.readonly||!c.drag_move?" dhx_move_denied":"");if(d)b.className="dhx_cal_data"+d;this._cols=[];this._colsS={height:0};this._dy_shift=0;this.set_sizes();var e=parseInt(a.style.width),f=0,g,h,i,k;h=this.date[this._mode+"_start"](new Date(this._date.valueOf()));
|
||||
g=i=this._table_view?scheduler.date.week_start(h):h;k=this.date.date_part(new Date);var j=scheduler.date.add(h,1,this._mode),l=7;if(!this._table_view){var o=this.date["get_"+this._mode+"_end"];o&&(j=o(h));l=Math.round((j.valueOf()-h.valueOf())/864E5)}this._min_date=g;this._els.dhx_cal_date[0].innerHTML=this.templates[this._mode+"_date"](h,j,this._mode);for(var m=0;m<l;m++){this._cols[m]=Math.floor(e/(l-m));this._render_x_header(m,f,g,a);if(!this._table_view){var n=document.createElement("DIV"),p=
|
||||
"dhx_scale_holder";g.valueOf()==k.valueOf()&&(p="dhx_scale_holder_now");n.className=p+" "+this.templates.week_date_class(g,k);this.set_xy(n,this._cols[m]-1,c.hour_size_px*(c.last_hour-c.first_hour),f+this.xy.scale_width+1,0);b.appendChild(n);this.callEvent("onScaleAdd",[n,g])}g=this.date.add(g,1,"day");e-=this._cols[m];f+=this._cols[m];this._colsS[m]=(this._cols[m-1]||0)+(this._colsS[m-1]||(this._table_view?0:this.xy.scale_width+2));this._colsS.col_length=l+1}this._max_date=g;this._colsS[l]=this._cols[l-
|
||||
1]+this._colsS[l-1];if(this._table_view)this._reset_month_scale(b,h,i);else{this._reset_hours_scale(b,h,i);if(c.multi_day){var q="dhx_multi_day";this._els[q]&&(this._els[q][0].parentNode.removeChild(this._els[q][0]),this._els[q]=null);var v=this._els.dhx_cal_navline[0],s=v.offsetHeight+this._els.dhx_cal_header[0].offsetHeight+1,r=document.createElement("DIV");r.className=q;r.style.visibility="hidden";this.set_xy(r,this._colsS[this._colsS.col_length-1]+this.xy.scroll_width,0,0,s);b.parentNode.insertBefore(r,
|
||||
b);var u=r.cloneNode(!0);u.className=q+"_icon";u.style.visibility="hidden";this.set_xy(u,this.xy.scale_width,0,0,s);r.appendChild(u);this._els[q]=[r,u];this._els[q][0].onclick=this._click.dhx_cal_data}if(this.config.mark_now){var t=new Date;if(t<this._max_date&&t>this._min_date&&t.getHours()>=this.config.first_hour&&t.getHours()<this.config.last_hour){var A=this.locate_holder_day(t),B=t.getHours()*60+t.getMinutes(),y=document.createElement("DIV");y.className="dhx_now_time";y.style.top=Math.round((B*
|
||||
6E4-this.config.first_hour*36E5)*this.config.hour_size_px/36E5)%(this.config.hour_size_px*24)+1+"px";b.childNodes[A].appendChild(y)}}}}};
|
||||
scheduler._reset_hours_scale=function(a){var b=document.createElement("DIV");b.className="dhx_scale_holder";for(var c=new Date(1980,1,1,this.config.first_hour,0,0),d=this.config.first_hour*1;d<this.config.last_hour;d++){var e=document.createElement("DIV");e.className="dhx_scale_hour";e.style.height=this.config.hour_size_px-(this._quirks?0:1)+"px";e.style.width=this.xy.scale_width+"px";e.innerHTML=scheduler.templates.hour_scale(c);b.appendChild(e);c=this.date.add(c,1,"hour")}a.appendChild(b);if(this.config.scroll_hour)a.scrollTop=
|
||||
this.config.hour_size_px*(this.config.scroll_hour-this.config.first_hour)};
|
||||
scheduler._reset_month_scale=function(a,b,c){var d=scheduler.date.add(b,1,"month"),e=new Date;this.date.date_part(e);this.date.date_part(c);var f=Math.ceil(Math.round((d.valueOf()-c.valueOf())/864E5)/7),g=[],h=Math.floor(a.clientHeight/f)-22;this._colsS.height=h+22;for(var i=this._colsS.heights=[],k=0;k<=7;k++)g[k]=" style='height:"+h+"px; width:"+((this._cols[k]||0)-1)+"px;' ";var j=0;this._min_date=c;for(var l="<table cellpadding='0' cellspacing='0'>",k=0;k<f;k++){l+="<tr>";for(var o=0;o<7;o++){l+=
|
||||
"<td";var m="";c<b?m="dhx_before":c>=d?m="dhx_after":c.valueOf()==e.valueOf()&&(m="dhx_now");l+=" class='"+m+" "+this.templates.month_date_class(c,e)+"' ";l+="><div class='dhx_month_head'>"+this.templates.month_day(c)+"</div><div class='dhx_month_body' "+g[o]+"></div></td>";c=this.date.add(c,1,"day")}l+="</tr>";i[k]=j;j+=this._colsS.height}l+="</table>";this._max_date=c;a.innerHTML=l;return c};
|
||||
scheduler.getLabel=function(a,b){for(var c=this.config.lightbox.sections,d=0;d<c.length;d++)if(c[d].map_to==a)for(var e=c[d].options,f=0;f<e.length;f++)if(e[f].key==b)return e[f].label;return""};scheduler.updateCollection=function(a,b){var c=scheduler.serverList(a);if(!c)return!1;c.splice(0,c.length);c.push.apply(c,b||[]);scheduler.callEvent("onOptionsLoad",[]);scheduler.resetLightbox();return!0};scheduler._lame_copy=function(a,b){for(var c in b)a[c]=b[c];return a};
|
||||
scheduler.date={init:function(){for(var a=scheduler.locale.date.month_short,b=scheduler.locale.date.month_short_hash={},c=0;c<a.length;c++)b[a[c]]=c;a=scheduler.locale.date.month_full;b=scheduler.locale.date.month_full_hash={};for(c=0;c<a.length;c++)b[a[c]]=c},date_part:function(a){a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);return a},time_part:function(a){return(a.valueOf()/1E3-a.getTimezoneOffset()*60)%86400},week_start:function(a){var b=a.getDay();scheduler.config.start_on_monday&&
|
||||
(b===0?b=6:b--);return this.date_part(this.add(a,-1*b,"day"))},month_start:function(a){a.setDate(1);return this.date_part(a)},year_start:function(a){a.setMonth(0);return this.month_start(a)},day_start:function(a){return this.date_part(a)},add:function(a,b,c){var d=new Date(a.valueOf());switch(c){case "day":d.setDate(d.getDate()+b);if(a.getDate()==d.getDate()&&b){do d.setTime(d.getTime()+36E5);while(a.getDate()==d.getDate())}break;case "week":d.setDate(d.getDate()+7*b);break;case "month":d.setMonth(d.getMonth()+
|
||||
b);break;case "year":d.setYear(d.getFullYear()+b);break;case "hour":d.setHours(d.getHours()+b);break;case "minute":d.setMinutes(d.getMinutes()+b);break;default:return scheduler.date["add_"+c](a,b,c)}return d},to_fixed:function(a){return a<10?"0"+a:a},copy:function(a){return new Date(a.valueOf())},date_to_str:function(a,b){a=a.replace(/%[a-zA-Z]/g,function(a){switch(a){case "%d":return'"+scheduler.date.to_fixed(date.getDate())+"';case "%m":return'"+scheduler.date.to_fixed((date.getMonth()+1))+"';case "%j":return'"+date.getDate()+"';
|
||||
case "%n":return'"+(date.getMonth()+1)+"';case "%y":return'"+scheduler.date.to_fixed(date.getFullYear()%100)+"';case "%Y":return'"+date.getFullYear()+"';case "%D":return'"+scheduler.locale.date.day_short[date.getDay()]+"';case "%l":return'"+scheduler.locale.date.day_full[date.getDay()]+"';case "%M":return'"+scheduler.locale.date.month_short[date.getMonth()]+"';case "%F":return'"+scheduler.locale.date.month_full[date.getMonth()]+"';case "%h":return'"+scheduler.date.to_fixed((date.getHours()+11)%12+1)+"';
|
||||
case "%g":return'"+((date.getHours()+11)%12+1)+"';case "%G":return'"+date.getHours()+"';case "%H":return'"+scheduler.date.to_fixed(date.getHours())+"';case "%i":return'"+scheduler.date.to_fixed(date.getMinutes())+"';case "%a":return'"+(date.getHours()>11?"pm":"am")+"';case "%A":return'"+(date.getHours()>11?"PM":"AM")+"';case "%s":return'"+scheduler.date.to_fixed(date.getSeconds())+"';case "%W":return'"+scheduler.date.to_fixed(scheduler.date.getISOWeek(date))+"';default:return a}});b&&(a=a.replace(/date\.get/g,
|
||||
"date.getUTC"));return new Function("date",'return "'+a+'";')},str_to_date:function(a,b){for(var c="var temp=date.split(/[^0-9a-zA-Z]+/g);",d=a.match(/%[a-zA-Z]/g),e=0;e<d.length;e++)switch(d[e]){case "%j":case "%d":c+="set[2]=temp["+e+"]||1;";break;case "%n":case "%m":c+="set[1]=(temp["+e+"]||1)-1;";break;case "%y":c+="set[0]=temp["+e+"]*1+(temp["+e+"]>50?1900:2000);";break;case "%g":case "%G":case "%h":case "%H":c+="set[3]=temp["+e+"]||0;";break;case "%i":c+="set[4]=temp["+e+"]||0;";break;case "%Y":c+=
|
||||
"set[0]=temp["+e+"]||0;";break;case "%a":case "%A":c+="set[3]=set[3]%12+((temp["+e+"]||'').toLowerCase()=='am'?0:12);";break;case "%s":c+="set[5]=temp["+e+"]||0;";break;case "%M":c+="set[1]=scheduler.locale.date.month_short_hash[temp["+e+"]]||0;";break;case "%F":c+="set[1]=scheduler.locale.date.month_full_hash[temp["+e+"]]||0;"}var f="set[0],set[1],set[2],set[3],set[4],set[5]";b&&(f=" Date.UTC("+f+")");return new Function("date","var set=[0,0,1,0,0,0]; "+c+" return new Date("+f+");")},getISOWeek:function(a){if(!a)return!1;
|
||||
var b=a.getDay();b===0&&(b=7);var c=new Date(a.valueOf());c.setDate(a.getDate()+(4-b));var d=c.getFullYear(),e=Math.round((c.getTime()-(new Date(d,0,1)).getTime())/864E5),f=1+Math.floor(e/7);return f},getUTCISOWeek:function(a){return this.getISOWeek(a)}};
|
||||
scheduler.locale={date:{month_full:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),month_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),day_full:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},labels:{dhx_cal_today_button:"Today",day_tab:"Day",week_tab:"Week",month_tab:"Month",new_event:"New event",icon_save:"Save",icon_cancel:"Cancel",icon_details:"Details",
|
||||
icon_edit:"Edit",icon_delete:"Delete",confirm_closing:"",confirm_deleting:"Event will be deleted permanently, are you sure?",section_description:"Description",section_time:"Time period",full_day:"Full day",confirm_recurring:"Do you want to edit the whole set of repeated events?",section_recurring:"Repeat event",button_recurring:"Disabled",button_recurring_open:"Enabled",agenda_tab:"Agenda",date:"Date",description:"Description",year_tab:"Year",week_agenda_tab:"Agenda"}};
|
||||
scheduler.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D, %F %j",hour_date:"%H:%i",month_day:"%d",xml_date:"%m/%d/%Y %H:%i",api_date:"%d-%m-%Y %H:%i",hour_size_px:42,time_step:5,start_on_monday:1,first_hour:0,last_hour:24,readonly:!1,drag_resize:1,drag_move:1,drag_create:1,dblclick_create:1,edit_on_create:1,details_on_create:0,click_form_details:0,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,drag_lightbox:!0,preserve_scroll:!0,
|
||||
server_utc:!1,positive_closing:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",height:200,map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},repeat_date_of_end:"01.01.2010"};scheduler.templates={};
|
||||
scheduler.init_templates=function(){var a=scheduler.date.date_to_str,b=scheduler.config,c=function(a,b){for(var c in b)a[c]||(a[c]=b[c])};c(scheduler.templates,{day_date:a(b.default_date),month_date:a(b.month_date),week_date:function(a,b){return scheduler.templates.day_date(a)+" – "+scheduler.templates.day_date(scheduler.date.add(b,-1,"day"))},day_scale_date:a(b.default_date),month_scale_date:a(b.week_date),week_scale_date:a(b.day_date),hour_scale:a(b.hour_date),time_picker:a(b.hour_date),event_date:a(b.hour_date),
|
||||
month_day:a(b.month_day),xml_date:scheduler.date.str_to_date(b.xml_date,b.server_utc),load_format:a(b.load_date,b.server_utc),xml_format:a(b.xml_date,b.server_utc),api_date:scheduler.date.str_to_date(b.api_date),event_header:function(a,b){return scheduler.templates.event_date(a)+" - "+scheduler.templates.event_date(b)},event_text:function(a,b,c){return c.text},event_class:function(){return""},month_date_class:function(){return""},week_date_class:function(){return""},event_bar_date:function(a){return scheduler.templates.event_date(a)+
|
||||
" "},event_bar_text:function(a,b,c){return c.text}});this.callEvent("onTemplatesReady",[])};scheduler.uid=function(){if(!this._seed)this._seed=(new Date).valueOf();return this._seed++};scheduler._events={};scheduler.clearAll=function(){this._events={};this._loaded={};this.clear_view()};
|
||||
scheduler.addEvent=function(a,b,c,d,e){if(!arguments.length)return this.addEventNow();var f=a;if(arguments.length!=1)f=e||{},f.start_date=a,f.end_date=b,f.text=c,f.id=d;f.id=f.id||scheduler.uid();f.text=f.text||"";if(typeof f.start_date=="string")f.start_date=this.templates.api_date(f.start_date);if(typeof f.end_date=="string")f.end_date=this.templates.api_date(f.end_date);var g=(this.config.event_duration||this.config.time_step)*6E4;f.start_date.valueOf()==f.end_date.valueOf()&&f.end_date.setTime(f.end_date.valueOf()+
|
||||
g);f._timed=this.is_one_day_event(f);var h=!this._events[f.id];this._events[f.id]=f;this.event_updated(f);this._loading||this.callEvent(h?"onEventAdded":"onEventChanged",[f.id,f])};scheduler.deleteEvent=function(a,b){var c=this._events[a];if(b||this.callEvent("onBeforeEventDelete",[a,c])&&this.callEvent("onConfirmedBeforeEventDelete",[a,c]))c&&(delete this._events[a],this.unselect(a),this.event_updated(c)),this.callEvent("onEventDeleted",[a])};scheduler.getEvent=function(a){return this._events[a]};
|
||||
scheduler.setEvent=function(a,b){this._events[a]=b};scheduler.for_rendered=function(a,b){for(var c=this._rendered.length-1;c>=0;c--)this._rendered[c].getAttribute("event_id")==a&&b(this._rendered[c],c)};scheduler.changeEventId=function(a,b){if(a!=b){var c=this._events[a];if(c)c.id=b,this._events[b]=c,delete this._events[a];this.for_rendered(a,function(a){a.setAttribute("event_id",b)});if(this._select_id==a)this._select_id=b;if(this._edit_id==a)this._edit_id=b;this.callEvent("onEventIdChange",[a,b])}};
|
||||
(function(){for(var a="text,Text,start_date,StartDate,end_date,EndDate".split(","),b=function(a){return function(b){return scheduler.getEvent(b)[a]}},c=function(a){return function(b,c){var d=scheduler.getEvent(b);d[a]=c;d._changed=!0;d._timed=this.is_one_day_event(d);scheduler.event_updated(d,!0)}},d=0;d<a.length;d+=2)scheduler["getEvent"+a[d+1]]=b(a[d]),scheduler["setEvent"+a[d+1]]=c(a[d])})();scheduler.event_updated=function(a){this.is_visible_events(a)?this.render_view_data():this.clear_event(a.id)};
|
||||
scheduler.is_visible_events=function(a){return a.start_date<this._max_date&&this._min_date<a.end_date};scheduler.is_one_day_event=function(a){var b=a.end_date.getDate()-a.start_date.getDate();return b?(b<0&&(b=Math.ceil((a.end_date.valueOf()-a.start_date.valueOf())/864E5)),b==1&&!a.end_date.getHours()&&!a.end_date.getMinutes()&&(a.start_date.getHours()||a.start_date.getMinutes())):a.start_date.getMonth()==a.end_date.getMonth()&&a.start_date.getFullYear()==a.end_date.getFullYear()};
|
||||
scheduler.get_visible_events=function(){var a=[],b=this["filter_"+this._mode],c;for(c in this._events)if(this.is_visible_events(this._events[c])&&(this._table_view||this.config.multi_day||this._events[c]._timed))(!b||b(c,this._events[c]))&&a.push(this._events[c]);return a};
|
||||
scheduler.render_view_data=function(a,b){if(!a){if(this._not_render){this._render_wait=!0;return}this._render_wait=!1;this.clear_view();a=this.get_visible_events()}if(this.config.multi_day&&!this._table_view){for(var c=[],d=[],e=0;e<a.length;e++)a[e]._timed?c.push(a[e]):d.push(a[e]);this._rendered_location=this._els.dhx_multi_day[0];this._table_view=!0;this.render_data(d,b);this._table_view=!1;this._rendered_location=this._els.dhx_cal_data[0];this._table_view=!1;this.render_data(c,b)}else this._rendered_location=
|
||||
this._els.dhx_cal_data[0],this.render_data(a,b)};scheduler.render_data=function(a,b){for(var a=this._pre_render_events(a,b),c=0;c<a.length;c++)this._table_view?this.render_event_bar(a[c]):this.render_event(a[c])};
|
||||
scheduler._pre_render_events=function(a,b){var c=this.xy.bar_height,d=this._colsS.heights,e=this._colsS.heights=[0,0,0,0,0,0,0],f=this._els.dhx_cal_data[0],a=this._table_view?this._pre_render_events_table(a,b):this._pre_render_events_line(a,b);if(this._table_view)if(b)this._colsS.heights=d;else{var g=f.firstChild;if(g.rows){for(var h=0;h<g.rows.length;h++){e[h]++;if(e[h]*c>this._colsS.height-22){for(var i=g.rows[h].cells,k=0;k<i.length;k++)i[k].childNodes[1].style.height=e[h]*c+"px";e[h]=(e[h-1]||
|
||||
0)+i[0].offsetHeight}e[h]=(e[h-1]||0)+g.rows[h].cells[0].offsetHeight}e.unshift(0);if(g.parentNode.offsetHeight<g.parentNode.scrollHeight&&!g._h_fix){for(h=0;h<g.rows.length;h++){var j=g.rows[h].cells[6].childNodes[0],l=j.offsetWidth-scheduler.xy.scroll_width+"px";j.style.width=l;j.nextSibling.style.width=l}g._h_fix=!0}}else if(!a.length&&this._els.dhx_multi_day[0].style.visibility=="visible"&&(e[0]=-1),a.length||e[0]==-1){var o=g.parentNode.childNodes,m=(e[0]+1)*c+1+"px";f.style.top=this._els.dhx_cal_navline[0].offsetHeight+
|
||||
this._els.dhx_cal_header[0].offsetHeight+parseInt(m)+"px";f.style.height=this._obj.offsetHeight-parseInt(f.style.top)-(this.xy.margin_top||0)+"px";var n=this._els.dhx_multi_day[0];n.style.height=m;n.style.visibility=e[0]==-1?"hidden":"visible";n=this._els.dhx_multi_day[1];n.style.height=m;n.style.visibility=e[0]==-1?"hidden":"visible";n.className=e[0]?"dhx_multi_day_icon":"dhx_multi_day_icon_small";this._dy_shift=(e[0]+1)*c;e[0]=0}}return a};
|
||||
scheduler._get_event_sday=function(a){return Math.floor((a.start_date.valueOf()-this._min_date.valueOf())/864E5)};
|
||||
scheduler._pre_render_events_line=function(a,b){a.sort(function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});for(var c=[],d=[],e=0;e<a.length;e++){var f=a[e],g=f.start_date.getHours(),h=f.end_date.getHours();f._sday=this._get_event_sday(f);c[f._sday]||(c[f._sday]=[]);if(!b){f._inner=!1;for(var i=c[f._sday];i.length&&i[i.length-1].end_date<=f.start_date;)i.splice(i.length-1,1);for(var k=!1,j=0;j<i.length;j++)if(i[j].end_date.valueOf()<f.start_date.valueOf()){k=
|
||||
!0;f._sorder=i[j]._sorder;i.splice(j,1);f._inner=!0;break}if(i.length)i[i.length-1]._inner=!0;if(!k)if(i.length)if(i.length<=i[i.length-1]._sorder){if(i[i.length-1]._sorder)for(j=0;j<i.length;j++){var l=!1;for(k=0;k<i.length;k++)if(i[k]._sorder==j){l=!0;break}if(!l){f._sorder=j;break}}else f._sorder=0;f._inner=!0}else{l=i[0]._sorder;for(j=1;j<i.length;j++)if(i[j]._sorder>l)l=i[j]._sorder;f._sorder=l+1;f._inner=!1}else f._sorder=0;i.push(f);i.length>(i.max_count||0)?(i.max_count=i.length,f._count=
|
||||
i.length):f._count=f._count?f._count:1}if(g<this.config.first_hour||h>=this.config.last_hour)if(d.push(f),a[e]=f=this._copy_event(f),g<this.config.first_hour&&(f.start_date.setHours(this.config.first_hour),f.start_date.setMinutes(0)),h>=this.config.last_hour&&(f.end_date.setMinutes(0),f.end_date.setHours(this.config.last_hour)),f.start_date>f.end_date||g==this.config.last_hour)a.splice(e,1),e--}if(!b){for(e=0;e<a.length;e++)a[e]._count=c[a[e]._sday].max_count;for(e=0;e<d.length;e++)d[e]._count=c[d[e]._sday].max_count}return a};
|
||||
scheduler._time_order=function(a){a.sort(function(a,c){return a.start_date.valueOf()==c.start_date.valueOf()?a._timed&&!c._timed?1:!a._timed&&c._timed?-1:a.id>c.id?1:-1:a.start_date>c.start_date?1:-1})};
|
||||
scheduler._pre_render_events_table=function(a,b){this._time_order(a);for(var c=[],d=[[],[],[],[],[],[],[]],e=this._colsS.heights,f,g=this._cols.length,h=0;h<a.length;h++){var i=a[h],k=f||i.start_date,j=i.end_date;if(k<this._min_date)k=this._min_date;if(j>this._max_date)j=this._max_date;var l=this.locate_holder_day(k,!1,i);i._sday=l%g;var o=this.locate_holder_day(j,!0,i)||g;i._eday=o%g||g;i._length=o-l;i._sweek=Math.floor((this._correct_shift(k.valueOf(),1)-this._min_date.valueOf())/(864E5*g));var m=
|
||||
d[i._sweek],n;for(n=0;n<m.length;n++)if(m[n]._eday<=i._sday)break;if(!i._sorder||!b)i._sorder=n;if(i._sday+i._length<=g)f=null,c.push(i),m[n]=i,e[i._sweek]=m.length-1;else{var p=this._copy_event(i);p._length=g-i._sday;p._eday=g;p._sday=i._sday;p._sweek=i._sweek;p._sorder=i._sorder;p.end_date=this.date.add(k,p._length,"day");c.push(p);m[n]=p;f=p.end_date;e[i._sweek]=m.length-1;h--}}return c};scheduler._copy_dummy=function(){this.start_date=new Date(this.start_date);this.end_date=new Date(this.end_date)};
|
||||
scheduler._copy_event=function(a){this._copy_dummy.prototype=a;return new this._copy_dummy};scheduler._rendered=[];scheduler.clear_view=function(){for(var a=0;a<this._rendered.length;a++){var b=this._rendered[a];b.parentNode&&b.parentNode.removeChild(b)}this._rendered=[]};scheduler.updateEvent=function(a){var b=this.getEvent(a);this.clear_event(a);b&&this.is_visible_events(b)&&this.render_view_data([b],!0)};
|
||||
scheduler.clear_event=function(a){this.for_rendered(a,function(a,c){a.parentNode&&a.parentNode.removeChild(a);scheduler._rendered.splice(c,1)})};
|
||||
scheduler.render_event=function(a){var b=scheduler.xy.menu_width;if(!(a._sday<0)){var c=scheduler.locate_holder(a._sday);if(c){var d=a.start_date.getHours()*60+a.start_date.getMinutes(),e=a.end_date.getHours()*60+a.end_date.getMinutes()||scheduler.config.last_hour*60,f=Math.round((d*6E4-this.config.first_hour*36E5)*this.config.hour_size_px/36E5)%(this.config.hour_size_px*24)+1,g=Math.max(scheduler.xy.min_event_height,(e-d)*this.config.hour_size_px/60)+1,h=Math.floor((c.clientWidth-b)/a._count),i=
|
||||
a._sorder*h+1;a._inner||(h*=a._count-a._sorder);if(this.config.cascade_event_display)var k=this.config.cascade_event_count,j=this.config.cascade_event_margin,i=a._sorder%k*j,l=a._inner?(a._count-a._sorder-1)%k*j/2:0,h=Math.floor(c.clientWidth-b-i-l);var o=this._render_v_bar(a.id,b+i,f,h,g,a._text_style,scheduler.templates.event_header(a.start_date,a.end_date,a),scheduler.templates.event_text(a.start_date,a.end_date,a));this._rendered.push(o);c.appendChild(o);i=i+parseInt(c.style.left,10)+b;if(this._edit_id==
|
||||
a.id){o.style.zIndex=1;h=Math.max(h-4,scheduler.xy.editor_width);o=document.createElement("DIV");o.setAttribute("event_id",a.id);this.set_xy(o,h,g-20,i,f+14);o.className="dhx_cal_editor";var m=document.createElement("DIV");this.set_xy(m,h-6,g-26);m.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;";o.appendChild(m);this._els.dhx_cal_data[0].appendChild(o);this._rendered.push(o);m.innerHTML="<textarea class='dhx_cal_editor'>"+a.text+"</textarea>";if(this._quirks7)m.firstChild.style.height=g-
|
||||
12+"px";this._editor=m.firstChild;this._editor.onkeypress=function(a){if((a||event).shiftKey)return!0;var b=(a||event).keyCode;b==scheduler.keys.edit_save&&scheduler.editStop(!0);b==scheduler.keys.edit_cancel&&scheduler.editStop(!1)};this._editor.onselectstart=function(a){return(a||event).cancelBubble=!0};m.firstChild.focus();this._els.dhx_cal_data[0].scrollLeft=0;m.firstChild.select()}if(this._select_id==a.id){if(this.config.cascade_event_display&&this._drag_mode)o.style.zIndex=1;for(var n=this.config["icons_"+
|
||||
(this._edit_id==a.id?"edit":"select")],p="",q=a.color?"background-color:"+a.color+";":"",v=a.textColor?"color:"+a.textColor+";":"",s=0;s<n.length;s++)p+="<div class='dhx_menu_icon "+n[s]+"' style='"+q+""+v+"' title='"+this.locale.labels[n[s]]+"'></div>";var r=this._render_v_bar(a.id,i-b+1,f,b,n.length*20+26,"","<div style='"+q+""+v+"' class='dhx_menu_head'></div>",p,!0);r.style.left=i-b+1;this._els.dhx_cal_data[0].appendChild(r);this._rendered.push(r)}}}};
|
||||
scheduler._render_v_bar=function(a,b,c,d,e,f,g,h,i){var k=document.createElement("DIV"),j=this.getEvent(a),l="dhx_cal_event",o=scheduler.templates.event_class(j.start_date,j.end_date,j);o&&(l=l+" "+o);var m=j.color?"background-color:"+j.color+";":"",n=j.textColor?"color:"+j.textColor+";":"",p='<div event_id="'+a+'" class="'+l+'" style="position:absolute; top:'+c+"px; left:"+b+"px; width:"+(d-4)+"px; height:"+e+"px;"+(f||"")+'">';p+='<div class="dhx_header" style=" width:'+(d-6)+"px;"+m+'" > </div>';
|
||||
p+='<div class="dhx_title" style="'+m+""+n+'">'+g+"</div>";p+='<div class="dhx_body" style=" width:'+(d-(this._quirks?4:14))+"px; height:"+(e-(this._quirks?20:30))+"px;"+m+""+n+'">'+h+"</div>";p+='<div class="dhx_footer" style=" width:'+(d-8)+"px;"+(i?" margin-top:-1px;":"")+""+m+""+n+'" ></div></div>';k.innerHTML=p;return k.firstChild};scheduler.locate_holder=function(a){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[a]};
|
||||
scheduler.locate_holder_day=function(a,b){var c=Math.floor((this._correct_shift(a,1)-this._min_date)/864E5);b&&this.date.time_part(a)&&c++;return c};
|
||||
scheduler.render_event_bar=function(a){var b=this._rendered_location,c=this._colsS[a._sday],d=this._colsS[a._eday];d==c&&(d=this._colsS[a._eday+1]);var e=this.xy.bar_height,f=this._colsS.heights[a._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+a._sorder*e,g=document.createElement("DIV"),h=a._timed?"dhx_cal_event_clear":"dhx_cal_event_line",i=scheduler.templates.event_class(a.start_date,a.end_date,a);i&&(h=h+" "+i);var k=a.color?"background-color:"+a.color+";":"",j=a.textColor?"color:"+
|
||||
a.textColor+";":"",l='<div event_id="'+a.id+'" class="'+h+'" style="position:absolute; top:'+f+"px; left:"+c+"px; width:"+(d-c-15)+"px;"+j+""+k+""+(a._text_style||"")+'">';a._timed&&(l+=scheduler.templates.event_bar_date(a.start_date,a.end_date,a));l+=scheduler.templates.event_bar_text(a.start_date,a.end_date,a)+"</div>";l+="</div>";g.innerHTML=l;this._rendered.push(g.firstChild);b.appendChild(g.firstChild)};
|
||||
scheduler._locate_event=function(a){for(var b=null;a&&!b&&a.getAttribute;)b=a.getAttribute("event_id"),a=a.parentNode;return b};scheduler.edit=function(a){if(this._edit_id!=a)this.editStop(!1,a),this._edit_id=a,this.updateEvent(a)};scheduler.editStop=function(a,b){if(!(b&&this._edit_id==b)){var c=this.getEvent(this._edit_id);if(c){if(a)c.text=this._editor.value;this._editor=this._edit_id=null;this.updateEvent(c.id);this._edit_stop_event(c,a)}}};
|
||||
scheduler._edit_stop_event=function(a,b){this._new_event?(b?this.callEvent("onEventAdded",[a.id,a]):this.deleteEvent(a.id,!0),this._new_event=null):b&&this.callEvent("onEventChanged",[a.id,a])};scheduler.getEvents=function(a,b){var c=[],d;for(d in this._events){var e=this._events[d];e&&e.start_date<b&&e.end_date>a&&c.push(e)}return c};scheduler._loaded={};
|
||||
scheduler._load=function(a,b){a=a||this._load_url;a+=(a.indexOf("?")==-1?"?":"&")+"timeshift="+(new Date).getTimezoneOffset();this.config.prevent_cache&&(a+="&uid="+this.uid());var c,b=b||this._date;if(this._load_mode){for(var d=this.templates.load_format,b=this.date[this._load_mode+"_start"](new Date(b.valueOf()));b>this._min_date;)b=this.date.add(b,-1,this._load_mode);c=b;for(var e=!0;c<this._max_date;)c=this.date.add(c,1,this._load_mode),this._loaded[d(b)]&&e?b=this.date.add(b,1,this._load_mode):
|
||||
e=!1;var f=c;do c=f,f=this.date.add(c,-1,this._load_mode);while(f>b&&this._loaded[d(f)]);if(c<=b)return!1;for(dhtmlxAjax.get(a+"&from="+d(b)+"&to="+d(c),function(a){scheduler.on_load(a)});b<c;)this._loaded[d(b)]=!0,b=this.date.add(b,1,this._load_mode)}else dhtmlxAjax.get(a,function(a){scheduler.on_load(a)});this.callEvent("onXLS",[]);return!0};
|
||||
scheduler.on_load=function(a){this._loading=!0;var b;b=this._process?this[this._process].parse(a.xmlDoc.responseText):this._magic_parser(a);this._not_render=!0;for(var c=0;c<b.length;c++)this.callEvent("onEventLoading",[b[c]])&&this.addEvent(b[c]);this._not_render=!1;this._render_wait&&this.render_view_data();this._loading=!1;this._after_call&&this._after_call();this._after_call=null;this.callEvent("onXLE",[])};scheduler.json={};
|
||||
scheduler.json.parse=function(a){if(typeof a=="string")eval("scheduler._temp = "+a+";"),a=scheduler._temp;for(var b=[],c=0;c<a.length;c++)a[c].start_date=scheduler.templates.xml_date(a[c].start_date),a[c].end_date=scheduler.templates.xml_date(a[c].end_date),b.push(a[c]);return b};scheduler.parse=function(a,b){this._process=b;this.on_load({xmlDoc:{responseText:a}})};scheduler.load=function(a,b,c){if(typeof b=="string")this._process=b,b=c;this._load_url=a;this._after_call=b;this._load(a,this._date)};
|
||||
scheduler.setLoadMode=function(a){a=="all"&&(a="");this._load_mode=a};scheduler.refresh=function(){alert("not implemented")};scheduler.serverList=function(a,b){return b?this.serverList[a]=b.slice(0):this.serverList[a]=this.serverList[a]||[]};scheduler._userdata={};
|
||||
scheduler._magic_parser=function(a){var b;if(!a.getXMLTopNode){var c=a.xmlDoc.responseText,a=new dtmlXMLLoaderObject(function(){});a.loadXMLString(c)}b=a.getXMLTopNode("data");if(b.tagName!="data")return[];for(var d=a.doXPath("//coll_options"),e=0;e<d.length;e++){var f=d[e].getAttribute("for"),g=this.serverList[f];if(g){g.splice(0,g.length);for(var h=a.doXPath(".//item",d[e]),i=0;i<h.length;i++){for(var k=h[i],j=k.attributes,l={key:h[i].getAttribute("value"),label:h[i].getAttribute("label")},o=0;o<
|
||||
j.length;o++){var m=j[o];if(!(m.nodeName=="value"||m.nodeName=="label"))l[m.nodeName]=m.nodeValue}g.push(l)}}}d.length&&scheduler.callEvent("onOptionsLoad",[]);for(var n=a.doXPath("//userdata"),e=0;e<n.length;e++){var p=this.xmlNodeToJSON(n[e]);this._userdata[p.name]=p.text}var q=[];b=a.doXPath("//event");for(e=0;e<b.length;e++)q[e]=this.xmlNodeToJSON(b[e]),q[e].text=q[e].text||q[e]._tagvalue,q[e].start_date=this.templates.xml_date(q[e].start_date),q[e].end_date=this.templates.xml_date(q[e].end_date);
|
||||
return q};scheduler.xmlNodeToJSON=function(a){for(var b={},c=0;c<a.attributes.length;c++)b[a.attributes[c].name]=a.attributes[c].value;for(c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.nodeType==1&&(b[d.tagName]=d.firstChild?d.firstChild.nodeValue:"")}if(!b.text)b.text=a.firstChild?a.firstChild.nodeValue:"";return b};
|
||||
scheduler.attachEvent("onXLS",function(){if(this.config.show_loading===!0){var a;a=this.config.show_loading=document.createElement("DIV");a.className="dhx_loading";a.style.left=Math.round((this._x-128)/2)+"px";a.style.top=Math.round((this._y-15)/2)+"px";this._obj.appendChild(a)}});scheduler.attachEvent("onXLE",function(){var a;if((a=this.config.show_loading)&&typeof a=="object")this._obj.removeChild(a),this.config.show_loading=!0});
|
||||
scheduler.ical={parse:function(a){var b=a.match(RegExp(this.c_start+"[^\u000c]*"+this.c_end,""));if(b.length){b[0]=b[0].replace(/[\r\n]+(?=[a-z \t])/g," ");b[0]=b[0].replace(/\;[^:\r\n]*/g,"");for(var c=[],d,e=RegExp("(?:"+this.e_start+")([^\u000c]*?)(?:"+this.e_end+")","g");d=e.exec(b);){for(var f={},g,h=/[^\r\n]+[\r\n]+/g;g=h.exec(d[1]);)this.parse_param(g.toString(),f);if(f.uid&&!f.id)f.id=f.uid;c.push(f)}return c}},parse_param:function(a,b){var c=a.indexOf(":");if(c!=-1){var d=a.substr(0,c).toLowerCase(),
|
||||
e=a.substr(c+1).replace(/\\\,/g,",").replace(/[\r\n]+$/,"");d=="summary"?d="text":d=="dtstart"?(d="start_date",e=this.parse_date(e,0,0)):d=="dtend"&&(d="end_date",e=b.start_date&&b.start_date.getHours()==0?this.parse_date(e,24,0):this.parse_date(e,23,59));b[d]=e}},parse_date:function(a,b,c){var d=a.split("T");d[1]&&(b=d[1].substr(0,2),c=d[1].substr(2,2));var e=d[0].substr(0,4),f=parseInt(d[0].substr(4,2),10)-1,g=d[0].substr(6,2);return scheduler.config.server_utc&&!d[1]?new Date(Date.UTC(e,f,g,b,
|
||||
c)):new Date(e,f,g,b,c)},c_start:"BEGIN:VCALENDAR",e_start:"BEGIN:VEVENT",e_end:"END:VEVENT",c_end:"END:VCALENDAR"};scheduler.formSection=function(a){for(var b=this.config.lightbox.sections,c=0;c<b.length;c++)if(b[c].name==a)break;var d=b[c],e=document.getElementById(d.id).nextSibling;return{getValue:function(a){return scheduler.form_blocks[d.type].get_value(e,a||{},d)},setValue:function(a,b){return scheduler.form_blocks[d.type].set_value(e,a,b||{},d)}}};
|
||||
scheduler.form_blocks={template:{render:function(a){var b=(a.height||"30")+"px";return"<div class='dhx_cal_ltext dhx_cal_template' style='height:"+b+";'></div>"},set_value:function(a,b){a.innerHTML=b||""},get_value:function(a){return a.innerHTML||""},focus:function(){}},textarea:{render:function(a){var b=(a.height||"130")+"px";return"<div class='dhx_cal_ltext' style='height:"+b+";'><textarea></textarea></div>"},set_value:function(a,b){a.firstChild.value=b||""},get_value:function(a){return a.firstChild.value},
|
||||
focus:function(a){var b=a.firstChild;b.select();b.focus()}},select:{render:function(a){for(var b=(a.height||"23")+"px",c="<div class='dhx_cal_ltext' style='height:"+b+";'><select style='width:100%;'>",d=0;d<a.options.length;d++)c+="<option value='"+a.options[d].key+"'>"+a.options[d].label+"</option>";c+="</select></div>";return c},set_value:function(a,b){if(typeof b=="undefined")b=(a.firstChild.options[0]||{}).value;a.firstChild.value=b||""},get_value:function(a){return a.firstChild.value},focus:function(a){var b=
|
||||
a.firstChild;b.select&&b.select();b.focus()}},time:{render:function(){var a=scheduler.config,b=this.date.date_part(new Date),c=1440,d=0;scheduler.config.limit_time_select&&(c=60*a.last_hour+1,d=60*a.first_hour,b.setHours(a.first_hour));for(var e="<select>",f=d,g=b.getDate();f<c;){var h=this.templates.time_picker(b);e+="<option value='"+f+"'>"+h+"</option>";b.setTime(b.valueOf()+this.config.time_step*6E4);var i=b.getDate()!=g?1:0,f=i*1440+b.getHours()*60+b.getMinutes()}e+="</select> <select>";for(f=
|
||||
1;f<32;f++)e+="<option value='"+f+"'>"+f+"</option>";e+="</select> <select>";for(f=0;f<12;f++)e+="<option value='"+f+"'>"+this.locale.date.month_full[f]+"</option>";e+="</select> <select>";b=b.getFullYear()-5;for(f=0;f<10;f++)e+="<option value='"+(b+f)+"'>"+(b+f)+"</option>";e+="</select> ";return"<div style='height:30px;padding-top:0px;font-size:inherit;' class='dhx_section_time'>"+e+"<span style='font-weight:normal; font-size:10pt;'> – </span>"+e+"</div>"},set_value:function(a,
|
||||
b,c){function d(a,b,c){a[b+0].value=Math.round((c.getHours()*60+c.getMinutes())/scheduler.config.time_step)*scheduler.config.time_step;a[b+1].value=c.getDate();a[b+2].value=c.getMonth();a[b+3].value=c.getFullYear()}var e=a.getElementsByTagName("select");if(scheduler.config.full_day){if(!a._full_day){var f="<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+scheduler.locale.labels.full_day+" </label></input>";scheduler.config.wide_form||(f=a.previousSibling.innerHTML+
|
||||
f);a.previousSibling.innerHTML=f;a._full_day=!0}var g=a.previousSibling.getElementsByTagName("input")[0],h=scheduler.date.time_part(c.start_date)===0&&scheduler.date.time_part(c.end_date)===0&&c.end_date.valueOf()-c.start_date.valueOf()<1728E5;g.checked=h;for(var i in e)e[i].disabled=g.checked;g.onclick=function(){if(g.checked){var a=new Date(c.start_date),b=new Date(c.end_date);scheduler.date.date_part(a);b=scheduler.date.add(a,1,"day")}for(var f in e)e[f].disabled=g.checked;d(e,0,a||c.start_date);
|
||||
d(e,4,b||c.end_date)}}if(scheduler.config.auto_end_date&&scheduler.config.event_duration)for(var k=function(){c.start_date=new Date(e[3].value,e[2].value,e[1].value,0,e[0].value);c.end_date.setTime(c.start_date.getTime()+scheduler.config.event_duration*6E4);d(e,4,c.end_date)},j=0;j<4;j++)e[j].onchange=k;d(e,0,c.start_date);d(e,4,c.end_date)},get_value:function(a,b){s=a.getElementsByTagName("select");b.start_date=new Date(s[3].value,s[2].value,s[1].value,0,s[0].value);b.end_date=new Date(s[7].value,
|
||||
s[6].value,s[5].value,0,s[4].value);if(b.end_date<=b.start_date)b.end_date=scheduler.date.add(b.start_date,scheduler.config.time_step,"minute")},focus:function(a){a.getElementsByTagName("select")[0].focus()}}};
|
||||
scheduler.showCover=function(a){if(a){a.style.display="block";var b=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,c=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,d=window.innerHeight||document.documentElement.clientHeight;a.style.top=b?Math.round(b+Math.max((d-a.offsetHeight)/2,0))+"px":Math.round(Math.max((d-a.offsetHeight)/2,0)+9)+"px";a.style.left=document.documentElement.scrollWidth>document.body.offsetWidth?Math.round(c+(document.body.offsetWidth-
|
||||
a.offsetWidth)/2)+"px":Math.round((document.body.offsetWidth-a.offsetWidth)/2)+"px"}this.show_cover()};scheduler.showLightbox=function(a){if(a&&this.callEvent("onBeforeLightbox",[a])){var b=this._get_lightbox();this.showCover(b);this._fill_lightbox(a,b);this.callEvent("onLightbox",[a])}};
|
||||
scheduler._fill_lightbox=function(a,b){var c=this.getEvent(a),d=b.getElementsByTagName("span");scheduler.templates.lightbox_header?(d[1].innerHTML="",d[2].innerHTML=scheduler.templates.lightbox_header(c.start_date,c.end_date,c)):(d[1].innerHTML=this.templates.event_header(c.start_date,c.end_date,c),d[2].innerHTML=(this.templates.event_bar_text(c.start_date,c.end_date,c)||"").substr(0,70));for(var e=this.config.lightbox.sections,f=0;f<e.length;f++){var g=document.getElementById(e[f].id).nextSibling,
|
||||
h=this.form_blocks[e[f].type];h.set_value.call(this,g,c[e[f].map_to],c,e[f]);e[f].focus&&h.focus.call(this,g)}scheduler._lightbox_id=a};scheduler._lightbox_out=function(a){for(var b=this.config.lightbox.sections,c=0;c<b.length;c++){var d=document.getElementById(b[c].id),d=d?d.nextSibling:d,e=this.form_blocks[b[c].type],f=e.get_value.call(this,d,a,b[c]);b[c].map_to!="auto"&&(a[b[c].map_to]=f)}return a};
|
||||
scheduler._empty_lightbox=function(){var a=scheduler._lightbox_id,b=this.getEvent(a),c=this._get_lightbox();this._lightbox_out(b);b._timed=this.is_one_day_event(b);this.setEvent(b.id,b);this._edit_stop_event(b,!0);this.render_view_data()};scheduler.hide_lightbox=function(){this.hideCover(this._get_lightbox());this._lightbox_id=null;this.callEvent("onAfterLightbox",[])};scheduler.hideCover=function(a){if(a)a.style.display="none";this.hide_cover()};
|
||||
scheduler.hide_cover=function(){this._cover&&this._cover.parentNode.removeChild(this._cover);this._cover=null};scheduler.show_cover=function(){this._cover=document.createElement("DIV");this._cover.className="dhx_cal_cover";var a=document.height!==void 0?document.height:document.body.offsetHeight,b=document.documentElement?document.documentElement.scrollHeight:0;this._cover.style.height=Math.max(a,b)+"px";document.body.appendChild(this._cover)};
|
||||
scheduler.save_lightbox=function(){if(!this.checkEvent("onEventSave")||this.callEvent("onEventSave",[this._lightbox_id,this._lightbox_out({id:this._lightbox_id}),this._new_event]))this._empty_lightbox(),this.hide_lightbox()};scheduler.startLightbox=function(a,b){this._lightbox_id=a;this.showCover(b)};scheduler.endLightbox=function(a,b){this._edit_stop_event(scheduler.getEvent(this._lightbox_id),a);a&&scheduler.render_view_data();this.hideCover(b)};
|
||||
scheduler.resetLightbox=function(){scheduler._lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);scheduler._lightbox=null};scheduler.cancel_lightbox=function(){this.callEvent("onEventCancel",[this._lightbox_id,this._new_event]);this.endLightbox(!1);this.hide_lightbox()};
|
||||
scheduler._init_lightbox_events=function(){this._get_lightbox().onclick=function(a){var b=a?a.target:event.srcElement;if(!b.className)b=b.previousSibling;if(b&&b.className)switch(b.className){case "dhx_save_btn":scheduler.save_lightbox();break;case "dhx_delete_btn":var c=scheduler.locale.labels.confirm_deleting;if(!c||confirm(c))scheduler.deleteEvent(scheduler._lightbox_id),scheduler._new_event=null,scheduler.hide_lightbox();break;case "dhx_cancel_btn":scheduler.cancel_lightbox();break;default:if(b.getAttribute("dhx_button"))scheduler.callEvent("onLightboxButton",
|
||||
[b.className,b,a]);else if(b.className.indexOf("dhx_custom_button_")!=-1){var d=b.parentNode.getAttribute("index"),e=scheduler.form_blocks[scheduler.config.lightbox.sections[d].type],f=b.parentNode.parentNode;e.button_click(d,b,f,f.nextSibling)}}};this._get_lightbox().onkeydown=function(a){switch((a||event).keyCode){case scheduler.keys.edit_save:if((a||event).shiftKey)break;scheduler.save_lightbox();break;case scheduler.keys.edit_cancel:scheduler.cancel_lightbox()}}};
|
||||
scheduler.setLightboxSize=function(){var a=this._lightbox;if(a){var b=a.childNodes[1];b.style.height="0px";b.style.height=b.scrollHeight+"px";a.style.height=b.scrollHeight+50+"px";b.style.height=b.scrollHeight+"px"}};scheduler._init_dnd_events=function(){dhtmlxEvent(document.body,"mousemove",scheduler._move_while_dnd);dhtmlxEvent(document.body,"mouseup",scheduler._finish_dnd);scheduler._init_dnd_events=function(){}};
|
||||
scheduler._move_while_dnd=function(a){if(scheduler._dnd_start_lb){if(!document.dhx_unselectable)document.body.className+=" dhx_unselectable",document.dhx_unselectable=!0;var b=scheduler._get_lightbox(),c=a&&a.target?[a.pageX,a.pageY]:[event.clientX,event.clientY];b.style.top=scheduler._lb_start[1]+c[1]-scheduler._dnd_start_lb[1]+"px";b.style.left=scheduler._lb_start[0]+c[0]-scheduler._dnd_start_lb[0]+"px"}};
|
||||
scheduler._ready_to_dnd=function(a){var b=scheduler._get_lightbox();scheduler._lb_start=[parseInt(b.style.left,10),parseInt(b.style.top,10)];scheduler._dnd_start_lb=a&&a.target?[a.pageX,a.pageY]:[event.clientX,event.clientY]};scheduler._finish_dnd=function(){if(scheduler._lb_start)scheduler._lb_start=scheduler._dnd_start_lb=!1,document.body.className=document.body.className.replace(" dhx_unselectable",""),document.dhx_unselectable=!1};
|
||||
scheduler._get_lightbox=function(){if(!this._lightbox){var a=document.createElement("DIV");a.className="dhx_cal_light";scheduler.config.wide_form&&(a.className+=" dhx_cal_light_wide");scheduler.form_blocks.recurring&&(a.className+=" dhx_cal_light_rec");/msie|MSIE 6/.test(navigator.userAgent)&&(a.className+=" dhx_ie6");a.style.visibility="hidden";var b=this._lightbox_template,c=this.config.buttons_left;scheduler.locale.labels.dhx_save_btn=scheduler.locale.labels.icon_save;scheduler.locale.labels.dhx_cancel_btn=
|
||||
scheduler.locale.labels.icon_cancel;scheduler.locale.labels.dhx_delete_btn=scheduler.locale.labels.icon_delete;for(var d=0;d<c.length;d++)b+="<div class='dhx_btn_set'><div dhx_button='1' class='"+c[d]+"'></div><div>"+scheduler.locale.labels[c[d]]+"</div></div>";c=this.config.buttons_right;for(d=0;d<c.length;d++)b+="<div class='dhx_btn_set' style='float:right;'><div dhx_button='1' class='"+c[d]+"'></div><div>"+scheduler.locale.labels[c[d]]+"</div></div>";b+="</div>";a.innerHTML=b;if(scheduler.config.drag_lightbox)a.firstChild.onmousedown=
|
||||
scheduler._ready_to_dnd,a.firstChild.onselectstart=function(){return!1},a.firstChild.style.cursor="pointer",scheduler._init_dnd_events();document.body.insertBefore(a,document.body.firstChild);this._lightbox=a;for(var e=this.config.lightbox.sections,b="",d=0;d<e.length;d++){var f=this.form_blocks[e[d].type];if(f){e[d].id="area_"+this.uid();var g="";e[d].button&&(g="<div class='dhx_custom_button' index='"+d+"'><div class='dhx_custom_button_"+e[d].button+"'></div><div>"+this.locale.labels["button_"+
|
||||
e[d].button]+"</div></div>");this.config.wide_form&&(b+="<div class='dhx_wrap_section'>");b+="<div id='"+e[d].id+"' class='dhx_cal_lsection'>"+g+this.locale.labels["section_"+e[d].name]+"</div>"+f.render.call(this,e[d]);b+="</div>"}}var h=a.getElementsByTagName("div");h[1].innerHTML=b;this.setLightboxSize();this._init_lightbox_events(this);a.style.display="none";a.style.visibility="visible"}return this._lightbox};scheduler._lightbox_template="<div class='dhx_cal_ltitle'><span class='dhx_mark'> </span><span class='dhx_time'></span><span class='dhx_title'></span></div><div class='dhx_cal_larea'></div>";
|
||||
scheduler._dp_init=function(a){a._methods=["setEventTextStyle","","changeEventId","deleteEvent"];this.attachEvent("onEventAdded",function(b){!this._loading&&this.validId(b)&&a.setUpdated(b,!0,"inserted")});this.attachEvent("onConfirmedBeforeEventDelete",function(b){if(this.validId(b)){var c=a.getState(b);if(c=="inserted"||this._new_event)return a.setUpdated(b,!1),!0;if(c=="deleted")return!1;if(c=="true_deleted")return!0;a.setUpdated(b,!0,"deleted");return!1}});this.attachEvent("onEventChanged",function(b){!this._loading&&
|
||||
this.validId(b)&&a.setUpdated(b,!0,"updated")});a._getRowData=function(a){var c=this.obj.getEvent(a),d={},e;for(e in c)e.indexOf("_")!=0&&(d[e]=c[e]&&c[e].getUTCFullYear?this.obj.templates.xml_format(c[e]):c[e]);return d};a._clearUpdateFlag=function(){};a.attachEvent("insertCallback",scheduler._update_callback);a.attachEvent("updateCallback",scheduler._update_callback);a.attachEvent("deleteCallback",function(a,c){this.obj.setUserData(c,this.action_param,"true_deleted");this.obj.deleteEvent(c)})};
|
||||
scheduler.setUserData=function(a,b,c){a?this.getEvent(a)[b]=c:this._userdata[b]=c};scheduler.getUserData=function(a,b){return a?this.getEvent(a)[b]:this._userdata[b]};scheduler.setEventTextStyle=function(a,b){this.for_rendered(a,function(a){a.style.cssText+=";"+b});var c=this.getEvent(a);c._text_style=b;this.event_updated(c)};scheduler.validId=function(){return!0};
|
||||
scheduler._update_callback=function(a){var b=scheduler.xmlNodeToJSON(a.firstChild);b.text=b.text||b._tagvalue;b.start_date=scheduler.templates.xml_date(b.start_date);b.end_date=scheduler.templates.xml_date(b.end_date);scheduler.addEvent(b)};
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTemplatesReady",function(){var d=scheduler.date.str_to_date(scheduler.config.api_date),b=scheduler.date.date_to_str(scheduler.config.api_date),e=scheduler.templates.month_day;scheduler.templates.month_day=function(a){return"<a jump_to='"+b(a)+"' href='#'>"+e(a)+"</a>"};var f=scheduler.templates.week_scale_date;scheduler.templates.week_scale_date=function(a){return"<a jump_to='"+b(a)+"' href='#'>"+f(a)+"</a>"};dhtmlxEvent(this._obj,"click",function(a){var b=a.target||event.srcElement,
|
||||
c=b.getAttribute("jump_to");if(c)return scheduler.setCurrentView(d(c),"day"),a&&a.preventDefault&&a.preventDefault(),!1})});
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.date.add_agenda=function(b){return new Date(b.valueOf())};scheduler.dblclick_dhx_agenda_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow()};scheduler.templates.agenda_time=function(b,d,a){return a._timed?this.day_date(a.start_date,a.end_date,a)+" "+this.event_date(b):scheduler.templates.day_date(b)+" – "+scheduler.templates.day_date(d)};scheduler.templates.agenda_text=function(b,d,a){return a.text};scheduler.date.agenda_start=function(b){return b};
|
||||
scheduler.attachEvent("onTemplatesReady",function(){function b(b){if(b){var a=scheduler.locale.labels;scheduler._els.dhx_cal_header[0].innerHTML="<div class='dhx_agenda_line'><div>"+a.date+"</div><span style='padding-left:25px'>"+a.description+"</span></div>";scheduler._table_view=!0;scheduler.set_sizes()}}function d(){var b=scheduler._date,a=scheduler.get_visible_events();a.sort(function(a,b){return a.start_date>b.start_date?1:-1});for(var d="<div class='dhx_agenda_area'>",e=0;e<a.length;e++){var c=
|
||||
a[e],f=c.color?"background-color:"+c.color+";":"",h=c.textColor?"color:"+c.textColor+";":"";d+="<div class='dhx_agenda_line' event_id='"+c.id+"' style='"+h+""+f+""+(c._text_style||"")+"'><div>"+scheduler.templates.agenda_time(c.start_date,c.end_date,c)+"</div>";d+="<div class='dhx_event_icon icon_details'> </div>";d+="<span>"+scheduler.templates.agenda_text(c.start_date,c.end_date,c)+"</span></div>"}d+="<div class='dhx_v_border'></div></div>";scheduler._els.dhx_cal_data[0].innerHTML=d;scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop=
|
||||
scheduler._agendaScrollTop||0;var g=scheduler._els.dhx_cal_data[0].firstChild.childNodes;scheduler._els.dhx_cal_date[0].innerHTML="";scheduler._rendered=[];for(e=0;e<g.length-1;e++)scheduler._rendered[e]=g[e]}scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="agenda"?(this.agenda_view(!0),!1):!0});var a=scheduler.render_data;scheduler.render_data=function(b){if(this._mode=="agenda")d();else return a.apply(this,arguments)};var f=scheduler.render_view_data;scheduler.render_view_data=
|
||||
function(){this._mode=="agenda"?(scheduler._agendaScrollTop=scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop,scheduler._els.dhx_cal_data[0].childNodes[0].scrollTop=0,scheduler._els.dhx_cal_data[0].style.overflowY="hidden"):scheduler._els.dhx_cal_data[0].style.overflowY="auto";return f.apply(this,arguments)};scheduler.agenda_view=function(a){scheduler._min_date=scheduler.config.agenda_start||new Date;scheduler._max_date=scheduler.config.agenda_end||new Date(9999,1,1);scheduler._table_view=!0;
|
||||
b(a);a&&d()}});
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
(function(){function h(a){var b=scheduler._props?scheduler._props[scheduler._mode]:null,f=scheduler.matrix?scheduler.matrix[scheduler._mode]:null,c=b||f;if(b)var d=c.map_to;if(f)d=c.y_property;c&&a&&(n=scheduler.getEvent(a)[d])}function g(a){var b=[];if(a.rec_type){for(var f=scheduler.getRecDates(a),c=0;c<f.length;c++)for(var d=scheduler.getEvents(f[c].start_date,f[c].end_date),i=0;i<d.length;i++)(d[i].event_pid||d[i].id)!=a.id&&b.push(d[i]);b.push(a)}else b=scheduler.getEvents(a.start_date,a.end_date);
|
||||
var e=scheduler._props?scheduler._props[scheduler._mode]:null,g=scheduler.matrix?scheduler.matrix[scheduler._mode]:null,m=e||g;if(e)var j=m.map_to;if(g)j=m.y_property;var k=!0;if(m){for(var h=0,l=0;l<b.length;l++)b[l][j]==a[j]&&b[l].id!=a.id&&h++;h>=scheduler.config.collision_limit&&(a[j]=n,k=!1)}else b.length>scheduler.config.collision_limit&&(k=!1);return!k?!scheduler.callEvent("onEventCollision",[a,b]):k}var n,e;scheduler.config.collision_limit=1;scheduler.attachEvent("onBeforeDrag",function(a){h(a);
|
||||
return!0});scheduler.attachEvent("onBeforeLightbox",function(a){var b=scheduler.getEvent(a);e=[b.start_date,b.end_date];h(a);return!0});scheduler.attachEvent("onEventChanged",function(a){if(!a)return!0;var b=scheduler.getEvent(a);if(!g(b)){if(!e)return!1;b.start_date=e[0];b.end_date=e[1];b._timed=this.is_one_day_event(b)}return!0});scheduler.attachEvent("onBeforeEventChanged",function(a){return g(a)});scheduler.attachEvent("onEventSave",function(a,b){return b.rec_type?(scheduler._roll_back_dates(b),
|
||||
g(b)):!0})})();
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
(function(){function g(e,b,a){var c=e+"="+a+(b?"; "+b:"");document.cookie=c}function h(e){var b=e+"=";if(document.cookie.length>0){var a=document.cookie.indexOf(b);if(a!=-1){a+=b.length;var c=document.cookie.indexOf(";",a);if(c==-1)c=document.cookie.length;return document.cookie.substring(a,c)}}return""}var f=!0;scheduler.attachEvent("onBeforeViewChange",function(e,b,a,c){if(f){f=!1;var d=h("scheduler_settings");if(d)return d=d.split("@"),d[0]=this.templates.xml_date(d[0]),this.setCurrentView(d[0],
|
||||
d[1]),!1}var i=this.templates.xml_format(c||b)+"@"+(a||e);g("scheduler_settings","expires=Sun, 31 Jan 9999 22:00:00 GMT",i);return!0})})();
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.form_blocks.combo={render:function(a){var d="";d+="<div class='"+a.type+"' style='height:"+(a.height||20)+"px;' ></div>";return d},set_value:function(a,d,c,b){a._combo&&a._combo.destructor();window.dhx_globalImgPath=b.image_path||"/";a._combo=new dhtmlXCombo(a,b.name,a.offsetWidth-8);a._combo.enableFilteringMode(!!b.filtering,b.script_path||null,!!b.cache);if(b.script_path)a._combo.setComboValue(c[b.map_to]||null);else{for(var f=[],e=0;e<b.options.length;e++){var g=[];g.push(b.options[e].key);
|
||||
g.push(b.options[e].label);f.push(g)}a._combo.addOption(f);if(c[b.map_to]){var h=a._combo.getIndexByValue(c[b.map_to]);a._combo.selectOption(h)}}},get_value:function(a){var d=a._combo.getSelectedValue();return d},focus:function(){}};
|
||||
scheduler.form_blocks.radio={render:function(a){var d="";d+="<div class='dhx_cal_ltext dhx_cal_radio' style='height:"+a.height+"px;' >";for(var c=0;c<a.options.length;c++){var b=scheduler.uid();d+="<input id='"+b+"' type='radio' name='"+a.name+"' value='"+a.options[c].key+"'><label for='"+b+"'> "+a.options[c].label+"</label>";a.vertical&&(d+="<br/>")}d+="</div>";return d},set_value:function(a,d,c,b){for(var f=a.getElementsByTagName("input"),e=0;e<f.length;e++)if(f[e].checked=!1,f[e].value==c[b.map_to])f[e].checked=
|
||||
!0},get_value:function(a){for(var d=a.getElementsByTagName("input"),c=0;c<d.length;c++)if(d[c].checked)return d[c].value},focus:function(){}};
|
||||
scheduler.form_blocks.checkbox={render:function(){return scheduler.config.wide_form?'<div class="dhx_cal_wide_checkbox"></div>':""},set_value:function(a,d,c,b){var a=document.getElementById(b.id),f=scheduler.uid(),e=!1;typeof b.checked_value!="undefined"&&c[b.map_to]==b.checked_value&&(e=!0);a.className+=" dhx_cal_checkbox";var g="<input id='"+f+"' type='checkbox' value='true' name='"+b.name+"'"+(e?"checked='true'":"")+"'>",h="<label for='"+f+"'>"+(scheduler.locale.labels["section_"+b.name]||b.name)+
|
||||
"</label>";scheduler.config.wide_form?(a.innerHTML=h,a.nextSibling.innerHTML=g):a.innerHTML=g+h},get_value:function(a,d,c){var a=document.getElementById(c.id),b=a.getElementsByTagName("input")[0];b||(b=a.nextSibling.getElementsByTagName("input")[0]);return b.checked?c.checked_value||!0:c.unchecked_value||!1},focus:function(){}};
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.expand=function(){var a=scheduler._obj;do a._position=a.style.position||"",a.style.position="static";while((a=a.parentNode)&&a.style);a=scheduler._obj;a.style.position="absolute";a._width=a.style.width;a._height=a.style.height;a.style.width=a.style.height="100%";a.style.top=a.style.left="0px";var b=document.body;b.scrollTop=0;if(b=b.parentNode)b.scrollTop=0;document.body._overflow=document.body.style.overflow||"";document.body.style.overflow="hidden";scheduler._maximize()};
|
||||
scheduler.collapse=function(){var a=scheduler._obj;do a.style.position=a._position;while((a=a.parentNode)&&a.style);a=scheduler._obj;a.style.width=a._width;a.style.height=a._height;document.body.style.overflow=document.body._overflow;scheduler._maximize()};scheduler.attachEvent("onTemplatesReady",function(){var a=document.createElement("DIV");a.className="dhx_expand_icon";scheduler.toggleIcon=a;scheduler._obj.appendChild(a);a.onclick=function(){scheduler.expanded?scheduler.collapse():scheduler.expand()}});
|
||||
scheduler._maximize=function(){this.expanded=!this.expanded;this.toggleIcon.style.backgroundPosition="0px "+(this.expanded?"0":"18")+"px";for(var a=["left","top"],b=0;b<a.length;b++){var d=scheduler.xy["margin_"+a[b]],c=scheduler["_prev_margin_"+a[b]];scheduler.xy["margin_"+a[b]]?(scheduler["_prev_margin_"+a[b]]=scheduler.xy["margin_"+a[b]],scheduler.xy["margin_"+a[b]]=0):c&&(scheduler.xy["margin_"+a[b]]=scheduler["_prev_margin_"+a[b]],delete scheduler["_prev_margin_"+a[b]])}scheduler.callEvent("onSchedulerResize",
|
||||
[])&&scheduler.update_view()};
|
|
@ -1,5 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTemplatesReady",function(){for(var c=document.body.getElementsByTagName("DIV"),b=0;b<c.length;b++){var a=c[b].className||"",a=a.split(":");if(a.length==2&&a[0]=="template"){var d='return "'+(c[b].innerHTML||"").replace(/\"/g,'\\"').replace(/[\n\r]+/g,"")+'";',d=unescape(d).replace(/\{event\.([a-z]+)\}/g,function(b,a){return'"+ev.'+a+'+"'});scheduler.templates[a[1]]=Function("start","end","ev",d);c[b].style.display="none"}}});
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
(function(){var b=!1;scheduler.attachEvent("onBeforeLightbox",function(){return b=!0});scheduler.attachEvent("onAfterLightbox",function(){b=!1;return!0});dhtmlxEvent(document,_isOpera?"keypress":"keydown",function(a){a=a||event;if(!b)if(a.keyCode==37||a.keyCode==39){a.cancelBubble=!0;var e=scheduler.date.add(scheduler._date,a.keyCode==37?-1:1,scheduler._mode);scheduler.setCurrentView(e);return!0}else if(a.ctrlKey&&a.keyCode==67)scheduler._copy_id=scheduler._select_id;else if(a.ctrlKey&&a.keyCode==
|
||||
86){var c=scheduler.getEvent(scheduler._copy_id);if(c){var d=scheduler._copy_event(c);d.id=scheduler.uid();scheduler.addEvent(d)}}})})();
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.config.limit_start=new Date(-3999,0,0);scheduler.config.limit_end=new Date(3999,0,0);scheduler.config.limit_view=!1;
|
||||
(function(){var g=null,k={},l={},m=!1;scheduler.blockTime=function(b,a){var c=this.config.first_hour*60,d=this.config.last_hour*60;a=="fullday"&&(a=[c,d]);typeof b=="object"?k[this.date.date_part(b).valueOf()]=a:l[b]=a;for(var e=0;e<a.length;e+=2)a[e]<c&&(a[e]=c),a[e+1]>d&&(a[e+1]=d);m=!0};scheduler.attachEvent("onScaleAdd",function(b,a){var c=k[a.valueOf()]||l[a.getDay()];if(c)for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],h=document.createElement("DIV");h.className="dhx_time_block";var j;h.style.top=
|
||||
Math.round((e*6E4-this.config.first_hour*36E5)*this.config.hour_size_px/36E5)%(this.config.hour_size_px*24)+"px";h.style.height=Math.round((f-e-1)*6E4*this.config.hour_size_px/36E5)%(this.config.hour_size_px*24)+"px";b.appendChild(h)}});scheduler.attachEvent("onBeforeViewChange",function(b,a,c,d){d=d||a;c=c||b;return scheduler.config.limit_view&&(d.valueOf()>scheduler.config.limit_end.valueOf()||this.date.add(d,1,c)<=scheduler.config.limit_start.valueOf())?(setTimeout(function(){scheduler.setCurrentView(scheduler._date,
|
||||
c)},1),!1):!0});var f=function(b){var a=scheduler.config,c=b.start_date.valueOf()>=a.limit_start.valueOf()&&b.end_date.valueOf()<=a.limit_end.valueOf();if(c&&m&&b._timed){var d=scheduler.date.date_part(new Date(b.start_date.valueOf())),e=k[d.valueOf()]||l[d.getDay()],f=b.start_date.getHours()*60+b.start_date.getMinutes(),h=b.end_date.getHours()*60+b.end_date.getMinutes();if(e)for(var j=0;j<e.length;j+=2){var g=e[j],i=e[j+1];if(g<h&&i>f){if(f<=i&&f>=g){if(i==1440||h<i){c=!1;break}if(scheduler._drag_id&&
|
||||
scheduler._drag_mode=="new-size")b.start_date.setHours(0),b.start_date.setMinutes(i);else{c=!1;break}}if(h>=g&&h<i)if(scheduler._drag_id&&scheduler._drag_mode=="new-size")b.end_date.setHours(0),b.end_date.setMinutes(g);else{c=!1;break}}}}if(!c)scheduler._drag_id=null,scheduler._drag_mode=null,scheduler.callEvent("onLimitViolation",[b.id,b]);return c};scheduler.attachEvent("onBeforeDrag",function(b){return!b?!0:f(scheduler.getEvent(b))});scheduler.attachEvent("onClick",function(b){return f(scheduler.getEvent(b))});
|
||||
scheduler.attachEvent("onBeforeLightbox",function(b){var a=scheduler.getEvent(b);g=[a.start_date,a.end_date];return f(a)});scheduler.attachEvent("onEventAdded",function(b){if(!b)return!0;var a=scheduler.getEvent(b);if(!f(a)){if(a.start_date<scheduler.config.limit_start)a.start_date=new Date(scheduler.config.limit_start);if(a.start_date.valueOf()>=scheduler.config.limit_end.valueOf())a.start_date=this.date.add(scheduler.config.limit_end,-1,"day");if(a.end_date<scheduler.config.limit_start)a.end_date=
|
||||
new Date(scheduler.config.limit_start);if(a.end_date.valueOf()>=scheduler.config.limit_end.valueOf())a.end_date=this.date.add(scheduler.config.limit_end,-1,"day");if(a.start_date.valueOf()>=a.end_date.valueOf())a.end_date=this.date.add(a.start_date,this.config.event_duration||this.config.time_step,"minute");a._timed=this.is_one_day_event(a)}return!0});scheduler.attachEvent("onEventChanged",function(b){if(!b)return!0;var a=scheduler.getEvent(b);if(!f(a)){if(!g)return!1;a.start_date=g[0];a.end_date=
|
||||
g[1];a._timed=this.is_one_day_event(a)}return!0});scheduler.attachEvent("onBeforeEventChanged",function(b){return f(b)})})();
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.xy.map_date_width=188;scheduler.xy.map_description_width=400;scheduler.config.map_resolve_event_location=!0;scheduler.config.map_resolve_user_location=!0;scheduler.config.map_initial_position=new google.maps.LatLng(48.724,8.215);scheduler.config.map_error_position=new google.maps.LatLng(15,15);scheduler.config.map_infowindow_max_width=300;scheduler.config.map_type=google.maps.MapTypeId.ROADMAP;scheduler.config.map_zoom_after_resolve=15;scheduler.locale.labels.marker_geo_success="It seems you are here.";
|
||||
scheduler.locale.labels.marker_geo_fail="Sorry, could not get your current position using geolocation.";scheduler.templates.marker_date=scheduler.date.date_to_str("%Y-%m-%d %H:%i");scheduler.templates.marker_text=function(f,g,e){return"<div><b>"+e.text+"</b><br/><br/>"+(e.event_location||"")+"<br/><br/>"+scheduler.templates.marker_date(f)+" - "+scheduler.templates.marker_date(g)+"</div>"};
|
||||
scheduler.dblclick_dhx_map_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow({start_date:scheduler._date,end_date:scheduler.date.add(scheduler._date,1,"hour")})};scheduler.templates.map_time=function(f,g,e){return e._timed?this.day_date(e.start_date,e.end_date,e)+" "+this.event_date(f):scheduler.templates.day_date(f)+" – "+scheduler.templates.day_date(g)};scheduler.templates.map_text=function(f,g,e){return e.text};scheduler.date.map_start=function(f){return f};
|
||||
scheduler.date.add_map=function(f){return new Date(f.valueOf())};scheduler.templates.map_date=function(){return""};scheduler._latLngUpdate=!1;
|
||||
scheduler.attachEvent("onSchedulerReady",function(){function f(a){if(a){var c=scheduler.locale.labels;scheduler._els.dhx_cal_header[0].innerHTML="<div class='dhx_map_line' style='width: "+(scheduler.xy.map_date_width+scheduler.xy.map_description_width+2)+"px;' ><div style='width: "+scheduler.xy.map_date_width+"px;'>"+c.date+"</div><div class='headline_description' style='width: "+scheduler.xy.map_description_width+"px;'>"+c.description+"</div></div>";scheduler._table_view=!0;scheduler.set_sizes()}}
|
||||
function g(){scheduler._selected_event_id=null;scheduler.map._infowindow.close();for(var a in scheduler.map._markers)scheduler.map._markers[a].setMap(null),delete scheduler.map._markers[a],scheduler.map._infowindows_content[a]&&delete scheduler.map._infowindows_content[a]}function e(){var a=scheduler.get_visible_events();a.sort(function(a,b){return a.start_date<b.start_date?-1:a.start_date.valueOf()==b.start_date.valueOf()?a.text<b.text?-1:a.text==b.text?0:1:1});for(var c="<div class='dhx_map_area'>",
|
||||
d=0;d<a.length;d++){var b=a[d],h=b.id==scheduler._selected_event_id?"dhx_map_line highlight":"dhx_map_line",e=b.color?"background-color:"+b.color+";":"",f=b.textColor?"color:"+b.textColor+";":"";c+="<div class='"+h+"' event_id='"+b.id+"' style='"+e+""+f+""+(b._text_style||"")+" width: "+(scheduler.xy.map_date_width+scheduler.xy.map_description_width+2)+"px;'><div style='width: "+scheduler.xy.map_date_width+"px;' >"+scheduler.templates.map_time(b.start_date,b.end_date,b)+"</div>";c+="<div class='dhx_event_icon icon_details'> </div>";
|
||||
c+="<div class='line_description' style='width:"+(scheduler.xy.map_description_width-25)+"px;'>"+scheduler.templates.map_text(b.start_date,b.end_date,b)+"</div></div>"}c+="<div class='dhx_v_border' style='left: "+(scheduler.xy.map_date_width-2)+"px;'></div><div class='dhx_v_border_description'></div></div>";scheduler._els.dhx_cal_data[0].scrollTop=0;scheduler._els.dhx_cal_data[0].innerHTML=c;scheduler._els.dhx_cal_data[0].style.width=scheduler.xy.map_date_width+scheduler.xy.map_description_width+
|
||||
1+"px";var g=scheduler._els.dhx_cal_data[0].firstChild.childNodes;scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[scheduler._mode+"_date"](scheduler._min_date,scheduler._max_date,scheduler._mode);scheduler._rendered=[];for(d=0;d<g.length-2;d++)scheduler._rendered[d]=g[d]}function k(a){var c=document.getElementById(a),d=scheduler._y-scheduler.xy.nav_height;d<0&&(d=0);var b=scheduler._x-scheduler.xy.map_date_width-scheduler.xy.map_description_width-1;b<0&&(b=0);c.style.height=d+"px";c.style.width=
|
||||
b+"px";c.style.marginLeft=scheduler.xy.map_date_width+scheduler.xy.map_description_width+1+"px";c.style.marginTop=scheduler.xy.nav_height+2+"px"}(function(){scheduler._isMapPositionSet=!1;var a=document.createElement("div");a.className="dhx_map";a.id="dhx_gmap";a.style.dispay="none";var c=scheduler._obj;c.appendChild(a);scheduler._els.dhx_gmap=[];scheduler._els.dhx_gmap.push(a);k("dhx_gmap");var d={zoom:scheduler.config.map_inital_zoom||10,center:scheduler.config.map_initial_position,mapTypeId:scheduler.config.map_type||
|
||||
google.maps.MapTypeId.ROADMAP},b=new google.maps.Map(document.getElementById("dhx_gmap"),d);b.disableDefaultUI=!1;b.disableDoubleClickZoom=!scheduler.config.readonly;google.maps.event.addListener(b,"dblclick",function(a){if(!scheduler.config.readonly&&scheduler.config.dblclick_create){var b=a.latLng;geocoder.geocode({latLng:b},function(a,c){if(c==google.maps.GeocoderStatus.OK)b=a[0].geometry.location,scheduler.addEventNow({lat:b.lat(),lng:b.lng(),event_location:a[0].formatted_address,start_date:scheduler._date,
|
||||
end_date:scheduler.date.add(scheduler._date,1,"hour")})})}});var e={content:""};if(scheduler.config.map_infowindow_max_width)e.maxWidth=scheduler.config.map_infowindow_max_width;scheduler.map={_points:[],_markers:[],_infowindow:new google.maps.InfoWindow(e),_infowindows_content:[],_initialization_count:-1,_obj:b};geocoder=new google.maps.Geocoder;scheduler.config.map_resolve_user_location&&navigator.geolocation&&(scheduler._isMapPositionSet||navigator.geolocation.getCurrentPosition(function(a){var c=
|
||||
new google.maps.LatLng(a.coords.latitude,a.coords.longitude);b.setCenter(c);b.setZoom(scheduler.config.map_zoom_after_resolve||10);scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);scheduler.map._infowindow.position=b.getCenter();scheduler.map._infowindow.open(b);scheduler._isMapPositionSet=!0},function(){scheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);scheduler.map._infowindow.setPosition(b.getCenter());scheduler.map._infowindow.open(b);
|
||||
scheduler._isMapPositionSet=!0}));google.maps.event.addListener(b,"resize",function(){a.style.zIndex="5";b.setZoom(b.getZoom())});google.maps.event.addListener(b,"tilesloaded",function(){a.style.zIndex="5"});a.style.display="none"})();scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="map"?(this.map_view(!0),!1):!0});var l=scheduler.render_data;scheduler.render_data=function(a,c){if(this._mode=="map"){e();for(var d=scheduler.get_visible_events(),b=0;b<d.length;b++)scheduler.map._markers[d[b].id]||
|
||||
i(d[b],!1,!1)}else return l.apply(this,arguments)};scheduler.map_view=function(a){scheduler.map._initialization_count++;var c=scheduler._els.dhx_gmap[0];scheduler._els.dhx_cal_data[0].style.width=scheduler.xy.map_date_width+scheduler.xy.map_description_width+1+"px";scheduler._min_date=scheduler.config.map_start||new Date;scheduler._max_date=scheduler.config.map_end||new Date(9999,1,1);scheduler._table_view=!0;f(a);if(a){g();e();c.style.display="block";k("dhx_gmap");for(var d=scheduler.map._obj.getCenter(),
|
||||
b=scheduler.get_visible_events(),h=0;h<b.length;h++)scheduler.map._markers[b[h].id]||i(b[h])}else c.style.display="none";google.maps.event.trigger(scheduler.map._obj,"resize");scheduler.map._initialization_count===0&&d&&scheduler.map._obj.setCenter(d);scheduler._selected_event_id&&m(scheduler._selected_event_id)};var m=function(a){scheduler.map._obj.setCenter(scheduler.map._points[a]);scheduler.callEvent("onClick",[a])},i=function(a,c,d){var b=scheduler.config.map_error_position;a.lat&&a.lng&&(b=
|
||||
new google.maps.LatLng(a.lat,a.lng));var e=scheduler.templates.marker_text(a.start_date,a.end_date,a);scheduler._new_event||(scheduler.map._infowindows_content[a.id]=e,scheduler.map._markers[a.id]&&scheduler.map._markers[a.id].setMap(null),scheduler.map._markers[a.id]=new google.maps.Marker({position:b,map:scheduler.map._obj}),google.maps.event.addListener(scheduler.map._markers[a.id],"click",function(){scheduler.map._infowindow.setContent(scheduler.map._infowindows_content[a.id]);scheduler.map._infowindow.open(scheduler.map._obj,
|
||||
scheduler.map._markers[a.id]);scheduler._selected_event_id=a.id;scheduler.render_data()}),scheduler.map._points[a.id]=b,c&&scheduler.map._obj.setCenter(scheduler.map._points[a.id]),d&&scheduler.callEvent("onClick",[a.id]))};scheduler.attachEvent("onClick",function(a){if(this._mode=="map"){scheduler._selected_event_id=a;for(var c=0;c<scheduler._rendered.length;c++)scheduler._rendered[c].className="dhx_map_line",scheduler._rendered[c].getAttribute("event_id")==a&&(scheduler._rendered[c].className+=
|
||||
" highlight");scheduler.map._points[a]&&scheduler.map._markers[a]&&(scheduler.map._obj.setCenter(scheduler.map._points[a]),google.maps.event.trigger(scheduler.map._markers[a],"click"))}return!0});var j=function(a){a.event_location&&geocoder?geocoder.geocode({address:a.event_location,language:scheduler.uid().toString()},function(c,d){var b={};if(d!=google.maps.GeocoderStatus.OK){if(b=scheduler.callEvent("onLocationError",[a.id]),!b||b===!0)b=scheduler.config.map_error_position}else b=c[0].geometry.location;
|
||||
a.lat=b.lat();a.lng=b.lng();scheduler._selected_event_id=a.id;scheduler._latLngUpdate=!0;scheduler.callEvent("onEventChanged",[a.id,a]);i(a,!0,!0)}):i(a,!0,!0)},n=function(a){a.event_location&&geocoder&&geocoder.geocode({address:a.event_location,language:scheduler.uid().toString()},function(c,d){var b={};if(d!=google.maps.GeocoderStatus.OK){if(b=scheduler.callEvent("onLocationError",[a.id]),!b||b===!0)b=scheduler.config.map_error_position}else b=c[0].geometry.location;a.lat=b.lat();a.lng=b.lng();
|
||||
scheduler._latLngUpdate=!0;scheduler.callEvent("onEventChanged",[a.id,a])})},o=function(a,c,d,b){setTimeout(function(){var b=a.apply(c,d);a=obj=d=null;return b},b||1)};scheduler.attachEvent("onEventChanged",function(a){if(this._latLngUpdate)this._latLngUpdate=!1;else{var c=scheduler.getEvent(a);c.start_date<scheduler._min_date&&c.end_date>scheduler._min_date||c.start_date<scheduler._max_date&&c.end_date>scheduler._max_date||c.start_date.valueOf()>=scheduler._min_date&&c.end_date.valueOf()<=scheduler._max_date?
|
||||
(scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),j(c)):(scheduler._selected_event_id=null,scheduler.map._infowindow.close(),scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null))}return!0});scheduler.attachEvent("onEventIdChange",function(a,c){var d=scheduler.getEvent(c);if(d.start_date<scheduler._min_date&&d.end_date>scheduler._min_date||d.start_date<scheduler._max_date&&d.end_date>scheduler._max_date||d.start_date.valueOf()>=scheduler._min_date&&d.end_date.valueOf()<=
|
||||
scheduler._max_date)scheduler.map._markers[a]&&(scheduler.map._markers[a].setMap(null),delete scheduler.map._markers[a]),scheduler.map._infowindows_content[a]&&delete scheduler.map._infowindows_content[a],j(d);return!0});scheduler.attachEvent("onEventAdded",function(a,c){if(!scheduler._dataprocessor&&(c.start_date<scheduler._min_date&&c.end_date>scheduler._min_date||c.start_date<scheduler._max_date&&c.end_date>scheduler._max_date||c.start_date.valueOf()>=scheduler._min_date&&c.end_date.valueOf()<=
|
||||
scheduler._max_date))scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),j(c);return!0});scheduler.attachEvent("onBeforeEventDelete",function(a){scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null);scheduler._selected_event_id=null;scheduler.map._infowindow.close();return!0});scheduler._event_resolve_delay=1500;scheduler.attachEvent("onEventLoading",function(a){scheduler.config.map_resolve_event_location&&a.event_location&&!a.lat&&!a.lng&&(scheduler._event_resolve_delay+=
|
||||
1500,o(n,this,[a],scheduler._event_resolve_delay));return!0});scheduler.attachEvent("onEventCancel",function(a,c){c&&(scheduler.map._markers[a]&&scheduler.map._markers[a].setMap(null),scheduler.map._infowindow.close());return!0})});
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.templates.calendar_month=scheduler.date.date_to_str("%F %Y");scheduler.templates.calendar_scale_date=scheduler.date.date_to_str("%D");scheduler.templates.calendar_date=scheduler.date.date_to_str("%d");
|
||||
scheduler.renderCalendar=function(b,c){var a=null,d=b.date||new Date;typeof d=="string"&&(d=this.templates.api_date(d));if(c)a=this._render_calendar(c.parentNode,d,b,c),scheduler.unmarkCalendar(a);else{var e=b.container,f=b.position;typeof e=="string"&&(e=document.getElementById(e));typeof f=="string"&&(f=document.getElementById(f));if(f&&typeof f.left=="undefined")var n=getOffset(f),f={top:n.top+f.offsetHeight,left:n.left};e||(e=scheduler._get_def_cont(f));a=this._render_calendar(e,d,b);a.onclick=
|
||||
function(a){var a=a||event,b=a.target||a.srcElement;if(b.className.indexOf("dhx_month_head")!=-1){var c=b.parentNode.className;if(c.indexOf("dhx_after")==-1&&c.indexOf("dhx_before")==-1){var d=scheduler.templates.xml_date(this.getAttribute("date"));d.setDate(parseInt(b.innerHTML,10));scheduler.unmarkCalendar(this);scheduler.markCalendar(this,d,"dhx_calendar_click");this._last_date=d;this.conf.handler&&this.conf.handler.call(scheduler,d,this)}}}}for(var m=scheduler.date.month_start(d),k=scheduler.date.add(m,
|
||||
1,"month"),p=this.getEvents(m,k),i=0;i<p.length;i++){var o=p[i],l=o.start_date;l.valueOf()<m.valueOf()&&(l=m);for(l=scheduler.date.date_part(new Date(l.valueOf()));l<o.end_date;)if(this.markCalendar(a,l,"dhx_year_event"),l=this.date.add(l,1,"day"),l.valueOf()>=k.valueOf())break}this._markCalendarCurrentDate(a);a.conf=b;return a};
|
||||
scheduler._get_def_cont=function(b){if(!this._def_count)this._def_count=document.createElement("DIV"),this._def_count.style.cssText="position:absolute;z-index:10100;width:251px; height:175px;",this._def_count.onclick=function(b){(b||event).cancelBubble=!0},document.body.appendChild(this._def_count);this._def_count.style.left=b.left+"px";this._def_count.style.top=b.top+"px";this._def_count._created=new Date;return this._def_count};
|
||||
scheduler._locateCalendar=function(b,c){var a=b.childNodes[2].childNodes[0];typeof c=="string"&&(c=scheduler.templates.api_date(c));var d=b.week_start+c.getDate()-1;return a.rows[Math.floor(d/7)].cells[d%7].firstChild};scheduler.markCalendar=function(b,c,a){this._locateCalendar(b,c).className+=" "+a};scheduler.unmarkCalendar=function(b,c,a){c=c||b._last_date;a=a||"dhx_calendar_click";if(c){var d=this._locateCalendar(b,c);d.className=(d.className||"").replace(RegExp(a,"g"))}};
|
||||
scheduler._week_template=function(b){for(var c=b||250,a=0,d=document.createElement("div"),e=this.date.week_start(new Date),f=0;f<7;f++)this._cols[f]=Math.floor(c/(7-f)),this._render_x_header(f,a,e,d),e=this.date.add(e,1,"day"),c-=this._cols[f],a+=this._cols[f];d.lastChild.className+=" dhx_scale_bar_last";return d};scheduler.updateCalendar=function(b,c){b.conf.date=c;this.renderCalendar(b.conf,b)};scheduler._mini_cal_arrows=[" "," "];
|
||||
scheduler._render_calendar=function(b,c,a,d){var e=scheduler.templates,f=this._cols;this._cols=[];var n=this._mode;this._mode="calendar";var m=this._colsS;this._colsS={height:0};var k=new Date(this._min_date),p=new Date(this._max_date),i=new Date(scheduler._date),o=e.month_day;e.month_day=e.calendar_date;var c=this.date.month_start(c),l=this._week_template(b.offsetWidth-1),g;d?g=d:(g=document.createElement("DIV"),g.className="dhx_cal_container dhx_mini_calendar");g.setAttribute("date",this.templates.xml_format(c));
|
||||
g.innerHTML="<div class='dhx_year_month'></div><div class='dhx_year_week'>"+l.innerHTML+"</div><div class='dhx_year_body'></div>";g.childNodes[0].innerHTML=this.templates.calendar_month(c);if(a.navigation){var h=document.createElement("DIV");h.className="dhx_cal_prev_button";h.style.cssText="left:1px;top:2px;position:absolute;";h.innerHTML=this._mini_cal_arrows[0];g.firstChild.appendChild(h);h.onclick=function(){scheduler.updateCalendar(g,scheduler.date.add(g._date,-1,"month"));scheduler._date.getMonth()==
|
||||
g._date.getMonth()&&scheduler._date.getFullYear()==g._date.getFullYear()&&scheduler._markCalendarCurrentDate(g)};h=document.createElement("DIV");h.className="dhx_cal_next_button";h.style.cssText="left:auto; right:1px;top:2px;position:absolute;";h.innerHTML=this._mini_cal_arrows[1];g.firstChild.appendChild(h);h.onclick=function(){scheduler.updateCalendar(g,scheduler.date.add(g._date,1,"month"));scheduler._date.getMonth()==g._date.getMonth()&&scheduler._date.getFullYear()==g._date.getFullYear()&&scheduler._markCalendarCurrentDate(g)}}g._date=
|
||||
new Date(c);g.week_start=(c.getDay()-(this.config.start_on_monday?1:0)+7)%7;var u=this.date.week_start(c);this._reset_month_scale(g.childNodes[2],c,u);for(var j=g.childNodes[2].firstChild.rows,q=j.length;q<6;q++){var t=j[j.length-1];j[0].parentNode.appendChild(t.cloneNode(!0));for(var r=parseInt(t.childNodes[t.childNodes.length-1].childNodes[0].innerHTML),r=r<10?r:0,s=0;s<j[q].childNodes.length;s++)j[q].childNodes[s].className="dhx_after",j[q].childNodes[s].childNodes[0].innerHTML=scheduler.date.to_fixed(++r)}d||
|
||||
b.appendChild(g);g.childNodes[1].style.height=g.childNodes[1].childNodes[0].offsetHeight<=0?"0px":g.childNodes[1].childNodes[0].offsetHeight-1+"px";this._cols=f;this._mode=n;this._colsS=m;this._min_date=k;this._max_date=p;scheduler._date=i;e.month_day=o;return g};
|
||||
scheduler.destroyCalendar=function(b,c){if(!b&&this._def_count&&this._def_count.firstChild&&(c||(new Date).valueOf()-this._def_count._created.valueOf()>500))b=this._def_count.firstChild;if(b&&(b.onclick=null,b.innerHTML="",b.parentNode&&b.parentNode.removeChild(b),this._def_count))this._def_count.style.top="-1000px"};scheduler.isCalendarVisible=function(){return this._def_count&&parseInt(this._def_count.style.top,10)>0?this._def_count:!1};
|
||||
scheduler.attachEvent("onTemplatesReady",function(){dhtmlxEvent(document.body,"click",function(){scheduler.destroyCalendar()})});scheduler.templates.calendar_time=scheduler.date.date_to_str("%d-%m-%Y");
|
||||
scheduler.form_blocks.calendar_time={render:function(){var b="<input class='dhx_readonly' type='text' readonly='true'>",c=scheduler.config,a=this.date.date_part(new Date);c.first_hour&&a.setHours(c.first_hour);b+=" <select>";for(var d=60*c.first_hour;d<60*c.last_hour;d+=this.config.time_step*1){var e=this.templates.time_picker(a);b+="<option value='"+d+"'>"+e+"</option>";a=this.date.add(a,this.config.time_step,"minute")}b+="</select>";var f=scheduler.config.full_day;return"<div style='height:30px;padding-top:0; font-size:inherit;' class='dhx_section_time'>"+
|
||||
b+"<span style='font-weight:normal; font-size:10pt;'> – </span>"+b+"</div>"},set_value:function(b,c,a){function d(a,b,c){n(a,b,c);a.value=scheduler.templates.calendar_time(b);a._date=scheduler.date.date_part(new Date(b))}var e=b.getElementsByTagName("input"),f=b.getElementsByTagName("select"),n=function(a,b,c){a.onclick=function(){scheduler.destroyCalendar(null,!0);scheduler.renderCalendar({position:a,date:new Date(this._date),navigation:!0,handler:function(b){a.value=scheduler.templates.calendar_time(b);
|
||||
a._date=new Date(b);scheduler.destroyCalendar();scheduler.config.event_duration&&scheduler.config.auto_end_date&&c==0&&o()}})}};if(scheduler.config.full_day){if(!b._full_day){var m="<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+scheduler.locale.labels.full_day+" </label></input>";scheduler.config.wide_form||(m=b.previousSibling.innerHTML+m);b.previousSibling.innerHTML=m;b._full_day=!0}var k=b.previousSibling.getElementsByTagName("input")[0],p=scheduler.date.time_part(a.start_date)==
|
||||
0&&scheduler.date.time_part(a.end_date)==0&&a.end_date.valueOf()-a.start_date.valueOf()<1728E5;k.checked=p;for(var i in f)f[i].disabled=k.checked;for(i=0;i<e.length;i++)e[i].disabled=k.checked;k.onclick=function(){if(k.checked==!0){var b=new Date(a.start_date),c=new Date(a.end_date);scheduler.date.date_part(b);c=scheduler.date.add(b,1,"day")}var h=b||a.start_date,i=c||a.end_date;d(e[0],h);d(e[1],i);f[0].value=h.getHours()*60+h.getMinutes();f[1].value=i.getHours()*60+i.getMinutes();for(var j in f)f[j].disabled=
|
||||
k.checked;for(j=0;j<e.length;j++)e[j].disabled=k.checked}}if(scheduler.config.event_duration&&scheduler.config.auto_end_date){var o=function(){a.start_date=scheduler.date.add(e[0]._date,f[0].value,"minute");a.end_date.setTime(a.start_date.getTime()+scheduler.config.event_duration*6E4);e[1].value=scheduler.templates.calendar_time(a.end_date);e[1]._date=scheduler.date.date_part(new Date(a.end_date));f[1].value=a.end_date.getHours()*60+a.end_date.getMinutes()};f[0].onchange=o}d(e[0],a.start_date,0);
|
||||
d(e[1],a.end_date,1);n=function(){};f[0].value=a.start_date.getHours()*60+a.start_date.getMinutes();f[1].value=a.end_date.getHours()*60+a.end_date.getMinutes()},get_value:function(b,c){var a=b.getElementsByTagName("input"),d=b.getElementsByTagName("select");c.start_date=scheduler.date.add(a[0]._date,d[0].value,"minute");c.end_date=scheduler.date.add(a[1]._date,d[1].value,"minute");if(c.end_date<=c.start_date)c.end_date=scheduler.date.add(c.start_date,scheduler.config.time_step,"minute")},focus:function(){}};
|
||||
scheduler.linkCalendar=function(b,c){var a=function(){var a=scheduler._date,e=new Date(a.valueOf());c&&(e=c(e));e.setDate(1);scheduler.updateCalendar(b,e);return!0};scheduler.attachEvent("onViewChange",a);scheduler.attachEvent("onXLE",a);scheduler.attachEvent("onEventAdded",a);scheduler.attachEvent("onEventChanged",a);scheduler.attachEvent("onAfterEventDelete",a);a()};
|
||||
scheduler._markCalendarCurrentDate=function(b){var c=scheduler._date,a=scheduler._mode;if(b._date.getMonth()==c.getMonth()&&b._date.getFullYear()==c.getFullYear())if(a=="day"||this._props&&this._props[a])scheduler.markCalendar(b,c,"dhx_calendar_click");else if(a=="week")for(var d=scheduler.date.week_start(new Date(c.valueOf())),e=0;e<7;e++){var f=d.getMonth()+d.getYear()*12-c.getMonth()-c.getYear()*12;f||scheduler.markCalendar(b,d,"dhx_calendar_click");d=scheduler.date.add(d,1,"day")}};
|
|
@ -1,7 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.form_blocks.multiselect={render:function(d){for(var a="<div class='dhx_multi_select_"+d.name+"' style='overflow: auto; height: "+d.height+"px; position: relative;' >",b=0;b<d.options.length;b++)a+="<label><input type='checkbox' value='"+d.options[b].key+"'/>"+d.options[b].label+"</label>",convertStringToBoolean(d.vertical)&&(a+="<br/>");a+="</div>";return a},set_value:function(d,a,b,c){function h(b){for(var c=d.getElementsByTagName("input"),a=0;a<c.length;a++)c[a].checked=!!b[c[a].value]}
|
||||
for(var f=d.getElementsByTagName("input"),e=0;e<f.length;e++)f[e].checked=!1;if(!scheduler._new_event)if(f=[],b[c.map_to]){for(var i=b[c.map_to].split(","),e=0;e<i.length;e++)f[i[e]]=!0;h(f)}else{var g=document.createElement("div");g.className="dhx_loading";g.style.cssText="position: absolute; top: 40%; left: 40%;";d.appendChild(g);dhtmlxAjax.get(c.script_url+"?dhx_crosslink_"+c.map_to+"="+b.id+"&uid="+scheduler.uid(),function(b){for(var a=b.doXPath("//data/item"),e=[],f=0;f<a.length;f++)e[a[f].getAttribute(c.map_to)]=
|
||||
!0;h(e);d.removeChild(g)})}},get_value:function(d){for(var a=[],b=d.getElementsByTagName("input"),c=0;c<b.length;c++)b[c].checked&&a.push(b[c].value);return a.join(",")},focus:function(){}};
|
|
@ -1,5 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
(function(){function e(a){var b=function(){};b.prototype=a;return b}var d=scheduler._load;scheduler._load=function(a,b){a=a||this._load_url;if(typeof a=="object")for(var f=e(this._loaded),c=0;c<a.length;c++)this._loaded=new f,d.call(this,a[c],b);else d.apply(this,arguments)}})();
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler._extra_xle=!1;scheduler.attachEvent("onXLE",function(){if(!scheduler._extra_xle){var a=!1,c;for(c in scheduler._events)if(scheduler._events[c].text){a=!0;break}if((localStorage._updated_events||!a)&&localStorage._events){scheduler._extra_xle=!0;scheduler.parse(localStorage._events,"json");scheduler._extra_xle=!1;var b=scheduler._dataprocessor,e=JSON.parse(localStorage._updated_events);b.setUpdateMode("off");for(var d in e)b.setUpdated(d,!0,e[d]);b.sendData();b.setUpdateMode("cell")}}});
|
||||
scheduler.attachEvent("onBeforeEventDelete",function(a){var c=scheduler._dataprocessor.getState(a);if(c=="inserted"&&localStorage._updated_events){var b=JSON.parse(localStorage._updated_events);delete b[a];for(a in b){localStorage._updated_events=JSON.stringify(b);break}}return!0});var old_delete_event=scheduler.deleteEvent;scheduler.deleteEvent=function(a,c){old_delete_event.apply(this,arguments);localStorage._events=scheduler.toJSON()};scheduler._offline={};
|
||||
scheduler._offline._after_update_events=[];var old_dp_init=scheduler._dp_init;
|
||||
scheduler._dp_init=function(a){old_dp_init.apply(this,arguments);a.attachEvent("onAfterUpdate",function(c){scheduler._offline._after_update_events.push(c);return!0});a.attachEvent("onAfterUpdateFinish",function(){localStorage._events=scheduler.toJSON();for(var c=JSON.parse(localStorage._updated_events),b=0;b<scheduler._offline._after_update_events.length;b++)delete c[scheduler._offline._after_update_events[b]];var a=!1,d;for(d in c){a=!0;break}a?(localStorage._updated_events=JSON.stringify(c),scheduler._offline._after_update_event=
|
||||
[]):delete localStorage._updated_events;return!0});a.attachEvent("onBeforeDataSending",function(a,b,e){var d={};localStorage._updated_events&&(d=JSON.parse(localStorage._updated_events));for(var f in e){var g=scheduler._dataprocessor.action_param;if(d[f]&&(d[f][g]=="inserted"||e[f][g]=="deleted")||!d[f])d[f]=e[f][g]}localStorage._events=scheduler.toJSON();localStorage._updated_events=JSON.stringify(d);return!0});dhtmlxError.catchError("LoadXML",function(){for(var a in scheduler._dataprocessor._in_progress)delete scheduler._dataprocessor._in_progress[a]})};
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTemplatesReady",function(){var a=new dhtmlDragAndDropObject,g=a.stopDrag,b;a.stopDrag=function(d){b=d||event;return g.apply(this,arguments)};a.addDragLanding(scheduler._els.dhx_cal_data[0],{_drag:function(d){var a=scheduler.attachEvent("onEventCreated",function(a,b){if(!scheduler.callEvent("onExternalDragIn",[a,d,b]))this._drag_mode=this._drag_id=null,this.deleteEvent(a)});if(scheduler.matrix&&scheduler.matrix[scheduler._mode])scheduler.dblclick_dhx_matrix_cell(b);else{var f=
|
||||
document.createElement("div");f.className="dhx_month_body";var c={},e;for(e in b)c[e]=b[e];c.target=c.srcElement=f;scheduler._on_dbl_click(c)}scheduler.detachEvent(a)},_dragIn:function(a){return a},_dragOut:function(){return this}})});
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.toPDF=function(x,f,m,n){function g(c){return c.replace(html_regexp,"")}function j(c){c=parseFloat(c);return isNaN(c)?"auto":100*c/(o+1)}function t(c){c=parseFloat(c);return isNaN(c)?"auto":100*c/k}function q(c){var a="";if(scheduler.matrix&&scheduler.matrix[scheduler._mode])c=c[0].childNodes;for(var b=0;b<c.length;b++)a+="\n<column><![CDATA["+g(c[b].innerHTML)+"]]\></column>";o=c[0].offsetWidth;return a}function y(c,a){for(var b=parseInt(c.style.left),d=0;d<scheduler._cols.length;d++)if(b-=
|
||||
scheduler._cols[d],b<0)return d;return a}function z(c,a){for(var b=parseInt(c.style.top),d=0;d<scheduler._colsS.heights.length;d++)if(scheduler._colsS.heights[d]>b)return d;return a}function w(c){for(var a="",b=c.firstChild.rows,d=0;d<b.length;d++){for(var e=[],h=0;h<b[d].cells.length;h++)e.push(b[d].cells[h].firstChild.innerHTML);a+="\n<row height='"+c.firstChild.rows[d].cells[0].offsetHeight+"'><![CDATA["+g(e.join("|"))+"]]\></row>";k=c.firstChild.rows[0].cells[0].offsetHeight}return a}function A(c){var a=
|
||||
"<data profile='"+c+"'";m&&(a+=" header='"+m+"'");n&&(a+=" footer='"+n+"'");a+=">";a+="<scale mode='"+scheduler._mode+"' today='"+scheduler._els.dhx_cal_date[0].innerHTML+"'>";if(scheduler._mode=="agenda"){var b=scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;a+="<column>"+g(b[0].innerHTML)+"</column><column>"+g(b[1].innerHTML)+"</column>"}else if(scheduler._mode=="year")for(var b=scheduler._els.dhx_cal_data[0].childNodes,d=0;d<b.length;d++)a+="<month label='"+g(b[d].childNodes[0].innerHTML)+
|
||||
"'>",a+=q(b[d].childNodes[1].childNodes),a+=w(b[d].childNodes[2]),a+="</month>";else{a+="<x>";b=scheduler._els.dhx_cal_header[0].childNodes;a+=q(b);a+="</x>";var e=scheduler._els.dhx_cal_data[0];if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){a+="<y>";for(d=0;d<e.firstChild.rows.length;d++)a+="<row><![CDATA["+e.firstChild.rows[d].cells[0].innerHTML+"]]\></row>";a+="</y>";k=e.firstChild.rows[0].cells[0].offsetHeight}else if(e.firstChild.tagName=="TABLE")a+=w(e);else{for(e=e.childNodes[e.childNodes.length-
|
||||
1];e.className.indexOf("dhx_scale_holder")==-1;)e=e.previousSibling;e=e.childNodes;a+="<y>";for(d=0;d<e.length;d++)a+="\n<row><![CDATA["+g(e[d].innerHTML)+"]]\></row>";a+="</y>";k=e[0].offsetHeight}}a+="</scale>";return a}function r(c,a){return(window.getComputedStyle?window.getComputedStyle(c,null)[a]:c.currentStyle?c.currentStyle[a]:null)||""}function B(){var c="",a=scheduler._rendered;if(scheduler._mode=="agenda")for(var b=0;b<a.length;b++)c+="<event><head>"+g(a[b].childNodes[0].innerHTML)+"</head><body>"+
|
||||
g(a[b].childNodes[2].innerHTML)+"</body></event>";else if(scheduler._mode=="year"){a=scheduler.get_visible_events();for(b=0;b<a.length;b++){var d=a[b].start_date;if(d.valueOf()<scheduler._min_date.valueOf())d=scheduler._min_date;for(;d<a[b].end_date;){var e=d.getMonth()+12*(d.getFullYear()-scheduler._min_date.getFullYear())-scheduler.week_starts._month,h=scheduler.week_starts[e]+d.getDate()-1;c+="<event day='"+h%7+"' week='"+Math.floor(h/7)+"' month='"+e+"'></event>";d=scheduler.date.add(d,1,"day");
|
||||
if(d.valueOf()>=scheduler._max_date.valueOf())break}}}else for(b=0;b<a.length;b++){var f=j(a[b].style.left),i=j(a[b].style.width),l=t(a[b].style.top),m=t(a[b].style.height),n=a[b].className.split(" ")[0].replace("dhx_cal_",""),o=scheduler.getEvent(a[b].getAttribute("event_id")),h=o._sday,s=o._sweek;if(scheduler._mode!="month"){if(scheduler.matrix&&scheduler.matrix[scheduler._mode])h=0,s=a[b].parentNode.parentNode.parentNode.rowIndex,i+=j(10);else{i+=j(i*20/100);f-=j(20-f*20/100);if(a[b].parentNode==
|
||||
scheduler._els.dhx_cal_data[0])continue;f+=j(a[b].parentNode.style.left);f-=j(51)}if(scheduler._mode=="timeline"){var q=k;k=180;l=t(a[b].style.top);k=q}}else m=parseInt(a[b].offsetHeight),l=parseInt(a[b].style.top)-22,h=y(a[b],h),s=z(a[b],s);c+="\n<event week='"+s+"' day='"+h+"' type='"+n+"' x='"+f+"' y='"+l+"' width='"+i+"' height='"+m+"'>";if(n=="event"){c+="<header><![CDATA["+g(a[b].childNodes[1].innerHTML)+"]]\></header>";var u=p?r(a[b].childNodes[2],"color"):"",v=p?r(a[b].childNodes[2],"backgroundColor"):
|
||||
"";c+="<body backgroundColor='"+v+"' color='"+u+"'><![CDATA["+g(a[b].childNodes[2].innerHTML)+"]]\></body>"}else u=p?r(a[b],"color"):"",v=p?r(a[b],"backgroundColor"):"",c+="<body backgroundColor='"+v+"' color='"+u+"'><![CDATA["+g(a[b].innerHTML)+"]]\></body>";c+="</event>"}return c}function C(){var c="</data>";return c}var o=0,k=0,p=!1;f=="fullcolor"&&(p=!0,f="color");f=f||"color";html_regexp=RegExp("<[^>]*>","g");var l=(new Date).valueOf(),i=document.createElement("div");i.style.display="none";document.body.appendChild(i);
|
||||
i.innerHTML='<form id="'+l+'" method="post" target="_blank" action="'+x+'" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>';document.getElementById(l).firstChild.value=A(f).replace("\u2013","-")+B()+C();document.getElementById(l).submit();i.parentNode.removeChild(i);grid=null};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTemplatesReady",function(){function h(d,b,c,f){for(var e=b.getElementsByTagName(d),a=c.getElementsByTagName(d),g=a.length-1;g>=0;g--)if(c=a[g],f){var i=document.createElement("SPAN");i.className="dhx_text_disabled";i.innerHTML=f(e[g]);c.parentNode.insertBefore(i,c);c.parentNode.removeChild(c)}else c.disabled=!0}scheduler.attachEvent("onBeforeLightbox",function(d){if(this.config.readonly_form||this.getEvent(d).readonly)this.config.readonly_active=!0;else return this.config.readonly_active=
|
||||
!1,!0;for(var b=0;b<this.config.lightbox.sections.length;b++)this.config.lightbox.sections[b].focus=!1;return!0});var k=scheduler._fill_lightbox;scheduler._fill_lightbox=function(){var d=this.config.lightbox.sections;if(this.config.readonly_active)for(var b=0;b<d.length;b++)if(d[b].type=="recurring"){var c=document.getElementById(d[b].id);c.style.display=c.nextSibling.style.display="none";d.splice(b,1);b--}var f=k.apply(this,arguments);if(this.config.readonly_active){var e=this._get_lightbox(),a=
|
||||
this._lightbox_r=e.cloneNode(!0);a.id=scheduler.uid();a.style.color="red";h("textarea",e,a,function(a){return a.value});h("input",e,a,!1);h("select",e,a,function(a){return a.options[Math.max(a.selectedIndex||0,0)].text});a.removeChild(a.childNodes[2]);a.removeChild(a.childNodes[3]);e.parentNode.insertBefore(a,e);j.call(this,a);scheduler._lightbox&&scheduler._lightbox.parentNode.removeChild(scheduler._lightbox);this._lightbox=a;this.setLightboxSize();this._lightbox=null;a.onclick=function(a){var b=
|
||||
a?a.target:event.srcElement;if(!b.className)b=b.previousSibling;if(b&&b.className)switch(b.className){case "dhx_cancel_btn":scheduler.callEvent("onEventCancel",[scheduler._lightbox_id]),scheduler._edit_stop_event(scheduler.getEvent(scheduler._lightbox_id),!1),scheduler.hide_lightbox()}}}return f};var j=scheduler.showCover;scheduler.showCover=function(){this.config.readonly_active||j.apply(this,arguments)};var l=scheduler.hide_lightbox;scheduler.hide_lightbox=function(){if(this._lightbox_r)this._lightbox_r.parentNode.removeChild(this._lightbox_r),
|
||||
this._lightbox_r=null;return l.apply(this,arguments)}});
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.form_blocks.recurring={render:function(){return scheduler.__recurring_template},_ds:{},_init_set_value:function(a,b,c){function d(a){for(var b=0;b<a.length;b++){var c=a[b];c.type=="checkbox"||c.type=="radio"?(g[c.name]||(g[c.name]=[]),g[c.name].push(c)):g[c.name]=c}}function f(a){for(var b=g[a],c=0;c<b.length;c++)if(b[c].checked)return b[c].value}function e(){m("dhx_repeat_day").style.display="none";m("dhx_repeat_week").style.display="none";m("dhx_repeat_month").style.display="none";m("dhx_repeat_year").style.display=
|
||||
"none";m("dhx_repeat_"+this.value).style.display="block"}function h(a){var b=[f("repeat")];for(p[b[0]](b,a);b.length<5;)b.push("");var c="";if(g.end[0].checked)a.end=new Date(9999,1,1),c="no";else if(g.end[2].checked)a.end=i(g.date_of_end.value);else{scheduler.transpose_type(b.join("_"));var c=Math.max(1,g.occurences_count.value),e=b[0]=="week"&&b[4]&&b[4].toString().indexOf(scheduler.config.start_on_monday?1:0)==-1?1:0;a.end=scheduler.date.add(new Date(a.start),c+e,b.join("_"))}return b.join("_")+
|
||||
"#"+c}function j(a,b){var c=a.split("#"),a=c[0].split("_");q[a[0]](a,b);var e=g.repeat[{day:0,week:1,month:2,year:3}[a[0]]];switch(c[1]){case "no":g.end[0].checked=!0;break;case "":g.end[2].checked=!0;g.date_of_end.value=k(b.end);break;default:g.end[1].checked=!0,g.occurences_count.value=c[1]}e.checked=!0;e.onclick()}scheduler.form_blocks.recurring._ds={start:c.start_date,end:c._end_date};var i=scheduler.date.str_to_date(scheduler.config.repeat_date),k=scheduler.date.date_to_str(scheduler.config.repeat_date),
|
||||
l=a.getElementsByTagName("FORM")[0],g=[];d(l.getElementsByTagName("INPUT"));d(l.getElementsByTagName("SELECT"));var m=function(a){return document.getElementById(a)};scheduler.form_blocks.recurring._get_repeat_code=h;var p={month:function(a,b){f("month_type")=="d"?(a.push(Math.max(1,g.month_count.value)),b.start.setDate(g.month_day.value)):(a.push(Math.max(1,g.month_count2.value)),a.push(g.month_day2.value),a.push(Math.max(1,g.month_week2.value)),b.start.setDate(1));b._start=!0},week:function(a,b){a.push(Math.max(1,
|
||||
g.week_count.value));a.push("");a.push("");for(var c=[],e=g.week_day,d=0;d<e.length;d++)e[d].checked&&c.push(e[d].value);c.length||c.push(b.start.getDay());b.start=scheduler.date.week_start(b.start);b._start=!0;a.push(c.sort().join(","))},day:function(a){f("day_type")=="d"?a.push(Math.max(1,g.day_count.value)):(a.push("week"),a.push(1),a.push(""),a.push(""),a.push("1,2,3,4,5"),a.splice(0,1))},year:function(a,b){f("year_type")=="d"?(a.push("1"),b.start.setMonth(0),b.start.setDate(g.year_day.value),
|
||||
b.start.setMonth(g.year_month.value)):(a.push("1"),a.push(g.year_day2.value),a.push(g.year_week2.value),b.start.setDate(1),b.start.setMonth(g.year_month2.value));b._start=!0}},q={week:function(a){g.week_count.value=a[1];for(var b=g.week_day,c=a[4].split(","),e={},d=0;d<c.length;d++)e[c[d]]=!0;for(d=0;d<b.length;d++)b[d].checked=!!e[b[d].value]},month:function(a,b){a[2]==""?(g.month_type[0].checked=!0,g.month_count.value=a[1],g.month_day.value=b.start.getDate()):(g.month_type[1].checked=!0,g.month_count2.value=
|
||||
a[1],g.month_week2.value=a[3],g.month_day2.value=a[2])},day:function(a){g.day_type[0].checked=!0;g.day_count.value=a[1]},year:function(a,b){a[2]==""?(g.year_type[0].checked=!0,g.year_day.value=b.start.getDate(),g.year_month.value=b.start.getMonth()):(g.year_type[1].checked=!0,g.year_week2.value=a[3],g.year_day2.value=a[2],g.year_month2.value=b.start.getMonth())}};scheduler.form_blocks.recurring._set_repeat_code=j;for(var n=0;n<l.elements.length;n++){var o=l.elements[n];switch(o.name){case "repeat":o.onclick=
|
||||
e}}scheduler._lightbox._rec_init_done=!0},set_value:function(a,b,c){var d=scheduler.form_blocks.recurring;scheduler._lightbox._rec_init_done||d._init_set_value(a,b,c);a.open=!c.rec_type;a.blocked=c.event_pid&&c.event_pid!="0"?!0:!1;var f=d._ds;f.start=c.start_date;f.end=c._end_date;d.button_click(0,a.previousSibling.firstChild.firstChild,a,a);b&&d._set_repeat_code(b,f)},get_value:function(a,b){if(a.open){var c=scheduler.form_blocks.recurring._ds;b.rec_type=scheduler.form_blocks.recurring._get_repeat_code(c);
|
||||
c._start?(b.start_date=new Date(c.start),b._start_date=new Date(c.start),c._start=!1):b._start_date=null;b._end_date=b.end_date=c.end;b.rec_pattern=b.rec_type.split("#")[0]}else b.rec_type=b.rec_pattern="",b._end_date=b.end_date;return b.rec_type},focus:function(){},button_click:function(a,b,c,d){!d.open&&!d.blocked?(d.style.height="115px",b.style.backgroundPosition="-5px 0px",b.nextSibling.innerHTML=scheduler.locale.labels.button_recurring_open):(d.style.height="0px",b.style.backgroundPosition="-5px 20px",
|
||||
b.nextSibling.innerHTML=scheduler.locale.labels.button_recurring);d.open=!d.open;scheduler.setLightboxSize()}};scheduler._rec_markers={};scheduler._rec_markers_pull={};scheduler._add_rec_marker=function(a,b){a._pid_time=b;this._rec_markers[a.id]=a;this._rec_markers_pull[a.event_pid]||(this._rec_markers_pull[a.event_pid]={});this._rec_markers_pull[a.event_pid][b]=a};scheduler._get_rec_marker=function(a,b){var c=this._rec_markers_pull[b];return c?c[a]:null};
|
||||
scheduler._get_rec_markers=function(a){return this._rec_markers_pull[a]||[]};scheduler._rec_temp=[];scheduler.attachEvent("onEventLoading",function(a){a.event_pid!=0&&scheduler._add_rec_marker(a,a.event_length*1E3);if(a.rec_type)a.rec_pattern=a.rec_type.split("#")[0];return!0});
|
||||
scheduler.attachEvent("onEventIdChange",function(a,b){if(!this._ignore_call){this._ignore_call=!0;for(var c=0;c<this._rec_temp.length;c++){var d=this._rec_temp[c];if(d.event_pid==a)d.event_pid=b,this.changeEventId(d.id,b+"#"+d.id.split("#")[1])}delete this._ignore_call}});
|
||||
scheduler.attachEvent("onBeforeEventDelete",function(a){var b=this.getEvent(a);if(a.toString().indexOf("#")!=-1||b.event_pid&&b.event_pid!="0"&&b.rec_type!="none"){var a=a.split("#"),c=this.uid(),d=a[1]?a[1]:b._pid_time/1E3,f=this._copy_event(b);f.id=c;f.event_pid=b.event_pid||a[0];f.event_length=d;f.rec_type=f.rec_pattern="none";this.addEvent(f);this._add_rec_marker(f,d*1E3)}else{b.rec_type&&this._roll_back_dates(b);var e=this._get_rec_markers(a),h;for(h in e)if(e.hasOwnProperty(h))a=e[h].id,this.getEvent(a)&&
|
||||
this.deleteEvent(a,!0)}return!0});
|
||||
scheduler.attachEvent("onEventChanged",function(a){if(this._loading)return!0;var b=this.getEvent(a);if(a.toString().indexOf("#")!=-1){var a=a.split("#"),c=this.uid();this._not_render=!0;var d=this._copy_event(b);d.id=c;d.event_pid=a[0];d.event_length=a[1];d.rec_type=d.rec_pattern="";this.addEvent(d);this._not_render=!1;this._add_rec_marker(d,a[1]*1E3)}else{b.rec_type&&this._roll_back_dates(b);var f=this._get_rec_markers(a),e;for(e in f)f.hasOwnProperty(e)&&(delete this._rec_markers[f[e].id],this.deleteEvent(f[e].id,
|
||||
!0));delete this._rec_markers_pull[a];for(var h=!1,j=0;j<this._rendered.length;j++)this._rendered[j].getAttribute("event_id")==a&&(h=!0);if(!h)this._select_id=null}return!0});scheduler.attachEvent("onEventAdded",function(a){if(!this._loading){var b=this.getEvent(a);b.rec_type&&!b.event_length&&this._roll_back_dates(b)}return!0});scheduler.attachEvent("onEventSave",function(a,b){var c=this.getEvent(a);if(!c.rec_type&&b.rec_type&&(a+"").indexOf("#")==-1)this._select_id=null;return!0});
|
||||
scheduler.attachEvent("onEventCreated",function(a){var b=this.getEvent(a);if(!b.rec_type)b.rec_type=b.rec_pattern=b.event_length=b.event_pid="";return!0});scheduler.attachEvent("onEventCancel",function(a){var b=this.getEvent(a);b.rec_type&&(this._roll_back_dates(b),this.render_view_data())});
|
||||
scheduler._roll_back_dates=function(a){a.event_length=(a.end_date.valueOf()-a.start_date.valueOf())/1E3;a.end_date=a._end_date;a._start_date&&(a.start_date.setMonth(0),a.start_date.setDate(a._start_date.getDate()),a.start_date.setMonth(a._start_date.getMonth()),a.start_date.setFullYear(a._start_date.getFullYear()))};scheduler.validId=function(a){return a.toString().indexOf("#")==-1};scheduler.showLightbox_rec=scheduler.showLightbox;
|
||||
scheduler.showLightbox=function(a){var b=this.getEvent(a).event_pid;a.toString().indexOf("#")!=-1&&(b=a.split("#")[0]);if(!b||b==0||!this.locale.labels.confirm_recurring||!confirm(this.locale.labels.confirm_recurring))return this.showLightbox_rec(a);b=this.getEvent(b);b._end_date=b.end_date;b.end_date=new Date(b.start_date.valueOf()+b.event_length*1E3);return this.showLightbox_rec(b.id)};scheduler.get_visible_events_rec=scheduler.get_visible_events;
|
||||
scheduler.get_visible_events=function(){for(var a=0;a<this._rec_temp.length;a++)delete this._events[this._rec_temp[a].id];this._rec_temp=[];for(var b=this.get_visible_events_rec(),c=[],a=0;a<b.length;a++)b[a].rec_type?b[a].rec_pattern!="none"&&this.repeat_date(b[a],c):c.push(b[a]);return c};(function(){var a=scheduler.is_one_day_event;scheduler.is_one_day_event=function(b){return b.rec_type?!0:a.call(this,b)}})();scheduler.transponse_size={day:1,week:7,month:1,year:12};
|
||||
scheduler.date.day_week=function(a,b,c){a.setDate(1);var c=(c-1)*7,d=a.getDay(),f=b*1+c-d+1;a.setDate(f<=c?f+7:f)};scheduler.transpose_day_week=function(a,b,c,d,f){for(var e=(a.getDay()||(scheduler.config.start_on_monday?7:0))-c,h=0;h<b.length;h++)if(b[h]>e)return a.setDate(a.getDate()+b[h]*1-e-(d?c:f));this.transpose_day_week(a,b,c+d,null,c)};
|
||||
scheduler.transpose_type=function(a){var b="transpose_"+a;if(!this.date[b]){var c=a.split("_"),d=864E5,f="add_"+a,e=this.transponse_size[c[0]]*c[1];if(c[0]=="day"||c[0]=="week"){var h=null;if(c[4]&&(h=c[4].split(","),scheduler.config.start_on_monday)){for(var j=0;j<h.length;j++)h[j]=h[j]*1||7;h.sort()}this.date[b]=function(a,b){var c=Math.floor((b.valueOf()-a.valueOf())/(d*e));c>0&&a.setDate(a.getDate()+c*e);h&&scheduler.transpose_day_week(a,h,1,e)};this.date[f]=function(a,b){var c=new Date(a.valueOf());
|
||||
if(h)for(var d=0;d<b;d++)scheduler.transpose_day_week(c,h,0,e);else c.setDate(c.getDate()+b*e);return c}}else if(c[0]=="month"||c[0]=="year")this.date[b]=function(a,b){var d=Math.ceil((b.getFullYear()*12+b.getMonth()*1-(a.getFullYear()*12+a.getMonth()*1))/e);d>=0&&a.setMonth(a.getMonth()+d*e);c[3]&&scheduler.date.day_week(a,c[2],c[3])},this.date[f]=function(a,b){var d=new Date(a.valueOf());d.setMonth(d.getMonth()+b*e);c[3]&&scheduler.date.day_week(d,c[2],c[3]);return d}}};
|
||||
scheduler.repeat_date=function(a,b,c,d,f){var d=d||this._min_date,f=f||this._max_date,e=new Date(a.start_date.valueOf());if(!a.rec_pattern&&a.rec_type)a.rec_pattern=a.rec_type.split("#")[0];this.transpose_type(a.rec_pattern);for(scheduler.date["transpose_"+a.rec_pattern](e,d);e<a.start_date||e.valueOf()+a.event_length*1E3<=d.valueOf();)e=this.date.add(e,1,a.rec_pattern);for(;e<f&&e<a.end_date;){var h=this._get_rec_marker(e.valueOf(),a.id);if(h)c&&b.push(h);else{var j=new Date(e.valueOf()+a.event_length*
|
||||
1E3),i=this._copy_event(a);i.text=a.text;i.start_date=e;i.event_pid=a.id;i.id=a.id+"#"+Math.ceil(e.valueOf()/1E3);i.end_date=j;var k=i.start_date.getTimezoneOffset()-i.end_date.getTimezoneOffset();if(k)i.end_date=k>0?new Date(e.valueOf()+a.event_length*1E3-k*6E4):new Date(i.end_date.valueOf()+k*6E4);i._timed=this.is_one_day_event(i);if(!i._timed&&!this._table_view&&!this.config.multi_day)break;b.push(i);c||(this._events[i.id]=i,this._rec_temp.push(i))}e=this.date.add(e,1,a.rec_pattern)}};
|
||||
scheduler.getRecDates=function(a,b){var c=typeof a=="object"?a:scheduler.getEvent(a),d=0,f=[],b=b||1E3,e=new Date(c.start_date.valueOf()),h=new Date(e.valueOf());if(!c.rec_type)return[{start_date:c.start_date,end_date:c.end_date}];this.transpose_type(c.rec_pattern);for(scheduler.date["transpose_"+c.rec_pattern](e,h);e<c.start_date||e.valueOf()+c.event_length*1E3<=h.valueOf();)e=this.date.add(e,1,c.rec_pattern);for(;e<c.end_date;){var j=this._get_rec_marker(e.valueOf(),c.id),i=!0;if(j)j.rec_type==
|
||||
"none"?i=!1:f.push({start_date:j.start_date,end_date:j.end_date});else{var k=new Date(e.valueOf()+c.event_length*1E3),l=new Date(e);f.push({start_date:l,end_date:k})}e=this.date.add(e,1,c.rec_pattern);if(i&&(d++,d==b))break}return f};
|
||||
scheduler.getEvents=function(a,b){var c=[],d;for(d in this._events){var f=this._events[d];if(f&&f.start_date<b&&f.end_date>a)if(f.rec_pattern){if(f.rec_pattern!="none"){var e=[];this.repeat_date(f,e,!0,a,b);for(var h=0;h<e.length;h++)!e[h].rec_pattern&&e[h].start_date<b&&e[h].end_date>a&&!this._rec_markers[e[h].id]&&c.push(e[h])}}else f.id.toString().indexOf("#")==-1&&c.push(f)}return c};scheduler.config.repeat_date="%m.%d.%Y";
|
||||
scheduler.config.lightbox.sections=[{name:"description",height:130,map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}];scheduler._copy_dummy=function(){this.start_date=new Date(this.start_date);this.end_date=new Date(this.end_date);this.event_length=this.event_pid=this.rec_pattern=this.rec_type=this._timed=null};
|
||||
scheduler.__recurring_template='<div class="dhx_form_repeat"> <form> <div class="dhx_repeat_left"> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="day" />Daily</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="week"/>Weekly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="month" checked />Monthly</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="repeat" value="year" />Yearly</label> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_center"> <div style="display:none;" id="dhx_repeat_day"> <label><input class="dhx_repeat_radio" type="radio" name="day_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="day_count" value="1" />day<br /> <label><input class="dhx_repeat_radio" type="radio" name="day_type" checked value="w"/>Every workday</label> </div> <div style="display:none;" id="dhx_repeat_week"> Repeat every<input class="dhx_repeat_text" type="text" name="week_count" value="1" />week next days:<br /> <table class="dhx_repeat_days"> <tr> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="1" />Monday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="4" />Thursday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="2" />Tuesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="5" />Friday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="3" />Wednesday</label><br /> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="6" />Saturday</label> </td> <td> <label><input class="dhx_repeat_checkbox" type="checkbox" name="week_day" value="0" />Sunday</label><br /><br /> </td> </tr> </table> </div> <div id="dhx_repeat_month"> <label><input class="dhx_repeat_radio" type="radio" name="month_type" value="d"/>Repeat</label><input class="dhx_repeat_text" type="text" name="month_day" value="1" />day every<input class="dhx_repeat_text" type="text" name="month_count" value="1" />month<br /> <label><input class="dhx_repeat_radio" type="radio" name="month_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="month_week2" value="1" /><select name="month_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="0">Sunday</select>every<input class="dhx_repeat_text" type="text" name="month_count2" value="1" />month<br /> </div> <div style="display:none;" id="dhx_repeat_year"> <label><input class="dhx_repeat_radio" type="radio" name="year_type" value="d"/>Every</label><input class="dhx_repeat_text" type="text" name="year_day" value="1" />day<select name="year_month"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select>month<br /> <label><input class="dhx_repeat_radio" type="radio" name="year_type" checked value="w"/>On</label><input class="dhx_repeat_text" type="text" name="year_week2" value="1" /><select name="year_day2"><option value="1" selected >Monday<option value="2">Tuesday<option value="3">Wednesday<option value="4">Thursday<option value="5">Friday<option value="6">Saturday<option value="7">Sunday</select>of<select name="year_month2"><option value="0" selected >January<option value="1">February<option value="2">March<option value="3">April<option value="4">May<option value="5">June<option value="6">July<option value="7">August<option value="8">September<option value="9">October<option value="10">November<option value="11">December</select><br /> </div> </div> <div class="dhx_repeat_divider"></div> <div class="dhx_repeat_right"> <label><input class="dhx_repeat_radio" type="radio" name="end" checked/>No end date</label><br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />After</label><input class="dhx_repeat_text" type="text" name="occurences_count" value="1" />occurrences<br /> <label><input class="dhx_repeat_radio" type="radio" name="end" />End by</label><input class="dhx_repeat_date" type="text" name="date_of_end" value="'+scheduler.config.repeat_date_of_end+
|
||||
'" /><br /> </div> </form> </div> <div style="clear:both"> </div>';
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.data_attributes=function(){var f=[],d=scheduler.templates.xml_format,c;for(c in this._events){var e=this._events[c],a;for(a in e)a.substr(0,1)!="_"&&f.push([a,a=="start_date"||a=="end_date"?d:null]);break}return f};
|
||||
scheduler.toXML=function(f){var d=[],c=this.data_attributes(),e;for(e in this._events){var a=this._events[e];if(a.id.toString().indexOf("#")==-1){d.push("<event>");for(var b=0;b<c.length;b++)d.push("<"+c[b][0]+"><![CDATA["+(c[b][1]?c[b][1](a[c[b][0]]):a[c[b][0]])+"]]\></"+c[b][0]+">");d.push("</event>")}}return(f||"")+"<data>"+d.join("\n")+"</data>"};
|
||||
scheduler.toJSON=function(){var f=[],d=this.data_attributes(),c;for(c in this._events){var e=this._events[c];if(e.id.toString().indexOf("#")==-1){for(var e=this._events[c],a=[],b=0;b<d.length;b++)a.push(" "+d[b][0]+':"'+((d[b][1]?d[b][1](e[d[b][0]]):e[d[b][0]])||"").toString().replace(/\n/g,"")+'" ');f.push("{"+a.join(",")+"}")}}return"["+f.join(",\n")+"]"};
|
||||
scheduler.toICal=function(f){var d="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\nDESCRIPTION:",c="END:VCALENDAR",e=scheduler.date.date_to_str("%Y%m%dT%H%i%s"),a=[],b;for(b in this._events){var g=this._events[b];g.id.toString().indexOf("#")==-1&&(a.push("BEGIN:VEVENT"),a.push("DTSTART:"+e(g.start_date)),a.push("DTEND:"+e(g.end_date)),a.push("SUMMARY:"+g.text),a.push("END:VEVENT"))}return d+(f||"")+"\n"+a.join("\n")+"\n"+c};
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
(function(){function B(){for(var a=scheduler.get_visible_events(),b=[],c=0;c<this.y_unit.length;c++)b[c]=[];b[f]||(b[f]=[]);for(c=0;c<a.length;c++){for(var f=this.order[a[c][this.y_property]],d=0;this._trace_x[d+1]&&a[c].start_date>=this._trace_x[d+1];)d++;for(;this._trace_x[d]&&a[c].end_date>this._trace_x[d];)b[f][d]||(b[f][d]=[]),b[f][d].push(a[c]),d++}return b}function v(a,b,c){var f=0,d=b?a.end_date:a.start_date;if(d.valueOf()>scheduler._max_date.valueOf())d=scheduler._max_date;var i=d-scheduler._min_date_timeline;
|
||||
if(i<0)k=0;else{var g=Math.round(i/(c*scheduler._cols[0]));if(g>scheduler._cols.length)g=scheduler._cols.length;for(var e=0;e<g;e++)f+=scheduler._cols[e];var j=scheduler.date.add(scheduler._min_date_timeline,scheduler.matrix[scheduler._mode].x_step*g,scheduler.matrix[scheduler._mode].x_unit),i=d-j,k=Math.floor(i/c)}f+=b?k-14:k+1;return f}function C(a){var b="<table style='table-layout:fixed;' cellspacing='0' cellpadding='0'>",c=[];scheduler._load_mode&&scheduler._load();if(this.render=="cell")c=B.call(this);
|
||||
else for(var f=scheduler.get_visible_events(),d=0;d<f.length;d++){var i=this.order[f[d][this.y_property]];c[i]||(c[i]=[]);c[i].push(f[d])}for(var g=0,e=0;e<scheduler._cols.length;e++)g+=scheduler._cols[e];var j=new Date;this._step=j=(scheduler.date.add(j,this.x_step*this.x_size,this.x_unit)-j)/g;this._summ=g;var k=scheduler._colsS.heights=[];this._events_height={};for(e=0;e<this.y_unit.length;e++){var h=this._logic(this.render,this.y_unit[e],this);scheduler._merge(h,{height:this.dy});if(this.section_autoheight&&
|
||||
this.y_unit.length*h.height<a.offsetHeight)h.height=Math.max(h.height,Math.floor((a.offsetHeight-1)/this.y_unit.length));scheduler._merge(h,{tr_className:"",style_height:"height:"+h.height+"px;",style_width:"width:"+(this.dx-1)+"px;",td_className:"dhx_matrix_scell"+(scheduler.templates[this.name+"_scaley_class"](this.y_unit[e].key,this.y_unit[e].label,this)?" "+scheduler.templates[this.name+"_scaley_class"](this.y_unit[e].key,this.y_unit[e].label,this):""),td_content:scheduler.templates[this.name+
|
||||
"_scale_label"](this.y_unit[e].key,this.y_unit[e].label,this.y_unit[e]),summ_width:"width:"+g+"px;",table_className:""});var o="";if(c[e]&&this.render!="cell"){c[e].sort(function(a,d){return a.start_date>d.start_date?1:-1});for(var l=[],d=0;d<c[e].length;d++){for(var m=c[e][d],n=0;l[n]&&l[n].end_date>m.start_date;)n++;l[n]=m;o+=scheduler.render_timeline_event.call(this,m,n)}}if(this.fit_events){var w=this._events_height[this.y_unit[e].key]||0;h.height=w>h.height?w:h.height;h.style_height="height:"+
|
||||
h.height+"px;"}b+="<tr class='"+h.tr_className+"' style='"+h.style_height+"'><td class='"+h.td_className+"' style='"+h.style_width+" height:"+(h.height-1)+"px;'>"+h.td_content+"</td>";if(this.render=="cell")for(d=0;d<scheduler._cols.length;d++)b+="<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](c[e][d],this._trace_x[d],this.y_unit[e])+"' style='width:"+(scheduler._cols[d]-1)+"px'><div style='width:"+(scheduler._cols[d]-1)+"px'>"+scheduler.templates[this.name+"_cell_value"](c[e][d])+
|
||||
"</div></td>";else{b+="<td><div style='"+h.summ_width+" "+h.style_height+" position:relative;' class='dhx_matrix_line'>";b+=o;b+="<table class='"+h.table_className+"' cellpadding='0' cellspacing='0' style='"+h.summ_width+" "+h.style_height+"' >";for(d=0;d<scheduler._cols.length;d++)b+="<td class='dhx_matrix_cell "+scheduler.templates[this.name+"_cell_class"](c[e],this._trace_x[d],this.y_unit[e])+"' style='width:"+(scheduler._cols[d]-1)+"px'><div style='width:"+(scheduler._cols[d]-1)+"px'></div></td>";
|
||||
b+="</table>";b+="</div></td>"}b+="</tr>"}b+="</table>";this._matrix=c;a.innerHTML=b;scheduler._rendered=[];for(var q=document.getElementsByTagName("DIV"),e=0;e<q.length;e++)q[e].getAttribute("event_id")&&scheduler._rendered.push(q[e]);for(e=0;e<a.firstChild.rows.length;e++)k.push(a.firstChild.rows[e].offsetHeight)}function D(a){var b=scheduler.xy.scale_height,c=this._header_resized||scheduler.xy.scale_height;scheduler._cols=[];scheduler._colsS={height:0};this._trace_x=[];var f=scheduler._x-this.dx-
|
||||
18,d=[this.dx],i=scheduler._els.dhx_cal_header[0];i.style.width=d[0]+f+"px";for(var g=scheduler._min_date_timeline=scheduler._min_date,e=0;e<this.x_size;e++)this._trace_x[e]=new Date(g),g=scheduler.date.add(g,this.x_step,this.x_unit),scheduler._cols[e]=Math.floor(f/(this.x_size-e)),f-=scheduler._cols[e],d[e+1]=d[e]+scheduler._cols[e];a.innerHTML="<div></div>";if(this.second_scale){for(var j=this.second_scale.x_unit,k=[this._trace_x[0]],h=[],o=[this.dx,this.dx],l=0,m=0;m<this._trace_x.length;m++){var n=
|
||||
this._trace_x[m],w=E(j,n,k[l]);w&&(++l,k[l]=n,o[l+1]=o[l]);var q=l+1;h[l]=scheduler._cols[m]+(h[l]||0);o[q]+=scheduler._cols[m]}a.innerHTML="<div></div><div></div>";var p=a.firstChild;p.style.height=c+"px";var v=a.lastChild;v.style.position="relative";for(var r=0;r<k.length;r++){var t=k[r],u=scheduler.templates[this.name+"_second_scalex_class"](t),x=document.createElement("DIV");x.className="dhx_scale_bar dhx_second_scale_bar"+(u?" "+u:"");scheduler.set_xy(x,h[r]-1,c-3,o[r],0);x.innerHTML=scheduler.templates[this.name+
|
||||
"_second_scale_date"](t);p.appendChild(x)}}scheduler.xy.scale_height=c;for(var a=a.lastChild,s=0;s<this._trace_x.length;s++){g=this._trace_x[s];scheduler._render_x_header(s,d[s],g,a);var y=scheduler.templates[this.name+"_scalex_class"](g);y&&(a.lastChild.className+=" "+y)}scheduler.xy.scale_height=b;var z=this._trace_x;a.onclick=function(a){var d=A(a);d&&scheduler.callEvent("onXScaleClick",[d.x,z[d.x],a||event])};a.ondblclick=function(a){var d=A(a);d&&scheduler.callEvent("onXScaleDblClick",[d.x,z[d.x],
|
||||
a||event])}}function E(a,b,c){switch(a){case "day":return!(b.getDate()==c.getDate()&&b.getMonth()==c.getMonth()&&b.getFullYear()==c.getFullYear());case "week":return!(scheduler.date.getISOWeek(b)==scheduler.date.getISOWeek(c)&&b.getFullYear()==c.getFullYear());case "month":return!(b.getMonth()==c.getMonth()&&b.getFullYear()==c.getFullYear());case "year":return b.getFullYear()!=c.getFullYear();default:return!1}}function p(a){if(a){scheduler.set_sizes();t();var b=scheduler._min_date;D.call(this,scheduler._els.dhx_cal_header[0]);
|
||||
C.call(this,scheduler._els.dhx_cal_data[0]);scheduler._min_date=b;scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[this.name+"_date"](scheduler._min_date,scheduler._max_date);scheduler._table_view=!0}}function u(){if(scheduler._tooltip)scheduler._tooltip.style.display="none",scheduler._tooltip.date=""}function F(a,b,c){if(a.render=="cell"){var f=b.x+"_"+b.y,d=a._matrix[b.y][b.x];if(!d)return u();d.sort(function(a,d){return a.start_date>d.start_date?1:-1});if(scheduler._tooltip){if(scheduler._tooltip.date==
|
||||
f)return;scheduler._tooltip.innerHTML=""}else{var i=scheduler._tooltip=document.createElement("DIV");i.className="dhx_tooltip";document.body.appendChild(i);i.onclick=scheduler._click.dhx_cal_data}for(var g="",e=0;e<d.length;e++){var j=d[e].color?"background-color:"+d[e].color+";":"",k=d[e].textColor?"color:"+d[e].textColor+";":"";g+="<div class='dhx_tooltip_line' event_id='"+d[e].id+"' style='"+j+""+k+"'>";g+="<div class='dhx_tooltip_date'>"+(d[e]._timed?scheduler.templates.event_date(d[e].start_date):
|
||||
"")+"</div>";g+="<div class='dhx_event_icon icon_details'> </div>";g+=scheduler.templates[a.name+"_tooltip"](d[e].start_date,d[e].end_date,d[e])+"</div>"}scheduler._tooltip.style.display="";scheduler._tooltip.style.top="0px";scheduler._tooltip.style.left=document.body.offsetWidth-c.left-scheduler._tooltip.offsetWidth<0?c.left-scheduler._tooltip.offsetWidth+"px":c.left+b.src.offsetWidth+"px";scheduler._tooltip.date=f;scheduler._tooltip.innerHTML=g;scheduler._tooltip.style.top=document.body.offsetHeight-
|
||||
c.top-scheduler._tooltip.offsetHeight<0?c.top-scheduler._tooltip.offsetHeight+b.src.offsetHeight+"px":c.top+"px"}}function t(){dhtmlxEvent(scheduler._els.dhx_cal_data[0],"mouseover",function(a){var b=scheduler.matrix[scheduler._mode];if(b){var c=scheduler._locate_cell_timeline(a),a=a||event,f=a.target||a.srcElement;if(c)return F(b,c,getOffset(c.src))}u()});t=function(){}}function G(a){for(var b=a.parentNode.childNodes,c=0;c<b.length;c++)if(b[c]==a)return c;return-1}function A(a){for(var a=a||event,
|
||||
b=a.target?a.target:a.srcElement;b&&b.tagName!="DIV";)b=b.parentNode;if(b&&b.tagName=="DIV"){var c=b.className.split(" ")[0];if(c=="dhx_scale_bar")return{x:G(b),y:-1,src:b,scale:!0}}}scheduler.matrix={};scheduler._merge=function(a,b){for(var c in b)typeof a[c]=="undefined"&&(a[c]=b[c])};scheduler.createTimelineView=function(a){scheduler._merge(a,{section_autoheight:!0,name:"matrix",x:"time",y:"time",x_step:1,x_unit:"hour",y_unit:"day",y_step:1,x_start:0,x_size:24,y_start:0,y_size:7,render:"cell",
|
||||
dx:200,dy:50,fit_events:!0,second_scale:!1,_logic:function(a,b,c){var e={};scheduler.checkEvent("onBeforeViewRender")&&(e=scheduler.callEvent("onBeforeViewRender",[a,b,c]));return e}});scheduler.checkEvent("onTimelineCreated")&&scheduler.callEvent("onTimelineCreated",[a]);var b=scheduler.render_data;scheduler.render_data=function(d,c){if(this._mode==a.name)if(c)for(var f=0;f<d.length;f++)this.clear_event(d[f]),this.render_timeline_event.call(this.matrix[this._mode],d[f],0,!0);else p.call(a,!0);else return b.apply(this,
|
||||
arguments)};scheduler.matrix[a.name]=a;scheduler.templates[a.name+"_cell_value"]=function(a){return a?a.length:""};scheduler.templates[a.name+"_cell_class"]=function(){return""};scheduler.templates[a.name+"_scalex_class"]=function(){return""};scheduler.templates[a.name+"_second_scalex_class"]=function(){return""};scheduler.templates[a.name+"_scaley_class"]=function(){return""};scheduler.templates[a.name+"_scale_label"]=function(a,b){return b};scheduler.templates[a.name+"_tooltip"]=function(a,b,c){return c.text};
|
||||
scheduler.templates[a.name+"_date"]=function(a,b){return a.getDay()==b.getDay()&&b-a<864E5?scheduler.templates.day_date(a):scheduler.templates.week_date(a,b)};scheduler.templates[a.name+"_scale_date"]=scheduler.date.date_to_str(a.x_date||scheduler.config.hour_date);scheduler.templates[a.name+"_second_scale_date"]=scheduler.date.date_to_str(a.second_scale&&a.second_scale.x_date?a.second_scale.x_date:scheduler.config.hour_date);scheduler.date["add_"+a.name]=function(b,c){return scheduler.date.add(b,
|
||||
(a.x_length||a.x_size)*c*a.x_step,a.x_unit)};scheduler.date[a.name+"_start"]=scheduler.date[a.x_unit+"_start"]||scheduler.date.day_start;scheduler.attachEvent("onSchedulerResize",function(){return this._mode==a.name?(p.call(a,!0),!1):!0});scheduler.attachEvent("onOptionsLoad",function(){a.order={};scheduler.callEvent("onOptionsLoadStart",[]);for(var b=0;b<a.y_unit.length;b++)a.order[a.y_unit[b].key]=b;scheduler.callEvent("onOptionsLoadFinal",[]);scheduler._date&&a.name==scheduler._mode&&scheduler.setCurrentView(scheduler._date,
|
||||
scheduler._mode)});scheduler.callEvent("onOptionsLoad",[a]);scheduler[a.name+"_view"]=function(){scheduler.renderMatrix.apply(a,arguments)};if(a.render!="cell"){var c=new Date,f=scheduler.date.add(c,a.x_step,a.x_unit).valueOf()-c.valueOf();scheduler["mouse_"+a.name]=function(b){var c=this._drag_event;if(this._drag_id)c=this.getEvent(this._drag_id),this._drag_event._dhx_changed=!0;b.x-=a.dx;for(var g=0,e=0,j=0;e<this._cols.length-1;e++)if(g+=this._cols[e],g>b.x)break;for(g=0;j<this._colsS.heights.length;j++)if(g+=
|
||||
this._colsS.heights[j],g>b.y)break;b.fields={};a.y_unit[j]||(j=a.y_unit.length-1);b.fields[a.y_property]=c[a.y_property]=a.y_unit[j].key;b.x=0;this._drag_mode=="new-size"&&c.start_date*1==this._drag_start*1&&e++;var k=e>=a._trace_x.length?scheduler.date.add(a._trace_x[a._trace_x.length-1],a.x_step,a.x_unit):a._trace_x[e];b.y=Math.round((k-this._min_date)/(6E4*this.config.time_step));b.custom=!0;b.shift=f;return b}}};scheduler.render_timeline_event=function(a,b,c){var f=v(a,!1,this._step),d=v(a,!0,
|
||||
this._step),i=scheduler.xy.bar_height,g=2+b*i,e=i+g-2,j=a[this.y_property];if(!this._events_height[j]||this._events_height[j]<e)this._events_height[j]=e;var k=scheduler.templates.event_class(a.start_date,a.end_date,a),k="dhx_cal_event_line "+(k||""),h=a.color?"background-color:"+a.color+";":"",o=a.textColor?"color:"+a.textColor+";":"",l='<div event_id="'+a.id+'" class="'+k+'" style="'+h+""+o+"position:absolute; top:"+g+"px; left:"+f+"px; width:"+Math.max(0,d-f)+"px;"+(a._text_style||"")+'">'+scheduler.templates.event_bar_text(a.start_date,
|
||||
a.end_date,a)+"</div>";if(c){var m=document.createElement("DIV");m.innerHTML=l;var n=this.order[j],p=scheduler._els.dhx_cal_data[0].firstChild.rows[n].cells[1].firstChild;scheduler._rendered.push(m.firstChild);p.appendChild(m.firstChild)}else return l};scheduler.renderMatrix=function(a){scheduler._els.dhx_cal_data[0].scrollTop=0;var b=scheduler.date[this.name+"_start"](scheduler._date);scheduler._min_date=scheduler.date.add(b,this.x_start*this.x_step,this.x_unit);scheduler._max_date=scheduler.date.add(scheduler._min_date,
|
||||
this.x_size*this.x_step,this.x_unit);scheduler._table_view=!0;if(this.second_scale){if(a&&!this._header_resized)this._header_resized=scheduler.xy.scale_height,scheduler.xy.scale_height*=2,scheduler._els.dhx_cal_header[0].className+=" dhx_second_cal_header";if(!a&&this._header_resized){scheduler.xy.scale_height/=2;this._header_resized=!1;var c=scheduler._els.dhx_cal_header[0];c.className=c.className.replace(/ dhx_second_cal_header/gi,"")}}p.call(this,a)};scheduler._locate_cell_timeline=function(a){for(var a=
|
||||
a||event,b=a.target?a.target:a.srcElement;b&&b.tagName!="TD";)b=b.parentNode;if(b&&b.tagName=="TD"){var c=b.className.split(" ")[0];if(c=="dhx_matrix_cell")if(scheduler._isRender("cell"))return{x:b.cellIndex-1,y:b.parentNode.rowIndex,src:b};else{for(var f=b.parentNode;f&&f.tagName!="TD";)f=f.parentNode;return{x:b.cellIndex,y:f.parentNode.rowIndex,src:b}}else if(c=="dhx_matrix_scell")return{x:-1,y:b.parentNode.rowIndex,src:b,scale:!0}}return!1};var H=scheduler._click.dhx_cal_data;scheduler._click.dhx_cal_data=
|
||||
function(a){var b=H.apply(this,arguments),c=scheduler.matrix[scheduler._mode];if(c){var f=scheduler._locate_cell_timeline(a);f&&(f.scale?scheduler.callEvent("onYScaleClick",[f.y,c.y_unit[f.y],a||event]):scheduler.callEvent("onCellClick",[f.x,f.y,c._trace_x[f.x],(c._matrix[f.y]||{})[f.x]||[],a||event]))}return b};scheduler.dblclick_dhx_matrix_cell=function(a){var b=scheduler.matrix[scheduler._mode];if(b){var c=scheduler._locate_cell_timeline(a);c&&(c.scale?scheduler.callEvent("onYScaleDblClick",[c.y,
|
||||
b.y_unit[c.y],a||event]):scheduler.callEvent("onCellDblClick",[c.x,c.y,b._trace_x[c.x],(b._matrix[c.y]||{})[c.x]||[],a||event]))}};scheduler.dblclick_dhx_matrix_scell=function(a){return scheduler.dblclick_dhx_matrix_cell(a)};scheduler._isRender=function(a){return scheduler.matrix[scheduler._mode]&&scheduler.matrix[scheduler._mode].render==a};scheduler.attachEvent("onCellDblClick",function(a,b,c,f,d){if(!(this.config.readonly||d.type=="dblclick"&&!this.config.dblclick_create)){var i=scheduler.matrix[scheduler._mode],
|
||||
g={};g.start_date=i._trace_x[a];g.end_date=i._trace_x[a+1]?i._trace_x[a+1]:scheduler.date.add(i._trace_x[a],i.x_step,i.x_unit);g[scheduler.matrix[scheduler._mode].y_property]=i.y_unit[b].key;scheduler.addEventNow(g,null,d)}});scheduler.attachEvent("onBeforeDrag",function(){return scheduler._isRender("cell")?!1:!0})})();
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
window.dhtmlXTooltip={};dhtmlXTooltip.config={className:"dhtmlXTooltip tooltip",timeout_to_display:50,delta_x:15,delta_y:-20};dhtmlXTooltip.tooltip=document.createElement("div");dhtmlXTooltip.tooltip.className=dhtmlXTooltip.config.className;
|
||||
dhtmlXTooltip.show=function(b,d){var c=dhtmlXTooltip,f=this.tooltip,a=f.style;c.tooltip.className=c.config.className;var e=this.position(b),k=b.target||b.srcElement;if(!this.isTooltip(k)){var g=0,l=0,h=scheduler._obj;if(h.offsetParent){do g+=h.offsetLeft,l+=h.offsetTop;while(h=h.offsetParent)}var i=e.x+(c.config.delta_x||0)-g,j=e.y-(c.config.delta_y||0)-l;a.visibility="hidden";a.removeAttribute?(a.removeAttribute("right"),a.removeAttribute("bottom")):(a.removeProperty("right"),a.removeProperty("bottom"));
|
||||
a.left="0";a.top="0";this.tooltip.innerHTML=d;scheduler._obj.appendChild(this.tooltip);var m=this.tooltip.offsetWidth,n=this.tooltip.offsetHeight;scheduler._obj.offsetWidth-i-(scheduler.xy.margin_left||0)-m<0?(a.removeAttribute?a.removeAttribute("left"):a.removeProperty("left"),a.right=scheduler._obj.offsetWidth-i+2*(c.config.delta_x||0)+"px"):a.left=i<0?e.x+Math.abs(c.config.delta_x||0)+"px":i+"px";scheduler._obj.offsetHeight-j-(scheduler.xy.margin_top||0)-n<0?(a.removeAttribute?a.removeAttribute("top"):
|
||||
a.removeProperty("top"),a.bottom=scheduler._obj.offsetHeight-j-2*(c.config.delta_y||0)+"px"):a.top=j<0?e.y+Math.abs(c.config.delta_y||0)+"px":j+"px";a.visibility="visible"}};dhtmlXTooltip.hide=function(){this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip)};dhtmlXTooltip.delay=function(b,d,c,f){this.tooltip._timeout_id&&window.clearTimeout(this.tooltip._timeout_id);this.tooltip._timeout_id=setTimeout(function(){var a=b.apply(d,c);b=d=c=null;return a},f||this.config.timeout_to_display)};
|
||||
dhtmlXTooltip.isTooltip=function(b){for(var d=!1;b&&!d;)d=b.className==this.tooltip.className,b=b.parentNode;return d};dhtmlXTooltip.position=function(b){b=b||window.event;if(b.pageX||b.pageY)return{x:b.pageX,y:b.pageY};var d=dhtmlx._isIE&&document.compatMode!="BackCompat"?document.documentElement:document.body;return{x:b.clientX+d.scrollLeft-d.clientLeft,y:b.clientY+d.scrollTop-d.clientTop}};
|
||||
scheduler.attachEvent("onMouseMove",function(b,d){var c=window.event||d,f=c.target||c.srcElement,a=dhtmlXTooltip;if(b||a.isTooltip(f)){var e=scheduler.getEvent(b)||scheduler.getEvent(a.tooltip.event_id);if(e){a.tooltip.event_id=e.id;var k=scheduler.templates.tooltip_text(e.start_date,e.end_date,e),g=void 0;_isIE&&(g=document.createEventObject(c));a.delay(a.show,a,[g||c,k])}}else a.delay(a.hide,a,[])});scheduler.attachEvent("onBeforeDrag",function(){dhtmlXTooltip.hide();return!0});
|
||||
scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i");scheduler.templates.tooltip_text=function(b,d,c){return"<b>Event:</b> "+c.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(b)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(d)};
|
|
@ -1,5 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
.dhx_cal_prev_button,.dhx_cal_next_button,.dhx_cal_today_button,.dhx_cal_add_button{top:6px!important;left:10px;border:1px solid #575D65;border-top:1px solid #4E5052;color:#FFF;text-shadow:0 -1px 0 #65696E;background-image:-webkit-gradient(linear,left top,left bottom,from(#B2B6BC),to(#6B737E));background-color:#989B9F;background-position:0 1px;background-repeat:repeat-x;-webkit-border-radius:5px;padding:3px;text-align:center;text-decoration:none;}.dhx_cal_today_button{left:55px;}.dhx_cal_next_button{left:146px;}.dhx_cal_add_button{right:9px;left:auto;width:20px;font-size:20px;padding:1px 2px 2px 2px;}.dhx_cal_navline .dhx_cal_date{top:7px;left:160px;right:350px;padding-top:4px;width:auto;text-align:center;color:#4F5459;}.dhx_cal_navline{background:-webkit-gradient(linear,0% 0,0% 100%,color-stop(0,#F4F5F8),color-stop(0.3,#F1F2F4),color-stop(0.7,#C4C7D0),color-stop(1,#A6AAB7));border-bottom:1px solid #797F90;height:40px!important;font-family:Helvetica;font-weight:bold;font-size:13px;}.dhx_cal_tab{top:6px!important;color:#4F5459;text-align:center;padding:5px 10px;width:80px;background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#F7F7F7),to(#B9BDC7));background-color:#CFD0D1;background-position:0 1px;background-repeat:repeat-x;text-decoration:none;border:1px solid #95989F;border-top:1px solid #686A6A;height:16px;}.dhx_cal_tab.active{background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#B0B2B6),to(#666D74));background-color:#949799;background-position:0 1px;background-repeat:repeat-x;border:1px solid #4C4D4F;border-top:1px solid #52585C;color:#F8F8F8;text-shadow:0 -1px 0 #5E6063;text-decoration:none;height:16px;padding:5px 10px;z-index:100;}.dhx_cal_light{-webkit-transition:-webkit-transform;-webkit-transform-style:preserve-3d;}.dhx_cal_cover{opacity:.5;}.dhx_cal_ltext{padding-top:0;padding-bottom:0;}.dhx_cal_ltext textarea{-webkit-background-size:0;-webkit-border-radius:0;height:94%;}.dhx_mini_calendar .dhx_month_head{height:35px;line-height:35px;text-align:center;padding-right:0;padding-left:0;}.dhx_mini_calendar .dhx_year_month{height:35px;line-height:30px;background:-webkit-gradient(linear,0% 0,0% 100%,from(#F4F5F8),to(#8A8E9A));font-family:Helvetica;font-weight:bold;font-size:13px;}.dhx_mini_calendar .dhx_year_month .dhx_cal_prev_button,.dhx_mini_calendar .dhx_year_month .dhx_cal_next_button{line-height:normal;}
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
TouchScroll=function(a,b,c,e){this.debug=!!b;this.compat=!!e;this.rough=!!c;this.axisX=this.axisY=!0;typeof a!="object"&&(a=document.getElementById(a));this._init();a.addEventListener("touchstart",this,!1);a.addEventListener("webkitTransitionEnd",this,!1);this.debug&&a.addEventListener("mousedown",this,!1);this.node=a;for(var d=0;d<a.childNodes.length;d++)if(a.childNodes[d].nodeType==1){this.area=a.childNodes[d];break}if(window.getComputedStyle(this.node).position=="static")this.node.style.position=
|
||||
"relative";this.area.style.cssText+="-webkit-transition: -webkit-transform; -webkit-user-select:none; -webkit-transform-style:preserve-3d;";this.scrolls={}};
|
||||
TouchScroll.prototype={refresh:function(){this.node.style.webkitTransformStyle="flat";this.node.style.webkitTransformStyle="preserve-3d"},scrollTo:function(a,b,c){this.set_matrix({e:a,f:b},c||0)},onscroll:function(){},handleEvent:function(a){return this["ev_"+a.type](a)},get_matrix:function(a){return new WebKitCSSMatrix(window.getComputedStyle(a||this.area).webkitTransform)},set_matrix:function(a,b,c){(c||this.area).style.webkitTransform="translate("+Math.round(a.e)+"px,"+Math.round(a.f)+"px)";(c||
|
||||
this.area).style.webkitTransitionDuration=b},ev_touchstart:function(a){this.ev_mousedown(a.touches[0]);a.preventDefault();return!1},ev_mousedown:function(a){var b=a;this.x=b.pageX;this.y=b.pageY;this.dx=this.node.offsetWidth;this.dy=this.node.offsetHeight;this.mx=this.area.scrollWidth;this.my=this.area.scrollHeight;this.target=b.target;if(!this.rough){var c=this.get_matrix();this.target_x=c.e;this.target_y=c.f;if(!this.scroll&&this.compat)c.e=this.node.scrollLeft*-1,c.f=this.node.scrollTop*-1,this.node.scrollTop=
|
||||
this.node.scrollLeft=0;this.set_matrix(c,0);this._correct_scroll(this.target_x,this.target_y)}this.scroll_x=this.scroll_y=this.scroll=!1;this._init_events()},ev_touchend:function(){return this.ev_mouseup()},ev_mouseup:function(){this._deinit_events();if(!this.scroll){this._remove_scroll();var a=document.createEvent("MouseEvent");a.initMouseEvent("click",!0,!0);this.target.dispatchEvent(a)}this.target=null},ev_webkitTransitionEnd:function(){if(!this.target&&this.scroll){this._remove_scroll();var a=
|
||||
this.get_matrix();this.node.firstChild._scrollTop=-1*a.f;if(this.compat&&(a.e||a.f)){var b=a.f,c=a.e;a.e=a.f=0;this.set_matrix(a,0);this.node.scrollTop=-1*b;this.node.scrollLeft=-1*c}this.scroll=!1}},ev_touchmove:function(a){return this.ev_mousemove(a.touches[0])},ev_mousemove:function(a){if(this.target){var b=a,c=(b.pageX-this.x)*(this.axisX?5:0),e=(b.pageY-this.y)*(this.axisY?5:0);if(!(Math.abs(c)<10&&Math.abs(e)<10)){if(Math.abs(c)>50)this.scroll_x=!0;if(Math.abs(e)>50)this.scroll_y=!0;if(this.scroll_x||
|
||||
this.scroll_y){this.x=b.pageX;this.y=b.pageY;this.scroll=!0;var d=this.get_matrix();c+=this.target_x-d.e;e+=this.target_y-d.f;var f="2000ms",g="500ms";this.target_x=c+d.e;this.target_y=e+d.f;if(this.target_x>0)this.target_x=0,f=g;if(this.target_y>0)this.target_y=0,f=g;if(this.mx-this.dx+this.target_x<0)this.target_x=-this.mx+this.dx,f=g;if(this.my-this.dy+this.target_y<0)this.target_y=-this.my+this.dy,f=g;this.set_matrix({e:this.target_x,f:this.target_y},f);this._add_scroll(d.e,d.f);this._correct_scroll(this.target_x,
|
||||
this.target_y,f);this.onscroll(this.target_x,this.target_y)}return!1}}},_correct_scroll:function(a,b,c){if(this.scrolls.x){var e=this.get_matrix(this.scrolls.x),d=this.dx*a/this.mx;this.set_matrix({e:-1*d,f:0},c,this.scrolls.x)}if(this.scrolls.y){var e=this.get_matrix(this.scrolls.y),f=this.dy*b/this.my;this.set_matrix({e:0,f:-1*f},c,this.scrolls.y)}},_remove_scroll:function(){this.scrolls.x&&this.scrolls.x.parentNode.removeChild(this.scrolls.x);this.scrolls.y&&this.scrolls.y.parentNode.removeChild(this.scrolls.y);
|
||||
this.scrolls={}},_add_scroll:function(){if(!this.scrolls.ready){var a;if(this.my>5&&this.axisY){var b=this.dy*this.dy/this.my-1;this.scrolls.y=a=document.createElement("DIV");a.className="dhx_scroll_y";a.style.height=b+"px";this.node.appendChild(a)}if(this.mx>5&&this.axisX)b=this.dx*this.dx/this.mx,this.scrolls.x=a=document.createElement("DIV"),a.className="dhx_scroll_x",a.style.width=b+"px",this.node.appendChild(a);var c=this.get_matrix();this._correct_scroll(c.e,c.f,0);this.scrolls.ready=!0}},_init_events:function(){document.addEventListener("touchmove",
|
||||
this,!1);document.addEventListener("touchend",this,!1);this.debug&&(document.addEventListener("mousemove",this,!1),document.addEventListener("mouseup",this,!1))},_deinit_events:function(){document.removeEventListener("touchmove",this,!1);document.removeEventListener("touchend",this,!1);this.debug&&(document.removeEventListener("mousemove",this,!1),document.removeEventListener("mouseup",this,!1))},_init:function(){document.styleSheets[0].insertRule(".dhx_scroll_x { width:50px;height:4px;background:rgba(0, 0, 0, 0.4);position:absolute; left:0px; bottom:3px; border:1px solid transparent; -webkit-border-radius:4px;-webkit-transition: -webkit-transform;}",
|
||||
0);document.styleSheets[0].insertRule(".dhx_scroll_y { width:4px;height:50px;background:rgba(0, 0, 0, 0.4);position:absolute; top:0px; right:3px; border:1px solid transparent; -webkit-border-radius:4px;-webkit-transition: -webkit-transform;}",0);this._init=function(){}}};
|
||||
scheduler._ipad_before_init=function(){scheduler._ipad_before_init=function(){};scheduler.xy.scroll_width=0;for(var a=scheduler._els.dhx_cal_tab,b=42,c=a.length-1;c>=0;c--)a[c].style.cssText+="top:4px;",a[c].style.left="auto",a[c].style.right=b+"px",c==0&&(a[c].style.cssText+=";-webkit-border-top-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;"),c==a.length-1&&(a[c].style.cssText+=";-webkit-border-top-right-radius: 5px; -webkit-border-bottom-right-radius: 5px;"),b+=100;scheduler._els.dhx_cal_prev_button[0].innerHTML=
|
||||
"<";scheduler._els.dhx_cal_next_button[0].innerHTML=">";var e=document.createElement("div");e.className="dhx_cal_add_button";e.innerHTML="+ ";e.onclick=function(){var a=new Date;a>scheduler._min_date&&a<scheduler._max_date?scheduler.addEventNow():scheduler.addEventNow(scheduler._min_date.valueOf())};scheduler._els.dhx_cal_navline[0].appendChild(e);this._obj.onmousedown=this._obj.onmouseup=this._obj.onmousemove=function(){};var d=null,f=[];this._obj.ontouchmove=function(a){if(d){var b=Math.abs(a.touches[0].pageX-
|
||||
f[0]),c=Math.abs(a.touches[0].pageY-f[1]);if(b>50||c>50)d=window.clearTimeout(d)}scheduler.config.touch_actions&&scheduler._on_mouse_move(a.touches[0])};this._obj.ontouchstart=function(a){scheduler._lightbox_id||(d=window.setTimeout(function(){scheduler._on_dbl_click(a.touches[0],a.target.className?a.target:a.target.parentNode)},400),f=[a.touches[0].pageX,a.touches[0].pageY],scheduler.config.touch_actions&&scheduler._on_mouse_down(a.touches[0]))};this._obj.ontouchend=function(a){d&&(d=window.clearTimeout(d));
|
||||
scheduler.config.touch_actions&&scheduler._on_mouse_up(a.touches[0])}};
|
||||
scheduler._ipad_init=function(){var a=document.createElement("DIV"),b=scheduler._els.dhx_cal_data[0];a.appendChild(b);a.style.cssText="overflow:hidden; width:100%; overflow:hidden;position:relative;";this._obj.appendChild(a);b.style.overflowY="hidden";var c=new TouchScroll(a);c.axisX=!1;scheduler._ipad_init=function(){b.parentNode.style.height=b.style.height;b.parentNode.style.top=b.style.top;b.style.height=b.scrollHeight+"px";b.style.top="0px";Math.abs(b.parentNode.offsetHeight-b.offsetHeight)<5?
|
||||
(c.axisY=!1,c.scrollTo(0,0,0)):c.axisY=!0;c.refresh()};scheduler.attachEvent("onSchedulerResize",function(){setTimeout(function(){scheduler._ipad_init()});return!0});scheduler._ipad_init()};scheduler.attachEvent("onViewChange",function(){scheduler._ipad_init()});scheduler.attachEvent("onBeforeViewChange",function(){scheduler._ipad_before_init();return!0});
|
||||
scheduler.showCover=function(a){this.show_cover();if(a){a.style.display="block";var b=getOffset(this._obj);a.style.top=a.offsetHeight*-1+"px";a.style.left=Math.round(b.left+(this._obj.offsetWidth-a.offsetWidth)/2)+"px"}var c=this._get_lightbox(),e=c.addEventListener("webkitTransitionEnd",function(){c.style.top="41px";c.style.webkitTransform="";c.style.webkitTransition="";c.removeEventListener(e)},!1);c.style.webkitTransform="translate(0px,"+(a.offsetHeight+41)+"px)";c.style.webkitTransitionDuration=
|
||||
"500ms"};scheduler.hideCover=function(a){if(a){var b=a.addEventListener("webkitTransitionEnd",function(){a.style.top=(a.offsetHeight+41)*-1+"px";a.style.webkitTransform="";a.style.webkitTransition="";a.removeEventListener(b)},!1);a.style.webkitTransform="translate(0px,"+(a.offsetHeight+41)*-1+"px)";a.style.webkitTransitionDuration="500ms"}this.hide_cover()};scheduler.config.lightbox.sections[0].height=100;
|
||||
if(scheduler.form_blocks.calendar_time)scheduler.config.lightbox.sections[1].type="calendar_time",scheduler._mini_cal_arrows=["<",">"];scheduler.xy.menu_width=0;scheduler.attachEvent("onClick",function(){return!1});scheduler.locale.labels.new_event="";
|
||||
scheduler._mouse_coords=function(a){var b,c=document.body,e=document.documentElement;b=a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:{x:a.clientX+(c.scrollLeft||e.scrollLeft||0)-c.clientLeft,y:a.clientY+(c.scrollTop||e.scrollTop||0)-c.clientTop};b.x-=getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);var d=b.y-=getAbsoluteTop(this._obj)+this.xy.nav_height+this._dy_shift+this.xy.scale_height-(this._els.dhx_cal_data[0]._scrollTop||0);if(this._table_view){for(var f=0,f=1;f<this._colsS.heights.length;f++)if(this._colsS.heights[f]>
|
||||
b.y)break;b.y=(Math.max(0,Math.ceil(b.x/this._cols[0])-1)+Math.max(0,f-1)*7)*1440/this.config.time_step;b.x=0}else b.x=Math.max(0,Math.ceil(b.x/this._cols[0])-1),b.y=Math.max(0,Math.ceil(b.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);return b};
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTimelineCreated",function(a){if(a.render=="tree")a.y_unit_original=a.y_unit,a.y_unit=scheduler._getArrayToDisplay(a.y_unit_original),scheduler.attachEvent("onOptionsLoadStart",function(){a.y_unit=scheduler._getArrayToDisplay(a.y_unit_original)}),scheduler.form_blocks[a.name]={render:function(b){var c="<div class='dhx_section_timeline' style='overflow: hidden; height: "+b.height+"px'></div>";return c},set_value:function(b,c,g,e){var d=scheduler._getArrayForSelect(scheduler.matrix[e.type].y_unit_original,
|
||||
e.type);b.innerHTML="";var a=document.createElement("select");b.appendChild(a);for(var i=b.getElementsByTagName("select")[0],j=0;j<d.length;j++){var h=document.createElement("option");h.value=d[j].key;if(h.value==g[scheduler.matrix[e.type].y_property])h.selected=!0;h.innerHTML=d[j].label;i.appendChild(h)}},get_value:function(b){return b.firstChild.value},focus:function(){}}});
|
||||
scheduler.attachEvent("onBeforeViewRender",function(a,b,c){var g={};if(a=="tree"){var e,d,f,i,j,h;b.children?(e=c.folder_dy||c.dy,c.folder_dy&&!c.section_autoheight&&(f="height:"+c.folder_dy+"px;"),d="dhx_row_folder",i="dhx_matrix_scell folder",j="<div class='dhx_scell_expand'>"+(b.open?"-":"+")+"</div>",h=c.folder_events_available?"dhx_data_table folder_events":"dhx_data_table folder"):(e=c.dy,d="dhx_row_item",i="dhx_matrix_scell item",j="",h="dhx_data_table");td_content="<div class='dhx_scell_level"+
|
||||
b.level+"'>"+j+"<div class='dhx_scell_name'>"+(scheduler.templates[c.name+"_scale_label"](b.key,b.label,b)||b.label)+"</div></div>";g={height:e,style_height:f,tr_className:d,td_className:i,td_content:td_content,table_className:h}}return g});var section_id_before;
|
||||
scheduler.attachEvent("onBeforeEventChanged",function(a,b,c){if(scheduler._isRender("tree")){var g=scheduler.getSection(a[scheduler.matrix[scheduler._mode].y_property]);if(typeof g.children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available)return c||(a[scheduler.matrix[scheduler._mode].y_property]=section_id_before),!1}return!0});
|
||||
scheduler.attachEvent("onBeforeDrag",function(a,b,c){var g=scheduler._locate_cell_timeline(c);if(g){var e=scheduler.matrix[scheduler._mode].y_unit[g.y].key;if(typeof scheduler.matrix[scheduler._mode].y_unit[g.y].children!="undefined"&&!scheduler.matrix[scheduler._mode].folder_events_available)return!1}scheduler._isRender("tree")&&(ev=scheduler.getEvent(a),section_id_before=e||ev[scheduler.matrix[scheduler._mode].y_property]);return!0});
|
||||
scheduler._getArrayToDisplay=function(a){var b=[],c=function(a,e){for(var d=e||0,f=0;f<a.length;f++){a[f].level=d;if(typeof a[f].children!="undefined"&&typeof a[f].key=="undefined")a[f].key=scheduler.uid();b.push(a[f]);a[f].open&&a[f].children&&c(a[f].children,d+1)}};c(a);return b};
|
||||
scheduler._getArrayForSelect=function(a,b){var c=[],g=function(a){for(var d=0;d<a.length;d++)scheduler.matrix[b].folder_events_available?c.push(a[d]):typeof a[d].children=="undefined"&&c.push(a[d]),a[d].children&&g(a[d].children,b)};g(a);return c};
|
||||
scheduler._toggleFolderDisplay=function(a,b,c){var g,e=function(a,b,c,j){for(var h=0;h<b.length;h++){if((b[h].key==a||j)&&b[h].children)if(b[h].open=typeof c!="undefined"?c:!b[h].open,g=!0,!j&&g)break;b[h].children&&e(a,b[h].children,c,j)}};e(a,scheduler.matrix[scheduler._mode].y_unit_original,b,c);scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);scheduler.callEvent("onOptionsLoad",[])};
|
||||
scheduler.attachEvent("onCellClick",function(a,b){scheduler._isRender("tree")&&(scheduler.matrix[scheduler._mode].folder_events_available||typeof scheduler.matrix[scheduler._mode].y_unit[b].children!="undefined"&&scheduler._toggleFolderDisplay(scheduler.matrix[scheduler._mode].y_unit[b].key))});scheduler.attachEvent("onYScaleClick",function(a,b){scheduler._isRender("tree")&&typeof b.children!="undefined"&&scheduler._toggleFolderDisplay(b.key)});
|
||||
scheduler.getSection=function(a){if(scheduler._isRender("tree")){var b,c=function(a,e){for(var d=0;d<e.length;d++)e[d].key==a&&(b=e[d]),e[d].children&&c(a,e[d].children)};c(a,scheduler.matrix[scheduler._mode].y_unit_original);return b||null}};
|
||||
scheduler.deleteSection=function(a){if(scheduler._isRender("tree")){var b=!1,c=function(a,e){for(var d=0;d<e.length;d++){e[d].key==a&&(e.splice(d,1),b=!0);if(b)break;e[d].children&&c(a,e[d].children)}};c(a,scheduler.matrix[scheduler._mode].y_unit_original);scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);scheduler.callEvent("onOptionsLoad",[]);return b}};
|
||||
scheduler.deleteAllSections=function(){if(scheduler._isRender("tree"))scheduler.matrix[scheduler._mode].y_unit_original=[],scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original),scheduler.callEvent("onOptionsLoad",[])};
|
||||
scheduler.addSection=function(a,b){if(scheduler._isRender("tree")){var c=!1,g=function(a,d,f){if(b)for(var i=0;i<f.length;i++){f[i].key==d&&typeof f[i].children!="undefined"&&(f[i].children.push(a),c=!0);if(c)break;f[i].children&&g(a,d,f[i].children)}else f.push(a),c=!0};g(a,b,scheduler.matrix[scheduler._mode].y_unit_original);scheduler.matrix[scheduler._mode].y_unit=scheduler._getArrayToDisplay(scheduler.matrix[scheduler._mode].y_unit_original);scheduler.callEvent("onOptionsLoad",[]);return c}};
|
||||
scheduler.openAllSections=function(){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(1,!0,!0)};scheduler.closeAllSections=function(){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(1,!1,!0)};scheduler.openSection=function(a){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(a,!0)};scheduler.closeSection=function(a){scheduler._isRender("tree")&&scheduler._toggleFolderDisplay(a,!1)};
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler._props={};
|
||||
scheduler.createUnitsView=function(a,f,j,g,k,l){if(typeof a=="object")j=a.list,f=a.property,g=a.size||0,k=a.step||1,l=a.skip_incorrect,a=a.name;scheduler._props[a]={map_to:f,options:j,step:k,position:0};if(g>scheduler._props[a].options.length)scheduler._props[a]._original_size=g,g=0;scheduler._props[a].size=g;scheduler._props[a].skip_incorrect=l||!1;scheduler.date[a+"_start"]=scheduler.date.day_start;scheduler.templates[a+"_date"]=function(a){return scheduler.templates.day_date(a)};scheduler.templates[a+
|
||||
"_scale_date"]=function(c){var h=scheduler._props[a].options;if(!h.length)return"";var f=(scheduler._props[a].position||0)+Math.floor((scheduler._correct_shift(c.valueOf(),1)-scheduler._min_date.valueOf())/864E5);return h[f].css?"<span class='"+h[f].css+"'>"+h[f].label+"</span>":h[f].label};scheduler.date["add_"+a]=function(a,f){return scheduler.date.add(a,f,"day")};scheduler.date["get_"+a+"_end"]=function(c){return scheduler.date.add(c,scheduler._props[a].size||scheduler._props[a].options.length,
|
||||
"day")};scheduler.attachEvent("onOptionsLoad",function(){for(var c=scheduler._props[a],f=c.order={},g=c.options,i=0;i<g.length;i++)f[g[i].key]=i;if(c._original_size&&c.size==0)c.size=c._original_size,delete c.original_size;c.size>g.length?(c._original_size=c.size,c.size=0):c.size=c._original_size||c.size;scheduler._date&&scheduler._mode==a&&scheduler.setCurrentView(scheduler._date,scheduler._mode)});scheduler.callEvent("onOptionsLoad",[])};
|
||||
scheduler.scrollUnit=function(a){var f=scheduler._props[this._mode];if(f)f.position=Math.min(Math.max(0,f.position+a),f.options.length-f.size),this.update_view()};
|
||||
(function(){var a=function(b){var d=scheduler._props[scheduler._mode];if(d&&d.order&&d.skip_incorrect){for(var a=[],e=0;e<b.length;e++)typeof d.order[b[e][d.map_to]]!="undefined"&&a.push(b[e]);b.splice(0,b.length);b.push.apply(b,a)}return b},f=scheduler._pre_render_events_table;scheduler._pre_render_events_table=function(b,d){b=a(b);return f.apply(this,[b,d])};var j=scheduler._pre_render_events_line;scheduler._pre_render_events_line=function(b,d){b=a(b);return j.apply(this,[b,d])};var g=function(b,
|
||||
d){if(b&&typeof b.order[d[b.map_to]]=="undefined"){var a=scheduler,e=864E5,c=Math.floor((d.end_date-a._min_date)/e);d[b.map_to]=b.options[Math.min(c+b.position,b.options.length-1)].key;return!0}},k=scheduler._reset_scale,l=scheduler.is_visible_events;scheduler.is_visible_events=function(b){var d=l.apply(this,arguments);if(d){var a=scheduler._props[this._mode];if(a&&a.size){var e=a.order[b[a.map_to]];if(e<a.position||e>=a.size+a.position)return!1}}return d};scheduler._reset_scale=function(){var b=
|
||||
scheduler._props[this._mode],a=k.apply(this,arguments);if(b){this._max_date=this.date.add(this._min_date,1,"day");for(var c=this._els.dhx_cal_data[0].childNodes,e=0;e<c.length;e++)c[e].className=c[e].className.replace("_now","");if(b.size&&b.size<b.options.length){var f=this._els.dhx_cal_header[0],g=document.createElement("DIV");if(b.position)g.className="dhx_cal_prev_button",g.style.cssText="left:1px;top:2px;position:absolute;",g.innerHTML=" ",f.firstChild.appendChild(g),g.onclick=function(){scheduler.scrollUnit(b.step*
|
||||
-1)};if(b.position+b.size<b.options.length)g=document.createElement("DIV"),g.className="dhx_cal_next_button",g.style.cssText="left:auto; right:0px;top:2px;position:absolute;",g.innerHTML=" ",f.lastChild.appendChild(g),g.onclick=function(){scheduler.scrollUnit(b.step)}}}return a};var c=scheduler._get_event_sday;scheduler._get_event_sday=function(b){var a=scheduler._props[this._mode];return a?(g(a,b),a.order[b[a.map_to]]-a.position):c.call(this,b)};var h=scheduler.locate_holder_day;scheduler.locate_holder_day=
|
||||
function(a,d,c){var e=scheduler._props[this._mode];return e?(g(e,c),e.order[c[e.map_to]]*1+(d?1:0)-e.position):h.apply(this,arguments)};var m=scheduler._mouse_coords;scheduler._mouse_coords=function(){var a=scheduler._props[this._mode],d=m.apply(this,arguments);if(a){if(!this._drag_event)this._drag_event={};var c=this._drag_event;if(this._drag_id&&this._drag_mode)c=this.getEvent(this._drag_id),this._drag_event._dhx_changed=!0;var e=Math.min(d.x+a.position,a.options.length-1);c[a.map_to]=a.options[e].key;
|
||||
d.x=0;d.custom=!0}return d};var i=scheduler._time_order;scheduler._time_order=function(a){var d=scheduler._props[this._mode];d?a.sort(function(a,b){return d.order[a[d.map_to]]>d.order[b[d.map_to]]?1:-1}):i.apply(this,arguments)};scheduler.attachEvent("onEventAdded",function(a,d){if(this._loading)return!0;for(var c in scheduler._props){var e=scheduler._props[c];if(typeof d[e.map_to]=="undefined")d[e.map_to]=e.options[0].key}return!0});scheduler.attachEvent("onEventCreated",function(a,c){var f=scheduler._props[this._mode];
|
||||
if(f){var e=this.getEvent(a);this._mouse_coords(c);g(f,e);this.event_updated(e)}return!0})})();
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.attachEvent("onTemplatesReady",function(){var d=!0,e=scheduler.date.str_to_date("%Y-%m-%d"),h=scheduler.date.date_to_str("%Y-%m-%d");scheduler.attachEvent("onBeforeViewChange",function(i,j,f,k){if(d){d=!1;for(var a={},g=(document.location.hash||"").replace("#","").split(","),b=0;b<g.length;b++){var c=g[b].split("=");c.length==2&&(a[c[0]]=c[1])}if(a.date||a.mode){try{this.setCurrentView(a.date?e(a.date):null,a.mode||null)}catch(m){this.setCurrentView(a.date?e(a.date):null,f)}return!1}}var l=
|
||||
"#date="+h(k||j)+",mode="+(f||i);document.location.hash=l;return!0})});
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler._wa={};scheduler.xy.week_agenda_scale_height=20;scheduler.templates.week_agenda_event_text=function(c,e,f){return scheduler.templates.event_date(c)+" "+f.text};scheduler.date.week_agenda_start=scheduler.date.week_start;scheduler.date.week_agenda_end=function(c){return scheduler.date.add(c,7,"day")};scheduler.date.add_week_agenda=function(c,e){return scheduler.date.add(c,e*7,"day")};
|
||||
scheduler.attachEvent("onSchedulerReady",function(){var c=scheduler.templates;if(!c.week_agenda_date)c.week_agenda_date=c.week_date});(function(){var c=scheduler.date.date_to_str("%l, %F %d");scheduler.templates.week_agenda_scale_date=function(e){return c(e)}})();
|
||||
scheduler.attachEvent("onTemplatesReady",function(){scheduler.attachEvent("onSchedulerResize",function(){return this._mode=="week_agenda"?(this.week_agenda_view(!0),!1):!0});var c=scheduler.render_data;scheduler.render_data=function(b){if(this._mode=="week_agenda")f();else return c.apply(this,arguments)};var e=function(){scheduler._cols=[];var b=parseInt(scheduler._els.dhx_cal_data[0].style.width);scheduler._cols.push(Math.floor(b/2));scheduler._cols.push(b-scheduler._cols[0]-1);scheduler._colsS=
|
||||
{0:[],1:[]};for(var a=parseInt(scheduler._els.dhx_cal_data[0].style.height),m=0;m<3;m++)scheduler._colsS[0].push(Math.floor(a/(3-scheduler._colsS[0].length))),a-=scheduler._colsS[0][m];scheduler._colsS[1].push(scheduler._colsS[0][0]);scheduler._colsS[1].push(scheduler._colsS[0][1]);a=scheduler._colsS[0][scheduler._colsS[0].length-1];scheduler._colsS[1].push(Math.floor(a/2));scheduler._colsS[1].push(a-scheduler._colsS[1][scheduler._colsS[1].length-1])},f=function(){for(var b=scheduler._els.dhx_cal_data[0].innerHTML=
|
||||
"",a=0;a<2;a++){var m=scheduler._cols[a],c="dhx_wa_column";a==1&&(c+=" dhx_wa_column_last");b+="<div class='"+c+"' style='width: "+m+"px;'>";for(var h=0;h<scheduler._colsS[a].length;h++){var k=scheduler.xy.week_agenda_scale_height-2,e=scheduler._colsS[a][h]-k-2;b+="<div class='dhx_wa_day_cont'><div style='height:"+k+"px; line-height:"+k+"px;' class='dhx_wa_scale_bar'></div><div style='height:"+e+"px;' class='dhx_wa_day_data'></div></div>"}b+="</div>"}scheduler._els.dhx_cal_date[0].innerHTML=scheduler.templates[scheduler._mode+
|
||||
"_date"](scheduler._min_date,scheduler._max_date,scheduler._mode);scheduler._els.dhx_cal_data[0].innerHTML=b;for(var i=scheduler._els.dhx_cal_data[0].getElementsByTagName("div"),l=[],a=0;a<i.length;a++)i[a].className=="dhx_wa_day_cont"&&l.push(i[a]);scheduler._wa._selected_divs=[];for(var f=scheduler.get_visible_events(),j=scheduler.date.week_start(scheduler._date),n=scheduler.date.add(j,1,"day"),a=0;a<7;a++){l[a]._date=j;var s=l[a].childNodes[0],t=l[a].childNodes[1];s.innerHTML=scheduler.templates.week_agenda_scale_date(j);
|
||||
for(var o=[],q=0;q<f.length;q++){var r=f[q];r.start_date<n&&r.end_date>j&&o.push(r)}o.sort(function(a,b){return a.start_date.valueOf()==b.start_date.valueOf()?a.id>b.id?1:-1:a.start_date>b.start_date?1:-1});for(h=0;h<o.length;h++){var d=o[h],g=document.createElement("div");scheduler._rendered.push(g);g.className="dhx_wa_ev_body";if(d._text_style)g.style.cssText=d._text_style;if(d.color)g.style.backgroundColor=d.color;if(d.textColor)g.style.color=d.textColor;scheduler._select_id&&d.id==scheduler._select_id&&
|
||||
(g.className+=" dhx_cal_event_selected",scheduler._wa._selected_divs.push(g));var p="";d._timed||(p="middle",d.start_date.valueOf()>=j.valueOf()&&d.start_date.valueOf()<=n.valueOf()&&(p="start"),d.end_date.valueOf()>=j.valueOf()&&d.end_date.valueOf()<=n.valueOf()&&(p="end"));g.innerHTML=scheduler.templates.week_agenda_event_text(d.start_date,d.end_date,d,j,p);g.setAttribute("event_id",d.id);t.appendChild(g)}j=scheduler.date.add(j,1,"day");n=scheduler.date.add(n,1,"day")}};scheduler.week_agenda_view=
|
||||
function(b){scheduler._min_date=scheduler.date.week_start(scheduler._date);scheduler._max_date=scheduler.date.add(scheduler._min_date,1,"week");scheduler.set_sizes();if(b)scheduler._table_view=!0,scheduler._wa._prev_data_border=scheduler._els.dhx_cal_data[0].style.borderTop,scheduler._els.dhx_cal_data[0].style.borderTop=0,scheduler._els.dhx_cal_data[0].style.overflowY="hidden",scheduler._els.dhx_cal_date[0].innerHTML="",scheduler._els.dhx_cal_data[0].style.top=parseInt(scheduler._els.dhx_cal_data[0].style.top)-
|
||||
scheduler.xy.bar_height-1+"px",scheduler._els.dhx_cal_data[0].style.height=parseInt(scheduler._els.dhx_cal_data[0].style.height)+scheduler.xy.bar_height+1+"px",scheduler._els.dhx_cal_header[0].style.display="none",e(),f();else{scheduler._table_view=!1;if(scheduler._wa._prev_data_border)scheduler._els.dhx_cal_data[0].style.borderTop=scheduler._wa._prev_data_border;scheduler._els.dhx_cal_data[0].style.overflowY="auto";scheduler._els.dhx_cal_data[0].style.top=parseInt(scheduler._els.dhx_cal_data[0].style.top)+
|
||||
scheduler.xy.bar_height+"px";scheduler._els.dhx_cal_data[0].style.height=parseInt(scheduler._els.dhx_cal_data[0].style.height)-scheduler.xy.bar_height+"px";scheduler._els.dhx_cal_header[0].style.display="block"}};scheduler.mouse_week_agenda=function(b){for(var a=b.ev,c=a.srcElement||a.target;c.parentNode;){if(c._date)var e=c._date;c=c.parentNode}if(!e)return b;b.x=0;var h=e.valueOf()-scheduler._min_date.valueOf();b.y=Math.ceil(h/6E4/this.config.time_step);if(this._drag_mode=="move"){this._drag_event._dhx_changed=
|
||||
!0;this._select_id=this._drag_id;for(var k=0;k<scheduler._rendered.length;k++)if(scheduler._drag_id==this._rendered[k].getAttribute("event_id"))var f=this._rendered[k];if(!scheduler._wa._dnd){var i=f.cloneNode(!0);this._wa._dnd=i;i.className=f.className;i.id="dhx_wa_dnd";i.className+=" dhx_wa_dnd";document.body.appendChild(i)}var l=document.getElementById("dhx_wa_dnd");l.style.top=(a.pageY||a.clientY)+20+"px";l.style.left=(a.pageX||a.clientX)+20+"px"}return b};scheduler.attachEvent("onBeforeEventChanged",
|
||||
function(){if(this._mode=="week_agenda"&&this._drag_mode=="move"){var b=document.getElementById("dhx_wa_dnd");b.parentNode.removeChild(b);scheduler._wa._dnd=!1}return!0});scheduler.attachEvent("onEventSave",function(b,a,c){if(c)this._select_id=b;return!0});scheduler._wa._selected_divs=[];scheduler.attachEvent("onClick",function(b){if(this._mode=="week_agenda"){if(scheduler._wa._selected_divs)for(var a=0;a<this._wa._selected_divs.length;a++){var c=this._wa._selected_divs[a];c.className=c.className.replace(/ dhx_cal_event_selected/,
|
||||
"")}this.for_rendered(b,function(a){a.className+=" dhx_cal_event_selected";scheduler._wa._selected_divs.push(a)});this._select_id=b;return!1}return!0})});
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
|
||||
to use it in not GPL project. Please contact sales@dhtmlx.com for details
|
||||
*/
|
||||
scheduler.config.year_x=4;scheduler.config.year_y=3;scheduler.config.year_mode_name="year";scheduler.xy.year_top=0;scheduler.templates.year_date=function(c){return scheduler.date.date_to_str(scheduler.locale.labels.year_tab+" %Y")(c)};scheduler.templates.year_month=scheduler.date.date_to_str("%F");scheduler.templates.year_scale_date=scheduler.date.date_to_str("%D");scheduler.templates.year_tooltip=function(c,o,p){return p.text};
|
||||
(function(){var c=function(){return scheduler._mode==scheduler.config.year_mode_name};scheduler.dblclick_dhx_month_head=function(a){if(c()){var b=a.target||a.srcElement;if(b.parentNode.className.indexOf("dhx_before")!=-1||b.parentNode.className.indexOf("dhx_after")!=-1)return!1;var d=this.templates.xml_date(b.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute("date"));d.setDate(parseInt(b.innerHTML,10));var u=this.date.add(d,1,"day");!this.config.readonly&&this.config.dblclick_create&&
|
||||
this.addEventNow(d.valueOf(),u.valueOf(),a)}};var o=scheduler.changeEventId;scheduler.changeEventId=function(){o.apply(this,arguments);c()&&this.year_view(!0)};var p=scheduler.render_data,v=scheduler.date.date_to_str("%Y/%m/%d"),w=scheduler.date.str_to_date("%Y/%m/%d");scheduler.render_data=function(a){if(!c())return p.apply(this,arguments);for(var b=0;b<a.length;b++)this._year_render_event(a[b])};var x=scheduler.clear_view;scheduler.clear_view=function(){if(!c())return x.apply(this,arguments);for(var a=
|
||||
0;a<j.length;a++)j[a].className="dhx_month_head",j[a].setAttribute("date","");j=[]};scheduler.hideToolTip=function(){if(this._tooltip)this._tooltip.style.display="none",this._tooltip.date=new Date(9999,1,1)};scheduler.showToolTip=function(a,b,d,c){if(this._tooltip){if(this._tooltip.date.valueOf()==a.valueOf())return;this._tooltip.innerHTML=""}else{var k=this._tooltip=document.createElement("DIV");k.className="dhx_tooltip";document.body.appendChild(k);k.onclick=scheduler._click.dhx_cal_data}for(var h=
|
||||
this.getEvents(a,this.date.add(a,1,"day")),l="",f=0;f<h.length;f++){var m=h[f],e=m.color?"background-color:"+m.color+";":"",g=m.textColor?"color:"+m.textColor+";":"";l+="<div class='dhx_tooltip_line' style='"+e+""+g+"' event_id='"+h[f].id+"'>";l+="<div class='dhx_tooltip_date' style='"+e+""+g+"'>"+(h[f]._timed?this.templates.event_date(h[f].start_date):"")+"</div>";l+="<div class='dhx_event_icon icon_details'> </div>";l+=this.templates.year_tooltip(h[f].start_date,h[f].end_date,h[f])+"</div>"}this._tooltip.style.display=
|
||||
"";this._tooltip.style.top="0px";this._tooltip.style.left=document.body.offsetWidth-b.left-this._tooltip.offsetWidth<0?b.left-this._tooltip.offsetWidth+"px":b.left+c.offsetWidth+"px";this._tooltip.date=a;this._tooltip.innerHTML=l;this._tooltip.style.top=document.body.offsetHeight-b.top-this._tooltip.offsetHeight<0?b.top-this._tooltip.offsetHeight+c.offsetHeight+"px":b.top+"px"};scheduler._init_year_tooltip=function(){dhtmlxEvent(scheduler._els.dhx_cal_data[0],"mouseover",function(a){if(c()){var a=
|
||||
a||event,b=a.target||a.srcElement;if(b.tagName.toLowerCase()=="a")b=b.parentNode;(b.className||"").indexOf("dhx_year_event")!=-1?scheduler.showToolTip(w(b.getAttribute("date")),getOffset(b),a,b):scheduler.hideToolTip()}});this._init_year_tooltip=function(){}};scheduler.attachEvent("onSchedulerResize",function(){return c()?(this.year_view(!0),!1):!0});scheduler._get_year_cell=function(a){var b=a.getMonth()+12*(a.getFullYear()-this._min_date.getFullYear())-this.week_starts._month,d=this._els.dhx_cal_data[0].childNodes[b],
|
||||
a=this.week_starts[b]+a.getDate()-1;return d.childNodes[2].firstChild.rows[Math.floor(a/7)].cells[a%7].firstChild};var j=[];scheduler._mark_year_date=function(a,b){var d=this._get_year_cell(a);d.className="dhx_month_head dhx_year_event "+this.templates.event_class(b.start_date,b.end_date,b);d.setAttribute("date",v(a));j.push(d)};scheduler._unmark_year_date=function(a){this._get_year_cell(a).className="dhx_month_head"};scheduler._year_render_event=function(a){for(var b=a.start_date,b=b.valueOf()<this._min_date.valueOf()?
|
||||
this._min_date:this.date.date_part(new Date(b));b<a.end_date;)if(this._mark_year_date(b,a),b=this.date.add(b,1,"day"),b.valueOf()>=this._max_date.valueOf())break};scheduler.year_view=function(a){if(a){var b=scheduler.xy.scale_height;scheduler.xy.scale_height=-1}scheduler._els.dhx_cal_header[0].style.display=a?"none":"";scheduler.set_sizes();if(a)scheduler.xy.scale_height=b;scheduler._table_view=a;if(!this._load_mode||!this._load())a?(scheduler._init_year_tooltip(),scheduler._reset_year_scale(),scheduler.render_view_data()):
|
||||
scheduler.hideToolTip()};scheduler._reset_year_scale=function(){this._cols=[];this._colsS={};var a=[],b=this._els.dhx_cal_data[0],d=this.config;b.scrollTop=0;b.innerHTML="";var c=Math.floor(parseInt(b.style.width)/d.year_x),k=Math.floor((parseInt(b.style.height)-scheduler.xy.year_top)/d.year_y);k<190&&(k=190,c=Math.floor((parseInt(b.style.width)-scheduler.xy.scroll_width)/d.year_x));for(var h=c-11,l=0,f=document.createElement("div"),m=this.date.week_start(new Date),e=0;e<7;e++)this._cols[e]=Math.floor(h/
|
||||
(7-e)),this._render_x_header(e,l,m,f),m=this.date.add(m,1,"day"),h-=this._cols[e],l+=this._cols[e];f.lastChild.className+=" dhx_scale_bar_last";for(var g=this.date[this._mode+"_start"](this.date.copy(this._date)),j=g,e=0;e<d.year_y;e++)for(var r=0;r<d.year_x;r++){var i=document.createElement("DIV");i.style.cssText="position:absolute;";i.setAttribute("date",this.templates.xml_format(g));i.innerHTML="<div class='dhx_year_month'></div><div class='dhx_year_week'>"+f.innerHTML+"</div><div class='dhx_year_body'></div>";
|
||||
i.childNodes[0].innerHTML=this.templates.year_month(g);for(var p=this.date.week_start(g),t=this._reset_month_scale(i.childNodes[2],g,p),n=i.childNodes[2].firstChild.rows,q=n.length;q<6;q++){n[0].parentNode.appendChild(n[0].cloneNode(!0));for(var s=0;s<n[q].childNodes.length;s++)n[q].childNodes[s].className="dhx_after",n[q].childNodes[s].firstChild.innerHTML=scheduler.templates.month_day(t),t=scheduler.date.add(t,1,"day")}b.appendChild(i);i.childNodes[1].style.height=i.childNodes[1].childNodes[0].offsetHeight+
|
||||
"px";var o=Math.round((k-190)/2);i.style.marginTop=o+"px";this.set_xy(i,c-10,k-o-10,c*r+5,k*e+5+scheduler.xy.year_top);a[e*d.year_x+r]=(g.getDay()-(this.config.start_on_monday?1:0)+7)%7;g=this.date.add(g,1,"month")}this._els.dhx_cal_date[0].innerHTML=this.templates[this._mode+"_date"](j,g,this._mode);this.week_starts=a;a._month=j.getMonth();this._min_date=j;this._max_date=g}})();
|
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 111 B |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 1.4 KiB |