redcar-dev 0.12.12dev-java → 0.12.13dev-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/redcar.rb +1 -1
- data/lib/tasks/app-bundle.rake +63 -0
- data/plugins/application/lib/application.rb +3 -0
- data/plugins/project_search/lib/project_search/commands.rb +5 -4
- data/plugins/project_search/lib/project_search/images/spinner.gif +0 -0
- data/plugins/project_search/lib/project_search/lucene_index.rb +1 -1
- data/plugins/project_search/lib/project_search/stylesheets/style.css +105 -37
- data/plugins/project_search/lib/project_search/views/_file.html.erb +4 -3
- data/plugins/project_search/lib/project_search/views/index.html.erb +42 -16
- data/plugins/project_search/lib/project_search/word_search.rb +23 -14
- data/plugins/project_search/lib/project_search/word_search_controller.rb +40 -29
- metadata +3 -22
- data/plugins/javascript/features/fixtures/test.js +0 -0
- data/plugins/javascript/features/fixtures/test2.js +0 -5
- data/plugins/javascript/features/step_definitions/javascript_steps.rb +0 -16
- data/plugins/javascript/features/support/env.rb +0 -18
- data/plugins/javascript/features/syntax_check_javascript.feature +0 -70
- data/plugins/javascript/lib/syntax_check/javascript.rb +0 -58
- data/plugins/javascript/plugin.rb +0 -7
- data/plugins/javascript/vendor/jslint.js +0 -539
- data/plugins/mirah/README +0 -7
- data/plugins/mirah/features/fixtures/test.mirah +0 -2
- data/plugins/mirah/features/syntax_check_mirah.feature +0 -46
- data/plugins/mirah/lib/mirah.rb +0 -43
- data/plugins/mirah/lib/mirah/my_error_handler.rb +0 -22
- data/plugins/mirah/lib/mirah/repl_mirror.rb +0 -50
- data/plugins/mirah/lib/mirah/syntax_checker.rb +0 -38
- data/plugins/mirah/plugin.rb +0 -8
- data/plugins/mirah/spec/mirah/repl_mirror_spec.rb +0 -188
- data/plugins/mirah/spec/spec_helper.rb +0 -5
- data/plugins/mirah/vendor/mirah-parser.jar +0 -0
- data/plugins/project_search/TODO.md +0 -11
    
        data/Rakefile
    CHANGED
    
    | @@ -8,7 +8,7 @@ require 'spec/rake/spectask' | |
| 8 8 | 
             
            require 'cucumber/rake/task'
         | 
| 9 9 | 
             
            require "rake/gempackagetask"
         | 
| 10 10 | 
             
            require "rake/rdoctask"
         | 
| 11 | 
            -
            Dir[File.expand_path("../tasks/*.rake", __FILE__)].each { |f| load f }
         | 
| 11 | 
            +
            Dir[File.expand_path("../lib/tasks/*.rake", __FILE__)].each { |f| load f }
         | 
| 12 12 |  | 
| 13 13 | 
             
            if RUBY_PLATFORM =~ /mswin|mingw/
         | 
| 14 14 | 
             
              begin
         | 
    
        data/lib/redcar.rb
    CHANGED
    
    
| @@ -0,0 +1,63 @@ | |
| 1 | 
            +
            desc "Build a MacOS X App bundle"
         | 
| 2 | 
            +
            task :app_bundle do
         | 
| 3 | 
            +
              require 'erb'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              redcar_icon = "redcar-icon-beta.png"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              bundle_contents = File.join("pkg", "Redcar.app", "Contents")
         | 
| 8 | 
            +
              FileUtils.rm_rf bundle_contents if File.exist? bundle_contents
         | 
| 9 | 
            +
              macos_dir = File.join(bundle_contents, "MacOS")
         | 
| 10 | 
            +
              resources_dir = File.join(bundle_contents, "Resources")
         | 
| 11 | 
            +
              FileUtils.mkdir_p macos_dir
         | 
| 12 | 
            +
              FileUtils.mkdir_p resources_dir
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              info_plist_template = ERB.new <<-PLIST
         | 
| 15 | 
            +
            <?xml version="1.0" encoding="UTF-8"?>
         | 
| 16 | 
            +
            <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
         | 
| 17 | 
            +
            <plist version="1.0">
         | 
| 18 | 
            +
            <dict>
         | 
| 19 | 
            +
            	<key>CFBundleExecutable</key>
         | 
| 20 | 
            +
            	<string>redcar</string>
         | 
| 21 | 
            +
            	<key>CFBundleIconFile</key>
         | 
| 22 | 
            +
            	<string><%= redcar_icon %></string>
         | 
| 23 | 
            +
            	<key>CFBundleIdentifier</key>
         | 
| 24 | 
            +
            	<string>com.redcareditor.Redcar</string>
         | 
| 25 | 
            +
            	<key>CFBundleInfoDictionaryVersion</key>
         | 
| 26 | 
            +
            	<string>6.0</string>
         | 
| 27 | 
            +
            	<key>CFBundlePackageType</key>
         | 
| 28 | 
            +
            	<string>APPL</string>
         | 
| 29 | 
            +
            	<key>CFBundleSignature</key>
         | 
| 30 | 
            +
            	<string>????</string>
         | 
| 31 | 
            +
            	<key>CFBundleVersion</key>
         | 
| 32 | 
            +
            	<string><%= Spec.version %></string>
         | 
| 33 | 
            +
            	<key>LSMinimumSystemVersion</key>
         | 
| 34 | 
            +
            	<string>10.5</string>
         | 
| 35 | 
            +
            </dict>
         | 
| 36 | 
            +
            </plist>
         | 
| 37 | 
            +
              PLIST
         | 
| 38 | 
            +
              File.open(File.join(bundle_contents, "Info.plist"), "w") do |f|
         | 
| 39 | 
            +
                f << info_plist_template.result(binding)
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              File.open(File.join(macos_dir, "redcar"), "w") do |f|
         | 
| 43 | 
            +
                f << '#!/bin/sh
         | 
| 44 | 
            +
                      MACOS=$(cd "$(dirname "$0")"; pwd)
         | 
| 45 | 
            +
                      RESOURCES="$(cd "${MACOS}/../Resources/"; pwd)"
         | 
| 46 | 
            +
                      BIN="${RESOURCES}/bin/redcar"
         | 
| 47 | 
            +
                      JRUBY="${RESOURCES}/.redcar/assets/jruby-complete-*.jar"
         | 
| 48 | 
            +
                      java -cp $JRUBY -Djruby.fork.enabled=true org.jruby.Main "$BIN" --home-dir="${RESOURCES}" --ignore-stdin $@'
         | 
| 49 | 
            +
              end
         | 
| 50 | 
            +
              File.chmod 0777, File.join(macos_dir, "redcar")
         | 
| 51 | 
            +
             | 
| 52 | 
            +
              Spec.files.each do |f|
         | 
| 53 | 
            +
                unless File.directory?(f)
         | 
| 54 | 
            +
                  FileUtils.mkdir_p File.join(resources_dir, File.dirname(f))
         | 
| 55 | 
            +
                  FileUtils.cp f, File.join(resources_dir, f)
         | 
| 56 | 
            +
                end
         | 
| 57 | 
            +
              end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
              FileUtils.cp_r File.join(resources_dir, "share", "icons", redcar_icon), resources_dir
         | 
| 60 | 
            +
             | 
| 61 | 
            +
              puts(install_cmd = "#{File.expand_path("../../bin/redcar", __FILE__)} --home-dir=#{resources_dir} install")
         | 
| 62 | 
            +
              system(install_cmd)
         | 
| 63 | 
            +
            end
         | 
| @@ -2,7 +2,7 @@ | |
| 2 2 | 
             
            class ProjectSearch
         | 
| 3 3 | 
             
              class RefreshIndex < Redcar::Command
         | 
| 4 4 | 
             
                sensitize :open_project
         | 
| 5 | 
            -
             | 
| 5 | 
            +
             | 
| 6 6 | 
             
                def execute
         | 
| 7 7 | 
             
                  if project = Redcar::Project::Manager.focussed_project
         | 
| 8 8 | 
             
                    if index = ProjectSearch.indexes[project.path]
         | 
| @@ -12,17 +12,17 @@ class ProjectSearch | |
| 12 12 | 
             
                  end
         | 
| 13 13 | 
             
                end
         | 
| 14 14 | 
             
              end
         | 
| 15 | 
            -
             | 
| 15 | 
            +
             | 
| 16 16 | 
             
              class WordSearchCommand < Redcar::Command
         | 
| 17 17 | 
             
                sensitize :open_project
         | 
| 18 | 
            -
             | 
| 18 | 
            +
             | 
| 19 19 | 
             
                def find_open_instance
         | 
| 20 20 | 
             
                  all_tabs = Redcar.app.focussed_window.notebooks.map { |nb| nb.tabs }.flatten
         | 
| 21 21 | 
             
                  all_tabs.find do |t|
         | 
| 22 22 | 
             
                    t.is_a?(Redcar::HtmlTab) && t.title == ProjectSearch::WordSearchController::TITLE
         | 
| 23 23 | 
             
                  end
         | 
| 24 24 | 
             
                end
         | 
| 25 | 
            -
             | 
| 25 | 
            +
             | 
| 26 26 | 
             
                def execute
         | 
| 27 27 | 
             
                  if project = Redcar::Project::Manager.focussed_project
         | 
| 28 28 | 
             
                    if tab = find_open_instance
         | 
| @@ -33,6 +33,7 @@ class ProjectSearch | |
| 33 33 | 
             
                      if index and index.has_content?
         | 
| 34 34 | 
             
                        tab = win.new_tab(Redcar::HtmlTab)
         | 
| 35 35 | 
             
                        tab.html_view.controller = ProjectSearch::WordSearchController.new
         | 
| 36 | 
            +
                        tab.icon = :blue_folder_search_result
         | 
| 36 37 | 
             
                        tab.focus
         | 
| 37 38 | 
             
                      else
         | 
| 38 39 | 
             
                        Redcar::Application::Dialog.message_box("Your project is still being indexed.", :type => :error)
         | 
| Binary file | 
| @@ -60,7 +60,7 @@ class ProjectSearch | |
| 60 60 | 
             
                          pre_contents = File.new(fn).read(200)
         | 
| 61 61 | 
             
                          unless !pre_contents or BinaryDataDetector.binary?(pre_contents)
         | 
| 62 62 | 
             
                            contents = File.read(fn)
         | 
| 63 | 
            -
                            adjusted_contents = contents | 
| 63 | 
            +
                            adjusted_contents = contents
         | 
| 64 64 | 
             
                            @lucene_index << { :id => fn, :contents => adjusted_contents }
         | 
| 65 65 | 
             
                          end
         | 
| 66 66 | 
             
                        rescue => e
         | 
| @@ -2,19 +2,26 @@ | |
| 2 2 | 
             
              margin: 0;
         | 
| 3 3 | 
             
              padding: 0;
         | 
| 4 4 | 
             
              font-weight: normal;
         | 
| 5 | 
            +
              font-family: Helvetica Neue, Sawasdee, sans-serif;
         | 
| 6 | 
            +
            }
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            body {
         | 
| 9 | 
            +
              background-color:#ddd;
         | 
| 5 10 | 
             
              font-size: 14px;
         | 
| 6 | 
            -
              font-family: sans-serif;
         | 
| 7 11 | 
             
            }
         | 
| 8 12 |  | 
| 9 13 | 
             
            #search_form_container {
         | 
| 10 14 | 
             
              background-color: #eee;
         | 
| 11 15 | 
             
              width: 100%;
         | 
| 12 | 
            -
              margin: -8px 0px 20px - | 
| 13 | 
            -
              padding: 16px  | 
| 16 | 
            +
              margin: -8px 0px 20px -40px;
         | 
| 17 | 
            +
              padding: 16px 40px 10px 0;
         | 
| 14 18 | 
             
              border-bottom: 2px solid #ddd;
         | 
| 15 19 | 
             
              position: fixed;
         | 
| 16 20 | 
             
              top: 0;
         | 
| 17 21 | 
             
              left: 0;
         | 
| 22 | 
            +
              -webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.5);
         | 
| 23 | 
            +
              -moz-box-shadow: 0px 0px 10px rgba(0,0,0,.5);
         | 
| 24 | 
            +
              box-shadow: 0px 0px 10px rgba(0,0,0,.5);
         | 
| 18 25 | 
             
            }
         | 
| 19 26 |  | 
| 20 27 | 
             
            #search_form_container table {
         | 
| @@ -32,28 +39,40 @@ | |
| 32 39 | 
             
              text-align: right;
         | 
| 33 40 | 
             
            }
         | 
| 34 41 |  | 
| 35 | 
            -
            #search_form_container .input .field  | 
| 42 | 
            +
            #search_form_container .input .field #query {
         | 
| 36 43 | 
             
              width: 100%;
         | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 44 | 
            +
            }
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            #search_form_container .input .field input {
         | 
| 47 | 
            +
              height: 25px;
         | 
| 39 48 | 
             
            }
         | 
| 40 49 |  | 
| 41 50 | 
             
            #search_form_container .input .expand {
         | 
| 42 | 
            -
              width:  | 
| 51 | 
            +
              width: 100px;
         | 
| 43 52 | 
             
              padding: 3px 0px;
         | 
| 44 53 | 
             
            }
         | 
| 45 54 |  | 
| 55 | 
            +
            #search_form_container .input .expand #search {
         | 
| 56 | 
            +
              width: 60px;
         | 
| 57 | 
            +
              padding:0 4px;
         | 
| 58 | 
            +
              font-size:11px;
         | 
| 59 | 
            +
            }
         | 
| 60 | 
            +
             | 
| 46 61 | 
             
            #search_form_container .input .expand a {
         | 
| 47 | 
            -
              color:  | 
| 48 | 
            -
              font-weight: bold;
         | 
| 62 | 
            +
              background-color: #bcbcbc;
         | 
| 49 63 | 
             
              text-decoration: none;
         | 
| 50 64 | 
             
              display: block;
         | 
| 51 65 | 
             
              width: 20px;
         | 
| 52 | 
            -
              height:  | 
| 53 | 
            -
               | 
| 54 | 
            -
              border: 1px solid # | 
| 66 | 
            +
              height: 20px;
         | 
| 67 | 
            +
              color: #d0d0d0;
         | 
| 68 | 
            +
              border: 1px solid #b0b0b0;
         | 
| 69 | 
            +
              font-size:12px;
         | 
| 55 70 | 
             
              text-align: center;
         | 
| 56 | 
            -
               | 
| 71 | 
            +
              margin-top:1px;
         | 
| 72 | 
            +
              margin-left:-3px;
         | 
| 73 | 
            +
              z-index:9999;
         | 
| 74 | 
            +
              -moz-border-radius-topright:4px;
         | 
| 75 | 
            +
              -moz-border-radius-bottomright:4px;
         | 
| 57 76 | 
             
            }
         | 
| 58 77 |  | 
| 59 78 | 
             
            #search_form_container .controls label {
         | 
| @@ -70,18 +89,30 @@ | |
| 70 89 | 
             
              margin-right: 7px;
         | 
| 71 90 | 
             
            }
         | 
| 72 91 |  | 
| 92 | 
            +
            #search_copy {
         | 
| 93 | 
            +
              font-size:80%;
         | 
| 94 | 
            +
              display:block;
         | 
| 95 | 
            +
            }
         | 
| 96 | 
            +
             | 
| 97 | 
            +
            #search {
         | 
| 98 | 
            +
              float:right;
         | 
| 99 | 
            +
              width:20%;
         | 
| 100 | 
            +
            }
         | 
| 101 | 
            +
             | 
| 73 102 | 
             
            #recent_queries {
         | 
| 74 103 | 
             
              position: absolute;
         | 
| 75 | 
            -
              top:  | 
| 104 | 
            +
              top: 45px;
         | 
| 76 105 | 
             
              left: 124px;
         | 
| 77 | 
            -
              right:  | 
| 78 | 
            -
              border: 1px solid # | 
| 106 | 
            +
              right: 122px;
         | 
| 107 | 
            +
              border: 1px solid #acacac;
         | 
| 79 108 | 
             
              background-color: #fff;
         | 
| 109 | 
            +
              box-shadow:2px 3px 5px #bbb;
         | 
| 110 | 
            +
              -moz-box-shadow:2px 3px 5px #ccc;
         | 
| 80 111 | 
             
            }
         | 
| 81 112 |  | 
| 82 113 | 
             
            #recent_queries ul {
         | 
| 83 114 | 
             
              list-style: none;
         | 
| 84 | 
            -
              height:  | 
| 115 | 
            +
              height: 120px;
         | 
| 85 116 | 
             
              overflow: auto;
         | 
| 86 117 | 
             
            }
         | 
| 87 118 |  | 
| @@ -95,7 +126,7 @@ | |
| 95 126 | 
             
            }
         | 
| 96 127 |  | 
| 97 128 | 
             
            #results_container {
         | 
| 98 | 
            -
              margin-top:  | 
| 129 | 
            +
              margin-top: 120px;
         | 
| 99 130 | 
             
              margin-bottom: 25px;
         | 
| 100 131 | 
             
            }
         | 
| 101 132 |  | 
| @@ -107,7 +138,7 @@ | |
| 107 138 | 
             
            }
         | 
| 108 139 |  | 
| 109 140 | 
             
            #results {
         | 
| 110 | 
            -
              padding: 0 10px 10px 10px | 
| 141 | 
            +
            /*  padding: 0 10px 10px 10px;*/
         | 
| 111 142 | 
             
            }
         | 
| 112 143 |  | 
| 113 144 | 
             
            #results table {
         | 
| @@ -121,10 +152,11 @@ | |
| 121 152 | 
             
            #results .line_num {
         | 
| 122 153 | 
             
              background-color: #eee;
         | 
| 123 154 | 
             
              padding: 3px 10px;
         | 
| 155 | 
            +
              border-right:1px solid #ddd;
         | 
| 124 156 | 
             
            }
         | 
| 125 157 |  | 
| 126 158 | 
             
            #results .even {
         | 
| 127 | 
            -
              background-color: # | 
| 159 | 
            +
              background-color: #F9F9F9;
         | 
| 128 160 | 
             
            }
         | 
| 129 161 |  | 
| 130 162 | 
             
            #results .odd {
         | 
| @@ -132,9 +164,11 @@ | |
| 132 164 | 
             
            }
         | 
| 133 165 |  | 
| 134 166 | 
             
            #results .file_heading {
         | 
| 135 | 
            -
              background-color: # | 
| 136 | 
            -
              padding: 4px;
         | 
| 167 | 
            +
            /*  background-color: #ccc;*/
         | 
| 168 | 
            +
              padding: 4px 4px 4px 12px;
         | 
| 137 169 | 
             
              font-weight: bold;
         | 
| 170 | 
            +
              font-family:Helvetica Neue, Sawasdee, sans-serif;
         | 
| 171 | 
            +
              border-bottom: 1px dotted #aaa;
         | 
| 138 172 | 
             
            }
         | 
| 139 173 |  | 
| 140 174 | 
             
            #results .file_heading img {
         | 
| @@ -144,7 +178,6 @@ | |
| 144 178 |  | 
| 145 179 | 
             
            #results .file_heading a {
         | 
| 146 180 | 
             
              font-weight: bold;
         | 
| 147 | 
            -
              font-family: sans-serif;
         | 
| 148 181 | 
             
            }
         | 
| 149 182 |  | 
| 150 183 | 
             
            #results .line_num {
         | 
| @@ -152,38 +185,39 @@ | |
| 152 185 | 
             
              padding: 0 5px;
         | 
| 153 186 | 
             
              min-width: 20px;
         | 
| 154 187 | 
             
              cursor: hand;
         | 
| 155 | 
            -
              font-size: 12px;
         | 
| 156 | 
            -
              line-height: 12px;
         | 
| 157 | 
            -
              font-family: sans-serif;
         | 
| 158 188 | 
             
            }
         | 
| 159 189 |  | 
| 160 190 | 
             
            #results .divider .line_num {
         | 
| 161 191 | 
             
              cursor: default;
         | 
| 162 192 | 
             
              text-align: center;
         | 
| 163 | 
            -
              background-color: # | 
| 193 | 
            +
            /*  background-color: #ddd;*/
         | 
| 194 | 
            +
             | 
| 164 195 | 
             
              color: #555;
         | 
| 165 196 | 
             
            }
         | 
| 166 197 |  | 
| 167 198 | 
             
            #results .text {
         | 
| 168 199 | 
             
              padding: 3px 10px;
         | 
| 169 200 | 
             
              width: 100%;
         | 
| 170 | 
            -
              cursor:  | 
| 171 | 
            -
            }
         | 
| 172 | 
            -
             | 
| 173 | 
            -
            #results .text pre {
         | 
| 174 | 
            -
              font-size: 14px;
         | 
| 175 | 
            -
              line-height: 17px;
         | 
| 176 | 
            -
              font-family: monospace;
         | 
| 201 | 
            +
              cursor: pointer;
         | 
| 177 202 | 
             
            }
         | 
| 178 203 |  | 
| 179 204 | 
             
            #results .divider .text {
         | 
| 180 205 | 
             
              cursor: default;
         | 
| 206 | 
            +
              -moz-box-shadow:1px 1px 3px #bbb inset;
         | 
| 181 207 | 
             
            }
         | 
| 182 208 |  | 
| 183 209 | 
             
            #results .text pre span {
         | 
| 184 | 
            -
              background-color: # | 
| 210 | 
            +
              background-color: #fff319;
         | 
| 211 | 
            +
              border:1px solid #efda17;
         | 
| 185 212 | 
             
              font-weight: bold;
         | 
| 186 | 
            -
               | 
| 213 | 
            +
              box-shadow:1px 1px 1px #c49e28;
         | 
| 214 | 
            +
              -moz-box-shadow:1px 1px 1px #c49e28;
         | 
| 215 | 
            +
              border-radius:3px;
         | 
| 216 | 
            +
              -moz-border-radius:3px;
         | 
| 217 | 
            +
            }
         | 
| 218 | 
            +
             | 
| 219 | 
            +
            #results .text pre span:hover {
         | 
| 220 | 
            +
              padding: 1px 0;
         | 
| 187 221 | 
             
            }
         | 
| 188 222 |  | 
| 189 223 | 
             
            #results .break {
         | 
| @@ -196,7 +230,13 @@ | |
| 196 230 | 
             
              left: 0;
         | 
| 197 231 | 
             
              right: 0;
         | 
| 198 232 | 
             
              font-size: 1.5em;
         | 
| 199 | 
            -
               | 
| 233 | 
            +
              -moz-border-radius: 4px;
         | 
| 234 | 
            +
              opacity:0.5;
         | 
| 235 | 
            +
            }
         | 
| 236 | 
            +
             | 
| 237 | 
            +
            #results_summary:hover {
         | 
| 238 | 
            +
              opacity:1.0;
         | 
| 239 | 
            +
              cursor:pointer;
         | 
| 200 240 | 
             
            }
         | 
| 201 241 |  | 
| 202 242 | 
             
            #results_summary .text {
         | 
| @@ -209,3 +249,31 @@ | |
| 209 249 | 
             
              border-top-right-radius: 1em;
         | 
| 210 250 | 
             
              padding: 3px 5px;
         | 
| 211 251 | 
             
            }
         | 
| 252 | 
            +
             | 
| 253 | 
            +
            #files_nav {
         | 
| 254 | 
            +
              text-align:left;
         | 
| 255 | 
            +
            }
         | 
| 256 | 
            +
             | 
| 257 | 
            +
            #files_nav a:link,#files_nav a:visited,#files_nav a:hover {
         | 
| 258 | 
            +
              text-decoration:none;
         | 
| 259 | 
            +
              color:#212121;
         | 
| 260 | 
            +
            }
         | 
| 261 | 
            +
             | 
| 262 | 
            +
            #files_nav a:hover {
         | 
| 263 | 
            +
              background-color: #fff319;
         | 
| 264 | 
            +
              border:1px solid #efda17;
         | 
| 265 | 
            +
              font-weight: bold;
         | 
| 266 | 
            +
              box-shadow:1px 1px 1px #c49e28;
         | 
| 267 | 
            +
              -moz-box-shadow:1px 1px 1px #c49e28;
         | 
| 268 | 
            +
              border-radius:3px;
         | 
| 269 | 
            +
              -moz-border-radius:3px;
         | 
| 270 | 
            +
            }
         | 
| 271 | 
            +
             | 
| 272 | 
            +
            #files_nav_container {
         | 
| 273 | 
            +
              max-height:300px;
         | 
| 274 | 
            +
              overflow-y:scroll;
         | 
| 275 | 
            +
            }
         | 
| 276 | 
            +
             | 
| 277 | 
            +
            ul {
         | 
| 278 | 
            +
              list-style-type: none;
         | 
| 279 | 
            +
            }
         | 
| @@ -1,8 +1,9 @@ | |
| 1 | 
            -
             | 
| 2 1 | 
             
            <tr><td class='break' colspan='2'></td></tr>
         | 
| 3 2 | 
             
            <tr>
         | 
| 4 3 | 
             
              <td class="file_heading" colspan="2">
         | 
| 5 | 
            -
                <%= | 
| 4 | 
            +
                <a id="<%=File.basename(file).gsub(/\.|:|\\|\//,"")%>">
         | 
| 5 | 
            +
                  <%= CGI::escapeHTML(file.gsub(@word_search.project.path + "/", "")) %>
         | 
| 6 | 
            +
                </a>
         | 
| 6 7 | 
             
              </td>
         | 
| 7 8 | 
             
            </tr>
         | 
| 8 9 |  | 
| @@ -15,7 +16,7 @@ | |
| 15 16 | 
             
              <% display_line_num = hit.line_num + 1%>
         | 
| 16 17 | 
             
              <% if @word_search.context? and last_matching_line_num and (display_line_num - last_matching_line_num) > (@word_search.context_size * 2) %>
         | 
| 17 18 | 
             
                <tr class="divider file_<%= file_num %>">
         | 
| 18 | 
            -
                  <td class="line_num" | 
| 19 | 
            +
                  <td class="line_num">…</td>
         | 
| 19 20 | 
             
                  <td class="text"> </td> <!-- extra space to ensure line-height is respected -->
         | 
| 20 21 | 
             
                </tr>
         | 
| 21 22 | 
             
              <% end %>
         | 
| @@ -1,21 +1,37 @@ | |
| 1 | 
            +
            <html>
         | 
| 2 | 
            +
            <head>
         | 
| 1 3 | 
             
            <% jquery_path = File.expand_path(File.join(Redcar.root, %w(plugins html_view assets jquery-1.4.min.js))) %>
         | 
| 2 4 | 
             
            <script type="text/javascript" src="file://<%= jquery_path %>"></script>
         | 
| 3 5 | 
             
            <% json_path = File.expand_path(File.join(Redcar.root, %w(plugins html_view assets json2.js))) %>
         | 
| 4 6 | 
             
            <script type="text/javascript" src="file://<%= json_path %>"></script>
         | 
| 5 7 |  | 
| 6 8 | 
             
            <% plugin_css = File.expand_path(File.join(plugin_root, %w(lib project_search stylesheets style.css))) %>
         | 
| 9 | 
            +
            <style>
         | 
| 10 | 
            +
            <% font_size = (Redcar::EditView.font_size * 1.5).to_i %>
         | 
| 11 | 
            +
            #results .text pre, #results .text pre span, #query,#results .line_num, #recent_queries {
         | 
| 12 | 
            +
              font-family: <%= Redcar::EditView.font %>;
         | 
| 13 | 
            +
              font-size: <%= font_size - 6 %>px;
         | 
| 14 | 
            +
            }
         | 
| 15 | 
            +
            #results .line_num {
         | 
| 16 | 
            +
              font-size:<%= font_size - 8 %>px;
         | 
| 17 | 
            +
              line-height:<%= font_size - 8 %>px;
         | 
| 18 | 
            +
            }
         | 
| 19 | 
            +
            #results .text pre {
         | 
| 20 | 
            +
              font-size: <%= font_size - 6 %>px;
         | 
| 21 | 
            +
              line-height: <%= font_size - 3 %>px;
         | 
| 22 | 
            +
            }
         | 
| 23 | 
            +
            </style>
         | 
| 7 24 | 
             
            <link rel="stylesheet" href="file://<%= plugin_css %>" type="text/css" media="screen">
         | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 25 | 
            +
            </head>
         | 
| 26 | 
            +
            <body>
         | 
| 11 27 | 
             
            <div id="search_form_container">
         | 
| 12 28 | 
             
              <form id="search_form">
         | 
| 13 29 | 
             
                <table>
         | 
| 14 30 | 
             
                  <tr class="input">
         | 
| 15 | 
            -
                    <td class="label"><label for="query"> | 
| 31 | 
            +
                    <td class="label"><label for="query">Words:</label></td>
         | 
| 16 32 | 
             
                    <td class="field">
         | 
| 17 | 
            -
                      <input id="query" type="text" value="<%= default_query %>" | 
| 18 | 
            -
             | 
| 33 | 
            +
                      <input id="query" type="text" value="<%= default_query %>"/>
         | 
| 34 | 
            +
             | 
| 19 35 | 
             
                      <!-- keeps a cache of the current query so if the user changes the query field, this remains the same as the results -->
         | 
| 20 36 | 
             
                      <input id="cached_query" type="hidden" />
         | 
| 21 37 |  | 
| @@ -28,14 +44,13 @@ | |
| 28 44 | 
             
                      </div>
         | 
| 29 45 | 
             
                    </td>
         | 
| 30 46 | 
             
                    <td class="expand">
         | 
| 31 | 
            -
                      < | 
| 47 | 
            +
                      <input id="search" type="submit" value="Search" />
         | 
| 48 | 
            +
                      <a href="#" title="Toggle Recent Queries" id="toggle_recent_queries">▼</a>
         | 
| 32 49 | 
             
                    </td>
         | 
| 33 50 | 
             
                  </tr>
         | 
| 34 51 | 
             
                  <tr>
         | 
| 35 52 | 
             
                    <td></td>
         | 
| 36 53 | 
             
                    <td class="controls">
         | 
| 37 | 
            -
                      <input id="search" type="submit" value="Find In Project" />
         | 
| 38 | 
            -
                      <img id="spinner" src="<%= image_path %>/spinner.gif" style="display:none;" />
         | 
| 39 54 | 
             
                      <% if show_literal_match_option? %>
         | 
| 40 55 | 
             
                      <input type="checkbox" id="literal_match" <%="checked=checked" if @literal_match %>>
         | 
| 41 56 | 
             
                        <label for="literal_match">Literal Match</label>
         | 
| @@ -44,7 +59,6 @@ | |
| 44 59 | 
             
                      <label for="match_case">Match case</label>
         | 
| 45 60 | 
             
                      <input type="checkbox" id="with_context" <%="checked=checked" if context? %>>
         | 
| 46 61 | 
             
                      <label for="with_context">With context</label>
         | 
| 47 | 
            -
                      <%= search_copy %>
         | 
| 48 62 | 
             
                    </td>
         | 
| 49 63 | 
             
                    <td></td>
         | 
| 50 64 | 
             
                  </tr>
         | 
| @@ -63,6 +77,11 @@ | |
| 63 77 | 
             
            <div id="results_summary" style="display: none;">
         | 
| 64 78 | 
             
              <div class="text">
         | 
| 65 79 | 
             
                <span id="line_results_count">0</span> lines matched in <span id="file_results_count">0</span> files
         | 
| 80 | 
            +
                <span style="float:right">▼</span>
         | 
| 81 | 
            +
                <div id="files_nav_container" style="display:none">
         | 
| 82 | 
            +
                  <ul id="files_nav">
         | 
| 83 | 
            +
                  </ul>
         | 
| 84 | 
            +
                </div>
         | 
| 66 85 | 
             
              </div>
         | 
| 67 86 | 
             
            </div>
         | 
| 68 87 |  | 
| @@ -93,13 +112,9 @@ | |
| 93 112 |  | 
| 94 113 | 
             
                $('#toggle_recent_queries').click(function(ev) {
         | 
| 95 114 | 
             
                  ev.preventDefault();
         | 
| 96 | 
            -
                   | 
| 97 | 
            -
                    $('#recent_queries').hide();
         | 
| 98 | 
            -
                  } else {
         | 
| 99 | 
            -
                    $('#recent_queries').show();
         | 
| 100 | 
            -
                  }
         | 
| 115 | 
            +
                  $('#recent_queries').slideToggle('fast');
         | 
| 101 116 | 
             
                });
         | 
| 102 | 
            -
             | 
| 117 | 
            +
             | 
| 103 118 | 
             
                // in the case the user wants to search for things like <table>, we need to unescape the entities
         | 
| 104 119 | 
             
                String.prototype.unescapeHTML = function() {
         | 
| 105 120 | 
             
                  var t = document.createElement('div');
         | 
| @@ -126,5 +141,16 @@ | |
| 126 141 | 
             
                  }
         | 
| 127 142 | 
             
                });
         | 
| 128 143 |  | 
| 144 | 
            +
                $('.text').click(function() {
         | 
| 145 | 
            +
                  $('#files_nav_container').slideToggle();
         | 
| 146 | 
            +
                });
         | 
| 147 | 
            +
             | 
| 148 | 
            +
                $('.file_link').live('click',function() {
         | 
| 149 | 
            +
                  $('body').animate({
         | 
| 150 | 
            +
                      scrollTop: $("#"+$(this).attr('id').replace("link_","")).offset().top - 120
         | 
| 151 | 
            +
                  }, 0);
         | 
| 152 | 
            +
                });
         | 
| 129 153 | 
             
              });
         | 
| 130 154 | 
             
            </script>
         | 
| 155 | 
            +
            </body>
         | 
| 156 | 
            +
            </html>
         |