]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
ModPlus available also for non-logged in users.
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Jun 2014 18:30:00 +0000 (20:30 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Jun 2014 18:30:00 +0000 (20:30 +0200)
plugins/ModPlus/ModPlusPlugin.php
plugins/ModPlus/css/modplus.css [new file with mode: 0644]
plugins/ModPlus/js/modplus.js [new file with mode: 0644]
plugins/ModPlus/modplus.css [deleted file]
plugins/ModPlus/modplus.js [deleted file]

index e041b1aaf47e25dfb405ef0cafdb572e072eccfc..682545327d27bb5f1562148c6871f2da6955f306 100644 (file)
@@ -43,22 +43,19 @@ class ModPlusPlugin extends Plugin
     }
 
     /**
-     * Load JS at runtime if we're logged in.
+     * Load JS at runtime.
      *
      * @param Action $action
      * @return boolean hook result
      */
-    function onEndShowScripts($action)
+    function onEndShowScripts(Action $action)
     {
-        $user = common_current_user();
-        if ($user) {
-            $action->script($this->path('modplus.js'));
-        }
+        $action->script($this->path('js/modplus.js'));
         return true;
     }
 
     public function onEndShowStylesheets(Action $action) {
-        $action->cssLink($this->path('modplus.css'));
+        $action->cssLink($this->path('css/modplus.css'));
         return true;
     }
 
diff --git a/plugins/ModPlus/css/modplus.css b/plugins/ModPlus/css/modplus.css
new file mode 100644 (file)
index 0000000..1e3e15d
--- /dev/null
@@ -0,0 +1,18 @@
+.remote-profile-options {
+    position: absolute;
+    z-index: 999;
+
+    background: url(../../theme/base/images/icons/twotone/green/admin.gif) no-repeat 8px 8px white;
+    border: solid 1px #c0c0c0;
+
+    margin-top: 56px;
+
+    padding: 6px 16px;
+    padding-left: 32px;
+
+    border-radius: 8px;
+
+    box-shadow:3px 3px 7px rgba(194, 194, 194, 0.3);
+
+    display: none;
+}
diff --git a/plugins/ModPlus/js/modplus.js b/plugins/ModPlus/js/modplus.js
new file mode 100644 (file)
index 0000000..6b5b9f8
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * modplus.js
+ * (c) 2010 StatusNet, Inc
+ */
+
+$(function() {
+    // Notice lists...
+    $(document).on('mouseenter', '.notice .p-author', function(e) {
+        var notice = $(this).closest('.notice');
+        var popup = notice.find('.remote-profile-options');
+        if (popup.length) {
+            popup.fadeIn();
+        }
+    });
+    $(document).on('mouseleave', '.notice', function(e) {
+        var notice = $(this);
+        var popup = notice.find('.remote-profile-options');
+        if (popup.length) {
+            popup.fadeOut();
+        }
+    });
+
+    // Profile lists...
+    $(document).on('mouseenter', '.profile .u-photo', function(e) {
+        var profile = $(this).closest('.profile');
+        var popup = profile.find('.remote-profile-options');
+        if (popup.length) {
+            popup.fadeIn();
+        }
+    });
+    $(document).on('mouseleave', '.profile', function(e) {
+        var profile = $(this);
+        var popup = profile.find('.remote-profile-options');
+        if (popup.length) {
+            popup.fadeOut();
+        }
+    });
+
+});
diff --git a/plugins/ModPlus/modplus.css b/plugins/ModPlus/modplus.css
deleted file mode 100644 (file)
index 1e3e15d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-.remote-profile-options {
-    position: absolute;
-    z-index: 999;
-
-    background: url(../../theme/base/images/icons/twotone/green/admin.gif) no-repeat 8px 8px white;
-    border: solid 1px #c0c0c0;
-
-    margin-top: 56px;
-
-    padding: 6px 16px;
-    padding-left: 32px;
-
-    border-radius: 8px;
-
-    box-shadow:3px 3px 7px rgba(194, 194, 194, 0.3);
-
-    display: none;
-}
diff --git a/plugins/ModPlus/modplus.js b/plugins/ModPlus/modplus.js
deleted file mode 100644 (file)
index 6b5b9f8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * modplus.js
- * (c) 2010 StatusNet, Inc
- */
-
-$(function() {
-    // Notice lists...
-    $(document).on('mouseenter', '.notice .p-author', function(e) {
-        var notice = $(this).closest('.notice');
-        var popup = notice.find('.remote-profile-options');
-        if (popup.length) {
-            popup.fadeIn();
-        }
-    });
-    $(document).on('mouseleave', '.notice', function(e) {
-        var notice = $(this);
-        var popup = notice.find('.remote-profile-options');
-        if (popup.length) {
-            popup.fadeOut();
-        }
-    });
-
-    // Profile lists...
-    $(document).on('mouseenter', '.profile .u-photo', function(e) {
-        var profile = $(this).closest('.profile');
-        var popup = profile.find('.remote-profile-options');
-        if (popup.length) {
-            popup.fadeIn();
-        }
-    });
-    $(document).on('mouseleave', '.profile', function(e) {
-        var profile = $(this);
-        var popup = profile.find('.remote-profile-options');
-        if (popup.length) {
-            popup.fadeOut();
-        }
-    });
-
-});