Ugrás a tartalomhoz

Szerkesztő:Cirkalo1/monobook.css

A Wikipédiából, a szabad enciklopédiából

Megjegyzés: közzététel után frissítened kell a böngésződ gyorsítótárát, hogy lásd a változásokat.

  • Firefox / Safari: tartsd lenyomva a Shift gombot és kattints a Frissítés gombra a címsorban, vagy használd a Ctrl–F5 vagy Ctrl–R (Macen ⌘–R) billentyűkombinációt
  • Google Chrome: használd a Ctrl–Shift–R (Macen ⌘–Shift–R) billentyűkombinációt
  • Internet Explorer / Edge: tartsd nyomva a Ctrl-t, és kattints a Frissítés gombra, vagy nyomj Ctrl–F5-öt
  • Opera: Nyomj Ctrl–F5-öt
div.tm_group {background-color:#eff5ff;float:left;clear:both;border:solid #9090B0 1px;margin-bottom:4px; margin-top:4px;width:99%;}
div.tm_ie_group {width:97%;}
div.tm_formelem {background-color:transparent;float:left;padding:4px;margin:4px;margin-top:0px;page-break-inside:avoid;}
div.tm_main_frame {background-color:#ffffff;border:inset 2px #aaaaff;padding:4px;}
div.tm_header {background-color:#dfe5ef;padding:4px;vertical-align:middle;float:left;width:99%;}
div.tm_form {overflow:auto;width:100%;clear:both;}
div.tm_group_selector {background-color:#cfd5df;width:100%;border-bottom:1px solid #bbbbbb;padding:1px;clear:both;float:left}
div.tm_unknown_selector {background-color:#e5efdf;padding:1px;width:100%;overflow:hidden;clear:both;}
div.tm_footer {background-color:#dfe5ef;width:100%;}
div.tm_state {background-color:#efdfef;padding-left:4px;padding-right:4px;overflow:hidden;border:solid #bbbbbb 1px;}
div.tm_plugin_selector {background-color:#ffffff;padding:8px;overflow:hidden;border:2px outset blue;width:320px;}
div.tm_load_progress {background-color:#ffffff;padding:8px;overflow:hidden;border:2px outset blue;width:480px;}

textarea.tm_textarea, input.tm_input {font-family:monospace;font-style:normal;font-variant:normal;font-weight:normal;font-size:9pt;font-stretch:normal;}
textarea.tm_textarea_auto {width:auto !important;}
textarea.tm_textarea_max {width:100% !important;}
table.tm_table {background-color:transparent;}
table.tm_table_max {width:100% !important;}
tr.tm_tr {background-color:transparent;}
td.tm_td_label {background-color:transparent;width:5em;white-space:nowrap;}
td.tm_td_content {background-color:transparent;}
input.tm_input_max {width:100% !important;}

span.tm_opt_param {vertical-align:top;margin-right:8px;white-space:nowrap;}
span.tm_param {vertical-align:top;margin-right:8px;text-decoration:underline;white-space:nowrap;}
span.tm_template {font-weight:bold;float:left;}
span.tm_version {font-size:60%;color:#777777;float:right;}
input.tm_template {float:left;}

div.tm_switch_button {float:left;width:23px;height:22px;background-image:url(http://de.wikipedia.org/skins-1.5/common/images/button_template.png);background-repeat:no-repeat;font-size:9px;font-weight:bold;color:black;text-align:center;padding-top:2px;cursor:pointer;margin-right:2px;}
div.tm_switch_button:hover {float:left;width:23px;height:22px;background-image:url(http://de.wikipedia.org/skins-1.5/common/images/button_template.png);background-repeat:no-repeat;font-size:9px;font-weight:bold;color:yellow;text-align:center;padding-top:2px;cursor:pointer;margin-right:2px;}

a.tm_button {background-image:none !important;text-decoration:none !important;font-weight:normal !important;color:black !important;page-break-inside:avoid;float:left;border:1px outset black;}
a.tm_selector {font-size:70%;padding:2px;margin:1px;}
a.tm_group_selector {background-color:#dfe5ef !important;}
a.tm_group_selector:hover {background-color:#eff5ff !important;}
a.tm_unknown_selector {background-color:#e5efdf !important;}
a.tm_unknown_selector:hover {background-color:#f5ffef !important;}
a.tm_v_selector {padding:4px;margin:2px;clear:both;}
a.tm_plugin_selector {background-color:#fefeff !important;}
a.tm_plugin_selector:hover {background-color:#dededf !important;}
a.tm_cancel_button {background-color:#ffeeee !important;}
a.tm_cancel_button:hover {background-color:#dfcece !important;}

h3.tm_group_heading {margin-top:2px;margin-left:2px;}
input.tm_error, select.tm_error {background-color:#ffc0c0;}
a.tm_toolbar {border-width:2px;border-color:gray;padding-left:3px;padding-right:3px;margin:0px;margin-right:4px;background-color:#BDCEE6 !important;vertical-align:bottom;}
a.tm_toolbar:hover {border-width:2px;border-color:gray;padding-left:3px;padding-right:3px;margin:0px;margin-right:4px;background-color:#BDDEFF !important;vertical-align:bottom;}
a.tm_toolbar:active {border:1px inset black;padding:1px;padding-left:5px;padding-right:3px;margin:0px;margin-right:4px;background-color:#BDDEFF !important;vertical-align:bottom;color:#9090ff !important;}


// category insert script
 
// TODO lehessen megadni egyéni kezdőkategóriát shift-klikkre
//      szebb hibakezelés
//      rendes kurzor ( .CategoryTreeLabel { cursor: pointer; } )
//      ESC gombra bezárás
//      IE megeszi az újsort
//      pozicionálás (mi van, ha felül van a preview?)
//      kategória címe + fel gomb
//      WikEd cuccok külön fájlba
 
if(wgAction == 'edit' || wgAction == 'submit') {
   if(typeof categoryTreeCollapseMsg == "undefined") var categoryTreeCollapseMsg = "összecsuk";
   if(typeof categoryTreeExpandMsg == "undefined") var categoryTreeExpandMsg = "kinyit";
   if(typeof categoryTreeLoadMsg == "undefined") var categoryTreeLoadMsg = "load";
   if(typeof categoryTreeLoadingMsg == "undefined") var categoryTreeLoadingMsg = "töltés";
   if(typeof categoryTreeNothingFoundMsg == "undefined") var categoryTreeNothingFoundMsg = "nincs találat";
   if(typeof categoryTreeNoSubcategoriesMsg == "undefined") var categoryTreeNoSubcategoriesMsg = "nincs alkategória.";
   if(typeof categoryTreeNoPagesMsg == "undefined") var categoryTreeNoPagesMsg = "nincs cikk vagy alkategória."; 
 
   var ciDefaultCategory = "Kategóriák";
   var ciStyleSheet = wgServer + wgScriptPath + "/extensions/CategoryTree/CategoryTree.css";
 
   // read starting category from cookie
   var results = document.cookie.match("ciStart=(.*?)(;|$)");
   if (results) var ciStartingCategory = unescape(results[1]);
   else var ciStartingCategory = ciDefaultCategory;
   var ciMode = 0;
   // FIXME
   var ciFrame;
   var ciKey;
   var ciTrail;
   var ciTextRange;
   var ciError = false;
   var ciWikEdObj;
 
   if(document.createStyleSheet) {
      document.createStyleSheet(ciStyleSheet);
   } else {
      document.write('<link rel="stylesheet" type="text/css" href="' + ciStyleSheet + '">');
   }
 
   function ciGetDialog() {
      ciFrame = document.getElementById('catInsertFrame');
      if(!ciFrame) {
         ciFrame = document.createElement('div');
         ciFrame.id = 'catInsertFrame';
         ciFrame.style.position = "absolute";
         ciFrame.style.zIndex = "3";
         ciFrame.style.border = "solid #FFBE20 1px";
         ciFrame.style.background = "#FFFAEF";
         ciFrame.style.padding = "0.5em 1.5em 0.5em 0.5em";
         ciFrame.style.fontSize = "12px";
         ciFrame.onkeypress = function(e) { 
            if((event) ? 
                  (event.keyCode == 27) : // IE
                  (e.keyCode == e.DOM_VK_ESCAPE) // FF
               ) ciCloseDialog();
         }
 
         if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
         var box = document.getElementById('wikEdFrameOuter');
         } else {
            var box = document.getElementById('wpTextbox1');
         }
         box.parentNode.insertBefore(ciFrame, box);
 
         var x = document.createElement('div');
         x.id = 'catInsertClose';
         x.style.position = 'absolute';
         x.style.top = '2px';
         x.style.right = '2px';
         // x.style.width = x.style.height = '1em';
         x.style.textAlign = 'center';
         x.style.verticalAlign = 'middle';
         x.style.padding = '1px 3px';
         x.style.border = '1px solid black'; 
         x.style.background = 'white';
         // x.style.fontFamily = 'monospace';
         // x.style.fontWeight = 'bold';
         x.style.fontFamily = 'Verdana, sans-serif';
         x.style.cursor = 'pointer';
         x.appendChild(document.createTextNode('x'));
         x.onclick = ciCloseDialog;
         ciFrame.appendChild(x);
      }
 
      var ciDiv = document.getElementById('catInsertBody');
      if(!ciDiv) {
         ciDiv = document.createElement('div');
         ciDiv.id = 'catInsertBody';
         ciFrame.appendChild(ciDiv);
      }
      ciFrame.style.display = 'block';
      return ciDiv;
   }
 
   function ciCloseDialog() {
      ciFrame.style.display = 'none';
      if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
         wikEdFrameWindow.focus();         
      } else {
         document.editform.wpTextbox1.focus();
      }
   }
 
   function ciNextDiv(e) {
      var n= e.nextSibling;
      while ( n && ( n.nodeType != 1 || n.nodeName != 'DIV') ) {
         //alert('nodeType: ' + n.nodeType + '; nodeName: ' + n.nodeName);
         n= n.nextSibling;
      }
 
      return n;
   }
 
   function ciExpandNode(cat, mode, lnk) {
      var div= ciNextDiv( lnk.parentNode.parentNode );
 
      div.style.display= 'block';
      lnk.innerHTML= '&ndash;';
      lnk.title= categoryTreeCollapseMsg;
      lnk.onclick= function() { ciCollapseNode(cat, mode, lnk) }
 
      if (lnk.className != "CategoryTreeLoaded") {
         ciLoadNode(cat, mode, lnk, div);
      }
   }
 
   function ciCollapseNode(cat, mode, lnk) {
      var div= ciNextDiv( lnk.parentNode.parentNode );
 
      div.style.display= 'none';
      lnk.innerHTML= '+';
      lnk.title= categoryTreeExpandMsg;
      lnk.onclick= function() { ciExpandNode(cat, mode, lnk) }
   }
 
   function ciLoadNode(cat, mode, lnk, div) {
      div.style.display= 'block';
      lnk.className= 'CategoryTreeLoaded';
      lnk.innerHTML= '&ndash;';
      lnk.title= categoryTreeCollapseMsg;
      lnk.onclick= function() { ciCollapseNode(cat, mode, lnk); }
 
      ciLoadChildren(cat, mode, div);
   }
 
   function ciLoadChildren(cat, mode, div) {
      div.innerHTML= '<i class="CategoryTreeNotice">' + categoryTreeLoadingMsg + '</i>';
      function f( request ) {
         result= request.responseText;
         result= result.replace(/^\s+|\s+$/, '');
 
         if (request.status != 200) {
            if(ciError == false) { // show default list on error
               sajax_debug('Error loading ' + cat + ': ' + request.status + " " + request.statusText + ": " + result);
               ciLoadChildren(ciStartingCategory,ciMode,ciGetDialog());
            } else { // avoid infinite cycle
               result= "<div class='error'> " + request.status + " " + request.statusText + ": " + result + "</div>";
               ciError = false;
            }
         }
 
         if ( result == '' ) {
            result= '<i class="CategoryTreeNotice">';
 
            if ( mode == 0 ) result= categoryTreeNoSubcategoriesMsg;
            else if ( mode == 10 ) result= categoryTreeNoPagesMsg;
            else result= categoryTreeNothingFoundMsg;
 
            result+= '</i>';
         }
 
         result = result.replace(/categoryTreeExpandNode/g, 'ciExpandNode');
         // result = result.replace(/categoryTreeExpandNode/g, 'ciLoadChildren'); // replace, don't expand
         result = result.replace(/href="\/wiki\/[^"]*">([^<]*)/g, 'onclick="ciInsertCategory(\'$1\')">$1');
         result = result.replace(/##LOAD##/g, categoryTreeExpandMsg);
         div.innerHTML = result;
      }
 
      sajax_do_call( "efCategoryTreeAjaxWrapper", [cat, mode] , f );
   }
 
   function ciInsertCategory(cat) {
      var categoryLink = '[' + '[Kategória:' + cat + ciKey + ']' + ']' + ciTrail;
      if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
         ciWikEdObj.changed.plain = categoryLink;
         ciWikEdObj.changed.keepSel = true;
         wikEdLastVersion = null;
         ciWikEdObj.html = ciWikEdObj.changed.plain;
         if (wikEdHighlightSyntax == true) {
            WikEdHighlightSyntax(ciWikEdObj);
         } else {
            ciWikEdObj.html = ciWikEdObj.html.replace(/(\t)/g, '<span class="wikEdTabPlain">$1</span><!--wikEdTabPlain-->');
         }
         ciWikEdObj.sel.removeAllRanges();
         ciWikEdObj.sel.addRange(ciWikEdObj.changed.range);
         WikEdFrameExecCommand('inserthtml', ciWikEdObj.html);
         wikEdFrameDOMCache = null;
         wikEdFrameWindow.focus();
         if (wikEdHighlightSyntax == true) {
            WikEdFollowLinks();
         }
      } else {
         var textarea = document.editform.wpTextbox1;
         textarea.focus();
         if (document.selection && document.selection.createRange) { // IE, Opera
            if (document.documentElement && document.documentElement.scrollTop) {
               var winScroll = document.documentElement.scrollTop
            } else if (document.body) {
               var winScroll = document.body.scrollTop;
            }
            ciTextRange.text = categoryLink;
            if (document.documentElement && document.documentElement.scrollTop) {
               document.documentElement.scrollTop = winScroll;
            } else if (document.body){ 
               document.body.scrollTop = winScroll;
            }
         } else if(textarea.selectionStart || textarea.selectionStart == '0') { // Gecko-based
            var textScroll = textarea.scrollTop;
            var selStart = textarea.selectionStart;
            textarea.value = textarea.value.substring(0, selStart)
                           + categoryLink
                           + textarea.value.substring(textarea.selectionEnd, textarea.value.length);
            textarea.selectionStart = textarea.selectionEnd = selStart + categoryLink.length;
            textarea.scrollTop = textScroll;
         }
      }
      ciFrame.style.display = 'none';
   }
 
   function ciButtonClicked() {
      if(arguments.length) var e = arguments[0]; // FIXME
      else var e = event;
      if (typeof(e.shiftKey) != "undefined") var shift = e.shiftKey;
      else var shift = e.modifiers & Event.SHIFT_MASK;
      if (shift) { // set default starting category
         var start = prompt("Induló kategória: ", ciStartingCategory);
         if(start) {
            ciStartingCategory = start;
            document.cookie = 'ciStart='+escape(start);
         } else if (start === "") {
            ciStartingCategory = ciDefaultCategory;
            document.cookie = 'ciStart=; expires=Thu, 01-Jan-1970 00:00:01 GMT;'; // delete cookie
         }
         return;
      }
      if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
         ciWikEdObj = {};
          ciWikEdObj.changed = {};
         WikEdGetText(ciWikEdObj, 'selection');
         ciWikEdObj.changed = ciWikEdObj.selection;
         var selection = ciWikEdObj.selection.plain;
      } else {
         var textarea = document.editform.wpTextbox1;
         if (document.selection && document.selection.createRange) { // IE, Opera
            textarea.focus();
            ciTextRange = document.selection.createRange();
            var selection = ciTextRange.text;
         } else if(textarea.selectionStart || textarea.selectionStart == '0') { // Gecko-based
            var selection = textarea.value.substring(textarea.selectionStart, textarea.selectionEnd);
         }
      }
      ciKey = ciTrail = '';
      if(!selection) { // use ciStartingCategory as default
         selection = ciStartingCategory;
      } else {
         var match = selection.match(/(\s+)$/);
         if (match && match.length >= 2) { // allow trailing whitespace
            selection = selection.substring(0, selection.length - (match[1].length));
            ciTrail = match[1];
         }
         match = selection.match(/\[\[.*(\|.*)]]$/);
         if(match && match.length >= 2) {
            ciKey = match[1];
         }
         selection = selection.replace(/^\[\[[Kk]ategória:/, '');
         selection = selection.replace(/(\|.*)?]]$/, '');
      }
      var div = ciGetDialog();
      ciFrame.focus();
      ciLoadChildren(selection,ciMode,div);
   }
 
   function ciInstallButton() {
      var toolbar = document.getElementById('toolbar');
      if (!toolbar) { return false; }
      mwInsertEditButton(toolbar, {
         "imageId": "insertCategory",
         "imageFile": 'http://upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png',
         "speedTip": "Kategória kiválasztása",
         "tagOpen": "",
         "tagClose": "",
         "sampleText": ""
      });
      var button = document.getElementById("insertCategory");
      button.onclick = ciButtonClicked;
   }
   hookEvent('load', ciInstallButton);
}