summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOskar Bechtold2013-04-21 09:46:08 (GMT)
committer Oskar Bechtold2013-04-21 09:46:08 (GMT)
commit3a1df2ba8c33937de46ee388c3e54e23238e190e (patch)
tree5abd184a09e9ee8fb402c79176b5cba61f7dddfe
parent0feb0b53c70048f3a9f95d40f3deb604a9f222ce (diff)
Issue #1951656#comment-7324038 by klausi: added hook_access, removed double access arguments, hook_uninstall, removed author tags7.x-1.0-rc1
-rw-r--r--js/timed_messages.js23
-rw-r--r--timed_messages.admin.inc1
-rw-r--r--timed_messages.install12
-rw-r--r--timed_messages.module18
4 files changed, 37 insertions, 17 deletions
diff --git a/js/timed_messages.js b/js/timed_messages.js
index fa2f2f0..e20880e 100644
--- a/js/timed_messages.js
+++ b/js/timed_messages.js
@@ -1,7 +1,6 @@
/**
* @file
* enhances the messages with extra js
- * @author Oskar Bechtold <bechtold@brightsolutions.com>
* @version 7.x-1.x
*/
@@ -59,21 +58,21 @@
}
//start progress animation, and if wanted show link and hide the message when finished
- if(
+ if (
message.hasClass('status') && Drupal.settings.timed_messages.hide_status ||
message.hasClass('warning') && Drupal.settings.timed_messages.hide_warning ||
message.hasClass('error') && Drupal.settings.timed_messages.hide_error
- ){
- progress.animate({
- opacity: 1.0,
- width: '95%'
- }, time, function() {
- showlink.show();
- message.slideUp('slow', function() {
- //hide progress, so when message is shown again, there is no full progress bar, thats not moving
- progress.hide();
+ ) {
+ progress.animate({
+ opacity: 1.0,
+ width: '95%'
+ }, time, function() {
+ showlink.show();
+ message.slideUp('slow', function() {
+ //hide progress, so when message is shown again, there is no full progress bar, thats not moving
+ progress.hide();
+ });
});
- });
}
//when hovering over the message, pause and resume the progress animation
diff --git a/timed_messages.admin.inc b/timed_messages.admin.inc
index 88e810d..704121c 100644
--- a/timed_messages.admin.inc
+++ b/timed_messages.admin.inc
@@ -3,7 +3,6 @@
/**
* @file
* Administration form for timed messages
- * @author Oskar Bechtold <bechtold@brightsolutions.de>
*/
/**
diff --git a/timed_messages.install b/timed_messages.install
new file mode 100644
index 0000000..3404336
--- /dev/null
+++ b/timed_messages.install
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @file implements hook_install and hook_uninstall
+ */
+
+/**
+ * Implements hook_uninstall()
+ */
+function timed_messages_uninstall() {
+ variable_del('timed_messages');
+}
diff --git a/timed_messages.module b/timed_messages.module
index aa8a7da..5c5f52b 100644
--- a/timed_messages.module
+++ b/timed_messages.module
@@ -3,8 +3,6 @@
/**
* @file
* enhances the messages with extra css and js
- *
- * @author Oskar Bechtold <bechtold@brightsolutions.com>
* @version 7.x-1.x
*/
@@ -88,10 +86,22 @@ function timed_messages_menu() {
'description' => 'Settings to control timed messages',
'page callback' => 'drupal_get_form',
'page arguments' => array('timed_messages_admin'),
- 'access arguments' => array('administer onthisdate settings'),
- 'access arguments' => array('administer time messages configuration'),
+ 'access arguments' => array('administer timed messages'),
'file' => 'timed_messages.admin.inc',
'type' => MENU_NORMAL_ITEM,
),
);
}
+
+/**
+ * Implements hook_permission()
+ * @return @see hook_permission
+ */
+function timed_messages_permission() {
+ return array(
+ 'administer timed messages' => array(
+ 'title' => t('Administer timed messages'),
+ 'description' => t('Administer classes, timers for the timed messages.'),
+ ),
+ );
+} \ No newline at end of file