2 <script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
3 <script language="javascript" type="text/javascript">
10 mode : "specific_textareas",
11 editor_selector: /(profile-jot-text|prvmail-text)/,
12 plugins : "bbcode,paste,fullscreen,autoresize",
13 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code,fullscreen",
14 theme_advanced_buttons2 : "",
15 theme_advanced_buttons3 : "",
16 theme_advanced_toolbar_location : "top",
17 theme_advanced_toolbar_align : "center",
18 theme_advanced_blockformats : "blockquote,code",
19 //theme_advanced_resizing : true,
20 //theme_advanced_statusbar_location : "bottom",
21 paste_text_sticky : true,
22 entity_encoding : "raw",
23 add_unload_trigger : false,
24 remove_linebreaks : false,
25 force_p_newlines : false,
26 force_br_newlines : true,
27 forced_root_block : '',
29 content_css: "$baseurl/view/custom_tinymce.css",
30 theme_advanced_path : false,
31 setup : function(ed) {
33 ed.onKeyUp.add(function(ed, e) {
34 var txt = tinyMCE.activeEditor.getContent();
36 if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
37 $('#profile-jot-desc').html(ispublic);
40 $('#profile-jot-desc').html(' ');
44 $('#character-counter').removeClass('red');
45 $('#character-counter').removeClass('orange');
46 $('#character-counter').addClass('grey');
48 if((textlen > 140) && (textlen <= 420)) {
49 $('#character-counter').removeClass('grey');
50 $('#character-counter').removeClass('red');
51 $('#character-counter').addClass('orange');
54 $('#character-counter').removeClass('grey');
55 $('#character-counter').removeClass('orange');
56 $('#character-counter').addClass('red');
58 $('#character-counter').text(textlen);
61 ed.onInit.add(function(ed) {
62 ed.pasteAsPlainText = true;
69 <script type="text/javascript" src="include/ajaxupload.js" ></script>
71 var ispublic = '$ispublic';
72 $(document).ready(function() {
73 $("#profile-jot-acl-wrapper").hide();
74 $("a#jot-perms-icon").fancybox({
75 'transitionIn' : 'none',
76 'transitionOut' : 'none'
78 var uploader = new window.AjaxUpload(
80 { action: 'wall_upload/$nickname',
82 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
83 onComplete: function(file,response) {
84 tinyMCE.execCommand('mceInsertRawHTML',false,response);
85 $('#profile-rotator').hide();
89 var file_uploader = new window.AjaxUpload(
91 { action: 'wall_attach/$nickname',
93 onSubmit: function(file,ext) { $('#profile-rotator').show(); },
94 onComplete: function(file,response) {
95 tinyMCE.execCommand('mceInsertRawHTML',false,response);
96 $('#profile-rotator').hide();
100 $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
102 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
103 selstr = $(this).text();
104 $('#jot-perms-icon').removeClass('unlock').addClass('lock');
105 $('#jot-public').hide();
106 $('.profile-jot-net input').attr('disabled', 'disabled');
109 $('#jot-perms-icon').removeClass('lock').addClass('unlock');
110 $('#jot-public').show();
111 $('.profile-jot-net input').attr('disabled', false);
114 }).trigger('change');
118 function deleteCheckedItems() {
121 $('.item-select').each( function() {
122 if($(this).is(':checked')) {
123 if(checkedstr.length != 0) {
124 checkedstr = checkedstr + ',' + $(this).val();
127 checkedstr = $(this).val();
131 $.post('item', { dropitems: checkedstr }, function(data) {
132 window.location.reload();
136 function jotGetLink() {
137 reply = prompt("$linkurl");
138 if(reply && reply.length) {
139 reply = bin2hex(reply);
140 $('#profile-rotator').show();
141 $.get('parse_url?url=' + reply, function(data) {
142 tinyMCE.execCommand('mceInsertRawHTML',false,data);
143 $('#profile-rotator').hide();
148 function jotGetVideo() {
149 reply = prompt("$utubeurl");
150 if(reply && reply.length) {
151 tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]');
155 function jotVideoURL() {
156 reply = prompt("$vidurl");
157 if(reply && reply.length) {
158 tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]');
162 function jotAudioURL() {
163 reply = prompt("$audurl");
164 if(reply && reply.length) {
165 tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]');
170 function jotGetLocation() {
171 reply = prompt("$whereareu", $('#jot-location').val());
172 if(reply && reply.length) {
173 $('#jot-location').val(reply);
177 function jotTitle() {
178 reply = prompt("$title", $('#jot-title').val());
179 if(reply && reply.length) {
180 $('#jot-title').val(reply);
184 function jotShare(id) {
185 $('#like-rotator-' + id).show();
186 $.get('share/' + id, function(data) {
187 tinyMCE.execCommand('mceInsertRawHTML',false,data);
188 $('#like-rotator-' + id).hide();
189 $(window).scrollTop(0);
193 function linkdropper(event) {
194 var linkFound = event.dataTransfer.types.contains("text/uri-list");
196 event.preventDefault();
199 function linkdrop(event) {
200 var reply = event.dataTransfer.getData("text/uri-list");
201 event.target.textContent = reply;
202 event.preventDefault();
203 if(reply && reply.length) {
204 $('#profile-rotator').show();
205 $.get('parse_url?url=' + reply, function(data) {
206 tinyMCE.execCommand('mceInsertRawHTML',false,data);
207 $('#profile-rotator').hide();
212 function jotClearLocation() {
213 $('#jot-coord').val('');
214 $('#profile-nolocation-wrapper').hide();