Merge branch '1.0.x' of /home/ian/public_html/statusnet-enhancements
37
README
@ -2,8 +2,8 @@
|
||||
README
|
||||
------
|
||||
|
||||
StatusNet 0.9.3 ("Half a World Away")
|
||||
29 June 2010
|
||||
StatusNet 0.9.4beta2
|
||||
11 August 2010
|
||||
|
||||
This is the README file for StatusNet, the Open Source microblogging
|
||||
platform. It includes installation instructions, descriptions of
|
||||
@ -77,27 +77,31 @@ for additional terms.
|
||||
New this version
|
||||
================
|
||||
|
||||
This is a minor bug and feature release since version 0.9.2 released on
|
||||
4 May 2010.
|
||||
This is a security, bug and feature release since version 0.9.3 released on
|
||||
29 June 2010.
|
||||
|
||||
For best compatibility with client software and site federation, and a lot of
|
||||
bug fixes, it is highly recommended that all public sites upgrade to the new
|
||||
version.
|
||||
|
||||
Changes from 0.9.4beta1:
|
||||
- fix for daemon config switching on multi-site setup
|
||||
|
||||
Notable changes this version:
|
||||
|
||||
- Enhanced API output to aid StatusNet-specific clients
|
||||
- OpenID and OAuth libraries patched for potential timing attack
|
||||
- OStatus feed i/o updated for Activity Streams
|
||||
- Correctness fixes on XRD, other discovery bits
|
||||
- Support for contacting SNI-based SSL virtual hosts when SSL
|
||||
certificate verification is enabled (requires PHP 5.3.2+ or
|
||||
enabling CURL backend with $config['http']['curl'] = true)
|
||||
- Experimental SubMirror plugin
|
||||
- Multi-site status_network table mode has been tweaked to support
|
||||
multiple tags better
|
||||
- Many updates to user interface translation from TranslateWiki
|
||||
- OStatus now works subscribing to SSL-protected sites by default
|
||||
- OpenID now works on PHP 5.3, supports closer site integration.
|
||||
- Numerous API and FOAF output fixes.
|
||||
- Fixes to Facebook integration for FB API behavior changes
|
||||
- PostgreSQL support updates
|
||||
- Initial version of a custom theme uploader (disabled by default)
|
||||
- LDAP auth plugins cleanup
|
||||
- Many other bugfixes
|
||||
|
||||
A full changelog is available at http://status.net/wiki/StatusNet_0.9.3.
|
||||
A full changelog is available at http://status.net/wiki/StatusNet_0.9.4.
|
||||
|
||||
Prerequisites
|
||||
=============
|
||||
@ -125,7 +129,6 @@ Your PHP installation must include the following PHP extensions:
|
||||
- MySQL. For accessing the database.
|
||||
- GD. For scaling down avatar images.
|
||||
- mbstring. For handling Unicode (UTF-8) encoded strings.
|
||||
- gettext. For multiple languages. Default on many PHP installs.
|
||||
|
||||
For some functionality, you will also need the following extensions:
|
||||
|
||||
@ -140,6 +143,8 @@ For some functionality, you will also need the following extensions:
|
||||
Sphinx server to serve the search queries.
|
||||
- bcmath or gmp. For Salmon signatures (part of OStatus). Needed
|
||||
if you have OStatus configured.
|
||||
- gettext. For multiple languages. Default on many PHP installs;
|
||||
will be emulated if not present.
|
||||
|
||||
You will almost definitely get 2-3 times better performance from your
|
||||
site if you install a PHP bytecode cache/accelerator. Some well-known
|
||||
@ -209,7 +214,7 @@ especially if you've previously installed PHP/MySQL packages.
|
||||
1. Unpack the tarball you downloaded on your Web server. Usually a
|
||||
command like this will work:
|
||||
|
||||
tar zxf statusnet-0.9.2.tar.gz
|
||||
tar zxf statusnet-0.9.4.tar.gz
|
||||
|
||||
...which will make a statusnet-0.9.2 subdirectory in your current
|
||||
directory. (If you don't have shell access on your Web server, you
|
||||
@ -219,7 +224,7 @@ especially if you've previously installed PHP/MySQL packages.
|
||||
2. Move the tarball to a directory of your choosing in your Web root
|
||||
directory. Usually something like this will work:
|
||||
|
||||
mv statusnet-0.9.2 /var/www/statusnet
|
||||
mv statusnet-0.9.4 /var/www/statusnet
|
||||
|
||||
This will make your StatusNet instance available in the statusnet path of
|
||||
your server, like "http://example.net/statusnet". "microblog" or
|
||||
|
@ -131,6 +131,8 @@ class NewnoticeAction extends Action
|
||||
$user = common_current_user();
|
||||
assert($user); // XXX: maybe an error instead...
|
||||
$content = $this->trimmed('status_textarea');
|
||||
$options = array();
|
||||
Event::handle('StartSaveNewNoticeWeb', array($this, $user, &$content, &$options));
|
||||
|
||||
if (!$content) {
|
||||
$this->clientError(_('No content!'));
|
||||
@ -157,11 +159,9 @@ class NewnoticeAction extends Action
|
||||
Notice::maxContent()));
|
||||
}
|
||||
|
||||
$replyto = $this->trimmed('inreplyto');
|
||||
#If an ID of 0 is wrongly passed here, it will cause a database error,
|
||||
#so override it...
|
||||
if ($replyto == 0) {
|
||||
$replyto = 'false';
|
||||
$replyto = intval($this->trimmed('inreplyto'));
|
||||
if ($replyto) {
|
||||
$options['replyto'] = $replyto;
|
||||
}
|
||||
|
||||
$upload = null;
|
||||
@ -169,7 +169,10 @@ class NewnoticeAction extends Action
|
||||
|
||||
if (isset($upload)) {
|
||||
|
||||
$content_shortened .= ' ' . $upload->shortUrl();
|
||||
if (Event::handle('StartSaveNewNoticeAppendAttachment', array($this, $upload, &$content_shortened, &$options))) {
|
||||
$content_shortened .= ' ' . $upload->shortUrl();
|
||||
}
|
||||
Event::handle('EndSaveNewNoticeAppendAttachment', array($this, $upload, &$content_shortened, &$options));
|
||||
|
||||
if (Notice::contentTooLong($content_shortened)) {
|
||||
$upload->delete();
|
||||
@ -182,8 +185,6 @@ class NewnoticeAction extends Action
|
||||
}
|
||||
}
|
||||
|
||||
$options = array('reply_to' => ($replyto == 'false') ? null : $replyto);
|
||||
|
||||
if ($user->shareLocation()) {
|
||||
// use browser data if checked; otherwise profile data
|
||||
if ($this->arg('notice_data-geo')) {
|
||||
@ -208,6 +209,7 @@ class NewnoticeAction extends Action
|
||||
if (isset($upload)) {
|
||||
$upload->attachToNotice($notice);
|
||||
}
|
||||
Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options));
|
||||
|
||||
if ($this->boolean('ajax')) {
|
||||
header('Content-Type: text/xml;charset=utf-8');
|
||||
|
@ -485,7 +485,7 @@ class Notice extends Memcached_DataObject
|
||||
function saveKnownUrls($urls)
|
||||
{
|
||||
// @fixme validation?
|
||||
foreach ($urls as $url) {
|
||||
foreach (array_unique($urls) as $url) {
|
||||
File::processNew($url, $this->id);
|
||||
}
|
||||
}
|
||||
@ -893,7 +893,7 @@ class Notice extends Memcached_DataObject
|
||||
}
|
||||
|
||||
$groups = array();
|
||||
foreach ($group_ids as $id) {
|
||||
foreach (array_unique($group_ids) as $id) {
|
||||
$group = User_group::staticGet('id', $id);
|
||||
if ($group) {
|
||||
common_log(LOG_ERR, "Local delivery to group id $id, $group->nickname");
|
||||
@ -1016,7 +1016,7 @@ class Notice extends Memcached_DataObject
|
||||
}
|
||||
$sender = Profile::staticGet($this->profile_id);
|
||||
|
||||
foreach ($uris as $uri) {
|
||||
foreach (array_unique($uris) as $uri) {
|
||||
|
||||
$user = User::staticGet('uri', $uri);
|
||||
|
||||
@ -1029,6 +1029,7 @@ class Notice extends Memcached_DataObject
|
||||
|
||||
$reply->notice_id = $this->id;
|
||||
$reply->profile_id = $user->id;
|
||||
common_log(LOG_INFO, __METHOD__ . ": saving reply: notice $this->id to profile $user->id");
|
||||
|
||||
$id = $reply->insert();
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ var SN = { // StatusNet
|
||||
return;
|
||||
}
|
||||
|
||||
var remaining = MaxLength - form.find('#'+SN.C.S.NoticeDataText).val().length;
|
||||
var remaining = MaxLength - SN.U.CharacterCount(form);
|
||||
var counter = form.find('#'+SN.C.S.NoticeTextCount);
|
||||
|
||||
if (remaining.toString() != counter.text()) {
|
||||
@ -134,6 +134,10 @@ var SN = { // StatusNet
|
||||
}
|
||||
},
|
||||
|
||||
CharacterCount: function(form) {
|
||||
return form.find('#'+SN.C.S.NoticeDataText).val().length;
|
||||
},
|
||||
|
||||
ClearCounterBlackout: function(form) {
|
||||
// Allow keyup events to poke the counter again
|
||||
SN.C.I.CounterBlackout = false;
|
||||
|
@ -71,6 +71,7 @@ class ActivityContext
|
||||
|
||||
$links = $element->getElementsByTagNameNS(ActivityUtils::ATOM, ActivityUtils::LINK);
|
||||
|
||||
$attention = array();
|
||||
for ($i = 0; $i < $links->length; $i++) {
|
||||
|
||||
$link = $links->item($i);
|
||||
@ -80,11 +81,12 @@ class ActivityContext
|
||||
// XXX: Deprecate this in favour of "mentioned" from Salmon spec
|
||||
// http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-salmon-00.html#SALR
|
||||
if ($linkRel == self::ATTENTION) {
|
||||
$this->attention[] = $link->getAttribute(self::HREF);
|
||||
$attention[] = $link->getAttribute(self::HREF);
|
||||
} elseif ($linkRel == self::MENTIONED) {
|
||||
$this->attention[] = $link->getAttribute(self::HREF);
|
||||
$attention[] = $link->getAttribute(self::HREF);
|
||||
}
|
||||
}
|
||||
$this->attention = array_unique($attention);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,10 +22,10 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
//exit with 200 response, if this is checking fancy from the installer
|
||||
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
|
||||
|
||||
define('STATUSNET_VERSION', '0.9.3');
|
||||
define('STATUSNET_VERSION', '0.9.4beta2');
|
||||
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
|
||||
|
||||
define('STATUSNET_CODENAME', 'Half a World Away');
|
||||
define('STATUSNET_CODENAME', 'Orange Crush');
|
||||
|
||||
define('AVATAR_PROFILE_SIZE', 96);
|
||||
define('AVATAR_STREAM_SIZE', 48);
|
||||
|
@ -310,6 +310,7 @@ function get_all_languages() {
|
||||
'da' => array('q' => 0.8, 'lang' => 'da', 'name' => 'Danish', 'direction' => 'ltr'),
|
||||
'de' => array('q' => 0.8, 'lang' => 'de', 'name' => 'German', 'direction' => 'ltr'),
|
||||
'el' => array('q' => 0.1, 'lang' => 'el', 'name' => 'Greek', 'direction' => 'ltr'),
|
||||
'eo' => array('q' => 0.8, 'lang' => 'eo', 'name' => 'Esperanto', 'direction' => 'ltr'),
|
||||
'en-us' => array('q' => 1, 'lang' => 'en', 'name' => 'English (US)', 'direction' => 'ltr'),
|
||||
'en-gb' => array('q' => 1, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
|
||||
'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English (US)', 'direction' => 'ltr'),
|
||||
|
@ -333,7 +333,7 @@ class MysqlSchema extends Schema
|
||||
}
|
||||
|
||||
if (empty($name)) {
|
||||
$name = "$table_".implode("_", $columnNames)."_idx";
|
||||
$name = "{$table}_".implode("_", $columnNames)."_idx";
|
||||
}
|
||||
|
||||
$res = $this->conn->query("ALTER TABLE $table ".
|
||||
|
@ -499,7 +499,7 @@ class NoticeListItem extends Widget
|
||||
$ns = $this->notice->getSource();
|
||||
|
||||
if ($ns) {
|
||||
$source_name = (empty($ns->name)) ? _($ns->code) : _($ns->name);
|
||||
$source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _('web')) : _($ns->name);
|
||||
$this->out->text(' ');
|
||||
$this->out->elementStart('span', 'source');
|
||||
// FIXME: probably i18n issue. If "from" is followed by text, that should be a parameter to "from" (from %s).
|
||||
|
@ -141,7 +141,7 @@ class StatusNet
|
||||
return true;
|
||||
}
|
||||
|
||||
$sn = Status_network::staticGet($nickname);
|
||||
$sn = Status_network::staticGet('nickname', $nickname);
|
||||
if (empty($sn)) {
|
||||
return false;
|
||||
throw new Exception("No such site nickname '$nickname'");
|
||||
|
@ -649,7 +649,7 @@ class StompQueueManager extends QueueManager
|
||||
*/
|
||||
protected function updateSiteConfig($nickname)
|
||||
{
|
||||
$sn = Status_network::staticGet($nickname);
|
||||
$sn = Status_network::staticGet('nickname', $nickname);
|
||||
if ($sn) {
|
||||
$this->switchSite($nickname);
|
||||
if (!in_array($nickname, $this->sites)) {
|
||||
|
@ -11,12 +11,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:24:20+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:11:54+0000\n"
|
||||
"Language-Team: British English\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: en-gb\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -173,8 +173,8 @@ msgid ""
|
||||
"You can try to [nudge %1$s](../%2$s) from their profile or [post something "
|
||||
"to them](%%%%action.newnotice%%%%?status_textarea=%3$s)."
|
||||
msgstr ""
|
||||
"You can try to [nudge %1$s](../%2$s) from his profile or [post something to "
|
||||
"his or her attention](%%%%action.newnotice%%%%?status_textarea=%3$s)."
|
||||
"Be the first to [post on this topic](%%%%action.newnotice%%%%?"
|
||||
"status_textarea=%s)!"
|
||||
|
||||
#: actions/all.php:149 actions/replies.php:210 actions/showstream.php:211
|
||||
#, fuzzy, php-format
|
||||
@ -182,8 +182,8 @@ msgid ""
|
||||
"Why not [register an account](%%%%action.register%%%%) and then nudge %s or "
|
||||
"post a notice to them."
|
||||
msgstr ""
|
||||
"Why not [register an account](%%%%action.register%%%%) and then nudge %s or "
|
||||
"post a notice to his or her attention."
|
||||
"Why not [register an account](%%action.register%%) and be the first to add a "
|
||||
"notice to your favourites!"
|
||||
|
||||
#. TRANS: H1 text
|
||||
#: actions/all.php:182
|
||||
@ -367,7 +367,7 @@ msgstr "Could not delete favourite."
|
||||
#: actions/apifriendshipscreate.php:109
|
||||
#, fuzzy
|
||||
msgid "Could not follow user: profile not found."
|
||||
msgstr "Could not follow user: User not found."
|
||||
msgstr "Could not unfollow user: User not found."
|
||||
|
||||
#: actions/apifriendshipscreate.php:118
|
||||
#, php-format
|
||||
@ -383,9 +383,8 @@ msgid "You cannot unfollow yourself."
|
||||
msgstr "You cannot unfollow yourself."
|
||||
|
||||
#: actions/apifriendshipsexists.php:91
|
||||
#, fuzzy
|
||||
msgid "Two valid IDs or screen_names must be supplied."
|
||||
msgstr "Two user ids or screen_names must be supplied."
|
||||
msgstr ""
|
||||
|
||||
#: actions/apifriendshipsshow.php:134
|
||||
msgid "Could not determine source user."
|
||||
@ -789,7 +788,7 @@ msgid "Preview"
|
||||
msgstr "Preview"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Delete"
|
||||
|
||||
@ -1070,7 +1069,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Do not delete this notice"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Delete this notice"
|
||||
|
||||
@ -2128,8 +2127,9 @@ msgid "This is your inbox, which lists your incoming private messages."
|
||||
msgstr "This is your inbox, which lists your incoming private messages."
|
||||
|
||||
#: actions/invite.php:39
|
||||
#, fuzzy
|
||||
msgid "Invites have been disabled."
|
||||
msgstr ""
|
||||
msgstr "Invitations enabled"
|
||||
|
||||
#: actions/invite.php:41
|
||||
#, php-format
|
||||
@ -2493,11 +2493,9 @@ msgid "Updates matching search term \"%1$s\" on %2$s!"
|
||||
msgstr "Updates matching search term \"%1$s\" on %2$s!"
|
||||
|
||||
#: actions/nudge.php:85
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"This user doesn't allow nudges or hasn't confirmed or set their email yet."
|
||||
msgstr ""
|
||||
"This user doesn't allow nudges or hasn't confirmed or set his e-mail yet."
|
||||
|
||||
#: actions/nudge.php:94
|
||||
msgid "Nudge sent"
|
||||
@ -2529,8 +2527,9 @@ msgid "Connected applications"
|
||||
msgstr "Connected applications"
|
||||
|
||||
#: actions/oauthconnectionssettings.php:83
|
||||
#, fuzzy
|
||||
msgid "You have allowed the following applications to access you account."
|
||||
msgstr ""
|
||||
msgstr "You have not authorised any applications to use your account."
|
||||
|
||||
#: actions/oauthconnectionssettings.php:175
|
||||
msgid "You are not a user of that application."
|
||||
@ -2609,8 +2608,9 @@ msgid "View profile designs"
|
||||
msgstr "View profile designs"
|
||||
|
||||
#: actions/othersettings.php:123
|
||||
#, fuzzy
|
||||
msgid "Show or hide profile designs."
|
||||
msgstr ""
|
||||
msgstr "View profile designs"
|
||||
|
||||
#: actions/othersettings.php:153
|
||||
msgid "URL shortening service is too long (max 50 chars)."
|
||||
@ -2717,8 +2717,9 @@ msgid "Paths"
|
||||
msgstr ""
|
||||
|
||||
#: actions/pathsadminpanel.php:70
|
||||
#, fuzzy
|
||||
msgid "Path and server settings for this StatusNet site."
|
||||
msgstr ""
|
||||
msgstr "Basic settings for this StatusNet site"
|
||||
|
||||
#: actions/pathsadminpanel.php:157
|
||||
#, php-format
|
||||
@ -2785,16 +2786,19 @@ msgid "Theme"
|
||||
msgstr ""
|
||||
|
||||
#: actions/pathsadminpanel.php:264
|
||||
#, fuzzy
|
||||
msgid "Theme server"
|
||||
msgstr ""
|
||||
msgstr "SSL server"
|
||||
|
||||
#: actions/pathsadminpanel.php:268
|
||||
#, fuzzy
|
||||
msgid "Theme path"
|
||||
msgstr ""
|
||||
msgstr "Site path"
|
||||
|
||||
#: actions/pathsadminpanel.php:272
|
||||
#, fuzzy
|
||||
msgid "Theme directory"
|
||||
msgstr ""
|
||||
msgstr "Avatar directory"
|
||||
|
||||
#: actions/pathsadminpanel.php:279
|
||||
msgid "Avatars"
|
||||
@ -2813,20 +2817,24 @@ msgid "Avatar directory"
|
||||
msgstr "Avatar directory"
|
||||
|
||||
#: actions/pathsadminpanel.php:301
|
||||
#, fuzzy
|
||||
msgid "Backgrounds"
|
||||
msgstr ""
|
||||
msgstr "Background"
|
||||
|
||||
#: actions/pathsadminpanel.php:305
|
||||
#, fuzzy
|
||||
msgid "Background server"
|
||||
msgstr ""
|
||||
msgstr "Background"
|
||||
|
||||
#: actions/pathsadminpanel.php:309
|
||||
#, fuzzy
|
||||
msgid "Background path"
|
||||
msgstr ""
|
||||
msgstr "Background"
|
||||
|
||||
#: actions/pathsadminpanel.php:313
|
||||
#, fuzzy
|
||||
msgid "Background directory"
|
||||
msgstr ""
|
||||
msgstr "Background directory not writable: %s."
|
||||
|
||||
#: actions/pathsadminpanel.php:320
|
||||
msgid "SSL"
|
||||
@ -2845,8 +2853,9 @@ msgid "Always"
|
||||
msgstr ""
|
||||
|
||||
#: actions/pathsadminpanel.php:329
|
||||
#, fuzzy
|
||||
msgid "Use SSL"
|
||||
msgstr ""
|
||||
msgstr "SSL"
|
||||
|
||||
#: actions/pathsadminpanel.php:330
|
||||
msgid "When to use SSL"
|
||||
@ -3062,21 +3071,24 @@ msgid "Public Stream Feed (Atom)"
|
||||
msgstr "Public Stream Feed (Atom)"
|
||||
|
||||
#: actions/public.php:188
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"This is the public timeline for %%site.name%% but no one has posted anything "
|
||||
"yet."
|
||||
msgstr ""
|
||||
"This is the timeline for %s and friends but no one has posted anything yet."
|
||||
|
||||
#: actions/public.php:191
|
||||
msgid "Be the first to post!"
|
||||
msgstr ""
|
||||
|
||||
#: actions/public.php:195
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"Why not [register an account](%%action.register%%) and be the first to post!"
|
||||
msgstr ""
|
||||
"Why not [register an account](%%action.register%%) and be the first to add a "
|
||||
"notice to your favourites!"
|
||||
|
||||
#: actions/public.php:242
|
||||
#, php-format
|
||||
@ -3121,11 +3133,13 @@ msgid "Be the first to post one!"
|
||||
msgstr ""
|
||||
|
||||
#: actions/publictagcloud.php:75
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"Why not [register an account](%%action.register%%) and be the first to post "
|
||||
"one!"
|
||||
msgstr ""
|
||||
"Why not [register an account](%%action.register%%) and be the first to add a "
|
||||
"notice to your favourites!"
|
||||
|
||||
#: actions/publictagcloud.php:134
|
||||
msgid "Tag cloud"
|
||||
@ -3172,8 +3186,9 @@ msgid "You have been identified. Enter a new password below. "
|
||||
msgstr ""
|
||||
|
||||
#: actions/recoverpassword.php:188
|
||||
#, fuzzy
|
||||
msgid "Password recovery"
|
||||
msgstr ""
|
||||
msgstr "Password recovery requested"
|
||||
|
||||
#: actions/recoverpassword.php:191
|
||||
msgid "Nickname or email address"
|
||||
@ -3463,7 +3478,7 @@ msgstr "You can't repeat your own notice."
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "You already repeated that notice."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Repeated"
|
||||
|
||||
@ -3502,9 +3517,7 @@ msgstr "Notice feed for %s"
|
||||
msgid ""
|
||||
"This is the timeline showing replies to %1$s but %2$s hasn't received a "
|
||||
"notice to them yet."
|
||||
msgstr ""
|
||||
"This is the timeline showing replies to %1$s but %2$s hasn't received a "
|
||||
"notice to his attention yet."
|
||||
msgstr "This is the timeline for %1$s but %2$s hasn't posted anything yet."
|
||||
|
||||
#: actions/replies.php:204
|
||||
#, php-format
|
||||
@ -3519,8 +3532,8 @@ msgid ""
|
||||
"You can try to [nudge %1$s](../%2$s) or [post something to them](%%%%action."
|
||||
"newnotice%%%%?status_textarea=%3$s)."
|
||||
msgstr ""
|
||||
"You can try to [nudge %1$s](../%2$s) or [post something to his or her "
|
||||
"attention](%%%%action.newnotice%%%%?status_textarea=%3$s)."
|
||||
"Be the first to [post on this topic](%%%%action.newnotice%%%%?"
|
||||
"status_textarea=%s)!"
|
||||
|
||||
#: actions/repliesrss.php:72
|
||||
#, php-format
|
||||
@ -3550,8 +3563,9 @@ msgstr "User is already sandboxed."
|
||||
#. TRANS: Menu item for site administration
|
||||
#: actions/sessionsadminpanel.php:54 actions/sessionsadminpanel.php:170
|
||||
#: lib/adminpanelaction.php:392
|
||||
#, fuzzy
|
||||
msgid "Sessions"
|
||||
msgstr ""
|
||||
msgstr "Version"
|
||||
|
||||
#: actions/sessionsadminpanel.php:65
|
||||
msgid "Session settings for this StatusNet site."
|
||||
@ -3619,16 +3633,18 @@ msgid "Created by %1$s - %2$s access by default - %3$d users"
|
||||
msgstr ""
|
||||
|
||||
#: actions/showapplication.php:213
|
||||
#, fuzzy
|
||||
msgid "Application actions"
|
||||
msgstr ""
|
||||
msgstr "Application not found."
|
||||
|
||||
#: actions/showapplication.php:236
|
||||
msgid "Reset key & secret"
|
||||
msgstr ""
|
||||
|
||||
#: actions/showapplication.php:261
|
||||
#, fuzzy
|
||||
msgid "Application info"
|
||||
msgstr ""
|
||||
msgstr "Application not found."
|
||||
|
||||
#: actions/showapplication.php:263
|
||||
msgid "Consumer key"
|
||||
@ -3693,13 +3709,11 @@ msgstr ""
|
||||
"notices you like to bookmark them for later or shed a spotlight on them."
|
||||
|
||||
#: actions/showfavorites.php:208
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
msgid ""
|
||||
"%s hasn't added any favorite notices yet. Post something interesting they "
|
||||
"would add to their favorites :)"
|
||||
msgstr ""
|
||||
"%s hasn't added any notices to his favourites yet. Post something "
|
||||
"interesting they would add to their favourites :)"
|
||||
|
||||
#: actions/showfavorites.php:212
|
||||
#, fuzzy, php-format
|
||||
@ -3708,9 +3722,8 @@ msgid ""
|
||||
"action.register%%%%) and then post something interesting they would add to "
|
||||
"their favorites :)"
|
||||
msgstr ""
|
||||
"%s hasn't added any notices to his favourites yet. Why not [register an "
|
||||
"account](%%%%action.register%%%%) and then post something interesting they "
|
||||
"would add to their favourites :)"
|
||||
"Why not [register an account](%%action.register%%) and be the first to add a "
|
||||
"notice to your favourites!"
|
||||
|
||||
#: actions/showfavorites.php:243
|
||||
msgid "This is a way to share what you like."
|
||||
@ -3892,17 +3905,21 @@ msgid ""
|
||||
"You can try to nudge %1$s or [post something to them](%%%%action.newnotice%%%"
|
||||
"%?status_textarea=%2$s)."
|
||||
msgstr ""
|
||||
"You can try to nudge %1$s or [post something to his or her attention](%%%%"
|
||||
"action.newnotice%%%%?status_textarea=%2$s)."
|
||||
"Be the first to [post on this topic](%%%%action.newnotice%%%%?"
|
||||
"status_textarea=%s)!"
|
||||
|
||||
#: actions/showstream.php:243
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en."
|
||||
"wikipedia.org/wiki/Micro-blogging) service based on the Free Software "
|
||||
"[StatusNet](http://status.net/) tool. [Join now](%%%%action.register%%%%) to "
|
||||
"follow **%s**'s notices and many more! ([Read more](%%%%doc.help%%%%))"
|
||||
msgstr ""
|
||||
"This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-"
|
||||
"blogging) service based on the Free Software [StatusNet](http://status.net/) "
|
||||
"tool. [Join now](%%action.register%%) to share notices about yourself with "
|
||||
"friends, family, and colleagues! ([Read more](%%doc.help%%))"
|
||||
|
||||
#: actions/showstream.php:248
|
||||
#, php-format
|
||||
@ -3990,8 +4007,9 @@ msgid "Local"
|
||||
msgstr "Local"
|
||||
|
||||
#: actions/siteadminpanel.php:256
|
||||
#, fuzzy
|
||||
msgid "Default timezone"
|
||||
msgstr ""
|
||||
msgstr "Default subscription"
|
||||
|
||||
#: actions/siteadminpanel.php:257
|
||||
msgid "Default timezone for the site; usually UTC."
|
||||
@ -4217,16 +4235,18 @@ msgid "Manage snapshot configuration"
|
||||
msgstr "Manage snapshot configuration"
|
||||
|
||||
#: actions/snapshotadminpanel.php:127
|
||||
#, fuzzy
|
||||
msgid "Invalid snapshot run value."
|
||||
msgstr ""
|
||||
msgstr "Invalid role."
|
||||
|
||||
#: actions/snapshotadminpanel.php:133
|
||||
msgid "Snapshot frequency must be a number."
|
||||
msgstr ""
|
||||
|
||||
#: actions/snapshotadminpanel.php:144
|
||||
#, fuzzy
|
||||
msgid "Invalid snapshot report URL."
|
||||
msgstr ""
|
||||
msgstr "nvalid logo URL."
|
||||
|
||||
#: actions/snapshotadminpanel.php:200
|
||||
msgid "Randomly during web hit"
|
||||
@ -4237,8 +4257,9 @@ msgid "In a scheduled job"
|
||||
msgstr ""
|
||||
|
||||
#: actions/snapshotadminpanel.php:206
|
||||
#, fuzzy
|
||||
msgid "Data snapshots"
|
||||
msgstr ""
|
||||
msgstr "Save snapshot settings"
|
||||
|
||||
#: actions/snapshotadminpanel.php:208
|
||||
msgid "When to send statistical data to status.net servers"
|
||||
@ -4253,8 +4274,9 @@ msgid "Snapshots will be sent once every N web hits"
|
||||
msgstr ""
|
||||
|
||||
#: actions/snapshotadminpanel.php:226
|
||||
#, fuzzy
|
||||
msgid "Report URL"
|
||||
msgstr ""
|
||||
msgstr "Source URL"
|
||||
|
||||
#: actions/snapshotadminpanel.php:227
|
||||
msgid "Snapshots will be sent to this URL"
|
||||
@ -4322,11 +4344,13 @@ msgid "%s has no subscribers. Want to be the first?"
|
||||
msgstr ""
|
||||
|
||||
#: actions/subscribers.php:114
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"%s has no subscribers. Why not [register an account](%%%%action.register%%%"
|
||||
"%) and be the first?"
|
||||
msgstr ""
|
||||
"Why not [register an account](%%action.register%%) and be the first to add a "
|
||||
"notice to your favourites!"
|
||||
|
||||
#: actions/subscriptions.php:52
|
||||
#, php-format
|
||||
@ -4472,8 +4496,9 @@ msgid "User"
|
||||
msgstr "User"
|
||||
|
||||
#: actions/useradminpanel.php:70
|
||||
#, fuzzy
|
||||
msgid "User settings for this StatusNet site."
|
||||
msgstr ""
|
||||
msgstr "Design settings for this StausNet site."
|
||||
|
||||
#: actions/useradminpanel.php:149
|
||||
msgid "Invalid bio limit. Must be numeric."
|
||||
@ -4507,12 +4532,14 @@ msgid "New users"
|
||||
msgstr "New users"
|
||||
|
||||
#: actions/useradminpanel.php:235
|
||||
#, fuzzy
|
||||
msgid "New user welcome"
|
||||
msgstr ""
|
||||
msgstr "New users"
|
||||
|
||||
#: actions/useradminpanel.php:236
|
||||
#, fuzzy
|
||||
msgid "Welcome text for new users (Max 255 chars)."
|
||||
msgstr ""
|
||||
msgstr "Name is too long (max 255 chars)."
|
||||
|
||||
#: actions/useradminpanel.php:241
|
||||
msgid "Default subscription"
|
||||
@ -4622,9 +4649,9 @@ msgid "Profile URL ‘%s’ is for a local user."
|
||||
msgstr ""
|
||||
|
||||
#: actions/userauthorization.php:345
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid "Avatar URL ‘%s’ is not valid."
|
||||
msgstr ""
|
||||
msgstr "Callback URL is not valid."
|
||||
|
||||
#: actions/userauthorization.php:350
|
||||
#, php-format
|
||||
@ -4696,8 +4723,9 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: actions/version.php:163
|
||||
#, fuzzy
|
||||
msgid "Contributors"
|
||||
msgstr ""
|
||||
msgstr "Connections"
|
||||
|
||||
#: actions/version.php:170
|
||||
msgid ""
|
||||
@ -4894,7 +4922,7 @@ msgstr "Problem saving group inbox."
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -4932,8 +4960,9 @@ msgstr "You have been banned from subscribing."
|
||||
|
||||
#. TRANS: Exception thrown when trying to subscribe while already subscribed.
|
||||
#: classes/Subscription.php:80
|
||||
#, fuzzy
|
||||
msgid "Already subscribed!"
|
||||
msgstr ""
|
||||
msgstr "Not subscribed!"
|
||||
|
||||
#. TRANS: Exception thrown when trying to subscribe to a user who has blocked the subscribing user.
|
||||
#: classes/Subscription.php:85
|
||||
@ -4950,19 +4979,19 @@ msgstr "Not subscribed!"
|
||||
#: classes/Subscription.php:178
|
||||
#, fuzzy
|
||||
msgid "Could not delete self-subscription."
|
||||
msgstr "Couldn't delete self-subscription."
|
||||
msgstr "Could not save subscription."
|
||||
|
||||
#. TRANS: Exception thrown when the OMB token for a subscription could not deleted on the server.
|
||||
#: classes/Subscription.php:206
|
||||
#, fuzzy
|
||||
msgid "Could not delete subscription OMB token."
|
||||
msgstr "Couldn't delete subscription OMB token."
|
||||
msgstr "Could not save subscription."
|
||||
|
||||
#. TRANS: Exception thrown when a subscription could not be deleted on the server.
|
||||
#: classes/Subscription.php:218
|
||||
#, fuzzy
|
||||
msgid "Could not delete subscription."
|
||||
msgstr "Couldn't delete subscription."
|
||||
msgstr "Could not save subscription."
|
||||
|
||||
#. TRANS: Notice given on user registration.
|
||||
#. TRANS: %1$s is the sitename, $2$s is the registering user's nickname.
|
||||
@ -5400,13 +5429,15 @@ msgstr ""
|
||||
|
||||
#. TRANS: Form legend.
|
||||
#: lib/applicationeditform.php:137
|
||||
#, fuzzy
|
||||
msgid "Edit application"
|
||||
msgstr ""
|
||||
msgstr "Edit Application"
|
||||
|
||||
#. TRANS: Form guide.
|
||||
#: lib/applicationeditform.php:187
|
||||
#, fuzzy
|
||||
msgid "Icon for this application"
|
||||
msgstr ""
|
||||
msgstr "Do not delete this application"
|
||||
|
||||
#. TRANS: Form input field instructions.
|
||||
#: lib/applicationeditform.php:209
|
||||
@ -5503,13 +5534,15 @@ msgstr "Revoke"
|
||||
|
||||
#. TRANS: DT element label in attachment list.
|
||||
#: lib/attachmentlist.php:88
|
||||
#, fuzzy
|
||||
msgid "Attachments"
|
||||
msgstr ""
|
||||
msgstr "No attachments."
|
||||
|
||||
#. TRANS: DT element label in attachment list item.
|
||||
#: lib/attachmentlist.php:265
|
||||
#, fuzzy
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
msgstr "Authorise URL"
|
||||
|
||||
#. TRANS: DT element label in attachment list item.
|
||||
#: lib/attachmentlist.php:279
|
||||
@ -5521,8 +5554,9 @@ msgid "Notices where this attachment appears"
|
||||
msgstr ""
|
||||
|
||||
#: lib/attachmenttagcloudsection.php:48
|
||||
#, fuzzy
|
||||
msgid "Tags for this attachment"
|
||||
msgstr ""
|
||||
msgstr "No such attachment."
|
||||
|
||||
#: lib/authenticationplugin.php:221 lib/authenticationplugin.php:226
|
||||
msgid "Password changing failed"
|
||||
@ -5912,8 +5946,9 @@ msgstr ""
|
||||
"You can upload your personal background image. The maximum file size is 2MB."
|
||||
|
||||
#: lib/designsettings.php:418
|
||||
#, fuzzy
|
||||
msgid "Design defaults restored."
|
||||
msgstr ""
|
||||
msgstr "Design preferences saved."
|
||||
|
||||
#: lib/disfavorform.php:114 lib/disfavorform.php:140
|
||||
msgid "Disfavor this notice"
|
||||
@ -6313,9 +6348,9 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: lib/mail.php:657
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid "%s (@%s) sent a notice to your attention"
|
||||
msgstr ""
|
||||
msgstr "%s (@%s) added your notice as a favorite"
|
||||
|
||||
#. TRANS: Body of @-reply notification e-mail.
|
||||
#: lib/mail.php:660
|
||||
@ -6355,7 +6390,7 @@ msgid ""
|
||||
"users in conversation. People can send you messages for your eyes only."
|
||||
msgstr ""
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "from"
|
||||
|
||||
@ -6509,23 +6544,23 @@ msgstr ""
|
||||
msgid "at"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "in context"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Repeated by"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Reply to this notice"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Reply"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Notice repeated"
|
||||
|
||||
@ -6827,16 +6862,18 @@ msgid "Top posters"
|
||||
msgstr "Top posters"
|
||||
|
||||
#: lib/unsandboxform.php:69
|
||||
#, fuzzy
|
||||
msgid "Unsandbox"
|
||||
msgstr ""
|
||||
msgstr "Sandbox"
|
||||
|
||||
#: lib/unsandboxform.php:80
|
||||
msgid "Unsandbox this user"
|
||||
msgstr "Unsandbox this user"
|
||||
|
||||
#: lib/unsilenceform.php:67
|
||||
#, fuzzy
|
||||
msgid "Unsilence"
|
||||
msgstr ""
|
||||
msgstr "Silence"
|
||||
|
||||
#: lib/unsilenceform.php:78
|
||||
msgid "Unsilence this user"
|
||||
|
7093
locale/eo/LC_MESSAGES/statusnet.po
Normal file
@ -15,12 +15,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:24:27+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:12:08+0000\n"
|
||||
"Language-Team: French\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: fr\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -805,7 +805,7 @@ msgid "Preview"
|
||||
msgstr "Aperçu"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
@ -1086,7 +1086,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Ne pas supprimer cet avis"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Supprimer cet avis"
|
||||
|
||||
@ -3538,7 +3538,7 @@ msgstr "Vous ne pouvez pas reprendre votre propre avis."
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "Vous avez déjà repris cet avis."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Repris"
|
||||
|
||||
@ -5020,7 +5020,7 @@ msgstr "Problème lors de l’enregistrement de la boîte de réception du group
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -6594,7 +6594,7 @@ msgstr ""
|
||||
"pour démarrer des conversations avec d’autres utilisateurs. Ceux-ci peuvent "
|
||||
"vous envoyer des messages destinés à vous seul(e)."
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "de"
|
||||
|
||||
@ -6754,23 +6754,23 @@ msgstr "%1$u° %2$u' %3$u\" %4$s %5$u° %6$u' %7$u\" %8$s"
|
||||
msgid "at"
|
||||
msgstr "chez"
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "dans le contexte"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Repris par"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Répondre à cet avis"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Répondre"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Avis repris"
|
||||
|
||||
|
@ -8,12 +8,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:24:35+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:12:24+0000\n"
|
||||
"Language-Team: Interlingua\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: ia\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -790,7 +790,7 @@ msgid "Preview"
|
||||
msgstr "Previsualisation"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Deler"
|
||||
|
||||
@ -1071,7 +1071,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Non deler iste nota"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Deler iste nota"
|
||||
|
||||
@ -3499,7 +3499,7 @@ msgstr "Tu non pote repeter tu proprie nota."
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "Tu ha ja repetite iste nota."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Repetite"
|
||||
|
||||
@ -4964,7 +4964,7 @@ msgstr "Problema salveguardar le cassa de entrata del gruppo."
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -6522,7 +6522,7 @@ msgstr ""
|
||||
"altere usatores in conversation. Altere personas pote inviar te messages que "
|
||||
"solmente tu pote leger."
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "de"
|
||||
|
||||
@ -6682,23 +6682,23 @@ msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
|
||||
msgid "at"
|
||||
msgstr "a"
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "in contexto"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Repetite per"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Responder a iste nota"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Responder"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Nota repetite"
|
||||
|
||||
|
@ -9,12 +9,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:24:45+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:12:44+0000\n"
|
||||
"Language-Team: Macedonian\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: mk\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -792,7 +792,7 @@ msgid "Preview"
|
||||
msgstr "Преглед"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Бриши"
|
||||
|
||||
@ -1074,7 +1074,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Не ја бриши оваа забелешка"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Бриши ја оваа забелешка"
|
||||
|
||||
@ -3510,7 +3510,7 @@ msgstr "Не можете да повторувате сопствена заб
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "Веќе ја имате повторено таа забелешка."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Повторено"
|
||||
|
||||
@ -4983,7 +4983,7 @@ msgstr "Проблем при зачувувањето на групното п
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -5377,13 +5377,13 @@ msgstr "Прелом на страници"
|
||||
#. TRANS: present than the currently displayed information.
|
||||
#: lib/action.php:1203
|
||||
msgid "After"
|
||||
msgstr "По"
|
||||
msgstr "Следно"
|
||||
|
||||
#. TRANS: Pagination message to go to a page displaying information more in the
|
||||
#. TRANS: past than the currently displayed information.
|
||||
#: lib/action.php:1213
|
||||
msgid "Before"
|
||||
msgstr "Пред"
|
||||
msgstr "Претходно"
|
||||
|
||||
#. TRANS: Client exception thrown when a feed instance is a DOMDocument.
|
||||
#: lib/activity.php:122
|
||||
@ -6547,7 +6547,7 @@ msgstr ""
|
||||
"впуштите во разговор со други корисници. Луѓето можат да ви испраќаат пораки "
|
||||
"што ќе можете да ги видите само Вие."
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "од"
|
||||
|
||||
@ -6709,23 +6709,23 @@ msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
|
||||
msgid "at"
|
||||
msgstr "во"
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "во контекст"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Повторено од"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Одговори на забелешкава"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Одговор"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Забелешката е повторена"
|
||||
|
||||
|
@ -11,12 +11,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:24:50+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:12:58+0000\n"
|
||||
"Language-Team: Dutch\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: nl\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -804,7 +804,7 @@ msgid "Preview"
|
||||
msgstr "Voorvertoning"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Verwijderen"
|
||||
|
||||
@ -1086,7 +1086,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Deze mededeling niet verwijderen"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Deze mededeling verwijderen"
|
||||
|
||||
@ -3537,7 +3537,7 @@ msgstr "U kunt uw eigen mededeling niet herhalen."
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "U hent die mededeling al herhaald."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Herhaald"
|
||||
|
||||
@ -5026,7 +5026,7 @@ msgstr ""
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -6599,7 +6599,7 @@ msgstr ""
|
||||
"U hebt geen privéberichten. U kunt privéberichten verzenden aan andere "
|
||||
"gebruikers. Mensen kunnen u privéberichten sturen die alleen u kunt lezen."
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "van"
|
||||
|
||||
@ -6697,7 +6697,7 @@ msgstr "Beschikbare tekens"
|
||||
#: lib/messageform.php:178 lib/noticeform.php:236
|
||||
msgctxt "Send button for sending notice"
|
||||
msgid "Send"
|
||||
msgstr "OK"
|
||||
msgstr "Verzenden"
|
||||
|
||||
#: lib/noticeform.php:160
|
||||
msgid "Send a notice"
|
||||
@ -6761,23 +6761,23 @@ msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
|
||||
msgid "at"
|
||||
msgstr "op"
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "in context"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Herhaald door"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Op deze mededeling antwoorden"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Antwoorden"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Mededeling herhaald"
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:48+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -763,7 +763,7 @@ msgid "Preview"
|
||||
msgstr ""
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
@ -1036,7 +1036,7 @@ msgid "Do not delete this notice"
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr ""
|
||||
|
||||
@ -3310,7 +3310,7 @@ msgstr ""
|
||||
msgid "You already repeated that notice."
|
||||
msgstr ""
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr ""
|
||||
|
||||
@ -4679,7 +4679,7 @@ msgstr ""
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr ""
|
||||
@ -6071,7 +6071,7 @@ msgid ""
|
||||
"users in conversation. People can send you messages for your eyes only."
|
||||
msgstr ""
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr ""
|
||||
|
||||
@ -6225,23 +6225,23 @@ msgstr ""
|
||||
msgid "at"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr ""
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr ""
|
||||
|
||||
|
@ -11,12 +11,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: StatusNet\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-08-07 16:23+0000\n"
|
||||
"PO-Revision-Date: 2010-08-07 16:25:05+0000\n"
|
||||
"POT-Creation-Date: 2010-08-11 10:11+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 10:13:19+0000\n"
|
||||
"Language-Team: Ukrainian\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70633); Translate extension (2010-07-21)\n"
|
||||
"X-Generator: MediaWiki 1.17alpha (r70848); Translate extension (2010-07-21)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: uk\n"
|
||||
"X-Message-Group: out-statusnet\n"
|
||||
@ -792,7 +792,7 @@ msgid "Preview"
|
||||
msgstr "Перегляд"
|
||||
|
||||
#: actions/avatarsettings.php:149 actions/showapplication.php:252
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:656
|
||||
#: lib/deleteuserform.php:66 lib/noticelist.php:657
|
||||
msgid "Delete"
|
||||
msgstr "Видалити"
|
||||
|
||||
@ -1071,7 +1071,7 @@ msgid "Do not delete this notice"
|
||||
msgstr "Не видаляти цей допис"
|
||||
|
||||
#. TRANS: Submit button title for 'Yes' when deleting a notice.
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:656
|
||||
#: actions/deletenotice.php:158 lib/noticelist.php:657
|
||||
msgid "Delete this notice"
|
||||
msgstr "Видалити допис"
|
||||
|
||||
@ -3494,7 +3494,7 @@ msgstr "Ви не можете повторювати свої власні до
|
||||
msgid "You already repeated that notice."
|
||||
msgstr "Ви вже повторили цей допис."
|
||||
|
||||
#: actions/repeat.php:114 lib/noticelist.php:675
|
||||
#: actions/repeat.php:114 lib/noticelist.php:676
|
||||
msgid "Repeated"
|
||||
msgstr "Повторено"
|
||||
|
||||
@ -4960,7 +4960,7 @@ msgstr "Проблема при збереженні вхідних дописі
|
||||
|
||||
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
|
||||
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
|
||||
#: classes/Notice.php:1745
|
||||
#: classes/Notice.php:1746
|
||||
#, php-format
|
||||
msgid "RT @%1$s %2$s"
|
||||
msgstr "RT @%1$s %2$s"
|
||||
@ -6517,7 +6517,7 @@ msgstr ""
|
||||
"повідомлення аби долучити користувачів до розмови. Такі повідомлення бачите "
|
||||
"лише Ви."
|
||||
|
||||
#: lib/mailbox.php:227 lib/noticelist.php:505
|
||||
#: lib/mailbox.php:228 lib/noticelist.php:506
|
||||
msgid "from"
|
||||
msgstr "від"
|
||||
|
||||
@ -6676,23 +6676,23 @@ msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
|
||||
msgid "at"
|
||||
msgstr "в"
|
||||
|
||||
#: lib/noticelist.php:567
|
||||
#: lib/noticelist.php:568
|
||||
msgid "in context"
|
||||
msgstr "в контексті"
|
||||
|
||||
#: lib/noticelist.php:602
|
||||
#: lib/noticelist.php:603
|
||||
msgid "Repeated by"
|
||||
msgstr "Повторено"
|
||||
|
||||
#: lib/noticelist.php:629
|
||||
#: lib/noticelist.php:630
|
||||
msgid "Reply to this notice"
|
||||
msgstr "Відповісти на цей допис"
|
||||
|
||||
#: lib/noticelist.php:630
|
||||
#: lib/noticelist.php:631
|
||||
msgid "Reply"
|
||||
msgstr "Відповісти"
|
||||
|
||||
#: lib/noticelist.php:674
|
||||
#: lib/noticelist.php:675
|
||||
msgid "Notice repeated"
|
||||
msgstr "Допис повторили"
|
||||
|
||||
|
@ -28,6 +28,15 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/ext
|
||||
|
||||
class FeedSubException extends Exception
|
||||
{
|
||||
function __construct($msg=null)
|
||||
{
|
||||
$type = get_class($this);
|
||||
if ($msg) {
|
||||
parent::__construct("$type: $msg");
|
||||
} else {
|
||||
parent::__construct($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class OStatusPlugin extends Plugin
|
||||
|
@ -1,18 +1,42 @@
|
||||
Plugin to support importing updates from external RSS and Atom feeds into your timeline.
|
||||
Plugin to support importing and exporting notices through Atom and RSS feeds.
|
||||
The OStatus plugin concentrates on user-to-user cases for federating StatusNet
|
||||
and similar social networking / microblogging / blogging sites, but includes
|
||||
low-level feed subscription systems which are used by some other plugins.
|
||||
|
||||
Uses PubSubHubbub for push feed updates; currently non-PuSH feeds cannot be
|
||||
subscribed unless an external PuSH hub proxy is used.
|
||||
|
||||
Uses PubSubHubbub for push feed updates; currently non-PuSH feeds cannot be subscribed.
|
||||
|
||||
Configuration options available:
|
||||
|
||||
$config['ostatus']['hub']
|
||||
(default internal hub)
|
||||
Set to URL of an external PuSH hub to use it instead of our internal hub.
|
||||
Set to URL of an external PuSH hub to use it instead of our internal hub
|
||||
for sending outgoing updates in user and group feeds.
|
||||
|
||||
$config['ostatus']['hub_retries']
|
||||
(default 0)
|
||||
Number of times to retry a PuSH send to consumers if using internal hub
|
||||
|
||||
|
||||
Settings controlling incoming feed subscription:
|
||||
|
||||
$config['feedsub']['fallback_hub']
|
||||
To subscribe to feeds that don't have a hub, an external PuSH proxy hub
|
||||
such as Superfeedr may be used. Any feed without a hub of its own will
|
||||
be subscribed through the specified hub URL instead. If the external hub
|
||||
has usage charges, be aware that there is no restriction placed to how
|
||||
many feeds may be subscribed!
|
||||
|
||||
$config['feedsub']['fallback_hub'] = 'https://superfeedr.com/hubbub';
|
||||
|
||||
$config['feedsub']['hub_user']
|
||||
$config['feedsub']['hub_password']
|
||||
If using the fallback hub mode, these settings may be used to provide
|
||||
HTTP authentication credentials for contacting the hub. Default hubs
|
||||
specified from feeds are assumed to not require
|
||||
|
||||
|
||||
For testing, shouldn't be used in production:
|
||||
|
||||
$config['ostatus']['skip_signatures']
|
||||
@ -23,12 +47,11 @@ $config['feedsub']['nohub']
|
||||
(default require hub)
|
||||
Allow low-level feed subscription setup for feeds without hubs.
|
||||
Not actually usable at this stage, OStatus will check for hubs too
|
||||
and we have no polling backend.
|
||||
and we have no polling backend. (The fallback hub option can be used
|
||||
with a 3rd-party service to provide such polling.)
|
||||
|
||||
|
||||
Todo:
|
||||
* fully functional l10n
|
||||
* redo non-OStatus feed support
|
||||
** rssCloud support?
|
||||
** possibly a polling daemon to support non-PuSH feeds?
|
||||
* better support for feeds that aren't natively oriented at social networking
|
||||
* make use of tags/categories from feeds
|
||||
* better repeat handling
|
||||
|
@ -207,8 +207,8 @@ class FeedSub extends Memcached_DataObject
|
||||
$discover = new FeedDiscovery();
|
||||
$discover->discoverFromFeedURL($feeduri);
|
||||
|
||||
$huburi = $discover->getAtomLink('hub');
|
||||
if (!$huburi) {
|
||||
$huburi = $discover->getHubLink();
|
||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
||||
throw new FeedSubNoHubException();
|
||||
}
|
||||
|
||||
@ -241,8 +241,12 @@ class FeedSub extends Memcached_DataObject
|
||||
common_log(LOG_WARNING, "Attempting to (re)start PuSH subscription to $this->uri in unexpected state $this->sub_state");
|
||||
}
|
||||
if (empty($this->huburi)) {
|
||||
if (common_config('feedsub', 'nohub')) {
|
||||
if (common_config('feedsub', 'fallback_hub')) {
|
||||
// No native hub on this feed?
|
||||
// Use our fallback hub, which handles polling on our behalf.
|
||||
} else if (common_config('feedsub', 'nohub')) {
|
||||
// Fake it! We're just testing remote feeds w/o hubs.
|
||||
// We'll never actually get updates in this mode.
|
||||
return true;
|
||||
} else {
|
||||
throw new ServerException("Attempting to start PuSH subscription for feed with no hub");
|
||||
@ -267,8 +271,12 @@ class FeedSub extends Memcached_DataObject
|
||||
common_log(LOG_WARNING, "Attempting to (re)end PuSH subscription to $this->uri in unexpected state $this->sub_state");
|
||||
}
|
||||
if (empty($this->huburi)) {
|
||||
if (common_config('feedsub', 'nohub')) {
|
||||
if (common_config('feedsub', 'fallback_hub')) {
|
||||
// No native hub on this feed?
|
||||
// Use our fallback hub, which handles polling on our behalf.
|
||||
} else if (common_config('feedsub', 'nohub')) {
|
||||
// Fake it! We're just testing remote feeds w/o hubs.
|
||||
// We'll never actually get updates in this mode.
|
||||
return true;
|
||||
} else {
|
||||
throw new ServerException("Attempting to end PuSH subscription for feed with no hub");
|
||||
@ -326,7 +334,21 @@ class FeedSub extends Memcached_DataObject
|
||||
'hub.secret' => $this->secret,
|
||||
'hub.topic' => $this->uri);
|
||||
$client = new HTTPClient();
|
||||
$response = $client->post($this->huburi, $headers, $post);
|
||||
if ($this->huburi) {
|
||||
$hub = $this->huburi;
|
||||
} else {
|
||||
if (common_config('feedsub', 'fallback_hub')) {
|
||||
$hub = common_config('feedsub', 'fallback_hub');
|
||||
if (common_config('feedsub', 'hub_user')) {
|
||||
$u = common_config('feedsub', 'hub_user');
|
||||
$p = common_config('feedsub', 'hub_pass');
|
||||
$client->setAuth($u, $p);
|
||||
}
|
||||
} else {
|
||||
throw new FeedSubException('WTF?');
|
||||
}
|
||||
}
|
||||
$response = $client->post($hub, $headers, $post);
|
||||
$status = $response->getStatus();
|
||||
if ($status == 202) {
|
||||
common_log(LOG_INFO, __METHOD__ . ': sub req ok, awaiting verification callback');
|
||||
|
@ -493,8 +493,14 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
// OK here! assume the default
|
||||
} else if ($actor->id == $this->uri || $actor->link == $this->uri) {
|
||||
$this->updateFromActivityObject($actor);
|
||||
} else {
|
||||
} else if ($actor->id) {
|
||||
// We have an ActivityStreams actor with an explicit ID that doesn't match the feed owner.
|
||||
// This isn't what we expect from mainline OStatus person feeds!
|
||||
// Group feeds go down another path, with different validation.
|
||||
throw new Exception("Got an actor '{$actor->title}' ({$actor->id}) on single-user feed for {$this->uri}");
|
||||
} else {
|
||||
// Plain <author> without ActivityStreams actor info.
|
||||
// We'll just ignore this info for now and save the update under the feed's identity.
|
||||
}
|
||||
|
||||
$oprofile = $this;
|
||||
@ -675,7 +681,7 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
common_log(LOG_DEBUG, "Original reply recipients: " . implode(', ', $attention_uris));
|
||||
$groups = array();
|
||||
$replies = array();
|
||||
foreach ($attention_uris as $recipient) {
|
||||
foreach (array_unique($attention_uris) as $recipient) {
|
||||
// Is the recipient a local user?
|
||||
$user = User::staticGet('uri', $recipient);
|
||||
if ($user) {
|
||||
@ -869,12 +875,12 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
$feeduri = $discover->discoverFromFeedURL($feed_url);
|
||||
$hints['feedurl'] = $feeduri;
|
||||
|
||||
$huburi = $discover->getAtomLink('hub');
|
||||
$huburi = $discover->getHubLink();
|
||||
$hints['hub'] = $huburi;
|
||||
$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES);
|
||||
$hints['salmon'] = $salmonuri;
|
||||
|
||||
if (!$huburi) {
|
||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
||||
// We can only deal with folks with a PuSH hub
|
||||
throw new FeedSubNoHubException();
|
||||
}
|
||||
@ -1270,10 +1276,10 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
$discover = new FeedDiscovery();
|
||||
$discover->discoverFromFeedURL($hints['feedurl']);
|
||||
}
|
||||
$huburi = $discover->getAtomLink('hub');
|
||||
$huburi = $discover->getHubLink();
|
||||
}
|
||||
|
||||
if (!$huburi) {
|
||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
||||
// We can only deal with folks with a PuSH hub
|
||||
throw new FeedSubNoHubException();
|
||||
}
|
||||
|
@ -87,6 +87,16 @@ class FeedDiscovery
|
||||
return ActivityUtils::getLink($this->root, $rel, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the referenced PuSH hub link from an Atom feed.
|
||||
*
|
||||
* @return mixed string or false
|
||||
*/
|
||||
public function getHubLink()
|
||||
{
|
||||
return $this->getAtomLink('hub');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @param bool $htmlOk pass false here if you don't want to follow web pages.
|
||||
|
@ -55,7 +55,7 @@ print "Re-running feed discovery for profile URL $oprofile->uri\n";
|
||||
// @fixme will bork where the URI isn't the profile URL for now
|
||||
$discover = new FeedDiscovery();
|
||||
$feedurl = $discover->discoverFromURL($oprofile->uri);
|
||||
$huburi = $discover->getAtomLink('hub');
|
||||
$huburi = $discover->getHubLink();
|
||||
$salmonuri = $discover->getAtomLink(Salmon::NS_REPLIES);
|
||||
|
||||
print " Feed URL: $feedurl\n";
|
||||
|
@ -10,7 +10,7 @@ define('STATUSNET', true);
|
||||
define('LACONICA', true);
|
||||
|
||||
require_once INSTALLDIR . '/lib/common.php';
|
||||
require_once INSTALLDIR . '/plugins/FeedSub/feedsub.php';
|
||||
require_once INSTALLDIR . '/plugins/OStatus/lib/feeddiscovery.php';
|
||||
|
||||
class FeedDiscoveryTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
@ -53,6 +53,8 @@ class SitemapAction extends Action
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
||||
header('Content-Type: text/xml; charset=UTF-8');
|
||||
$this->startXML();
|
||||
|
||||
@ -67,6 +69,27 @@ class SitemapAction extends Action
|
||||
$this->endXML();
|
||||
}
|
||||
|
||||
function lastModified()
|
||||
{
|
||||
$y = $this->trimmed('year');
|
||||
|
||||
$m = $this->trimmed('month');
|
||||
$d = $this->trimmed('day');
|
||||
|
||||
$y += 0;
|
||||
$m += 0;
|
||||
$d += 0;
|
||||
|
||||
$begdate = strtotime("$y-$m-$d 00:00:00");
|
||||
$enddate = $begdate + (24 * 60 * 60);
|
||||
|
||||
if ($enddate < time()) {
|
||||
return $enddate;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function showUrl($url, $lastMod=null, $changeFreq=null, $priority=null)
|
||||
{
|
||||
$this->elementStart('url');
|
||||
|
@ -120,6 +120,9 @@ class SubMirrorPlugin extends Plugin
|
||||
{
|
||||
$schema = Schema::get();
|
||||
$schema->ensureTable('submirror', SubMirror::schemaDef());
|
||||
|
||||
// @hack until key definition support is merged
|
||||
SubMirror::fixIndexes($schema);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,22 @@ class SubMirror extends Memcached_DataObject
|
||||
null, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary hack to set up the compound index, since we can't do
|
||||
* it yet through regular Schema interface. (Coming for 1.0...)
|
||||
*
|
||||
* @param Schema $schema
|
||||
* @return void
|
||||
*/
|
||||
static function fixIndexes($schema)
|
||||
{
|
||||
try {
|
||||
$schema->createIndex('submirror', array('subscribed', 'subscriber'));
|
||||
} catch (Exception $e) {
|
||||
common_log(LOG_ERR, __METHOD__ . ': ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* return key definitions for DB_DataObject
|
||||
*
|
||||
|
325
plugins/TinyMCE/TinyMCEPlugin.php
Normal file
@ -0,0 +1,325 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* StatusNet - the distributed open-source microblogging tool
|
||||
* Copyright (C) 2010, StatusNet, Inc.
|
||||
*
|
||||
* Use TinyMCE library to allow rich text editing in the browser
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @category WYSIWYG
|
||||
* @package StatusNet
|
||||
* @author Evan Prodromou <evan@status.net>
|
||||
* @copyright 2010 StatusNet, Inc.
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
if (!defined('STATUSNET')) {
|
||||
// This check helps protect against security problems;
|
||||
// your code file can't be executed directly from the web.
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use TinyMCE library to allow rich text editing in the browser
|
||||
*
|
||||
* Converts the notice form in browser to a rich-text editor.
|
||||
*
|
||||
* @category WYSIWYG
|
||||
* @package StatusNet
|
||||
* @author Evan Prodromou <evan@status.net>
|
||||
* @copyright 2010 StatusNet, Inc.
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
class TinyMCEPlugin extends Plugin
|
||||
{
|
||||
|
||||
var $html;
|
||||
|
||||
function onEndShowScripts($action)
|
||||
{
|
||||
if (common_logged_in ()) {
|
||||
$action->script(common_path('plugins/TinyMCE/js/jquery.tinymce.js'));
|
||||
$action->inlineScript($this->_inlineScript());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onEndShowStyles($action)
|
||||
{
|
||||
$action->style('span#notice_data-text_container, span#notice_data-text_parent { float: left }');
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'TinyMCE',
|
||||
'version' => STATUSNET_VERSION,
|
||||
'author' => 'Evan Prodromou',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:TinyMCE',
|
||||
'rawdescription' =>
|
||||
_m('Use TinyMCE library to allow rich text editing in the browser'));
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize HTML input and strip out potentially dangerous bits.
|
||||
*
|
||||
* @param string $raw HTML
|
||||
* @return string HTML
|
||||
*/
|
||||
private function sanitizeHtml($raw)
|
||||
{
|
||||
require_once INSTALLDIR . '/extlib/htmLawed/htmLawed.php';
|
||||
|
||||
$config = array('safe' => 1,
|
||||
'deny_attribute' => 'id,style,on*');
|
||||
|
||||
return htmLawed($raw, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip HTML to plaintext string
|
||||
*
|
||||
* @param string $html HTML
|
||||
* @return string plaintext, single line
|
||||
*/
|
||||
private function stripHtml($html)
|
||||
{
|
||||
return str_replace("\n", " ", html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for new-notice form processing to take our HTML goodies;
|
||||
* won't affect API posting etc.
|
||||
*
|
||||
* @param NewNoticeAction $action
|
||||
* @param User $user
|
||||
* @param string $content
|
||||
* @param array $options
|
||||
* @return boolean hook return
|
||||
*/
|
||||
function onStartSaveNewNoticeWeb($action, $user, &$content, &$options)
|
||||
{
|
||||
if ($action->arg('richedit')) {
|
||||
$html = $this->sanitizeHtml($content);
|
||||
$options['rendered'] = $html;
|
||||
$content = $this->stripHtml($html);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for new-notice form processing to process file upload appending...
|
||||
*
|
||||
* @param NewNoticeAction $action
|
||||
* @param MediaFile $media
|
||||
* @param string $content
|
||||
* @param array $options
|
||||
* @return boolean hook return
|
||||
*/
|
||||
function onStartSaveNewNoticeAppendAttachment($action, $media, &$content, &$options)
|
||||
{
|
||||
if ($action->arg('richedit')) {
|
||||
// See if we've got a placeholder inline image; if so, fill it!
|
||||
$dom = new DOMDocument();
|
||||
|
||||
if ($dom->loadHTML($options['rendered'])) {
|
||||
$imgs = $dom->getElementsByTagName('img');
|
||||
foreach ($imgs as $img) {
|
||||
if (preg_match('/(^| )placeholder( |$)/', $img->getAttribute('class'))) {
|
||||
// Create a link to the attachment page...
|
||||
$this->formatAttachment($img, $media);
|
||||
}
|
||||
}
|
||||
$options['rendered'] = $this->saveHtml($dom);
|
||||
}
|
||||
|
||||
// The regular code will append the short URL to the plaintext content.
|
||||
// Carry on and let it through...
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the attachment placeholder img with the final version.
|
||||
*
|
||||
* @param DOMElement $img
|
||||
* @param MediaFile $media
|
||||
*/
|
||||
private function formatAttachment($img, $media)
|
||||
{
|
||||
$parent = $img->parentNode;
|
||||
$dom = $img->ownerDocument;
|
||||
|
||||
$link = $dom->createElement('a');
|
||||
$link->setAttribute('href', $media->fileurl);
|
||||
$link->setAttribute('title', File::url($media->filename));
|
||||
|
||||
if ($this->isEmbeddable($media)) {
|
||||
// Fix the the <img> attributes and wrap the link around it...
|
||||
$this->insertImage($img, $media);
|
||||
$parent->replaceChild($link, $img); //it dies in here?!
|
||||
$link->appendChild($img);
|
||||
} else {
|
||||
// Not an image? Replace it with a text link.
|
||||
$link->setAttribute('rel', 'external');
|
||||
$link->setAttribute('class', 'attachment');
|
||||
$link->setAttribute('id', 'attachment-' . $media->fileRecord->id);
|
||||
$text = $dom->createTextNode($media->shortUrl());
|
||||
$link->appendChild($text);
|
||||
$parent->replaceChild($link, $img);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this media file a type we can display inline?
|
||||
*
|
||||
* @param MediaFile $media
|
||||
* @return boolean
|
||||
*/
|
||||
private function isEmbeddable($media)
|
||||
{
|
||||
$showable = array('image/png',
|
||||
'image/gif',
|
||||
'image/jpeg');
|
||||
return in_array($media->mimetype, $showable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite and resize a placeholder image element to match the uploaded
|
||||
* file. If the holder is smaller than the file, the file is scaled to fit
|
||||
* with correct aspect ratio (but will be loaded at full resolution).
|
||||
*
|
||||
* @param DOMElement $img
|
||||
* @param MediaFile $media
|
||||
*/
|
||||
private function insertImage($img, $media)
|
||||
{
|
||||
$img->setAttribute('src', $media->fileRecord->url);
|
||||
|
||||
$holderWidth = intval($img->getAttribute('width'));
|
||||
$holderHeight = intval($img->getAttribute('height'));
|
||||
|
||||
$path = File::path($media->filename);
|
||||
$imgInfo = getimagesize($path);
|
||||
|
||||
if ($imgInfo) {
|
||||
$origWidth = $imgInfo[0];
|
||||
$origHeight = $imgInfo[1];
|
||||
|
||||
list($width, $height) = $this->sizeBox(
|
||||
$origWidth, $origHeight,
|
||||
$holderWidth, $holderHeight);
|
||||
|
||||
$img->setAttribute('width', $width);
|
||||
$img->setAttribute('height', $height);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param int $origWidth
|
||||
* @param int $origHeight
|
||||
* @param int $holderWidth
|
||||
* @param int $holderHeight
|
||||
* @return array($width, $height)
|
||||
*/
|
||||
private function sizeBox($origWidth, $origHeight, $holderWidth, $holderHeight)
|
||||
{
|
||||
$holderAspect = $holderWidth / $holderHeight;
|
||||
$origAspect = $origWidth / $origHeight;
|
||||
if ($origAspect >= 1.0) {
|
||||
// wide image
|
||||
if ($origWidth > $holderWidth) {
|
||||
return array($holderWidth, intval($holderWidth / $origAspect));
|
||||
} else {
|
||||
return array($origWidth, $origHeight);
|
||||
}
|
||||
} else {
|
||||
if ($origHeight > $holderHeight) {
|
||||
return array(intval($holderWidth * $origAspect), $holderHeight);
|
||||
} else {
|
||||
return array($origWidth, $origHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function saveHtml($dom)
|
||||
{
|
||||
$html = $dom->saveHTML();
|
||||
// hack to remove surrounding crap added to the dom
|
||||
// all we wanted was a fragment
|
||||
$stripped = preg_replace('/^.*<body[^>]*>(.*)<\/body.*$/is', '$1', $html);
|
||||
return $stripped;
|
||||
}
|
||||
|
||||
function _inlineScript()
|
||||
{
|
||||
$path = common_path('plugins/TinyMCE/js/tiny_mce.js');
|
||||
$placeholder = common_path('plugins/TinyMCE/icons/placeholder.png');
|
||||
|
||||
// Note: the normal on-submit triggering to save data from
|
||||
// the HTML editor into the textarea doesn't play well with
|
||||
// our AJAX form submission. Manually moving it to trigger
|
||||
// on our send button click.
|
||||
$scr = <<<END_OF_SCRIPT
|
||||
$().ready(function() {
|
||||
var noticeForm = $('#form_notice');
|
||||
$('textarea#notice_data-text').tinymce({
|
||||
script_url : '{$path}',
|
||||
// General options
|
||||
theme : "advanced",
|
||||
plugins : "paste,fullscreen,autoresize,inlinepopups,tabfocus,linkautodetect",
|
||||
theme_advanced_buttons1 : "bold,italic,strikethrough,|,undo,redo,|,link,unlink,image,|,fullscreen",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
add_form_submit_trigger : false,
|
||||
theme_advanced_resizing : true,
|
||||
tabfocus_elements: ":prev,:next",
|
||||
setup: function(ed) {
|
||||
noticeForm.append('<input type="hidden" name="richedit" value="1">');
|
||||
|
||||
$('#notice_action-submit').click(function() {
|
||||
tinymce.triggerSave();
|
||||
});
|
||||
|
||||
var origCounter = SN.U.CharacterCount;
|
||||
SN.U.CharacterCount = function(form) {
|
||||
var text = $(ed.getDoc()).text();
|
||||
return text.length;
|
||||
};
|
||||
ed.onKeyUp.add(function (ed, e) {
|
||||
SN.U.Counter(noticeForm);
|
||||
});
|
||||
|
||||
$('#'+SN.C.S.NoticeDataAttach).change(function() {
|
||||
var img = '<img src="{$placeholder}" class="placeholder" width="320" height="240">';
|
||||
var html = tinyMCE.activeEditor.getContent();
|
||||
ed.setContent(html + img);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
END_OF_SCRIPT;
|
||||
|
||||
return $scr;
|
||||
}
|
||||
|
||||
}
|
BIN
plugins/TinyMCE/icons/placeholder.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
plugins/TinyMCE/icons/placeholder.xcf
Normal file
1
plugins/TinyMCE/js/jquery.tinymce.js
Normal file
@ -0,0 +1 @@
|
||||
(function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);if(v){s.onInit.add(function(){var x,y=v;if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}})}});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return g.id&&!!tinyMCE.get(g.id)}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery);
|
170
plugins/TinyMCE/js/langs/en.js
Normal file
@ -0,0 +1,170 @@
|
||||
tinyMCE.addI18n({en:{
|
||||
common:{
|
||||
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
|
||||
apply:"Apply",
|
||||
insert:"Insert",
|
||||
update:"Update",
|
||||
cancel:"Cancel",
|
||||
close:"Close",
|
||||
browse:"Browse",
|
||||
class_name:"Class",
|
||||
not_set:"-- Not set --",
|
||||
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
||||
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
||||
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
|
||||
invalid_data:"Error: Invalid values entered, these are marked in red.",
|
||||
more_colors:"More colors"
|
||||
},
|
||||
contextmenu:{
|
||||
align:"Alignment",
|
||||
left:"Left",
|
||||
center:"Center",
|
||||
right:"Right",
|
||||
full:"Full"
|
||||
},
|
||||
insertdatetime:{
|
||||
date_fmt:"%Y-%m-%d",
|
||||
time_fmt:"%H:%M:%S",
|
||||
insertdate_desc:"Insert date",
|
||||
inserttime_desc:"Insert time",
|
||||
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
|
||||
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
||||
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
|
||||
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
|
||||
},
|
||||
print:{
|
||||
print_desc:"Print"
|
||||
},
|
||||
preview:{
|
||||
preview_desc:"Preview"
|
||||
},
|
||||
directionality:{
|
||||
ltr_desc:"Direction left to right",
|
||||
rtl_desc:"Direction right to left"
|
||||
},
|
||||
layer:{
|
||||
insertlayer_desc:"Insert new layer",
|
||||
forward_desc:"Move forward",
|
||||
backward_desc:"Move backward",
|
||||
absolute_desc:"Toggle absolute positioning",
|
||||
content:"New layer..."
|
||||
},
|
||||
save:{
|
||||
save_desc:"Save",
|
||||
cancel_desc:"Cancel all changes"
|
||||
},
|
||||
nonbreaking:{
|
||||
nonbreaking_desc:"Insert non-breaking space character"
|
||||
},
|
||||
iespell:{
|
||||
iespell_desc:"Run spell checking",
|
||||
download:"ieSpell not detected. Do you want to install it now?"
|
||||
},
|
||||
advhr:{
|
||||
advhr_desc:"Horizontal rule"
|
||||
},
|
||||
emotions:{
|
||||
emotions_desc:"Emotions"
|
||||
},
|
||||
searchreplace:{
|
||||
search_desc:"Find",
|
||||
replace_desc:"Find/Replace"
|
||||
},
|
||||
advimage:{
|
||||
image_desc:"Insert/edit image"
|
||||
},
|
||||
advlink:{
|
||||
link_desc:"Insert/edit link"
|
||||
},
|
||||
xhtmlxtras:{
|
||||
cite_desc:"Citation",
|
||||
abbr_desc:"Abbreviation",
|
||||
acronym_desc:"Acronym",
|
||||
del_desc:"Deletion",
|
||||
ins_desc:"Insertion",
|
||||
attribs_desc:"Insert/Edit Attributes"
|
||||
},
|
||||
style:{
|
||||
desc:"Edit CSS Style"
|
||||
},
|
||||
paste:{
|
||||
paste_text_desc:"Paste as Plain Text",
|
||||
paste_word_desc:"Paste from Word",
|
||||
selectall_desc:"Select All",
|
||||
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
|
||||
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
|
||||
},
|
||||
paste_dlg:{
|
||||
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks:"Keep linebreaks",
|
||||
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
||||
},
|
||||
table:{
|
||||
desc:"Inserts a new table",
|
||||
row_before_desc:"Insert row before",
|
||||
row_after_desc:"Insert row after",
|
||||
delete_row_desc:"Delete row",
|
||||
col_before_desc:"Insert column before",
|
||||
col_after_desc:"Insert column after",
|
||||
delete_col_desc:"Remove column",
|
||||
split_cells_desc:"Split merged table cells",
|
||||
merge_cells_desc:"Merge table cells",
|
||||
row_desc:"Table row properties",
|
||||
cell_desc:"Table cell properties",
|
||||
props_desc:"Table properties",
|
||||
paste_row_before_desc:"Paste table row before",
|
||||
paste_row_after_desc:"Paste table row after",
|
||||
cut_row_desc:"Cut table row",
|
||||
copy_row_desc:"Copy table row",
|
||||
del:"Delete table",
|
||||
row:"Row",
|
||||
col:"Column",
|
||||
cell:"Cell"
|
||||
},
|
||||
autosave:{
|
||||
unload_msg:"The changes you made will be lost if you navigate away from this page.",
|
||||
restore_content:"Restore auto-saved content.",
|
||||
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
|
||||
},
|
||||
fullscreen:{
|
||||
desc:"Toggle fullscreen mode"
|
||||
},
|
||||
media:{
|
||||
desc:"Insert / edit embedded media",
|
||||
edit:"Edit embedded media"
|
||||
},
|
||||
fullpage:{
|
||||
desc:"Document properties"
|
||||
},
|
||||
template:{
|
||||
desc:"Insert predefined template content"
|
||||
},
|
||||
visualchars:{
|
||||
desc:"Visual control characters on/off."
|
||||
},
|
||||
spellchecker:{
|
||||
desc:"Toggle spellchecker",
|
||||
menu:"Spellchecker settings",
|
||||
ignore_word:"Ignore word",
|
||||
ignore_words:"Ignore all",
|
||||
langs:"Languages",
|
||||
wait:"Please wait...",
|
||||
sug:"Suggestions",
|
||||
no_sug:"No suggestions",
|
||||
no_mpell:"No misspellings found."
|
||||
},
|
||||
pagebreak:{
|
||||
desc:"Insert page break."
|
||||
},
|
||||
advlist:{
|
||||
types:"Types",
|
||||
def:"Default",
|
||||
lower_alpha:"Lower alpha",
|
||||
lower_greek:"Lower greek",
|
||||
lower_roman:"Lower roman",
|
||||
upper_alpha:"Upper alpha",
|
||||
upper_roman:"Upper roman",
|
||||
circle:"Circle",
|
||||
disc:"Disc",
|
||||
square:"Square"
|
||||
}}});
|
504
plugins/TinyMCE/js/license.txt
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
5
plugins/TinyMCE/js/plugins/advhr/css/advhr.css
Normal file
@ -0,0 +1,5 @@
|
||||
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
|
||||
.panel_wrapper div.current {height:80px;}
|
||||
#width {width:50px; vertical-align:middle;}
|
||||
#width2 {width:50px; vertical-align:middle;}
|
||||
#size {width:100px;}
|
1
plugins/TinyMCE/js/plugins/advhr/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();
|
57
plugins/TinyMCE/js/plugins/advhr/editor_plugin_src.js
Normal file
@ -0,0 +1,57 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
|
||||
init : function(ed, url) {
|
||||
// Register commands
|
||||
ed.addCommand('mceAdvancedHr', function() {
|
||||
ed.windowManager.open({
|
||||
file : url + '/rule.htm',
|
||||
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
|
||||
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('advhr', {
|
||||
title : 'advhr.advhr_desc',
|
||||
cmd : 'mceAdvancedHr'
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function(ed, cm, n) {
|
||||
cm.setActive('advhr', n.nodeName == 'HR');
|
||||
});
|
||||
|
||||
ed.onClick.add(function(ed, e) {
|
||||
e = e.target;
|
||||
|
||||
if (e.nodeName === 'HR')
|
||||
ed.selection.select(e);
|
||||
});
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced HR',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
|
||||
})();
|
43
plugins/TinyMCE/js/plugins/advhr/js/rule.js
Normal file
@ -0,0 +1,43 @@
|
||||
var AdvHRDialog = {
|
||||
init : function(ed) {
|
||||
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
|
||||
|
||||
w = dom.getAttrib(n, 'width');
|
||||
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
|
||||
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
|
||||
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
|
||||
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
|
||||
},
|
||||
|
||||
update : function() {
|
||||
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
|
||||
|
||||
h = '<hr';
|
||||
|
||||
if (f.size.value) {
|
||||
h += ' size="' + f.size.value + '"';
|
||||
st += ' height:' + f.size.value + 'px;';
|
||||
}
|
||||
|
||||
if (f.width.value) {
|
||||
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
|
||||
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
|
||||
}
|
||||
|
||||
if (f.noshade.checked) {
|
||||
h += ' noshade="noshade"';
|
||||
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
|
||||
}
|
||||
|
||||
if (ed.settings.inline_styles)
|
||||
h += ' style="' + tinymce.trim(st) + '"';
|
||||
|
||||
h += ' />';
|
||||
|
||||
ed.execCommand("mceInsertContent", false, h);
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
|
5
plugins/TinyMCE/js/plugins/advhr/langs/en_dlg.js
Normal file
@ -0,0 +1,5 @@
|
||||
tinyMCE.addI18n('en.advhr_dlg',{
|
||||
width:"Width",
|
||||
size:"Height",
|
||||
noshade:"No shadow"
|
||||
});
|
57
plugins/TinyMCE/js/plugins/advhr/rule.htm
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advhr.advhr_desc}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/rule.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="width">{#advhr_dlg.width}</label></td>
|
||||
<td class="nowrap">
|
||||
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
||||
<select name="width2" id="width2">
|
||||
<option value="">px</option>
|
||||
<option value="%">%</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="size">{#advhr_dlg.size}</label></td>
|
||||
<td><select id="size" name="size">
|
||||
<option value="">Normal</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
|
||||
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
13
plugins/TinyMCE/js/plugins/advimage/css/advimage.css
Normal file
@ -0,0 +1,13 @@
|
||||
#src_list, #over_list, #out_list {width:280px;}
|
||||
.mceActionPanel {margin-top:7px;}
|
||||
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
|
||||
.checkbox {border:0;}
|
||||
.panel_wrapper div.current {height:305px;}
|
||||
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
|
||||
#align, #classlist {width:150px;}
|
||||
#width, #height {vertical-align:middle; width:50px; text-align:center;}
|
||||
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
|
||||
#class_list {width:180px;}
|
||||
input {width: 280px;}
|
||||
#constrain, #onmousemovecheck {width:auto;}
|
||||
#id, #dir, #lang, #usemap, #longdesc {width:200px;}
|
1
plugins/TinyMCE/js/plugins/advimage/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})();
|
50
plugins/TinyMCE/js/plugins/advimage/editor_plugin_src.js
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
|
||||
init : function(ed, url) {
|
||||
// Register commands
|
||||
ed.addCommand('mceAdvImage', function() {
|
||||
// Internal image object like a flash placeholder
|
||||
if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
|
||||
return;
|
||||
|
||||
ed.windowManager.open({
|
||||
file : url + '/image.htm',
|
||||
width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
|
||||
height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('image', {
|
||||
title : 'advimage.image_desc',
|
||||
cmd : 'mceAdvImage'
|
||||
});
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced image',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
|
||||
})();
|
232
plugins/TinyMCE/js/plugins/advimage/image.htm
Normal file
@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advimage_dlg.dialog_title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||
<script type="text/javascript" src="js/image.js"></script>
|
||||
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="advimage" style="display: none">
|
||||
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
||||
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
||||
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#advimage_dlg.general}</legend>
|
||||
|
||||
<table class="properties">
|
||||
<tr>
|
||||
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
||||
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
|
||||
<td id="srcbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
|
||||
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
|
||||
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
|
||||
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{#advimage_dlg.preview}</legend>
|
||||
<div id="prev"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="appearance_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#advimage_dlg.tab_appearance}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
||||
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="baseline">{#advimage_dlg.align_baseline}</option>
|
||||
<option value="top">{#advimage_dlg.align_top}</option>
|
||||
<option value="middle">{#advimage_dlg.align_middle}</option>
|
||||
<option value="bottom">{#advimage_dlg.align_bottom}</option>
|
||||
<option value="text-top">{#advimage_dlg.align_texttop}</option>
|
||||
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
|
||||
<option value="left">{#advimage_dlg.align_left}</option>
|
||||
<option value="right">{#advimage_dlg.align_right}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td rowspan="6" valign="top">
|
||||
<div class="alignPreview">
|
||||
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
|
||||
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
|
||||
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
|
||||
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
|
||||
erat volutpat.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
||||
<td class="nowrap">
|
||||
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
|
||||
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
||||
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
|
||||
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
|
||||
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
|
||||
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="class_list">{#class_name}</label></td>
|
||||
<td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
|
||||
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
|
||||
</tr>
|
||||
|
||||
<!-- <tr>
|
||||
<td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
|
||||
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
||||
</tr> -->
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#advimage_dlg.swap_image}</legend>
|
||||
|
||||
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
|
||||
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
|
||||
<td id="onmouseoversrccontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="over_list">{#advimage_dlg.image_list}</label></td>
|
||||
<td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
|
||||
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
|
||||
<td id="onmouseoutsrccontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="out_list">{#advimage_dlg.image_list}</label></td>
|
||||
<td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{#advimage_dlg.misc}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#advimage_dlg.ltr}</option>
|
||||
<option value="rtl">{#advimage_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
|
||||
<td>
|
||||
<input id="usemap" name="usemap" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
|
||||
<td id="longdesccontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
BIN
plugins/TinyMCE/js/plugins/advimage/img/sample.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
443
plugins/TinyMCE/js/plugins/advimage/js/image.js
Normal file
@ -0,0 +1,443 @@
|
||||
var ImageDialog = {
|
||||
preInit : function() {
|
||||
var url;
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
},
|
||||
|
||||
init : function(ed) {
|
||||
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
|
||||
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
this.fillClassList('class_list');
|
||||
this.fillFileList('src_list', 'tinyMCEImageList');
|
||||
this.fillFileList('over_list', 'tinyMCEImageList');
|
||||
this.fillFileList('out_list', 'tinyMCEImageList');
|
||||
TinyMCE_EditableSelects.init();
|
||||
|
||||
if (n.nodeName == 'IMG') {
|
||||
nl.src.value = dom.getAttrib(n, 'src');
|
||||
nl.width.value = dom.getAttrib(n, 'width');
|
||||
nl.height.value = dom.getAttrib(n, 'height');
|
||||
nl.alt.value = dom.getAttrib(n, 'alt');
|
||||
nl.title.value = dom.getAttrib(n, 'title');
|
||||
nl.vspace.value = this.getAttrib(n, 'vspace');
|
||||
nl.hspace.value = this.getAttrib(n, 'hspace');
|
||||
nl.border.value = this.getAttrib(n, 'border');
|
||||
selectByValue(f, 'align', this.getAttrib(n, 'align'));
|
||||
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
|
||||
nl.style.value = dom.getAttrib(n, 'style');
|
||||
nl.id.value = dom.getAttrib(n, 'id');
|
||||
nl.dir.value = dom.getAttrib(n, 'dir');
|
||||
nl.lang.value = dom.getAttrib(n, 'lang');
|
||||
nl.usemap.value = dom.getAttrib(n, 'usemap');
|
||||
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
|
||||
nl.insert.value = ed.getLang('update');
|
||||
|
||||
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
|
||||
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
||||
|
||||
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
|
||||
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
||||
|
||||
if (ed.settings.inline_styles) {
|
||||
// Move attribs to styles
|
||||
if (dom.getAttrib(n, 'align'))
|
||||
this.updateStyle('align');
|
||||
|
||||
if (dom.getAttrib(n, 'hspace'))
|
||||
this.updateStyle('hspace');
|
||||
|
||||
if (dom.getAttrib(n, 'border'))
|
||||
this.updateStyle('border');
|
||||
|
||||
if (dom.getAttrib(n, 'vspace'))
|
||||
this.updateStyle('vspace');
|
||||
}
|
||||
}
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
||||
if (isVisible('srcbrowser'))
|
||||
document.getElementById('src').style.width = '260px';
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
|
||||
if (isVisible('overbrowser'))
|
||||
document.getElementById('onmouseoversrc').style.width = '260px';
|
||||
|
||||
// Setup browse button
|
||||
document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
|
||||
if (isVisible('outbrowser'))
|
||||
document.getElementById('onmouseoutsrc').style.width = '260px';
|
||||
|
||||
// If option enabled default contrain proportions to checked
|
||||
if (ed.getParam("advimage_constrain_proportions", true))
|
||||
f.constrain.checked = true;
|
||||
|
||||
// Check swap image if valid data
|
||||
if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
|
||||
this.setSwapImage(true);
|
||||
else
|
||||
this.setSwapImage(false);
|
||||
|
||||
this.changeAppearance();
|
||||
this.showPreviewImage(nl.src.value, 1);
|
||||
},
|
||||
|
||||
insert : function(file, title) {
|
||||
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
|
||||
|
||||
if (f.src.value === '') {
|
||||
if (ed.selection.getNode().nodeName == 'IMG') {
|
||||
ed.dom.remove(ed.selection.getNode());
|
||||
ed.execCommand('mceRepaint');
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
|
||||
if (!f.alt.value) {
|
||||
tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
|
||||
if (s)
|
||||
t.insertAndClose();
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
t.insertAndClose();
|
||||
},
|
||||
|
||||
insertAndClose : function() {
|
||||
var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
|
||||
|
||||
tinyMCEPopup.restoreSelection();
|
||||
|
||||
// Fixes crash in Safari
|
||||
if (tinymce.isWebKit)
|
||||
ed.getWin().focus();
|
||||
|
||||
if (!ed.settings.inline_styles) {
|
||||
args = {
|
||||
vspace : nl.vspace.value,
|
||||
hspace : nl.hspace.value,
|
||||
border : nl.border.value,
|
||||
align : getSelectValue(f, 'align')
|
||||
};
|
||||
} else {
|
||||
// Remove deprecated values
|
||||
args = {
|
||||
vspace : '',
|
||||
hspace : '',
|
||||
border : '',
|
||||
align : ''
|
||||
};
|
||||
}
|
||||
|
||||
tinymce.extend(args, {
|
||||
src : nl.src.value,
|
||||
width : nl.width.value,
|
||||
height : nl.height.value,
|
||||
alt : nl.alt.value,
|
||||
title : nl.title.value,
|
||||
'class' : getSelectValue(f, 'class_list'),
|
||||
style : nl.style.value,
|
||||
id : nl.id.value,
|
||||
dir : nl.dir.value,
|
||||
lang : nl.lang.value,
|
||||
usemap : nl.usemap.value,
|
||||
longdesc : nl.longdesc.value
|
||||
});
|
||||
|
||||
args.onmouseover = args.onmouseout = '';
|
||||
|
||||
if (f.onmousemovecheck.checked) {
|
||||
if (nl.onmouseoversrc.value)
|
||||
args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
|
||||
|
||||
if (nl.onmouseoutsrc.value)
|
||||
args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
|
||||
}
|
||||
|
||||
el = ed.selection.getNode();
|
||||
|
||||
if (el && el.nodeName == 'IMG') {
|
||||
ed.dom.setAttribs(el, args);
|
||||
} else {
|
||||
ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
||||
ed.dom.setAttribs('__mce_tmp', args);
|
||||
ed.dom.setAttrib('__mce_tmp', 'id', '');
|
||||
ed.undoManager.add();
|
||||
}
|
||||
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
getAttrib : function(e, at) {
|
||||
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
||||
|
||||
if (ed.settings.inline_styles) {
|
||||
switch (at) {
|
||||
case 'align':
|
||||
if (v = dom.getStyle(e, 'float'))
|
||||
return v;
|
||||
|
||||
if (v = dom.getStyle(e, 'vertical-align'))
|
||||
return v;
|
||||
|
||||
break;
|
||||
|
||||
case 'hspace':
|
||||
v = dom.getStyle(e, 'margin-left')
|
||||
v2 = dom.getStyle(e, 'margin-right');
|
||||
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'vspace':
|
||||
v = dom.getStyle(e, 'margin-top')
|
||||
v2 = dom.getStyle(e, 'margin-bottom');
|
||||
if (v && v == v2)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
|
||||
case 'border':
|
||||
v = 0;
|
||||
|
||||
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
||||
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
||||
|
||||
// False or not the same as prev
|
||||
if (!sv || (sv != v && v !== 0)) {
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sv)
|
||||
v = sv;
|
||||
});
|
||||
|
||||
if (v)
|
||||
return parseInt(v.replace(/[^0-9]/g, ''));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (v = dom.getAttrib(e, at))
|
||||
return v;
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
setSwapImage : function(st) {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.onmousemovecheck.checked = st;
|
||||
setBrowserDisabled('overbrowser', !st);
|
||||
setBrowserDisabled('outbrowser', !st);
|
||||
|
||||
if (f.over_list)
|
||||
f.over_list.disabled = !st;
|
||||
|
||||
if (f.out_list)
|
||||
f.out_list.disabled = !st;
|
||||
|
||||
f.onmouseoversrc.disabled = !st;
|
||||
f.onmouseoutsrc.disabled = !st;
|
||||
},
|
||||
|
||||
fillClassList : function(id) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
||||
cl = [];
|
||||
|
||||
tinymce.each(v.split(';'), function(v) {
|
||||
var p = v.split('=');
|
||||
|
||||
cl.push({'title' : p[0], 'class' : p[1]});
|
||||
});
|
||||
} else
|
||||
cl = tinyMCEPopup.editor.dom.getClasses();
|
||||
|
||||
if (cl.length > 0) {
|
||||
lst.options.length = 0;
|
||||
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
||||
|
||||
tinymce.each(cl, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
fillFileList : function(id, l) {
|
||||
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
||||
|
||||
l = window[l];
|
||||
lst.options.length = 0;
|
||||
|
||||
if (l && l.length > 0) {
|
||||
lst.options[lst.options.length] = new Option('', '');
|
||||
|
||||
tinymce.each(l, function(o) {
|
||||
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
||||
});
|
||||
} else
|
||||
dom.remove(dom.getParent(id, 'tr'));
|
||||
},
|
||||
|
||||
resetImageData : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.elements.width.value = f.elements.height.value = '';
|
||||
},
|
||||
|
||||
updateImageData : function(img, st) {
|
||||
var f = document.forms[0];
|
||||
|
||||
if (!st) {
|
||||
f.elements.width.value = img.width;
|
||||
f.elements.height.value = img.height;
|
||||
}
|
||||
|
||||
this.preloadImg = img;
|
||||
},
|
||||
|
||||
changeAppearance : function() {
|
||||
var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
|
||||
|
||||
if (img) {
|
||||
if (ed.getParam('inline_styles')) {
|
||||
ed.dom.setAttrib(img, 'style', f.style.value);
|
||||
} else {
|
||||
img.align = f.align.value;
|
||||
img.border = f.border.value;
|
||||
img.hspace = f.hspace.value;
|
||||
img.vspace = f.vspace.value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
changeHeight : function() {
|
||||
var f = document.forms[0], tp, t = this;
|
||||
|
||||
if (!f.constrain.checked || !t.preloadImg) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (f.width.value == "" || f.height.value == "")
|
||||
return;
|
||||
|
||||
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
|
||||
f.height.value = tp.toFixed(0);
|
||||
},
|
||||
|
||||
changeWidth : function() {
|
||||
var f = document.forms[0], tp, t = this;
|
||||
|
||||
if (!f.constrain.checked || !t.preloadImg) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (f.width.value == "" || f.height.value == "")
|
||||
return;
|
||||
|
||||
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
|
||||
f.width.value = tp.toFixed(0);
|
||||
},
|
||||
|
||||
updateStyle : function(ty) {
|
||||
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
|
||||
|
||||
if (tinyMCEPopup.editor.settings.inline_styles) {
|
||||
// Handle align
|
||||
if (ty == 'align') {
|
||||
dom.setStyle(img, 'float', '');
|
||||
dom.setStyle(img, 'vertical-align', '');
|
||||
|
||||
v = getSelectValue(f, 'align');
|
||||
if (v) {
|
||||
if (v == 'left' || v == 'right')
|
||||
dom.setStyle(img, 'float', v);
|
||||
else
|
||||
img.style.verticalAlign = v;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle border
|
||||
if (ty == 'border') {
|
||||
dom.setStyle(img, 'border', '');
|
||||
|
||||
v = f.border.value;
|
||||
if (v || v == '0') {
|
||||
if (v == '0')
|
||||
img.style.border = '0';
|
||||
else
|
||||
img.style.border = v + 'px solid black';
|
||||
}
|
||||
}
|
||||
|
||||
// Handle hspace
|
||||
if (ty == 'hspace') {
|
||||
dom.setStyle(img, 'marginLeft', '');
|
||||
dom.setStyle(img, 'marginRight', '');
|
||||
|
||||
v = f.hspace.value;
|
||||
if (v) {
|
||||
img.style.marginLeft = v + 'px';
|
||||
img.style.marginRight = v + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
// Handle vspace
|
||||
if (ty == 'vspace') {
|
||||
dom.setStyle(img, 'marginTop', '');
|
||||
dom.setStyle(img, 'marginBottom', '');
|
||||
|
||||
v = f.vspace.value;
|
||||
if (v) {
|
||||
img.style.marginTop = v + 'px';
|
||||
img.style.marginBottom = v + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
// Merge
|
||||
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img');
|
||||
}
|
||||
},
|
||||
|
||||
changeMouseMove : function() {
|
||||
},
|
||||
|
||||
showPreviewImage : function(u, st) {
|
||||
if (!u) {
|
||||
tinyMCEPopup.dom.setHTML('prev', '');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
|
||||
this.resetImageData();
|
||||
|
||||
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
|
||||
|
||||
if (!st)
|
||||
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
|
||||
else
|
||||
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
|
||||
}
|
||||
};
|
||||
|
||||
ImageDialog.preInit();
|
||||
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
43
plugins/TinyMCE/js/plugins/advimage/langs/en_dlg.js
Normal file
@ -0,0 +1,43 @@
|
||||
tinyMCE.addI18n('en.advimage_dlg',{
|
||||
tab_general:"General",
|
||||
tab_appearance:"Appearance",
|
||||
tab_advanced:"Advanced",
|
||||
general:"General",
|
||||
title:"Title",
|
||||
preview:"Preview",
|
||||
constrain_proportions:"Constrain proportions",
|
||||
langdir:"Language direction",
|
||||
langcode:"Language code",
|
||||
long_desc:"Long description link",
|
||||
style:"Style",
|
||||
classes:"Classes",
|
||||
ltr:"Left to right",
|
||||
rtl:"Right to left",
|
||||
id:"Id",
|
||||
map:"Image map",
|
||||
swap_image:"Swap image",
|
||||
alt_image:"Alternative image",
|
||||
mouseover:"for mouse over",
|
||||
mouseout:"for mouse out",
|
||||
misc:"Miscellaneous",
|
||||
example_img:"Appearance preview image",
|
||||
missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.",
|
||||
dialog_title:"Insert/edit image",
|
||||
src:"Image URL",
|
||||
alt:"Image description",
|
||||
list:"Image list",
|
||||
border:"Border",
|
||||
dimensions:"Dimensions",
|
||||
vspace:"Vertical space",
|
||||
hspace:"Horizontal space",
|
||||
align:"Alignment",
|
||||
align_baseline:"Baseline",
|
||||
align_top:"Top",
|
||||
align_middle:"Middle",
|
||||
align_bottom:"Bottom",
|
||||
align_texttop:"Text top",
|
||||
align_textbottom:"Text bottom",
|
||||
align_left:"Left",
|
||||
align_right:"Right",
|
||||
image_list:"Image list"
|
||||
});
|
8
plugins/TinyMCE/js/plugins/advlink/css/advlink.css
Normal file
@ -0,0 +1,8 @@
|
||||
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
||||
.mceActionPanel {margin-top:7px;}
|
||||
.panel_wrapper div.current {height:320px;}
|
||||
#classlist, #title, #href {width:280px;}
|
||||
#popupurl, #popupname {width:200px;}
|
||||
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
||||
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
||||
#events_panel input {width:200px;}
|
1
plugins/TinyMCE/js/plugins/advlink/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})();
|
61
plugins/TinyMCE/js/plugins/advlink/editor_plugin_src.js
Normal file
@ -0,0 +1,61 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
|
||||
init : function(ed, url) {
|
||||
this.editor = ed;
|
||||
|
||||
// Register commands
|
||||
ed.addCommand('mceAdvLink', function() {
|
||||
var se = ed.selection;
|
||||
|
||||
// No selection and not in link
|
||||
if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
|
||||
return;
|
||||
|
||||
ed.windowManager.open({
|
||||
file : url + '/link.htm',
|
||||
width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
|
||||
height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('link', {
|
||||
title : 'advlink.link_desc',
|
||||
cmd : 'mceAdvLink'
|
||||
});
|
||||
|
||||
ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
|
||||
|
||||
ed.onNodeChange.add(function(ed, cm, n, co) {
|
||||
cm.setDisabled('link', co && n.nodeName != 'A');
|
||||
cm.setActive('link', n.nodeName == 'A' && !n.name);
|
||||
});
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced link',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
|
||||
})();
|
528
plugins/TinyMCE/js/plugins/advlink/js/advlink.js
Normal file
@ -0,0 +1,528 @@
|
||||
/* Functions for the advlink plugin popup */
|
||||
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var templates = {
|
||||
"window.open" : "window.open('${url}','${target}','${options}')"
|
||||
};
|
||||
|
||||
function preinit() {
|
||||
var url;
|
||||
|
||||
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
||||
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
||||
}
|
||||
|
||||
function changeClass() {
|
||||
var f = document.forms[0];
|
||||
|
||||
f.classes.value = getSelectValue(f, 'classlist');
|
||||
}
|
||||
|
||||
function init() {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
|
||||
var formObj = document.forms[0];
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var elm = inst.selection.getNode();
|
||||
var action = "insert";
|
||||
var html;
|
||||
|
||||
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
||||
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
||||
document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
|
||||
document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
|
||||
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
||||
|
||||
// Link list
|
||||
html = getLinkListHTML('linklisthref','href');
|
||||
if (html == "")
|
||||
document.getElementById("linklisthrefrow").style.display = 'none';
|
||||
else
|
||||
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
||||
|
||||
// Resize some elements
|
||||
if (isVisible('hrefbrowser'))
|
||||
document.getElementById('href').style.width = '260px';
|
||||
|
||||
if (isVisible('popupurlbrowser'))
|
||||
document.getElementById('popupurl').style.width = '180px';
|
||||
|
||||
elm = inst.dom.getParent(elm, "A");
|
||||
if (elm != null && elm.nodeName == "A")
|
||||
action = "update";
|
||||
|
||||
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
||||
|
||||
setPopupControlsDisabled(true);
|
||||
|
||||
if (action == "update") {
|
||||
var href = inst.dom.getAttrib(elm, 'href');
|
||||
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
||||
|
||||
// Setup form data
|
||||
setFormValue('href', href);
|
||||
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
|
||||
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
|
||||
setFormValue('style', inst.dom.getAttrib(elm, "style"));
|
||||
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
|
||||
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
|
||||
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
|
||||
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
|
||||
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
|
||||
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
|
||||
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
||||
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
||||
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
|
||||
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
|
||||
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
|
||||
setFormValue('onclick', onclick);
|
||||
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
|
||||
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
|
||||
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
|
||||
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
|
||||
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
|
||||
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
|
||||
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
|
||||
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
|
||||
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
|
||||
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
|
||||
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
|
||||
|
||||
// Parse onclick data
|
||||
if (onclick != null && onclick.indexOf('window.open') != -1)
|
||||
parseWindowOpen(onclick);
|
||||
else
|
||||
parseFunction(onclick);
|
||||
|
||||
// Select by the values
|
||||
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
|
||||
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
|
||||
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
|
||||
selectByValue(formObj, 'linklisthref', href);
|
||||
|
||||
if (href.charAt(0) == '#')
|
||||
selectByValue(formObj, 'anchorlist', href);
|
||||
|
||||
addClassesToList('classlist', 'advlink_styles');
|
||||
|
||||
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
|
||||
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
|
||||
} else
|
||||
addClassesToList('classlist', 'advlink_styles');
|
||||
}
|
||||
|
||||
function checkPrefix(n) {
|
||||
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
||||
n.value = 'mailto:' + n.value;
|
||||
|
||||
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
||||
n.value = 'http://' + n.value;
|
||||
}
|
||||
|
||||
function setFormValue(name, value) {
|
||||
document.forms[0].elements[name].value = value;
|
||||
}
|
||||
|
||||
function parseWindowOpen(onclick) {
|
||||
var formObj = document.forms[0];
|
||||
|
||||
// Preprocess center code
|
||||
if (onclick.indexOf('return false;') != -1) {
|
||||
formObj.popupreturn.checked = true;
|
||||
onclick = onclick.replace('return false;', '');
|
||||
} else
|
||||
formObj.popupreturn.checked = false;
|
||||
|
||||
var onClickData = parseLink(onclick);
|
||||
|
||||
if (onClickData != null) {
|
||||
formObj.ispopup.checked = true;
|
||||
setPopupControlsDisabled(false);
|
||||
|
||||
var onClickWindowOptions = parseOptions(onClickData['options']);
|
||||
var url = onClickData['url'];
|
||||
|
||||
formObj.popupname.value = onClickData['target'];
|
||||
formObj.popupurl.value = url;
|
||||
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
|
||||
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
|
||||
|
||||
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
|
||||
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
|
||||
|
||||
if (formObj.popupleft.value.indexOf('screen') != -1)
|
||||
formObj.popupleft.value = "c";
|
||||
|
||||
if (formObj.popuptop.value.indexOf('screen') != -1)
|
||||
formObj.popuptop.value = "c";
|
||||
|
||||
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
|
||||
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
|
||||
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
|
||||
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
|
||||
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
|
||||
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
|
||||
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
|
||||
|
||||
buildOnClick();
|
||||
}
|
||||
}
|
||||
|
||||
function parseFunction(onclick) {
|
||||
var formObj = document.forms[0];
|
||||
var onClickData = parseLink(onclick);
|
||||
|
||||
// TODO: Add stuff here
|
||||
}
|
||||
|
||||
function getOption(opts, name) {
|
||||
return typeof(opts[name]) == "undefined" ? "" : opts[name];
|
||||
}
|
||||
|
||||
function setPopupControlsDisabled(state) {
|
||||
var formObj = document.forms[0];
|
||||
|
||||
formObj.popupname.disabled = state;
|
||||
formObj.popupurl.disabled = state;
|
||||
formObj.popupwidth.disabled = state;
|
||||
formObj.popupheight.disabled = state;
|
||||
formObj.popupleft.disabled = state;
|
||||
formObj.popuptop.disabled = state;
|
||||
formObj.popuplocation.disabled = state;
|
||||
formObj.popupscrollbars.disabled = state;
|
||||
formObj.popupmenubar.disabled = state;
|
||||
formObj.popupresizable.disabled = state;
|
||||
formObj.popuptoolbar.disabled = state;
|
||||
formObj.popupstatus.disabled = state;
|
||||
formObj.popupreturn.disabled = state;
|
||||
formObj.popupdependent.disabled = state;
|
||||
|
||||
setBrowserDisabled('popupurlbrowser', state);
|
||||
}
|
||||
|
||||
function parseLink(link) {
|
||||
link = link.replace(new RegExp(''', 'g'), "'");
|
||||
|
||||
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
|
||||
|
||||
// Is function name a template function
|
||||
var template = templates[fnName];
|
||||
if (template) {
|
||||
// Build regexp
|
||||
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
|
||||
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
|
||||
var replaceStr = "";
|
||||
for (var i=0; i<variableNames.length; i++) {
|
||||
// Is string value
|
||||
if (variableNames[i].indexOf("'${") != -1)
|
||||
regExp += "'(.*)'";
|
||||
else // Number value
|
||||
regExp += "([0-9]*)";
|
||||
|
||||
replaceStr += "$" + (i+1);
|
||||
|
||||
// Cleanup variable name
|
||||
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
|
||||
|
||||
if (i != variableNames.length-1) {
|
||||
regExp += "\\s*,\\s*";
|
||||
replaceStr += "<delim>";
|
||||
} else
|
||||
regExp += ".*";
|
||||
}
|
||||
|
||||
regExp += "\\);?";
|
||||
|
||||
// Build variable array
|
||||
var variables = [];
|
||||
variables["_function"] = fnName;
|
||||
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
|
||||
for (var i=0; i<variableNames.length; i++)
|
||||
variables[variableNames[i]] = variableValues[i];
|
||||
|
||||
return variables;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function parseOptions(opts) {
|
||||
if (opts == null || opts == "")
|
||||
return [];
|
||||
|
||||
// Cleanup the options
|
||||
opts = opts.toLowerCase();
|
||||
opts = opts.replace(/;/g, ",");
|
||||
opts = opts.replace(/[^0-9a-z=,]/g, "");
|
||||
|
||||
var optionChunks = opts.split(',');
|
||||
var options = [];
|
||||
|
||||
for (var i=0; i<optionChunks.length; i++) {
|
||||
var parts = optionChunks[i].split('=');
|
||||
|
||||
if (parts.length == 2)
|
||||
options[parts[0]] = parts[1];
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
function buildOnClick() {
|
||||
var formObj = document.forms[0];
|
||||
|
||||
if (!formObj.ispopup.checked) {
|
||||
formObj.onclick.value = "";
|
||||
return;
|
||||
}
|
||||
|
||||
var onclick = "window.open('";
|
||||
var url = formObj.popupurl.value;
|
||||
|
||||
onclick += url + "','";
|
||||
onclick += formObj.popupname.value + "','";
|
||||
|
||||
if (formObj.popuplocation.checked)
|
||||
onclick += "location=yes,";
|
||||
|
||||
if (formObj.popupscrollbars.checked)
|
||||
onclick += "scrollbars=yes,";
|
||||
|
||||
if (formObj.popupmenubar.checked)
|
||||
onclick += "menubar=yes,";
|
||||
|
||||
if (formObj.popupresizable.checked)
|
||||
onclick += "resizable=yes,";
|
||||
|
||||
if (formObj.popuptoolbar.checked)
|
||||
onclick += "toolbar=yes,";
|
||||
|
||||
if (formObj.popupstatus.checked)
|
||||
onclick += "status=yes,";
|
||||
|
||||
if (formObj.popupdependent.checked)
|
||||
onclick += "dependent=yes,";
|
||||
|
||||
if (formObj.popupwidth.value != "")
|
||||
onclick += "width=" + formObj.popupwidth.value + ",";
|
||||
|
||||
if (formObj.popupheight.value != "")
|
||||
onclick += "height=" + formObj.popupheight.value + ",";
|
||||
|
||||
if (formObj.popupleft.value != "") {
|
||||
if (formObj.popupleft.value != "c")
|
||||
onclick += "left=" + formObj.popupleft.value + ",";
|
||||
else
|
||||
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
|
||||
}
|
||||
|
||||
if (formObj.popuptop.value != "") {
|
||||
if (formObj.popuptop.value != "c")
|
||||
onclick += "top=" + formObj.popuptop.value + ",";
|
||||
else
|
||||
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
|
||||
}
|
||||
|
||||
if (onclick.charAt(onclick.length-1) == ',')
|
||||
onclick = onclick.substring(0, onclick.length-1);
|
||||
|
||||
onclick += "');";
|
||||
|
||||
if (formObj.popupreturn.checked)
|
||||
onclick += "return false;";
|
||||
|
||||
// tinyMCE.debug(onclick);
|
||||
|
||||
formObj.onclick.value = onclick;
|
||||
|
||||
if (formObj.href.value == "")
|
||||
formObj.href.value = url;
|
||||
}
|
||||
|
||||
function setAttrib(elm, attrib, value) {
|
||||
var formObj = document.forms[0];
|
||||
var valueElm = formObj.elements[attrib.toLowerCase()];
|
||||
var dom = tinyMCEPopup.editor.dom;
|
||||
|
||||
if (typeof(value) == "undefined" || value == null) {
|
||||
value = "";
|
||||
|
||||
if (valueElm)
|
||||
value = valueElm.value;
|
||||
}
|
||||
|
||||
// Clean up the style
|
||||
if (attrib == 'style')
|
||||
value = dom.serializeStyle(dom.parseStyle(value), 'a');
|
||||
|
||||
dom.setAttrib(elm, attrib, value);
|
||||
}
|
||||
|
||||
function getAnchorListHTML(id, target) {
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
|
||||
var html = "";
|
||||
|
||||
html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;">';
|
||||
html += '<option value="">---</option>';
|
||||
|
||||
for (i=0; i<nodes.length; i++) {
|
||||
if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
|
||||
html += '<option value="#' + name + '">' + name + '</option>';
|
||||
}
|
||||
|
||||
html += '</select>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function insertAction() {
|
||||
var inst = tinyMCEPopup.editor;
|
||||
var elm, elementArray, i;
|
||||
|
||||
elm = inst.selection.getNode();
|
||||
checkPrefix(document.forms[0].href);
|
||||
|
||||
elm = inst.dom.getParent(elm, "A");
|
||||
|
||||
// Remove element if there is no href
|
||||
if (!document.forms[0].href.value) {
|
||||
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
||||
i = inst.selection.getBookmark();
|
||||
inst.dom.remove(elm, 1);
|
||||
inst.selection.moveToBookmark(i);
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
return;
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
||||
|
||||
// Create new anchor elements
|
||||
if (elm == null) {
|
||||
inst.getDoc().execCommand("unlink", false, null);
|
||||
tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
|
||||
|
||||
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
|
||||
for (i=0; i<elementArray.length; i++)
|
||||
setAllAttribs(elm = elementArray[i]);
|
||||
} else
|
||||
setAllAttribs(elm);
|
||||
|
||||
// Don't move caret if selection was image
|
||||
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
|
||||
inst.focus();
|
||||
inst.selection.select(elm);
|
||||
inst.selection.collapse(0);
|
||||
tinyMCEPopup.storeSelection();
|
||||
}
|
||||
|
||||
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
|
||||
function setAllAttribs(elm) {
|
||||
var formObj = document.forms[0];
|
||||
var href = formObj.href.value;
|
||||
var target = getSelectValue(formObj, 'targetlist');
|
||||
|
||||
setAttrib(elm, 'href', href);
|
||||
setAttrib(elm, 'title');
|
||||
setAttrib(elm, 'target', target == '_self' ? '' : target);
|
||||
setAttrib(elm, 'id');
|
||||
setAttrib(elm, 'style');
|
||||
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
|
||||
setAttrib(elm, 'rel');
|
||||
setAttrib(elm, 'rev');
|
||||
setAttrib(elm, 'charset');
|
||||
setAttrib(elm, 'hreflang');
|
||||
setAttrib(elm, 'dir');
|
||||
setAttrib(elm, 'lang');
|
||||
setAttrib(elm, 'tabindex');
|
||||
setAttrib(elm, 'accesskey');
|
||||
setAttrib(elm, 'type');
|
||||
setAttrib(elm, 'onfocus');
|
||||
setAttrib(elm, 'onblur');
|
||||
setAttrib(elm, 'onclick');
|
||||
setAttrib(elm, 'ondblclick');
|
||||
setAttrib(elm, 'onmousedown');
|
||||
setAttrib(elm, 'onmouseup');
|
||||
setAttrib(elm, 'onmouseover');
|
||||
setAttrib(elm, 'onmousemove');
|
||||
setAttrib(elm, 'onmouseout');
|
||||
setAttrib(elm, 'onkeypress');
|
||||
setAttrib(elm, 'onkeydown');
|
||||
setAttrib(elm, 'onkeyup');
|
||||
|
||||
// Refresh in old MSIE
|
||||
if (tinyMCE.isMSIE5)
|
||||
elm.outerHTML = elm.outerHTML;
|
||||
}
|
||||
|
||||
function getSelectValue(form_obj, field_name) {
|
||||
var elm = form_obj.elements[field_name];
|
||||
|
||||
if (!elm || elm.options == null || elm.selectedIndex == -1)
|
||||
return "";
|
||||
|
||||
return elm.options[elm.selectedIndex].value;
|
||||
}
|
||||
|
||||
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
||||
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
|
||||
return "";
|
||||
|
||||
var html = "";
|
||||
|
||||
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
||||
html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;';
|
||||
|
||||
if (typeof(onchange_func) != "undefined")
|
||||
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
||||
|
||||
html += '"><option value="">---</option>';
|
||||
|
||||
for (var i=0; i<tinyMCELinkList.length; i++)
|
||||
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
||||
|
||||
html += '</select>';
|
||||
|
||||
return html;
|
||||
|
||||
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
|
||||
}
|
||||
|
||||
function getTargetListHTML(elm_id, target_form_element) {
|
||||
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
||||
var html = '';
|
||||
|
||||
html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;">';
|
||||
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
||||
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
||||
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
|
||||
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
|
||||
|
||||
for (var i=0; i<targets.length; i++) {
|
||||
var key, value;
|
||||
|
||||
if (targets[i] == "")
|
||||
continue;
|
||||
|
||||
key = targets[i].split('=')[0];
|
||||
value = targets[i].split('=')[1];
|
||||
|
||||
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
|
||||
}
|
||||
|
||||
html += '</select>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
// While loading
|
||||
preinit();
|
||||
tinyMCEPopup.onInit.add(init);
|
52
plugins/TinyMCE/js/plugins/advlink/langs/en_dlg.js
Normal file
@ -0,0 +1,52 @@
|
||||
tinyMCE.addI18n('en.advlink_dlg',{
|
||||
title:"Insert/edit link",
|
||||
url:"Link URL",
|
||||
target:"Target",
|
||||
titlefield:"Title",
|
||||
is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
|
||||
is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
|
||||
list:"Link list",
|
||||
general_tab:"General",
|
||||
popup_tab:"Popup",
|
||||
events_tab:"Events",
|
||||
advanced_tab:"Advanced",
|
||||
general_props:"General properties",
|
||||
popup_props:"Popup properties",
|
||||
event_props:"Events",
|
||||
advanced_props:"Advanced properties",
|
||||
popup_opts:"Options",
|
||||
anchor_names:"Anchors",
|
||||
target_same:"Open in this window / frame",
|
||||
target_parent:"Open in parent window / frame",
|
||||
target_top:"Open in top frame (replaces all frames)",
|
||||
target_blank:"Open in new window",
|
||||
popup:"Javascript popup",
|
||||
popup_url:"Popup URL",
|
||||
popup_name:"Window name",
|
||||
popup_return:"Insert 'return false'",
|
||||
popup_scrollbars:"Show scrollbars",
|
||||
popup_statusbar:"Show status bar",
|
||||
popup_toolbar:"Show toolbars",
|
||||
popup_menubar:"Show menu bar",
|
||||
popup_location:"Show location bar",
|
||||
popup_resizable:"Make window resizable",
|
||||
popup_dependent:"Dependent (Mozilla/Firefox only)",
|
||||
popup_size:"Size",
|
||||
popup_position:"Position (X/Y)",
|
||||
id:"Id",
|
||||
style:"Style",
|
||||
classes:"Classes",
|
||||
target_name:"Target name",
|
||||
langdir:"Language direction",
|
||||
target_langcode:"Target language",
|
||||
langcode:"Language code",
|
||||
encoding:"Target character encoding",
|
||||
mime:"Target MIME type",
|
||||
rel:"Relationship page to target",
|
||||
rev:"Relationship target to page",
|
||||
tabindex:"Tabindex",
|
||||
accesskey:"Accesskey",
|
||||
ltr:"Left to right",
|
||||
rtl:"Right to left",
|
||||
link_list:"Link list"
|
||||
});
|
333
plugins/TinyMCE/js/plugins/advlink/link.htm
Normal file
@ -0,0 +1,333 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#advlink_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||
<script type="text/javascript" src="js/advlink.js"></script>
|
||||
<link href="css/advlink.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="advlink" style="display: none">
|
||||
<form onsubmit="insertAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
||||
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
||||
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
||||
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.general_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
|
||||
<td id="hrefbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr id="linklisthrefrow">
|
||||
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
||||
<td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
||||
<td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
|
||||
<td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
|
||||
<td><input id="title" name="title" type="text" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
||||
<td>
|
||||
<select id="classlist" name="classlist" onchange="changeClass();">
|
||||
<option value="" selected="selected">{#not_set}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="popup_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.popup_props}</legend>
|
||||
|
||||
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
||||
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
|
||||
<td id="popupurlbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
||||
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label>{#advlink_dlg.popup_size}</label> </td>
|
||||
<td class="nowrap">
|
||||
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
|
||||
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td>
|
||||
<td class="nowrap">
|
||||
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
|
||||
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.popup_opts}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
||||
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
|
||||
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
|
||||
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
|
||||
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
||||
<td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="advanced_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.advanced_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
|
||||
<td><input type="text" id="style" name="style" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
|
||||
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
|
||||
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
|
||||
<td>
|
||||
<select id="dir" name="dir">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="ltr">{#advlink_dlg.ltr}</option>
|
||||
<option value="rtl">{#advlink_dlg.rtl}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
|
||||
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
|
||||
<td>
|
||||
<input id="lang" name="lang" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
|
||||
<td><input type="text" id="charset" name="charset" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
|
||||
<td><input type="text" id="type" name="type" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
|
||||
<td><select id="rel" name="rel">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="lightbox">Lightbox</option>
|
||||
<option value="alternate">Alternate</option>
|
||||
<option value="designates">Designates</option>
|
||||
<option value="stylesheet">Stylesheet</option>
|
||||
<option value="start">Start</option>
|
||||
<option value="next">Next</option>
|
||||
<option value="prev">Prev</option>
|
||||
<option value="contents">Contents</option>
|
||||
<option value="index">Index</option>
|
||||
<option value="glossary">Glossary</option>
|
||||
<option value="copyright">Copyright</option>
|
||||
<option value="chapter">Chapter</option>
|
||||
<option value="subsection">Subsection</option>
|
||||
<option value="appendix">Appendix</option>
|
||||
<option value="help">Help</option>
|
||||
<option value="bookmark">Bookmark</option>
|
||||
<option value="nofollow">No Follow</option>
|
||||
<option value="tag">Tag</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
|
||||
<td><select id="rev" name="rev">
|
||||
<option value="">{#not_set}</option>
|
||||
<option value="alternate">Alternate</option>
|
||||
<option value="designates">Designates</option>
|
||||
<option value="stylesheet">Stylesheet</option>
|
||||
<option value="start">Start</option>
|
||||
<option value="next">Next</option>
|
||||
<option value="prev">Prev</option>
|
||||
<option value="contents">Contents</option>
|
||||
<option value="index">Index</option>
|
||||
<option value="glossary">Glossary</option>
|
||||
<option value="copyright">Copyright</option>
|
||||
<option value="chapter">Chapter</option>
|
||||
<option value="subsection">Subsection</option>
|
||||
<option value="appendix">Appendix</option>
|
||||
<option value="help">Help</option>
|
||||
<option value="bookmark">Bookmark</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
|
||||
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
|
||||
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="events_panel" class="panel">
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.event_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<tr>
|
||||
<td class="column1"><label for="onfocus">onfocus</label></td>
|
||||
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onblur">onblur</label></td>
|
||||
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onclick">onclick</label></td>
|
||||
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="ondblclick">ondblclick</label></td>
|
||||
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onmousedown">onmousedown</label></td>
|
||||
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onmouseup">onmouseup</label></td>
|
||||
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onmouseover">onmouseover</label></td>
|
||||
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onmousemove">onmousemove</label></td>
|
||||
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onmouseout">onmouseout</label></td>
|
||||
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onkeypress">onkeypress</label></td>
|
||||
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onkeydown">onkeydown</label></td>
|
||||
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="onkeyup">onkeyup</label></td>
|
||||
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
1
plugins/TinyMCE/js/plugins/advlist/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
|
154
plugins/TinyMCE/js/plugins/advlist/editor_plugin_src.js
Normal file
@ -0,0 +1,154 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var each = tinymce.each;
|
||||
|
||||
tinymce.create('tinymce.plugins.AdvListPlugin', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
t.editor = ed;
|
||||
|
||||
function buildFormats(str) {
|
||||
var formats = [];
|
||||
|
||||
each(str.split(/,/), function(type) {
|
||||
formats.push({
|
||||
title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')),
|
||||
styles : {
|
||||
listStyleType : type == 'default' ? '' : type
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return formats;
|
||||
};
|
||||
|
||||
// Setup number formats from config or default
|
||||
t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
|
||||
t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
|
||||
},
|
||||
|
||||
createControl: function(name, cm) {
|
||||
var t = this, btn, format;
|
||||
|
||||
if (name == 'numlist' || name == 'bullist') {
|
||||
// Default to first item if it's a default item
|
||||
if (t[name][0].title == 'advlist.def')
|
||||
format = t[name][0];
|
||||
|
||||
function hasFormat(node, format) {
|
||||
var state = true;
|
||||
|
||||
each(format.styles, function(value, name) {
|
||||
// Format doesn't match
|
||||
if (t.editor.dom.getStyle(node, name) != value) {
|
||||
state = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return state;
|
||||
};
|
||||
|
||||
function applyListFormat() {
|
||||
var list, ed = t.editor, dom = ed.dom, sel = ed.selection;
|
||||
|
||||
// Check for existing list element
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
|
||||
// Switch/add list type if needed
|
||||
if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
|
||||
ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
||||
|
||||
// Append styles to new list element
|
||||
if (format) {
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
|
||||
if (list) {
|
||||
dom.setStyles(list, format.styles);
|
||||
list.removeAttribute('_mce_style');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
btn = cm.createSplitButton(name, {
|
||||
title : 'advanced.' + name + '_desc',
|
||||
'class' : 'mce_' + name,
|
||||
onclick : function() {
|
||||
applyListFormat();
|
||||
}
|
||||
});
|
||||
|
||||
btn.onRenderMenu.add(function(btn, menu) {
|
||||
menu.onShowMenu.add(function() {
|
||||
var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList;
|
||||
|
||||
if (list || format) {
|
||||
fmtList = t[name];
|
||||
|
||||
// Unselect existing items
|
||||
each(menu.items, function(item) {
|
||||
var state = true;
|
||||
|
||||
item.setSelected(0);
|
||||
|
||||
if (list && !item.isDisabled()) {
|
||||
each(fmtList, function(fmt) {
|
||||
if (fmt.id == item.id) {
|
||||
if (!hasFormat(list, fmt)) {
|
||||
state = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (state)
|
||||
item.setSelected(1);
|
||||
}
|
||||
});
|
||||
|
||||
// Select the current format
|
||||
if (!list)
|
||||
menu.items[format.id].setSelected(1);
|
||||
}
|
||||
});
|
||||
|
||||
menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
|
||||
each(t[name], function(item) {
|
||||
item.id = t.editor.dom.uniqueId();
|
||||
|
||||
menu.add({id : item.id, title : item.title, onclick : function() {
|
||||
format = item;
|
||||
applyListFormat();
|
||||
}});
|
||||
});
|
||||
});
|
||||
|
||||
return btn;
|
||||
}
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced lists',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin);
|
||||
})();
|
1
plugins/TinyMCE/js/plugins/autoresize/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
|
119
plugins/TinyMCE/js/plugins/autoresize/editor_plugin_src.js
Normal file
@ -0,0 +1,119 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
/**
|
||||
* Auto Resize
|
||||
*
|
||||
* This plugin automatically resizes the content area to fit its content height.
|
||||
* It will retain a minimum height, which is the height of the content area when
|
||||
* it's initialized.
|
||||
*/
|
||||
tinymce.create('tinymce.plugins.AutoResizePlugin', {
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
||||
* of the editor instance to intercept that event.
|
||||
*
|
||||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
if (ed.getParam('fullscreen_is_enabled'))
|
||||
return;
|
||||
|
||||
/**
|
||||
* This method gets executed each time the editor needs to resize.
|
||||
*/
|
||||
function resize() {
|
||||
var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
||||
|
||||
// Get height differently depending on the browser used
|
||||
myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight;
|
||||
|
||||
// Don't make it smaller than the minimum height
|
||||
if (myHeight > t.autoresize_min_height)
|
||||
resizeHeight = myHeight;
|
||||
|
||||
// Resize content element
|
||||
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
||||
|
||||
// if we're throbbing, we'll re-throb to match the new size
|
||||
if (t.throbbing) {
|
||||
ed.setProgressState(false);
|
||||
ed.setProgressState(true);
|
||||
}
|
||||
};
|
||||
|
||||
t.editor = ed;
|
||||
|
||||
// Define minimum height
|
||||
t.autoresize_min_height = ed.getElement().offsetHeight;
|
||||
|
||||
// Add appropriate listeners for resizing content area
|
||||
ed.onChange.add(resize);
|
||||
ed.onSetContent.add(resize);
|
||||
ed.onPaste.add(resize);
|
||||
ed.onKeyUp.add(resize);
|
||||
ed.onPostRender.add(resize);
|
||||
|
||||
if (ed.getParam('autoresize_on_init', true)) {
|
||||
// Things to do when the editor is ready
|
||||
ed.onInit.add(function(ed, l) {
|
||||
// Show throbber until content area is resized properly
|
||||
ed.setProgressState(true);
|
||||
t.throbbing = true;
|
||||
|
||||
// Hide scrollbars
|
||||
ed.getBody().style.overflowY = "hidden";
|
||||
});
|
||||
|
||||
ed.onLoadContent.add(function(ed, l) {
|
||||
resize();
|
||||
|
||||
// Because the content area resizes when its content CSS loads,
|
||||
// and we can't easily add a listener to its onload event,
|
||||
// we'll just trigger a resize after a short loading period
|
||||
setTimeout(function() {
|
||||
resize();
|
||||
|
||||
// Disable throbber
|
||||
ed.setProgressState(false);
|
||||
t.throbbing = false;
|
||||
}, 1250);
|
||||
});
|
||||
}
|
||||
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
||||
ed.addCommand('mceAutoResize', resize);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Auto Resize',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
|
||||
})();
|
1
plugins/TinyMCE/js/plugins/autosave/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();m.save("TinyMCE")},getItem:function(l){var m=i.getElement();m.load("TinyMCE");return m.getAttribute(l)},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);
|
422
plugins/TinyMCE/js/plugins/autosave/editor_plugin_src.js
Normal file
@ -0,0 +1,422 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*
|
||||
* Adds auto-save capability to the TinyMCE text editor to rescue content
|
||||
* inadvertently lost. This plugin was originally developed by Speednet
|
||||
* and that project can be found here: http://code.google.com/p/tinyautosave/
|
||||
*
|
||||
* TECHNOLOGY DISCUSSION:
|
||||
*
|
||||
* The plugin attempts to use the most advanced features available in the current browser to save
|
||||
* as much content as possible. There are a total of four different methods used to autosave the
|
||||
* content. In order of preference, they are:
|
||||
*
|
||||
* 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain
|
||||
* on the client computer. Data stored in the localStorage area has no expiration date, so we must
|
||||
* manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed
|
||||
* to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As
|
||||
* HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7,
|
||||
* localStorage is stored in the following folder:
|
||||
* C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder]
|
||||
*
|
||||
* 2. sessionStorage - A new feature of HTML 5, sessionStorage works similarly to localStorage,
|
||||
* except it is designed to expire after a certain amount of time. Because the specification
|
||||
* around expiration date/time is very loosely-described, it is preferrable to use locaStorage and
|
||||
* manage the expiration ourselves. sessionStorage has similar storage characteristics to
|
||||
* localStorage, although it seems to have better support by Firefox 3 at the moment. (That will
|
||||
* certainly change as Firefox continues getting better at HTML 5 adoption.)
|
||||
*
|
||||
* 3. UserData - A very under-exploited feature of Microsoft Internet Explorer, UserData is a
|
||||
* way to store up to 128K of data per "document", or up to 1MB of data per domain, on the client
|
||||
* computer. The feature is available for IE 5+, which makes it available for every version of IE
|
||||
* supported by TinyMCE. The content is persistent across browser restarts and expires on the
|
||||
* date/time specified, just like a cookie. However, the data is not cleared when the user clears
|
||||
* cookies on the browser, which makes it well-suited for rescuing autosaved content. UserData,
|
||||
* like other Microsoft IE browser technologies, is implemented as a behavior attached to a
|
||||
* specific DOM object, so in this case we attach the behavior to the same DOM element that the
|
||||
* TinyMCE editor instance is attached to.
|
||||
*/
|
||||
|
||||
(function(tinymce) {
|
||||
// Setup constants to help the compressor to reduce script size
|
||||
var PLUGIN_NAME = 'autosave',
|
||||
RESTORE_DRAFT = 'restoredraft',
|
||||
TRUE = true,
|
||||
undefined,
|
||||
unloadHandlerAdded,
|
||||
Dispatcher = tinymce.util.Dispatcher;
|
||||
|
||||
/**
|
||||
* This plugin adds auto-save capability to the TinyMCE text editor to rescue content
|
||||
* inadvertently lost. By using localStorage.
|
||||
*
|
||||
* @class tinymce.plugins.AutoSave
|
||||
*/
|
||||
tinymce.create('tinymce.plugins.AutoSave', {
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
||||
* of the editor instance to intercept that event.
|
||||
*
|
||||
* @method init
|
||||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init : function(ed, url) {
|
||||
var self = this, settings = ed.settings;
|
||||
|
||||
self.editor = ed;
|
||||
|
||||
// Parses the specified time string into a milisecond number 10m, 10s etc.
|
||||
function parseTime(time) {
|
||||
var multipels = {
|
||||
s : 1000,
|
||||
m : 60000
|
||||
};
|
||||
|
||||
time = /^(\d+)([ms]?)$/.exec('' + time);
|
||||
|
||||
return (time[2] ? multipels[time[2]] : 1) * parseInt(time);
|
||||
};
|
||||
|
||||
// Default config
|
||||
tinymce.each({
|
||||
ask_before_unload : TRUE,
|
||||
interval : '30s',
|
||||
retention : '20m',
|
||||
minlength : 50
|
||||
}, function(value, key) {
|
||||
key = PLUGIN_NAME + '_' + key;
|
||||
|
||||
if (settings[key] === undefined)
|
||||
settings[key] = value;
|
||||
});
|
||||
|
||||
// Parse times
|
||||
settings.autosave_interval = parseTime(settings.autosave_interval);
|
||||
settings.autosave_retention = parseTime(settings.autosave_retention);
|
||||
|
||||
// Register restore button
|
||||
ed.addButton(RESTORE_DRAFT, {
|
||||
title : PLUGIN_NAME + ".restore_content",
|
||||
onclick : function() {
|
||||
if (ed.getContent({draft: true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
|
||||
// Show confirm dialog if the editor isn't empty
|
||||
ed.windowManager.confirm(
|
||||
PLUGIN_NAME + ".warning_message",
|
||||
function(ok) {
|
||||
if (ok)
|
||||
self.restoreDraft();
|
||||
}
|
||||
);
|
||||
} else
|
||||
self.restoreDraft();
|
||||
}
|
||||
});
|
||||
|
||||
// Enable/disable restoredraft button depending on if there is a draft stored or not
|
||||
ed.onNodeChange.add(function() {
|
||||
var controlManager = ed.controlManager;
|
||||
|
||||
if (controlManager.get(RESTORE_DRAFT))
|
||||
controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft());
|
||||
});
|
||||
|
||||
ed.onInit.add(function() {
|
||||
// Check if the user added the restore button, then setup auto storage logic
|
||||
if (ed.controlManager.get(RESTORE_DRAFT)) {
|
||||
// Setup storage engine
|
||||
self.setupStorage(ed);
|
||||
|
||||
// Auto save contents each interval time
|
||||
setInterval(function() {
|
||||
self.storeDraft();
|
||||
ed.nodeChanged();
|
||||
}, settings.autosave_interval);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* This event gets fired when a draft is stored to local storage.
|
||||
*
|
||||
* @event onStoreDraft
|
||||
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
||||
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
||||
*/
|
||||
self.onStoreDraft = new Dispatcher(self);
|
||||
|
||||
/**
|
||||
* This event gets fired when a draft is restored from local storage.
|
||||
*
|
||||
* @event onStoreDraft
|
||||
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
||||
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
||||
*/
|
||||
self.onRestoreDraft = new Dispatcher(self);
|
||||
|
||||
/**
|
||||
* This event gets fired when a draft removed/expired.
|
||||
*
|
||||
* @event onRemoveDraft
|
||||
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
||||
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
||||
*/
|
||||
self.onRemoveDraft = new Dispatcher(self);
|
||||
|
||||
// Add ask before unload dialog only add one unload handler
|
||||
if (!unloadHandlerAdded) {
|
||||
window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler;
|
||||
unloadHandlerAdded = TRUE;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @method getInfo
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Auto save',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an expiration date UTC string.
|
||||
*
|
||||
* @method getExpDate
|
||||
* @return {String} Expiration date UTC string.
|
||||
*/
|
||||
getExpDate : function() {
|
||||
return new Date(
|
||||
new Date().getTime() + this.editor.settings.autosave_retention
|
||||
).toUTCString();
|
||||
},
|
||||
|
||||
/**
|
||||
* This method will setup the storage engine. If the browser has support for it.
|
||||
*
|
||||
* @method setupStorage
|
||||
*/
|
||||
setupStorage : function(ed) {
|
||||
var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK";
|
||||
|
||||
self.key = PLUGIN_NAME + ed.id;
|
||||
|
||||
// Loop though each storage engine type until we find one that works
|
||||
tinymce.each([
|
||||
function() {
|
||||
// Try HTML5 Local Storage
|
||||
if (localStorage) {
|
||||
localStorage.setItem(testKey, testVal);
|
||||
|
||||
if (localStorage.getItem(testKey) === testVal) {
|
||||
localStorage.removeItem(testKey);
|
||||
|
||||
return localStorage;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
function() {
|
||||
// Try HTML5 Session Storage
|
||||
if (sessionStorage) {
|
||||
sessionStorage.setItem(testKey, testVal);
|
||||
|
||||
if (sessionStorage.getItem(testKey) === testVal) {
|
||||
sessionStorage.removeItem(testKey);
|
||||
|
||||
return sessionStorage;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
function() {
|
||||
// Try IE userData
|
||||
if (tinymce.isIE) {
|
||||
ed.getElement().style.behavior = "url('#default#userData')";
|
||||
|
||||
// Fake localStorage on old IE
|
||||
return {
|
||||
autoExpires : TRUE,
|
||||
|
||||
setItem : function(key, value) {
|
||||
var userDataElement = ed.getElement();
|
||||
|
||||
userDataElement.setAttribute(key, value);
|
||||
userDataElement.expires = self.getExpDate();
|
||||
userDataElement.save("TinyMCE");
|
||||
},
|
||||
|
||||
getItem : function(key) {
|
||||
var userDataElement = ed.getElement();
|
||||
|
||||
userDataElement.load("TinyMCE");
|
||||
|
||||
return userDataElement.getAttribute(key);
|
||||
},
|
||||
|
||||
removeItem : function(key) {
|
||||
ed.getElement().removeAttribute(key);
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
], function(setup) {
|
||||
// Try executing each function to find a suitable storage engine
|
||||
try {
|
||||
self.storage = setup();
|
||||
|
||||
if (self.storage)
|
||||
return false;
|
||||
} catch (e) {
|
||||
// Ignore
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* This method will store the current contents in the the storage engine.
|
||||
*
|
||||
* @method storeDraft
|
||||
*/
|
||||
storeDraft : function() {
|
||||
var self = this, storage = self.storage, editor = self.editor, expires, content;
|
||||
|
||||
// Is the contents dirty
|
||||
if (storage) {
|
||||
// If there is no existing key and the contents hasn't been changed since
|
||||
// it's original value then there is no point in saving a draft
|
||||
if (!storage.getItem(self.key) && !editor.isDirty())
|
||||
return;
|
||||
|
||||
// Store contents if the contents if longer than the minlength of characters
|
||||
content = editor.getContent({draft: true});
|
||||
if (content.length > editor.settings.autosave_minlength) {
|
||||
expires = self.getExpDate();
|
||||
|
||||
// Store expiration date if needed IE userData has auto expire built in
|
||||
if (!self.storage.autoExpires)
|
||||
self.storage.setItem(self.key + "_expires", expires);
|
||||
|
||||
self.storage.setItem(self.key, content);
|
||||
self.onStoreDraft.dispatch(self, {
|
||||
expires : expires,
|
||||
content : content
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* This method will restore the contents from the storage engine back to the editor.
|
||||
*
|
||||
* @method restoreDraft
|
||||
*/
|
||||
restoreDraft : function() {
|
||||
var self = this, storage = self.storage;
|
||||
|
||||
if (storage) {
|
||||
content = storage.getItem(self.key);
|
||||
|
||||
if (content) {
|
||||
self.editor.setContent(content);
|
||||
self.onRestoreDraft.dispatch(self, {
|
||||
content : content
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* This method will return true/false if there is a local storage draft available.
|
||||
*
|
||||
* @method hasDraft
|
||||
* @return {boolean} true/false state if there is a local draft.
|
||||
*/
|
||||
hasDraft : function() {
|
||||
var self = this, storage = self.storage, expDate, exists;
|
||||
|
||||
if (storage) {
|
||||
// Does the item exist at all
|
||||
exists = !!storage.getItem(self.key);
|
||||
if (exists) {
|
||||
// Storage needs autoexpire
|
||||
if (!self.storage.autoExpires) {
|
||||
expDate = new Date(storage.getItem(self.key + "_expires"));
|
||||
|
||||
// Contents hasn't expired
|
||||
if (new Date().getTime() < expDate.getTime())
|
||||
return TRUE;
|
||||
|
||||
// Remove it if it has
|
||||
self.removeDraft();
|
||||
} else
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the currently stored draft.
|
||||
*
|
||||
* @method removeDraft
|
||||
*/
|
||||
removeDraft : function() {
|
||||
var self = this, storage = self.storage, key = self.key, content;
|
||||
|
||||
if (storage) {
|
||||
// Get current contents and remove the existing draft
|
||||
content = storage.getItem(key);
|
||||
storage.removeItem(key);
|
||||
storage.removeItem(key + "_expires");
|
||||
|
||||
// Dispatch remove event if we had any contents
|
||||
if (content) {
|
||||
self.onRemoveDraft.dispatch(self, {
|
||||
content : content
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"static" : {
|
||||
// Internal unload handler will be called before the page is unloaded
|
||||
_beforeUnloadHandler : function(e) {
|
||||
var msg;
|
||||
|
||||
tinymce.each(tinyMCE.editors, function(ed) {
|
||||
// Store a draft for each editor instance
|
||||
if (ed.plugins.autosave)
|
||||
ed.plugins.autosave.storeDraft();
|
||||
|
||||
// Never ask in fullscreen mode
|
||||
if (ed.getParam("fullscreen_is_enabled"))
|
||||
return;
|
||||
|
||||
// Setup a return message if the editor is dirty
|
||||
if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload"))
|
||||
msg = ed.getLang("autosave.unload_msg");
|
||||
});
|
||||
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave);
|
||||
})(tinymce);
|
4
plugins/TinyMCE/js/plugins/autosave/langs/en.js
Normal file
@ -0,0 +1,4 @@
|
||||
tinyMCE.addI18n('en.autosave',{
|
||||
restore_content: "Restore auto-saved content",
|
||||
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
|
||||
});
|
1
plugins/TinyMCE/js/plugins/bbcode/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ /gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
|
120
plugins/TinyMCE/js/plugins/bbcode/editor_plugin_src.js
Normal file
@ -0,0 +1,120 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
||||
init : function(ed, url) {
|
||||
var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
||||
|
||||
ed.onBeforeSetContent.add(function(ed, o) {
|
||||
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
||||
});
|
||||
|
||||
ed.onPostProcess.add(function(ed, o) {
|
||||
if (o.set)
|
||||
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
||||
|
||||
if (o.get)
|
||||
o.content = t['_' + dialect + '_html2bbcode'](o.content);
|
||||
});
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'BBCode Plugin',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
// HTML -> BBCode in PunBB dialect
|
||||
_punbb_html2bbcode : function(s) {
|
||||
s = tinymce.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
|
||||
// example: <strong> to [b]
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
||||
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
||||
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
||||
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
||||
rep(/<font>(.*?)<\/font>/gi,"$1");
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
||||
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
|
||||
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
|
||||
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
|
||||
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
|
||||
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
|
||||
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
|
||||
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
|
||||
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
|
||||
rep(/<\/(strong|b)>/gi,"[/b]");
|
||||
rep(/<(strong|b)>/gi,"[b]");
|
||||
rep(/<\/(em|i)>/gi,"[/i]");
|
||||
rep(/<(em|i)>/gi,"[i]");
|
||||
rep(/<\/u>/gi,"[/u]");
|
||||
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
||||
rep(/<u>/gi,"[u]");
|
||||
rep(/<blockquote[^>]*>/gi,"[quote]");
|
||||
rep(/<\/blockquote>/gi,"[/quote]");
|
||||
rep(/<br \/>/gi,"\n");
|
||||
rep(/<br\/>/gi,"\n");
|
||||
rep(/<br>/gi,"\n");
|
||||
rep(/<p>/gi,"");
|
||||
rep(/<\/p>/gi,"\n");
|
||||
rep(/ /gi," ");
|
||||
rep(/"/gi,"\"");
|
||||
rep(/</gi,"<");
|
||||
rep(/>/gi,">");
|
||||
rep(/&/gi,"&");
|
||||
|
||||
return s;
|
||||
},
|
||||
|
||||
// BBCode -> HTML from PunBB dialect
|
||||
_punbb_bbcode2html : function(s) {
|
||||
s = tinymce.trim(s);
|
||||
|
||||
function rep(re, str) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
|
||||
// example: [b] to <strong>
|
||||
rep(/\n/gi,"<br />");
|
||||
rep(/\[b\]/gi,"<strong>");
|
||||
rep(/\[\/b\]/gi,"</strong>");
|
||||
rep(/\[i\]/gi,"<em>");
|
||||
rep(/\[\/i\]/gi,"</em>");
|
||||
rep(/\[u\]/gi,"<u>");
|
||||
rep(/\[\/u\]/gi,"</u>");
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
||||
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
||||
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
|
||||
rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span> ");
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span> ");
|
||||
|
||||
return s;
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
||||
})();
|
1
plugins/TinyMCE/js/plugins/contextmenu/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this,g;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(h,i){if(!i.ctrlKey){if(g){h.selection.setRng(g)}f._getMenu(h).showMenu(i.clientX,i.clientY);a.add(h.getDoc(),"click",function(j){e(h,j)});a.cancel(i)}});d.onRemove.add(function(){if(f._menu){f._menu.removeAll()}});function e(h,i){g=null;if(i&&i.button==2){g=h.selection.getRng();return}if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(h.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
|
147
plugins/TinyMCE/js/plugins/contextmenu/editor_plugin_src.js
Normal file
@ -0,0 +1,147 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
|
||||
|
||||
/**
|
||||
* This plugin a context menu to TinyMCE editor instances.
|
||||
*
|
||||
* @class tinymce.plugins.ContextMenu
|
||||
*/
|
||||
tinymce.create('tinymce.plugins.ContextMenu', {
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
||||
* of the editor instance to intercept that event.
|
||||
*
|
||||
* @method init
|
||||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init : function(ed) {
|
||||
var t = this, lastRng;
|
||||
|
||||
t.editor = ed;
|
||||
|
||||
/**
|
||||
* This event gets fired when the context menu is shown.
|
||||
*
|
||||
* @event onContextMenu
|
||||
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
|
||||
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
|
||||
*/
|
||||
t.onContextMenu = new tinymce.util.Dispatcher(this);
|
||||
|
||||
ed.onContextMenu.add(function(ed, e) {
|
||||
if (!e.ctrlKey) {
|
||||
// Restore the last selection since it was removed
|
||||
if (lastRng)
|
||||
ed.selection.setRng(lastRng);
|
||||
|
||||
t._getMenu(ed).showMenu(e.clientX, e.clientY);
|
||||
Event.add(ed.getDoc(), 'click', function(e) {
|
||||
hide(ed, e);
|
||||
});
|
||||
Event.cancel(e);
|
||||
}
|
||||
});
|
||||
|
||||
ed.onRemove.add(function() {
|
||||
if (t._menu)
|
||||
t._menu.removeAll();
|
||||
});
|
||||
|
||||
function hide(ed, e) {
|
||||
lastRng = null;
|
||||
|
||||
// Since the contextmenu event moves
|
||||
// the selection we need to store it away
|
||||
if (e && e.button == 2) {
|
||||
lastRng = ed.selection.getRng();
|
||||
return;
|
||||
}
|
||||
|
||||
if (t._menu) {
|
||||
t._menu.removeAll();
|
||||
t._menu.destroy();
|
||||
Event.remove(ed.getDoc(), 'click', hide);
|
||||
}
|
||||
};
|
||||
|
||||
ed.onMouseDown.add(hide);
|
||||
ed.onKeyDown.add(hide);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @method getInfo
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Contextmenu',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
_getMenu : function(ed) {
|
||||
var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p1, p2;
|
||||
|
||||
if (m) {
|
||||
m.removeAll();
|
||||
m.destroy();
|
||||
}
|
||||
|
||||
p1 = DOM.getPos(ed.getContentAreaContainer());
|
||||
p2 = DOM.getPos(ed.getContainer());
|
||||
|
||||
m = ed.controlManager.createDropMenu('contextmenu', {
|
||||
offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0),
|
||||
offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0),
|
||||
constrain : 1
|
||||
});
|
||||
|
||||
t._menu = m;
|
||||
|
||||
m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
|
||||
m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
|
||||
m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
|
||||
|
||||
if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
|
||||
m.addSeparator();
|
||||
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
||||
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
||||
}
|
||||
|
||||
m.addSeparator();
|
||||
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
||||
|
||||
m.addSeparator();
|
||||
am = m.addMenu({title : 'contextmenu.align'});
|
||||
am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
|
||||
am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
|
||||
am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
|
||||
am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
|
||||
|
||||
t.onContextMenu.dispatch(t, m, el, col);
|
||||
|
||||
return m;
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
|
||||
})();
|
@ -0,0 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
|
@ -0,0 +1,82 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.Directionality', {
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
t.editor = ed;
|
||||
|
||||
ed.addCommand('mceDirectionLTR', function() {
|
||||
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
||||
|
||||
if (e) {
|
||||
if (ed.dom.getAttrib(e, "dir") != "ltr")
|
||||
ed.dom.setAttrib(e, "dir", "ltr");
|
||||
else
|
||||
ed.dom.setAttrib(e, "dir", "");
|
||||
}
|
||||
|
||||
ed.nodeChanged();
|
||||
});
|
||||
|
||||
ed.addCommand('mceDirectionRTL', function() {
|
||||
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
||||
|
||||
if (e) {
|
||||
if (ed.dom.getAttrib(e, "dir") != "rtl")
|
||||
ed.dom.setAttrib(e, "dir", "rtl");
|
||||
else
|
||||
ed.dom.setAttrib(e, "dir", "");
|
||||
}
|
||||
|
||||
ed.nodeChanged();
|
||||
});
|
||||
|
||||
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
|
||||
ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
|
||||
|
||||
ed.onNodeChange.add(t._nodeChange, t);
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Directionality',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Private methods
|
||||
|
||||
_nodeChange : function(ed, cm, n) {
|
||||
var dom = ed.dom, dir;
|
||||
|
||||
n = dom.getParent(n, dom.isBlock);
|
||||
if (!n) {
|
||||
cm.setDisabled('ltr', 1);
|
||||
cm.setDisabled('rtl', 1);
|
||||
return;
|
||||
}
|
||||
|
||||
dir = dom.getAttrib(n, 'dir');
|
||||
cm.setActive('ltr', dir == "ltr");
|
||||
cm.setDisabled('ltr', 0);
|
||||
cm.setActive('rtl', dir == "rtl");
|
||||
cm.setDisabled('rtl', 0);
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
|
||||
})();
|
1
plugins/TinyMCE/js/plugins/emotions/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce);
|
43
plugins/TinyMCE/js/plugins/emotions/editor_plugin_src.js
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function(tinymce) {
|
||||
tinymce.create('tinymce.plugins.EmotionsPlugin', {
|
||||
init : function(ed, url) {
|
||||
// Register commands
|
||||
ed.addCommand('mceEmotion', function() {
|
||||
ed.windowManager.open({
|
||||
file : url + '/emotions.htm',
|
||||
width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
|
||||
height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url
|
||||
});
|
||||
});
|
||||
|
||||
// Register buttons
|
||||
ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
|
||||
},
|
||||
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Emotions',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
|
||||
})(tinymce);
|
40
plugins/TinyMCE/js/plugins/emotions/emotions.htm
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#emotions_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/emotions.js"></script>
|
||||
</head>
|
||||
<body style="display: none">
|
||||
<div align="center">
|
||||
<div class="title">{#emotions_dlg.title}:<br /><br /></div>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}" title="{#emotions_dlg.cool}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}" title="{#emotions_dlg.cry}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}" title="{#emotions_dlg.embarassed}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}" title="{#emotions_dlg.foot_in_mouth}" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}" title="{#emotions_dlg.frown}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}" title="{#emotions_dlg.innocent}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}" title="{#emotions_dlg.kiss}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}" title="{#emotions_dlg.laughing}" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}" title="{#emotions_dlg.money_mouth}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}" title="{#emotions_dlg.sealed}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}" title="{#emotions_dlg.smile}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}" title="{#emotions_dlg.surprised}" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}" title="{#emotions_dlg.tongue_out}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}" title="{#emotions_dlg.undecided}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}" title="{#emotions_dlg.wink}" /></a></td>
|
||||
<td><a href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}" title="{#emotions_dlg.yell}" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-cool.gif
Normal file
After Width: | Height: | Size: 354 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-cry.gif
Normal file
After Width: | Height: | Size: 329 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-embarassed.gif
Normal file
After Width: | Height: | Size: 331 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-foot-in-mouth.gif
Normal file
After Width: | Height: | Size: 344 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-frown.gif
Normal file
After Width: | Height: | Size: 340 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-innocent.gif
Normal file
After Width: | Height: | Size: 336 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-kiss.gif
Normal file
After Width: | Height: | Size: 338 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-laughing.gif
Normal file
After Width: | Height: | Size: 344 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-money-mouth.gif
Normal file
After Width: | Height: | Size: 321 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-sealed.gif
Normal file
After Width: | Height: | Size: 325 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-smile.gif
Normal file
After Width: | Height: | Size: 345 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-surprised.gif
Normal file
After Width: | Height: | Size: 342 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-tongue-out.gif
Normal file
After Width: | Height: | Size: 328 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-undecided.gif
Normal file
After Width: | Height: | Size: 337 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-wink.gif
Normal file
After Width: | Height: | Size: 351 B |
BIN
plugins/TinyMCE/js/plugins/emotions/img/smiley-yell.gif
Normal file
After Width: | Height: | Size: 336 B |
22
plugins/TinyMCE/js/plugins/emotions/js/emotions.js
Normal file
@ -0,0 +1,22 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var EmotionsDialog = {
|
||||
init : function(ed) {
|
||||
tinyMCEPopup.resizeToInnerSize();
|
||||
},
|
||||
|
||||
insert : function(file, title) {
|
||||
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
||||
|
||||
tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', {
|
||||
src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file,
|
||||
alt : ed.getLang(title),
|
||||
title : ed.getLang(title),
|
||||
border : 0
|
||||
}));
|
||||
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
|
20
plugins/TinyMCE/js/plugins/emotions/langs/en_dlg.js
Normal file
@ -0,0 +1,20 @@
|
||||
tinyMCE.addI18n('en.emotions_dlg',{
|
||||
title:"Insert emotion",
|
||||
desc:"Emotions",
|
||||
cool:"Cool",
|
||||
cry:"Cry",
|
||||
embarassed:"Embarassed",
|
||||
foot_in_mouth:"Foot in mouth",
|
||||
frown:"Frown",
|
||||
innocent:"Innocent",
|
||||
kiss:"Kiss",
|
||||
laughing:"Laughing",
|
||||
money_mouth:"Money mouth",
|
||||
sealed:"Sealed",
|
||||
smile:"Smile",
|
||||
surprised:"Surprised",
|
||||
tongue_out:"Tongue out",
|
||||
undecided:"Undecided",
|
||||
wink:"Wink",
|
||||
yell:"Yell"
|
||||
});
|
22
plugins/TinyMCE/js/plugins/example/dialog.htm
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{#example_dlg.title}</title>
|
||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="js/dialog.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form onsubmit="ExampleDialog.insert();return false;" action="#">
|
||||
<p>Here is a example dialog.</p>
|
||||
<p>Selected text: <input id="someval" name="someval" type="text" class="text" /></p>
|
||||
<p>Custom arg: <input id="somearg" name="somearg" type="text" class="text" /></p>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
1
plugins/TinyMCE/js/plugins/example/editor_plugin.js
Normal file
@ -0,0 +1 @@
|
||||
(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})();
|
84
plugins/TinyMCE/js/plugins/example/editor_plugin_src.js
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
// Load plugin specific language pack
|
||||
tinymce.PluginManager.requireLangPack('example');
|
||||
|
||||
tinymce.create('tinymce.plugins.ExamplePlugin', {
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
||||
* of the editor instance to intercept that event.
|
||||
*
|
||||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init : function(ed, url) {
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
||||
ed.addCommand('mceExample', function() {
|
||||
ed.windowManager.open({
|
||||
file : url + '/dialog.htm',
|
||||
width : 320 + parseInt(ed.getLang('example.delta_width', 0)),
|
||||
height : 120 + parseInt(ed.getLang('example.delta_height', 0)),
|
||||
inline : 1
|
||||
}, {
|
||||
plugin_url : url, // Plugin absolute URL
|
||||
some_custom_arg : 'custom arg' // Custom argument
|
||||
});
|
||||
});
|
||||
|
||||
// Register example button
|
||||
ed.addButton('example', {
|
||||
title : 'example.desc',
|
||||
cmd : 'mceExample',
|
||||
image : url + '/img/example.gif'
|
||||
});
|
||||
|
||||
// Add a node change handler, selects the button in the UI when a image is selected
|
||||
ed.onNodeChange.add(function(ed, cm, n) {
|
||||
cm.setActive('example', n.nodeName == 'IMG');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates control instances based in the incomming name. This method is normally not
|
||||
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
|
||||
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
|
||||
* method can be used to create those.
|
||||
*
|
||||
* @param {String} n Name of the control to create.
|
||||
* @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
|
||||
* @return {tinymce.ui.Control} New control instance or null if no control was created.
|
||||
*/
|
||||
createControl : function(n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Example plugin',
|
||||
author : 'Some author',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',
|
||||
version : "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);
|
||||
})();
|
BIN
plugins/TinyMCE/js/plugins/example/img/example.gif
Normal file
After Width: | Height: | Size: 87 B |
19
plugins/TinyMCE/js/plugins/example/js/dialog.js
Normal file
@ -0,0 +1,19 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var ExampleDialog = {
|
||||
init : function() {
|
||||
var f = document.forms[0];
|
||||
|
||||
// Get the selected contents as text and place it in the input
|
||||
f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
|
||||
f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
|
||||
},
|
||||
|
||||
insert : function() {
|
||||
// Insert the contents from the input into the document
|
||||
tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
|
||||
tinyMCEPopup.close();
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);
|
3
plugins/TinyMCE/js/plugins/example/langs/en.js
Normal file
@ -0,0 +1,3 @@
|
||||
tinyMCE.addI18n('en.example',{
|
||||
desc : 'This is just a template button'
|
||||
});
|
3
plugins/TinyMCE/js/plugins/example/langs/en_dlg.js
Normal file
@ -0,0 +1,3 @@
|
||||
tinyMCE.addI18n('en.example_dlg',{
|
||||
title : 'This is just a example title'
|
||||
});
|