Fixed typos.

This commit is contained in:
Martin Edenhofer 2013-03-14 10:10:22 +01:00
parent bd9a3353aa
commit b20d1c4e07
4 changed files with 78 additions and 6 deletions

View file

@ -0,0 +1,72 @@
class App.Delay
_instance = undefined
@set: ( callback, timeout, key, level ) ->
if _instance == undefined
_instance ?= new _Singleton
_instance.set( callback, timeout, key, level )
@clear: ( key ) ->
if _instance == undefined
_instance ?= new _Singleton
_instance.clear( key )
@clearLevel: ( level ) ->
if _instance == undefined
_instance ?= new _Singleton
_instance.clearLevel( level )
class _Singleton extends Spine.Module
@include App.Log
constructor: ->
@levelStack = {}
set: ( callback, timeout, key, level ) ->
if !level
level = '_all'
if !@levelStack[level]
@levelStack[level] = {}
if key
@clear( key )
# setTimeout
@log 'Delay', 'debug', 'set', key, timeout, level, callback
call = =>
@clear( key )
callback()
delay_id = setTimeout( call, timeout )
# remember all delays
@levelStack[ level ][ key ] = {
delay_id: delay_id
timeout: timeout
level: level
}
return delay_id
clear: ( key ) ->
if !level
level = '_all'
if !@levelStack[ level ]
@levelStack[ level ] = {}
# get global delay ids
data = @levelStack[ level ][ key ]
return if !data
@log 'Delay', 'debug', 'clear', data
clearTimeout( data['delay_id'] )
clearLevel: (level) ->
return if !@levelStack[ level ]
for key, data of @levelStack[ level ]
@clear( key )
@levelStack[level] = {}

View file

@ -4,7 +4,7 @@ class App.Sla extends Spine.Model
@url: 'api/slas'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, 'class': 'span4' },
{ name: 'first_response_time', display: 'First Resposne Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
{ name: 'first_response_time', display: 'First Response Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
{ name: 'update_time', display: 'Update Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
{ name: 'close_time', display: 'Solution Time', tag: 'input', type: 'text', limit: 100, null: true, 'class': 'span4', note: 'In minutes, only business times are counted.' },
{ name: 'condition', display: 'Conditions where SLA is used', tag: 'ticket_attribute_selection', null: true, class: 'span4' },
@ -37,4 +37,4 @@ class App.Sla extends Spine.Model
@configure_delete = true
@configure_overview = [
'name',
]
]

View file

@ -11,7 +11,7 @@
<th <% if row.style: %>style="<%= row.style %>"<% end %>><%- @T( row.display ) %></th>
<% end %>
<% if @destroy: %>
<th class="span2"><%- @T('Destory') %></th>
<th class="span2"><%- @T('Destroy') %></th>
<% end %>
</tr>
</thead>
@ -63,4 +63,4 @@
</tr>
<% end %>
</tbody>
</table>
</table>

View file

@ -90,7 +90,7 @@ Setting.create_if_not_exists(
:title => 'http type',
:name => 'http_type',
:area => 'System::Base',
:description => 'Defines the type of protocol, used by the web server, to serve the application. If https protocol will be used instead of plain http, it must be specified it here. Since this has no affect on the web server\'s settings or behavior, it will not change the method of access to the application and, if it is wrong, it will not prevent you from logging into the application. This setting is used as a variable, #{setting.http_type} which is found in all forms of messaging used by the application, to build links to the tickets within your system.',
:description => 'Defines the type of protocol, used by the web server, to serve the application. If https protocol will be used instead of plain http, it must be specified in here. Since this has no affect on the web server\'s settings or behavior, it will not change the method of access to the application and, if it is wrong, it will not prevent you from logging into the application. This setting is used as a variable, #{setting.http_type} which is found in all forms of messaging used by the application, to build links to the tickets within your system.',
:options => {
:form => [
{
@ -115,7 +115,7 @@ Setting.create_if_not_exists(
:title => 'Storage Mechanism',
:name => 'storage',
:area => 'System::Storage',
:description => '"Database" stores all attachments in the database (not recommended for storing big). "Filesystem" stores the data on the filesystem; this is faster but the webserver should run under the Zammad user. You can switch between the modules even on a system that is already in production without any loss of data.',
:description => '"Database" stores all attachments in the database (not recommended for storing large amounts of data). "Filesystem" stores the data on the filesystem. You can switch between the modules even on a system that is already in production without any loss of data.',
:options => {
:form => [
{