[DE mobile] Add Move to Review
This commit is contained in:
parent
fa658a11cd
commit
6d32ad8e6b
|
@ -251,6 +251,7 @@ define([
|
||||||
|
|
||||||
|
|
||||||
initChange: function() {
|
initChange: function() {
|
||||||
|
var goto = false;
|
||||||
if(arrChangeReview.length == 0) {
|
if(arrChangeReview.length == 0) {
|
||||||
this.api.asc_GetNextRevisionsChange();
|
this.api.asc_GetNextRevisionsChange();
|
||||||
}
|
}
|
||||||
|
@ -260,11 +261,19 @@ define([
|
||||||
$('#current-change #date-change').html(arrChangeReview[0].date);
|
$('#current-change #date-change').html(arrChangeReview[0].date);
|
||||||
$('#current-change #user-name').html(arrChangeReview[0].user);
|
$('#current-change #user-name').html(arrChangeReview[0].user);
|
||||||
$('#current-change #text-change').html(arrChangeReview[0].changetext);
|
$('#current-change #text-change').html(arrChangeReview[0].changetext);
|
||||||
|
goto = arrChangeReview[0].goto;
|
||||||
|
}
|
||||||
|
if (goto) {
|
||||||
|
$('#btn-goto-change').show();
|
||||||
|
} else {
|
||||||
|
$('#btn-goto-change').hide();
|
||||||
}
|
}
|
||||||
$('#btn-prev-change').single('click', _.bind(this.onPrevChange, this));
|
$('#btn-prev-change').single('click', _.bind(this.onPrevChange, this));
|
||||||
$('#btn-next-change').single('click', _.bind(this.onNextChange, this));
|
$('#btn-next-change').single('click', _.bind(this.onNextChange, this));
|
||||||
$('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this));
|
$('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this));
|
||||||
$('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this));
|
$('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this));
|
||||||
|
$('#btn-goto-change').single('click', _.bind(this.onGotoNextChange, this));
|
||||||
|
|
||||||
if(this.appConfig.isReviewOnly) {
|
if(this.appConfig.isReviewOnly) {
|
||||||
$('#btn-accept-change').remove();
|
$('#btn-accept-change').remove();
|
||||||
$('#btn-reject-change').remove();
|
$('#btn-reject-change').remove();
|
||||||
|
@ -277,7 +286,6 @@ define([
|
||||||
$('#btn-prev-change').addClass('disabled');
|
$('#btn-prev-change').addClass('disabled');
|
||||||
$('#btn-next-change').addClass('disabled');
|
$('#btn-next-change').addClass('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrevChange: function() {
|
onPrevChange: function() {
|
||||||
|
@ -308,9 +316,11 @@ define([
|
||||||
$('#current-change #date-change').empty();
|
$('#current-change #date-change').empty();
|
||||||
$('#current-change #user-name').empty();
|
$('#current-change #user-name').empty();
|
||||||
$('#current-change #text-change').empty();
|
$('#current-change #text-change').empty();
|
||||||
$('#current-change').css('display', 'none');
|
$('#current-change').hide();
|
||||||
|
$('#btn-goto-change').hide();
|
||||||
|
$('#btn-delete-change').hide();
|
||||||
} else {
|
} else {
|
||||||
$('#current-change').css('display', 'block');
|
$('#current-change').show();
|
||||||
this.initChange();
|
this.initChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -322,10 +332,11 @@ define([
|
||||||
_.each(data, function (item) {
|
_.each(data, function (item) {
|
||||||
var changetext = '', proptext = '',
|
var changetext = '', proptext = '',
|
||||||
value = item.get_Value(),
|
value = item.get_Value(),
|
||||||
|
movetype = item.get_MoveType(),
|
||||||
settings = false;
|
settings = false;
|
||||||
switch (item.get_Type()) {
|
switch (item.get_Type()) {
|
||||||
case Asc.c_oAscRevisionsChangeType.TextAdd:
|
case Asc.c_oAscRevisionsChangeType.TextAdd:
|
||||||
changetext = me.textInserted;
|
changetext = (movetype==Asc.c_oAscRevisionsMove.NoMove) ? me.textInserted : me.textParaMoveTo;
|
||||||
if (typeof value == 'object') {
|
if (typeof value == 'object') {
|
||||||
_.each(value, function (obj) {
|
_.each(value, function (obj) {
|
||||||
if (typeof obj === 'string')
|
if (typeof obj === 'string')
|
||||||
|
@ -352,7 +363,7 @@ define([
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscRevisionsChangeType.TextRem:
|
case Asc.c_oAscRevisionsChangeType.TextRem:
|
||||||
changetext = me.textDeleted;
|
changetext = (movetype==Asc.c_oAscRevisionsMove.NoMove) ? me.textDeleted : (item.is_MovedDown() ? me.textParaMoveFromDown : me.textParaMoveFromUp);
|
||||||
if (typeof value == 'object') {
|
if (typeof value == 'object') {
|
||||||
_.each(value, function (obj) {
|
_.each(value, function (obj) {
|
||||||
if (typeof obj === 'string')
|
if (typeof obj === 'string')
|
||||||
|
@ -490,14 +501,24 @@ define([
|
||||||
changetext += '</b>';
|
changetext += '</b>';
|
||||||
changetext += proptext;
|
changetext += proptext;
|
||||||
break;
|
break;
|
||||||
|
case Asc.c_oAscRevisionsChangeType.TablePr:
|
||||||
|
changetext = me.textTableChanged;
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscRevisionsChangeType.RowsAdd:
|
||||||
|
changetext = me.textTableRowsAdd;
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscRevisionsChangeType.RowsRem:
|
||||||
|
changetext = me.textTableRowsDel;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
var date = (item.get_DateTime() == '') ? new Date() : new Date(item.get_DateTime()),
|
var date = (item.get_DateTime() == '') ? new Date() : new Date(item.get_DateTime()),
|
||||||
user = item.get_UserName();
|
user = item.get_UserName(),
|
||||||
|
goto = (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom);
|
||||||
date = me.dateToLocaleTimeString(date);
|
date = me.dateToLocaleTimeString(date);
|
||||||
|
|
||||||
|
|
||||||
arr.push({date: date, user: user, changetext: changetext});
|
arr.push({date: date, user: user, changetext: changetext, goto: goto});
|
||||||
});
|
});
|
||||||
arrChangeReview = arr;
|
arrChangeReview = arr;
|
||||||
dateChange = data;
|
dateChange = data;
|
||||||
|
@ -533,6 +554,12 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onGotoNextChange: function() {
|
||||||
|
if (this.api) {
|
||||||
|
this.api.asc_FollowRevisionMove(dateChange[0]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -587,7 +614,13 @@ define([
|
||||||
textEquation: 'Equation',
|
textEquation: 'Equation',
|
||||||
textImage: 'Image',
|
textImage: 'Image',
|
||||||
textChart: 'Chart',
|
textChart: 'Chart',
|
||||||
textShape: 'Shape'
|
textShape: 'Shape',
|
||||||
|
textTableChanged: '<b>Table Settings Changed</b>',
|
||||||
|
textTableRowsAdd: '<b>Table Rows Added<b/>',
|
||||||
|
textTableRowsDel: '<b>Table Rows Deleted<b/>',
|
||||||
|
textParaMoveTo: '<b>Moved:</b>',
|
||||||
|
textParaMoveFromUp: '<b>Moved Up:</b>',
|
||||||
|
textParaMoveFromDown: '<b>Moved Down:</b>'
|
||||||
|
|
||||||
}
|
}
|
||||||
})(), DE.Controllers.Collaboration || {}))
|
})(), DE.Controllers.Collaboration || {}))
|
||||||
|
|
|
@ -179,6 +179,7 @@
|
||||||
<a href="#" id="btn-prev-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
<a href="#" id="btn-prev-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
||||||
<a href="#" id="btn-next-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
<a href="#" id="btn-next-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
||||||
</span>
|
</span>
|
||||||
|
<a href="#" id="btn-goto-change" class="link icon-only" style="display: none;"><i class="icon icon-link"></i></a>
|
||||||
<span class="accept-reject">
|
<span class="accept-reject">
|
||||||
<a href="#" id="btn-accept-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
<a href="#" id="btn-accept-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
||||||
<a href="#" id="btn-reject-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
<a href="#" id="btn-reject-change" class="link icon-only"><i class="icon icon-review"></i></a>
|
||||||
|
|
Loading…
Reference in a new issue