gallery update
This commit is contained in:
parent
1a4097d1c0
commit
9430f66bee
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 431 B |
|
@ -203,27 +203,27 @@ var galleryAPI = function(){
|
||||||
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
||||||
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
||||||
if ((re1.test(sval) && (re2.test(sval)))){
|
if ((re1.test(sval) && (re2.test(sval)))){
|
||||||
$("ul#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li").slideDown();
|
$("#gallery_tag_list li").slideDown();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
||||||
g.saveTags(id,g.loadArea);
|
g.saveTags(id,g.loadArea);
|
||||||
})
|
})
|
||||||
g.albumArea.find(".rghead .rgfn a.bt-add").click(function(){
|
g.albumArea.find(".rghead .rgfn .bt-add").click(function(){
|
||||||
showUploadPanel();
|
showUploadPanel();
|
||||||
})
|
})
|
||||||
g.albumArea.find(".rghead .rgfn a.bt-del").click(function(){
|
g.albumArea.find(".rghead .rgfn .bt-del").click(function(){
|
||||||
g.deleteAlbum(id);
|
g.deleteAlbum(id);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
var uploadpanel = $('<div id="upload_panel_holder"><div class="rgfn"><a class="bt-cls btn btn-primary pull-right" title="Close" href="" onclick="return false;"><i class="icon-remove icon-white"></i>Close Panel</a></div></div>');
|
var uploadpanel = $('<div id="upload_panel_holder"><div class="rgfn"><a class="bt-cls btn btn-primary pull-right" title="Close" href="" onclick="return false;"><i class="icon-remove icon-white"></i>Close Panel</a></div></div>');
|
||||||
var frame = $('<iframe id="upload_panel" width="100%" scrolling="no" height="294" frameborder="0" src="upload_panel"></iframe>');
|
var frame = $('<iframe id="upload_panel" width="100%" scrolling="no" height="294" frameborder="0" src="upload_panel"></iframe>');
|
||||||
uploadpanel.find("a.bt-cls").click(function(){
|
uploadpanel.find(".bt-cls").click(function(){
|
||||||
uploadpanel.hide("slide");
|
uploadpanel.hide("slide");
|
||||||
frame.remove();
|
frame.remove();
|
||||||
g.loadImages(id);
|
g.loadImages(id);
|
||||||
|
@ -308,13 +308,13 @@ var galleryAPI = function(){
|
||||||
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
||||||
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
||||||
if ((re1.test(sval) && (re2.test(sval)))){
|
if ((re1.test(sval) && (re2.test(sval)))){
|
||||||
$("ul#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li").slideDown();
|
$("#gallery_tag_list li").slideDown();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
||||||
|
@ -330,37 +330,38 @@ var galleryAPI = function(){
|
||||||
$slidelist.find("ul").hide();
|
$slidelist.find("ul").hide();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$(".slidectrl a.togglescreen").click(function(){
|
$(".slidectrl .togglescreen").click(function(){
|
||||||
toggleFullscreen();
|
toggleFullscreen();
|
||||||
})
|
})
|
||||||
$(".slidectrl a.browserfullscreen").click(function(){
|
$(".slidectrl .browserfullscreen").click(function(){
|
||||||
browserFullScreen();
|
browserFullScreen();
|
||||||
})
|
})
|
||||||
$slidelist.find("a.list_element").click(function(){
|
$slidelist.find(".list_element").click(function(){
|
||||||
imagecount = parseInt($(this).parent().attr("for"));
|
imagecount = parseInt($(this).parent().attr("for"));
|
||||||
changeImage($(this));
|
changeImage($(this));
|
||||||
})
|
})
|
||||||
$rslidenav.find("a.navN").click(function(){
|
$rslidenav.find(".navN").click(function(){
|
||||||
nextpic($(this));
|
nextpic($(this));
|
||||||
})
|
})
|
||||||
$rslidenav.find("a.navP").click(function(){
|
$rslidenav.find("a.navP").click(function(){
|
||||||
prevpic($(this));
|
prevpic($(this));
|
||||||
})
|
})
|
||||||
$("a#nextpic").click(function(){
|
$("#nextpic").click(function(){
|
||||||
nextpic($(this));
|
nextpic($(this));
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).keydown(function(e){
|
$(document).keydown(function(e){
|
||||||
if (e.keyCode == 37){
|
if (e.keyCode == 37){
|
||||||
prevpic($rslidenav.find("a.navP"));
|
prevpic($rslidenav.find(".navP"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(e.keyCode == 39){
|
if(e.keyCode == 39){
|
||||||
nextpic($rslidenav.find("a.navN"));
|
nextpic($rslidenav.find(".navN"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(e.keyCode == 27){
|
if(e.keyCode == 27){
|
||||||
toggleFullscreen();
|
toggleFullscreen();
|
||||||
|
$rslide.removeClass('browserFullScreen');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(e.keyCode == 70 || e.keyCode == 102){
|
if(e.keyCode == 70 || e.keyCode == 102){
|
||||||
|
@ -372,6 +373,7 @@ var galleryAPI = function(){
|
||||||
var el = document.documentElement,
|
var el = document.documentElement,
|
||||||
rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen;
|
rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen;
|
||||||
rfs.call(el);
|
rfs.call(el);
|
||||||
|
$rslide.addClass('browserFullScreen');
|
||||||
}
|
}
|
||||||
var nextpic = function(dom){
|
var nextpic = function(dom){
|
||||||
if(imagecount == imageArray.length - 1)
|
if(imagecount == imageArray.length - 1)
|
||||||
|
@ -391,7 +393,7 @@ var galleryAPI = function(){
|
||||||
if($rslide.hasClass("fullscreen")){
|
if($rslide.hasClass("fullscreen")){
|
||||||
$rslide.css("position","relative");
|
$rslide.css("position","relative");
|
||||||
$rslide.removeClass("fullscreen");
|
$rslide.removeClass("fullscreen");
|
||||||
$(".slidectrl a.browserfullscreen").hide();
|
$(".slidectrl .browserfullscreen").hide();
|
||||||
$img.css({"padding":""})
|
$img.css({"padding":""})
|
||||||
$("#main_pic").height(picHeight );
|
$("#main_pic").height(picHeight );
|
||||||
}else{
|
}else{
|
||||||
|
@ -400,7 +402,7 @@ var galleryAPI = function(){
|
||||||
$rslide.css("position","");
|
$rslide.css("position","");
|
||||||
$rslide.addClass("fullscreen");
|
$rslide.addClass("fullscreen");
|
||||||
$img.css({"padding":($rslide.height()-$img.height())/2})
|
$img.css({"padding":($rslide.height()-$img.height())/2})
|
||||||
$(".slidectrl a.browserfullscreen").show();
|
$(".slidectrl .browserfullscreen").show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var changeImage = function(dom){
|
var changeImage = function(dom){
|
||||||
|
@ -419,7 +421,7 @@ var galleryAPI = function(){
|
||||||
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
||||||
if($('.bt-tag').hasClass("active"))
|
if($('.bt-tag').hasClass("active"))
|
||||||
updatePhotoTag();
|
updatePhotoTag();
|
||||||
$(".slideinfo span.info").text(imageArray[imagecount].description);
|
$(".slideinfo .info").text(imageArray[imagecount].description);
|
||||||
if(imageArray.length > 1)
|
if(imageArray.length > 1)
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
})
|
})
|
||||||
|
@ -437,8 +439,8 @@ var galleryAPI = function(){
|
||||||
next = imagecount + 1;
|
next = imagecount + 1;
|
||||||
prev = imagecount - 1;
|
prev = imagecount - 1;
|
||||||
}
|
}
|
||||||
$("a.navN").attr({"href":"orbit_gallery?theater="+imageArray[next]._id,"data-content":imageArray[next].file.url});
|
$(".navN").attr({"href":"orbit_gallery?theater="+imageArray[next]._id,"data-content":imageArray[next].file.url});
|
||||||
$("a.navP").attr({"href":"orbit_gallery?theater="+imageArray[prev]._id,"data-content":imageArray[prev].file.url});
|
$(".navP").attr({"href":"orbit_gallery?theater="+imageArray[prev]._id,"data-content":imageArray[prev].file.url});
|
||||||
};
|
};
|
||||||
if(imageArray.length > 1)
|
if(imageArray.length > 1)
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
|
@ -465,8 +467,8 @@ var galleryAPI = function(){
|
||||||
g.loadFooterPanel(g.loadArea,id,function(head){
|
g.loadFooterPanel(g.loadArea,id,function(head){
|
||||||
head = $(head);
|
head = $(head);
|
||||||
g.albumArea.find(".rghead .rgfn").html(head);
|
g.albumArea.find(".rghead .rgfn").html(head);
|
||||||
g.albumArea.find("a.bt-back").attr("href","orbit_gallery?album="+albumid);
|
g.albumArea.find(".bt-back").attr("href","orbit_gallery?album="+albumid);
|
||||||
g.albumArea.find("a.bt-edit").attr("href","orbit_gallery?edit="+albumid);
|
g.albumArea.find(".bt-edit").attr("href","orbit_gallery?edit="+albumid);
|
||||||
})
|
})
|
||||||
g.albumArea.css("margin-bottom","0");
|
g.albumArea.css("margin-bottom","0");
|
||||||
picHeight = $(window).height() - ($("#orbit-bar").outerHeight() + $("#orbit_gallery .form-actions").outerHeight());
|
picHeight = $(window).height() - ($("#orbit-bar").outerHeight() + $("#orbit_gallery .form-actions").outerHeight());
|
||||||
|
@ -537,13 +539,13 @@ var galleryAPI = function(){
|
||||||
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
||||||
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
||||||
if ((re1.test(sval) && (re2.test(sval)))){
|
if ((re1.test(sval) && (re2.test(sval)))){
|
||||||
$("ul#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp();
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
$("#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$("ul#gallery_tag_list li").slideDown();
|
$("#gallery_tag_list li").slideDown();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
g.albumArea.find("#tag_panel .bt-save").click(function(){
|
||||||
|
|
|
@ -224,10 +224,14 @@
|
||||||
border-left: solid 1px #222;
|
border-left: solid 1px #222;
|
||||||
}
|
}
|
||||||
.slidectrl a.togglelist { background-position: 0 -30px; }
|
.slidectrl a.togglelist { background-position: 0 -30px; }
|
||||||
|
.slidectrl a.togglescreen { background-position: 0 -90px; }
|
||||||
.slidectrl a.toinline { background-position: -30px 0; }
|
.slidectrl a.toinline { background-position: -30px 0; }
|
||||||
.slidectrl a.sharebt { background-position: -30px -30px; }
|
.slidectrl a.sharebt { background-position: -30px -30px; }
|
||||||
.slidectrl a.browserfullscreen {background-position: -30px -30px; display:none;}
|
.slidectrl a.browserfullscreen { display:none;}
|
||||||
.slidectrl a.slidestop { background-position: 0 -60px; }
|
.slidectrl a.slidestop { background-position: 0 -60px; }
|
||||||
|
.fullscreen .slidectrl a.togglescreen { background-position: -30px -90px; }
|
||||||
|
.browserFullScreen .slidectrl a.browserfullscreen { background-position: -30px 0; }
|
||||||
|
.browserFullScreen .togglescreen { display: none; }
|
||||||
.slideinfo {
|
.slideinfo {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
|
Reference in New Issue