MediaWiki: Common.js: Unterschied zwischen den Versionen

Aus Semantic CorA
Wechseln zu: Navigation, Suche
 
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
/* Das folgende JavaScript wird für alle Benutzer geladen. */
 
/* Das folgende JavaScript wird für alle Benutzer geladen. */
/* Any JavaScript here will be loaded for all users on every page load. */
+
//<source lang="javascript">
// <source lang="javascript">
 
 
// This JavaScript will be loaded for all users on every page load.
 
// This JavaScript will be loaded for all users on every page load.
 
// Except for additions at the end, imported from en.wikipedia.org and modified (parts removed).
 
// Except for additions at the end, imported from en.wikipedia.org and modified (parts removed).
 
// for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history
 
// for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history
 +
 +
// Alias $j to jQuery for backwards compatibility
 +
window.$ = jQuery;
 +
// Attach to window and globally alias
 +
window.mw = window.mediaWiki = mw;
 +
 +
jQuery.fn.ignore = function(sel){
 +
  return this.clone().find(sel||">*").remove().end();
 +
};
  
 
$(window).load(function() {
 
$(window).load(function() {
 +
 +
jQuery('#firstHeading > span').html();
 +
  var myDiv =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title');
 +
 +
  if ( myDiv.length){
 +
        //you can now reuse  $myDiv here, without having to select it again.
 +
      var val =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim();
 +
      jQuery('#firstHeading > span').html(val);
 +
    }
 
// I changed rearranger image(by Adrian)
 
// I changed rearranger image(by Adrian)
  
     jQuery('img.rearrangerImage').attr('src','http://smw-cora.org/upload/Rearranger.png');
+
     jQuery('img.rearrangerImage').attr('src','http://interlinking-pictura.semantic-cora.org/upload/rearranger.png');
  
  
 
// I changed dull-blue-circle.png (from blue to orange) (by Adrian)
 
// I changed dull-blue-circle.png (from blue to orange) (by Adrian)
  
     jQuery('img.timeline-copyright').attr('src','http://smw-cora.org/upload/Copyright-vertical.png');
+
     jQuery('img.timeline-copyright').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png');
     jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://smw-cora.org/upload/Dull-blue-circle.png');
+
//    jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');
 +
 
 +
     jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');});
  
 
//I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian)
 
//I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian)
Zeile 22: Zeile 41:
 
             jQuery(this).css('border-left-color','rgb(247,102,0)');
 
             jQuery(this).css('border-left-color','rgb(247,102,0)');
 
         }         
 
         }         
 +
    });
 +
  // alert( jQuery('#firstHeading > span').html());
 
});
 
});
// I changed icon for resize image (by Adrian) 
 
//  jQuery('#buttondecreaseimagesize').attr('src','http://smw-cora.org/upload/Minus_size.png');
 
//  jQuery('#buttonincreaseimagesize').attr('src','http://smw-cora.org/upload/Plus_size.png');
 
 
 
// Eliminated <---Resize---> (by Adrian)
 
 
//    $("#SIAresizeDiv").contents().filter(function(){
 
//        return (this.nodeType == 3);
 
//    }).remove();
 
});
 
 
 
jQuery(document).ready(function() {
 
jQuery(document).ready(function() {
   var $j = jQuery.noConflict;
+
   var $ = jQuery.noConflict;
  // try to add the toolbar on uploading
+
var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title');
  var aa= jQuery('<a/>')
 
    .attr("href", "http://smw-cora.org/index.php/Main_Page").attr("id","poweredbyCora");
 
  jQuery("#footer-poweredbyico").append(aa);
 
  var img = jQuery('<img />').attr({ 'id': 'poc', 'src': 'http://smw-cora.org/upload/SC_Credit.png', 'alt':'Powered by CorA Project' }).appendTo(jQuery('#poweredbyCora'));
 
  
 
+
  if ( myDiv.length){
/*jQuery('.smwtimeline').find('img').each(function () {
+
      var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim();
  var curSrc = jQuery(this).attr('src');
+
      jQuery('#firstHeading > span').html(val);
  var class = jQuery(this).attr('class');
+
    }
  alert("yes");
+
  if ( class === '' ) {
 
      jQuery(this).attr('src', 'http://smw-cora.org/upload/dull-blue-circle.png');
 
  }
 
  if ( class === 'timeline-copyright' ) {
 
      jQuery(this).attr('src', 'http://example.com/brown.gif');
 
  }
 
 
});
 
});
  
jQuery('.smwtimeline').on('DOMNodeInserted ', 'img', function(){
+
//</source>
    alert("insert");
 
    jQuery(this).html('<b>yaay!</b>');
 
});*/
 
 
 
//Adrian - BEGIN - setting min-height of div.content - for push down #footer
 
 
 
      jQuery('#content').css('min-height', Math.max(jQuery('#content').height(), jQuery('#mw-panel').height()));
 
 
 
//Adrian - END - setting height of div.content
 
 
 
 
 
// edit tools update
 
// upload new icons for tools
 
if(wgAction == "edit"){
 
  jQuery('#mw-editbutton-bold').attr('src','http://smw-cora.org/upload/Button_bold.png');
 
  jQuery('#mw-editbutton-italic').attr('src','http://smw-cora.org/upload/Button_italic.png');
 
  jQuery('#mw-editbutton-link').attr('src','http://smw-cora.org/upload/Button_link.png');
 
  jQuery('#mw-editbutton-extlink').attr('src','http://smw-cora.org/upload/Button_extlink.png');
 
  jQuery('#mw-editbutton-headline').attr('src','http://smw-cora.org/upload/Button_headline.png');
 
  jQuery('#mw-editbutton-image').attr('src','http://smw-cora.org/upload/Button_image.png');
 
  jQuery('#mw-editbutton-media').attr('src','http://smw-cora.org/upload/Button_media.png');
 
  jQuery('#mw-editbutton-nowiki').attr('src','http://smw-cora.org/upload/Button_nowiki.png');
 
  jQuery('#mw-editbutton-signature').attr('src','http://smw-cora.org/upload/Button_sig.png');
 
  jQuery('#mw-editbutton-hr').attr('src','http://smw-cora.org/upload/Button_hr.png');
 
 
 
}
 
 
 
 
// </source>
 

Aktuelle Version vom 31. Januar 2018, 10:16 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */
//<source lang="javascript">
// This JavaScript will be loaded for all users on every page load.
// Except for additions at the end, imported from en.wikipedia.org and modified (parts removed).
// for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history

// Alias $j to jQuery for backwards compatibility
window.$ = jQuery;
// Attach to window and globally alias
window.mw = window.mediaWiki = mw;

jQuery.fn.ignore = function(sel){
  return this.clone().find(sel||">*").remove().end();
};

$(window).load(function() {

 jQuery('#firstHeading > span').html();
  var myDiv =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title');

   if ( myDiv.length){
        //you can now reuse  $myDiv here, without having to select it again.
       var val =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim();
       jQuery('#firstHeading > span').html(val);
    }
// I changed rearranger image(by Adrian)

    jQuery('img.rearrangerImage').attr('src','http://interlinking-pictura.semantic-cora.org/upload/rearranger.png');


// I changed dull-blue-circle.png (from blue to orange) (by Adrian)

    jQuery('img.timeline-copyright').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png');
//    jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');

    jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');});

//I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian)
    jQuery('div.timeline-band-layer-inner > div').each(function(){
        if(jQuery(this).css('border-left-color') == 'rgb(88, 160, 220)') {
             jQuery(this).css('border-left-color','rgb(247,102,0)');
        }        
    });
  // alert( jQuery('#firstHeading > span').html());
});
jQuery(document).ready(function() {
  var $ = jQuery.noConflict;
 var myDiv =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title');

   if ( myDiv.length){
       var val =  jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim();
       jQuery('#firstHeading > span').html(val);
    }
 
});

//</source>