Changeset 1405 for trunk/wiki/extensions/Help/Help_Guide.php
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/omcollab_zhongzhen2 merged: 1401-1404
- Property svn:mergeinfo changed
-
trunk/wiki
- Property svn:mergeinfo changed
/branches/omcollab_zhongzhen2/wiki merged: 1401-1404
- Property svn:mergeinfo changed
-
trunk/wiki/extensions/Help/Help_Guide.php
r1400 r1405 30 30 // Add javascript to Edit page 31 31 $wgOut->addHTML("<script> 32 function changeIcon(obj) { 33 var source = obj.src; 34 if (source.search('button_help') > -1) { 35 obj.src = 'extensions/Help/images/button_hide.gif'; 36 $('#shadow').css('display', 'block'); 37 $('#wpTextbox1').css('width', '60%'); 38 } 39 else { 40 obj.src = 'extensions/Help/images/button_help.gif'; 41 $('#shadow').css('display', 'none'); 42 $('#wpTextbox1').css('width', '92%'); 43 } 32 var textwidth = new Number(); 33 function showHelp() { 34 textwidth = $('#editform').width() - $('#shadow').width() - 30; 35 $('.button_class').css('display', 'none'); 36 $('#shadow').css('display', 'block'); 37 $('#wpTextbox1').css('width', textwidth.toString() + 'px'); 38 $('#wpTextbox1___Frame').css('width', textwidth.toString() + 'px'); 44 39 } 40 41 function hideHelp() { 42 textwidth = $('#editform').width() - $('.button_class').width() - 30; 43 $('.button_class').css('display', 'block'); 44 $('#shadow').css('display', 'none'); 45 $('#wpTextbox1').css('width', textwidth.toString() + 'px'); 46 $('#wpTextbox1___Frame').css('width', textwidth.toString() + 'px'); 47 } 48 49 $(window).resize(function() { 50 if ($('#shadow').css('display') == 'block') 51 textwidth = $('#editform').width() - $('#shadow').width() - 30; 52 else 53 textwidth = $('#editform').width() - $('.button_class').width() - 30; 54 $('#wpTextbox1').css('width', textwidth.toString() + 'px'); 55 $('#wpTextbox1___Frame').css('width', textwidth.toString() + 'px'); 56 }); 57 58 $(function() { 59 textwidth = $('#editform').width() - $('#shadow').width() - 30; 60 $('#wpTextbox1').css('display', 'block'); 61 $('#wpTextbox1').css('width', textwidth.toString() + 'px'); 62 $('#wpTextbox1___Frame').css('width', textwidth.toString() + 'px'); 63 }); 64 45 65 </script>"); 46 66 … … 78 98 79 99 //Help content area 80 $editPage->editFormTextBeforeContent .= '<div id="shadow"><div id="helpArea">' . $html . '</div></div>'; 100 $editPage->editFormTextBeforeContent .= '<div id="shadow"><div id="helpArea"> 101 <div id="closeButton"><img src="extensions/Help/images/button_close.gif" style="cursor: pointer; border: 0;" onclick="hideHelp()"/></div>' . $html . '</div></div>'; 81 102 // Help button 82 $editPage->editFormTextBeforeContent .= '<div class="button_class"><img src="extensions/Help/images/button_hide.gif" style="cursor: pointer;" onclick="changeIcon(this)"/></div>'; 83 103 $editPage->editFormTextBeforeContent .= '<div class="button_class"><img src="extensions/Help/images/button_help.gif" style="cursor: pointer;" onclick="showHelp()"/></div>'; 84 104 return true; 85 105 }
Note: See TracChangeset
for help on using the changeset viewer.
