web: no HTML anchor should be added when image.editable is false

This commit is contained in:
Bart Van Der Meerssche 2009-10-01 10:04:02 +00:00
parent ba303a2c1d
commit be0e2d7df0
2 changed files with 1 additions and 3 deletions

View File

@ -172,6 +172,7 @@ function theme_image_annotate_formatter_image_annotate($element) {
'editable' => user_access('administer image annotations') || user_access('create image annotations'),
));
module_load_include('module', 'jquery_ui');
// Load all the JS and CSS magic
drupal_add_js(array('imageAnnotate' => $settings), 'setting');
jquery_ui_add(array('ui.resizable', 'ui.draggable'));

View File

@ -74,9 +74,6 @@ Drupal.annotativeImage = function (image) {
});
this.image.before(this.button);
}
else {
this.image.before($('<a class="image-annotate-add" id="image-annotate-add-'+ image.field +'"></a>'));
}
// Hide the original
this.image.hide();
};