Hello iJoomla team,
just playing for an half hour to understand how popup windows works, i see that you have document here:
documentation.jomsocial.com/wiki/Popup_Window
here's your example code:
var ajaxCall = 'jax.call("community", "plugins,walls,ajaxSaveWall")';
cWindowShow(ajaxCall, 'Compose', 450, 300);
windowTitle='Hello, This is Title';
windowMessage='Hi! <b>This is Content</b><br/>It is Easy !';
windowMessage='cWindowAddContent(\''+windowMessage+'\')';
cWindowShow(windowMessage, windowTitle, 450, 100);
function jompopupWindow(title,message){
message='cWindowAddContent(\''+message+'\')';
cWindowShow(message, title, 450, 100);
}
Hi Viktor
Some of the developers documentation is made for JomSocial 1 and never updated since then.
We could really use more contributions of this kind as our docs are pretty much big now and can't be always easily tracked for updates.
I will take a look into your suggestions and apply them on docs if needed.
Thanks
This is very helpful, Viktor! Thank you!
I also looked at
documentation.jomsocial.com/wiki/Popup_Window
to no avail. The functions are not explained well, there are no common examples, no screenshots, and the word "simply" is used once too many. Also, I didn't even know about the function cWindowAddContent until I read it from your post!
I even had to stare at this for an hour:
function cWindowShow(windowCall, winTitle, contentWidth, contentHeight, winType) {
if (winType instanceof Array && (winType = winType.join(" ")), /^.+\"\s*admin\s*,.+\;$/.test(windowCall))
return void cAdminWindowShow(windowCall, winTitle, contentWidth, contentHeight, winType);
joms.jQuery("body").unbind("mouseup"), joms.jQuery("#cWindow").remove();
var cWindowHTML = decodeURIComponent("%3Cdiv%20id%3D%22cWindow%22%20class%3D%22%7BcWindoClass%7D%22%3E%0A%09%3Cdiv%20id%3D%22cwin_tl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_ml%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cWindowContentOuter%22%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentTop%22%3E%0A%09%09%09%3Ca%20href%3D%22javascript%3Avoid(0)%3B%22%20onclick%3D%22cWindowHide()%3B%22%20id%3D%22cwin_close_btn%22%3E%3C%2Fa%3E%0A%09%09%09%3Cdiv%20id%3D%22cwin_logo%22%3E%3C%2Fdiv%3E%0A%09%09%09%3Cdiv%20class%3D%22clr%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentWrap%22%3E%0A%09%09%09%3Cdiv%20id%3D%22cWindowContent%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_mr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_bl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_bm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_br%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E");
cWindowHTML = cwindow_is_modeless ? cWindowHTML.replace("{cWindoClass}", "dialog modeless") : cWindowHTML.replace("{cWindoClass}", "dialog"), cwindow_is_modeless = !1;
var cWindow = joms.jQuery(cWindowHTML), cWindowSize, cBrowserWidth = joms.jQuery(window).width();
cWindowSize = "480" >= cBrowserWidth ? {contentWrapHeight: function() {
return +contentHeight