Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 28fe973 + ee84099 commit d8751c95faff9183a5392fd5d770da024e6d1917 @ongaeshi committed Nov 13, 2012
View
@@ -1,3 +1,28 @@
+=== 0.9.4 2012/11/14
+
+* milk web
+ * 行番号クリック時の処理を改善
+ * ウィンドウをモーダルに変更
+ * ハイライト、URLを選択行に差し替え (thanks asane)
+ * 検索ボックスの操作性を改善 (thanks kenhys)
+ * Select query text on click event
+ * keep query text selected after searching
+ * suppress select() call for query text by tag jump
+ * パッケージ一覧のソートのルールを整理
+ * ソースコードの文字コードがEUC-JPの場合、検索結果に表示される日本語が文字化けする問題を修正 (thanks azurite)
+ * 文言修正 : '新しい検索' -> 'タブを複製'
+
+* milk
+ * milk remove 改善
+ * milk init /path/to/dir -s が正しく動作しない問題を修正
+ * milkode_yaml.rb: package_root の正規表現調整
+ * 他のオプションとのバッティングを防ぐために milk -v は使えないように、 milk --version を推奨
+ * 拡張子 csproj, vbproj, sln に対応 (VisualStudio)
+ * document_table.rb: addするとnegative string size (or size too big) (ArgumentError)となる問題を修正 (thanks azurite)
+
+* Bug fix
+ * termcolorの要求バージョンを '< 1.2.2' に (thanks mallowlabs)
+
=== 0.9.3.1 2012/10/14
* 'milk plugins' add gem-milkode, bundle-milkode
View
@@ -1,3 +1,20 @@
+=== 0.9.4
+
+* milk web
+ * Improve handling when you click the line number
+ * Improve the usability of the search box (thanks kenhys)
+
+* milk
+ * Improve milk remove
+ * Fix milk init /path/to/dir -s
+ * milkode_yaml.rb: Fix package_root regexp
+ * milk -v -> milk --version
+ * plang_detector.rb: Add csproj, vbproj, sln (VisualStudio)
+ * document_table.rb: Fix error negative string size (or size too big)
+
+* Bug fix
+ * termcolor require version '< 1.2.2' (thanks mallowlabs)
+
=== 0.9.3.1 2012/10/14
* 'milk plugins' add gem-milkode, bundle-milkode
View
@@ -1 +1 @@
-0.9.3.1
+0.9.4
View
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/grep/cli_grep'
-Version = "0.9.3.1"
+Version = "0.9.4"
Milkode::CLI_Grep.execute(STDOUT, ARGV)
View
@@ -6,5 +6,5 @@
require 'rubygems'
require 'milkode/cli'
-Version = "0.9.3.1"
+Version = "0.9.4"
Milkode::CLI.start(ARGV)
@@ -316,29 +316,21 @@ def remove(args, options)
if (options[:all])
remove_all
else
- if (args.empty?)
- path = File.expand_path('.')
- package = @yaml.package_root(path)
+ print_result do
+ db_open
+ args.each do |arg|
+ package = @yaml.find_name(arg) || @yaml.find_dir(arg)
- if (package)
- print_result do
- db_open
- remove_dir(package.directory)
+ unless package
+ path = File.expand_path(arg)
+ package = @yaml.package_root(path)
end
- else
- @out.puts "Not registered. '#{path}'."
- end
- else
- print_result do
- db_open
- args.each do |name|
- package = @yaml.find_name(name) || @yaml.find_dir(name)
- if (package)
- remove_dir(package.directory)
- else
- @out.puts "Not found package '#{name}'."
- return
- end
+
+ if (package)
+ remove_dir(package.directory)
+ else
+ @out.puts "Not found package '#{arg}'."
+ return
end
end
end
@@ -584,13 +576,14 @@ def dir(args, options)
end
end
- def setdb(dbpath, options)
+ def setdb(args, options)
if (options[:reset])
CdstkCommand.setdb_reset
@out.puts "Reset default db\n remove: #{Dbdir.milkode_db_dir}\n default_db: #{Dbdir.default_dir}"
- elsif (dbpath.nil?)
+ elsif (args.empty?)
@out.puts Dbdir.default_dir
else
+ dbpath = args.first
path = File.expand_path(dbpath)
begin
CdstkCommand.setdb_set path
@@ -22,7 +22,7 @@
get '/' do
@setting = WebSetting.new
- @version = "0.9.3.1"
+ @version = "0.9.4"
@package_num = Database.instance.yaml_package_num
@file_num = Database.instance.totalRecords
@package_list = PackageList.new(Database.instance.grndb)
@@ -183,7 +183,7 @@ def create_headmenu(path, query, flistpath = '')
<<EOF
#{headicon('go-home-5.png')} <a href="/home" class="headmenu">ホーム</a>
- #{headicon('document-new-4.png')} <a href="#{href}" class="headmenu" onclick="window.open('#{href}'); return false;">新しい検索</a>
+ #{headicon('document-new-4.png')} <a href="#{href}" class="headmenu" onclick="window.open('#{href}'); return false;">タブを複製</a>
#{headicon('directory.png')} <a href="#{flist}" class="headmenu">ディレクトリ</a>
#{headicon('view-refresh-4.png')} <a href="#updateModal" class="headmenu" data-toggle="modal">パッケージを更新</a>
#{headicon('help.png')} <a href="/help" class="headmenu">ヘルプ</a>
@@ -201,6 +201,22 @@ def create_headmenu(path, query, flistpath = '')
<a href="#" id="updateOk" class="btn btn-primary" data-loading-text="Updating..." milkode-package-name="#{package_name}"">OK</a>
</div>
</div>
+
+ <div id="lineno-modal" class="modal hide">
+ <div class="modal-header">
+ <a href="#" class="close" data-dismiss="modal">&times;</a>
+ <h3 id="lineno-path"></h3>
+ </div>
+ <div class="modal-body">
+ <table class="CodeRay"><tr>
+ <td class="code"><pre id="lineno-body">
+ </pre></td>
+ </tr></table>
+ </div>
+ <div class="modal-footer">
+ <a href="#" id="lineno-ok" class="btn" data-dismiss="modal">OK</a>
+ </div>
+ </div>
EOF
end
@@ -5,6 +5,9 @@
# @author ongaeshi
# @date 2012/03/18
+require 'rubygems'
+require 'rack'
+
module CodeRay
module Encoders
class HTML2 < HTML
@@ -168,7 +171,8 @@ def self.create_anchor(options)
elsif options[:onclick_copy_line_number]
prefix = options[:onclick_copy_prefix] || ""
proc do |line|
- "<a href=\"#!\" onclick=\"alert('#{prefix + line.to_s}');\" title=\"Display line number\">#{line.to_s}</a>"
+ "<a href=\"#lineno-modal\" data-toggle=\"modal\" onclick=\"lineno_setup('#{prefix}', '#{line.to_s}');\" title=\"Display line number\">#{line.to_s}</a>"
+ # "<a onclick=\"lineno_setup('#{prefix}', '#{line.to_s}');\" title=\"Display line number\">#{line.to_s}</a>"
end
else
proc { |line| line.to_s } # :to_s.to_proc in Ruby 1.8.7+
Oops, something went wrong.

0 comments on commit d8751c9

Please sign in to comment.