Fix #126: Ugly descriptions!

pull/6827/head
Mark Maglana 15 years ago
parent 1c7da418fb
commit ef1d300656
  1. 5
      app/views/items/_item.html.erb
  2. 8
      assets/javascripts/item.js
  3. 6
      assets/stylesheets/item.css

@ -18,7 +18,10 @@
<div class="v"><%= status_id_or_default(item) %></div>
</div>
<div class="points editable" fieldname="points" modelname="item"><%= points_or_empty(item) %></div>
<div class="description editable ta" fieldname="description" modelname="issue"><%= description_or_empty(item) %><span class="textile"><%= textile_description_or_empty(item) %></span></div>
<div class="description editable ta" fieldname="description" modelname="issue">
<div class="textile"><%= textile_description_or_empty(item) %></div>
<div class="html"><%= description_or_empty(item) %></div>
</div>
</span><!-- body -->
<div class="discussion">
<div class="d_spinner"> </div>

@ -61,6 +61,9 @@ RBL.Item = Class.create(RBL.Model, {
if(editors[ii].type.match(/select/)){
this.setValue('div.' + fieldName + ' .v', editors[ii].value);
this.setValue('div.' + fieldName + ' .t', editors[ii][editors[ii].selectedIndex].text);
} else if(editors[ii].type.match(/textarea/)){
this.setValue('div.' + fieldName + ' .textile', editors[ii].value);
this.setValue('div.' + fieldName + ' .html', '-- will be displayed after save --');
} else {
this.setValue('div.' + fieldName, editors[ii].value);
}
@ -268,7 +271,7 @@ RBL.Item = Class.create(RBL.Model, {
url += '/' + this.getValue('.id');
callback = this.itemUpdated.bind(this);
}
this.markSaving();
new Ajax.Request(url, {method: "post", parameters: params, onComplete: callback});
},
@ -330,7 +333,8 @@ RBL.Item = Class.create(RBL.Model, {
for(var ii=0; ii<fields.length; ii++){
params[fields[ii].readAttribute('modelname') + '[' + fields[ii].readAttribute('fieldname') + ']'] =
(fields[ii].hasClassName('sel') ? fields[ii].select('.v')[0].innerHTML : fields[ii].innerHTML);
(fields[ii].hasClassName('sel') ? fields[ii].select('.v')[0].innerHTML :
(fields[ii].hasClassName('ta') ? fields[ii].select('.textile')[0].innerHTML : fields[ii].innerHTML) );
}
params["item[backlog_id]"] = this.getBacklogID();

@ -358,6 +358,7 @@ li.item.editing > .body input.points {
/**** DESCRIPTION ****/
li.item > .body div.description,
li.item > .body div.description .textile,
li.item > .body textarea.description {
display: none;
}
@ -389,11 +390,6 @@ li.item.editing > .body div.description {
width: 407px;
}
li.item .textile {
display: none;
}
/**** TASKS SECTION ****/
li.item > .item_tasks {
display: none;

Loading…
Cancel
Save