add error if not being saved

This commit is contained in:
Sanj 2012-03-05 14:21:24 +05:30
parent 85cd14acba
commit 5835d99c7b
2 changed files with 5 additions and 2 deletions

View File

@ -17,9 +17,12 @@ $(function() {
}; };
$(this).data("original", val); $(this).data("original", val);
var url = trans.model == 'Translation' ? '/stringtranslate/' : '/dotrans/'; var url = trans.model == 'Translation' ? '/stringtranslate/' : '/dotrans/';
$.post(url, data, function(response) { var $post = $.post(url, data, function(response) {
console.log(response); console.log(response);
}, "json"); }, "json");
$post.fail(function(err) {
alert("error saving translation. please check your internet connection and reload the page.");
});
// console.log(data); // console.log(data);
} }
}); });

View File

@ -12,7 +12,7 @@
} }
</style> </style>
<script type="text/javascript" src="/media/js/jquery.js"></script> <script type="text/javascript" src="/media/js/jquery.js"></script>
<script type="text/javascript" src="/media/js/trans.js"></script> <script type="text/javascript" src="/media/js/trans.js?1"></script>
<script type="text/javascript"> <script type="text/javascript">
var trans = { var trans = {