2 <script language="javascript" type="text/javascript">
9 mode : "specific_textareas",
10 editor_selector: /(profile-jot-text|prvmail-text)/,
11 plugins : "bbcode,paste,autoresize",
12 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
13 theme_advanced_buttons2 : "",
14 theme_advanced_buttons3 : "",
15 theme_advanced_toolbar_location : "top",
16 theme_advanced_toolbar_align : "center",
17 theme_advanced_blockformats : "blockquote,code",
18 paste_text_sticky : true,
19 entity_encoding : "raw",
20 add_unload_trigger : false,
21 remove_linebreaks : false,
22 force_p_newlines : false,
23 force_br_newlines : true,
24 forced_root_block : '',
26 content_css: "$baseurl/view/custom_tinymce.css",
27 theme_advanced_path : false,
28 setup : function(ed) {
30 ed.onKeyUp.add(function(ed, e) {
31 var txt = tinyMCE.activeEditor.getContent();
33 if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
34 $('#profile-jot-desc').html(ispublic);
37 $('#profile-jot-desc').html(' ');
41 $('#character-counter').removeClass('red');
42 $('#character-counter').removeClass('orange');
43 $('#character-counter').addClass('grey');
45 if((textlen > 140) && (textlen <= 420)) {
46 $('#character-counter').removeClass('grey');
47 $('#character-counter').removeClass('red');
48 $('#character-counter').addClass('orange');
51 $('#character-counter').removeClass('grey');
52 $('#character-counter').removeClass('orange');
53 $('#character-counter').addClass('red');
55 $('#character-counter').text(textlen);
58 ed.onInit.add(function(ed) {
59 ed.pasteAsPlainText = true;
66 <script type="text/javascript" src="include/ajaxupload.js" ></script>
68 var ispublic = '$ispublic';
69 $(document).ready(function() {
70 var uploader = new window.AjaxUpload(
72 { action: 'wall_upload/$nickname',
74 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
75 onComplete: function(file,response) {
76 tinyMCE.execCommand('mceInsertRawHTML',false,response);
77 $('#profile-rotator').hide();
81 var file_uploader = new window.AjaxUpload(
83 { action: 'wall_attach/$nickname',
85 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
86 onComplete: function(file,response) {
87 tinyMCE.execCommand('mceInsertRawHTML',false,response);
88 $('#profile-rotator').hide();
93 /*$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
95 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
96 selstr = $(this).text();
97 $('#jot-perms-icon').removeClass('unlock').addClass('lock');
98 $('#jot-public').hide();
99 $('.profile-jot-net input').attr('disabled', 'disabled');
102 $('#jot-perms-icon').removeClass('lock').addClass('unlock');
103 $('#jot-public').show();
104 $('.profile-jot-net input').attr('disabled', false);
107 }).trigger('change');*/
111 function deleteCheckedItems() {
114 $('.item-select').each( function() {
115 if($(this).is(':checked')) {
116 if(checkedstr.length != 0) {
117 checkedstr = checkedstr + ',' + $(this).val();
120 checkedstr = $(this).val();
124 $.post('item', { dropitems: checkedstr }, function(data) {
125 window.location.reload();
129 function jotGetLink() {
130 reply = prompt("$linkurl");
131 if(reply && reply.length) {
132 reply = bin2hex(reply);
133 $('#profile-rotator').show();
134 $.get('parse_url?url=' + reply, function(data) {
135 tinyMCE.execCommand('mceInsertRawHTML',false,data);
136 $('#profile-rotator').hide();
141 function jotGetVideo() {
142 reply = prompt("$utubeurl");
143 if(reply && reply.length) {
144 tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
148 function jotVideoURL() {
149 reply = prompt("$vidurl");
150 if(reply && reply.length) {
151 tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]');
155 function jotAudioURL() {
156 reply = prompt("$audurl");
157 if(reply && reply.length) {
158 tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]');
163 function jotGetLocation() {
164 reply = prompt("$whereareu", $('#jot-location').val());
165 if(reply && reply.length) {
166 $('#jot-location').val(reply);
170 function jotTitle() {
171 reply = prompt("$title", $('#jot-title').val());
172 if(reply && reply.length) {
173 $('#jot-title').val(reply);
177 function jotShare(id) {
178 $('#like-rotator-' + id).show();
179 $.get('share/' + id, function(data) {
180 tinyMCE.execCommand('mceInsertRawHTML',false,data);
181 $('#like-rotator-' + id).hide();
182 $(window).scrollTop(0);
186 function linkdropper(event) {
187 var linkFound = event.dataTransfer.types.contains("text/uri-list");
189 event.preventDefault();
192 function linkdrop(event) {
193 var reply = event.dataTransfer.getData("text/uri-list");
194 event.target.textContent = reply;
195 event.preventDefault();
196 if(reply && reply.length) {
197 $('#profile-rotator').show();
198 $.get('parse_url?url=' + reply, function(data) {
199 tinyMCE.execCommand('mceInsertRawHTML',false,data);
200 $('#profile-rotator').hide();
205 function jotClearLocation() {
206 $('#jot-coord').val('');
207 $('#profile-nolocation-wrapper').hide();