Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
/** * This file holds the main javascript functions needed for avia-media uploads * * @author Christian "Kriesi" Budschedl * @copyright Copyright ( c ) Christian Budschedl * @link http://kriesi.at * @link http://aviathemes.com * @since Version 1.0 * @package AviaFramework */ function$ var avia_media = aviaUseCustomEditor: false aviaPostID: false insertContainer : false // bind the click event to all elements with the class avia_uploader $'.avia_uploader'live'click'function var title = thistitle idBased = ""; thistitle = ""; avia_mediaaviaPostID = thishashsubstring1; avia_mediaaviaUseCustomEditor = true; avia_mediainsertContainer = $thisparents'.avia_upload_container'; // ifavia_mediainsertContaineris'.avia_advanced_upload' idBased = "&avia_idbased="+ $'.avia_upload_input'avia_mediainsertContainerattr'name'; var label = $thisparents'.avia_upload_container'find'.avia_upload_insert_label'trigger'change'val; tb_show title'media-upload.php?post_id='+avia_mediaaviaPostID+idBased+'&avia_label='+encodeURIlabel+"&TB_iframe=true" ; return false; ; // bind the click event of the remove image links to the removing function $'.avia_remove_image'live'click'function var container = $thisparents'.avia_upload_container'; containerfind'.avia_upload_input'val''trigger'change'; containerfind'.avia_preview_pic'hide400function $thishtml""cssdisplay:"block"; ; return false; ; $'.avia_upload_input'live'blur'function var input = $this value = inputval image = '<img src ="'+value+'" alt="" />' div = inputparents'.avia_upload_container:eq(0)'find'.avia_preview_pic'; divhtml'<a href="#" class="avia_remove_image">remove</a>' + image; ; //changes the label of the "insert into post" button to better reflect the current action and hides the use as post-thumb button avia_mediaidBasedUpload; var newlabel = $'.avia_insert_button_label'val; ifnewlabel != "" && typeof newlabel == 'string' var savesendContainer = $".savesend"; ifsavesendContainerlength > 0 $".button"savesendContainervalnewlabel; $".wp-post-thumbnail"savesendContainercss'display''none'; //hijack the original uploader and replace it if a user clicks on one an avia_uploader windoworiginal_send_to_editor = windowsend_to_editor; ifavia_mediaaviaUseCustomEditor var container = avia_mediainsertContainer returned = $html img = returnedattr'src' || returnedfind'img'attr'src' || returnedattr'href'; containerfind'.avia_upload_input'valimg; containerfind'.avia_preview_pic'html'<a href="#" class="avia_remove_image">remove</a><img src='+img+' alt="" />'; tb_remove; avia_mediareset_uploader; else windoworiginal_send_to_editorhtml; ; //id based advanced upload var idbased = $'.avia_idbased'; ifidbasedlength > 0 idbased = idbasedval; var savesendContainer = $".savesend" insertInto = $".button"savesendContainer target = $"input[name="+idbased+"]"parentdocument imageTarget = $"#div_"+idbased+""parentdocument filter = $"#filter" label = $".avia_insert_button_label"; //add the id based and the insert name field as a form input so it gets sent in case the user uses the search or filter functions iffilterlength var filterInsert = filterfind"input[name=avia_idbased]" labelInsert = filterfind"input[name=avia_label]"; if!filterInsertlength filterprepend"<input type='hidden' name='avia_idbased' value='"+idbased+"'/>"; iflabellength && !labelInsertlength filterprepend"<input type='hidden' name='avia_label' value='"+labelval+"'/>"; insertIntounbind'click'bind'click'function var attachment_id = thisnamereplace/send\[/""replace/\]/""; $ajax type: "POST" url: windowajaxurl data: "action=avia_ajax_get_image&attachment_id="+attachment_id targetvalattachment_id; imageTargethtml'<a href="#" class="avia_remove_image">remove</a>'+msg; parenttb_remove; avia_mediareset_uploader; ; return false; ; //reset values for the next upload avia_mediaaviaUseCustomEditor = false; avia_mediaaviaPostID = false; avia_mediainsertContainer = false; ; $function $'#media-buttons a'clickavia_mediareset_uploader; avia_mediabind_click; avia_mediabind_blur; avia_mediabind_remove; avia_mediaidBasedUpload; avia_mediahijack_uploader; avia_mediachange_label; $".slidetoggle"live'mouseenter'avia_mediachange_label; ; jQuery; |