Changeset c6b84df for public/assets/js
- Timestamp:
- 10/21/21 23:45:59 (3 years ago)
- Branches:
- develop, master
- Children:
- 4b7e2d3
- Parents:
- 6b95845
- Location:
- public/assets/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
public/assets/js/app.js
r6b95845 rc6b84df 914 914 }); 915 915 916 $(".edit_ document_deparment").change(function() {916 $(".edit_folder_deparment").change(function() { 917 917 var archId = $("input[name='arch_id']"); 918 918 var currentText = archId.val().split("/")[1]; 919 919 var selectedId = $(this).find('option:selected').data('dept-code'); 920 920 921 if(currentText) 921 922 archId.val(selectedId + "/" + currentText); 922 923 else 924 archId.val(selectedId + "/"); 925 }); 926 927 $(".new_folder_deparment").change(function() { 928 var archId = $("input[name='arch_id']"); 929 var selectedId = $(this).find('option:selected').data('dept-code'); 930 923 931 archId.val(selectedId + "/"); 924 932 }); … … 1007 1015 }); 1008 1016 1017 function notifications() { 1018 1019 var url = "/dashboard/get-notifications"; 1020 var _token = $("meta[name='csrf-token']").attr("content"); 1021 1022 $.ajax({ 1023 url: url, 1024 type: "post", 1025 dataType: "json", 1026 data: { 1027 _token : _token, 1028 }, 1029 success: function(response) { 1030 1031 $(".dropdown-notifications a:not(:last)").remove(); 1032 $(".dropdown-notifications-unread .nav-unread").hide(); 1033 1034 var l = response.length; 1035 1036 if(hasNew(response)) { 1037 $(".dropdown-notifications .unreadNotificationsInfo").hide(); 1038 $(".dropdown-notifications-unread .nav-unread").show(); 1039 } 1040 1041 if(l == 0) { 1042 $(".dropdown-notifications .unreadNotificationsInfo").show(); 1043 } 1044 1045 if(l > 0) { 1046 $(".dropdown-notifications .unreadNotificationsInfo").hide(); 1047 } 1048 1049 for(var i=0; i<l; i++) { 1050 1051 var style = response[i].isRead ? "" : "background: #efefef; color: black;"; 1052 1053 var notificationItem = ` 1054 <a href="` + response[i].url + `" class="dropdown-item d-flex" style="` + style + `;"> 1055 <div> 1056 ` + response[i].message + ` 1057 <div class="small text-muted">` + response[i].ago + `</div> 1058 </div> 1059 </a>`; 1060 1061 $(".dropdown-notifications").prepend(notificationItem); 1062 } 1063 }, 1064 error: function(response) { 1065 console.log(response); 1066 } 1067 }); 1068 } 1069 1009 1070 $(document).on('click', '#btn-layout-builder', function () { 1010 1071 -
public/assets/js/examples/pages/user-list.js
r6b95845 rc6b84df 14 14 { 15 15 "orderable": false, 16 "targets": [0, 6]16 "targets": [0, 2] 17 17 } 18 18 ],
Note:
See TracChangeset
for help on using the changeset viewer.