summaryrefslogtreecommitdiff
path: root/core/js
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-05 08:05:50 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-05 08:05:50 +0000
commit7482b6683eb0cabb9841f839a474d25b4257fc91 (patch)
tree94471660020e8d307affc1a6e1eaaa10f1fda1bd /core/js
parent0b473327c58df6d6261270cd007421e42eda3d29 (diff)
Add "quick edit" which lets you edit a photo's details from the albums
page.
Diffstat (limited to 'core/js')
-rw-r--r--core/js/quick.js48
1 files changed, 26 insertions, 22 deletions
diff --git a/core/js/quick.js b/core/js/quick.js
index 858ba3f2..7d572174 100644
--- a/core/js/quick.js
+++ b/core/js/quick.js
@@ -17,7 +17,7 @@ var show_quick = function() {
});
quick.hover(function() { }, hide_quick);
$.get(
- quick.attr("quick_link"),
+ quick.attr("href"),
{},
function(data, textStatus) {
$("#gQuickPane").html(data);
@@ -30,27 +30,31 @@ var show_quick = function() {
var quick_do = function(quick, pane, img) {
img.css("opacity", "0.2");
- quick.addClass("gLoadingLarge");
- $.ajax({
- type: "GET",
- url: pane.attr("quick_link"),
- dataType: "json",
- success: function(data) {
- img.css("opacity", "1");
- img.attr("width", data.width);
- img.attr("height", data.height);
- img.attr("src", data.src);
- var pos = img.position();
- quick.removeClass("gLoadingLarge");
- $("#gQuickPane").css({
- "position": "absolute",
- "top": pos.top,
- "left": pos.left,
- "width": img.innerWidth() + 1,
- "height": 32
- });
- }
- });
+ if (pane.hasClass("gDialogLink")) {
+ openDialog(pane);
+ } else {
+ quick.addClass("gLoadingLarge");
+ $.ajax({
+ type: "GET",
+ url: pane.attr("href"),
+ dataType: "json",
+ success: function(data) {
+ img.css("opacity", "1");
+ img.attr("width", data.width);
+ img.attr("height", data.height);
+ img.attr("src", data.src);
+ var pos = img.position();
+ quick.removeClass("gLoadingLarge");
+ $("#gQuickPane").css({
+ "position": "absolute",
+ "top": pos.top,
+ "left": pos.left,
+ "width": img.innerWidth() + 1,
+ "height": 32
+ });
+ }
+ });
+ }
};
var hide_quick = function() {