1/* jQuery DALEJ */ 2$(function(){ 3 4/* ---------------------------------------------- */ 5 // Czynnosci ON LOAD: 6 7 var isEditorFree = true; 8 var clonedEditor; 9 var threadId = $('.jsinfo').attr("data-thread"); 10 11 function iniCloned(cPlace, cLabel, cTitle, cBody, cMode, cNote, cMother_note){ //, cAddon, cMark){ 12 clonedEditor = $("#neContainer").find(".noteEditor").first().clone() 13 .insertAfter(cPlace).css("display","block"); 14 clonedEditor.find("textarea").attr("id","neBody"); 15 clonedEditor.find(".neClose").attr("id","neClose").on("click",function(){ 16 // Zamykanie edytora 17 if(!isEditorFree){ 18 removeArea(); 19 clonedEditor.css("display","none").remove(); 20 clonedEditor = null; 21 isEditorFree = true; 22 $(".noteoper button, .newNote").removeAttr("disabled"); 23 } 24 }); 25 clonedEditor.find(".neLabel").text(cLabel); 26 clonedEditor.find('input[name="threadid"]').val(threadId); 27 clonedEditor.find('input[name="mode"]').val(cMode); 28 clonedEditor.find('input[name="noteid"]').val(cNote); 29 clonedEditor.find('input[name="mother_note"]').val(cMother_note); 30 //clonedEditor.find('input[name="addonid"]').val(cAddon); 31 //clonedEditor.find('input[name="markid"]').val(cMark); 32 clonedEditor.find('input[name="title"]').val(cTitle); 33 clonedEditor.find('textarea[name="body"]').val(cBody); 34 35 if(cMode!="NOTE") { 36 clonedEditor.find(".neTitleCont").hide(); 37 clonedEditor.find(".neMailnow").hide(); 38 } 39 if(cMode!="MARK") { 40 clonedEditor.find('.neToggleButton').on("click",function(){ 41 toggleArea(); 42 }); 43 toggleArea(); 44 } else { 45 clonedEditor.find(".neToggleButton").css("visibility","hidden"); 46 } 47 clonedEditor[0].scrollIntoView(false); 48 $(".noteoper button, .newNote").attr("disabled","disabled"); 49 isEditorFree = false; 50 51 } 52 $(".newNote").click(function(){ 53 if(isEditorFree){ 54 var placeForEditor = $(this); 55 iniCloned(placeForEditor, "Pisz notkÄ", null, null, "NOTE", null, null); 56 } 57 }); 58 $(".improvenote").click(function(){ 59 // Poprawianie notki 60 if(isEditorFree){ 61 var noteUnit = $(this).parents(".noteunit"); 62 var origHtml = noteUnit.find(".notecont").html(); 63 var origTitle = noteUnit.find(".notetitle").text(); 64 var noteId = noteUnit.attr("data-noteid"); 65 iniCloned(noteUnit, "Popraw notkÄ", origTitle, origHtml, "NOTE", noteId, null); 66 } 67 }); 68 $(".subnote").click(function(){ 69 // Pisanie subnotki 70 if(isEditorFree){ 71 var noteUnit = $(this).parents(".noteunit"); 72 var noteId = noteUnit.attr("data-noteid"); 73 iniCloned(noteUnit, "Dopisz sub-notkÄ", null, null, "ADDON", null, noteId); 74 } 75 }); 76 $(".addonImprove").click(function(){ 77 // Poprawianie subnotki 78 if(isEditorFree){ 79 80 var noteUnit = $(this).parents(".noteunit"); 81 /*var noteId = noteUnit.attr("data-noteid"); 82 var addonId = $(this).parent().attr("data-addonid"); */ 83 var addonId = $(this).parent().attr("data-addonid"); 84 var origHtml = $(this).siblings(".addonBody").html(); 85 iniCloned(noteUnit, "Popraw sub-notkÄ", null, origHtml, "ADDON", addonId, null); 86 } 87 }); 88 89 90});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.