mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
js: add new Dialog object
The Dialog is used by code to show urls in colorbox. Templates can overwrite `show()` function to change its behaviour
This commit is contained in:
parent
e4b2ef84b1
commit
0363bab040
3 changed files with 193 additions and 129 deletions
|
@ -74,7 +74,7 @@ function initEditor(cb){
|
|||
}
|
||||
else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
}
|
||||
}
|
||||
|
||||
//Character count
|
||||
|
||||
|
@ -110,7 +110,7 @@ function initEditor(cb){
|
|||
$("a#jot-perms-icon").colorbox({
|
||||
'inline' : true,
|
||||
'transition' : 'elastic'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (typeof cb!="undefined") cb();
|
||||
}
|
||||
|
@ -127,20 +127,20 @@ function enableOnUser(){
|
|||
<script>
|
||||
var ispublic = '{{$ispublic}}';
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
/* enable tinymce on focus and click */
|
||||
$("#profile-jot-text").focus(enableOnUser);
|
||||
$("#profile-jot-text").click(enableOnUser);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* show images / file browser window
|
||||
*
|
||||
*
|
||||
**/
|
||||
|
||||
|
||||
/* callback */
|
||||
$('body').on('fbrowser.image.main', function(e, filename, embedcode, id) {
|
||||
$.colorbox.close();
|
||||
|
@ -150,16 +150,16 @@ function enableOnUser(){
|
|||
$.colorbox.close();
|
||||
addeditortext(embedcode);
|
||||
});
|
||||
|
||||
|
||||
$('#wall-image-upload').on('click', function(){
|
||||
$.colorbox({href: baseurl + "/fbrowser/image/?mode=minimal#main", iframe:true,innerWidth:'500px',innerHeight:'400px'})
|
||||
Dialog.doImageBrowser("main");
|
||||
});
|
||||
|
||||
|
||||
$('#wall-file-upload').on('click', function(){
|
||||
$.colorbox({href: baseurl + "/fbrowser/file/?mode=minimal#main", iframe:true,innerWidth:'500px',innerHeight:'400px'})
|
||||
Dialog.doFileBrowser("main");
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
{ action: 'wall_upload/{{$nickname}}',
|
||||
|
@ -168,7 +168,7 @@ function enableOnUser(){
|
|||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
|
@ -179,10 +179,10 @@ function enableOnUser(){
|
|||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
**/
|
||||
});
|
||||
|
@ -301,9 +301,9 @@ function enableOnUser(){
|
|||
}
|
||||
|
||||
function itemFiler(id) {
|
||||
|
||||
|
||||
var bordercolor = $("input").css("border-color");
|
||||
|
||||
|
||||
$.get('filer/', function(data){
|
||||
$.colorbox({html:data});
|
||||
$("#id_term").keypress(function(){
|
||||
|
@ -312,7 +312,7 @@ function enableOnUser(){
|
|||
$("#select_term").change(function(){
|
||||
$("#id_term").css("border-color",bordercolor);
|
||||
})
|
||||
|
||||
|
||||
$("#filer_save").click(function(e){
|
||||
e.preventDefault();
|
||||
reply = $("#id_term").val();
|
||||
|
@ -345,7 +345,7 @@ function enableOnUser(){
|
|||
}
|
||||
else
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
}
|
||||
}
|
||||
|
||||
{{$geotag}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue