Skip to content

Commit

Permalink
[webui] Refactor search controller and view
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel authored and coolo committed Dec 17, 2012
1 parent 02ad974 commit 7238dc7
Show file tree
Hide file tree
Showing 9 changed files with 287 additions and 241 deletions.
1 change: 1 addition & 0 deletions src/webui/app/assets/stylesheets/application.scss
Expand Up @@ -19,6 +19,7 @@
@import "monitor";
@import "package";
@import "project";
@import "search";
@import "jquery.tooltip";
@import "codemirror";
@import "codemirror/modes/diff";
Expand Down
35 changes: 35 additions & 0 deletions src/webui/app/assets/stylesheets/search.css.scss
@@ -0,0 +1,35 @@
#search_form {
width: 600px;
margin-left: auto ;
margin-right: auto ;
}

/* Style the search input field. */
#search_input {
float:left;
width:500px;
height:27px;
line-height:27px;
text-indent:10px;
font-family:arial, sans-serif;
font-size:1em;
color:#333;
background: #fff;
border:solid 1px #d9d9d9;
border-top:solid 1px #c0c0c0;
border-right:none;
}

#search_button {
cursor:pointer;
width:70px;
height: 33px;
line-height: 33px;
color: transparent;
background: image-url("system-search.png") no-repeat center #690;
border: 1px solid #D9D9D9;
border-top:solid 1px #c0c0c0;
border-left:none;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
}
3 changes: 2 additions & 1 deletion src/webui/app/controllers/application_controller.rb
Expand Up @@ -284,7 +284,8 @@ def validate_xhtml
xmlbody.gsub!(%r{ autocomplete=\"[^\"]*\"}, ' ')
xmlbody.gsub!(%r{ placeholder=\"[^\"]*\"}, ' ')
xmlbody.gsub!('<!DOCTYPE html>', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">')
xmlbody.gsub!('<html>', '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">')
xmlbody.gsub!('<html>', '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">')
xmlbody.gsub!(%r{ placeholder=\"[^\"]*\"}, ' ')

begin
document = Nokogiri::XML::Document.parse(xmlbody, nil, nil, Nokogiri::XML::ParseOptions::STRICT)
Expand Down

0 comments on commit 7238dc7

Please sign in to comment.