Removed not needed class.

This commit is contained in:
Martin Edenhofer 2014-09-27 11:39:38 +02:00
parent e43c91840d
commit 7b8723575f
5 changed files with 12 additions and 12 deletions

View file

@ -80,9 +80,9 @@
// maxlength check
if ( options.maxlength ) {
this.bind('keydown', function (e) {
// check maxlength
length = $(e.target).text().length
var field = $(e.target)
var length = $(e.target).text().length
if ( length >= options.maxlength ) {
switch ( e.keyCode ) {
case 8: // backspace
@ -111,13 +111,13 @@
break;
}
default:
$(e.target).addClass('invalid')
field.addClass('invalid')
e.preventDefault()
}
}
else {
if ( $(e.target).hasClass('invalid') ) {
$(e.target).removeClass('invalid')
if ( field.hasClass('invalid') ) {
field.removeClass('invalid')
}
}
})

View file

@ -1,4 +1,4 @@
<h1><span contenteditable="true" class="ticket-title-update textbox"><%= @P( @ticket.title ) %></span></h1>
<h1><span contenteditable="true" class="ticket-title-update"><%= @P( @ticket.title ) %></span></h1>
<small class="task-subline">
<%- @C('ticket_hook') %> <span class="ticket-number"><%- @ticket.number %></span> - <%- @T('created') %> <span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span> <% if !@isCustomer && @ticket.escalation_time: %> - <%- @T('escalation') %> <span class="humanTimeFromNow escalation" data-time="<%- @ticket.escalation_time %>">?</span><% end %>

View file

@ -8,7 +8,7 @@
<div class="customer-info" title="<%- @Ti( row.display ) %>"><%- @L( @P( @organization[row.name] ) ) %></div>
<% else: %>
<div class="customer-info" title="<%- @Ti( row.display ) %>">
<div contenteditable="true" class="textbox" data-name="<%= row.name %>" data-type="update-org" data-placeholder="<%- @T('Add a Note') %>"><%= @organization[row.name] %></div>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update-org" data-placeholder="<%- @T('Add a Note') %>"><%= @organization[row.name] %></div>
</div>
<% end %>
<% end %>

View file

@ -17,7 +17,7 @@
<% else: %>
<div class="userInfo-label"><%- @Ti( row.display ) %></div>
<div class="userInfo-value">
<div contenteditable="true" class="textbox" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%= @user[row.name] %></div>
<div contenteditable="true" data-name="<%= row.name %>" data-type="update" data-placeholder="<%- @T('Add a Note') %>"><%= @user[row.name] %></div>
</div>
<% end %>
</div>

View file

@ -3429,23 +3429,23 @@ footer {
margin-top: 1px;
}
.textbox[contenteditable] {
[contenteditable] {
display: block;
white-space: pre;
padding: 1px;
outline-style: none;
}
.textbox[contenteditable]:hover, .textbox[contenteditable]:focus {
[contenteditable]:hover, [contenteditable]:focus {
padding: 0;
border: 1px dotted hsl(145,51%,45%);
border-radius: 3px;
}
.textbox[contenteditable].invalid {
[contenteditable].invalid {
padding: 0;
border: 1px dotted #F92;
border-radius: 3px;
}
.textbox > .placeholder {
[contenteditable] > .placeholder {
color: #999;
}
/*