MediaWiki:Onlyifediting.js: различия между версиями

Материал из RSB-Doc
Перейти к навигации Перейти к поиску
Eme (обсуждение | вклад)
Нет описания правки
YuSer (обсуждение | вклад)
Нет описания правки
 
(не показано 12 промежуточных версий 1 участника)
Строка 3: Строка 3:
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');


/*** css for CategoryTree ---------------------------------***/
document.write( '<link rel=\'stylesheet\' type=\'text/css\' '
              + ' href=\'/extensions/CategoryTree/CategoryTree.css\' />');
/*** for access to categories functions -------------------***/
document.write('<script type=\'text/javascript\' src=\''
            + '/extensions/CategoryTree/CategoryTree.js\'></script>');
/*** is functions for button category  tree----------------***/
  document.write('<script type="text/javascript" src="'  
  document.write('<script type="text/javascript" src="'  
             + '/extensions/CategoryTree/CategoryTree.js"></script>');
             + '/extensions/CategoryTree/GetCategoryTree_DIV.js"></script>');
 


function marque_tab()
function marque_tab()
Строка 18: Строка 28:
var image2 = document.createElement('img');
var image2 = document.createElement('img');
image2.width = 69;
image2.width = 69;
image2.height = 22;
//image2.height = 22;
image2.src = '/images/d/d1/Button-wikifikator.png';
image2.src = '/images/d/d1/Button-wikifikator.png';
image2.border = 0;
image2.border = 0;
Строка 29: Строка 39:
}
}
toolbar.appendChild(image2);
toolbar.appendChild(image2);
}
function ShowPopUpCategoryList()
{
var code = '<div id=\'popUPCategoryList\' class=\'CategoryTreeSection\'>'
+ '<div class=\'CategoryTreeItem\'>'
+ '<span class=\'CategoryTreeBullet\'>'
+ '[<a href=\'#\' onclick=\"this.href=\'javascript:void(0)\'; '
+ 'categoryTreeExpandNode(\'Все\',\'0\',this);\" title=\'развернуть\'>+</a>] </span>'
+ '<a class=\'CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory\' '
+ 'href=\'/index.php/'
+ '%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F'
+ ':%D0%92_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5\'>'
+ 'Все</a></div>'
+ '<div class=\'CategoryTreeChildren\' style=\'display:none\'></div></div>'
var d = document.createElement('DIV');
d.innerHTML = code;
d.style.background='#eeeeee';
d.style.position='absolute';
d.style.zIndex=99;
d.style.height=400;
d.style.width=300;
d.style.left=1;
d.style.top=1;
document.body.appendChild(d);
}
function AddButtonsOnToolBar()
{
AddFuncButton( 'http://transfer/skins/common/images/button_insert_category.bmp'
            , 'Категория'
            , ShowPopUpGetSettings );
}
}


addOnloadHook(marque_tab);
addOnloadHook(marque_tab);
addOnloadHook(ShowPopUpCategoryList);

Текущая версия от 08:52, 7 апреля 2010

 document.write('<script type="text/javascript" src="' 
             + '/index.php?title=MediaWiki:Wikificator.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/*** css for CategoryTree ---------------------------------***/
 document.write( '<link rel=\'stylesheet\' type=\'text/css\' '
               + ' href=\'/extensions/CategoryTree/CategoryTree.css\' />');

/*** for access to categories functions -------------------***/
 document.write('<script type=\'text/javascript\' src=\'' 
             + '/extensions/CategoryTree/CategoryTree.js\'></script>');

/*** is functions for button category  tree----------------***/
 document.write('<script type="text/javascript" src="' 
             + '/extensions/CategoryTree/GetCategoryTree_DIV.js"></script>');


function marque_tab()
{
var toolbar = document.getElementById('toolbar');
if (!toolbar) return false;

var textbox = document.getElementById('wpTextbox1');
if (!textbox) return false;

if (!document.selection && textbox.selectionStart == null) return false;

var image2 = document.createElement('img');
image2.width = 69;
//image2.height = 22;
image2.src = '/images/d/d1/Button-wikifikator.png';
image2.border = 0;
image2.alt = 'Викификатор';
image2.title = 'Викификатор';
image2.style.cursor = 'pointer';
image2.onclick = function() {
  Wikify();
  return false;
}
toolbar.appendChild(image2);
}

addOnloadHook(marque_tab);