Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Document Suggestion, the easier example for custom pop up window

10 years 3 months ago
  • Viktor 's Avatar
    Topic Author
  • Viktor
  • Offline
  • Junior Boarder
  • Posts: 131
  • Thank you received: 29
Licenses:
JomSocial Expired

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);

For a new developer who is not really familiar with jomsocial (like i was), this create confuseness:
- why calling ajax ?
- what jax.call parameter are ?
and this leads to learn about understanding about ajax call in jomsocial (which can took up to 1 hours to understand things)... actually the info is too overloaded when the dev only want to do custom pop up but you give example about 'ajax call' stuff. Finally, this leads me to understand how cWindowShow works.. which 'cost' extra 10-20 minutes to understand (looking to all example in jomsocial, thanks to Dreamweaver - Find > Entire Local Site features)..

So after understanding it completely, herewith i suggest a change in the doc, so dev can quickly understand on how to do custom pop up:
windowTitle='Hello, This is Title';
windowMessage='Hi! <b>This is Content</b><br/>It is Easy !';
windowMessage='cWindowAddContent(\''+windowMessage+'\')';
cWindowShow(windowMessage, windowTitle, 450, 100);

And a screenshot will be very helpful:



In Real World Example, i would create a function like this:
function jompopupWindow(title,message){
	message='cWindowAddContent(\''+message+'\')';
	cWindowShow(message, title, 450, 100);
}

What do you think ? Comment please..

Attachments:
The following user(s) said Thank You: Enrico
10 years 3 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

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


- Don't say feature not working. Instead, explain what you tried and what was the outcome.
- When you think you found the bug, try to replicate it on a fresh Joomla.
- When looking for support always provide temporary Super Administrative access to your site. We will ask for it anyway.
- Help yourself and read documentation which can give you answers to almost all questions you may have
9 years 8 months ago
Licenses:
JomSocial Expired

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
iJoomla really needs to work on their documentation if they expect me to buy their products again - I've been wracking my brain over a few other features that were better-explained by developers like you; which is very disappointing. My suggestion for them: add a section at the bottom of every documentation page to receive user feedback, and make necessary revisions as they're requested.

I know it's tough to keep hundreds of pages up-to-date, but I shouldn't have to scavenge the forums every time I want to reference an API - only to have the official documentation left alone after an issue is resolved.

The following user(s) said Thank You: Adriano
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW