|
Get Image name from Image Gallery
Last post 02-25-2014, 9:11 PM by Donna111. 13 replies.
-
11-29-2013, 3:05 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Get Image name from Image Gallery
Hi, I am using ASP.Net image Gallery in my website. I am showing this gallery in a popup window on button click. now my requirement is that I want to select a particular image and I want to get that particular image value. when i selecting particular image the image will be highlighted and popup wants to be closed. How can I achieve this.. Please give me reply, it's urgent for me.. Thanks in advance..!
Regards, Narendra
|
|
-
11-29-2013, 8:14 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Get Image name from Image Gallery
Hi narendrababu, Which layout you are using? Classic/Explorer/GridShow/Modern/Prominent/SlideShow? Regards, Ken
|
|
-
12-02-2013, 2:23 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Get Image name from Image Gallery
I am using Classic Layout..
Regards, Narendra
|
|
-
12-02-2013, 2:39 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Get Image name from Image Gallery
Hi narendrabadu, 1. Please open file "\CuteSoft_Client\Gallery\Layout\Classic\Code.js" 2. Find section below img.onclick=ToDelegate(this,function() { this.Browser.ShowViewer(div.dngphoto); }); 3. The sectin above is the image click event, you can get the image info in it. - img.onclick = ToDelegate(this, function () {
-
-
-
-
- this.Browser.ShowViewer(div.dngphoto);
- });
Regards, ken
|
|
-
12-02-2013, 5:17 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Get Image name from Image Gallery
Thanks.. It's working fine, But I want by default the first image in the gallery will be selected, It means that the border colour for first image wants to be changed like some colour "#AD1829" and when I clicked on that image the gallery popup will be dissappeared. Please help me.. Thanks in advance..
Regards, Narendra
|
|
-
12-03-2013, 12:43 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Get Image name from Image Gallery
I want by default the first image in the gallery will be selected, It means that the border colour for first image wants to be changed like some colour "#AD1829" and when I clicked on that image the gallery popup will be disappeared. Is there a search function on this based on tags or comments on the image? Please help me, It's urgent for me..
Regards, Narendra
|
|
-
12-03-2013, 8:49 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Get Image name from Image Gallery
Hi narendrababu,
1. Open file \CuteSoft_Client\Gallery\Layout\Classic\Code.js
2. Find section below
- img.onclick=ToDelegate(this,function()
- {
- this.Browser.ShowViewer(div.dngphoto);
- });
3. Change it to
- img.onclick = ToDelegate(this, function () {
- for (var j = 0; j < document.getElementsByClassName("GalleryPhotoItem").length; j++) {
- if (document.images[j].className == "GalleryThumbnailImage") {
- document.images[j].parentElement.style.border = "";
- }
- if (document.images[j].src.substr(document.images[j].src.lastIndexOf("/") + 1) == photo.Thumbnail.substr(photo.Thumbnail.lastIndexOf("/") + 1)) {
- document.images[j].parentElement.style.border = "solid 3px red";
- }
- }
-
- });
4. Find section below
- div.ondblclick=ToDelegate(this,function()
- {
- this.Browser.ShowViewer(div.dngphoto);
- });
5. Change it to
- div.ondblclick=ToDelegate(this,function()
- {
- });
Regards, Ken
|
|
-
12-03-2013, 9:07 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Get Image name from Image Gallery
Hi, Is there any search functionality in the Image Gallery (Classic Layout). I want to search an image by it's name or it's comment's. Please Give Quick reply.. I am waiting for your response..
Regards, Narendra
|
|
-
12-04-2013, 8:05 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Get Image name from Image Gallery
Hi narendrababu, The gallery has not the search function, sorry for your inconvenience. Regards, Ken
|
|
-
12-12-2013, 6:22 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Customize the image show viewer in the image gallery
Hi, Where can I found "this.Browser.ShowViewer(div.dngphoto);" function to customize the popup window comes when I clicked on the image in the Gallery (Classic Layout). I want to put "Ok" button in that popup along with "Close" button. Please Give Quick reply..
Regards, Narendra
|
|
-
12-12-2013, 8:15 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Customize the image show viewer in the image gallery
Hi narendrababu, Please open file "\CuteSoft_Client\Gallery\Viewer\LightBox\Code.js", find the section below. that is the open photo function. GalleryViewer.prototype.Show=function _GalleryViewer_Show(photo) Regards, Ken
|
|
-
12-16-2013, 2:38 AM |
-
narendrababu
-
-
-
Joined on 11-29-2013
-
-
Posts 49
-
-
|
Re: Customize the image show viewer in the image gallery
Hi, I am Using Image Gallery (Classic Layout). I want to set paging functionality (asynchronously) to that image gallery. How can I achieve this.. Please Try to give Quick Reply...
Regards, Narendra
|
|
-
12-16-2013, 8:22 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Customize the image show viewer in the image gallery
Hi narendrababu,
Please open file "CuteSoft_Client\Gallery\Layout\Classic\Code.js", clean all the code then use the new code below.
The first line "var GRIDSHOW_PAGESIZE=5;" use to set how many images to show in 1 page.
- var GRIDSHOW_PAGESIZE=5;
- function GalleryLayout(gb)
- {
- this.Browser=gb;
-
- this.dng_photolist=this.Browser.FindElement("dng_photolist");
-
-
-
- this.Browser.Control.style.minHeight=this.Browser.Control.style.height;
- this.Browser.Control.style.height="";
-
- var uploadercontainer=this.Browser.GetUploaderContainer();
- if(uploadercontainer)
- {
- this.Browser.FindElement("dng_uploaderholder").appendChild(uploadercontainer);
- }
- else
- {
-
- }
-
- this._categories=this.Browser.GetCategories();
-
- this.DrawUI();
- }
-
- GalleryLayout.prototype.DrawUI=function _GalleryLayout_DrawUI()
- {
- clearTimeout(this._animationTimerid);
-
- this.dng_photolist.innerHTML="";
-
- var photos=[];
- for(var i=0;i<this._categories.length;i++)
- {
- photos=photos.concat(this._categories[i].Photos);
- }
- var page=this._page||1;
- var size=GRIDSHOW_PAGESIZE;
- var start=(page-1)*size;
- for(var i=0;i<size;i++)
- {
- var photo=photos[start+i];
- if(!photo)
- break;
- var div=this.CreatePhotoDiv(photo);
- this.AttachItemEvent(div);
- this.dng_photolist.appendChild(div);
- }
- var pagecount=Math.ceil(photos.length/size);
- if(pagecount==0)
- return;
- if(pagecount==1&&page==1)
- return;
-
- var pager=document.createElement("DIV");
- pager.style.textAlign="left";
- pager.style.clear="both";
- this.dng_photolist.appendChild(pager);
- var layout=this;
- function SetupButton(btn,btnpage)
- {
- if(page==btnpage)
- {
- btn.style.fontWeight="bold";
- }
- btn.innerHTML="["+btnpage+"]";
- btn.href="#";
- btn.onclick=ToDelegate(layout,function()
- {
- this._page=btnpage;
- this.DrawUI();
- return false;
- });
- }
-
- for(var i=0;i<pagecount;i++)
- {
- var btn=document.createElement("A");
- SetupButton(btn,i+1);
- pager.appendChild(btn);
- pager.appendChild(document.createTextNode(" "));
- }
-
- }
-
- GalleryLayout.prototype.CreatePhotoDiv=function _GalleryLayout_CreateItemDiv(photo)
- {
- var div=document.createElement("DIV");
- div.className="GalleryPhotoItem";
- div.dngphoto=photo;
- var t=document.createElement("TABLE");
- t.style.width="100%";
- t.style.height="100%";
- t.border=0;
- t.cellSpacing=0;
- t.cellPadding=0;
- var c1=t.insertRow(-1).insertCell(-1);
- var c2=t.insertRow(-1).insertCell(-1);
- c1.className="GalleryItemImageCell";
- c1.onselectstart=new Function("","return false");
- c2.style.textAlign="center";
- var scale = Math.min(128/photo.Width, 96/photo.Height);
- var img=this.Browser.CreateThumbnail(photo.Thumbnail,Math.floor(photo.Width * scale),Math.floor(photo.Height * scale));
- c1.appendChild(img);
- img.style.cursor="hand";
- img.onclick=ToDelegate(this,function()
- {
- this.Browser.ShowViewer(div.dngphoto);
- });
-
- c2.innerHTML="<span class='GalleryItemText'></span>";
- var titltText=photo.Title;
- if(titltText&&titltText.length>30)titltText=titltText.substring(0,30)+"..";
- c2.firstChild.appendChild(document.createTextNode(titltText));
-
- if(this.Browser.Param.AllowShowComment)
- {
- var cs=photo.Comments;
- if(cs&&cs.length)
- {
- c2.innerHTML+="<br/><span class='GalleryItemNumComments'>"+cs.length+" "+GalleryLocalize.NUMCOMMENTS+"<span>";
- }
- }
-
- div.appendChild(t);
- return div;
- }
-
- GalleryLayout.prototype.AttachItemEvent=function _GalleryLayout_AttachItemEvent(div)
- {
- function SetDivClass(div)
- {
- var clsname;
- if(div.dngselected&&div.dnghover)
- clsname=" GalleryItemHoverSelected";
- else if(div.dngselected)
- clsname=" GalleryItemSelected";
- else if(div.dnghover)
- clsname=" GalleryItemHover";
- else
- clsname="";
- div.className="GalleryPhotoItem "+clsname;
- }
- div.onmouseover=ToDelegate(this,function()
- {
- div.dnghover=true;
- SetDivClass(div);
- this.Browser.ShowPhotoTooltip(div.dngphoto,div,this);
- });
- div.onmouseout=ToDelegate(this,function()
- {
- div.dnghover=false;
- SetDivClass(div);
- });
- div.ondblclick=ToDelegate(this,function()
- {
- this.Browser.ShowViewer(div.dngphoto);
- });
- div.oncontextmenu=ToDelegate(this,function(event)
- {
- event=event||window.event;
- this.Browser.ShowPhotoMenu(div.dngphoto,div,event,this);
- if(event.preventDefault)event.preventDefault();
- event.cancelBubble=true;
- return event.returnValue=false;
- });
- }
-
- GalleryLayout.prototype.Ajax_Result=function _GalleryLayout_Ajax_Result(ret,param,method)
- {
- if(method=="GetAllCategoryData"||method=="GetCategoryData")
- {
- this._categories=this.Browser.GetCategories();
- this.DrawUI();
- }
- }
Regards,
Ken
|
|
-
02-25-2014, 9:11 PM |
-
Donna111
-
-
-
Joined on 10-17-2013
-
-
Posts 5
-
-
|
Re: Get Image name from Image Gallery
Hi there I am a beginner of ASP.Net image Gallery.It's indeed more convenient for a beginner to do some image process using a fine tool. You said that you want to select a particular image and get that particular image value.I have never tried to do that before,and that exactly what i want to do.I just want to know that if there is an easier method to complete that process.Thanks for any suggestions.
|
|
|
|
|