0
<p>Values are saved when the form-field loses focus.</p>
0
<form onsubmit="return false">
0
- <table
id="global-config" class="listing">
0
+ <table
class="listing">
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:global, "user.name"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'user.name', value: $F(this)})", :tabindex => "1" %></td>
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:global, "user.email"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'user.email', value: $F(this)})", :tabindex => "2" %></td>
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:global, "git-tmbundle.log.limit"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'git-tmbundle.log.limit', value: $F(this)})", :tabindex => "3" %></td>
0
- <td>Log context lines:</td>
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:global, "git-tmbundle.log.context-lines"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'git-tmbundle.log.context-lines', value: $F(this)})", :tabindex => "5" %></td>
0
- <table id="local-config" class="listing">
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:local, "git-tmbundle.log.limit"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'local', key: 'git-tmbundle.log.limit', value: $F(this)})", :tabindex => "4" %></td>
0
- <td>Log context lines:</td>
0
- <td><%= content_tag :input, :type => "text", :value => git.config[:local, "git-tmbundle.log.context-lines"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'local', key: 'git-tmbundle.log.context-lines', value: $F(this)})", :tabindex => "6" %></td>
0
+ ["Name", "user.name", [:global]],
0
+ ["Email", "user.email", [:global]],
0
+ ["Log limit", "git-tmbundle.log.limit", [:global, :local], {:style => "width: 40px"}],
0
+ ["Log context lines", "git-tmbundle.log.context-lines", [:global, :local], {:style => "width: 40px"}],
0
+ ["Gitnub path", "git-tmbundle.gitnub-path", [:global], {:style => "width: 250px"}],
0
+ ].each do |label, key, scopes, input_options|
0
+ <% [:global, :local].each do |scope| %>
0
+ <% if scopes && scopes.include?(scope)
0
+ <td><%= config_text_field scope, key, {:tabindex => tabindex}.merge(input_options || {}) %></td>
0
\ No newline at end of file
Comments
No one has commented yet.