Removing footer data from Server - centos

I have installed OpenERP in Server and i am not able to remove "Powered By OpenERP" which is present in Footer. I tried many methods like i changed the file content, replaced the file, gave permission to the file. But the data which we are giving is not taking. But if i try in localhost it works fine.
This CSS is taking in local, but not taking in server.
.openerp .oe_footer a span {
color: #c81010;
display:none;
}

I'm using 7.0. This Powered by OpenerERP comes from the this file
7.0-web => addons => web => static => src => xml => base.xml
Now Search this tag <div class="oe_secondary_menus_container"/>.
Comment below the code.
<!--div class="oe_footer">
Powered by <a href="http://www.openerp.com" target="_blank">
<span>OpenERP</span></a>
</div-->
Hope this will help you.

Setting -> Technical -> User Interface -> Views
Search : "menu_secondary"
you fine : web.menu_secondary, click to edit,
You can remove or edit "oe_footer" class and save:
<div class="oe_footer">
Powered by <span>Odoo</span>
</div>

Related

How to use onclick method inside AEM component

Am having a AEM6 html component, am getting the values from dialog and using it inside the component via the .js file and using the return properties.
I could able to get the authored values but it is getting null or empty when am using it inside the onclick method. Please find below the code snippet below.
<div data-sly-unwrap data-sly-use.test="test.js"></div>
<a href="#" class="${test.testId}" id="${test.testId}" onClick="toggleDraw('${test.testId}')" >
The content I authored is getting displayed in class and Id, but it is not displaying in the onClick method.
Below is the Output am getting after authoring.
<a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('')" >
Output I needed is :
<a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('get-a-quote')" >
This should do the trick:
<a data-sly-test.variable123="toggleDraw('${test.testId}')" href="#" class="${test.testId}" id="${test.testId}" onclick="${variable123 # context='attribute'}" >
You need to put the function call in a variable because of the nested single quotes. And you need to manually set the context in this case. If "attribute" does some escaping you do not like, you could use "unsafe" - this will end in all escaping mechanisms being disabled. That might or might not be a security issue for your application.
HTH

Need help to click Watir Web driver button

I have the HTML as
<li>
<div data-track="discovered_spots" data-filter="discovered_spots" class="button filter-button">
<span class="icon-compass"></span>
Discoveries (2)
</div>
</li>
I am trying to click the button link
#browser.div(:class =>'button filter-button').span(:text => ' Discoveries (2) ').click
Just not working or producing any errors.
I have also tried using the xpath
##browser.div(:xapth => "//div[#data-track='discovered_spots']").click
##browser.div(:text => "Discoveries").click
but that produce errors.
I have also viewed and tried the code present in other questions chains but none worked any help will be very useful.
Try:
#browser.div(:text, /Discoveries/).click
Regex for the attribute should hit the text. Not specifying \d anchor will cast a wider net in case that value of 2 fluctuates by only looking for the match of Discoveries in text and ignoring the number and parentheses.

rendering description saved using tinymce editor

I have a problem with pagination.
In my website , I have a function productList which generates a paginated list of products.
The code for the paginate function is shown below:
$this->paginate = array('conditions'=>array($otherconditions,$statuscondition,$active_condition,$catcondition),'order' => $order, 'limit' => 10);
In the view file,
the paginator helper is used as follows:
<div class="paginator">
<span class="info">
<?php echo $this->Paginator->counter(array('format' => __('Page <strong>{:page}</strong> of <strong>{:pages}</strong>')), array('escape'=>false));
?>
</span>
<ul>
<?php echo $this->Paginator->numbers(array('separator' => '', 'tag'=>'li'));?>
</ul>
</div>
Suppose, there are 150 products, so with a limit of 10, there will be 15 pages.
The problem is that the page numbers are not displayed in the end pages like page 15 i.e when I click on the page number 15, the products are displayed but the paginator counter and paginator number links are not displayed.
I have looked all over the net for a solution but could not find one. Please guide me.
PS: the paginate variable depends on my parameters like the category selected , and other conditions.
I dont think its a problem with the paginate syntax because the pagination works for small number of pages like 2 or 3.
The problem is with paginator helper I think.
Thanks in advance.
I have found the following line when I inspected the HTML. the page number and counter where commented automatically inside the following comments.
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
< ...</p></div>
then after this I have the html for the page counter , page number links and also the script files. what is happening. I looked for its meaning and I found that mso 9 is microsoft office 9 or something. Which is not very reasonable. please guid me.
I solved this by putting a comment before the closing p tag and div tag.
So the comment tag <!--[if gte mso 9] > closes before </p></div>.
I also used the php function strip_tags to strip the body of text of all tags.
This is a duct tape method. But the problem I found lies in the mce editor.When a user copy pastes a paragraph from a word document to a mce editor thats running in firefox browser, the above mentioned conditional comment is added to the text. So, when displaying the user text, the conditional comment comments out rest of the html after the text.
IT is better to work with the mce editor callback to remove the conditional comment which i will be working on now.
Hope this helps someone...

Can't target iframe with watir-webdriver - Bug?

I am pretty new to automation and watir-webdriver so forgive me if I don't sound super techy.
I am trying to log in to a website and the login form is inside of an iframe. There is also another iframe on the same page that contains an image.
This is the html:
<body>
<div class="topbar">
<div class="topbarcenter">
<ul>
<li id="logo" class="logo">
<div id="provider_logo">
<iframe id="logo_iframe" width="192px" height="128px" frameborder="0" src="http://social.onerecovery.com/modules/iframes/html/provider_logo.html?prov=microsites" onload="this.style.visibility = "visible";" style="visibility: visible;" allowtransparency="true">
</div>
</li>
<li class="login">
<iframe id="login_iframe" width="550px" height="70px" frameborder="0" src="http://social.onerecovery.com/modules/iframes/html/login.html" onload="this.style.visibility = "visible";" style="visibility: visible;" allowtransparency="true">
<html>
<head>
<body>
<div class="login_container">
<div id="login_div">
<form class="login_form" action="#" method="post">
<input type="text" maxlength="100" placeholder="Email Address..." class="email_input processed" name="email">
by the way I am using watir-webdriver 0.3.5 and automating on chrome 17
what I tried was:
$b.frame(:id => "login_iframe").form(:class => "login_form").text_field(:name => "email").set("username")
which I thought would work but in my command line I just get the error: Watir::Exception::UnknownObjectException: unable to locate element, using {:class=>"login_form", :tag_name=>"form"}
I also tried indexing the iframe to make sure I was in the second iframe and not the first but it still didn't work.
When I do
$b.frame(:id => "login_iframe").exists? in command line, I get
true
but when I do
$b.frame(:id => "login_iframe").form(:class => "login_form").exists? in command line, I get
false
The thing is that we have another page that someone can use to login to the same website and the only difference between that page and this page is that this page has a second iframe whereas the other page only has the login iframe and the code
$b.frame(:id => "login_iframe").form(:class => "login_form").text_field(:name => "email").set("username")
works perfectly fine.
Sorry for going on so long. Just wanted to make sure that I gave enough info. Thanks in advance for any help.
The short answer to solving your problem is to use browser.frame(:index => 2) instead of browser.frame(:id => "login_iframe").
Or if you want a slightly more robust solution:
frame = browser.frames.find{ |frame| frame.form(:class => "login_form").exists? }
frame.form(:class => "login_form").text_field(:name => "email").set("username")
That said, I really do not know why that works. It is like it thinks the login control is inside the invite_iframe, which it does not look like in the HTML. I will try to dig deeper, but sounds like a bug to me.
It appears that all of the iframes are shuffled funny. As you can see by the following, the number of text fields in each iframe does not match what is expected.
browser.frames.each{ |x| puts x.id + ' - ' + x.text_fields.length.to_s + ' text_fields' }
#=> logo_iframe - 3 text_fields
#=> login_iframe - 0 text_fields
#=> invite_iframe - 2 text_fields
For the latest versions, it is browser.iframes which lists all the iframes current window has.
browser.iframes.map {|iframe| iframe.src}
This will map src attributes of all iframes.

Overwriting the class on a `Html.EditorFor`

by the default with
<%: Html.EditorFor(m => m.ConfirmationHeadline) %>
the output is:
<input type="text" value=""
name="ConfirmationHeadline" id="ConfirmationHeadline"
class="text-box single-line">
As you can see, the input appends already a class attribute. Well, this should not be a problem, just use
<%: Html.EditorFor(m => m.ConfirmationHeadline, new { #class="span-11 last"}) %>
and should work... err... nope!
this will output the exact same code!
though, works fine with Html.TextAreaFor()
How can I remove the class text-box single-line from ever appear so my own classes could be appended? any T4 template I should edited?
Thank you for all the help.
There is no way to customize the value of the emitted class attribute when using built-in editor templates via the EditorFor method. It hard-codes the class value (more info available here: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-3-default-templates.html)
You have two options:
Write your own custom template that supports the extra functionality. Have a look here for more details: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-4-custom-object-templates.html
Process the output of the EditorFor method:
<%: new HtmlString(Html.EditorFor(m=>m.ConfirmationHeadline).ToString()
.Replace("class=\"text-box single-line\"",
"class=\"text-box single-line span-11 last\"")) %>
In MCV 5.1 you can take advantage of htmlAttributes. Works like a charm...
#Html.EditorFor(model => model.Name, new { htmlAttributes = new { #class = "form-control", placeholder = "Enter your Name" } })
asp.net mvc creates a file called site.css in the content folder. There you can see that the text-box class is set to a width of 30em by default. Reset it to something saner like 15em. The single-line class doesn't appear to be defined anywhere.
You can use TextBoxFor instead
I had this same problem and didn't like any of the solutions above. I also found a similar post here, but I didn't like those solutions either. After some tooling around, I found something I liked, which let me continue to use the Editor Templates (which is something you should try to take advantage of whenever you can). I posted the solution here
try this code
#Html.Raw(
Html.EditorFor(m => m.DataInicial).ToString()
.Replace(
"\"text-box single-line\"",
"\"form-control text-box single-line\""))