merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20121105110152-f0vcwtzn334qtxq0
This commit is contained in:
commit
1f25f1dee1
|
@ -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)})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2569,6 +2569,7 @@
|
|||
}
|
||||
.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;
|
||||
|
|
|
@ -2039,6 +2039,7 @@ $sheet-padding: 16px
|
|||
*
|
||||
visibility: hidden
|
||||
color: transparent
|
||||
text-shadow: none
|
||||
.oe_m2o_drop_down_button
|
||||
top: 5px
|
||||
.oe_m2o_cm_button
|
||||
|
|
|
@ -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)}).then(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()}).then(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,7 +606,7 @@ 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),
|
||||
context: this.get_context(options.context),
|
||||
}).pipe(function (results) {
|
||||
return results;
|
||||
});
|
||||
|
|
|
@ -2986,7 +2986,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
self.uned_def = $.Deferred();
|
||||
var ed_delay = 200;
|
||||
var ed_duration = 15000;
|
||||
var anyoneLoosesFocus = function() {
|
||||
var anyoneLoosesFocus = function (e) {
|
||||
var used = false;
|
||||
if (self.floating) {
|
||||
if (self.last_search.length > 0) {
|
||||
|
@ -3010,7 +3010,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
self.ed_def = $.Deferred();
|
||||
self.ed_def.then(function() {
|
||||
self.show_error_displayer();
|
||||
ignore_blur = false;
|
||||
self.trigger('focused');
|
||||
});
|
||||
ignore_blur = true;
|
||||
setTimeout(function() {
|
||||
self.ed_def.resolve();
|
||||
self.uned_def.reject();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1169,7 +1169,8 @@
|
|||
<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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,6 +22,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
this.context = {};
|
||||
this.ids = this.dataset.ids;
|
||||
this.on('view_loaded', self, self.load_diagram);
|
||||
this.on('pager_action_executed', self, self.pager_action_trigger);
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
|
@ -59,12 +60,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
self.$el.find('.oe_diagram_header').append(html_label);
|
||||
})
|
||||
|
||||
this.$el.find('div.oe_diagram_pager button[data-pager-action]').click(function() {
|
||||
var action = $(this).data('pager-action');
|
||||
self.execute_pager_action(action);
|
||||
});
|
||||
|
||||
this.do_update_pager();
|
||||
this.init_pager();
|
||||
|
||||
// New Node,Edge
|
||||
this.$el.find('#new_node.oe_diagram_button_new').click(function(){self.add_node();});
|
||||
|
@ -366,36 +362,65 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
form_controller.fields[self.connectors.attrs.destination].dirty = true;
|
||||
});
|
||||
},
|
||||
|
||||
execute_pager_action: function(action) {
|
||||
switch (action) {
|
||||
case 'first':
|
||||
this.dataset.index = 0;
|
||||
break;
|
||||
case 'previous':
|
||||
this.dataset.previous();
|
||||
break;
|
||||
case 'next':
|
||||
this.dataset.next();
|
||||
break;
|
||||
case 'last':
|
||||
this.dataset.index = this.dataset.ids.length - 1;
|
||||
break;
|
||||
|
||||
do_hide: function () {
|
||||
if (this.$pager) {
|
||||
this.$pager.hide();
|
||||
}
|
||||
this._super();
|
||||
},
|
||||
|
||||
init_pager: function() {
|
||||
var self = this;
|
||||
if (this.$pager)
|
||||
this.$pager.remove();
|
||||
|
||||
this.$pager = $(QWeb.render("DiagramView.pager", {'widget':self})).hide();
|
||||
if (this.options.$pager) {
|
||||
this.$pager.appendTo(this.options.$pager);
|
||||
} else {
|
||||
this.$el.find('.oe_diagram_pager').replaceWith(this.$pager);
|
||||
}
|
||||
this.$pager.on('click','a[data-pager-action]',function() {
|
||||
var action = $(this).data('pager-action');
|
||||
self.execute_pager_action(action);
|
||||
});
|
||||
this.do_update_pager();
|
||||
},
|
||||
|
||||
pager_action_trigger: function(){
|
||||
var loaded = this.dataset.read_index(_.keys(this.fields_view.fields))
|
||||
.pipe(this.on_diagram_loaded);
|
||||
this.do_update_pager();
|
||||
return loaded;
|
||||
},
|
||||
|
||||
execute_pager_action: function(action) {
|
||||
switch (action) {
|
||||
case 'first':
|
||||
this.dataset.index = 0;
|
||||
break;
|
||||
case 'previous':
|
||||
this.dataset.previous();
|
||||
break;
|
||||
case 'next':
|
||||
this.dataset.next();
|
||||
break;
|
||||
case 'last':
|
||||
this.dataset.index = this.dataset.ids.length - 1;
|
||||
break;
|
||||
}
|
||||
this.trigger('pager_action_executed');
|
||||
|
||||
},
|
||||
|
||||
do_update_pager: function(hide_index) {
|
||||
var $pager = this.$el.find('div.oe_diagram_pager');
|
||||
var index = hide_index ? '-' : this.dataset.index + 1;
|
||||
if(!this.dataset.count) {
|
||||
this.dataset.count = this.dataset.ids.length;
|
||||
this.$pager.toggle(this.dataset.ids.length > 1);
|
||||
if (hide_index) {
|
||||
$(".oe_diagram_pager_state", this.$pager).html("");
|
||||
} else {
|
||||
$(".oe_diagram_pager_state", this.$pager).html(_.str.sprintf(_t("%d / %d"), this.dataset.index + 1, this.dataset.ids.length));
|
||||
}
|
||||
$pager.find('span.oe_pager_index').html(index);
|
||||
$pager.find('span.oe_pager_count').html(this.dataset.count);
|
||||
},
|
||||
|
||||
do_show: function() {
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
<template>
|
||||
<t t-name="DiagramView.pager">
|
||||
<div class="oe_diagram_pager">
|
||||
<t t-if="widget.options.pager !== false" t-call="ViewPager">
|
||||
<span class="oe_diagram_pager_state"></span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="DiagramView">
|
||||
<div class="oe_diagram_header" t-att-id="widget.element_id + '_header'">
|
||||
<h3 class="oe_diagram_title"/>
|
||||
<div t-if="widget.is_action_enabled('create')" class="oe_diagram_buttons">
|
||||
<button type="button" id="new_node" class="oe_button oe_diagram_button_new">New Node</button>
|
||||
</div>
|
||||
<div class="oe_diagram_pager">
|
||||
<t t-call="ViewPager">
|
||||
<span class="oe_pager_index">0</span> / <span class="oe_pager_count">0</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="diagram-container">
|
||||
<div class="oe_diagram_diagram"/>
|
||||
</div>
|
||||
|
|
|
@ -340,8 +340,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
|
|||
var defs = [];
|
||||
_.each(axis, function(x) {
|
||||
var key = x[xaxis[0]]
|
||||
defs.push(obj.call("read_group", [new instance.web.CompoundDomain(domain, [[xaxis[0], '=' ,_convert_key(xaxis[0], key)]]),
|
||||
yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).pipe(function(res) {
|
||||
defs.push(obj.call("read_group", [domain, yaxis.concat(xaxis.slice(1, 2)), xaxis.slice(1, 2)], {context: context}).pipe(function(res) {
|
||||
return [x, key, res];
|
||||
}));
|
||||
});
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
.openerp .oe_view_editor {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-left: -12px;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.openerp .oe_view_editor td {
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #d8d8d8;
|
||||
cursor: pointer;
|
||||
font-size: 90%;
|
||||
}
|
||||
.openerp .oe_view_editor_field td {
|
||||
.openerp .oe_view_editor td *{
|
||||
border: 0px !important;
|
||||
color : #404040;
|
||||
}
|
||||
.openerp .oe_view_editor tr:hover {
|
||||
background-color: #ecebf2;
|
||||
|
|
|
@ -18,11 +18,10 @@ instance.web.ViewManagerAction.include({
|
|||
return this._super.apply(this,arguments);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
|
||||
init: function(parent, element_id, dataset, view, options) {
|
||||
this._super(parent);
|
||||
this.element_id = element_id;
|
||||
this.parent = parent;
|
||||
this.dataset = new instance.web.DataSetSearch(this, 'ir.ui.view', null, null),
|
||||
this.model = dataset.model;
|
||||
|
@ -74,12 +73,12 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
|
|||
$.when(this.action_manager.do_action(action)).then(function() {
|
||||
var viewmanager = self.action_manager.inner_widget;
|
||||
var controller = viewmanager.views[viewmanager.active_view].controller;
|
||||
controller.on('view_loaded', function(){
|
||||
controller.on('view_loaded', self, function(){
|
||||
$(controller.groups).bind({
|
||||
'selected': function(e, ids, records) {
|
||||
self.main_view_id = ids[0];
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue