mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Smart annotations improved documentation. [SCI-908]
This commit is contained in:
parent
fec83e8c45
commit
5d86bbb812
1 changed files with 7 additions and 2 deletions
|
@ -243,8 +243,8 @@ var SmartAnnotation = (function() {
|
||||||
* both of them to be called. In such case, AtWhO modal needs to be
|
* both of them to be called. In such case, AtWhO modal needs to be
|
||||||
* rerendered.
|
* rerendered.
|
||||||
*/
|
*/
|
||||||
function atWhoSwitchHack(filterType, remoteFilterCb) {
|
function atWhoSwitchHack(filterTypeTag, remoteFilterCb) {
|
||||||
if(atWhoUpdating || (!$(field).length && _.isUndefined(filterType))) {
|
if(atWhoUpdating || (!$(field).length && _.isUndefined(filterTypeTag))) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$(field).atwho('run');
|
$(field).atwho('run');
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -269,8 +269,12 @@ var SmartAnnotation = (function() {
|
||||||
atWhoSwitchHack(filterTypeTag, function() {
|
atWhoSwitchHack(filterTypeTag, function() {
|
||||||
var filterType;
|
var filterType;
|
||||||
if (_.isUndefined(filterTypeTag)) {
|
if (_.isUndefined(filterTypeTag)) {
|
||||||
|
// Switched smart annotation type (i.e. changed input)
|
||||||
filterType = defaultFilterType;
|
filterType = defaultFilterType;
|
||||||
} else {
|
} else {
|
||||||
|
// Switched filtering type (i.e. different filter button
|
||||||
|
// pressed; works also for specific annotation types, e.g.
|
||||||
|
// task#, and coverts to the correct annotation type on confirm)
|
||||||
$.each(FilterTypeEnum, function(k, v) {
|
$.each(FilterTypeEnum, function(k, v) {
|
||||||
if (v.tag == filterTypeTag) {
|
if (v.tag == filterTypeTag) {
|
||||||
filterType = FilterTypeEnum[k];
|
filterType = FilterTypeEnum[k];
|
||||||
|
@ -279,6 +283,7 @@ var SmartAnnotation = (function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (prevAt != at) {
|
if (prevAt != at) {
|
||||||
|
// Switching smart annotation type (i.e. chaned input)
|
||||||
prevAt = at;
|
prevAt = at;
|
||||||
$('.atwho-view[style]').removeAttr("style");
|
$('.atwho-view[style]').removeAttr("style");
|
||||||
filterType = defaultFilterType;
|
filterType = defaultFilterType;
|
||||||
|
|
Loading…
Reference in a new issue