web: no HTML anchor should be added when image.editable is false
This commit is contained in:
parent
ba303a2c1d
commit
be0e2d7df0
|
@ -172,6 +172,7 @@ function theme_image_annotate_formatter_image_annotate($element) {
|
||||||
'editable' => user_access('administer image annotations') || user_access('create image annotations'),
|
'editable' => user_access('administer image annotations') || user_access('create image annotations'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
module_load_include('module', 'jquery_ui');
|
||||||
// Load all the JS and CSS magic
|
// Load all the JS and CSS magic
|
||||||
drupal_add_js(array('imageAnnotate' => $settings), 'setting');
|
drupal_add_js(array('imageAnnotate' => $settings), 'setting');
|
||||||
jquery_ui_add(array('ui.resizable', 'ui.draggable'));
|
jquery_ui_add(array('ui.resizable', 'ui.draggable'));
|
||||||
|
|
|
@ -74,9 +74,6 @@ Drupal.annotativeImage = function (image) {
|
||||||
});
|
});
|
||||||
this.image.before(this.button);
|
this.image.before(this.button);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
this.image.before($('<a class="image-annotate-add" id="image-annotate-add-'+ image.field +'"></a>'));
|
|
||||||
}
|
|
||||||
// Hide the original
|
// Hide the original
|
||||||
this.image.hide();
|
this.image.hide();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue