Current oav website
This commit is contained in:
6
dotclear._no/plugins/pages/js/_users_actions.js
Normal file
6
dotclear._no/plugins/pages/js/_users_actions.js
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';jQuery.fn.updatePagesPermissionsForm=function(){return this.each(function(){let perms={};const re=/^perm\[(.+?)\]\[(.+?)\]$/;for(let i=0;i<this.elements.length;i++){const e=this.elements[i];if(e.name==undefined){continue;}
|
||||
const prop=e.name.match(re);if(!prop){continue;}
|
||||
if(perms[prop[1]]==undefined){perms[prop[1]]={};}
|
||||
perms[prop[1]][prop[2]]=e;if(prop[2]=='admin'){if(e.checked){admin(e,perms,re);}
|
||||
$(e).on('click',function(){admin(this,perms,re);});}}
|
||||
function admin(E,perms,re){const P=E.name.match(re);perms[P[1]].pages.checked=E.checked;perms[P[1]].pages.disabled=E.checked;}});};$(function(){$('#permissions-form').updatePagesPermissionsForm();});
|
||||
5
dotclear._no/plugins/pages/js/list.js
Normal file
5
dotclear._no/plugins/pages/js/list.js
Normal file
@ -0,0 +1,5 @@
|
||||
'use strict';Object.assign(dotclear.msg,getData('pages_list'));dotclear.viewPostContent=function(line,action,e){action=action||'toggle';if($(line).attr('id')==undefined){return;}
|
||||
const postId=$(line).attr('id').substr(1);const lineId=`pe${postId}`;let tr=document.getElementById(lineId);if(!tr){dotclear.getEntryContent(postId,function(content){if(content){tr=document.createElement('tr');tr.id=lineId;const td=document.createElement('td');td.colSpan=$(line).children('td').length;td.className='expand';tr.appendChild(td);$(td).append(content);$(line).addClass('expand');line.parentNode.insertBefore(tr,line.nextSibling);}else{$(line).toggleClass('expand');}},{type:'page',clean:(e.metaKey)});}else{$(tr).toggle();$(line).toggleClass('expand');}};$(function(){$('#pageslist tr.line').prepend('<td class="expander"></td>');$('#form-entries tr:not(.line) th:first').attr('colspan',4);$.expandContent({line:$('#form-entries tr:not(.line)'),lines:$('#form-entries tr.line'),callback:dotclear.viewPostContent});$('.checkboxes-helpers').each(function(){const p=$('<p></p>');$(this).prepend(p);dotclear.checkboxesHelpers(p,undefined,'#pageslist td input[type=checkbox]','#form-entries #do-action');});$('#pageslist td input[type=checkbox]').enableShiftClick();dotclear.condSubmit('#pageslist td input[type=checkbox]','#form-entries #do-action');dotclear.responsiveCellHeaders(document.querySelector('#form-entries table'),'#form-entries table',3,true);$('#pageslist tr.line td:not(.expander)').on('mousedown',function(){$('#pageslist tr.line').each(function(){const td=this.firstChild;dotclear.viewPostContent(td.firstChild,td.firstChild.line,'close');});$('#pageslist tr:not(.line)').remove();});$('#pageslist').sortable({cursor:'move',stop:function(){$('#pageslist tr td input.position').each(function(i){$(this).val(i+1);});}});$('#pageslist tr').on('mouseenter',function(){$(this).css({'cursor':'move'});}).on('mouseleave',function(){$(this).css({'cursor':'auto'});});$('#pageslist tr td input.position').hide();$('#pageslist tr td.handle').addClass('handler');$('form input[type=submit]').on('click',function(){$('input[type=submit]',$(this).parents('form')).removeAttr('clicked');$(this).attr('clicked','true');});$('#form-entries').on('submit',function(){const action=$(this).find('select[name="action"]').val();let checked=false;if($('input[name="reorder"][clicked=true]').val()){return true;}
|
||||
$(this).find('input[name="entries[]"]').each(function(){if(this.checked){checked=true;}});if(!checked){return false;}
|
||||
if(action=='delete'){return window.confirm(dotclear.msg.confirm_delete_posts.replace('%s',$('input[name="entries[]"]:checked').length));}
|
||||
return true;});});
|
||||
1
dotclear._no/plugins/pages/js/page.js
Normal file
1
dotclear._no/plugins/pages/js/page.js
Normal file
@ -0,0 +1 @@
|
||||
'use strict';$(function(){Object.assign(dotclear.msg,getData('pages_page'));$('#comments').onetabload(function(){$.expandContent({line:$('#part-comments .comments-list tr:not(.line)'),lines:$('#part-comments .comments-list tr.line'),callback:dotclear.viewCommentContent});});});
|
||||
Reference in New Issue
Block a user