diff --git a/addons/auth_oauth/__init__.py b/addons/auth_oauth/__init__.py index a56db75633b..08c1dd3d6b5 100644 --- a/addons/auth_oauth/__init__.py +++ b/addons/auth_oauth/__init__.py @@ -2,3 +2,4 @@ import controllers import auth_oauth import res_users import res_config +import ir_configparameter diff --git a/addons/auth_oauth/ir_configparameter.py b/addons/auth_oauth/ir_configparameter.py new file mode 100644 index 00000000000..b0fa17ffa5b --- /dev/null +++ b/addons/auth_oauth/ir_configparameter.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +from openerp import SUPERUSER_ID +from openerp.osv import osv + +class ir_configparameter(osv.Model): + _inherit = 'ir.config_parameter' + + def init(self, cr, force=False): + super(ir_configparameter, self).init(cr, force=force) + if force: + IMD = self.pool['ir.model.data'] + oauth_oe = IMD.xmlid_to_object(cr, SUPERUSER_ID, 'auth_oauth.provider_openerp') + dbuuid = self.get_param(cr, SUPERUSER_ID, 'database.uuid') + oauth_oe.write({'client_id': dbuuid}) diff --git a/addons/calendar/calendar_data.xml b/addons/calendar/calendar_data.xml index 4435e8a4324..268c4b96bed 100644 --- a/addons/calendar/calendar_data.xml +++ b/addons/calendar/calendar_data.xml @@ -401,7 +401,7 @@
Dear ${object.cn} ,
-

this it a reminder for the event below :

+

That is a reminder for the event below :

diff --git a/addons/hr_recruitment/i18n/lt.po b/addons/hr_recruitment/i18n/lt.po new file mode 100644 index 00000000000..a1467354b74 --- /dev/null +++ b/addons/hr_recruitment/i18n/lt.po @@ -0,0 +1,1259 @@ +# Lithuanian translation for openobject-addons +# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:04+0000\n" +"PO-Revision-Date: 2014-03-16 13:33+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Lithuanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-03-17 04:48+0000\n" +"X-Generator: Launchpad (build 16963)\n" + +#. module: hr_recruitment +#: help:hr.applicant,active:0 +msgid "" +"If the active field is set to false, it will allow you to hide the case " +"without removing it." +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +#: field:hr.recruitment.stage,requirements:0 +msgid "Requirements" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Application Summary" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Start Interview" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Mobile:" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.stage,fold:0 +msgid "" +"This stage is not visible, for example in status bar or kanban view, when " +"there are no records in that stage to display." +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_graduate +msgid "Graduate" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Group By..." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Filter and view on next actions and date" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,department_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,department_id:0 +msgid "Department" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_action:0 +msgid "Next Action Date" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_expected_extra:0 +msgid "Expected Salary Extra" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Jobs" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Pending Jobs" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,message_unread:0 +msgid "Unread Messages" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,company_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,company_id:0 +msgid "Company" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.source:0 +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_source_action +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_source +msgid "Sources of Applicants" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:435 +#, python-format +msgid "You must define Applied Job for this applicant." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Job" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.partner.create,close:0 +msgid "Close job request" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.crm_case_categ0_act_job +msgid "" +"

\n" +" Click to add a new job applicant.\n" +"

\n" +" OpenERP helps you track applicants in the recruitment\n" +" process and follow up all operations: meetings, interviews, " +"etc.\n" +"

\n" +" If you setup the email gateway, applicants and their " +"attached\n" +" CV are created automatically when an email is sent to\n" +" jobs@yourcompany.com. If you install the document " +"management\n" +" modules, all resumes are indexed automatically, so that you " +"can\n" +" easily search through their content.\n" +"

\n" +" " +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.crm_case_categ0_act_job +#: model:ir.ui.menu,name:hr_recruitment.menu_crm_case_categ0_act_job +msgid "Applications" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,day_open:0 +msgid "Days to Open" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,emp_id:0 +msgid "employee" +msgstr "" + +#. module: hr_recruitment +#: field:hr.config.settings,fetchmail_applicants:0 +msgid "Create applicants from an incoming email account" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,day:0 +msgid "Day" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.partner.create:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_partner_create +msgid "Create Contact" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Refuse" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_licenced +msgid "Master Degree" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_mobile:0 +msgid "Mobile" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Next Actions" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:38 +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:56 +#, python-format +msgid "Error!" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_bac5 +msgid "Doctoral Degree" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,job_id:0 +#: field:hr.recruitment.report,job_id:0 +msgid "Applied Job" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.stage,department_id:0 +msgid "" +"Stages of the recruitment process may be different per department. If this " +"stage is common to all departments, keep this field empty." +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,color:0 +msgid "Color Index" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.act_hr_applicant_to_meeting +msgid "Meetings" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_applicants_status +msgid "Applicants Status" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "My Recruitment" +msgstr "" + +#. module: hr_recruitment +#: field:hr.job,survey_id:0 +msgid "Interview Form" +msgstr "" + +#. module: hr_recruitment +#: help:hr.job,survey_id:0 +msgid "" +"Choose an interview form for this job position and you will be able to " +"print/answer this interview from all applicants who apply for this job" +msgstr "" + +#. module: hr_recruitment +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_recruitment +msgid "Recruitment" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,message_summary:0 +msgid "" +"Holds the Chatter summary (number of messages, ...). This summary is " +"directly in html format in order to be inserted in kanban views." +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:435 +#, python-format +msgid "Warning!" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_prop:0 +msgid "Salary Proposed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Avg Proposed Salary" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,availability:0 +#: field:hr.recruitment.report,available:0 +msgid "Availability" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_proposed:0 +#: view:hr.recruitment.report:0 +msgid "Proposed Salary" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_source +msgid "Source of Applicants" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.partner.create:0 +msgid "Convert To Partner" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_report +msgid "Recruitments Statistics" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Print interview report" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Hired employees" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_job +msgid "Job Description" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,source_id:0 +msgid "Source" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,message_follower_ids:0 +msgid "Followers" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.source,name:hr_recruitment.source_monster +msgid "Monster" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,name:hr_recruitment.mt_applicant_hired +msgid "Applicant Hired" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,email_from:0 +msgid "Email" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.hr_job_stage_act +msgid "" +"

\n" +" Click to add a new stage in the recruitment process.\n" +"

\n" +" Define here your stages of the recruitment process, for " +"example:\n" +" qualification call, first interview, second interview, refused,\n" +" hired.\n" +"

\n" +" " +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Available" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,title_action:0 +msgid "Next Action" +msgstr "" + +#. module: hr_recruitment +#: help:hr.job,alias_id:0 +msgid "" +"Email alias for this job position. New emails will automatically create new " +"applicants for this job position." +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Good" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "August" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,create_date:0 +#: view:hr.recruitment.report:0 +msgid "Creation Date" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_hired_employee +#: model:ir.model,name:hr_recruitment.model_hired_employee +msgid "Create Employee" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,priority:0 +#: field:hr.recruitment.report,priority:0 +msgid "Appreciation" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job1 +msgid "Initial Qualification" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Print Interview" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,stage_id:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,stage_id:0 +#: view:hr.recruitment.stage:0 +msgid "Stage" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job3 +msgid "Second Interview" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.hr_job_stage_act +msgid "Recruitment / Applicants Stages" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_expected:0 +#: view:hr.recruitment.report:0 +msgid "Expected Salary" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "July" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,email_cc:0 +msgid "Watchers Emails" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Applicants" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:351 +#, python-format +msgid "No Subject" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_exp:0 +msgid "Salary Expected" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_applicant +msgid "Applicant" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.stage,sequence:0 +msgid "Gives the sequence order when displaying a list of stages." +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_id:0 +msgid "Contact" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_expected_extra:0 +msgid "Salary Expected by Applicant, extra advantages" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,state:0 +msgid "" +"The status is set to 'Draft', when a case is created. " +"If the case is in progress the status is set to 'Open'. " +"When the case is over, the status is set to 'Done'. If " +"the case needs to be reviewed then the status is set " +"to 'Pending'." +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "March" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_stage_act +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_stage +msgid "Stages" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Draft recruitment" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Delete" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "In progress" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Hire & Create Employee" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,description:hr_recruitment.mt_applicant_hired +msgid "Applicant hired" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Jobs - Recruitment Form" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,probability:0 +msgid "Probability" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "April" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "September" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "December" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:39 +#, python-format +msgid "A contact is already defined on this job request." +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,categ_ids:0 +msgid "Tags" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_applicant_category +msgid "Category of applicant" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,month:0 +msgid "Month" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Answer related job question" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job2 +msgid "First Interview" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,write_date:0 +msgid "Update Date" +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +msgid "Yes" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,name:0 +msgid "Subject" +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +#: view:hr.recruitment.partner.create:0 +msgid "or" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,name:hr_recruitment.mt_applicant_refused +msgid "Applicant Refused" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Schedule Meeting" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_name:0 +msgid "Applicant's Name" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Very Good" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,user_email:0 +msgid "User Email" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_open:0 +msgid "Opened" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Group By ..." +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +msgid "No" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_expected:0 +msgid "Salary Expected by Applicant" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "All Initial Jobs" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,email_cc:0 +msgid "" +"These email addresses will be added to the CC field of all inbound and " +"outbound emails for this record before being sent. Separate multiple email " +"addresses with a comma" +msgstr "" + +#. module: hr_recruitment +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_degree +msgid "Degrees" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date_closed:0 +#: field:hr.recruitment.report,date_closed:0 +msgid "Closed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.stage:0 +msgid "Stage Definition" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,delay_close:0 +msgid "Avg. Delay to Close" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_proposed:0 +msgid "Salary Proposed by the Organisation" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +#: selection:hr.recruitment.stage,state:0 +msgid "Pending" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,state:0 +#: field:hr.recruitment.report,state:0 +#: field:hr.recruitment.stage,state:0 +msgid "Status" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Schedule interview with this applicant" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/hr_recruitment.py:397 +#, python-format +msgid "Applicant created" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,type_id:0 +#: view:hr.recruitment.degree:0 +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,type_id:0 +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_degree_action +msgid "Degree" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,partner_phone:0 +msgid "Phone" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "June" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,day_close:0 +msgid "Days to Close" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,message_is_follower:0 +msgid "Is a Follower" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,user_id:0 +msgid "User" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Excellent" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,active:0 +msgid "Active" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,nbr:0 +msgid "# of Applications" +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.hr_recruitment_stage_act +msgid "" +"

\n" +" Click to add a new stage in the recruitment process.\n" +"

\n" +" Don't forget to specify the department if your recruitment " +"process\n" +" is different according to the job position.\n" +"

\n" +" " +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,response:0 +msgid "Response" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "October" +msgstr "" + +#. module: hr_recruitment +#: field:hr.config.settings,module_document_ftp:0 +msgid "Allow the automatic indexation of resumes" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,salary_proposed_extra:0 +msgid "Proposed Salary Extra" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "January" +msgstr "" + +#. module: hr_recruitment +#: code:addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py:56 +#, python-format +msgid "A contact is already existing with the same name." +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_stage_form_installer +msgid "Review Recruitment Stages" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Contact:" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Search Jobs" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,date:0 +#: field:hr.recruitment.report,date:0 +msgid "Date" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,survey:0 +msgid "Survey" +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +msgid "Would you like to create an employee ?" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Degree:" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Extended Filters..." +msgstr "" + +#. module: hr_recruitment +#: model:ir.actions.act_window,help:hr_recruitment.hr_recruitment_stage_form_installer +msgid "" +"Check if the following stages are matching your recruitment process. Don't " +"forget to specify the department if your recruitment process is different " +"according to the job position." +msgstr "" + +#. module: hr_recruitment +#: view:hr.config.settings:0 +msgid "Configure" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job4 +msgid "Contract Proposed" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.source,name:hr_recruitment.source_website_company +msgid "Company Website" +msgstr "" + +#. module: hr_recruitment +#: sql_constraint:hr.recruitment.degree:0 +msgid "The name of the Degree of Recruitment must be unique!" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: field:hr.recruitment.report,year:0 +msgid "Year" +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +#: view:hr.recruitment.partner.create:0 +msgid "Cancel" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.partner.create:0 +msgid "Are you sure you want to create a contact based on this job request ?" +msgstr "" + +#. module: hr_recruitment +#: help:hr.config.settings,fetchmail_applicants:0 +msgid "" +"Allow applicants to send their job application to an email address " +"(jobs@mycompany.com),\n" +" and create automatically application documents in the system." +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: selection:hr.recruitment.stage,state:0 +msgid "In Progress" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Subject / Applicant" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.degree,sequence:0 +msgid "Gives the sequence order when displaying a list of degrees." +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,description:hr_recruitment.mt_stage_changed +msgid "Stage changed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: field:hr.applicant,user_id:0 +#: view:hr.recruitment.report:0 +msgid "Responsible" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +#: model:ir.actions.act_window,name:hr_recruitment.action_hr_recruitment_report_all +#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_report_all +msgid "Recruitment Analysis" +msgstr "" + +#. module: hr_recruitment +#: view:hired.employee:0 +msgid "Create New Employee" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.source,name:hr_recruitment.source_linkedin +msgid "LinkedIn" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,name:hr_recruitment.mt_job_new_applicant +msgid "New Applicant" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_stage +msgid "Stage of Recruitment" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Cases By Stage and Estimates" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +#: selection:hr.recruitment.stage,state:0 +msgid "New" +msgstr "" + +#. module: hr_recruitment +#: model:calendar.event.type,name:hr_recruitment.categ_meet_interview +#: view:hr.job:0 +msgid "Interview" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.source,name:0 +msgid "Source Name" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Day(s)" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,description:0 +msgid "Description" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,name:hr_recruitment.mt_stage_changed +msgid "Stage Changed" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "May" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job5 +msgid "Contract Signed" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.source,name:hr_recruitment.source_word +msgid "Word of Mouth" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.stage,fold:0 +msgid "Hide in views if empty" +msgstr "" + +#. module: hr_recruitment +#: help:hr.config.settings,module_document_ftp:0 +msgid "" +"Manage your CV's and motivation letter related to all applicants.\n" +" This installs the module document_ftp. This will install the " +"knowledge management module in order to allow you to search using specific " +"keywords through the content of all documents (PDF, .DOCx...)" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,state:0 +#: selection:hr.recruitment.report,state:0 +#: model:hr.recruitment.stage,name:hr_recruitment.stage_job6 +#: selection:hr.recruitment.stage,state:0 +msgid "Refused" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,state:0 +#: view:hr.recruitment.report:0 +#: selection:hr.recruitment.report,state:0 +#: selection:hr.recruitment.stage,state:0 +msgid "Hired" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,reference:0 +msgid "Referred By" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Departement:" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "On Average" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_degree +msgid "Degree of Recruitment" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_prop_avg:0 +msgid "Avg. Proposed Salary" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Open Jobs" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "February" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.applicant,priority:0 +#: selection:hr.recruitment.report,priority:0 +msgid "Not Good" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant_category,name:0 +#: field:hr.recruitment.degree,name:0 +#: field:hr.recruitment.stage,name:0 +msgid "Name" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,month:0 +msgid "November" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.report,salary_exp_avg:0 +msgid "Avg. Expected Salary" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Avg Expected Salary" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_recruitment_partner_create +msgid "Create Partner from job application" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,email_from:0 +msgid "These people will receive email." +msgstr "" + +#. module: hr_recruitment +#: field:hr.job,alias_id:0 +msgid "Alias" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "Pending recruitment" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Contract" +msgstr "" + +#. module: hr_recruitment +#: field:hr.applicant,message_summary:0 +msgid "Summary" +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,message_ids:0 +msgid "Messages and communication history" +msgstr "" + +#. module: hr_recruitment +#: model:mail.message.subtype,description:hr_recruitment.mt_applicant_refused +msgid "Applicant refused" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.stage,department_id:0 +msgid "Specific to a Department" +msgstr "" + +#. module: hr_recruitment +#: view:hr.recruitment.report:0 +msgid "In progress recruitment" +msgstr "" + +#. module: hr_recruitment +#: field:hr.recruitment.degree,sequence:0 +#: field:hr.recruitment.stage,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: hr_recruitment +#: model:hr.recruitment.degree,name:hr_recruitment.degree_bachelor +msgid "Bachelor Degree" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Unassigned Recruitments" +msgstr "" + +#. module: hr_recruitment +#: model:ir.model,name:hr_recruitment.model_hr_config_settings +msgid "hr.config.settings" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.stage,state:0 +msgid "" +"The related status for the stage. The status of your document will " +"automatically change according to the selected stage. Example, a stage is " +"related to the status 'Close', when your document reach this stage, it will " +"be automatically closed." +msgstr "" + +#. module: hr_recruitment +#: help:hr.applicant,salary_proposed_extra:0 +msgid "Salary Proposed by the Organisation, extra advantages" +msgstr "" + +#. module: hr_recruitment +#: help:hr.recruitment.report,delay_close:0 +msgid "Number of Days to close the project issue" +msgstr "" + +#. module: hr_recruitment +#: selection:hr.recruitment.report,state:0 +msgid "Open" +msgstr "" + +#. module: hr_recruitment +#: view:board.board:0 +msgid "Applications to be Processed" +msgstr "" + +#. module: hr_recruitment +#: view:hr.applicant:0 +msgid "Schedule Interview" +msgstr "" diff --git a/addons/l10n_be_invoice_bba/i18n/zh_CN.po b/addons/l10n_be_invoice_bba/i18n/zh_CN.po new file mode 100644 index 00000000000..922af835626 --- /dev/null +++ b/addons/l10n_be_invoice_bba/i18n/zh_CN.po @@ -0,0 +1,146 @@ +# Chinese (Simplified) translation for openobject-addons +# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-11-24 02:53+0000\n" +"PO-Revision-Date: 2014-03-13 05:55+0000\n" +"Last-Translator: LaoBiao.JX \n" +"Language-Team: Chinese (Simplified) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-03-14 06:36+0000\n" +"X-Generator: Launchpad (build 16963)\n" + +#. module: l10n_be_invoice_bba +#: sql_constraint:account.invoice:0 +msgid "Invoice Number must be unique per Company!" +msgstr "发票号必须在公司范围内唯一" + +#. module: l10n_be_invoice_bba +#: model:ir.model,name:l10n_be_invoice_bba.model_account_invoice +msgid "Invoice" +msgstr "发票" + +#. module: l10n_be_invoice_bba +#: constraint:res.partner:0 +msgid "Error ! You cannot create recursive associated members." +msgstr "错误,您不能创建循环引用的会员用户" + +#. module: l10n_be_invoice_bba +#: constraint:account.invoice:0 +msgid "Invalid BBA Structured Communication !" +msgstr "BBA结构化传输有误!" + +#. module: l10n_be_invoice_bba +#: selection:res.partner,out_inv_comm_algorithm:0 +msgid "Random" +msgstr "随机" + +#. module: l10n_be_invoice_bba +#: help:res.partner,out_inv_comm_type:0 +msgid "Select Default Communication Type for Outgoing Invoices." +msgstr "" + +#. module: l10n_be_invoice_bba +#: help:res.partner,out_inv_comm_algorithm:0 +msgid "" +"Select Algorithm to generate the Structured Communication on Outgoing " +"Invoices." +msgstr "" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:109 +#: code:addons/l10n_be_invoice_bba/invoice.py:135 +#, python-format +msgid "" +"The daily maximum of outgoing invoices with an automatically generated BBA " +"Structured Communications has been exceeded!\n" +"Please create manually a unique BBA Structured Communication." +msgstr "自动生成结构化BBA传输已超出每日销售发票的最大值,请手动建立BBA结构化传输" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:150 +#, python-format +msgid "Error!" +msgstr "" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:121 +#, python-format +msgid "" +"The Partner should have a 3-7 digit Reference Number for the generation of " +"BBA Structured Communications!\n" +"Please correct the Partner record." +msgstr "" + +#. module: l10n_be_invoice_bba +#: constraint:res.partner:0 +msgid "Error: Invalid ean code" +msgstr "错误:无效的EAN编码" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:108 +#: code:addons/l10n_be_invoice_bba/invoice.py:120 +#: code:addons/l10n_be_invoice_bba/invoice.py:134 +#: code:addons/l10n_be_invoice_bba/invoice.py:162 +#: code:addons/l10n_be_invoice_bba/invoice.py:172 +#: code:addons/l10n_be_invoice_bba/invoice.py:197 +#, python-format +msgid "Warning!" +msgstr "警告!" + +#. module: l10n_be_invoice_bba +#: selection:res.partner,out_inv_comm_algorithm:0 +msgid "Customer Reference" +msgstr "客户参考号" + +#. module: l10n_be_invoice_bba +#: field:res.partner,out_inv_comm_type:0 +msgid "Communication Type" +msgstr "讯息类型" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:173 +#: code:addons/l10n_be_invoice_bba/invoice.py:198 +#, python-format +msgid "" +"The BBA Structured Communication has already been used!\n" +"Please create manually a unique BBA Structured Communication." +msgstr "" + +#. module: l10n_be_invoice_bba +#: selection:res.partner,out_inv_comm_algorithm:0 +msgid "Date" +msgstr "事务处理日期" + +#. module: l10n_be_invoice_bba +#: model:ir.model,name:l10n_be_invoice_bba.model_res_partner +msgid "Partner" +msgstr "合作伙伴" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:151 +#, python-format +msgid "" +"Unsupported Structured Communication Type Algorithm '%s' !\n" +"Please contact your OpenERP support channel." +msgstr "不支持的结构化传输算法类型\"%s\"!请联系你的OpenERP 维护人员" + +#. module: l10n_be_invoice_bba +#: field:res.partner,out_inv_comm_algorithm:0 +msgid "Communication Algorithm" +msgstr "" + +#. module: l10n_be_invoice_bba +#: code:addons/l10n_be_invoice_bba/invoice.py:163 +#, python-format +msgid "" +"Empty BBA Structured Communication!\n" +"Please fill in a unique BBA Structured Communication." +msgstr "" diff --git a/addons/project/i18n/zh_CN.po b/addons/project/i18n/zh_CN.po index c0cfcde2834..ecc5aa4aea3 100644 --- a/addons/project/i18n/zh_CN.po +++ b/addons/project/i18n/zh_CN.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-08-13 04:04+0000\n" -"Last-Translator: Wei \"oldrev\" Li \n" +"PO-Revision-Date: 2014-03-15 06:42+0000\n" +"Last-Translator: Victor Yu \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-04 06:19+0000\n" -"X-Generator: Launchpad (build 16948)\n" +"X-Launchpad-Export-Date: 2014-03-16 05:42+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: project #: view:project.project:0 @@ -671,7 +671,7 @@ msgstr "新任务" #. module: project #: field:project.config.settings,module_project_issue_sheet:0 msgid "Invoice working time on issues" -msgstr "" +msgstr "依据问题工作时间开票" #. module: project #: view:project.project:0 @@ -828,7 +828,7 @@ msgstr "花费的时间" #: view:project.project:0 #: view:project.task:0 msgid "í" -msgstr "" +msgstr "í" #. module: project #: field:account.analytic.account,company_uom_id:0 @@ -958,7 +958,7 @@ msgstr "本项目和相关项目的任务实际花费的小时数合计" msgid "" "Follow this project to automatically track the events associated to tasks " "and issues of this project." -msgstr "" +msgstr "关注此项目的同时,追踪此项目的任务和问题关联的事件。" #. module: project #: view:project.task:0 @@ -1018,7 +1018,7 @@ msgstr "信息和通信历史记录" msgid "" "To invoice or setup invoicing and renewal options, go to the related " "contract:" -msgstr "" +msgstr "开票或设定发票更新选项,到相关的合同:" #. module: project #: field:project.task.delegate,state:0 diff --git a/addons/sale/i18n/zh_CN.po b/addons/sale/i18n/zh_CN.po index 0fbbcb6833d..a5ab6e3c64b 100644 --- a/addons/sale/i18n/zh_CN.po +++ b/addons/sale/i18n/zh_CN.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-11-19 10:53+0000\n" -"Last-Translator: Guipo Hao \n" +"PO-Revision-Date: 2014-03-15 07:15+0000\n" +"Last-Translator: Victor Yu \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-04 07:04+0000\n" -"X-Generator: Launchpad (build 16948)\n" +"X-Launchpad-Export-Date: 2014-03-16 05:42+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: sale #: help:sale.order,message_summary:0 @@ -247,7 +247,7 @@ msgstr "计量单位 " #: code:addons/sale/wizard/sale_make_invoice_advance.py:101 #, python-format msgid "Incorrect Data" -msgstr "" +msgstr "错误的数据" #. module: sale #: code:addons/sale/wizard/sale_make_invoice_advance.py:102 @@ -1570,7 +1570,7 @@ msgstr "查找未开票明细" #. module: sale #: model:ir.model,name:sale.model_account_config_settings msgid "account.config.settings" -msgstr "" +msgstr "会计.配置.设定" #. module: sale #: sql_constraint:sale.order:0 @@ -2080,7 +2080,7 @@ msgstr "产品销售单位" #. module: sale #: model:process.node,note:sale.process_node_quotation0 msgid "Draft state of sales order" -msgstr "销售订单草稿状态" +msgstr "草稿状态的销售订单" #. module: sale #: field:sale.order,origin:0 @@ -2286,7 +2286,9 @@ msgstr "" msgid "" "Before choosing a product,\n" " select a customer in the sales form." -msgstr "在挑选产品前,在 销售表单选择一个客户" +msgstr "" +"在挑选产品前,\n" +" 在销售表单中选择一个客户。" #. module: sale #: view:sale.order:0 diff --git a/addons/share/i18n/zh_CN.po b/addons/share/i18n/zh_CN.po index e48a7466e8b..fc95d92b318 100644 --- a/addons/share/i18n/zh_CN.po +++ b/addons/share/i18n/zh_CN.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:06+0000\n" -"PO-Revision-Date: 2012-12-09 05:00+0000\n" -"Last-Translator: sum1201 \n" +"PO-Revision-Date: 2014-03-16 16:41+0000\n" +"Last-Translator: Victor Yu \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-04 07:34+0000\n" -"X-Generator: Launchpad (build 16948)\n" +"X-Launchpad-Export-Date: 2014-03-17 04:48+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: share #: code:addons/share/wizard/share_wizard.py:842 @@ -76,6 +76,8 @@ msgid "" " %s\n" "\n" msgstr "" +"附件没弄好,你可以在OpenERP服务器上查看: %s\n" +"\n" #. module: share #: model:ir.module.category,name:share.module_category_share @@ -147,7 +149,7 @@ msgstr "共享URL" #: code:addons/share/wizard/share_wizard.py:881 #, python-format msgid "These are your credentials to access this protected area:\n" -msgstr "" +msgstr "这是你访问这个保护区域的凭证:\n" #. module: share #: view:share.wizard:0 @@ -173,7 +175,7 @@ msgstr "" #, python-format msgid "" "Please indicate the emails of the persons to share with, one per line." -msgstr "" +msgstr "请标明分享的用户电子邮箱,每行一个。" #. module: share #: help:share.wizard,domain:0 @@ -189,7 +191,7 @@ msgstr "下一个" #: code:addons/share/wizard/share_wizard.py:662 #, python-format msgid "Action and Access Mode are required to create a shared access." -msgstr "" +msgstr "操作和访问模式都需要要创建一个共享入口。" #. module: share #: code:addons/share/wizard/share_wizard.py:850 @@ -256,7 +258,7 @@ msgstr "非共享组" msgid "" "An email notification with instructions has been sent to the following " "people:" -msgstr "" +msgstr "带有操作说明的邮件通知已经发送到以下人了:" #. module: share #: code:addons/share/wizard/share_wizard.py:77 @@ -273,6 +275,8 @@ msgid "" "Sales, HR, etc.)\n" "It is open source and can be found on http://www.openerp.com." msgstr "" +"OpenERP是强大的、用户友好的商业应用套装(CRM,销售、人事、等)\n" +"而且是开源的,可以在 http://www.openerp.com 找到并下载。" #. module: share #: field:share.wizard,action_id:0 @@ -282,7 +286,7 @@ msgstr "共享操作" #. module: share #: help:share.wizard,record_name:0 msgid "Name of the shared record, if sharing a precise record" -msgstr "" +msgstr "如果共享一个精确记录,记录下分享名" #. module: share #: field:res.users,share:0 @@ -337,7 +341,7 @@ msgstr "创建新的" #. module: share #: help:share.wizard,name:0 msgid "Title for the share (displayed to users as menu and shortcut name)" -msgstr "" +msgstr "共享标题(显示给用户的菜单和快捷方式的名称)" #. module: share #: code:addons/share/wizard/share_wizard.py:636 @@ -348,7 +352,7 @@ msgstr "创建用户 %s (%s )间接共享过滤器,在用户组 %s" #. module: share #: help:share.wizard,share_root_url:0 msgid "Main access page for users that are granted shared access" -msgstr "" +msgstr "用户主要访问的页面被授权共享访问" #. module: share #: code:addons/share/wizard/share_wizard.py:206 @@ -356,7 +360,7 @@ msgstr "" msgid "" "You must configure your email address in the user preferences before using " "the Share button." -msgstr "" +msgstr "在使用分享按钮前,你必须在用户首选项处配置你的电子邮件。" #. module: share #: model:res.groups,name:share.group_share_user @@ -387,7 +391,7 @@ msgstr "数据库" #. module: share #: view:share.wizard:0 msgid "Share with these People (one email per line)" -msgstr "" +msgstr "与这些人分享(每行一个电子邮件)" #. module: share #: field:share.wizard,domain:0 @@ -409,7 +413,7 @@ msgstr "简述" #: help:share.wizard,embed_code:0 msgid "" "Embed this code in your documents to provide a link to the shared document." -msgstr "" +msgstr "在你的文档中嵌入下列代码以提供到分享文档的连接。" #. module: share #: code:addons/share/wizard/share_wizard.py:513 @@ -431,7 +435,7 @@ msgstr "共享你的单据" #. module: share #: view:share.wizard:0 msgid "Or insert the following code where you want to embed your documents" -msgstr "" +msgstr "或者在你想要嵌入你的文档时,插入下列代码" #. module: share #: code:addons/share/wizard/share_wizard.py:886 @@ -439,7 +443,7 @@ msgstr "" msgid "" "The documents have been automatically added to your current OpenERP " "documents.\n" -msgstr "" +msgstr "一份文档已经被自动增加到你现在的OpenERP文档中了。\n" #. module: share #: model:ir.model,name:share.model_share_wizard_result_line diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index eff28b61fcd..aee0997e4b4 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -314,6 +314,23 @@ class Website(openerp.addons.web.controllers.main.Home): '/website/image///' ], auth="public", website=True) def website_image(self, model, id, field, max_width=maxint, max_height=maxint): + """ Fetches the requested field and ensures it does not go above + (max_width, max_height), resizing it if necessary. + + Resizing is bypassed if the object provides a $field_big, which will + be interpreted as a pre-resized version of the base field. + + If the record is not found or does not have the requested field, + returns a placeholder image via :meth:`~.placeholder`. + + Sets and checks conditional response parameters: + * :mailheader:`ETag` is always set (and checked) + * :mailheader:`Last-Modified is set iif the record has a concurrency + field (``__last_update``) + + The requested field is assumed to be base64-encoded image data in + all cases. + """ Model = request.registry[model] response = werkzeug.wrappers.Response() @@ -322,15 +339,17 @@ class Website(openerp.addons.web.controllers.main.Home): ids = Model.search(request.cr, request.uid, [('id', '=', id)], context=request.context) \ - or Model.search(request.cr, openerp.SUPERUSER_ID, - [('id', '=', id), ('website_published', '=', True)], context=request.context) + or Model.search(request.cr, openerp.SUPERUSER_ID, + [('id', '=', id), ('website_published', '=', True)], context=request.context) if not ids: return self.placeholder(response) + presized = '%s_big' % field concurrency = '__last_update' [record] = Model.read(request.cr, openerp.SUPERUSER_ID, [id], - [concurrency, field], context=request.context) + [concurrency, field, presized], + context=request.context) if concurrency in record: server_format = openerp.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT @@ -354,25 +373,28 @@ class Website(openerp.addons.web.controllers.main.Home): if response.status_code == 304: return response - data = record[field].decode('base64') - fit = int(max_width), int(max_height) + data = (record.get(presized) or record[field]).decode('base64') - buf = cStringIO.StringIO(data) - - image = Image.open(buf) - image.load() + image = Image.open(cStringIO.StringIO(data)) response.mimetype = Image.MIME[image.format] + # record provides a pre-resized version of the base field, use that + # directly + if record.get(presized): + response.set_data(data) + return response + + fit = int(max_width), int(max_height) w, h = image.size max_w, max_h = fit if w < max_w and h < max_h: - response.data = data + response.set_data(data) else: image.thumbnail(fit, Image.ANTIALIAS) image.save(response.stream, image.format) - # invalidate content-length computed by make_conditional as writing - # to response.stream does not do it (as of werkzeug 0.9.3) + # invalidate content-length computed by make_conditional as + # writing to response.stream does not do it (as of werkzeug 0.9.3) del response.headers['Content-Length'] return response diff --git a/addons/website/data/website_demo.xml b/addons/website/data/website_demo.xml index 8abf901fd89..63900506741 100644 --- a/addons/website/data/website_demo.xml +++ b/addons/website/data/website_demo.xml @@ -25,7 +25,7 @@ Partner Detail
-
+
@@ -73,7 +73,7 @@ response = request.website.render("website.template_partner_post", values) Partners
-
+
diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index f73138313ab..47c0853d6be 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -79,6 +79,9 @@ class ir_http(orm.AbstractModel): return self._dispatch() def _postprocess_args(self, arguments, rule): + if not getattr(request, 'website_enabled', False): + return super(ir_http, self)._postprocess_args(arguments, rule) + for arg, val in arguments.items(): # Replace uid placeholder by the current request.uid if isinstance(val, orm.browse_record) and isinstance(val._uid, RequestUID): diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 966810297ea..1a541865987 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -89,7 +89,7 @@ def slug(value): else: # assume name_search result tuple id, name = value - slugname = slugify(name) + slugname = slugify(name or '') if not slugname: return str(id) return "%s-%d" % (slugname, id) @@ -580,10 +580,26 @@ class ir_attachment(osv.osv): return hashlib.new('sha1', attachment_dict['datas']).hexdigest() return None + def _datas_big(self, cr, uid, ids, name, arg, context=None): + result = dict.fromkeys(ids, False) + if context and context.get('bin_size'): + return result + + for record in self.browse(cr, uid, ids, context=context): + if not record.datas: continue + try: + result[record.id] = openerp.tools.image_resize_image_big(record.datas) + except IOError: # apparently the error PIL.Image.open raises + pass + + return result + _columns = { 'datas_checksum': fields.function(_datas_checksum, size=40, string="Datas checksum", type='char', store=True, select=True), - 'website_url': fields.function(_website_url_get, string="Attachment URL", type='char') + 'website_url': fields.function(_website_url_get, string="Attachment URL", type='char'), + 'datas_big': fields.function (_datas_big, type='binary', store=True, + string="Resized file content"), } def create(self, cr, uid, values, context=None): diff --git a/addons/website/static/src/css/snippets.css b/addons/website/static/src/css/snippets.css index a19baa33fd6..4121b70ef2e 100644 --- a/addons/website/static/src/css/snippets.css +++ b/addons/website/static/src/css/snippets.css @@ -344,6 +344,12 @@ -moz-box-shadow: 0 0 5px 3px rgba(255, 255, 255, 0.7); box-shadow: 0 0 5px 3px rgba(255, 255, 255, 0.7); } +.oe_overlay .oe_handle.readonly { + cursor: auto !important; +} +.oe_overlay .oe_handle.readonly:before, .oe_overlay .oe_handle.readonly.size { + display: none !important; +} .oe_overlay .icon.btn { display: inline-block; } @@ -351,7 +357,7 @@ position: absolute; left: 50% !important; text-align: center; - top: -11px; + top: -20px; z-index: 1002; } .oe_overlay .oe_overlay_options > .btn-group { @@ -618,8 +624,3 @@ height: 16px; display: inline-block; } - -[data-snippet-id] { - min-height: 10px; - min-width: 10px; -} diff --git a/addons/website/static/src/css/snippets.sass b/addons/website/static/src/css/snippets.sass index afdb261a2a5..d7442a5b0f7 100644 --- a/addons/website/static/src/css/snippets.sass +++ b/addons/website/static/src/css/snippets.sass @@ -252,6 +252,10 @@ background: rgba(30, 30, 30, .8) color: #fff +box-shadow(0 0 5px 3px rgba(255,255,255,.7)) + &.readonly + cursor: auto !important + &:before, &.size + display: none !important .icon.btn display: inline-block @@ -260,7 +264,7 @@ position: absolute left: 50% !important text-align: center - top: -11px + top: -20px z-index: 1002 > .btn-group left: -50% @@ -485,10 +489,6 @@ height: 16px display: inline-block -[data-snippet-id] - min-height: 10px - min-width: 10px - diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index 774be6ae09a..dc0628ca3c5 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -102,6 +102,10 @@ header a.navbar-brand img { max-height: 50px; } +#wrapwrap p:empty:after { + content: "\2060"; +} + /* ----- Snippets Styles ----- */ .readable { font-size: 120%; @@ -116,9 +120,10 @@ header a.navbar-brand img { } /* ----- BOOTSTRAP FIX ----- */ -.container .container { +.container .container, .readable .container { padding-left: 0; padding-right: 0; + width: auto; } /* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */ @@ -216,7 +221,6 @@ footer { /* -- Hack for removing double scrollbar from mobile preview -- */ div#mobile-preview.modal { overflow: hidden; - overflow-y: hidden; } ul.nav-stacked > li > a { @@ -280,12 +284,16 @@ ul.nav-stacked > li > a { background-size: 100%; } -[data-snippet-id], .colmd, .hr, .blockquote { +section, .carousel, .parallax, .row, .hr, .blockquote { + min-height: 30px; +} + +.carousel, .parallax, .blockquote { overflow: hidden; } @media (max-width: 400px) { - [data-snippet-id]:not([data-snippet-id="carousel"]) { + section, .parallax, .row, .hr, .blockquote { height: auto !important; } } @@ -380,10 +388,10 @@ ul.nav-stacked > li > a { } /* Parallax Theme */ -div.carousel[data-snippet-id="slider"] .carousel-indicators li { +div.carousel .carousel-indicators li { border: 1px solid grey; } -div.carousel[data-snippet-id="slider"] .carousel-indicators .active { +div.carousel .carousel-indicators .active { background-color: grey; } diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index 4796d88cbb8..a15953e0f2b 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -68,6 +68,12 @@ header img max-height: 50px +// add {WORD JOINER} (equivalent to deprecated ZERO WIDTH NO-BREAK SPACE) at +// the beginning of paragraphs so they don't "disappear" after saving when +// used solely for spacing. +#wrapwrap p:empty:after + content: '\2060' + /* ----- Snippets Styles ----- */ .readable @@ -78,17 +84,16 @@ header /* ----- EDITOR ----- */ - .css_non_editable_mode_hidden display: none - /* ----- BOOTSTRAP FIX ----- */ -.container +.container, .readable .container padding-left: 0 padding-right: 0 + width: auto /* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */ @@ -179,7 +184,6 @@ footer /* -- Hack for removing double scrollbar from mobile preview -- */ div#mobile-preview.modal overflow: hidden - overflow-y: hidden ul.nav-stacked > li > a padding: 2px 15px @@ -230,11 +234,13 @@ ul.nav-stacked > li > a .oe_img_bg background-size: 100% -[data-snippet-id],.colmd,.hr,.blockquote +section, .carousel, .parallax, .row, .hr, .blockquote + min-height: 30px +.carousel, .parallax, .blockquote overflow: hidden @media (max-width: 400px) - [data-snippet-id]:not([data-snippet-id="carousel"]) + section, .parallax, .row, .hr, .blockquote height: auto !important .carousel-inner @@ -312,7 +318,7 @@ ul.nav-stacked > li > a /* Parallax Theme */ -div.carousel[data-snippet-id="slider"] +div.carousel .carousel-indicators li border: 1px solid grey diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index a5cf89b3a4e..c89bf9ec2fb 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -106,6 +106,7 @@ }, canUndo: false, editorFocus: true, + context: 'a', }); //noinspection JSValidateTypes editor.addCommand('image', { @@ -115,6 +116,7 @@ }, canUndo: false, editorFocus: true, + context: 'img', }); editor.ui.addButton('Link', { @@ -205,8 +207,9 @@ icon: '/website/static/src/img/bglink.png', modes: { wysiwyg: true }, editorFocus: true, + context: 'a', panel: { - css: '/website/static/lib/bootstrap/css/bootstrap.css', + css: '/web/static/lib/bootstrap/css/bootstrap.css', attributes: { 'role': 'listbox', 'aria-label': label }, }, @@ -346,14 +349,40 @@ requires: 'widget', init: function (editor) { + var specials = { + // Can't find the correct ACL rule to only allow img tags + image: { content: '*' }, + html: { text: '*' }, + monetary: { + text: { + selector: 'span.oe_currency_value', + allowedContent: { } + } + } + }; + _(specials).each(function (editable, type) { + editor.widgets.add(type, { + draggable: false, + editables: editable, + upcast: function (el) { + return el.attributes['data-oe-type'] === type; + + } + }); + }); editor.widgets.add('oeref', { - editables: { text: '*' }, draggable: false, - + editables: { + text: { + selector: '*', + allowedContent: { } + }, + }, upcast: function (el) { - var matches = el.attributes['data-oe-type'] && el.attributes['data-oe-type'] !== 'monetary'; - if (!matches) { return false; } - + var type = el.attributes['data-oe-type']; + if (!type || (type in specials)) { + return false; + } if (el.attributes['data-oe-original']) { while (el.children.length) { el.children[0].remove(); @@ -363,16 +392,9 @@ )); } return true; - }, - }); - editor.widgets.add('monetary', { - editables: { text: 'span.oe_currency_value' }, - draggable: false, - - upcast: function (el) { - return el.attributes['data-oe-type'] === 'monetary'; } }); + editor.widgets.add('icons', { draggable: false, @@ -383,7 +405,11 @@ }); }, upcast: function (el) { - return el.hasClass('fa'); + return el.hasClass('fa') + // ignore ir.ui.view (other data-oe-model should + // already have been matched by oeref and + // monetary? + && !el.attributes['data-oe-model']; } }); } @@ -645,6 +671,11 @@ previous = null; }, 'btn-sm'); + function is_icons_widget(element) { + var w = editor.widgets.getByElement(element); + return w && w.name === 'icons'; + } + // previous is the state of the button-trigger: it's the // currently-ish hovered element which can trigger a button showing. // -ish, because when moving to the button itself ``previous`` is @@ -654,9 +685,15 @@ // Back from edit button -> ignore if (previous && previous === this) { return; } + // hover button should appear for "editable" links and images + // (img and a nodes whose *attributes* are editable, they + // can not be "editing hosts") *or* for non-editing-host + // elements bearing an ``fa`` class. These should have been + // made into CKE widgets which are editing hosts by + // definition, so instead check if the element has been + // converted/upcasted to an fa widget var selected = new CKEDITOR.dom.element(this); - // FIXME: fa nodes may not be editable widgets (?) - if (!is_editable_node(selected) && !selected.hasClass('fa')) { + if (!(is_editable_node(selected) || is_icons_widget(selected))) { return; } diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 54ee4689814..065928df1cf 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -2,9 +2,11 @@ "use strict"; var website = {}; - // The following line can be removed in 2017 openerp.website = website; + /* ---------------------------------------------------- + Helpers + ---------------------------------------------------- */ website.get_context = function (dict) { var html = document.documentElement; return _.extend({ @@ -34,26 +36,11 @@ } return parsedSearch; }; + website.parseHash = function () { return website.parseQS(window.location.hash.substring(1)); }; - /* ----- TEMPLATE LOADING ---- */ - var templates_def = $.Deferred().resolve(); - website.add_template_file = function(template) { - templates_def = templates_def.then(function() { - var def = $.Deferred(); - openerp.qweb.add_template(template, function(err) { - if (err) { - def.reject(err); - } else { - def.resolve(); - } - }); - return def; - }); - }; - website.add_template_file('/website/static/src/xml/website.xml'); website.reload = function () { location.hash = "scrollTop=" + window.document.body.scrollTop; if (location.search.indexOf("enable_editor") > -1) { @@ -63,103 +50,9 @@ } }; - var all_ready = null; - var dom_ready = website.dom_ready = $.Deferred(); - $(document).ready(function () { - website.is_editable = website.is_editable || $('html').data('editable'); - website.is_editable_button= website.is_editable_button || $('html').data('editable'); - dom_ready.resolve(); - // fix for ie - if($.fn.placeholder) $('input, textarea').placeholder(); - }); - - website.init_kanban = function ($kanban) { - $('.js_kanban_col', $kanban).each(function () { - var $col = $(this); - var $pagination = $('.pagination', $col); - if(!$pagination.size()) { - return; - } - - var page_count = $col.data('page_count'); - var scope = $pagination.last().find("li").size()-2; - var kanban_url_col = $pagination.find("li a:first").attr("href").replace(/[0-9]+$/, ''); - - var data = { - 'domain': $col.data('domain'), - 'model': $col.data('model'), - 'template': $col.data('template'), - 'step': $col.data('step'), - 'orderby': $col.data('orderby') - }; - - $pagination.on('click', 'a', function (ev) { - ev.preventDefault(); - var $a = $(ev.target); - if($a.parent().hasClass('active')) { - return; - } - - var page = +$a.attr("href").split(",").pop().split('-')[1]; - data['page'] = page; - - $.post('/website/kanban/', data, function (col) { - $col.find("> .thumbnail").remove(); - $pagination.last().before(col); - }); - - var page_start = page - parseInt(Math.floor((scope-1)/2), 10); - if (page_start < 1 ) page_start = 1; - var page_end = page_start + (scope-1); - if (page_end > page_count ) page_end = page_count; - - if (page_end - page_start < scope) { - page_start = page_end - scope > 0 ? page_end - scope : 1; - } - - $pagination.find('li.prev a').attr("href", kanban_url_col+(page-1 > 0 ? page-1 : 1)); - $pagination.find('li.next a').attr("href", kanban_url_col+(page < page_end ? page+1 : page_end)); - for(var i=0; i < scope; i++) { - $pagination.find('li:not(.prev):not(.next):eq('+i+') a').attr("href", kanban_url_col+(page_start+i)).html(page_start+i); - } - $pagination.find('li.active').removeClass('active'); - $pagination.find('li:has(a[href="'+kanban_url_col+page+'"])').addClass('active'); - - }); - - }); - }; - - /** - * Returns a deferred resolved when the templates are loaded - * and the Widgets can be instanciated. - */ - website.ready = function() { - if (!all_ready) { - all_ready = dom_ready.then(function () { - return templates_def; - }).then(function () { - if (website.is_editable) { - website.id = $('html').data('website-id'); - website.session = new openerp.Session(); - var modules = ['website']; - return openerp._t.database.load_translations(website.session, modules, website.get_context().lang); - } - }).promise(); - } - return all_ready; - }; - - website.error = function(data, url) { - var $error = $(openerp.qweb.render('website.error_dialog', { - 'title': data.data ? data.data.arguments[0] : "", - 'message': data.data ? data.data.arguments[1] : data.statusText, - 'backend_url': url - })); - $error.appendTo("body"); - $error.modal('show'); - }; - + /* ---------------------------------------------------- + Widgets + ---------------------------------------------------- */ website.prompt = function (options) { /** * A bootstrapped version of prompt() albeit asynchronous @@ -231,11 +124,13 @@ dialog.on('click', '.btn-primary', function () { def.resolve(field.val(), field, dialog); dialog.remove(); + $('.modal-backdrop').remove(); }); }); dialog.on('hidden.bs.modal', function () { def.reject(); dialog.remove(); + $('.modal-backdrop').remove(); }); if (field.is('input[type="text"], select')) { field.keypress(function (e) { @@ -248,6 +143,16 @@ return def; }; + website.error = function(data, url) { + var $error = $(openerp.qweb.render('website.error_dialog', { + 'title': data.data ? data.data.arguments[0] : "", + 'message': data.data ? data.data.arguments[1] : data.statusText, + 'backend_url': url + })); + $error.appendTo("body"); + $error.modal('show'); + }; + website.form = function (url, method, params) { var form = document.createElement('form'); form.setAttribute('action', url); @@ -263,11 +168,117 @@ form.submit(); }; - dom_ready.then(function () { + website.init_kanban = function ($kanban) { + $('.js_kanban_col', $kanban).each(function () { + var $col = $(this); + var $pagination = $('.pagination', $col); + if(!$pagination.size()) { + return; + } - /* ----- BOOTSTRAP STUFF ---- */ - // $('.js_tooltip').bstooltip(); + var page_count = $col.data('page_count'); + var scope = $pagination.last().find("li").size()-2; + var kanban_url_col = $pagination.find("li a:first").attr("href").replace(/[0-9]+$/, ''); + var data = { + 'domain': $col.data('domain'), + 'model': $col.data('model'), + 'template': $col.data('template'), + 'step': $col.data('step'), + 'orderby': $col.data('orderby') + }; + + $pagination.on('click', 'a', function (ev) { + ev.preventDefault(); + var $a = $(ev.target); + if($a.parent().hasClass('active')) { + return; + } + + var page = +$a.attr("href").split(",").pop().split('-')[1]; + data['page'] = page; + + $.post('/website/kanban/', data, function (col) { + $col.find("> .thumbnail").remove(); + $pagination.last().before(col); + }); + + var page_start = page - parseInt(Math.floor((scope-1)/2), 10); + if (page_start < 1 ) page_start = 1; + var page_end = page_start + (scope-1); + if (page_end > page_count ) page_end = page_count; + + if (page_end - page_start < scope) { + page_start = page_end - scope > 0 ? page_end - scope : 1; + } + + $pagination.find('li.prev a').attr("href", kanban_url_col+(page-1 > 0 ? page-1 : 1)); + $pagination.find('li.next a').attr("href", kanban_url_col+(page < page_end ? page+1 : page_end)); + for(var i=0; i < scope; i++) { + $pagination.find('li:not(.prev):not(.next):eq('+i+') a').attr("href", kanban_url_col+(page_start+i)).html(page_start+i); + } + $pagination.find('li.active').removeClass('active'); + $pagination.find('li:has(a[href="'+kanban_url_col+page+'"])').addClass('active'); + + }); + + }); + }; + + /* ---------------------------------------------------- + Async Ready and Template loading + ---------------------------------------------------- */ + var templates_def = $.Deferred().resolve(); + website.add_template_file = function(template) { + templates_def = templates_def.then(function() { + var def = $.Deferred(); + openerp.qweb.add_template(template, function(err) { + if (err) { + def.reject(err); + } else { + def.resolve(); + } + }); + return def; + }); + }; + website.add_template_file('/website/static/src/xml/website.xml'); + + website.dom_ready = $.Deferred(); + $(document).ready(function () { + website.is_editable = website.is_editable || $('html').data('editable'); + website.is_editable_button= website.is_editable_button || $('html').data('editable'); + website.dom_ready.resolve(); + // fix for ie + if($.fn.placeholder) $('input, textarea').placeholder(); + }); + + var all_ready = null; + /** + * Returns a deferred resolved when the templates are loaded + * and the Widgets can be instanciated. + */ + website.ready = function() { + if (!all_ready) { + all_ready = website.dom_ready.then(function () { + return templates_def; + }).then(function () { + if (website.is_editable) { + website.id = $('html').data('website-id'); + website.session = new openerp.Session(); + var modules = ['website']; + return openerp._t.database.load_translations(website.session, modules, website.get_context().lang); + } + }).promise(); + } + return all_ready; + }; + + website.inject_tour = function() { + // if a tour is active inject tour js + } + + website.dom_ready.then(function () { /* ----- PUBLISHING STUFF ---- */ $(document).on('click', '.js_publish_management .js_publish_btn', function () { var $data = $(this).parents(".js_publish_management:first"); diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js index f1d19125a0c..56ad596d71a 100644 --- a/addons/website/static/src/js/website.snippets.animation.js +++ b/addons/website/static/src/js/website.snippets.animation.js @@ -5,20 +5,26 @@ if (!website.snippet) website.snippet = {}; website.snippet.readyAnimation = []; - website.snippet.start_animation = function () { + website.snippet.start_animation = function (editable_mode, $target) { for (var k in website.snippet.animationRegistry) { var Animation = website.snippet.animationRegistry[k]; - var selector = "[data-snippet-id='"+k+"']"; + var selector = ""; if (Animation.prototype.selector) { - selector += ", " + Animation.prototype.selector; + if (selector != "") selector += ", " + selector += Animation.prototype.selector; } + if ($target) { + if ($target.is(selector)) selector = $target; + else continue; + } + $(selector).each(function() { var $snipped_id = $(this); if ( !$snipped_id.parents("#oe_snippets").length && !$snipped_id.parent("body").length && !$snipped_id.data("snippet-view")) { website.snippet.readyAnimation.push($snipped_id); - $snipped_id.data("snippet-view", new Animation($snipped_id)); + $snipped_id.data("snippet-view", new Animation($snipped_id, editable_mode)); } }); } @@ -32,7 +38,9 @@ } }); }; - $(document).ready(website.snippet.start_animation); + $(document).ready(function () { + website.snippet.start_animation(); + }); website.snippet.animationRegistry = {}; @@ -41,9 +49,9 @@ $: function () { return this.$el.find.apply(this.$el, arguments); }, - init: function (dom) { + init: function (dom, editable_mode) { this.$el = this.$target = $(dom); - this.start(); + this.start(editable_mode); }, /* * start @@ -71,7 +79,7 @@ }); website.snippet.animationRegistry.parallax = website.snippet.Animation.extend({ - parallax: ".parallax", + selector: ".parallax", start: function () { var self = this; setTimeout(function () {self.set_values();}); @@ -108,7 +116,7 @@ img.onload = function () { var offset = 0; var padding = parseInt($(document.body).css("padding-top")); - if (speed < 1) { + if (speed > 1) { var inner_offset = - self.$target.outerHeight() + this.height / this.width * document.body.clientWidth; var outer_offset = self.$target.offset().top - (document.body.clientHeight - self.$target.outerHeight()) - padding; offset = - outer_offset * speed + inner_offset; @@ -123,4 +131,21 @@ } }); + website.snippet.animationRegistry.share = website.snippet.Animation.extend({ + selector: ".oe_share", + start: function () { + var url = encodeURIComponent(window.location.href); + var title = encodeURIComponent($("title").text()); + this.$target.find("a").each(function () { + var $a = $(this); + $a.attr("href", $(this).attr("href").replace("{url}", url).replace("{title}", title)); + if ($a.attr("target") && $a.attr("target").match(/_blank/i)) { + $a.click(function () { + window.open(this.href,'','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=550,width=600'); + return false; + }); + } + }); + }, + }); })(); diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index ee07840b12d..b8533236e01 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -18,7 +18,7 @@ }, edit: function () { var self = this; - $("body").off('click'); + $("[data-oe-model] *, [data-oe-type=html] *").off('click'); website.snippet.stop_animation(); window.snippets = this.snippets = new website.snippet.BuildingBlock(this); this.snippets.appendTo(this.$el); @@ -41,12 +41,7 @@ return this._super.apply(this, arguments); }, save: function () { - this.snippets.make_active(false); - - // FIXME: call clean_for_save on all snippets of the page, not only modified ones - // important for banner of parallax that changes data automatically. this.snippets.clean_for_save(); - remove_added_snippet_id(); this._super(); }, }); @@ -59,38 +54,14 @@ })) { return; } - hack_to_add_snippet_id() - }); - - // puts $el at the same absolute position as $target - function hack_to_add_snippet_id () { - _.each(website.snippet.selector, function (val) { - $(val[0]).each(function() { - if (!$(this).is("[data-snippet-id]") && $(this).parents("[data-oe-model]").length) { - $(this).attr("data-snippet-id", val[1]); - } - }); - }); - } - function remove_added_snippet_id () { - _.each(website.snippet.selector, function (val) { - $(val[0]).each(function() { - if ($(this).data("snippet-id") === val[1]) { - $(this).removeAttr("data-snippet-id"); - } - }); - }); - } - - $(document).ready(function() { - hack_to_add_snippet_id(); }); // 'snippet-dropped' is triggered on '#oe_snippets' whith $target as attribute when a snippet is dropped // 'snippet-activated' is triggered on '#oe_snippets' (and on snippet) when a snippet is activated if (!website.snippet) website.snippet = {}; - website.snippet.styles = {}; + website.snippet.templateOptions = {}; + website.snippet.globalSelector = ""; website.snippet.selector = []; website.snippet.BuildingBlock = openerp.Widget.extend({ template: 'website.snippets', @@ -102,7 +73,6 @@ $("
").appendTo('body'); } this.$active_snipped_id = false; - hack_to_add_snippet_id(); this.snippets = []; observer.observe(document.body, { @@ -169,17 +139,23 @@ .then(function (html) { var $html = $(html); - var $styles = $html.find("[data-snippet-style-id]"); + var selector = []; + var $styles = $html.find("[data-snippet-option-id]"); $styles.each(function () { var $style = $(this); - var style_id = $style.data('snippet-style-id'); - website.snippet.styles[style_id] = { - 'snippet-style-id' : style_id, + var style_id = $style.data('snippet-option-id'); + website.snippet.templateOptions[style_id] = { + 'snippet-option-id' : style_id, 'selector': $style.data('selector'), '$el': $style, + 'selector-siblings': $style.data('selector-siblings'), + 'selector-children': $style.data('selector-children'), + 'selector-vertical-children': $style.data('selector-vertical-children') }; + selector.push($style.data('selector')); }); $styles.addClass("hidden"); + website.snippet.globalSelector = selector.join(","); self.$snippets = $html.find(".tab-content > div > div").addClass("oe_snippet"); self.$el.append($html); @@ -204,10 +180,10 @@ 'top': pos.top - mt - 5, 'left': pos.left }); - $el.find(">.e,>.w").css({'height': $target.outerHeight() + mt + mb+1}); - $el.find(">.s").css({'top': $target.outerHeight() + mt + mb}); - $el.find(">.size").css({'top': $target.outerHeight() + mt}); - $el.find(">.s,>.n").css({'width': $target.outerWidth()-2}); + $el.find(".oe_handle.e,.oe_handle.w").css({'height': $target.outerHeight() + mt + mb+1}); + $el.find(".oe_handle.s").css({'top': $target.outerHeight() + mt + mb}); + $el.find(".oe_handle.size").css({'top': $target.outerHeight() + mt}); + $el.find(".oe_handle.s,.oe_handle.n").css({'width': $target.outerWidth()-2}); }, show: function () { this.$el.removeClass("hidden"); @@ -224,12 +200,24 @@ bind_snippet_click_editor: function () { var self = this; + var snipped_event_flag; $("#wrapwrap").on('click', function (event) { - var $target = $(event.srcElement || event.target); - if (!$target.attr("data-snippet-id")) { - $target = $target.parents("[data-snippet-id]:first"); + if (snipped_event_flag || !event.srcElement) { + return; } - if (!$target.attr("data-oe-model") && !$target.parents("[data-oe-model]:first").length) { + snipped_event_flag = true; + + setTimeout(function () {snipped_event_flag = false;}, 0); + var $target = $(event.srcElement); + + if ($target.parents(".oe_overlay").length) { + return; + } + + if (!$target.is(website.snippet.globalSelector)) { + $target = $target.parents(website.snippet.globalSelector).first(); + } + if (!self.dom_filter($target).length) { $target = false; } if (self.$active_snipped_id && self.$active_snipped_id.is($target)) { @@ -253,13 +241,16 @@ } }, clean_for_save: function () { - for (var k in this.snippets) { - if (!this.snippets.hasOwnProperty(k)) { continue; } - var editor = $(this.snippets[k]).data("snippet-editor"); + var self = this; + $(website.snippet.globalSelector).each(function () { + var $snippet = $(this); + self.make_active($snippet); + self.make_active(false); + var editor = $snippet.data("snippet-editor"); if (editor) { editor.clean_for_save(); } - } + }); }, make_active: function ($snippet) { if ($snippet && this.$active_snipped_id && this.$active_snipped_id.get(0) === $snippet.get(0)) { @@ -286,8 +277,7 @@ if (typeof $snippet.data("snippet-editor") === 'undefined') { var $targets = this.activate_overlay_zones($snippet); if (!$targets.length) return; - var editor = website.snippet.editorRegistry[$snippet.data("snippet-id")] || website.snippet.editorRegistry.resize; - $snippet.data("snippet-editor", new editor(this, $snippet)); + $snippet.data("snippet-editor", new website.snippet.Editor(this, $snippet)); } this.cover_target($snippet.data('overlay'), $snippet); }, @@ -323,36 +313,47 @@ start: function(){ self.hide(); dropped = false; + // snippet_selectors => to get selector-siblings, selector-children, selector-vertical-children $snippet = $(this); - snipped_id = $snippet.data('snippet-id'); + $toInsert = $snippet.find('.oe_snippet_body').clone(); + $toInsert.removeClass('oe_snippet_body'); + + var selector = []; + var selector_siblings = []; + var selector_children = []; + var selector_vertical_children = []; + for (var k in website.snippet.templateOptions) { + if ($toInsert.is(website.snippet.templateOptions[k].selector)) { + selector.push(website.snippet.templateOptions[k].selector); + if (website.snippet.templateOptions[k]['selector-siblings']) + selector_siblings.push(website.snippet.templateOptions[k]['selector-siblings']); + if (website.snippet.templateOptions[k]['selector-children']) + selector_children.push(website.snippet.templateOptions[k]['selector-children']); + if (website.snippet.templateOptions[k]['selector-vertical-children']) + selector_vertical_children.push(website.snippet.templateOptions[k]['selector-vertical-children']); + } + } + action = $snippet.find('.oe_snippet_body').size() ? 'insert' : 'mutate'; + if( action === 'insert'){ - if (!$snippet.data('selector-siblings') && !$snippet.data('selector-children') && !$snippet.data('selector-vertical-children')) { + if (!selector_siblings.length && !selector_children.length && !selector_vertical_children.length) { console.debug($snippet.data("snippet-id") + " have oe_snippet_body class and have not for insert action"+ "data-selector-siblings, data-selector-children or data-selector-vertical-children tag for mutate action"); return; } self.activate_insertion_zones({ - siblings: $snippet.data('selector-siblings'), - children: $snippet.data('selector-children'), - vertical_children: $snippet.data('selector-vertical-children') + siblings: selector_siblings.join(","), + children: selector_children.join(","), + vertical_children: selector_vertical_children.join(","), }); - $toInsert = $snippet.find('.oe_snippet_body').clone(); - $toInsert.removeClass('oe_snippet_body'); - $toInsert.data('src-snippet-id', snipped_id); - if (!$toInsert.data('snippet-id')) { - $toInsert.attr('data-snippet-id', snipped_id); - } else { - snipped_id = $toInsert.data('snippet-id'); - } - } else if( action === 'mutate' ){ if (!$snippet.data('selector')) { console.debug($snippet.data("snippet-id") + " have not oe_snippet_body class and have not data-selector tag"); return; } - var $targets = self.activate_overlay_zones($snippet.data('selector')); + var $targets = self.activate_overlay_zones(selector_children.join(",")); $targets.each(function(){ var $clone = $(this).data('overlay').clone(); $clone.addClass("oe_drop_zone").data('target', $(this)); @@ -387,38 +388,30 @@ } $('.oe_drop_zone').droppable('destroy').remove(); + if (dropped) { var $target = false; - if(action === 'insert'){ - $target = $toInsert; + $target = $toInsert; - website.snippet.start_animation(); + setTimeout(function () { + $("#oe_snippets").trigger('snippet-dropped', $target); + website.snippet.start_animation(true, $target); + + // drop_and_build_snippet self.create_overlay($target); if ($target.data("snippet-editor")) { $target.data("snippet-editor").drop_and_build_snippet($target); } - - $target.find("[data-snippet-id]").each(function () { - var $snippet = $(this); - var snippet_id = $snippet.data("data-snippet-id"); - self.create_overlay($snippet); - if ($snippet.data("snippet-editor")) { - $snippet.data("snippet-editor").drop_and_build_snippet($snippet); - } - }); - - } else { - $target = $(this).data('target'); - - self.create_overlay($target); - if (website.snippet.editorRegistry[snipped_id]) { - var snippet = new website.snippet.editorRegistry[snipped_id](self, $target); - snippet.drop_and_build_snippet($target); + for (var k in website.snippet.templateOptions) { + $target.find(website.snippet.templateOptions[k].selector).each(function () { + var $snippet = $(this); + self.create_overlay($snippet); + if ($snippet.data("snippet-editor")) { + $snippet.data("snippet-editor").drop_and_build_snippet($snippet); + } + }); } - } - setTimeout(function () { - $("#oe_snippets").trigger('snippet-dropped', $target); // reset snippet for rte $target.removeData("snippet-editor"); @@ -426,7 +419,7 @@ $target.data("overlay").remove(); $target.removeData("overlay"); } - $target.find("[data-snippet-id]").each(function () { + $target.find(website.snippet.globalSelector).each(function () { var $snippet = $(this); $snippet.removeData("snippet-editor"); if ($snippet.data("overlay")) { @@ -434,9 +427,9 @@ $snippet.removeData("overlay"); } }); + self.create_overlay($target); // end - self.create_overlay($target); self.make_active($target); },0); } else { @@ -554,7 +547,7 @@ // generate drop zones covering the elements selected by the selector // we generate overlay drop zones only to get an idea of where the snippet are, the drop activate_overlay_zones: function(selector){ - var $targets = this.dom_filter(selector || '[data-snippet-id]'); + var $targets = this.dom_filter(selector); var self = this; if (typeof selector !== 'string' && !$targets.length) { @@ -613,23 +606,24 @@ }); - website.snippet.styleRegistry = {}; - website.snippet.StyleEditor = openerp.Class.extend({ + website.snippet.options = {}; + website.snippet.Option = openerp.Class.extend({ // initialisation (don't overwrite) - init: function (parent, $target, snippet_id) { - this.parent = parent; + init: function (BuildingBlock, editor, $target, snippet_id) { + this.BuildingBlock = BuildingBlock; + this.editor = editor; this.$target = $target; - var styles = this.$target.data("snippet-style-ids") || {}; + var styles = this.$target.data("snippet-option-ids") || {}; styles[snippet_id] = this; - this.$target.data("snippet-style-ids", styles); + this.$target.data("snippet-option-ids", styles); this.$overlay = this.$target.data('overlay'); - this['snippet-style-id'] = snippet_id; - this.$el = website.snippet.styles[snippet_id].$el.find(">li").clone(); + this['snippet-option-id'] = snippet_id; + this.$el = website.snippet.templateOptions[snippet_id].$el.find(">li").clone(); this.required = this.$el.data("required"); this.set_active(); - this.$el.find('li[data-class] a').on('mouseover mouseout click', _.bind(this._mouse, this)); + this.$el.find('li[data-value] a').on('mouseover mouseout click', _.bind(this._mouse, this)); this.$target.on('snippet-style-reset', _.bind(this.set_active, this)); this.start(); @@ -649,9 +643,9 @@ var $prev, $next; if (event.type === 'mouseout') { $prev = $(event.currentTarget).parent(); - $next = this.$el.find("li[data-class].active"); + $next = this.$el.find("li[data-value].active"); } else { - $prev = this.$el.find("li[data-class].active"); + $prev = this.$el.find("li[data-value].active"); $next = $(event.currentTarget).parent(); } if (!$prev.length) { @@ -682,8 +676,40 @@ // start is call just after the init start: function () { }, + /* onFocus + * This method is called when the user click inside the snippet in the dom + */ + onFocus : function () { + }, + + /* onFocus + * This method is called when the user click outside the snippet in the dom, after a focus + */ + onBlur : function () { + }, + + /* on_clone + * This method is called when the snippet is cloned ($clone is allready inserted) + */ + on_clone: function ($clone) { + }, + + /* on_remove + * This method is called when the snippet is removed (dom is removing after this call) + */ + on_remove: function () { + }, + + /* + * drop_and_build_snippet + * This method is called just after that a thumbnail is drag and dropped into a drop zone + * (after the insertion of this.$body, if this.$body exists) + */ + drop_and_build_snippet: function ($target) { + }, /* select * called when a user select an item + * li must have data-value attribute * variables: np = {$next, $prev} * $next is false if they are no next item selected * $prev is false if they are no previous item selected @@ -692,10 +718,10 @@ var self = this; // add or remove html class if (np.$prev) { - this.$target.removeClass(np.$prev.data('class' || "")); + this.$target.removeClass(np.$prev.data('value' || "")); } if (np.$next) { - this.$target.addClass(np.$next.data('class') || ""); + this.$target.addClass(np.$next.data('value') || ""); } }, /* preview @@ -709,10 +735,10 @@ // add or remove html class if (np.$prev) { - this.$target.removeClass(np.$prev.data('class') || ""); + this.$target.removeClass(np.$prev.data('value') || ""); } if (np.$next) { - this.$target.addClass(np.$next.data('class') || ""); + this.$target.addClass(np.$next.data('value') || ""); } }, /* set_active @@ -722,19 +748,23 @@ set_active: function () { var self = this; this.$el.find('li').removeClass("active"); - var $active = this.$el.find('li[data-class]') + var $active = this.$el.find('li[data-value]') .filter(function () { var $li = $(this); - return ($li.data('class') && self.$target.hasClass($li.data('class'))); + return ($li.data('value') && self.$target.hasClass($li.data('value'))); }) .first() .addClass("active"); - this.$el.find('li:has(li[data-class].active)').addClass("active"); + this.$el.find('li:has(li[data-value].active)').addClass("active"); + }, + /* clean_for_save + * function called just before save vue + */ + clean_for_save: function () { } }); - - website.snippet.styleRegistry.background = website.snippet.StyleEditor.extend({ + website.snippet.options.background = website.snippet.Option.extend({ _get_bg: function () { return this.$target.css("background-image").replace(/url\(['"]*|['"]*\)|^none$/g, ""); }, @@ -744,7 +774,7 @@ start: function () { this._super(); var src = this._get_bg(); - this.$el.find("li[data-class].active.oe_custom_bg").data("src", src); + this.$el.find("li[data-value].active.oe_custom_bg").data("src", src); }, select: function(event, np) { var self = this; @@ -760,7 +790,7 @@ }); editor.on('cancel', self, function () { if (!np.$prev || np.$prev.data("src") === "") { - self.$target.removeClass(np.$next.data("class")); + self.$target.removeClass(np.$next.data("value")); self.$target.trigger("snippet-style-change", [self, np]); } }); @@ -770,7 +800,7 @@ } } else { this._set_bg(false); - this.$target.removeClass(np.$prev.data("class")); + this.$target.removeClass(np.$prev.data("value")); } }, preview: function (event, np) { @@ -783,247 +813,213 @@ var self = this; var bg = self.$target.css("background-image"); this.$el.find('li').removeClass("active"); - var $active = this.$el.find('li[data-class]') + var $active = this.$el.find('li[data-value]') .filter(function () { var $li = $(this); return ($li.data('src') && bg.indexOf($li.data('src')) >= 0) || - (!$li.data('src') && self.$target.hasClass($li.data('class'))); + (!$li.data('src') && self.$target.hasClass($li.data('value'))); }) .first(); if (!$active.length) { $active = this.$target.css("background-image") !== 'none' ? - this.$el.find('li[data-class].oe_custom_bg') : - this.$el.find('li[data-class=""]'); + this.$el.find('li[data-value].oe_custom_bg') : + this.$el.find('li[data-value=""]'); } $active.addClass("active"); - this.$el.find('li:has(li[data-class].active)').addClass("active"); + this.$el.find('li:has(li[data-value].active)').addClass("active"); } }); - - website.snippet.editorRegistry = {}; - website.snippet.Editor = openerp.Class.extend({ - init: function (parent, dom) { - this.parent = parent; - this.$target = $(dom); - this.$overlay = this.$target.data('overlay'); - this.$overlay.find('a[data-toggle="dropdown"]').dropdown(); - this.snippet_id = this.$target.data("snippet-id"); - this._readXMLData(); - this.load_style_options(); - this.get_parent_block(); - this.start(); - }, - - /* - * _readXMLData - * Read data XML and set value into: - * this.$el : - * all xml data - * this.$overlay : - * Dom hover the $target who content options - * this.$editor : - * content of .oe_snippet_options - * Displayed into the overlay options on focus - */ - _readXMLData: function() { - var self = this; - this.$el = this.parent.$snippets.filter(function () { return $(this).data("snippet-id") == self.snippet_id; }).clone(); - this.$editor = this.$el.find(".oe_snippet_options"); - var $options = this.$overlay.find(".oe_overlay_options"); - this.$editor.prependTo($options.find(".oe_options ul")); - if ($options.find(".oe_options ul li").length) { - $options.find(".oe_options").removeClass("hidden"); - } - }, - - - // activate drag and drop for the snippets in the snippet toolbar - _drag_and_drop: function(){ - var self = this; - this.dropped = false; - this.$overlay.draggable({ - greedy: true, - appendTo: 'body', - cursor: "move", - handle: ".oe_snippet_move", - cursorAt: { - left: 18, - top: 14 - }, - helper: function() { - var $clone = $(this).clone().css({width: "24px", height: "24px", border: 0}); - $clone.find(".oe_overlay_options >:not(:contains(.oe_snippet_move)), .oe_handle").remove(); - $clone.find(":not(.glyphicon)").css({position: 'absolute', top: 0, left: 0}); - $clone.appendTo("body").removeClass("hidden"); - return $clone; - }, - start: _.bind(self._drag_and_drop_start, self), - stop: _.bind(self._drag_and_drop_stop, self) + website.snippet.options.slider = website.snippet.Option.extend({ + unique_id: function () { + var id = 0; + $(".carousel").each(function () { + var cid = 1 + parseInt($(this).attr("id").replace(/[^0123456789]/g, ''),10); + if (id < cid) id = cid; }); + return "myCarousel" + id; }, - _drag_and_drop_after_insert_dropzone: function (){}, - _drag_and_drop_active_drop_zone: function ($zones){ + drop_and_build_snippet: function() { + this.id = this.unique_id(); + this.$target.attr("id", this.id); + this.$target.find("[data-slide]").attr("href", "#" + this.id); + this.$target.find("[data-slide-to]").attr("data-target", "#" + this.id); + + this.rebind_event(); + }, + on_clone: function ($clone) { + var id = this.unique_id(); + $clone.attr("id", id); + $clone.find("[data-slide]").attr("href", "#" + id); + $clone.find("[data-slide-to]").attr("data-target", "#" + id); + }, + // rebind event to active carousel on edit mode + rebind_event: function () { var self = this; - $zones.droppable({ - over: function(){ - $(".oe_drop_zone.hide").removeClass("hide"); - $(this).addClass("hide").first().after(self.$target); - self.dropped = true; - }, - out: function(){ - $(this).removeClass("hide"); - self.$target.detach(); - self.dropped = false; - }, - }); + this.$target.find('.carousel-indicators [data-slide-to]').off('click').on('click', function () { + self.$target.carousel(+$(this).data('slide-to')); }); + + this.$target.attr('contentEditable', 'false'); + this.$target.find('.oe_structure, .content>.row, [data-slide]').attr('contentEditable', 'true'); }, - _drag_and_drop_start: function (){ - var self = this; - self.parent.hide(); - self.parent.editor_busy = true; - self.size = { - width: self.$target.width(), - height: self.$target.height() - }; - self.$target.after("
-
+
Features @@ -214,7 +207,7 @@
-
+
Big Picture @@ -246,7 +239,7 @@
-
+
Three Columns @@ -335,7 +328,7 @@
-
+
Separator @@ -343,11 +336,29 @@
+ +
+
+ + Share +
+
+

+ Share + + + + + +

+
+
+
-
+
Portfolio @@ -380,7 +391,7 @@
-
+
Image Gallery @@ -422,7 +433,7 @@
-
+
Comparisons @@ -528,7 +539,7 @@
-
+
Button @@ -545,7 +556,7 @@
-
+
FAQ @@ -592,7 +603,7 @@
-
+
References @@ -609,7 +620,7 @@
-
+

Write a quote here from one of your customers. Quotes are a great way to build confidence in your products or services. @@ -618,7 +629,7 @@

-
+

OpenERP provides essential platform for our project management. Things are better organized and more visible with it. @@ -646,14 +657,7 @@

-
-
  • -
  • - Add Slide -
  • -
  • - Remove Slide -
  • +
    Quotes Slider @@ -706,7 +710,7 @@
    -
    +
    Feature Grid @@ -766,22 +770,11 @@
    -
    +
    Parallax
    -
    @@ -789,16 +782,16 @@
    -
    +
    Parallax Slider
    -
    - + + + + diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 580957b81d6..4b4cca1a19a 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -364,7 +364,7 @@
  • - Edit
  • diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index e76e793dfda..3470e2e383b 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -65,7 +65,7 @@ popover: { fixed: true }, }, { - snippet: 'image-text', + snippet: '#snippet_structure .oe_snippet:eq(2)', placement: 'bottom', title: _t("Drag & Drop a Block"), content: _t("Drag this block and drop it in your page."), @@ -79,7 +79,7 @@ popover: { fixed: true }, }, { - snippet: 'text-block', + snippet: '#snippet_structure .oe_snippet:eq(4)', placement: 'bottom', title: _t("Drag & Drop a block"), content: _t("Drag this block and drop it below the image block."), diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml index 203dcc3bb71..179b1b49ff0 100644 --- a/addons/website_blog/views/website_blog_templates.xml +++ b/addons/website_blog/views/website_blog_templates.xml @@ -155,7 +155,19 @@