r53088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53087‎ | r53088 | r53089 >
Date:00:00, 11 July 2009
Author:dale
Status:deferred
Tags:
Comment:
IE fixes for add-media-wiz
Modified paths:
  • /branches/new-upload/phase3/includes/EditPage.php (modified) (history)
  • /branches/new-upload/phase3/js2/editPage.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libClipEdit/Jcrop/css/jquery.Jcrop.css (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/editPage.js
@@ -1,7 +1,6 @@
22 /*
33 * js2 style replacement for mediaWiki edit.js
44 */
5 -
65 //setup configuration vars:
76 if(!mwAddMediaConfig)
87 var mwAddMediaConfig = {
@@ -25,7 +24,7 @@
2625 init:function(){
2726 var _this = this;
2827 //@@todo check for new version of toolbar and add properly:
29 - if(typeof $j.fn.toolbar == 'undefined'){
 28+ if(typeof $j.fn.toolbar == 'undefined'){
3029 //add the add-media-wizard button for old toolbar:
3130 $j('#toolbar').append('<img style="cursor:pointer" id="btn-add-media-wiz" src="' + mv_skin_img_path + 'Button_add_media.png">');
3231 $j('#btn-add-media-wiz').addMediaWiz(
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/Jcrop/css/jquery.Jcrop.css
@@ -15,8 +15,8 @@
1616 height: 7px !important;
1717 border: 1px #eee solid;
1818 background-color: #333;
19 - *width: 9px;
20 - *height: 9px;
 19+ width: 9px;
 20+ height: 9px;
2121 }
2222
2323 .jcrop-tracker { width: 100%; height: 100%; }
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css
@@ -713,53 +713,6 @@
714714 .ui-widget-content a { text-decoration: underline; }
715715
716716
717 -
718 -/* jCROP css:*/
719 -.jcrop-holder
720 -{
721 - text-align: left;
722 -}
723 -
724 -.jcrop-vline, .jcrop-hline
725 -{
726 - font-size: 0;
727 - position: absolute;
728 - background: white url('images/Jcrop.gif') top left repeat;
729 - /*
730 - opacity: .5;
731 - *filter:alpha(opacity=50);
732 - */
733 -}
734 -.jcrop-vline { height: 100%; width: 1px !important; }
735 -.jcrop-hline { width: 100%; height: 1px !important; }
736 -.jcrop-handle {
737 - font-size: 1px;
738 - width: 7px !important;
739 - height: 7px !important;
740 - border: 1px #eee solid;
741 - background-color: #333;
742 - width: 9px;
743 - height: 9px;
744 -}
745 -
746 -.jcrop-tracker {
747 - background-color: gray;
748 - width: 100%; height: 100%;
749 -}
750 -
751 -.custom .jcrop-vline,
752 -.custom .jcrop-hline
753 -{
754 - background: yellow;
755 -}
756 -.custom .jcrop-handle
757 -{
758 - border-color: black;
759 - background-color: #C7BB00;
760 - -moz-border-radius: 3px;
761 - -webkit-border-radius: 3px;
762 -}
763 -
764717 .vol_container{
765718 z-index:99;
766719 width:23px;
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -234,7 +234,7 @@
235235
236236 //depencency mapping for css files for self contained included plugins:
237237 lcCssPath({
238 - '$j.Jcrop' : 'libClipEdit/jCrop/css/jquery.Jcrop.css',
 238+ '$j.Jcrop' : 'libClipEdit/Jcrop/css/jquery.Jcrop.css',
239239 '$j.fn.ColorPicker': 'libClipEdit/colorpicker/css/colorpicker.css'
240240 })
241241
@@ -649,7 +649,7 @@
650650 //if using mwAddOnloadHook we need to get jQuery into place (if its not already included)
651651 mvJsLoader.jQueryCheckFlag = true;
652652 mvJsLoader.addLoadEvent( func );
653 - };
 653+ };
654654 }
655655 /*
656656 * this function allows for targeted rewriting
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -493,9 +493,9 @@
494494 o+='</div>';
495495
496496 //search provider tabs based on "checked" and "enabled" and "combined tab"
497 - o+='<div id="rsd_results_container" style="top:0px;bottom:0px;left:0px;right:0px;></div>';
498 - js_log('should set: ' + this.target_container + ' to: ' + o);
 497+ o+='<div id="rsd_results_container" style="top:0px;bottom:0px;left:0px;right:0px;"></div>';
499498 $j(this.target_container).html( o );
 499+
500500 //add simple styles:
501501 $j(this.target_container + ' .rms_search_button').btnBind().click(function(){
502502 _this.runSearch();
@@ -660,7 +660,7 @@
661661 /*
662662 * checkForCopyURLPermission:
663663 * not really nessesary the api request to upload will return apopprirate error if the user lacks permission. or $wgAllowCopyUploads is set to false
664 - * (just here in case we want to issue a warning up front)
 664+ * (use this function if we want to issue a warning up front)
665665 */
666666 checkForCopyURLPermission:function( callback ){
667667 var _this = this;
@@ -669,7 +669,7 @@
670670 'data':{ 'action' : 'query', 'meta' : 'userinfo', 'uiprop' : 'rights' },
671671 'url': _this.local_wiki_api_url,
672672 'userinfo' : true
673 - }, function(data){
 673+ }, function(data){
674674 for( var i in data.query.userinfo.rights){
675675 var right = data.query.userinfo.rights[i];
676676 //js_log('checking: ' + right ) ;
@@ -696,6 +696,7 @@
697697 //combined results are harder to error handle just ignore that repo
698698 cp.sObj.loading = false;
699699 }else{
 700+ alert("should set tab to no-good");
700701 $j('#tab-' + this.disp_item).html( '<div style="padding:10px">'+ gM('no_import_by_url') +'</div>');
701702 }
702703 return false;
Index: branches/new-upload/phase3/includes/EditPage.php
@@ -360,7 +360,7 @@
361361 * the newly-edited page.
362362 */
363363 function edit() {
364 - global $wgOut, $wgRequest;
 364+ global $wgOut, $wgRequest, $wgEnableJS2system;
365365 // Allow extensions to modify/prevent this form or submission
366366 if ( !wfRunHooks( 'AlternateEdit', array( &$this ) ) ) {
367367 return;

Status & tagging log