summaryrefslogtreecommitdiff
path: root/modules/organize
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize')
-rw-r--r--modules/organize/controllers/organize.php10
-rw-r--r--modules/organize/css/organize.css2
-rw-r--r--modules/organize/helpers/organize.php2
-rw-r--r--modules/organize/helpers/organize_theme.php9
-rw-r--r--modules/organize/js/organize.js16
-rw-r--r--modules/organize/module.info4
-rw-r--r--modules/organize/views/organize.html.php2
-rw-r--r--modules/organize/views/organize_button_pane.html.php2
8 files changed, 21 insertions, 26 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php
index 57709cb5..6792573d 100644
--- a/modules/organize/controllers/organize.php
+++ b/modules/organize/controllers/organize.php
@@ -62,8 +62,8 @@ class Organize_Controller extends Controller {
access::required("edit", $item);
print json_encode(
- array("title" => p::clean($item->title),
- "description" => empty($item->description) ? "" : p::clean($item->description)));
+ array("title" => p::purify($item->title),
+ "description" => empty($item->description) ? "" : p::purify($item->description)));
}
function tree($item, $parent) {
@@ -283,10 +283,10 @@ class Organize_Controller extends Controller {
if ($item->is_album()) {
log::success("content", "Updated album", "<a href=\"albums/$item->id\">view</a>");
- $message = t("Saved album %album_title", array("album_title" => $item->title));
+ $message = t("Saved album %album_title", array("album_title" => p::purify($item->title)));
} else {
log::success("content", "Updated photo", "<a href=\"photos/$item->id\">view</a>");
- $message = t("Saved photo %photo_title", array("photo_title" => $item->title));
+ $message = t("Saved photo %photo_title", array("photo_title" => p::purify($item->title)));
}
print json_encode(array("form" => $form->__toString(), "message" => $message));
} else {
@@ -325,7 +325,7 @@ class Organize_Controller extends Controller {
module::event("item_updated", $orig, $item);
log::success("content", "Updated album", "<a href=\"albums/$item->id\">view</a>");
- $message = t("Saved album %album_title", array("album_title" => $item->title));
+ $message = t("Saved album %album_title", array("album_title" => p::purify($item->title)));
print json_encode(array("form" => $form->__toString(), "message" => $message));
} else {
print json_encode(array("form" => $form->__toString()));
diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css
index 1e608beb..e58cd5a5 100644
--- a/modules/organize/css/organize.css
+++ b/modules/organize/css/organize.css
@@ -163,7 +163,6 @@
}
#gOrganizeEditHandleLeft {
- background-image: url(organize_edit_drawer.png);
background-color: #FFF;
float: left;
height: 30px;
@@ -200,7 +199,6 @@
#gOrganizeEditHandleRight {
background-color: #FFF;
- background-image: url(organize_edit_drawer.png);
background-position: -15px 0;
float: right;
height: 30px;
diff --git a/modules/organize/helpers/organize.php b/modules/organize/helpers/organize.php
index 9bf4e986..25284771 100644
--- a/modules/organize/helpers/organize.php
+++ b/modules/organize/helpers/organize.php
@@ -43,7 +43,7 @@ class organize_Core {
$sortPane->hidden("item[]")->value($item->id);
$sortPane->dropdown("column", array("id" => "gAlbumSortColumn"))
->label(t("Sort by"))
- ->options(array("weight" => t("Default"),
+ ->options(array("weight" => t("Order Added"),
"captured" => t("Capture Date"),
"created" => t("Creation Date"),
"title" => t("Title"),
diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php
index 27f8cdb2..02f1f589 100644
--- a/modules/organize/helpers/organize_theme.php
+++ b/modules/organize/helpers/organize_theme.php
@@ -20,11 +20,8 @@
class organize_theme {
static function head($theme) {
// @tdo remove the addition css and organize.js (just here to test)
- $script[] = html::script("modules/organize/js/organize_init.js");
- $script[] = html::script("modules/organize/js/organize.js");
- $script[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
- url::file("modules/organize/css/organize.css") . "\" />";
- return implode("\n", $script);
- //return html::script("modules/organize/js/organize_init.js");
+ $theme->script("modules/organize/js/organize_init.js");
+ $theme->script("modules/organize/js/organize.js");
+ $theme->css("modules/organize/css/organize.css");
}
}
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index 073b4216..f10cbcc9 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -99,7 +99,7 @@ var thumbDroppable = {
dataType: "json",
success: operationCallback,
type: "POST",
- url: get_url("organize/startTask/rearrange", {item_id: item_id})
+ url: get_organize_url("organize/startTask/rearrange", {item_id: item_id})
});
}
};
@@ -135,7 +135,7 @@ var treeDroppable = {
dataType: "json",
success: operationCallback,
type: "POST",
- url: get_url("organize/startTask/move", {item_id: targetItemId})
+ url: get_organize_url("organize/startTask/move", {item_id: targetItemId})
});
return true;
}
@@ -274,7 +274,7 @@ function drawerHandleButtonsClick(event) {
dataType: "json",
success: operationCallback,
type: "POST",
- url: get_url("organize/startTask/" + operation, {item_id: item_id})
+ url: get_organize_url("organize/startTask/" + operation, {item_id: item_id})
});
break;
}
@@ -331,7 +331,7 @@ var operationCallback = function (data, textStatus) {
},
dataType: "json",
type: "POST",
- url: get_url("organize/runTask", {task_id: task.id})
+ url: get_organize_url("organize/runTask", {task_id: task.id})
});
}
if (!paused) {
@@ -344,7 +344,7 @@ var operationCallback = function (data, textStatus) {
},
dataType: "json",
type: "POST",
- url: get_url("organize/finishTask", {task_id: task.id})
+ url: get_organize_url("organize/finishTask", {task_id: task.id})
});
}
$(".gMicroThumbContainer").draggable("enable");
@@ -438,7 +438,7 @@ function organizeOpenFolder(event) {
event.preventDefault();
}
-function get_url(uri, parms) {
+function get_organize_url(uri, parms) {
var url = rearrangeUrl;
url = url.replace("__URI__", uri);
url = url.replace("__ITEM_ID__", !parms.item_id ? "" : parms.item_id);
@@ -501,7 +501,7 @@ function setSelectedThumbs() {
function getEditForm() {
if ($("#gMicroThumbGrid li.ui-selected").length > 0) {
var postData = serializeItemIds("li.ui-selected");
- var url_data = get_url("organize/editForm", {}) + postData;
+ var url_data = get_organize_url("organize/editForm", {}) + postData;
$.get(url_data, function(data, textStatus) {
$("#gOrganizeEditForm").tabs("destroy");
$("#gOrganizeEditForm").html(data);
@@ -585,7 +585,7 @@ function createProgressDialog(title) {
},
dataType: "json",
type: "POST",
- url: get_url("organize/cancelTask", {task_id: task.id})
+ url: get_organize_url("organize/cancelTask", {task_id: task.id})
});
});
}
diff --git a/modules/organize/module.info b/modules/organize/module.info
index b3ae94a3..5c6b1de0 100644
--- a/modules/organize/module.info
+++ b/modules/organize/module.info
@@ -1,3 +1,3 @@
-name = Organize
-description = Organize your gallery by apply tags or moving images
+name = "Organize"
+description = "Organize your gallery by apply tags or moving images"
version = 1
diff --git a/modules/organize/views/organize.html.php b/modules/organize/views/organize.html.php
index 6e5bfcea..65d67d04 100644
--- a/modules/organize/views/organize.html.php
+++ b/modules/organize/views/organize.html.php
@@ -16,7 +16,7 @@ var CONFIRM_DELETE = "<?= t("Do you really want to delete the selected albums an
});
</script>
<fieldset style="display: none">
- <legend><?= t("Organize %name", array("name" => p::clean($item->title))) ?></legend>
+ <legend><?= t("Organize %name", array("name" => p::purify($item->title))) ?></legend>
</fieldset>
<div id="doc3" class="yui-t7">
<div id="bd">
diff --git a/modules/organize/views/organize_button_pane.html.php b/modules/organize/views/organize_button_pane.html.php
index cd780d5e..c5839a44 100644
--- a/modules/organize/views/organize_button_pane.html.php
+++ b/modules/organize/views/organize_button_pane.html.php
@@ -46,5 +46,5 @@
<div id="gOrganizeEditHandleButtonsRight">
<a id="gMicroThumbSelectAll" href="#" ref="select-all" class="gButtonLink ui-corner-all ui-state-default"><?= t("Select all") ?></a>
<a id="gMicroThumbUnselectAll" href="#" ref="unselect-all" style="display: none" class="gButtonLink ui-corner-all ui-state-default"><?= t("Deselect all") ?></a>
- <a id="gMicroThumbDone" href="#" ref="done" class="gButtonLink ui-corner-all ui-state-default"><?= t("Done") ?></a>
+ <a id="gMicroThumbDone" href="#" ref="done" class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a>
</div>