summaryrefslogtreecommitdiff
path: root/modules/organize
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize')
-rw-r--r--modules/organize/controllers/organize.php2
-rw-r--r--modules/organize/helpers/organize_event.php2
-rw-r--r--modules/organize/helpers/organize_installer.php2
-rw-r--r--modules/organize/views/organize_frame.html.php22
4 files changed, 20 insertions, 8 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php
index 9ce518ac..5a2c3e4f 100644
--- a/modules/organize/controllers/organize.php
+++ b/modules/organize/controllers/organize.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2011 Bharat Mediratta
+ * Copyright (C) 2000-2012 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php
index fb755c01..674cc064 100644
--- a/modules/organize/helpers/organize_event.php
+++ b/modules/organize/helpers/organize_event.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2011 Bharat Mediratta
+ * Copyright (C) 2000-2012 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php
index 3f5c740b..8121bdbe 100644
--- a/modules/organize/helpers/organize_installer.php
+++ b/modules/organize/helpers/organize_installer.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2011 Bharat Mediratta
+ * Copyright (C) 2000-2012 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php
index 650574ab..20a1a6da 100644
--- a/modules/organize/views/organize_frame.html.php
+++ b/modules/organize/views/organize_frame.html.php
@@ -109,7 +109,7 @@
item_ids = [];
for (var i = 0; i != nodes.length; i++) {
var node = Ext.fly(nodes[i]);
- item_ids.push(node.getAttribute("rel"));
+ item_ids.push(get_id_from_node(node));
}
start_busy(<?= t("Deleting...")->for_js() ?>);
Ext.Ajax.request({
@@ -127,6 +127,18 @@
});
};
+ var get_id_from_node = function(node) {
+ var id = node.getAttribute("rel");
+ if (id) {
+ return id;
+ }
+
+ // IE9 has a bug which causes it to be unable to read the "rel" attr
+ // so hack it by extracting the id the CSS class id. This is fragile.
+ // ref: https://sourceforge.net/apps/trac/gallery/ticket/1790
+ return node.getAttribute("id").replace("thumb-", "");
+ }
+
/*
* ********************************************************************************
* JsonStore, DataView and Panel for viewing albums
@@ -143,7 +155,7 @@
"dblclick": function(v, index, node, e) {
node = Ext.get(node);
if (node.hasClass("thumb-album")) {
- var id = node.getAttribute("rel");
+ var id = get_id_from_node(node);
tree_panel.fireEvent("click", tree_panel.getNodeById(id))
}
},
@@ -218,7 +230,7 @@
var nodes = data.nodes;
source_ids = [];
for (var i = 0; i != nodes.length; i++) {
- source_ids.push(Ext.fly(nodes[i]).getAttribute("rel"));
+ source_ids.push(get_id_from_node(Ext.fly(nodes[i])));
}
start_busy(<?= t("Rearranging...")->for_js() ?>);
target = Ext.fly(target);
@@ -232,7 +244,7 @@
failure: show_generic_error,
params: {
source_ids: source_ids.join(","),
- target_id: target.getAttribute("rel"),
+ target_id: get_id_from_node(target),
relative: this.drop_side, // calculated in onNodeOver
csrf: '<?= access::csrf_token() ?>'
}
@@ -448,7 +460,7 @@
var moving_albums = 0;
for (var i = 0; i != nodes.length; i++) {
var node = Ext.fly(nodes[i]);
- source_ids.push(node.getAttribute("rel"));
+ source_ids.push(get_id_from_node(node));
moving_albums |= node.hasClass("thumb-album");
}
start_busy(<?= t("Moving...")->for_js() ?>);