Hi, I am trying to make new addon in concrete5 which contatain the following field:
1. Name
2. Email
3. Image
All is going well but when i am trying to add the image from fileset, i am done upto fileset to choose the image but when i am try to choose a image then there is nothing happen, i dont know whts the main problem
i use the following js code
addImages:0,
addNewImage: function(fID, thumbPath, imgHeight, title) {
this.addImages--; //negative counter - so it doesn't compete with real slideshowImgIds
var slideshowImgId=this.addImages;
var templateHTML=$('#imgRowTemplateWrap .ccm-slideshowBlock-imgRow').html().replace(/tempFID/g,fID);
templateHTML=templateHTML.replace(/tempThumbPath/g,thumbPath);
templateHTML=templateHTML.replace(/tempFilename/g,title);
templateHTML=templateHTML.replace(/tempSlideshowImgId/g,slideshowImgId).replace(/tempHeight/g,imgHeight);
var imgRow = document.createElement("div");
imgRow.innerHTML=templateHTML;
imgRow.id='ccm-slideshowBlock-imgRow'+parseInt(slideshowImgId);
imgRow.className='ccm-slideshowBlock-imgRow';
document.getElementById('ccm-slideshowBlock-imgRows').appendChild(imgRow);
var bgRow=$('#ccm-slideshowBlock-imgRow'+parseInt(fID)+' .backgroundRow');
bgRow.css('background','url('+escape(thumbPath)+') no-repeat left top');
$al = Loader::helper('concrete/asset_library');
and then where you would like to display the image selector,
If its a block you are attempting to create I would recommend the designer content block, with this you just choose the elements you would like in your addon and select "Make Block"
http://www.concrete5.org/marketplace/addons/designer-content/...