'data-forumid' => $forum->id,
'data-discussionid' => $discussionid,
'data-includetext' => $includetext,
- ));
+ ));
}
-
- if ($includetext) {
- $o .= $subscriptionstatus ? get_string('subscribed', 'mod_forum') : get_string('notsubscribed', 'mod_forum');
- }
-
- return $o;
}
+ /**
+ * Return a pair of spans containing classes to allow the subscribe and
+ * unsubscribe icons to be pre-loaded by a browser.
+ *
+ * @return string The generated markup
+ */
+ function forum_get_discussion_subscription_icon_preloaders() {
+ $o = '';
+ $o .= html_writer::span(' ', 'preload-subscribe');
+ $o .= html_writer::span(' ', 'preload-unsubscribe');
+ return $o;
+ }
+
/**
* Print the drop down that allows the user to select how they want to have
* the discussion displayed.
float: left;
}
-.path-mod-forum .discussiontoggle {
- display: inline-block;
- width: 12px;
-}
-
+ .path-mod-forum .preload-subscribe {
+ background: url([[pix:mod_forum|t/subscribed]]) no-repeat -9999px -9999px;
+ }
+
+ .path-mod-forum .preload-unsubscribe {
+ background: url([[pix:mod_forum|t/unsubscribed]]) no-repeat -9999px -9999px;
+ }
+
.path-mod-forum .discussionsubscription {
margin-top: -10px;
text-align: right;