Changeset 906 for pro-violet-viettel/sourcecode/assets/js/collaborator
- Timestamp:
- Apr 23, 2015 12:00:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/assets/js/collaborator/collaborator.js
r883 r906 1 (function($){ 2 $.fn.setCursorToTextEnd = function() { 3 $initialVal = this.val(); 4 this.val($initialVal + ' '); 5 this.val($initialVal); 6 }; 7 })(jQuery); 1 8 $(document).on('change', '.upload', function() { 2 9 var path = this.value; … … 22 29 cache: false, 23 30 success: function(data){ 31 console.log(data) 24 32 $("#charging").css('display', 'none'); 25 33 $("#result").html(data); 26 34 }, 27 35 error: function(data){ 36 console.log(data); 28 37 } 29 38 }); … … 32 41 33 42 }); 43 44 function updateInfo() { 45 $.ajax({ 46 url: '/collaborator/collaborator/updateCollaborator/', 47 type: 'POST', 48 data: $("#frm-update-info").serialize(), 49 success: function (data, textStatus, jqXHR) 50 { 51 result = jQuery.parseJSON(data); 52 if (result.success == "1") 53 { 54 $("#updateInfoSuccess").modal('show'); 55 $("#close").click(function(){ 56 window.location.reload(true); 57 }); 58 59 } 60 else 61 { 62 //console.log(result.errors); 63 for (var key in result.errors) 64 { 65 console.log(result.errors[key]['field']); 66 $('#' + result.errors[key]['field']).html(result.errors[key]['content']); 67 } 68 } 69 } 70 }); 71 } 34 72 35 73 function changePassword(collaborator_id)
Note: See TracChangeset
for help on using the changeset viewer.