Draft v1
This commit is contained in:
6
PUB/js/ckeditor5.js
Normal file
6
PUB/js/ckeditor5.js
Normal file
File diff suppressed because one or more lines are too long
1
PUB/js/ckeditor5.js.map
Normal file
1
PUB/js/ckeditor5.js.map
Normal file
File diff suppressed because one or more lines are too long
5
PUB/js/ckeditor5.min.js
vendored
Normal file
5
PUB/js/ckeditor5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
34
PUB/js/le_crud.js
Normal file
34
PUB/js/le_crud.js
Normal file
@@ -0,0 +1,34 @@
|
||||
le_crud = {
|
||||
|
||||
rem: function(id,el_id)
|
||||
{
|
||||
u = window.location.href;
|
||||
el = document.querySelector(el_id);
|
||||
if (typeof el !=='object') return false;
|
||||
|
||||
data = {id:id,method:"remove_it"};
|
||||
|
||||
if(!confirm("Удалить статью?")) return false;
|
||||
|
||||
|
||||
fetch(u,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
}
|
||||
).then ((resp)=>{return resp.json()}).then
|
||||
((resp)=>{
|
||||
if (!resp.success) {alert('Произошла ошибка!'); return false;}
|
||||
el.remove();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
1
PUB/js/le_crud.min.js
vendored
Normal file
1
PUB/js/le_crud.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
le_crud={rem:function(id,el_id){return u=window.location.href,el=document.querySelector(el_id),"object"==typeof el&&(data={id:id,method:"remove_it"},!!confirm("Удалить статью?")&&void fetch(u,{method:"POST",body:JSON.stringify(data),headers:{"Content-Type":"application/json"}}).then(resp=>resp.json()).then(resp=>{if(!resp.success)return alert("Произошла ошибка!"),!1;el.remove()}))}};
|
||||
20334
PUB/js/tui-editor.js
Normal file
20334
PUB/js/tui-editor.js
Normal file
File diff suppressed because one or more lines are too long
28
PUB/js/tui-editor.min.js
vendored
Normal file
28
PUB/js/tui-editor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user