מדיה ויקי:Gadget-mobile-feedback.js: הבדלים בין גרסאות בדף

מתוך חב"דפדיה, אנציקלופדיה חב"דית חופשית
קפיצה לניווט קפיצה לחיפוש
(יצירת דף עם התוכן "if (mw.util.getParamValue('wpSummary')) { $("textarea").val('=='+mw.util.getParamValue('wpSummary')+'=='+'\n'+mw.util.getParamValue('wpTextbox1')); $(".conti...")
 
אין תקציר עריכה
 
(2 גרסאות ביניים של אותו משתמש אינן מוצגות)
שורה 8: שורה 8:
{
{
   $('<h2 class="section_heading" id="feedback_heading"><span class="mw-headline">משוב</span></h2><div class="content_block" id="feedback_block"><form id="commentbox" method="post" action="'+mw.config.get('wgServer') + mw.config.get('wgScriptPath')+'/index.php?section=new&action=edit&preview=yes&title='+mw.util.wikiUrlencode('שיחה:'+mw.config.get('wgTitle'))+'"><input type="text" name="wpSummary" id="feedbackTitle" placeholder="כותרת המשוב" maxlength="50" /><br /><textarea name="wpTextbox1" rows="7" cols="80" id="feedbackTextArea" placeholder="כאן ניתן לכתוב משוב על הערך"></textarea><br /><input type="submit" id="feedbackBtn" value="שליחה" /></form></div>').insertBefore($('#mw-mf-last-modified'));
   $('<h2 class="section_heading" id="feedback_heading"><span class="mw-headline">משוב</span></h2><div class="content_block" id="feedback_block"><form id="commentbox" method="post" action="'+mw.config.get('wgServer') + mw.config.get('wgScriptPath')+'/index.php?section=new&action=edit&preview=yes&title='+mw.util.wikiUrlencode('שיחה:'+mw.config.get('wgTitle'))+'"><input type="text" name="wpSummary" id="feedbackTitle" placeholder="כותרת המשוב" maxlength="50" /><br /><textarea name="wpTextbox1" rows="7" cols="80" id="feedbackTextArea" placeholder="כאן ניתן לכתוב משוב על הערך"></textarea><br /><input type="submit" id="feedbackBtn" value="שליחה" /></form></div>').insertBefore($('#mw-mf-last-modified'));
   $('#feedback_heading').click(function(){$(this).toggleClass('openSection'); $('#feedback_block').toggleClass('openSection')});
   $('#feedback_heading').click(function(){$(this).toggleClass('openSection');});
   $('#commentbox').submit(function(){
   $('#commentbox').submit(function(){
     if(!($('#feedbackTextArea').attr('value').indexOf('~~'+'~~')+1)) $('#feedbackTextArea').attr('value',$('#feedbackTextArea').attr('value')+'{{'+'משוב}} ~~'+'~~');//sign in the end
     if(!($('#feedbackTextArea').attr('value').indexOf('~~'+'~~')+1)) $('#feedbackTextArea').attr('value',$('#feedbackTextArea').attr('value')+'{{'+'משוב}} ~~'+'~~');//sign in the end

גרסה אחרונה מ־01:55, 29 במרץ 2015

if (mw.util.getParamValue('wpSummary'))
{
  $("textarea").val('=='+mw.util.getParamValue('wpSummary')+'=='+'\n'+mw.util.getParamValue('wpTextbox1'));
  $(".continue").click();
  $(".summary").val('משוב');
}
else
{
  $('<h2 class="section_heading" id="feedback_heading"><span class="mw-headline">משוב</span></h2><div class="content_block" id="feedback_block"><form id="commentbox" method="post" action="'+mw.config.get('wgServer') + mw.config.get('wgScriptPath')+'/index.php?section=new&action=edit&preview=yes&title='+mw.util.wikiUrlencode('שיחה:'+mw.config.get('wgTitle'))+'"><input type="text" name="wpSummary" id="feedbackTitle" placeholder="כותרת המשוב" maxlength="50" /><br /><textarea name="wpTextbox1" rows="7" cols="80" id="feedbackTextArea" placeholder="כאן ניתן לכתוב משוב על הערך"></textarea><br /><input type="submit" id="feedbackBtn" value="שליחה" /></form></div>').insertBefore($('#mw-mf-last-modified'));
  $('#feedback_heading').click(function(){$(this).toggleClass('openSection');});
  $('#commentbox').submit(function(){
    if(!($('#feedbackTextArea').attr('value').indexOf('~~'+'~~')+1)) $('#feedbackTextArea').attr('value',$('#feedbackTextArea').attr('value')+'{{'+'משוב}} ~~'+'~~');//sign in the end
    if($('#feedbackTitle').attr('value') == 'כותרת המשוב' || $('#feedbackTitle').attr('value') == '') $('#feedbackTitle').attr('value',defaultFeedbackTitle());//default title
    return true;
  });  
}