Skip to content

Commit

Permalink
Fixed issue: Label editing was not properly synchronizing across tran…
Browse files Browse the repository at this point in the history
…slations on deletion and code/assessments value
  • Loading branch information
c-schmitz committed Dec 17, 2015
1 parent f36f141 commit c96cb50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion application/views/admin/labels/labelview_view.php
Expand Up @@ -63,7 +63,7 @@
?>>
<?php
if (!$first) {
?> <td><?php echo $row['code'] ?></td><td><?php echo $row['assessment_value'] ?></td>
?><td><?php echo $row['code'] ?></td><td style='text-align:right;'><?php echo $row['assessment_value'] ?></td>
<?php
}
else
Expand Down
16 changes: 8 additions & 8 deletions scripts/admin/labels.js
Expand Up @@ -25,7 +25,7 @@ $(document).ready(function(){
{
alert(strSelectLabelset);
return false;
}
}
else
{
return true;
Expand Down Expand Up @@ -191,13 +191,13 @@ function sort_complete(event, ui){

function sync_label(event)
{
var $sRowID = $(event.target).parent().parent().attr('id');
$aRowInfo=$sRowID.split('_');// first is row, second langage and last the row number
$(".tab-pane").each(function(divindex,divelement){
var sRowID = $(event.target).parent().parent().attr('id');
aRowInfo=sRowID.split('_');// first is row, second langage and last the row number
$(".ui-tabs-panel").each(function(divindex,divelement){
var div_language = $(".lslanguage",divelement).val();
if (typeof(div_language)!="undefined" && div_language!=$aRowInfo[1]){
$("#row_"+div_language+"_"+$aRowInfo[2]+" td:first-child").text($("#code_"+$aRowInfo[2]).val()); // Sync code
$("#row_"+div_language+"_"+$aRowInfo[2]+" td:nth-child(2)").text($("#assessmentvalue_"+$aRowInfo[2]).val()); // Sync assessment value
if (typeof(div_language)!="undefined" && div_language!=aRowInfo[1]){
$("#row_"+div_language+"_"+aRowInfo[2]+" td:first-child").text($("#code_"+aRowInfo[2]).val()); // Sync code
$("#row_"+div_language+"_"+aRowInfo[2]+" td:nth-child(2)").text($("#assessmentvalue_"+aRowInfo[2]).val()); // Sync assessment value
}
});

Expand Down Expand Up @@ -276,7 +276,7 @@ function del_label(event){
var $sRowID = $(event.target).parent().parent().attr('id');

$aRowInfo=$sRowID.split('_');// first is row, second langage and last the row number
$(".tab-pane").each(function(divindex,divelement){
$(".ui-tabs-panel").each(function(divindex,divelement){
var div_language = $(".lslanguage",divelement).val();

if (typeof(div_language)!="undefined")
Expand Down

0 comments on commit c96cb50

Please sign in to comment.