[MERGE] merge with trunk

bzr revid: nwi@openerp.com-20121220100314-98ka2wahul3lbu57
This commit is contained in:
Niko 2012-12-20 11:03:14 +01:00
commit fb07bf7234
20 changed files with 296 additions and 139 deletions

View File

@ -679,9 +679,7 @@ class WebClient(openerpweb.Controller):
@openerpweb.jsonrequest @openerpweb.jsonrequest
def version_info(self, req): def version_info(self, req):
return { return openerp.service.web_services.RPC_VERSION_1
"version": openerp.release.version
}
class Proxy(openerpweb.Controller): class Proxy(openerpweb.Controller):
_cp_path = '/web/proxy' _cp_path = '/web/proxy'

View File

@ -478,10 +478,9 @@ class Root(object):
""" """
def __init__(self): def __init__(self):
self.addons = {} self.addons = {}
self.statics = {}
static_dirs = self._load_addons() self.load_addons()
app = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs)
self.dispatch = DisableCacheMiddleware(app)
# Setup http sessions # Setup http sessions
path = session_path() path = session_path()
@ -530,12 +529,10 @@ class Root(object):
return response(environ, start_response) return response(environ, start_response)
def _load_addons(self): def load_addons(self):
""" """ Load all addons from addons patch containg static files and
Loads all addons at the specified addons path, returns a mapping of controllers and configure them. """
static URLs to the corresponding directories
"""
statics = {}
for addons_path in openerp.modules.module.ad_paths: for addons_path in openerp.modules.module.ad_paths:
for module in sorted(os.listdir(addons_path)): for module in sorted(os.listdir(addons_path)):
if module not in addons_module: if module not in addons_module:
@ -551,14 +548,17 @@ class Root(object):
m = __import__(module) m = __import__(module)
addons_module[module] = m addons_module[module] = m
addons_manifest[module] = manifest addons_manifest[module] = manifest
statics['/%s/static' % module] = path_static self.statics['/%s/static' % module] = path_static
for k, v in controllers_class: for k, v in controllers_class:
if k not in controllers_object: if k not in controllers_object:
o = v() o = v()
controllers_object[k] = o controllers_object[k] = o
if hasattr(o, '_cp_path'): if hasattr(o, '_cp_path'):
controllers_path[o._cp_path] = o controllers_path[o._cp_path] = o
return statics
app = werkzeug.wsgi.SharedDataMiddleware(self.dispatch, self.statics)
self.dispatch = DisableCacheMiddleware(app)
def find_handler(self, *l): def find_handler(self, *l):
""" """

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n" "Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-30 18:13+0000\n" "POT-Creation-Date: 2012-11-30 18:13+0000\n"
"PO-Revision-Date: 2012-12-17 20:17+0000\n" "PO-Revision-Date: 2012-12-19 20:37+0000\n"
"Last-Translator: Ahti Hinnov <sipelgas@gmail.com>\n" "Last-Translator: Ahti Hinnov <sipelgas@gmail.com>\n"
"Language-Team: Estonian <et@li.org>\n" "Language-Team: Estonian <et@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-18 05:08+0000\n" "X-Launchpad-Export-Date: 2012-12-20 04:59+0000\n"
"X-Generator: Launchpad (build 16372)\n" "X-Generator: Launchpad (build 16378)\n"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -147,7 +147,7 @@ msgstr "Fail"
#: code:addons/web/controllers/main.py:842 #: code:addons/web/controllers/main.py:842
#, python-format #, python-format
msgid "You cannot leave any password empty." msgid "You cannot leave any password empty."
msgstr "" msgstr "Sa ei saa jätta ühtegi salasõna tühjaks."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -192,7 +192,7 @@ msgstr "Versioon"
#: code:addons/web/static/src/xml/base.xml:564 #: code:addons/web/static/src/xml/base.xml:564
#, python-format #, python-format
msgid "Latest Modification Date:" msgid "Latest Modification Date:"
msgstr "" msgstr "Viimase muudatuse kuupäev:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -213,7 +213,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:1583 #: code:addons/web/static/src/xml/base.xml:1583
#, python-format #, python-format
msgid "Share with all users" msgid "Share with all users"
msgstr "" msgstr "Jaga kõigi kasutajatega"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -242,7 +242,7 @@ msgstr ""
#: code:addons/web/static/src/js/search.js:1299 #: code:addons/web/static/src/js/search.js:1299
#, python-format #, python-format
msgid "not a valid number" msgid "not a valid number"
msgstr "" msgstr "ei ole korrektne number"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -263,7 +263,7 @@ msgstr ""
#: code:addons/web/static/src/js/view_list.js:1319 #: code:addons/web/static/src/js/view_list.js:1319
#, python-format #, python-format
msgid "Undefined" msgid "Undefined"
msgstr "" msgstr "Määramata"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -277,7 +277,7 @@ msgstr ""
#: code:addons/web/static/src/js/coresetup.js:598 #: code:addons/web/static/src/js/coresetup.js:598
#, python-format #, python-format
msgid "about a month ago" msgid "about a month ago"
msgstr "" msgstr "umbes kuu eest"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -298,7 +298,7 @@ msgstr "Nupu tüüp:"
#: code:addons/web/static/src/xml/base.xml:419 #: code:addons/web/static/src/xml/base.xml:419
#, python-format #, python-format
msgid "OpenERP SA Company" msgid "OpenERP SA Company"
msgstr "" msgstr "OpenERP SA Ettevõte"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -377,7 +377,7 @@ msgstr "Valik:"
#: code:addons/web/static/src/js/view_form.js:869 #: code:addons/web/static/src/js/view_form.js:869
#, python-format #, python-format
msgid "The following fields are invalid:" msgid "The following fields are invalid:"
msgstr "" msgstr "Järgnevad väljad on vigased:"
#. module: web #. module: web
#: code:addons/web/controllers/main.py:863 #: code:addons/web/controllers/main.py:863
@ -390,7 +390,7 @@ msgstr "Keeled"
#: code:addons/web/static/src/xml/base.xml:1245 #: code:addons/web/static/src/xml/base.xml:1245
#, python-format #, python-format
msgid "...Upload in progress..." msgid "...Upload in progress..."
msgstr "" msgstr "...Toimub üleslaadimine..."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -447,7 +447,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:413 #: code:addons/web/static/src/xml/base.xml:413
#, python-format #, python-format
msgid "Activate the developer mode" msgid "Activate the developer mode"
msgstr "" msgstr "Aktiveeri arendusreziim"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -468,7 +468,7 @@ msgstr ""
#: code:addons/web/static/src/js/view_list.js:684 #: code:addons/web/static/src/js/view_list.js:684
#, python-format #, python-format
msgid "You must select at least one record." msgid "You must select at least one record."
msgstr "" msgstr "Sa pead valima vähemalt ühe kirje."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -489,7 +489,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:956 #: code:addons/web/static/src/xml/base.xml:956
#, python-format #, python-format
msgid "Relation:" msgid "Relation:"
msgstr "" msgstr "Seos:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -503,7 +503,7 @@ msgstr "vähe kui minuti eest"
#: code:addons/web/static/src/xml/base.xml:829 #: code:addons/web/static/src/xml/base.xml:829
#, python-format #, python-format
msgid "Condition:" msgid "Condition:"
msgstr "" msgstr "Seisukord:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -524,7 +524,7 @@ msgstr ""
#: code:addons/web/static/src/js/chrome.js:549 #: code:addons/web/static/src/js/chrome.js:549
#, python-format #, python-format
msgid "Restored" msgid "Restored"
msgstr "" msgstr "Taastatud"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -559,7 +559,7 @@ msgstr ""
#: code:addons/web/static/src/js/search.js:1963 #: code:addons/web/static/src/js/search.js:1963
#, python-format #, python-format
msgid "is not" msgid "is not"
msgstr "" msgstr "ei ole"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -587,7 +587,7 @@ msgstr "UTF-8"
#: code:addons/web/static/src/xml/base.xml:421 #: code:addons/web/static/src/xml/base.xml:421
#, python-format #, python-format
msgid "For more information visit" msgid "For more information visit"
msgstr "" msgstr "Rohkema info saamiseks külastage"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -601,7 +601,7 @@ msgstr "Lisa kogu info..."
#: code:addons/web/static/src/xml/base.xml:1658 #: code:addons/web/static/src/xml/base.xml:1658
#, python-format #, python-format
msgid "Export Formats" msgid "Export Formats"
msgstr "" msgstr "Ekspordi formaadid"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -666,7 +666,7 @@ msgstr "Toimingu ID:"
#: code:addons/web/static/src/xml/base.xml:453 #: code:addons/web/static/src/xml/base.xml:453
#, python-format #, python-format
msgid "Your user's preference timezone does not match your browser timezone:" msgid "Your user's preference timezone does not match your browser timezone:"
msgstr "" msgstr "Sinu kasutaja ajatvöönd ei ühti brauseri ajatsooniga."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -751,7 +751,7 @@ msgstr ""
#: code:addons/web/static/src/js/view_list.js:325 #: code:addons/web/static/src/js/view_list.js:325
#, python-format #, python-format
msgid "Unlimited" msgid "Unlimited"
msgstr "" msgstr "Piiramatu"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -762,6 +762,9 @@ msgid ""
"\n" "\n"
"Are you sure you want to leave this page ?" "Are you sure you want to leave this page ?"
msgstr "" msgstr ""
"Hoiatus. Kirjet on muudetud ja su muudatused hüljatakse.\n"
"\n"
"Kas oled kindel, et soovid sellelt lehelt lahkuda?"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -789,7 +792,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:458 #: code:addons/web/static/src/xml/base.xml:458
#, python-format #, python-format
msgid "Browser's timezone" msgid "Browser's timezone"
msgstr "Brauseri ajatsoon" msgstr "Brauseri ajavöönd"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -834,7 +837,7 @@ msgstr "OpenERP.com"
#: code:addons/web/static/src/js/view_form.js:2316 #: code:addons/web/static/src/js/view_form.js:2316
#, python-format #, python-format
msgid "Can't send email to invalid e-mail address" msgid "Can't send email to invalid e-mail address"
msgstr "" msgstr "Ei saa saata kirja vigasele e-posti aadressile"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -870,7 +873,7 @@ msgstr "Andmebaasi Hülgamine"
#: code:addons/web/static/src/xml/base.xml:462 #: code:addons/web/static/src/xml/base.xml:462
#, python-format #, python-format
msgid "Click here to change your user's timezone." msgid "Click here to change your user's timezone."
msgstr "Klõpsa siia, et vahetada oma kasutaja ajatsooni." msgstr "Klõpsa siia, et vahetada oma kasutaja ajavööndit."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -902,7 +905,7 @@ msgstr "Salvesta"
#: code:addons/web/static/src/xml/base.xml:355 #: code:addons/web/static/src/xml/base.xml:355
#, python-format #, python-format
msgid "More" msgid "More"
msgstr "" msgstr "Lisaks"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1039,7 +1042,7 @@ msgstr ""
#: code:addons/web/static/src/js/view_form.js:4313 #: code:addons/web/static/src/js/view_form.js:4313
#, python-format #, python-format
msgid "Open: " msgid "Open: "
msgstr "" msgstr "Avatud "
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1093,7 +1096,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:1835 #: code:addons/web/static/src/xml/base.xml:1835
#, python-format #, python-format
msgid "Cancel" msgid "Cancel"
msgstr "Tühista" msgstr "Loobu"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1108,7 +1111,7 @@ msgstr "Laadimine..."
#: code:addons/web/static/src/xml/base.xml:561 #: code:addons/web/static/src/xml/base.xml:561
#, python-format #, python-format
msgid "Latest Modification by:" msgid "Latest Modification by:"
msgstr "" msgstr "Viimase muudatuse tegija:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1116,7 +1119,7 @@ msgstr ""
#: code:addons/web/static/src/xml/base.xml:466 #: code:addons/web/static/src/xml/base.xml:466
#, python-format #, python-format
msgid "Timezone mismatch" msgid "Timezone mismatch"
msgstr "" msgstr "Ajavööndi ebakõla"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1137,7 +1140,7 @@ msgstr "%d / %d"
#: code:addons/web/static/src/xml/base.xml:1757 #: code:addons/web/static/src/xml/base.xml:1757
#, python-format #, python-format
msgid "2. Check your file format" msgid "2. Check your file format"
msgstr "" msgstr "2. Kontrolli oma faili formaati"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1324,7 +1327,7 @@ msgstr "Salvesta kui..."
#: code:addons/web/static/src/js/view_form.js:4971 #: code:addons/web/static/src/js/view_form.js:4971
#, python-format #, python-format
msgid "Could not display the selected image." msgid "Could not display the selected image."
msgstr "" msgstr "Ei saa kuvada valitud pilti."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1790,7 +1793,7 @@ msgstr "Domeen:"
#: code:addons/web/static/src/xml/base.xml:812 #: code:addons/web/static/src/xml/base.xml:812
#, python-format #, python-format
msgid "Default:" msgid "Default:"
msgstr "" msgstr "Vaikimisi:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1815,7 +1818,7 @@ msgstr "Andmebaas:"
#: code:addons/web/static/src/xml/base.xml:1215 #: code:addons/web/static/src/xml/base.xml:1215
#, python-format #, python-format
msgid "Uploading ..." msgid "Uploading ..."
msgstr "" msgstr "Üleslaadimine ..."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1829,14 +1832,14 @@ msgstr "Nimi:"
#: code:addons/web/static/src/js/chrome.js:1027 #: code:addons/web/static/src/js/chrome.js:1027
#, python-format #, python-format
msgid "About" msgid "About"
msgstr "" msgstr "Infot"
#. module: web #. module: web
#. openerp-web #. openerp-web
#: code:addons/web/static/src/xml/base.xml:1406 #: code:addons/web/static/src/xml/base.xml:1406
#, python-format #, python-format
msgid "Search Again" msgid "Search Again"
msgstr "" msgstr "Otsi Uuesti"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1997,14 +2000,14 @@ msgstr "Latin 1"
#: code:addons/web/static/src/xml/base.xml:1727 #: code:addons/web/static/src/xml/base.xml:1727
#, python-format #, python-format
msgid "Ok" msgid "Ok"
msgstr "Ok" msgstr "Olgu"
#. module: web #. module: web
#. openerp-web #. openerp-web
#: code:addons/web/static/src/js/views.js:1163 #: code:addons/web/static/src/js/views.js:1163
#, python-format #, python-format
msgid "Uploading..." msgid "Uploading..."
msgstr "" msgstr "Üleslaadimine..."
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -2071,7 +2074,7 @@ msgstr ""
#: code:addons/web/static/src/js/view_form.js:3880 #: code:addons/web/static/src/js/view_form.js:3880
#, python-format #, python-format
msgid "Add an item" msgid "Add an item"
msgstr "Lisa element" msgstr "Lisa kirje"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -2271,7 +2274,7 @@ msgstr "Tee koopia"
#: code:addons/web/static/src/xml/base.xml:1366 #: code:addons/web/static/src/xml/base.xml:1366
#, python-format #, python-format
msgid "Discard" msgid "Discard"
msgstr "" msgstr "Unusta"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -2348,7 +2351,7 @@ msgstr "Filter"
#: code:addons/web/static/src/xml/base.xml:928 #: code:addons/web/static/src/xml/base.xml:928
#, python-format #, python-format
msgid "Widget:" msgid "Widget:"
msgstr "" msgstr "Vidin:"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -2411,7 +2414,7 @@ msgstr "Andmebaas %s on eemaldatud"
#: code:addons/web/static/src/xml/base.xml:456 #: code:addons/web/static/src/xml/base.xml:456
#, python-format #, python-format
msgid "User's timezone" msgid "User's timezone"
msgstr "Kasutaja ajatsoon" msgstr "Kasutaja ajavöönd"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -2549,7 +2552,7 @@ msgstr "Tagasi sisenemiskuvale"
#: code:addons/web/static/src/xml/base.xml:1429 #: code:addons/web/static/src/xml/base.xml:1429
#, python-format #, python-format
msgid "Filters" msgid "Filters"
msgstr "" msgstr "Filtrid"
#~ msgid "Translations" #~ msgid "Translations"
#~ msgstr "Tõlked" #~ msgstr "Tõlked"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n" "Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-30 18:13+0000\n" "POT-Creation-Date: 2012-11-30 18:13+0000\n"
"PO-Revision-Date: 2012-12-13 19:55+0000\n" "PO-Revision-Date: 2012-12-19 19:44+0000\n"
"Last-Translator: Davide Corio - agilebg.com <davide.corio@agilebg.com>\n" "Last-Translator: Davide Corio - agilebg.com <davide.corio@agilebg.com>\n"
"Language-Team: Italian <it@li.org>\n" "Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-14 05:48+0000\n" "X-Launchpad-Export-Date: 2012-12-20 04:59+0000\n"
"X-Generator: Launchpad (build 16369)\n" "X-Generator: Launchpad (build 16378)\n"
#. module: web #. module: web
#. openerp-web #. openerp-web
@ -1685,7 +1685,7 @@ msgstr "Linee da saltare"
#: code:addons/web/static/src/js/view_form.js:2831 #: code:addons/web/static/src/js/view_form.js:2831
#, python-format #, python-format
msgid "Create \"<strong>%s</strong>\"" msgid "Create \"<strong>%s</strong>\""
msgstr "Creato \"<strong>%s</strong>\"" msgstr "Crea \"<strong>%s</strong>\""
#. module: web #. module: web
#. openerp-web #. openerp-web

View File

@ -6484,9 +6484,9 @@ jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase(); ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) || (/(webkit)[ \/]([\w.]+)/.exec( ua )) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || (/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua )) ||
/(msie) ([\w.]+)/.exec( ua ) || (/(msie) ([\w.]+)/.exec( ua )) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
[]; [];

View File

@ -819,6 +819,16 @@
margin-top: 1px; margin-top: 1px;
background-color: #f6cf3b; background-color: #f6cf3b;
} }
.openerp .oe_dialog_warning {
width: 100%;
}
.openerp .oe_dialog_warning p {
text-align: center;
}
.openerp .oe_dialog_icon {
padding: 5px;
width: 32px;
}
.openerp .oe_login { .openerp .oe_login {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=); background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=);
text-align: center; text-align: center;
@ -1182,6 +1192,7 @@
padding-bottom: 16px; padding-bottom: 16px;
} }
.openerp a.oe_logo { .openerp a.oe_logo {
position: relative;
width: 220px; width: 220px;
display: block; display: block;
text-align: center; text-align: center;
@ -1190,6 +1201,24 @@
margin: 14px 0; margin: 14px 0;
border: 0; border: 0;
} }
.openerp a.oe_logo .oe_logo_edit {
margin: 14px 0;
position: absolute;
top: 1px;
padding: 4px;
width: 100%;
display: none;
text-align: center;
color: #eeeeee;
background: rgba(37, 37, 37, 0.9);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.openerp a.oe_logo:hover .oe_logo_edit_admin {
display: block;
}
.openerp .oe_footer { .openerp .oe_footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

View File

@ -696,6 +696,15 @@ $sheet-padding: 16px
margin-top: 1px margin-top: 1px
background-color: #f6cf3b background-color: #f6cf3b
// }}} // }}}
// CrashManager {{{
.oe_dialog_warning
width: 100%
p
text-align: center
.oe_dialog_icon
padding: 5px
width: 32px
// }}}
// Login {{{ // Login {{{
.oe_login .oe_login
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=)
@ -958,12 +967,26 @@ $sheet-padding: 16px
text-shadow: 0 1px 1px white text-shadow: 0 1px 1px white
padding-bottom: 16px padding-bottom: 16px
a.oe_logo a.oe_logo
position: relative
width: 220px width: 220px
display: block display: block
text-align: center text-align: center
img img
margin: 14px 0 margin: 14px 0
border: 0 border: 0
.oe_logo_edit
margin: 14px 0
position: absolute
top: 1px
padding: 4px
width: 100%
display: none
text-align: center
color: #eee
background: rgba(37,37,37,0.9)
@include box-sizing(border)
&:hover .oe_logo_edit_admin
display: block
.oe_footer .oe_footer
position: fixed position: fixed
bottom: 0 bottom: 0

View File

@ -1,6 +1,12 @@
/* This css contains the styling specific to the 'normal mode'. (as opposite to the embedded mode) */
/* In embedded mode [1], this stylesheet won't be loaded. */
/* [1] The web client features an embedded mode in which the webclient */
/* or a part of it can be started in any element of any webpage host. */
body { body {
padding: 0; padding: 0;
margin: 0; margin: 0;
overflow-y: scroll; overflow-y: scroll;
height: 100%; height: 100%;
} }

View File

@ -691,6 +691,7 @@ instance.web.Login = instance.web.Widget.extend({
}); });
instance.web.client_actions.add("login", "instance.web.Login"); instance.web.client_actions.add("login", "instance.web.Login");
/** /**
* Redirect to url by replacing window.location * Redirect to url by replacing window.location
* If wait is true, sleep 1s and wait for the server i.e. after a restart. * If wait is true, sleep 1s and wait for the server i.e. after a restart.
@ -804,6 +805,7 @@ instance.web.Menu = instance.web.Widget.extend({
this.maximum_visible_links = 'auto'; // # of menu to show. 0 = do not crop, 'auto' = algo this.maximum_visible_links = 'auto'; // # of menu to show. 0 = do not crop, 'auto' = algo
this.data = {data:{children:[]}}; this.data = {data:{children:[]}};
this.on("menu_loaded", this, function (menu_data) { this.on("menu_loaded", this, function (menu_data) {
self.reflow();
// launch the fetch of needaction counters, asynchronous // launch the fetch of needaction counters, asynchronous
if (!_.isEmpty(menu_data.all_menu_ids)) { if (!_.isEmpty(menu_data.all_menu_ids)) {
this.rpc("/web/menu/load_needaction", {menu_ids: menu_data.all_menu_ids}).done(function(r) { this.rpc("/web/menu/load_needaction", {menu_ids: menu_data.all_menu_ids}).done(function(r) {
@ -811,6 +813,11 @@ instance.web.Menu = instance.web.Widget.extend({
}); });
} }
}); });
var lazyreflow = _.debounce(this.reflow.bind(this), 200);
instance.web.bus.on('resize', this, function() {
self.$el.height(0);
lazyreflow();
});
}, },
start: function() { start: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
@ -828,12 +835,6 @@ instance.web.Menu = instance.web.Widget.extend({
var self = this; var self = this;
this.data = {data: data}; this.data = {data: data};
this.renderElement(); this.renderElement();
this.limit_entries();
// Hide toplevel item if there is only one
var $toplevel = this.$("li");
if($toplevel.length == 1) {
$toplevel.hide();
}
this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this })); this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
this.$el.on('click', 'a[data-menu]', this.on_menu_click); this.$el.on('click', 'a[data-menu]', this.on_menu_click);
// Hide second level submenus // Hide second level submenus
@ -855,23 +856,34 @@ instance.web.Menu = instance.web.Widget.extend({
} }
}); });
}, },
limit_entries: function() { /**
var maximum_visible_links = this.maximum_visible_links; * Reflow the menu items and dock overflowing items into a "More" menu item.
if (maximum_visible_links === 'auto') { * Automatically called when 'menu_loaded' event is triggered and on window resizing.
maximum_visible_links = this.auto_limit_entries(); */
reflow: function() {
var self = this;
this.$el.height('auto').show();
var $more_container = this.$('.oe_menu_more_container').hide();
var $more = this.$('.oe_menu_more');
$more.children('li').insertBefore($more_container);
var $toplevel_items = this.$el.children('li').not($more_container).hide();
$toplevel_items.each(function() {
var remaining_space = self.$el.parent().width() - $more_container.outerWidth();
self.$el.parent().children(':visible').each(function() {
remaining_space -= $(this).outerWidth();
});
if ($(this).width() > remaining_space) {
return false;
}
$(this).show();
});
$more.append($toplevel_items.filter(':hidden').show());
$more_container.toggle(!!$more.children().length);
// Hide toplevel item if there is only one
var $toplevel = this.$el.children("li:visible");
if ($toplevel.length === 1) {
$toplevel.hide();
} }
if (maximum_visible_links < this.data.data.children.length) {
var $more = $(QWeb.render('Menu.more')),
$index = this.$el.find('li').eq(maximum_visible_links - 1);
$index.after($more);
//$('.oe_topbar').append($more);
$more.find('.oe_menu_more').append($index.next().nextAll());
}
},
auto_limit_entries: function() {
// TODO: auto detect overflow and bind window on resize
var width = $(window).width();
return Math.floor(width / 125);
}, },
/** /**
* Opens a given menu by id, as if a user had browsed to that menu by hand * Opens a given menu by id, as if a user had browsed to that menu by hand
@ -1118,6 +1130,9 @@ instance.web.Client = instance.web.Widget.extend({
instance.web.WebClient = instance.web.Client.extend({ instance.web.WebClient = instance.web.Client.extend({
_template: 'WebClient', _template: 'WebClient',
events: {
'click .oe_logo_edit_admin': 'logo_edit'
},
init: function(parent) { init: function(parent) {
this._super(parent); this._super(parent);
this._current_state = null; this._current_state = null;
@ -1188,7 +1203,29 @@ instance.web.WebClient = instance.web.Client.extend({
}, },
update_logo: function() { update_logo: function() {
var img = this.session.url('/web/binary/company_logo'); var img = this.session.url('/web/binary/company_logo');
this.$el.find('.oe_logo img').attr('src', '').attr('src', img); this.$('.oe_logo img').attr('src', '').attr('src', img);
this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', this.session.uid === 1);
},
logo_edit: function(ev) {
var self = this;
new instance.web.Model("res.users").get_func("read")(this.session.uid, ["company_id"]).then(function(res) {
self.rpc("/web/action/load", { action_id: "base.action_res_company_form" }).done(function(result) {
result.res_id = res['company_id'][0];
result.target = "new";
result.views = [[false, 'form']];
result.flags = {
action_buttons: true,
};
self.action_manager.do_action(result);
var form = self.action_manager.dialog_widget.views.form.controller;
form.on("on_button_cancel", self.action_manager.dialog, self.action_manager.dialog.close);
form.on('record_saved', self, function() {
self.action_manager.dialog.close();
self.update_logo();
});
});
});
return false;
}, },
check_timezone: function() { check_timezone: function() {
var self = this; var self = this;
@ -1343,17 +1380,17 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
_template: 'EmbedClient', _template: 'EmbedClient',
init: function(parent, origin, dbname, login, key, action_id, options) { init: function(parent, origin, dbname, login, key, action_id, options) {
this._super(parent, origin); this._super(parent, origin);
this.bind_credentials(dbname, login, key);
this.dbname = dbname;
this.login = login;
this.key = key;
this.action_id = action_id; this.action_id = action_id;
this.options = options || {}; this.options = options || {};
}, },
start: function() { start: function() {
var self = this; var self = this;
return $.when(this._super()).then(function() { return $.when(this._super()).then(function() {
return instance.session.session_authenticate(self.dbname, self.login, self.key, true).then(function() { return self.authenticate().then(function() {
if (!self.action_id) {
return;
}
return self.rpc("/web/action/load", { action_id: self.action_id }).done(function(result) { return self.rpc("/web/action/load", { action_id: self.action_id }).done(function(result) {
var action = result; var action = result;
action.flags = _.extend({ action.flags = _.extend({
@ -1364,11 +1401,30 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
//pager : false //pager : false
}, self.options, action.flags || {}); }, self.options, action.flags || {});
self.action_manager.do_action(action); self.do_action(action);
}); });
}); });
}); });
}, },
do_action: function(action) {
return this.action_manager.do_action(action);
},
authenticate: function() {
var s = instance.session;
if (s.session_is_valid() && s.db === this.dbname && s.login === this.login) {
return $.when();
}
return instance.session.session_authenticate(this.dbname, this.login, this.key, true);
},
bind_credentials: function(dbname, login, key) {
this.dbname = dbname;
this.login = login;
this.key = key;
},
}); });
instance.web.embed = function (origin, dbname, login, key, action, options) { instance.web.embed = function (origin, dbname, login, key, action, options) {

View File

@ -30,6 +30,12 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
* Setup a sessionm * Setup a sessionm
*/ */
session_bind: function(origin) { session_bind: function(origin) {
if (!_.isUndefined(this.origin)) {
if (this.origin === origin) {
return $.when();
}
throw new Error('Session already bound to ' + this.origin);
}
var self = this; var self = this;
this.setup(origin); this.setup(origin);
instance.web.qweb.default_dict['_s'] = this.origin; instance.web.qweb.default_dict['_s'] = this.origin;
@ -471,6 +477,11 @@ $.fn.openerpClass = function(additionalClass) {
$(this).addClass('openerp ' + additionalClass); $(this).addClass('openerp ' + additionalClass);
}); });
}; };
$.fn.openerpBounce = function() {
return this.each(function() {
$(this).css('box-sizing', 'content-box').effect('bounce', {distance: 18, times: 5}, 250);
});
};
/** Jquery extentions */ /** Jquery extentions */
$.Mutex = (function() { $.Mutex = (function() {

View File

@ -206,16 +206,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) { this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) {
if(self.get("actual_mode") == "view") { if(self.get("actual_mode") == "view") {
var $button = self.options.$buttons.find(".oe_form_button_edit"); var $button = self.options.$buttons.find(".oe_form_button_edit");
$button.css('box-sizing', 'content-box').effect('bounce', {distance: 18, times: 5}, 150); $button.openerpBounce();
e.stopPropagation(); e.stopPropagation();
instance.web.bus.trigger('click', e); instance.web.bus.trigger('click', e);
} }
}); });
//bounce effect on red button when click on statusbar. //bounce effect on red button when click on statusbar.
this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) { this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) {
if((self.get("actual_mode") == "view")) { if((self.get("actual_mode") == "view")) {
var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'}); var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'});
$button.effect('bounce', {distance:18, times: 5}, 150); $button.openerpBounce();
e.stopPropagation(); e.stopPropagation();
} }
}); });
@ -919,7 +919,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.do_update_pager(); this.do_update_pager();
if (this.sidebar) { if (this.sidebar) {
this.sidebar.do_attachement_update(this.dataset, this.datarecord.id); this.sidebar.do_attachement_update(this.dataset, this.datarecord.id);
} }
//openerp.log("The record has been created with id #" + this.datarecord.id); //openerp.log("The record has been created with id #" + this.datarecord.id);
return $.when(this.reload()).then(function () { return $.when(this.reload()).then(function () {
self.trigger('record_created', r); self.trigger('record_created', r);
@ -2289,7 +2289,10 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
}); });
instance.web.form.FieldID = instance.web.form.FieldChar.extend({ instance.web.form.FieldID = instance.web.form.FieldChar.extend({
process_modifiers: function () {
this._super();
this.set({ readonly: true });
},
}); });
instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
@ -2389,7 +2392,7 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
var self = this; var self = this;
this.$input = this.$el.find('input.oe_datepicker_master'); this.$input = this.$el.find('input.oe_datepicker_master');
this.$input_picker = this.$el.find('input.oe_datepicker_container'); this.$input_picker = this.$el.find('input.oe_datepicker_container');
this.picker({ this.picker({
onClose: this.on_picker_select, onClose: this.on_picker_select,
onSelect: this.on_picker_select, onSelect: this.on_picker_select,
@ -5092,7 +5095,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
_.each(datas, function (data) { _.each(datas, function (data) {
data.no_unlink = true; data.no_unlink = true;
data.url = self.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: data.id}); data.url = self.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: data.id});
_.each(self.get('value'), function (val, key) { _.each(self.get('value'), function (val, key) {
if(val == data.id) { if(val == data.id) {
self.get('value')[key] = data; self.get('value')[key] = data;
@ -5258,7 +5261,8 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
if (this.field.type == "many2one") { if (this.field.type == "many2one") {
var domain = []; var domain = [];
if(!_.isEmpty(this.field.domain) || !_.isEmpty(this.node.attrs.domain)) { if(!_.isEmpty(this.field.domain) || !_.isEmpty(this.node.attrs.domain)) {
domain = new instance.web.CompoundDomain(['|'], self.build_domain(), [['id', '=', self.get('value')]]); var d = instance.web.pyeval.eval('domain', self.build_domain());
domain = ['|', ['id', '=', self.get('value')]].concat(d);
} }
var ds = new instance.web.DataSetSearch(this, this.field.relation, self.build_context(), domain); var ds = new instance.web.DataSetSearch(this, this.field.relation, self.build_context(), domain);
return ds.read_slice(['name'], {}).then(function (records) { return ds.read_slice(['name'], {}).then(function (records) {

View File

@ -833,7 +833,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
); );
var create_nocontent = this.$buttons; var create_nocontent = this.$buttons;
this.$el.find('.oe_view_nocontent').click(function() { this.$el.find('.oe_view_nocontent').click(function() {
create_nocontent.effect('bounce', {distance: 18, times: 5}, 150); create_nocontent.openerpBounce();
}); });
} }
}); });

View File

@ -36,7 +36,7 @@
<t t-name="CrashManager.warning"> <t t-name="CrashManager.warning">
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning"> <table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
<tr> <tr>
<td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe_dialog_icon"/></td> <td class="oe_dialog_icon"><img t-att-src='_s + "/web/static/src/img/warning.png"'/></td>
<td> <td>
<p> <p>
<t t-js="d"> <t t-js="d">
@ -348,16 +348,14 @@
<li t-foreach="widget.data.data.children" t-as="menu"> <li t-foreach="widget.data.data.children" t-as="menu">
<t t-call="Menu.link"/> <t t-call="Menu.link"/>
</li> </li>
<li class="oe_menu_more_container" style="display: none;">
<span class="oe_topbar_item oe_menu_more_link oe_dropdown_toggle oe_dropdown_arrow">
More
<ul class="oe_menu_more oe_dropdown_menu"/>
</span>
</li>
</ul> </ul>
</t> </t>
<t t-name="Menu.more">
<li class="oe_menu_more_container">
<span class="oe_topbar_item oe_menu_more_link oe_dropdown_toggle oe_dropdown_arrow">
More
<ul class="oe_menu_more oe_dropdown_menu"/>
</span>
</li>
</t>
<t t-name="Menu.secondary"> <t t-name="Menu.secondary">
<div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id"> <div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
<t t-foreach="menu.children" t-as="menu"> <t t-foreach="menu.children" t-as="menu">
@ -414,7 +412,7 @@
<div class="oe_about"> <div class="oe_about">
<a class="oe_activate_debug_mode oe_right" href="?debug" style="background-color: white; padding:2px 6px; border-radius: 10px;">Activate the developer mode</a> <a class="oe_activate_debug_mode oe_right" href="?debug" style="background-color: white; padding:2px 6px; border-radius: 10px;">Activate the developer mode</a>
<img class="oe_logo" src="/web/static/src/img/logo2.png"/> <img class="oe_logo" src="/web/static/src/img/logo2.png"/>
<h3>Version <t t-esc="version_info.version"/></h3> <h3>Version <t t-esc="version_info.server_version"/></h3>
<div class="oe_bottom"> <div class="oe_bottom">
<p>Copyright © 2004-TODAY OpenERP SA. All Rights Reserved.<br /> <p>Copyright © 2004-TODAY OpenERP SA. All Rights Reserved.<br />
@ -439,7 +437,10 @@
<tr> <tr>
<td class="oe_leftbar" valign="top"> <td class="oe_leftbar" valign="top">
<t t-set="debug" t-value="__debug__ ? '&amp;debug' : ''"/> <t t-set="debug" t-value="__debug__ ? '&amp;debug' : ''"/>
<a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}"><img t-att-src='widget.session.url("/web/binary/company_logo")'/></a> <a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}">
<span class="oe_logo_edit">Edit Company data</span>
<img t-att-src='widget.session.url("/web/binary/company_logo")'/>
</a>
<div class="oe_secondary_menus_container"/> <div class="oe_secondary_menus_container"/>
<div class="oe_footer"> <div class="oe_footer">
Powered by <a href="http://www.openerp.com" target="_blank"><span>OpenERP</span></a> Powered by <a href="http://www.openerp.com" target="_blank"><span>OpenERP</span></a>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n" "Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-30 18:13+0000\n" "POT-Creation-Date: 2012-11-30 18:13+0000\n"
"PO-Revision-Date: 2012-12-04 00:57+0000\n" "PO-Revision-Date: 2012-12-19 14:45+0000\n"
"Last-Translator: OscarAlca <oscarolar@hotmail.com>\n" "Last-Translator: OscarAlca <oszckar@gmail.com>\n"
"Language-Team: Spanish (Mexico) <es_MX@li.org>\n" "Language-Team: Spanish (Mexico) <es_MX@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-05 05:43+0000\n" "X-Launchpad-Export-Date: 2012-12-20 04:59+0000\n"
"X-Generator: Launchpad (build 16335)\n" "X-Generator: Launchpad (build 16378)\n"
#. module: web_calendar #. module: web_calendar
#. openerp-web #. openerp-web
@ -43,7 +43,7 @@ msgstr "Guardar"
#: code:addons/web_calendar/static/src/js/calendar.js:99 #: code:addons/web_calendar/static/src/js/calendar.js:99
#, python-format #, python-format
msgid "Calendar view has a 'date_delay' type != float" msgid "Calendar view has a 'date_delay' type != float"
msgstr "" msgstr "La vista de calendario tiene un tipo 'date_delay' != Flotante"
#. module: web_calendar #. module: web_calendar
#. openerp-web #. openerp-web

View File

@ -465,12 +465,12 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
}); });
} else { } else {
var pop = new instance.web.form.FormOpenPopup(this); var pop = new instance.web.form.FormOpenPopup(this);
var id_for_buggy_addons = this.dataset.ids[index]; // ids could be non numeric var id_from_dataset = this.dataset.ids[index]; // dhtmlx scheduler loses id's type
pop.show_element(this.dataset.model, id_for_buggy_addons, this.dataset.get_context(), { pop.show_element(this.dataset.model, id_from_dataset, this.dataset.get_context(), {
title: _t("Edit: ") + this.name title: _t("Edit: ") + this.name
}); });
pop.on('write_completed', self, function(){ pop.on('write_completed', self, function(){
self.reload_event(event_id); self.reload_event(id_from_dataset);
}); });
} }
}, },

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n" "Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-11-30 18:13+0000\n" "POT-Creation-Date: 2012-11-30 18:13+0000\n"
"PO-Revision-Date: 2012-12-07 15:34+0000\n" "PO-Revision-Date: 2012-12-19 06:43+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n" "Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" "Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-08 05:21+0000\n" "X-Launchpad-Export-Date: 2012-12-20 04:59+0000\n"
"X-Generator: Launchpad (build 16341)\n" "X-Generator: Launchpad (build 16378)\n"
#. module: web_graph #. module: web_graph
#. openerp-web #. openerp-web
@ -64,7 +64,7 @@ msgstr "饼状图"
#: code:addons/web_graph/static/src/xml/web_graph.xml:28 #: code:addons/web_graph/static/src/xml/web_graph.xml:28
#, python-format #, python-format
msgid "Actions" msgid "Actions"
msgstr "作" msgstr "作"
#. module: web_graph #. module: web_graph
#. openerp-web #. openerp-web
@ -106,7 +106,7 @@ msgstr "隐藏"
#: code:addons/web_graph/static/src/xml/web_graph.xml:3 #: code:addons/web_graph/static/src/xml/web_graph.xml:3
#, python-format #, python-format
msgid "Graph Options" msgid "Graph Options"
msgstr "图形选择" msgstr "图表选项"
#. module: web_graph #. module: web_graph
#. openerp-web #. openerp-web

View File

@ -109,7 +109,7 @@
padding: 0px; padding: 0px;
background: white; background: white;
} }
.openerp .oe_kanban_view .oe_kanban_column { .openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards {
height: 100%; height: 100%;
} }
.openerp .oe_kanban_view .oe_kanban_aggregates { .openerp .oe_kanban_view .oe_kanban_aggregates {
@ -618,6 +618,18 @@
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
} }
.openerp_ie .oe_kanban_group_header .oe_kanban_group_title_vertical {
display: none !important;
}
.openerp_ie .oe_kanban_group_header.oe_kanban_group_folded .oe_kanban_group_title_vertical {
display: inline-block !important;
}
.openerp_ie .oe_kanban_group_title_vertical {
-ms-writing-mode: lr-tb !important;
background: #f0eeee;
top: -5px !important;
}
@media print { @media print {
.openerp .oe_kanban_groups button { .openerp .oe_kanban_groups button {
visibility: hidden; visibility: hidden;

View File

@ -136,7 +136,7 @@
padding: 0px padding: 0px
background: #ffffff background: #ffffff
.oe_kanban_column .oe_kanban_column, .oe_kanban_column_cards
height: 100% height: 100%
.oe_kanban_aggregates .oe_kanban_aggregates
padding: 0 padding: 0
@ -507,6 +507,17 @@
@include vertical-gradient(#f6f6f6, #e3e3e3) @include vertical-gradient(#f6f6f6, #e3e3e3)
@include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
.openerp_ie
.oe_kanban_group_header .oe_kanban_group_title_vertical
display: none !important
.oe_kanban_group_header.oe_kanban_group_folded .oe_kanban_group_title_vertical
display: inline-block !important
.oe_kanban_group_title_vertical
-ms-writing-mode: lr-tb !important
background: rgb(240, 238, 238)
top: -5px !important
@media print @media print
.openerp .openerp
.oe_kanban_groups .oe_kanban_groups

View File

@ -52,7 +52,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.$el.on('click', '.oe_kanban_dummy_cell', function() { this.$el.on('click', '.oe_kanban_dummy_cell', function() {
if (self.$buttons) { if (self.$buttons) {
self.$buttons.find('.oe_kanban_add_column').effect('bounce', {distance: 18, times: 5}, 150); self.$buttons.find('.oe_kanban_add_column').openerpBounce();
} }
}); });
}, },
@ -322,7 +322,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
this.compute_groups_width(); this.compute_groups_width();
if (this.group_by) { if (this.group_by) {
// Kanban cards drag'n'drop // Kanban cards drag'n'drop
var $columns = this.$el.find('.oe_kanban_column'); var $columns = this.$el.find('.oe_kanban_column .oe_kanban_column_cards');
$columns.sortable({ $columns.sortable({
handle : '.oe_kanban_draghandle', handle : '.oe_kanban_draghandle',
start: function(event, ui) { start: function(event, ui) {
@ -366,7 +366,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
scroll: false, scroll: false,
start: function(event, ui) { start: function(event, ui) {
start_index = ui.item.index(); start_index = ui.item.index();
self.$('.oe_kanban_record').css({ visibility: 'hidden' }); self.$('.oe_kanban_record, .oe_kanban_quick_create').css({ visibility: 'hidden' });
}, },
stop: function(event, ui) { stop: function(event, ui) {
var stop_index = ui.item.index(); var stop_index = ui.item.index();
@ -384,7 +384,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
} }
}); });
} }
self.$('.oe_kanban_record').css({ visibility: 'visible' }); self.$('.oe_kanban_record, .oe_kanban_quick_create').css({ visibility: 'visible' });
} }
}); });
} }
@ -471,7 +471,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
); );
var create_nocontent = this.$buttons; var create_nocontent = this.$buttons;
this.$el.find('.oe_view_nocontent').click(function() { this.$el.find('.oe_view_nocontent').click(function() {
create_nocontent.effect('bounce', {distance: 18, times: 5}, 150); create_nocontent.openerpBounce();
}); });
}, },
@ -612,10 +612,10 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
this.$has_been_started.resolve(); this.$has_been_started.resolve();
var add_btn = this.$el.find('.oe_kanban_add'); var add_btn = this.$el.find('.oe_kanban_add');
add_btn.tipsy({delayIn: 500, delayOut: 1000}); add_btn.tipsy({delayIn: 500, delayOut: 1000});
this.$records.click(function (ev) { this.$records.find(".oe_kanban_column_cards").click(function (ev) {
if (ev.target == ev.currentTarget) { if (ev.target == ev.currentTarget) {
if (!self.state.folded) { if (!self.state.folded) {
add_btn.effect('bounce', {distance: 18, times: 5}, 150); add_btn.openerpBounce();
} }
} }
}); });
@ -660,14 +660,15 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
var self = this; var self = this;
var $list_header = this.$records.find('.oe_kanban_group_list_header'); var $list_header = this.$records.find('.oe_kanban_group_list_header');
var $show_more = this.$records.find('.oe_kanban_show_more'); var $show_more = this.$records.find('.oe_kanban_show_more');
var $cards = this.$records.find('.oe_kanban_column_cards');
_.each(records, function(record) { _.each(records, function(record) {
var rec = new instance.web_kanban.KanbanRecord(self, record); var rec = new instance.web_kanban.KanbanRecord(self, record);
if (!prepend) { if (!prepend) {
rec.insertBefore($show_more); rec.appendTo($cards);
self.records.push(rec); self.records.push(rec);
} else { } else {
rec.insertAfter($list_header); rec.prependTo($cards);
self.records.unshift(rec); self.records.unshift(rec);
} }
}); });
@ -792,6 +793,7 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
}, },
renderElement: function() { renderElement: function() {
this.qweb_context = { this.qweb_context = {
instance: instance,
record: this.record, record: this.record,
widget: this, widget: this,
read_only_mode: this.view.options.read_only_mode, read_only_mode: this.view.options.read_only_mode,

View File

@ -68,6 +68,7 @@
<t t-name="KanbanView.group_records_container"> <t t-name="KanbanView.group_records_container">
<td class="oe_kanban_column"> <td class="oe_kanban_column">
<div class="oe_kanban_group_list_header"/> <div class="oe_kanban_group_list_header"/>
<div class="oe_kanban_column_cards"/>
<div class="oe_kanban_show_more"> <div class="oe_kanban_show_more">
<button class="oe_button">Show more... (<span class="oe_kanban_remaining"></span> remaining)</button> <button class="oe_button">Show more... (<span class="oe_kanban_remaining"></span> remaining)</button>
</div> </div>