diff --git a/modules/photoannotation/controllers/admin_photoannotation.php b/modules/photoannotation/controllers/admin_photoannotation.php
index bdcd71be..dc7436f6 100755
--- a/modules/photoannotation/controllers/admin_photoannotation.php
+++ b/modules/photoannotation/controllers/admin_photoannotation.php
@@ -43,7 +43,7 @@ class Admin_Photoannotation_Controller extends Admin_Controller {
//Load the target user
$targetuser = ORM::factory("user", $form->targetuser->value);
if (!$targetuser->loaded()) {
- message::error(t("The specified user could not be found"));
+ message::error(t("The specified person could not be found"));
url::redirect("admin/photoannotation/converter");
}
//Load all existing tag annotations
@@ -280,12 +280,12 @@ class Admin_Photoannotation_Controller extends Admin_Controller {
->checked(module::get_var("photoannotation", "shownotes", false));
$group->checkbox("fullname")->label(t("Show full name of a user instead of the username on annotations (username will be dispayed for users without a full name)."))
->checked(module::get_var("photoannotation", "fullname", false));
- $group = $form->group("notifications")->label(t("Notification and user cloud settings"));
+ $group = $form->group("notifications")->label(t("Notification and people cloud settings"));
$group->checkbox("nonotifications")->label(t("Disable user notifications."))
->checked(module::get_var("photoannotation", "nonotifications", false));
$group->checkbox("notificationoptout")->label(t("Notify users by default (only applies to new users and user who have not saved their profile after installing this module)."))
->checked(module::get_var("photoannotation", "notificationoptout", false));
- $group->checkbox("allowguestsearch")->label(t("Show user cloud and allow user search for guests."))
+ $group->checkbox("allowguestsearch")->label(t("Show people cloud and allow people search for guests."))
->checked(module::get_var("photoannotation", "allowguestsearch", false));
$group = $form->group("newtagmail")->label(t("Customize the mail sent to users when a user annotation is created"));
$group->input("newtagsubject")->label(t("Subject"))
diff --git a/modules/photoannotation/controllers/photoannotation.php b/modules/photoannotation/controllers/photoannotation.php
index 1431a311..48f71da9 100644
--- a/modules/photoannotation/controllers/photoannotation.php
+++ b/modules/photoannotation/controllers/photoannotation.php
@@ -20,7 +20,7 @@
class photoannotation_Controller extends Controller {
public function showuser() {
if (identity::active_user()->guest && !module::get_var("photoannotation", "allowguestsearch", false)) {
- message::error(t("You have to log in to perform a user search."));
+ message::error(t("You have to log in to perform a people search."));
url::redirect(url::site());
return;
}
@@ -88,7 +88,7 @@ class photoannotation_Controller extends Controller {
if ($user_id != "") {
$getuser = photoannotation::getuser($user_id);
if (!$getuser->found) {
- message::error(t("Could not find user %user.", array("user" => $user_id)));
+ message::error(t("Could not find anyone with the name %user.", array("user" => $user_id)));
url::redirect($redir_uri);
return;
}
@@ -112,18 +112,18 @@ class photoannotation_Controller extends Controller {
$tag->save();
$tag_data = $tag->id;
} else {
- $tag_data = -1;
+ $tag_data = "";
}
//Save annotation
if ($annotate_id == "new") { //This is a new annotation
- if ($user_id > -1) { //Save user
+ if ($user_id != "") { //Save user
photoannotation::saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
- } elseif ($tag_data > -1) { //Conversion user -> face
- photoannotation::saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
- } elseif ($item_title != "") { //Conversion user -> note
+ } elseif ($tag_data != "") { //Save face
+ photoannotation::saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
+ } elseif ($item_title != "") { //Save note
photoannotation::savenote($item_title, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
- } else { //Somethings wrong
- message::error(t("Please select a User or Tag or specify a Title."));
+ } else { //Something's wrong
+ message::error(t("Please select a person or tag or specify a title."));
url::redirect($redir_uri);
return;
}
@@ -133,16 +133,16 @@ class photoannotation_Controller extends Controller {
$updateduser = ORM::factory("items_user") //load the existing user
->where("id", "=", $annotate_id)
->find();
- if ($user_id > -1) { //Conversion user -> user
+ if ($user_id != "") { //Conversion user -> user
photoannotation::saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
- } elseif ($tag_data > -1) { //Conversion user -> face
+ } elseif ($tag_data != "") { //Conversion user -> face
photoannotation::saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updateduser->delete(); //delete old user
} elseif ($item_title != "") { //Conversion user -> note
photoannotation::savenote($item_title, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updateduser->delete(); //delete old user
} else { //Somethings wrong
- message::error(t("Please select a User or Tag or specify a Title."));
+ message::error(t("Please select a person or tag or specify a title."));
url::redirect($redir_uri);
return;
}
@@ -151,16 +151,16 @@ class photoannotation_Controller extends Controller {
$updatedface = ORM::factory("items_face") //load the existing user
->where("id", "=", $annotate_id)
->find();
- if ($user_id > -1) { //Conversion face -> user
+ if ($user_id != "") { //Conversion face -> user
photoannotation::saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updatedface->delete(); //delete old face
- } elseif ($tag_data > -1) { //Conversion face -> face
+ } elseif ($tag_data != "") { //Conversion face -> face
photoannotation::saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description, $annotate_id);
} elseif ($item_title != "") { //Conversion face -> note
photoannotation::savenote($item_title, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updatedface->delete(); //delete old face
} else { //Somethings wrong
- message::error(t("Please select a User or Tag or specify a Title."));
+ message::error(t("Please select a person or tag or specify a title."));
url::redirect($redir_uri);
return;
}
@@ -169,22 +169,22 @@ class photoannotation_Controller extends Controller {
$updatednote = ORM::factory("items_note") //load the existing user
->where("id", "=", $annotate_id)
->find();
- if ($user_id > -1) { //Conversion note -> user
+ if ($user_id != "") { //Conversion note -> user
photoannotation::saveuser($user_id, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updatednote->delete(); //delete old note
- } elseif ($tag_data > -1) { //Conversion note -> face
+ } elseif ($tag_data != "") { //Conversion note -> face
photoannotation::saveface($tag_data, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description);
$updatednote->delete(); //delete old note
} elseif ($item_title != "") { //Conversion note -> note
photoannotation::savenote($item_title, $item_id, $str_x1, $str_y1, $str_x2, $str_y2, $description, $annotate_id);
} else { //Somethings wrong
- message::error(t("Please select a User or Tag or specify a Title."));
+ message::error(t("Please select a person or tag or specify a title."));
url::redirect($redir_uri);
return;
}
break;
default:
- message::error(t("Please select a User or Tag or specify a Title."));
+ message::error(t("Please select a person or tag or specify a title."));
url::redirect($redir_uri);
return;
}
@@ -235,7 +235,8 @@ class photoannotation_Controller extends Controller {
$user_part = ltrim(end($user_parts));
$user_list = ORM::factory("user")
->where("name", "LIKE", "{$user_part}%")
- ->order_by("name", "ASC")
+ ->or_where("full_name", "LIKE", "{$user_part}%")
+ ->order_by("full_name", "ASC")
->limit($limit)
->find_all();
foreach ($user_list as $user) {
diff --git a/modules/photoannotation/helpers/photoannotation.php b/modules/photoannotation/helpers/photoannotation.php
index 13ec4078..f43e66fc 100644
--- a/modules/photoannotation/helpers/photoannotation.php
+++ b/modules/photoannotation/helpers/photoannotation.php
@@ -43,9 +43,9 @@ class photoannotation_Core {
static function get_user_search_form($form_id) {
$form = new Forge("photoannotation/showuser/{$item->id}", "", "post", array("id" => $form_id, "class" => "g-short-form"));
- $label = t("Type user name");
+ $label = t("Search for a person");
- $group = $form->group("showuser")->label("Search for a user");
+ $group = $form->group("showuser")->label("Search for a person");
$group->input("name")->label($label)->id("name");
$group->submit("")->value(t("Search"));
return $form;
@@ -282,4 +282,4 @@ class photoannotation_Core {
static function annotation_count($user_id) {
return ORM::factory("items_user")->where("user_id", "=", $user_id)->count_all();
}
-}
\ No newline at end of file
+}
diff --git a/modules/photoannotation/helpers/photoannotation_block.php b/modules/photoannotation/helpers/photoannotation_block.php
index 6facc671..d0e89e0a 100644
--- a/modules/photoannotation/helpers/photoannotation_block.php
+++ b/modules/photoannotation/helpers/photoannotation_block.php
@@ -29,7 +29,7 @@ class photoannotation_block_Core {
case "photoannotation":
$block = new Block();
$block->css_id = "g-photoannotation";
- $block->title = t("Users");
+ $block->title = t("People");
$block->content = new View("photoannotation_block.html");
$block->content->cloud = photoannotation::cloud(30);
$block->content->form = photoannotation::get_user_search_form("g-user-cloud-form");
@@ -37,4 +37,4 @@ class photoannotation_block_Core {
}
return $block;
}
-}
\ No newline at end of file
+}
diff --git a/modules/photoannotation/js/jquery.annotate.js b/modules/photoannotation/js/jquery.annotate.js
index 4125bbc0..fc5492bc 100644
--- a/modules/photoannotation/js/jquery.annotate.js
+++ b/modules/photoannotation/js/jquery.annotate.js
@@ -209,8 +209,8 @@
newNote.noteid = "new";
newNote.top = 30;
newNote.left = 30;
- newNote.width = 30;
- newNote.height = 30;
+ newNote.width = 60;
+ newNote.height = 60;
newNote.text = "";
newNote.description = "";
newNote.notetype = "";
diff --git a/modules/photoannotation/js/jquery.annotate.min.js b/modules/photoannotation/js/jquery.annotate.min.js
index 9c9cdd6b..97746cf4 100644
--- a/modules/photoannotation/js/jquery.annotate.min.js
+++ b/modules/photoannotation/js/jquery.annotate.min.js
@@ -1 +1 @@
-(function($){$.fn.annotateImage=function(options){var opts=$.extend({},$.fn.annotateImage.defaults,options);var image=this;this.image=this;this.mode='view';this.getUrl=opts.getUrl;this.saveUrl=opts.saveUrl;this.deleteUrl=opts.deleteUrl;this.deleteUrl=opts.deleteUrl;this.editable=opts.editable;this.useAjax=opts.useAjax;this.tags=opts.tags;this.notes=opts.notes;this.labels=opts.labels;this.csrf=opts.csrf;this.cssaclass=opts.cssaclass;this.rtlsupport=opts.rtlsupport;this.users=opts.users;this.canvas=$('