src/pyams_thesaurus/zmi/resources/js/pyams_thesaurus.js
changeset 2 de33539c2db2
parent 0 47700a43ef3f
child 5 86ddb444d0a9
--- a/src/pyams_thesaurus/zmi/resources/js/pyams_thesaurus.js	Wed Apr 15 14:25:46 2015 +0200
+++ b/src/pyams_thesaurus/zmi/resources/js/pyams_thesaurus.js	Fri Apr 17 14:02:46 2015 +0200
@@ -174,7 +174,9 @@
 		var term = $('span.term', checker.closest('div').siblings('span'));
 		MyAMS.ajax.post('switch-extract.json', {term: term.text(),
 												extract: checker.data('ams-extract-name')}, function(data) {
-			if (data.used) {
+			if (data.status) {  // System view
+				MyAMS.ajax.handleJSON(data);
+			} else if (data.used) {
 				checker.removeClass('fa-square-o')
 					   .addClass('fa-square used');
 				$('>li >div i.extract-checker[data-ams-extract-name="' + data.extract + '"]',